diff --git a/dots/.config/fish/config.fish b/dots/.config/fish/config.fish index c565cef0a..f10482d06 100755 --- a/dots/.config/fish/config.fish +++ b/dots/.config/fish/config.fish @@ -27,5 +27,7 @@ if status is-interactive if test "$TERM" != "linux" alias ls 'eza --icons' end - + if test "$TERM" = "xterm-kitty" + alias ssh 'kitten ssh' + end end diff --git a/dots/.config/hypr/custom/variables.conf b/dots/.config/hypr/custom/variables.conf new file mode 100644 index 000000000..6df5899cb --- /dev/null +++ b/dots/.config/hypr/custom/variables.conf @@ -0,0 +1 @@ +# For all available variables, see ~/.config/hypr/hyprland/variables.conf diff --git a/dots/.config/hypr/hyprland.conf b/dots/.config/hypr/hyprland.conf index f51e0fbcc..b59a6d525 100644 --- a/dots/.config/hypr/hyprland.conf +++ b/dots/.config/hypr/hyprland.conf @@ -1,30 +1,40 @@ # This file sources other files in `hyprland` and `custom` folders # You wanna add your stuff in files in `custom` -$qsConfig = ii -exec = hyprctl dispatch submap global # DO NOT REMOVE THIS OR YOU WON'T BE ABLE TO USE ANY KEYBIND -submap = global # This is required for catchall to work - -# Environment variables +# --- Environment variables --- source=hyprland/env.conf source=custom/env.conf -# Defaults -source=hyprland/execs.conf -source=hyprland/general.conf -source=hyprland/rules.conf -source=hyprland/colors.conf -source=hyprland/keybinds.conf +# --- Other vars --- +source=hyprland/variables.conf +source=custom/variables.conf -# Custom +# --- Defaults --- +# hyprlang if !dontLoadDefaultExecs +source=hyprland/execs.conf +# hyprlang endif +# hyprlang if !dontLoadDefaultGeneral +source=hyprland/general.conf +# hyprlang endif +# hyprlang if !dontLoadDefaultRules +source=hyprland/rules.conf +# hyprlang endif +# hyprlang if !dontLoadDefaultColors +source=hyprland/colors.conf +# hyprlang endif +# hyprlang if !dontLoadDefaultKeybinds +source=hyprland/keybinds.conf +# hyprlang endif + +# --- Custom --- source=custom/execs.conf source=custom/general.conf source=custom/rules.conf source=custom/keybinds.conf -# nwg-displays support +# --- nwg-displays support --- source=workspaces.conf source=monitors.conf -# Shell overrides +# --- Shell overrides --- source=hyprland/shellOverrides/main.conf diff --git a/dots/.config/hypr/hyprland/env.conf b/dots/.config/hypr/hyprland/env.conf index 0c2103407..29a171f82 100644 --- a/dots/.config/hypr/hyprland/env.conf +++ b/dots/.config/hypr/hyprland/env.conf @@ -11,6 +11,3 @@ env = XDG_MENU_PREFIX, plasma- # ######## Virtual envrionment ######### env = ILLOGICAL_IMPULSE_VIRTUAL_ENV, ~/.local/state/quickshell/.venv - -# ######## Terminal application ######### -env = TERMINAL,kitty -1 diff --git a/dots/.config/hypr/hyprland/keybinds.conf b/dots/.config/hypr/hyprland/keybinds.conf index 604a5b87b..7b0c4d15e 100644 --- a/dots/.config/hypr/hyprland/keybinds.conf +++ b/dots/.config/hypr/hyprland/keybinds.conf @@ -1,6 +1,11 @@ # Lines ending with `# [hidden]` won't be shown on cheatsheet # Lines starting with #! are section headings +# DO NOT REMOVE THIS EXEC OR YOU WON'T BE ABLE TO USE ANY KEYBIND +exec = hyprctl dispatch submap global +# This is required for catchall to work +submap = global + #! ##! Shell # These absolutely need to be on top, or they won't work consistently @@ -52,7 +57,7 @@ bindld = Super+Alt,M, Toggle mic, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle # bindd = Ctrl+Super, T, Toggle wallpaper selector, global, quickshell:wallpaperSelectorToggle # Wallpaper selector bindd = Ctrl+Super+Alt, T, Select random wallpaper, global, quickshell:wallpaperSelectorRandom # Random wallpaper bindd = Ctrl+Super, T, Change wallpaper, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/quickshell/$qsConfig/scripts/colors/switchwall.sh # [hidden] Change wallpaper (fallback) -bind = Ctrl+Super, R, exec, killall ags agsv1 gjs ydotool qs quickshell; qs -c $qsConfig & # Restart widgets +bind = Ctrl+Super, R, exec, killall ydotool qs quickshell; qs -c $qsConfig & # Restart widgets bind = Ctrl+Super, P, global, quickshell:panelFamilyCycle # Cycle panel family ##! Utilities @@ -69,7 +74,6 @@ bind = Super+Shift, T, global, quickshell:screenTranslate # Translate screen con bind = Super+Shift, X,exec, qs -c $qsConfig ipc call TEST_ALIVE || pidof slurp || grim -g "$(slurp $SLURP_ARGS)" "/tmp/ocr_image.png" && tesseract "/tmp/ocr_image.png" stdout -l $(tesseract --list-langs | awk 'NR>1{print $1}' | tr '\\n' '+' | sed 's/\\+$/\\n/') | wl-copy && rm "/tmp/ocr_image.png" # [hidden] # Color picker bindd = Super+Shift, C, Color picker, exec, hyprpicker -a # Pick color (Hex) >> clipboard -bindln = Ctrl,Print,exec,grim - | wl-copy # [hidden] Screenshot >> clipboard & file (clipboard) # Recording stuff bindl = Super+Shift, R, global, quickshell:regionRecord # Record region (no sound) bindl = Super+Shift, R, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/quickshell/$qsConfig/scripts/videos/record.sh # [hidden] Record region (no sound) (fallback) @@ -78,10 +82,11 @@ bindl = Super+Alt, R, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/qui bindl = Ctrl+Alt, R, exec, ~/.config/quickshell/$qsConfig/scripts/videos/record.sh --fullscreen # [hidden] Record screen (no sound) bindl = Super+Shift+Alt, R, exec, ~/.config/quickshell/$qsConfig/scripts/videos/record.sh --fullscreen --sound # Record screen (with sound) # Fullscreen screenshot -bindl = ,Print,exec,grim - | wl-copy # Screenshot >> clipboard -bindln = Ctrl,Print, exec, mkdir -p $(xdg-user-dir PICTURES)/Screenshots && grim $(xdg-user-dir PICTURES)/Screenshots/Screenshot_"$(date '+%Y-%m-%d_%H.%M.%S')".png # Screenshot >> clipboard & file +bindl = ,Print,exec,grim -o "$(hyprctl activeworkspace -j | jq -r '.monitor')" - | wl-copy # Screenshot >> clipboard +bindln = Ctrl,Print, exec, mkdir -p $(xdg-user-dir PICTURES)/Screenshots && grim -o "$(hyprctl activeworkspace -j | jq -r '.monitor')" $(xdg-user-dir PICTURES)/Screenshots/Screenshot_"$(date '+%Y-%m-%d_%H.%M.%S')".png # Screenshot >> clipboard & file +bindln = Ctrl,Print,exec,grim -o "$(hyprctl activeworkspace -j | jq -r '.monitor')" - | wl-copy # [hidden] Screenshot >> clipboard & file (clipboard) # AI -bindd = Super+Shift+Alt, mouse:273, Generate AI summary for selected text, exec, ~/.config/hypr/hyprland/scripts/ai/primary-buffer-query.sh # [hidden] AI summary for selected text +bindd = Super+Shift+Alt, mouse:273, Generate AI summary for selected text, exec, ~/.config/hypr/hyprland/scripts/ai/primary-buffer-query.sh # [hidden] AI summary for selected text (requires a running ollama model) #! ##! Window @@ -249,17 +254,17 @@ bindl= ,XF86AudioPlay, exec, playerctl play-pause # [hidden] bindl= ,XF86AudioPause, exec, playerctl play-pause # [hidden] ##! Apps -bind = Super, Return, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "${TERMINAL}" "kitty -1" "foot" "alacritty" "wezterm" "konsole" "kgx" "uxterm" "xterm" # Terminal -bind = Super, T, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "${TERMINAL}" "kitty -1" "foot" "alacritty" "wezterm" "konsole" "kgx" "uxterm" "xterm" # [hidden] (terminal) (alt) -bind = Ctrl+Alt, T, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "${TERMINAL}" "kitty -1" "foot" "alacritty" "wezterm" "konsole" "kgx" "uxterm" "xterm" # [hidden] (terminal) (for Ubuntu people) -bind = Super, E, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "dolphin" "nautilus" "nemo" "thunar" "${TERMINAL}" "kitty -1 fish -c yazi" # File manager -bind = Super, W, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "google-chrome-stable" "zen-browser" "firefox" "brave" "chromium" "microsoft-edge-stable" "opera" "librewolf" # Browser -bind = Super, C, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "antigravity" "code" "codium" "cursor" "zed" "zedit" "zeditor" "kate" "gnome-text-editor" "emacs" "command -v nvim && kitty -1 nvim" "command -v micro && kitty -1 micro" # Code editor -bind = Ctrl+Super+Shift+Alt, W, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "wps" "onlyoffice-desktopeditors" "libreoffice" # Office software -bind = Super, X, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "kate" "gnome-text-editor" "emacs" # Text editor -bind = Ctrl+Super, V, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "pavucontrol-qt" "pavucontrol" # Volume mixer -bind = Super, I, exec, XDG_CURRENT_DESKTOP=gnome ~/.config/hypr/hyprland/scripts/launch_first_available.sh "qs -p ~/.config/quickshell/$qsConfig/settings.qml" "systemsettings" "gnome-control-center" "better-control" # Settings app -bind = Ctrl+Shift, Escape, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "gnome-system-monitor" "plasma-systemmonitor --page-name Processes" "command -v btop && kitty -1 fish -c btop" # Task manager +bind = Super, Return, exec, $terminal # Terminal +bind = Super, T, exec, $terminal # [hidden] (terminal) (alt) +bind = Ctrl+Alt, T, exec, $terminal # [hidden] (terminal) (for Ubuntu people) +bind = Super, E, exec, $fileManager # File manager +bind = Super, W, exec, $browser # Browser +bind = Super, C, exec, $codeEditor # Code editor +bind = Ctrl+Super+Shift+Alt, W, exec, $officeSoftware # Office software +bind = Super, X, exec, $textEditor # Text editor +bind = Ctrl+Super, V, exec, $volumeMixer # Volume mixer +bind = Super, I, exec, $settingsApp # Settings app +bind = Ctrl+Shift, Escape, exec, $taskManager # Task manager # Cursed stuff ## Make window not amogus large diff --git a/dots/.config/hypr/hyprland/variables.conf b/dots/.config/hypr/hyprland/variables.conf new file mode 100644 index 000000000..a32013782 --- /dev/null +++ b/dots/.config/hypr/hyprland/variables.conf @@ -0,0 +1,23 @@ +# Default variables +# Copy these to ~/.config/hypr/custom/variables.conf to make changes in a dotfiles-update-friendly manner + +# Apps +# PULL REQUESTS ADDING MORE WILL NOT BE ACCEPTED, CONFIG FOR YOURSELF +$terminal = ~/.config/hypr/hyprland/scripts/launch_first_available.sh "kitty -1" "foot" "alacritty" "wezterm" "konsole" "kgx" "uxterm" "xterm" +$fileManager = ~/.config/hypr/hyprland/scripts/launch_first_available.sh "dolphin" "nautilus" "nemo" "thunar" "kitty -1 fish -c yazi" +$browser = ~/.config/hypr/hyprland/scripts/launch_first_available.sh "google-chrome-stable" "zen-browser" "firefox" "brave" "chromium" "microsoft-edge-stable" "opera" "librewolf" +$codeEditor = ~/.config/hypr/hyprland/scripts/launch_first_available.sh "antigravity" "code" "codium" "cursor" "zed" "zedit" "zeditor" "kate" "gnome-text-editor" "emacs" "command -v nvim && kitty -1 nvim" "command -v micro && kitty -1 micro" +$officeSoftware = ~/.config/hypr/hyprland/scripts/launch_first_available.sh "wps" "onlyoffice-desktopeditors" "libreoffice" +$textEditor = ~/.config/hypr/hyprland/scripts/launch_first_available.sh "kate" "gnome-text-editor" "emacs" +$volumeMixer = ~/.config/hypr/hyprland/scripts/launch_first_available.sh "pavucontrol-qt" "pavucontrol" +$settingsApp = XDG_CURRENT_DESKTOP=gnome ~/.config/hypr/hyprland/scripts/launch_first_available.sh "qs -p ~/.config/quickshell/$qsConfig/settings.qml" "systemsettings" "gnome-control-center" "better-control" +$taskManager = ~/.config/hypr/hyprland/scripts/launch_first_available.sh "gnome-system-monitor" "plasma-systemmonitor --page-name Processes" "command -v btop && kitty -1 fish -c btop" + +# The folder within ~/.config/quickshell containing the config +$qsConfig = ii + +# Leave blank like this to load default config. Set to anything to not. +$dontLoadDefaultExecs = +$dontLoadDefaultGeneral = +$dontLoadDefaultRules = +$dontLoadDefaultKeybinds = diff --git a/dots/.config/quickshell/ii/modules/ii/sidebarLeft/AiChat.qml b/dots/.config/quickshell/ii/modules/ii/sidebarLeft/AiChat.qml index 77d4f4b2a..f6054f017 100644 --- a/dots/.config/quickshell/ii/modules/ii/sidebarLeft/AiChat.qml +++ b/dots/.config/quickshell/ii/modules/ii/sidebarLeft/AiChat.qml @@ -364,15 +364,15 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\) mouseScrollFactor: Config.options.interactions.scrolling.mouseScrollFactor * 1.4 property int lastResponseLength: 0 - onContentHeightChanged: { - if (atYEnd) - Qt.callLater(positionViewAtEnd); - } - onCountChanged: { - // Auto-scroll when new messages are added - if (atYEnd) - Qt.callLater(positionViewAtEnd); - } + // onContentHeightChanged: { + // if (atYEnd) + // Qt.callLater(positionViewAtEnd); + // } + // onCountChanged: { + // // Auto-scroll when new messages are added + // if (atYEnd) + // Qt.callLater(positionViewAtEnd); + // } add: null // Prevent function calls from being janky diff --git a/dots/.config/quickshell/ii/scripts/hyprland/hyprconfigurator.py b/dots/.config/quickshell/ii/scripts/hyprland/hyprconfigurator.py index 3c5961273..b458bbe3c 100755 --- a/dots/.config/quickshell/ii/scripts/hyprland/hyprconfigurator.py +++ b/dots/.config/quickshell/ii/scripts/hyprland/hyprconfigurator.py @@ -5,12 +5,11 @@ import os import tempfile def edit_hyprland_config(file_path, set_args, reset_args): - try: + if os.path.exists(file_path): with open(file_path, 'r') as file: lines = file.readlines() - except FileNotFoundError: - print(f"Error: File '{file_path}' not found.") - return + else: + lines = [] set_dict = {k: v for k, v in set_args} if set_args else {} reset_set = set(reset_args) if reset_args else set() @@ -56,12 +55,18 @@ def edit_hyprland_config(file_path, set_args, reset_args): new_lines.append(f"{key} = {value}\n") dir_name = os.path.dirname(os.path.abspath(file_path)) + os.makedirs(dir_name, exist_ok=True) temp_path = None try: with tempfile.NamedTemporaryFile(mode='w', dir=dir_name, delete=False) as temp_file: temp_file.writelines(new_lines) temp_path = temp_file.name - os.chmod(temp_path, os.stat(file_path).st_mode) + + if os.path.exists(file_path): + os.chmod(temp_path, os.stat(file_path).st_mode) + else: + os.chmod(temp_path, 0o644) + os.replace(temp_path, file_path) except Exception as e: if temp_path and os.path.exists(temp_path):