diff --git a/config/hypr/UserConfigs/LaptopDisplay.conf b/config/hypr/UserConfigs/LaptopDisplay.conf index 9f766582..a38cfbe1 100644 --- a/config/hypr/UserConfigs/LaptopDisplay.conf +++ b/config/hypr/UserConfigs/LaptopDisplay.conf @@ -1,4 +1,4 @@ # NOTE, THIS FILE IS BEING USED by disabling Laptop display monitor behaviour when closing lid. # See notes on Laptops.conf -#monitor = eDP-1, preferred, auto, 1 +monitor = eDP-1, preferred, auto, 1 diff --git a/config/hypr/UserConfigs/Laptops.conf b/config/hypr/UserConfigs/Laptops.conf index 3d08b555..ad618826 100644 --- a/config/hypr/UserConfigs/Laptops.conf +++ b/config/hypr/UserConfigs/Laptops.conf @@ -3,9 +3,9 @@ # These configs are mostly for laptops. This is addemdum to Keybinds.conf $mainMod = SUPER -$scriptsDir = $HOME/.config/hypr/scripts +$scriptsDir = $HOME/dotfiles/hypr/scripts $RunCMD = $scriptsDir/RunCMD.sh -$UserConfigs = $HOME/.config/hypr/UserConfigs +$UserConfigs = $HOME/dotfiles/hypr/UserConfigs #VolumeControl bind = ,XF86MonBrightnessUp, exec, brightnessctl set +5% @@ -32,7 +32,6 @@ bind = $mainMod_SHIFT, D, exec, $RunCMD touchpad # Disable Touchpad #bindl = , switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, preferred, auto, 1" #bindl = , switch:on:Lid Switch,exec,hyprctl keyword monitor "eDP-1, disable" - # WARNING! Using this method has some caveats!! USE THIS PART WITH SOME CAUTION! # CONS of doing this, is that you need to set up your wallpaper (SUPER W) and choose wallpaper. # CAVEATS! Sometimes the Main Laptop Monitor DOES NOT have display that it needs to re-connect your external monitor @@ -46,3 +45,4 @@ bind = $mainMod_SHIFT, D, exec, $RunCMD touchpad # Disable Touchpad # for laptop-lid action (to erase the last entry) #exec-once = echo "eDP-1, preferred, auto, 1" > $HOME/dotfiles/hypr/UserConfigs/LaptopDisplay.conf + diff --git a/config/hypr/UserConfigs/Startup_Apps.conf b/config/hypr/UserConfigs/Startup_Apps.conf index 94747d38..3fed58a8 100644 --- a/config/hypr/UserConfigs/Startup_Apps.conf +++ b/config/hypr/UserConfigs/Startup_Apps.conf @@ -14,6 +14,8 @@ exec-once = $SwwwRandom # Startup exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec-once = dbus-update-activation-environment --systemd --all +exec-once = systemctl --user import-environment QT_QPA_PLATFORMTHEME # Polkit (Polkit Gnome / KDE) exec-once = $RunCMD polkit_ diff --git a/config/hypr/UserConfigs/UserKeybinds.conf b/config/hypr/UserConfigs/UserKeybinds.conf index 064605d9..99d80662 100644 --- a/config/hypr/UserConfigs/UserKeybinds.conf +++ b/config/hypr/UserConfigs/UserKeybinds.conf @@ -15,7 +15,7 @@ $RunCMD = $scriptsDir/RunCMD.sh #bindr = $mainMod, $mainMod_L, exec, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window -config ~/.config/rofi/launcher.rasi bind = $mainMod, D, exec, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window bind = CTRL, mouse:273, exec, killall rofi || rofi -show drun -bind = ALT, D, exec, pkill rofi || $scriptsDir/Xmenu.sh +bind = ALT, C, exec, pkill rofi || $scriptsDir/Xmenu.sh # Terminals bind = CTRL_ALT, Return, exec, kitty --start-as=fullscreen --title all_is_kitty @@ -27,13 +27,14 @@ bind = $mainMod, E, exec, $files bind = ALT, F, exec, $browser bind = ALT, Y, exec, kitty yazi bind = $mainMod, Slash, exec, kitty nvim +bind = ALT, Q, exec, qutebrowser # FEATURES / EXTRAS bind = SHIFT_ALT, R, exec, $RunCMD reload_all bind = $mainMod_SHIFT, D, exec, $RunCMD toggle_touchpad bind = $mainMod_SHIFT, A, exec, $RunCMD gamemode bind = $mainMod, PERIOD, exec, $RunCMD emoji -bind = ALT, F1, exec, $RunCMD kb_changer +bind = ALT, F3, exec, $RunCMD kb_changer bind = $mainMod_SHIFT, Q, exec, $RunCMD toggle_blur bind = $mainMod, space, exec, $RunCMD change_layout bind = SHIFT_ALT, C, exec, $RunCMD clip @@ -59,5 +60,5 @@ bind = ALT, W, exec, $RunCMD waybar_layout # ScreenShot -bind = $mainMod, Z, exec, grim -g "$(slurp)" - | tee ~/Pictures/"$(date '+%d-%b_%H-%M-%S')_${RANDOM}".png | wl-copy && notify-send -u low -i "$HOME/dotfiles/hypr/assets/screenshot.png" "Screenshot Saved." -bind = ,Print, exec, grim - | tee ~/Pictures/"$(date '+%d-%b_%H-%M-%S')_${RANDOM}".png | wl-copy && notify-send -u low -i "$HOME/dotfiles/hypr/assets/screenshot.png" "Screenshot Saved." +bind = $mainMod, Z, exec, grim -g "$(slurp)" - | tee ~/Pictures/"$(date '+%d-%b_%H-%M-%S')_${RANDOM}".png | wl-copy +bind = ,Print, exec, grim - | tee ~/Pictures/"$(date '+%d-%b_%H-%M-%S')_${RANDOM}".png | wl-copy diff --git a/config/hypr/UserConfigs/UserSettings.conf b/config/hypr/UserConfigs/UserSettings.conf index 3f1084d2..95f91daf 100644 --- a/config/hypr/UserConfigs/UserSettings.conf +++ b/config/hypr/UserConfigs/UserSettings.conf @@ -2,8 +2,6 @@ # User Settings # refer to Hyprland wiki for more info https://wiki.hyprland.org/Configuring/Variables -# Sourcing colors generated by pywal -source = $HOME/.cache/wal/colors-hyprland # blurls = waybar # blurls = rofi @@ -27,18 +25,20 @@ general { border_size = 2 resize_on_border = true - col.active_border = $color0 $color2 $color4 $color6 $color8 90deg - col.inactive_border = $backgroundCol + col.active_border = rgba(cba6f7ff) rgba(89b4faff) rgba(94e2d5ff) 10deg + col.inactive_border = 0xff313244 + + col.nogroup_border = 0xff89dceb + col.nogroup_border_active = 0xfff9e2af layout = master } group { - col.border_active = $color15 - - groupbar { - col.active = $color0 - } + groupbar { + col.active = rgb(bd93f9) rgb(44475a) 90deg + col.inactive = rgba(282a36dd) + } } decoration { @@ -53,9 +53,9 @@ decoration { drop_shadow = true shadow_range = 6 - shadow_render_power = 1 - col.shadow = $color2 - col.shadow_inactive = 0x50000000 + shadow_render_power = 3 + col.shadow = 0x99161925 + col.shadow_inactive = 0x55161925 blur { enabled = true @@ -128,7 +128,7 @@ misc { disable_hyprland_logo = true disable_splash_rendering = true mouse_move_enables_dpms = true - #vrr = 0 + vrr = 1 enable_swallow = true no_direct_scanout = true #for fullscreen games focus_on_activate = false diff --git a/config/hypr/UserConfigs/WindowRules.conf b/config/hypr/UserConfigs/WindowRules.conf index de2668c3..83c7e327 100644 --- a/config/hypr/UserConfigs/WindowRules.conf +++ b/config/hypr/UserConfigs/WindowRules.conf @@ -53,6 +53,7 @@ windowrulev2 = center, class:(com.obsproject.Studio), title:(Select Recording Di # Fireox class settings windowrulev2 = workspace 3, class:^(firefox)$ +windowrulev2 = workspace 3, class:^(qutebrowser)$ windowrulev2 = workspace 3, class:^(Firefox-esr)$ windowrulev2 = opacity 0.9 0.6, class:^(firefox)$ windowrulev2 = opacity 0.95 0.75,title:^(Picture-in-Picture)$ @@ -91,10 +92,14 @@ windowrulev2 = opacity 0.9 0.7, class:^([Tt]hunar)$ # File / Folder pickers -$center-float = class:^(center-float)$|^(.*file-roller.*)$ +$center-float = class:^(center-float)$|^(.*file-roller.*)$|^(.*FileRoller.*)$ +$center-float-title = title:^(.*Open Folder.*)$|^(.*Open File.*)$|^(.*Save File.*)$|^(.*Save Folder.*)$|^(.*Save Image.*)$|^(.*Save As.*)$|^(.*Open As.*)$ windowrulev2 = float, $center-float +windowrulev2 = float, $center-float-title windowrulev2 = size 50% 50%, $center-float +windowrulev2 = size 50% 50%, $center-float-title windowrulev2 = center 1, $center-float +windowrulev2 = center 1, $center-float-title # VS Code @@ -142,9 +147,9 @@ windowrule = float, kitty_float # Bluetooth applet -windowrulev2 = float, class:(blueberry) -windowrulev2 = size 665 637, class:(blueberry) -windowrulev2 = center, class:(blueberry) +windowrulev2 = float, class:(blueman) +windowrulev2 = size 680 665, class:(blueman) +windowrulev2 = center, class:(blueman) # IMV image viewer diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/configs/Keybinds.conf index 079e31cd..0d5ebd97 100644 --- a/config/hypr/configs/Keybinds.conf +++ b/config/hypr/configs/Keybinds.conf @@ -30,9 +30,13 @@ bind = $mainMod_SHIFT, P, exec, hyprctl dispatch workspaceopt, allpseudo bind = $mainMod, G, togglegroup bind = ALT, Tab, changegroupactive # change focus to another window +# For Moniter +bind = $mainMod, Tab, focusmonitor, +1 +bind = $mainMod_SHIFT, Tab, focusmonitor, -1 + # Workspaces related -bind = $mainMod, Tab, workspace, m+1 -bind = $mainMod SHIFT, Tab, workspace, m-1 +#bind = $mainMod, Tab, workspace, m+1 +#bind = $mainMod SHIFT, Tab, workspace, m-1 # Special Workspace bind = $mainMod, U, togglespecialworkspace, @@ -91,9 +95,6 @@ bind = $mainMod SHIFT, 7, movetoworkspace, 7 bind = $mainMod SHIFT, 8, movetoworkspace, 8 bind = $mainMod SHIFT, 9, movetoworkspace, 9 bind = $mainMod SHIFT, 0, movetoworkspace, 10 -bind = $mainMod SHIFT, bracketleft, movetoworkspace, -1 # brackets [ or ] -bind = $mainMod SHIFT, bracketright, movetoworkspace, +1 - # Move active window workspace silently bind = SHIFT_ALT, 1, movetoworkspacesilent, 1 @@ -106,9 +107,6 @@ bind = SHIFT_ALT, 7, movetoworkspacesilent, 7 bind = SHIFT_ALT, 8, movetoworkspacesilent, 8 bind = SHIFT_ALT, 9, movetoworkspacesilent, 9 bind = SHIFT_ALT, 0, movetoworkspacesilent, 10 -bind = SHIFT_ALT, bracketleft, movetoworkspacesilent, -1 -bind = SHIFT_ALT, bracketright, movetoworkspacesilent, +1 - # Scroll through existing workspaces with mainMod bind = SHIFT_ALT, d, workspace, e+1 diff --git a/config/hypr/hypridle.conf b/config/hypr/hypridle.conf index f1a7d0a5..1a00ab78 100644 --- a/config/hypr/hypridle.conf +++ b/config/hypr/hypridle.conf @@ -1,8 +1,8 @@ general { - lock_cmd = notify-send "lock!" # dbus/sysd lock command (loginctl lock-session) - unlock_cmd = notify-send "unlock!" # same as above, but unlock - before_sleep_cmd = notify-send "Zzz" # command ran before sleep - after_sleep_cmd = notify-send "Awake!" # command ran after sleep + #lock_cmd = notify-send "lock!" # dbus/sysd lock command (loginctl lock-session) + #unlock_cmd = notify-send "unlock!" # same as above, but unlock + #before_sleep_cmd = notify-send "Zzz" # command ran before sleep + #after_sleep_cmd = notify-send "Awake!" # command ran after sleep ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam) } diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 7edb4d4b..21af2341 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -6,7 +6,7 @@ $configs = $HOME/.config/hypr/configs source=$configs/Settings.conf source=$configs/Keybinds.conf -#User Configs +# User Configs $UserConfigs = $HOME/.config/hypr/UserConfigs source= $UserConfigs/Startup_Apps.conf diff --git a/config/hypr/scripts/Ref.sh b/config/hypr/scripts/Ref.sh index 75f72130..6e59ca77 100755 --- a/config/hypr/scripts/Ref.sh +++ b/config/hypr/scripts/Ref.sh @@ -7,7 +7,7 @@ STATUS_FILE="$DIR/touchpad.status" # For Notification icon notif="$HOME/dotfiles/hypr/assets/bell.png" -reload="$HOME/dotfiles/hypr/assets/reload.png" +reload="$HOME/dotfiles/hypr/assets/reload.svg" # Scripts DIR SCRIPTSDIR="$HOME/dotfiles/hypr/scripts" diff --git a/config/hypr/scripts/Ui_cmd.sh b/config/hypr/scripts/Ui_cmd.sh index 0adff177..a1bd90f4 100755 --- a/config/hypr/scripts/Ui_cmd.sh +++ b/config/hypr/scripts/Ui_cmd.sh @@ -252,7 +252,7 @@ for ((i = 0; i < layout_count; i++)); do # Find the index of the current layout done next_index=$(( (current_index + 1) % layout_count )) # Calculate the index of the next layout new_layout="${layout_mapping[next_index]}" -hyprctl keyword input:kb_layout "$new_layout" # Update the keyboard layout +hyprctl switchxkblayout input:kb_layout "$next_index" # Update the keyboard layout echo "$new_layout" > "$layout_f" notify-send -u low -i "$notif" "Keyboad Layout Changed to $new_layout" } diff --git a/config/keyb/bindings/discord.yml b/config/keyb/bindings/discord.yml new file mode 100644 index 00000000..a9a9862c --- /dev/null +++ b/config/keyb/bindings/discord.yml @@ -0,0 +1,61 @@ +- name: Server & Channel Navigation 󰒋 + keybinds: + - name: Move Between Servers + key: Ctrl + Alt + Up / Down + - name: Move Between Channels + key: Alt + Up + +- name: Menu Management 󰍜 + keybinds: + - name: Toggle Emoji Picker + key: Ctrl + E + - name: Toggle GIF Picker + key: Ctrl + G + - name: Toggle Pins Popout + key: Ctrl + P + - name: Toggle Members List + key: Alt + M + - name: Toggle Server List + key: Alt + S + - name: Toggle Channel List + key: Alt + C + - name: Toggle User Area + key: Alt + U + - name: Toggle Message Bar + key: Alt + T + - name: Toggle Call Container + key: Alt + P + - name: Toggle Window Bar + key: Alt + W + - name: Toggle User Profile + key: Alt + I + +- name: Text Formatting 󰛖 + keybinds: + - name: Bold Text + key: Ctrl + B + - name: Italic Text + key: Ctrl + I + - name: Underline Text + key: Ctrl + U + +- name: Voice and Messages Management 󱥁 + keybinds: + - name: Toggle Mute + key: Ctrl + Shift + M + - name: Toggle Deafen + key: Ctrl + Shift + D + - name: Answer Incoming Call + key: Ctrl + Enter + - name: Decline Incoming Call + key: Esc + - name: Mark Channel as Read + key: Esc + - name: Mark Server as Read + key: Shift + Esc + - name: Search for a Message in a Server + key: Ctrl + F + - name: Search for Servers, Channels or DMs + key: Ctrl + K + - name: Upload a File + key: Ctrl + Shift + U diff --git a/config/keyb/bindings/hyprland.yml b/config/keyb/bindings/hyprland.yml index 96db9221..8c4961d1 100644 --- a/config/keyb/bindings/hyprland.yml +++ b/config/keyb/bindings/hyprland.yml @@ -69,6 +69,8 @@ key: Ctr + Alt + Enter - name: Launch Yazi key: Alt + Y + - name: Launch LibreOffice + key: Win + Shift + O - name: Open Launcher key: Win + D / Win diff --git a/config/keyb/bindings/lazygit.yml b/config/keyb/bindings/lazygit.yml new file mode 100644 index 00000000..df106403 --- /dev/null +++ b/config/keyb/bindings/lazygit.yml @@ -0,0 +1,446 @@ +- name: Global + keybinds: + - name: Switch to a Recent Repo + key: Ctrl + r + - name: Previous Tab + key: '[' + - name: Next Tab + key: ']' + - name: Open Command Log Menu + key: '@' + - name: View Custom Patch Options + key: Ctrl + p + - name: View Merge/Rebase Options + key: m + - name: Refresh + key: r + - name: Next Screen Mode + key: + + - name: Previous Screen Mode + key: _ + - name: Open Menu + key: '?' + - name: View Filter-By-Path Options + key: Ctrl + s + - name: Open Diff Menu + key: Ctrl + e / W + - name: Toggle Whitespaces in Diff View + key: Ctrl + w + - name: Undo + key: u + - name: Redo + key: Ctrl + z + - name: Push + key: P + - name: Pull + key: p + - name: Search the Current View by Text + key: / + +- name: Commit Files + keybinds: + - name: Copy the Committed File Name to the Clipboard + key: Ctrl + o + - name: Checkout File + key: c + - name: Discard this Commits Changes to this File + key: d + - name: Open File + key: o + - name: Edit File + key: e + - name: Toggle File Included in Patch + key: Space + - name: Toggle all Files Included in Patch + key: a + - name: Enter File to add Selected Lines to the Patch + key: Enter + - name: Toggle File Tree View + key: '`' + +- name: Commits + keybinds: + - name: Copy Commit SHA to the Clipboard + key: Ctrl + o + - name: Rest Copied Commits Selection + key: Ctrl + r + - name: View Bisect Options + key: b + - name: Squash Down + key: s + - name: Fixup Commit + key: f + - name: Reword Commit + key: r + - name: Reword Commit with Editor + key: R + - name: Delete Commit + key: d + - name: Edit Commit + key: e + - name: Pick Commit + key: p + - name: Creat Fixup Comit for this Commit + key: F + - name: Squash all 'fixup!' Commits above Selected Commit (Autosquash) + key: S + - name: Move Commit Down One + key: Ctrl + j + - name: Move Commit Up One + key: Ctrl + k + - name: Paste Commits + key: v + - name: Mark Commit as Base Commit for Rebase + key: B + - name: Ammend Commit with Staged Changes + key: A + - name: Set/Reset Commit Author + key: a + - name: Reverse Commit + key: t + - name: Tag Commit + key: T + - name: Open Log Menu + key: Ctrl + l + - name: View Worktree Options + key: w + - name: Checkout Commit + key: Space + - name: Copy Commit Attribute + key: y + - name: Open Commit in Browser + key: o + - name: Create Branch from Commit + key: n + - name: View Reset Options + key: g + - name: Copy Commit + key: c + - name: Copy Commit Range + key: C + - name: View Selected Items Files + key: Enter + +- name: Files + keybinds: + - name: Copy the File Name to the Clipboard + key: Ctrl + o + - name: View Discard Changes Options + key: d + - name: Toggle Staged + key: Space + - name: Filter Files by Status + key: Ctrl + b + - name: Commit Changes + key: c + - name: Commit Changes without Pre-Commit Hook + key: w + - name: Ammend last Commit + key: A + - name: Commit Changes using Git Editor + key: C + - name: Edit File + key: e + - name: Open File + key: o + - name: Ignore or Exclude File + key: i + - name: Refresh Files + key: r + - name: Stash all Changes + key: s + - name: View Stash Options + key: S + - name: Stage/Unstage all Files + key: a + - name: Stage Individual Hunks/Lines for File, or Collapse/Expand for Directory + key: Enter + - name: View Upstream Reset Options + key: g + - name: View Reset Options + key: D + - name: Toggle File Tree View + key: '`' + - name: Open External Merge Tool + key: M + - name: Fetch + key: f + +- name: Local Branches + keybinds: + - name: Copy Branch Name to the Clipboard + key: Ctrl + o + - name: Show Git-Flow Options + key: i + - name: Checkout + key: Space + - name: New Branch + key: n + - name: Create Pull Request + key: o + - name: Create Pull Request Options + key: O + - name: Copy Pull Request URL to the Clipboard + key: Ctrl + y + - name: Checkout by Name + key: c + - name: Force Checkout + key: F + - name: View Delete Options + key: d + - name: Rebase Checkec-Out Branch onto this Branch + key: r + - name: Merge into Currently Checked Out Branch + key: M + - name: Fast-Forward this Branch from its Upstream + key: f + - name: Create Tag + key: t + - name: View Reset Options + key: g + - name: Rename Branch + key: R + - name: Set/Unset Upstream + key: u + - name: View Worktree Options + key: w + - name: View Commits + key: Enter + +- name: Main Panel (Merging) + keybinds: + - name: Open File + key: o + - name: Edit File + key: e + - name: Select Previous Conflict + key: Left Arrow Key + - name: Select Next Hunk + key: Right Arrow Key + - name: Select Previous Hunk + key: Up Arrow Key + - name: Select Next Hunk + key: Down Arrow Key + - name: Undo + key: z + - name: Open External Merge Tool + key: M + - name: Pick Hunk + key: Space + - name: Pick All Hunks + key: b + - name: Return to the Files Panel + key: Esc + +- name: Main Panel (Patch Building) + keybinds: + - name: Select Previous Hunk + key: Left Arrow Key + - name: Select Next Hunk + key: Right Arrow Key + - name: Toggle Drag Select + key: v + - name: Toggle Select Hunk + key: a + - name: Copy the Selected Text to the Clipboard + key: Ctrl + o + - name: Open File + key: o + - name: Edit File + key: e + - name: Add/Remove Line to/from Patch + key: Space + - name: Exit Custom Patch Builder + key: Esc + +- name: Main Panel (Staging) + keybinds: + - name: Select Previous Hunk + key: Left Arrow Key + - name: Select Next Hunk + key: Right Arrow Key + - name: Toggle Drag Select + key: v + - name: Toggle Select Hunk + key: a + - name: Copy the Selected Text to the Clipboard + key: Ctrl + o + - name: Open File + key: o + - name: Edit File + key: e + - name: Return to the Files Panel + key: Esc + - name: Switch to Other Panel + key: Tab + - name: Toggle Line Staged / Unstaged + key: Space + - name: Discard Change + key: d + - name: Edit Hunk + key: E + - name: Commit Changes + key: c + - name: Commit Changes without Pre-Commit Hook + key: w + - name: Commit Changes using Git Editor + key: C + +- name: Reflog + keybinds: + - name: Copy Commit SHA to the Clipboard + key: Ctrl + o + - name: View Worktree Options + key: w + - name: Checkout Commit + key: Space + - name: Copy Commit Attribute + key: y + - name: Open Commit in Browser + key: o + - name: Create New Branch off of Commit + key: n + - name: View Reset Options + key: g + - name: Copy Commit + key: c + - name: Copy Commit Range + key: C + - name: Reset Copied Commits Selection + key: Ctrl + r + - name: View Commits + key: Enter + +- name: Remote Branches + keybinds: + - name: Copy Branch Name to the Clipboard + key: Ctrl + o + - name: Checkout + key: Space + - name: New Branch + key: n + - name: Merge into Currently Checked Out Branch + key: M + - name: Rebase Checked-Out Branch onto this Branch + key: r + - name: Delete Remote Tag + key: d + - name: Set as Upstream of Checked-Out Branch + key: u + - name: View Reset Options + key: g + - name: View Worktree Options + key: w + - name: View Commits + key: Enter + +- name: Remotes + keybinds: + - name: Fetch Remote + key: f + - name: Add New Remote + key: n + - name: Delete Remove + key: d + - name: Edit Remote + key: e + +- name: Stash + keybinds: + - name: Apply + key: Space + - name: Pop + key: g + - name: Drop + key: d + - name: New Branch + key: n + - name: Rename Stash + key: r + - name: View Worktree Options + key: w + - name: View Selected Items Files + key: Enter + +- name: Status + keybinds: + - name: Open Config File + key: o + - name: Edit Config File + key: e + - name: Switch to a Recent Repo + key: Enter + - name: Show all Branch Logs + key: a + +- name: Sub-commits + keybinds: + - name: Copy Commit SHA to the Clipboard + key: Ctrl + o + - name: View Worktree Options + key: w + - name: Checkout Commit + key: Space + - name: Copy Commit Attribute + key: y + - name: Open Commit in Browser + key: o + - name: Create New Branch off of Commit + key: n + - name: View Reset Options + key: g + - name: Copy Commit + key: c + - name: Copy Commit Range + key: C + - name: Reset Copied Commits Selection + key: Ctrl + r + - name: View Selected Items Files + key: Enter + +- name: Submodules + keybinds: + - name: Copy Submodule to the Clipboard + key: Ctrl + o + - name: Enter Submodule + key: Space / Enter + - name: Remove Submodule + key: d + - name: Update Submodule + key: u + - name: Add New Submodule + key: n + - name: Update Submodule URL + key: e + - name: Initialize Submodule + key: i + - name: View Bulk Submodule Options + key: b + +- name: Tags + keybinds: + - name: Checkout + key: Space + - name: View Delete Options + key: d + - name: Push Tag + key: P + - name: Create Tag + key: n + - name: View Reset Options + key: g + - name: View Worktree Options + key: w + - name: View Commits + key: Enter + +- name: Worktrees + keybinds: + - name: Create Worktree + key: n + - name: Switch to Worktree + key: Space / Enter + - name: Open in Editor + key: e + - name: Remove Worktree + key: d \ No newline at end of file diff --git a/config/keyb/bindings/nvim.yml b/config/keyb/bindings/nvim.yml deleted file mode 100644 index f8af7e62..00000000 --- a/config/keyb/bindings/nvim.yml +++ /dev/null @@ -1,556 +0,0 @@ -- name: Windows 󱂬 - keybinds: - - name: (N) Horizontal Zoom - key: Space + w + h - - name: (N) Vertical Zoom - key: Space + w + v - - name: (N) Equalize Window - key: Space + w + e - - name: (N) Split Window Below - key: Space + - / Space + w + - - - name: (N) Split Window Right - key: Space + | / Space + w + | - - name: (N) Delete Window - key: Space + w + d - - name: (N) Switch Window - key: Space + w + w - - name: (N) Swap/Move Window - key: Space + w + s - -- name: Buffers 󰖯 - keybinds: - - name: (N) Go to Specific Buffer - key: Space + b + 0-10 - - name: (N) Previous Buffer - key: Shift + h - - name: (N) Next Buffer - key: Shift + l - - name: (N) First Buffer - key: Space + b + f - - name: (N) Last Buffer - key: Space + b + a - - name: (N) Switch to Other Buffer - key: Space + b + b - - name: (N) Delete Buffer - key: Space + b + d - - name: (N) Delete Buffer (Force) - key: Space + b + D - - name: (N) Delete buffers to the Right - key: Space + b + r - - name: (N) Delete buffers to the Left - key: Space + b + l - - name: (N) Delete non-pinned Buffers - key: Space + b + P - - name: (N) Toggle Pin - key: Space + b + p - - name: (N) Buffer Explorer - key: Space + b + e - - name: (N) Buffer List - key: Space + , / Space + f + b - -- name: Tabs 󰓩 - keybinds: - - name: (N) Previous Tab - key: Space + Tab + [ / Shift + Tab - - name: (N) Next Tab - key: Space + Tab + ] / Tab - - name: (N) First Tab - key: Space + Tab + f - - name: (N) Last Tab - key: Space + Tab + l - - name: (N) New Tab - key: Space + Tab + Tab - - name: (N) Switch to Other Tab - key: Space + t + t - - name: (N) Close Tab - key: Space + Tab + d - -- name: Debug  - keybinds: - - name: (N) Run with args - key: Space + d + a - - name: (N) Breakpoint Condition - key: Space + d + b + B - - name: (N) Toggle Breakpoint - key: Space + d + b + b / F2 - - name: (N) Continue - key: Space + d + c / F5 - - name: (N) Run to Cursor - key: Space + d + C - - name: (N) Go to line (no execute) - key: Space + d + g - - name: (N) Step Into - key: Space + d + i / F11 - - name: (N) Down - key: Space + d + j - - name: (N) Up - key: Space + d + k - - name: (N) Run Last - key: Space + d + l - - name: (N) Step Out - key: Space + d + o / F12 - - name: (N) Step Over - key: Space + d + O / F10 - - name: (N) Pause - key: Space + d + p - - name: (N) Toggle REPL - key: Space + d + r - - name: (N) Session - key: Space + d + s - - name: (N) Terminate - key: Space + d + t - - name: (N) Widgets - key: Space + d + w - - name: (N) Dap UI - key: Space + d + u - - name: (N, Virt) Eval - key: Space + d + e - - name: (N) Print under current line - key: Space + d + d + l - - name: (N) Print above current line - key: Space + d + d + L - - name: (N) Print variable under current line - key: Space + d + d + v - - name: (N) Print variable above current line - key: Space + d + d + V - - name: (N) Delete all prints - key: Space + d + d + d - - name: (N) Debug Method (Python) - key: Space + d + P + t - - name: (N) Debug Class (Python) - key: Space + d + P + c - -- name: Test 󰙨 - keybinds: - - name: (N) Run File - key: Space + t + t - - name: (N) Run All Test Files - key: Space + t + T - - name: (N) Run Nearest - key: Space + t + r - - name: (N) Debug Nearest - key: Space + t + d - - name: (N) Run Last Test - key: Space + t + l - - name: (N) Debug Last Test - key: Space + t + L - - name: (N) Toggle Summary - key: Space + t + s - - name: (N) Show Output - key: Space + t + o - - name: (N) Toggle Output Panel - key: Space + t + O - - name: (N) Stop - key: Space + t + S - - name: (N) Run Ansible Playbook - key: Space + t + p - -- name: Git  - keybinds: - - name: (N) Lazygit (root) - key: Space + g + g - - name: (N) Lazygit (cwd) - key: Space + g + G - - name: (N) Commits - key: Space + g + c - - name: (N) Status - key: Space + g + s - - name: (N) Blame Line - key: Space + g + h + b - - name: (N) Diff This ~ - key: Space + g + h + D - - name: (N) Diff This - key: Space + g + h + d - - name: (N) Preview Hunk - key: Space + g + p - - name: (N) Reset Buffer - key: Space + g + R - - name: (N) Reset Hunk - key: Space + g + h + r - - name: (N) Stage Buffer - key: Space + g + h + S - - name: (N) Stage Hunk - key: Space + g + h + s - - name: (N) Undo Stage Hunk - key: Space + g + h + u - - name: (N) Toggle UndoTree - key: Space + g + U - - name: (N) UndoTree (Telescope) - key: Space + g + u - - name: (N) Undo Changes - key: u - - name: (N) Redo Changes - key: Ctrl + r - - name: (N) Save File - key: Ctrl + s - -- name: Annotations  - keybinds: - - name: (N) Class - key: Space + a + c - - name: (N) Default - key: Space + a + d - - name: (N) File - key: Space + a + F - - name: (N) Function - key: Space + a + f - - name: (N) Type - key: Space + a + t - - name: (N) Generate HTML Docs - key: Space + a + g - -- name: Harpoon 󱌧 - keybinds: - - name: (N) Harpoon Menu - key: Space + h + h - - name: (N) Harpoon Files - key: Space + h + f - - name: (N) Add File - key: Space + h + a - - name: (N) Go to Specific File - key: Space + h + 1-9 - -- name: Copilot/Codeium  - keybinds: - - name: (I) Accept Completion - key: Alt + Enter - - name: (I) Next Completion - key: Alt + ] - - name: (I) Previous Completion - key: Alt + [ - - name: (I) Clear Completion - key: Alt + c - - name: (N) Toggle IA - key: Space + c +i - -- name: ChatGPT 󰘦 - keybinds: - - name: (N,V) ChatGPT - key: Space + C + c - - name: (N,V) Edit with Instruction - key: Space + C + e - - name: (N,V) Grammar Correction - key: Space + C + g - - name: (N,V) Translate - key: Space + C + t - - name: (N,V) Summarize - key: Space + C + s - - name: (N,V) Keywords - key: Space + C + k - - name: (N,V) Docstring - key: Space + C + d - - name: (N,V) Add Tests - key: Space + C + T - - name: (N,V) Optimize Code - key: Space + C + o - - name: (N,V) Fix Bugs - key: Space + C + f - - name: (N,V) Explain Code - key: Space + C + x - - name: (N,V) Roxygen Edit - key: Space + C + r - - name: (N,V) Code Readability Analysis - key: Space + C + l - -- name: UI  - keybinds: - - name: (N) Toggle Line Blame - key: Space + u + b - - name: (N) Toggle Background - key: Space + u + B - - name: (N) Toggle Paint/Colorizer - key: Space + u + p - - name: (N) Toggle Conceal - key: Space + u + c - - name: (N) Colorscheme with preview - key: Space + u + C - - name: (N) Togglr Diagnostics - key: Space + u + d - - name: (N) Edgy Toggle - key: Space + u + e - - name: (N) Edgy select window - key: Space + u + E - - name: (N) Toggle auto format (global) - key: Space + u + f - - name: (N) Toggle auto format (buffer) - key: Space + u + F - - name: (N) Toggle Inlay Hints - key: Space + u + h - - name: (N) Inspect Pos - key: Space + u + i - - name: (N) Toggle Line Numbers - key: Space + u + l - - name: (N) Toggle Relative Numbers - key: Space + u + L - - name: (N) Dismiss all Notifications - key: Space + u + n - - name: (N) Redraw - key: Space + u + r - - name: (N) Toggle Spelling - key: Space + u + s - - name: (N) Toggle Statusline - key: Space + u + S - - name: (N) Toggle Treesitter Context - key: Space + u + t - - name: (N) Toggle Treesitter Highlight - key: Space + u + T - - name: (N) Toggle Word Wrap - key: Space + u + w - - name: (N) Toggle Context - key: Space + u + x - - name: (N) Toggle Zen Mode - key: Space + u + z - - name: (N) Toggle Twilight - key: Space + u + Z - -- name: File Management 󰈔 - keybinds: - - name: (N) Buffers (Telescope) - key: Space + f + b - - name: (N) Lazydocker - key: Space + f + d - - name: (N) File Explorer (cwd) - key: Space + f + e / Space + e - - name: (N) File Explorer (root) - key: Space + f + E / Space + E - - name: (N) Find Files (cwd) (Telescope) - key: Space + f + F - - name: (N) Find Files (root) (Telescope) - key: Space + f + f / Space + Space - - name: (N) New File - key: Space + f + n - - name: (N) Recent Files (cwd) (Telescope) - key: Space + f + R - - name: (N) Recent Files (Telescope) - key: Space + f + r - - name: (N) Workspaces (Telescope) - key: Space + f + w - - name: (N) Xplr (cwd) - key: Space + f + X - - name: (N) Xplr - key: Space + f + x (root) - -- name: Terminal - keybinds: - - name: (N) New Terminal (root) - key: Space + f + t - - name: (N) New Terminal (cwd) - key: Space + f + T - - name: (N) Toggle Terminal - key: Ctrl + / | Ctrl + Enter - -- name: Compile - keybinds: - - name: (N) Compiler (Telescope) - key: Space + c + c + c - - name: (N) Redo Compiler - key: Space + c + c + R - - name: (N) Compiler Result - key: Space + c + c + r - -- name: Diagnostics 󰁨 - keybinds: - - name: (N) Document Diagnostics (Trouble) - key: Space + x + x - - name: (N) Workspace Diagnostics (Trouble) - key: Space + x + X - - name: (N) Location List - key: Space + x + L - - name: (N) QuickFix List - key: Space + x + Q - - name: (N) Previous Diagnostic - key: "[q" - - name: (N) Next Diagnostic - key: "]q" - -- name: LSP - keybinds: - - name: (N) Toggle Line Diagnostics - key: Space + c + d - - name: (N) Toggle Lsp Info - key: Space + c + l - - name: (N) Goto Definition (Glance) - key: g + d - - name: (N) References (Glance) - key: g + r - - name: (N) Goto Declaration - key: g + D - - name: (N) Goto Implementation - key: g + I - - name: (N) Goto Type Definition - key: g + y - - name: (N) Hover - key: K - - name: (N) Signature Help - key: g + K - - name: (Ins) Signature Help - key: Ctrl + k - - name: (N) Next Diagnostic - key: "]d" - - name: (N) Previous Diagnostic - key: "[d" - - name: (N) Next Error - key: "]e" - - name: (N) Previous Error - key: "[e" - - name: (N) Next Warning - key: "]w" - - name: (N) Previous Warning - key: "[w" - - name: (N) Format Document - key: Space + c + f - - name: (Visual) Format Range - key: Space + c + f - - name: (N, Visual) Code Action - key: Space + c + a - - name: (N) Source Action - key: Space + c + A - - name: (N) Rename - key: Space + c + r - - name: (N) Mason - key: Space + c + m - - name: (N, Visual) Refactor - key: Space + c + R - -- name: Navigation / Moving Around (Vim Motions) - keybinds: - - name: (N) Move to the Beginning of the Next Word - key: w - - name: (N) Move to the Beginning of the Previous Word - key: b - - name: (N) Move to the End of the Next Word - key: e - - name: (N) Move to the End of the Previous Word - key: ge - - name: (N) Move to the Beginning of the Next WORD - key: W - - name: (N) Move to the Beginning of the Previous WORD - key: B - - name: (N) Move to the End of the Next WORD - key: E - - name: (N) Move to the End of the Previous WORD - key: gE - - name: (N) Move to a Specific Character (Flash) - key: f - - name: (N) Move to a Specific Character (Flash) (Backwards) - key: F - - name: (N, Org) Flash - key: s - - name: (N, Org) Flash Treesitter - key: S - - name: (Org) Remote Flash - key: r - - name: (N) Treesitter Backwards - key: R - - name: (N) Search a Pattern Forwards - key: / - - name: (N) Search a Pattern Backwards - key: "?" - - name: (N) Move to the First Character of the Line - key: 0 - - name: (N) Move to the Last Character of the Line - key: $ - - name: (N) Move to the First Non-Blank Character of the Line - key: ^ - - name: (N) Move to the Last Non-Blank Character of the Line - key: g_ - - name: (N) Jump to the Beginning of the Document - key: gg - - name: (N) Jump Entire Paragraphs Downwards - key: "{" - - name: (N) Jump Entire Paragraphs Upwards - key: "}" - - name: (N) Jump to the End of the Document - key: G - - name: (N) Move Down Half a Page - key: Ctrl + d - - name: (N) Move Up Half a Page - key: Ctrl + u - -- name: Searching  - keybinds: - - name: (N) Autocomands - key: Space + s + a - - name: (N) Treesitter Symbols - key: Space + s + A - - name: (N) Buffers - key: Space + s + b - - name: (N) Commands - key: Space + s + c - - name: (N) Command History - key: Space + s + C - - name: (N) Document Diagnostics - key: Space + s + d - - name: (N) Workspace Diagnostics - key: Space + s + D - - name: (N) Grep (cwd) - key: Space + s + g - - name: (N) Grep (root) - key: Space + s + G | Space + / - - name: (N) Help Pages - key: Space + s + h - - name: (N) Highlight Groups - key: Space + s + H - - name: (N) Imports - key: Space + s + i - - name: (N) Keymaps - key: Space + s + k - - name: (N) Lsp Symbols Outline - key: Space + s + l - - name: (N) Jump to Mark - key: Space + s + m - - name: (N) Man Pages - key: Space + s + M - - name: (N) Options - key: Space + s + o - - name: (N) Replace in Files (Spectre) - key: Space + s + r - - name: (N) Resume - key: Space + s + R - - name: (N) Goto Symbol - key: Space + s + s - - name: (N) Goto Symbol (Workspace) - key: Space + s + S - - name: (N) Todo - key: Space + s + t - - name: (N) Todo/Fix/Fixme - key: Space + s + T - - name: (N) Variables - key: Space + s + v - - name: (N) Variables (Workspace) - key: Space + s + V - - name: (N) Word (cwd) - key: Space + s + W - - name: (N) Word (root) - key: Space + s + w - - name: (N) Word Under Cursor - key: "*" - - name: (N) Terminals - key: Space + T - - name: (N) Yank History - key: Space + p - -- name: Quit & Sessions 󰗼 - keybinds: - - name: (N) Quit All - key: Space + q + Q - - name: (N) Dont Save Current Session - key: Space + q + d - - name: (N) Restore Session - key: Space + q + s - - name: (N) Restore Last Session - key: Space + q + l - -- name: Package Management  - keybinds: - - name: (N) Install New Package - key: Space + c + p + n - - name: (N) Update Package - key: Space + c + p + u - - name: (N) Remove Package - key: Space + c + p + r - - name: (N) Change Package Version - key: Space + c + p + v - - name: (N) Show Packages Versions - key: Space + c + p + s - diff --git a/config/keyb/bindings/spotify.yml b/config/keyb/bindings/spotify.yml new file mode 100644 index 00000000..0a921e0d --- /dev/null +++ b/config/keyb/bindings/spotify.yml @@ -0,0 +1,49 @@ +- name: Basic 󰪵 + keybinds: + - name: New Playlist + key: Ctrl + N + - name: New Folder + key: Ctrl + Shift + N + - name: Select All + key: Ctrl + A + - name: Filter + key: Ctrl + F + - name: Search on Library + key: Ctrl + Alt + F + +- name: Reproduction 󰐎 + keybinds: + - name: Play-Pause + key: Space + - name: Like Song + key: Alt + Shift + B + - name: Random Song + key: Ctrl + S + - name: Repeat Song + key: Ctrl + R + - name: Previous Song + key: Ctrl + Left Arrow + - name: Next Song + key: Ctrl + Right Arrow + +- name: Navigation 󰎐 + keybinds: + - name: Home + key: Alt + Shift + H + - name: Search + key: Ctrl + L + - name: Fast Search + key: Ctrl + K + - name: Liked Songs + key: Alt + Shift + S + - name: Queue + key: Alt + Shift + Q + - name: My Lists + key: Alt + Shift + 1 + - name: My Podcasts + key: Alt + Shift + 2 + - name: My Artists + key: Alt + Shift + 3 + - name: My Albums + key: Alt + Shift + 4 + diff --git a/config/keyb/keyb.yml b/config/keyb/keyb.yml new file mode 100644 index 00000000..709e2058 --- /dev/null +++ b/config/keyb/keyb.yml @@ -0,0 +1,4 @@ +- name: example + keybinds: + - name: add your keys in + key: /home/sankalp/.config/keyb/keyb.yml diff --git a/config/kitty/kitty-open-helper.sh b/config/kitty/kitty-open-helper.sh deleted file mode 100755 index ecfeaa39..00000000 --- a/config/kitty/kitty-open-helper.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -[ "$1" = @selection ] && set -- . -xdg-open "$1" diff --git a/config/kitty/kitty.conf b/config/kitty/kitty.conf index b5a9532f..a888cce3 100644 --- a/config/kitty/kitty.conf +++ b/config/kitty/kitty.conf @@ -1,164 +1,215 @@ -# Global -font_family JetBrainsMono Nerd Font -font_size 10 +# Fonts + +font_family FiraCode Nerd Font bold_font auto italic_font auto bold_italic_font auto +font_size 10 -background_opacity 0.7 +adjust_line_height 0 +adjust_column_width 0 -confirm_os_window_close 0 +symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 FiraCodeNerdFontComplete-Regular + +disable_ligatures never + +font_features FiraCodeNerdFontComplete-Regular +ss03 +ss04 +ss05 zero + +# Cursor + +cursor #bbbbbb +cursor_text_color background +cursor_shape block +cursor_beam_thickness 1.5 +cursor_underline_thickness 2.0 +cursor_stop_blinking_after 5.0 + +# Scrollback + +scrollback_lines 99999 + +scrollback_pager $PAGER --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER +scrollback_pager_history_size 10 + +# Mouse + +mouse_hide_wait 2.0 + +url_color #0078d7 +url_style curly + +open_url_modifiers ctrl +open_url_with default + +url_prefixes http https file ftp gemini irc gopher mailto news git +detect_urls yes + +copy_on_select clipboard +paste_actions quote-urls-at-prompt +strip_trailing_spaces smart + +rectangle_select_modifiers ctrl+alt +terminal_select_modifiers shift + +# select_by_word_characters @-./_~?&=%+# +focus_follows_mouse yes + +pointer_shape_when_grabbed beam + +default_pointer_shape arrow + +pointer_shape_when_dragging beam + +# Performance tuning + +# repaint_delay 10 +# input_delay 3 +# sync_to_monitor yes + +# Terminal bell enable_audio_bell no +# visual_bell_duration 0.0 +# window_alert_on_bell yes +# bell_on_tab yes +# command_on_bell none + +# Window layout + +remember_window_size yes +initial_window_width 840 +initial_window_height 320 + +# enabled_layouts * + +# window_resize_step_cells 2 +# window_resize_step_lines 2 +# window_border_width 0.5pt + +# draw_minimal_borders yes +# window_margin_width 0 +# single_window_margin_width -1 +# window_padding_width 0 +# placement_strategy center + +active_border_color #cba6f7 +inactive_border_color #777777 +# hide_window_decorations no +# resize_debounce_time 0.1 +# resize_draw_strategy static +# resize_in_steps no +confirm_os_window_close 0 + +# Tab bar + +tab_bar_edge top +tab_bar_margin_width 0.0 +tab_bar_style powerline +# tab_bar_min_tabs 2 +# tab_switch_strategy previous + +# tab_fade 0.25 0.5 0.75 1 +tab_separator " ┇ " +tab_activity_symbol * + +tab_title_template "{index}:{title[-8:]}" + +# active_tab_title_template none +active_tab_title_template "[{index}:{title[-8:]}]" + +active_tab_foreground #f38ba8 +active_tab_background #333A56 +active_tab_font_style normal +inactive_tab_foreground #D9E0EE +inactive_tab_background #161925 +inactive_tab_font_style normal + +tab_bar_background #161926 + +background_opacity 0.75 +background_image none +# background_image_layout scale + +background_image_linear no +dynamic_background_opacity yes + +background_tint 0.0 + +dim_opacity 0.75 +selection_foreground none + +selection_background #44475a + + +background #161926 +foreground #CDD6F4 + +color0 #45475A +color8 #585B70 + +color1 #F38BA8 +color9 #F38BA8 + +color2 #A6E3A1 +color10 #A6E3A1 + +color3 #F9E2AF +color11 #F9E2AF + +color4 #89B4FA +color12 #89B4FA + +color5 #F5C2E7 +color13 #F5C2E7 + +color6 #94E2D5 +color14 #94E2D5 + +color7 #BAC2DE +color15 #A6ADC8 + + +mark1_foreground black +mark1_background #98d3cb +mark2_foreground black +mark2_background #f2dcd3 +mark3_foreground black +mark3_background #f274bc + +# Advanced + +# shell . +# editor . +# close_on_child_death no + +allow_remote_control no + +listen_on none +# env +# update_check_interval 24 +# startup_session none + +# clipboard_control write-clipboard write-primary + +allow_hyperlinks yes +# term xterm-kitty + +shell_integration enabled + + #: Keyboard shortcuts {{{ map ctrl+v paste_from_clipboard map ctrl+c copy_and_clear_or_interrupt -map ctrl+backspace send_text all \x17 +map ctrl+shift+e open_url_with_hints +map ctrl+shift+o pass_selection_to_program qutebrowser -# Scrolling -map ctrl+shift+k scroll_line_up -map ctrl+shift+j scroll_line_down -map ctrl+shift+page_up scroll_page_up -map ctrl+shift+page_down scroll_page_down -map ctrl+shift+home scroll_home -map ctrl+shift+end scroll_end -map ctrl+shift+h show_scrollback +# Browse scrollback +map ctrl+shift+h launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R -# Window management -map ctrl+shift+n new_os_window -map ctrl+w close_window -map ctrl+enter no_op -map ctrl+] next_window -map ctrl+[ previous_window -map alt+h move_window_forward -map alt+l move_window_backward -map alt+` move_window_to_top -map alt+1 first_window -map alt+2 second_window -map alt+3 third_window -map alt+4 fourth_window -map alt+5 fifth_window -map alt+6 sixth_window -map alt+7 seventh_window -map alt+8 eighth_window -map alt+9 ninth_window +# Send alt + t to the terminal +# map ctrl+t send_text all \x1bt -map ctrl+- launch --location=hsplit -map ctrl+\ launch --location=vsplit -map F8 layout_action rotate - -map shift+up move_window up -map shift+left move_window left -map shift+right move_window right -map shift+down move_window down - -map ctrl+shift+left neighboring_window left -map ctrl+shift+right neighboring_window right -map ctrl+shift+up neighboring_window up -map ctrl+shift+down neighboring_window down - -# Tab management -map ctrl+tab next_tab -map ctrl+shift+tab previous_tab -map ctrl+shift+t new_tab -map ctrl+q close_tab -map F2 set_tab_title -map ctrl+shift+l next_layout -map ctrl+shift+. move_tab_forward -map ctrl+shift+, move_tab_backward - -# Miscellaneous -map ctrl+KP_Add increase_font_size -map ctrl+KP_Subtract decrease_font_size -map ctrl+KP_0 restore_font_size -map ctrl+f launch --location=hsplit --allow-remote-control kitty +kitten search.py @active-kitty-window-id -map f5 load_config_file -map f6 debug_config - -#: Open kitty Website - -map shift+cmd+/ open_url https://sw.kovidgoyal.net/kitty/ - -map shift+down kitten pass_keys.py neighboring_window bottom shift+down -map shift+up kitten pass_keys.py neighboring_window top shift+up -map shift+left kitten pass_keys.py neighboring_window left shift+left -map shift+right kitten pass_keys.py neighboring_window right shift+right - -# the 3 here is the resize amount, adjust as needed -map ctrl+alt+down kitten pass_keys.py relative_resize down 3 ctrl+alt+down -map ctrl+alt+up kitten pass_keys.py relative_resize up 3 ctrl+alt+up -map ctrl+alt+left kitten pass_keys.py relative_resize left 3 ctrl+alt+left -map ctrl+alt+right kitten pass_keys.py relative_resize right 3 ctrl+alt+right - -# kitty-scrollback.nvim Kitten alias -action_alias kitty_scrollback_nvim kitten $HOME/.local/share/nvim/lazy/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py - -# Browse scrollback buffer in nvim -map kitty_mod+h kitty_scrollback_nvim -# Browse output of the last shell command in nvim -map kitty_mod+g kitty_scrollback_nvim --config ksb_builtin_last_cmd_output -# Show clicked command output in nvim -mouse_map ctrl+shift+right press ungrabbed combine : mouse_select_command_output : kitty_scrollback_nvim --config ksb_builtin_last_visited_cmd_output - - - -#colors -foreground #f8f8f2 -background #282a36 -selection_foreground #ffffff -selection_background #44475a - -url_color #8be9fd - -# black -color0 #21222c -color8 #6272a4 - -# red -color1 #ff5555 -color9 #ff6e6e - -# green -color2 #50fa7b -color10 #69ff94 - -# yellow -color3 #f1fa8c -color11 #ffffa5 - -# blue -color4 #bd93f9 -color12 #d6acff - -# magenta -color5 #ff79c6 -color13 #ff92df - -# cyan -color6 #8be9fd -color14 #a4ffff - -# white -color7 #f8f8f2 -color15 #ffffff - -# Cursor colors -cursor #f8f8f2 -cursor_text_color background - -# Tab bar colors -active_tab_foreground #282a36 -active_tab_background #f8f8f2 -inactive_tab_foreground #282a36 -inactive_tab_background #6272a4 - -# Marks -mark1_foreground #282a36 -mark1_background #ff5555 - -# Splits/Windows -active_border_color #f8f8f2 -inactive_border_color #6272a4 +hide_window_decorations titlebar-only diff --git a/config/kitty/neighboring_window.py b/config/kitty/neighboring_window.py deleted file mode 100644 index 4a7ece7e..00000000 --- a/config/kitty/neighboring_window.py +++ /dev/null @@ -1,9 +0,0 @@ -def main(): - pass - - -def handle_result(args, result, target_window_id, boss): - boss.active_tab.neighboring_window(args[1]) - - -handle_result.no_ui = True diff --git a/config/kitty/open-actions.conf b/config/kitty/open-actions.conf deleted file mode 100644 index 4fddffeb..00000000 --- a/config/kitty/open-actions.conf +++ /dev/null @@ -1,31 +0,0 @@ -# Directories -protocol file -mime inode/directory -xdg-open --type=os-window --cwd $FILE_PATH - -# Files -protocol file -mime text/* -action launch --type=overlay $EDITOR $FILE_PATH - -# Images -protocol file -mime image/* -xdg-open $FILE_PATH - -# SSH Urls -protocol ssh -action launch --type=os-window ssh $URL - -# Executables -action launch --hold --type=os-window $FILE_PATH - -# Shell files -protocol file -ext fish,bash,zsh -action launch --hold --type=os-window kitty +shebang $FILE_PATH __ext__ - -# Scripts -protocol file -ext sh,command,tool -action launch --hold --type=os-window kitty +shebang $FILE_PATH $SHELL diff --git a/config/kitty/pass_keys.py b/config/kitty/pass_keys.py deleted file mode 100644 index 2d09f4c2..00000000 --- a/config/kitty/pass_keys.py +++ /dev/null @@ -1,106 +0,0 @@ -import re - -from kittens.tui.handler import result_handler -from kitty.key_encoding import KeyEvent, parse_shortcut - - -def is_window_vim(window, vim_id): - from kittens.tui.loop import debug - debug(vim_id) - fp = window.child.foreground_processes - return any(re.search(vim_id, p['cmdline'][0] if len(p['cmdline']) else '', re.I) for p in fp) - - -def encode_key_mapping(window, key_mapping): - mods, key = parse_shortcut(key_mapping) - event = KeyEvent( - mods=mods, - key=key, - shift=bool(mods & 1), - alt=bool(mods & 2), - ctrl=bool(mods & 4), - super=bool(mods & 8), - hyper=bool(mods & 16), - meta=bool(mods & 32), - ).as_window_system_event() - - return window.encoded_key(event) - -def relative_resize_window(direction, amount, target_window_id, boss): - window = boss.window_id_map.get(target_window_id) - if window is None: - return - - neighbors = boss.active_tab.current_layout.neighbors_for_window(window, boss.active_tab.windows) - current_window_id = boss.active_tab.active_window - - left_neighbors = neighbors.get('left') - right_neighbors = neighbors.get('right') - top_neighbors = neighbors.get('top') - bottom_neighbors = neighbors.get('bottom') - - # has a neighbor on both sides - if direction == 'left' and (left_neighbors and right_neighbors): - boss.active_tab.resize_window('narrower', amount) - # only has left neighbor - elif direction == 'left' and left_neighbors: - boss.active_tab.resize_window('wider', amount) - # only has right neighbor - elif direction == 'left' and right_neighbors: - boss.active_tab.resize_window('narrower', amount) - - # has a neighbor on both sides - elif direction == 'right' and (left_neighbors and right_neighbors): - boss.active_tab.resize_window('wider', amount) - # only has left neighbor - elif direction == 'right' and left_neighbors: - boss.active_tab.resize_window('narrower', amount) - # only has right neighbor - elif direction == 'right' and right_neighbors: - boss.active_tab.resize_window('wider', amount) - - # has a neighbor above and below - elif direction == 'up' and (top_neighbors and bottom_neighbors): - boss.active_tab.resize_window('shorter', amount) - # only has top neighbor - elif direction == 'up' and top_neighbors: - boss.active_tab.resize_window('taller', amount) - # only has bottom neighbor - elif direction == 'up' and bottom_neighbors: - boss.active_tab.resize_window('shorter', amount) - - # has a neighbor above and below - elif direction == 'down' and (top_neighbors and bottom_neighbors): - boss.active_tab.resize_window('taller', amount) - # only has top neighbor - elif direction == 'down' and top_neighbors: - boss.active_tab.resize_window('shorter', amount) - # only has bottom neighbor - elif direction == 'down' and bottom_neighbors: - boss.active_tab.resize_window('taller', amount) - - -def main(): - pass - - -@result_handler(no_ui=True) -def handle_result(args, result, target_window_id, boss): - window = boss.window_id_map.get(target_window_id) - action = args[1] - direction = args[2] - key_mapping = args[3] if action == 'neighboring_window' else args[4] - amount = int(args[3]) if action == 'relative_resize' else None - vim_id_idx = 4 if action == 'neighboring_window' else 5 - vim_id = args[vim_id_idx] if len(args) > vim_id_idx else "n?vim" - - if window is None: - return - if is_window_vim(window, vim_id): - for keymap in key_mapping.split(">"): - encoded = encode_key_mapping(window, keymap) - window.write_to_child(encoded) - elif action == 'neighboring_window': - boss.active_tab.neighboring_window(direction) - elif action == 'relative_resize': - relative_resize_window(direction, amount, target_window_id, boss) diff --git a/config/kitty/relative_resize.py b/config/kitty/relative_resize.py deleted file mode 100644 index fff4337f..00000000 --- a/config/kitty/relative_resize.py +++ /dev/null @@ -1,64 +0,0 @@ -# Based on MIT licensed code at https://github.com/chancez/dotfiles/blob/badc69d3895a6a942285amount26b8c372a55d77533eamount/kitty/.config/kitty/relative_resize.py -from kittens.tui.handler import result_handler - -def main(args): - pass - -def relative_resize_window(direction, amount, target_window_id, boss): - window = boss.window_id_map.get(target_window_id) - if window is None: - return - - neighbors = boss.active_tab.current_layout.neighbors_for_window(window, boss.active_tab.windows) - current_window_id = boss.active_tab.active_window - - left_neighbors = neighbors.get('left') - right_neighbors = neighbors.get('right') - top_neighbors = neighbors.get('top') - bottom_neighbors = neighbors.get('bottom') - - # has a neighbor on both sides - if direction == 'left' and (left_neighbors and right_neighbors): - boss.active_tab.resize_window('narrower', amount) - # only has left neighbor - elif direction == 'left' and left_neighbors: - boss.active_tab.resize_window('wider', amount) - # only has right neighbor - elif direction == 'left' and right_neighbors: - boss.active_tab.resize_window('narrower', amount) - - # has a neighbor on both sides - elif direction == 'right' and (left_neighbors and right_neighbors): - boss.active_tab.resize_window('wider', amount) - # only has left neighbor - elif direction == 'right' and left_neighbors: - boss.active_tab.resize_window('narrower', amount) - # only has right neighbor - elif direction == 'right' and right_neighbors: - boss.active_tab.resize_window('wider', amount) - - # has a neighbor above and below - elif direction == 'up' and (top_neighbors and bottom_neighbors): - boss.active_tab.resize_window('shorter', amount) - # only has top neighbor - elif direction == 'up' and top_neighbors: - boss.active_tab.resize_window('taller', amount) - # only has bottom neighbor - elif direction == 'up' and bottom_neighbors: - boss.active_tab.resize_window('shorter', amount) - - # has a neighbor above and below - elif direction == 'down' and (top_neighbors and bottom_neighbors): - boss.active_tab.resize_window('taller', amount) - # only has top neighbor - elif direction == 'down' and top_neighbors: - boss.active_tab.resize_window('shorter', amount) - # only has bottom neighbor - elif direction == 'down' and bottom_neighbors: - boss.active_tab.resize_window('taller', amount) - -@result_handler(no_ui=True) -def handle_result(args, result, target_window_id, boss): - direction = args[1] - amount = int(args[2]) - relative_resize_window(direction, amount, target_window_id, boss) diff --git a/config/kitty/scroll_mark.py b/config/kitty/scroll_mark.py deleted file mode 100644 index 0193b20b..00000000 --- a/config/kitty/scroll_mark.py +++ /dev/null @@ -1,18 +0,0 @@ -from kittens.tui.handler import result_handler -from kitty.boss import Boss - - -def main(args: list[str]) -> None: - pass - - -@result_handler(no_ui=True) -def handle_result( - args: list[str], answer: str, target_window_id: int, boss: Boss -) -> None: - w = boss.window_id_map.get(target_window_id) - if w is not None: - if len(args) > 1 and args[1] != "prev": - w.scroll_to_mark(prev=False) - else: - w.scroll_to_mark() diff --git a/config/kitty/search.py b/config/kitty/search.py deleted file mode 100644 index 610f1558..00000000 --- a/config/kitty/search.py +++ /dev/null @@ -1,338 +0,0 @@ -import json -import re -import subprocess -from gettext import gettext as _ -from pathlib import Path -from subprocess import PIPE, run - -from kittens.tui.handler import Handler -from kittens.tui.line_edit import LineEdit -from kittens.tui.loop import Loop -from kittens.tui.operations import ( - clear_screen, - cursor, - set_line_wrapping, - set_window_title, - styled, -) -from kitty.config import cached_values_for -from kitty.key_encoding import EventType -from kitty.typing import KeyEventType, ScreenSize - -NON_SPACE_PATTERN = re.compile(r"\S+") -SPACE_PATTERN = re.compile(r"\s+") -SPACE_PATTERN_END = re.compile(r"\s+$") -SPACE_PATTERN_START = re.compile(r"^\s+") - -NON_ALPHANUM_PATTERN = re.compile(r"[^\w\d]+") -NON_ALPHANUM_PATTERN_END = re.compile(r"[^\w\d]+$") -NON_ALPHANUM_PATTERN_START = re.compile(r"^[^\w\d]+") -ALPHANUM_PATTERN = re.compile(r"[\w\d]+") - - -def call_remote_control(args: list[str]) -> None: - subprocess.run(["kitty", "@", *args], capture_output=True) - - -def reindex( - text: str, pattern: re.Pattern[str], right: bool = False -) -> tuple[int, int]: - if not right: - m = pattern.search(text) - else: - matches = [x for x in pattern.finditer(text) if x] - if not matches: - raise ValueError - m = matches[-1] - - if not m: - raise ValueError - - return m.span() - - -SCROLLMARK_FILE = Path(__file__).parent.absolute() / "scroll_mark.py" - - -class Search(Handler): - def __init__( - self, cached_values: dict[str, str], window_ids: list[int], error: str = "" - ) -> None: - self.cached_values = cached_values - self.window_ids = window_ids - self.error = error - self.line_edit = LineEdit() - last_search = cached_values.get("last_search", "") - self.line_edit.add_text(last_search) - self.text_marked = bool(last_search) - self.mode = cached_values.get("mode", "text") - self.update_prompt() - self.mark() - - def update_prompt(self) -> None: - self.prompt = "~> " if self.mode == "regex" else "=> " - - def init_terminal_state(self) -> None: - self.write(set_line_wrapping(False)) - self.write(set_window_title(_("Search"))) - - def initialize(self) -> None: - self.init_terminal_state() - self.draw_screen() - - def draw_screen(self) -> None: - self.write(clear_screen()) - if self.window_ids: - input_text = self.line_edit.current_input - if self.text_marked: - self.line_edit.current_input = styled(input_text, reverse=True) - self.line_edit.write(self.write, self.prompt) - self.line_edit.current_input = input_text - if self.error: - with cursor(self.write): - self.print("") - for l in self.error.split("\n"): - self.print(l) - - def refresh(self) -> None: - self.draw_screen() - self.mark() - - def switch_mode(self) -> None: - if self.mode == "regex": - self.mode = "text" - else: - self.mode = "regex" - self.cached_values["mode"] = self.mode - self.update_prompt() - - def on_text(self, text: str, in_bracketed_paste: bool = False) -> None: - if self.text_marked: - self.text_marked = False - self.line_edit.clear() - self.line_edit.on_text(text, in_bracketed_paste) - self.refresh() - - def on_key(self, key_event: KeyEventType) -> None: - if ( - self.text_marked - and key_event.type == EventType.PRESS - and key_event.key - not in [ - "TAB", - "LEFT_CONTROL", - "RIGHT_CONTROL", - "LEFT_ALT", - "RIGHT_ALT", - "LEFT_SHIFT", - "RIGHT_SHIFT", - "LEFT_SUPER", - "RIGHT_SUPER", - ] - ): - self.text_marked = False - self.refresh() - - if self.line_edit.on_key(key_event): - self.refresh() - return - - if key_event.matches("ctrl+u"): - self.line_edit.clear() - self.refresh() - elif key_event.matches("ctrl+a"): - self.line_edit.home() - self.refresh() - elif key_event.matches("ctrl+e"): - self.line_edit.end() - self.refresh() - elif key_event.matches("ctrl+backspace") or key_event.matches("ctrl+w"): - before, _ = self.line_edit.split_at_cursor() - - try: - start, _ = reindex(before, SPACE_PATTERN_END, right=True) - except ValueError: - start = -1 - - try: - space = before[:start].rindex(" ") - except ValueError: - space = 0 - self.line_edit.backspace(len(before) - space) - self.refresh() - elif key_event.matches("ctrl+left") or key_event.matches("ctrl+b"): - before, _ = self.line_edit.split_at_cursor() - try: - start, _ = reindex(before, SPACE_PATTERN_END, right=True) - except ValueError: - start = -1 - - try: - space = before[:start].rindex(" ") - except ValueError: - space = 0 - self.line_edit.left(len(before) - space) - self.refresh() - elif key_event.matches("ctrl+right") or key_event.matches("ctrl+f"): - _, after = self.line_edit.split_at_cursor() - try: - _, end = reindex(after, SPACE_PATTERN_START) - except ValueError: - end = 0 - - try: - space = after[end:].index(" ") + 1 - except ValueError: - space = len(after) - self.line_edit.right(space) - self.refresh() - elif key_event.matches("alt+backspace") or key_event.matches("alt+w"): - before, _ = self.line_edit.split_at_cursor() - - try: - start, _ = reindex(before, NON_ALPHANUM_PATTERN_END, right=True) - except ValueError: - start = -1 - else: - self.line_edit.backspace(len(before) - start) - self.refresh() - return - - try: - start, _ = reindex(before, NON_ALPHANUM_PATTERN, right=True) - except ValueError: - self.line_edit.backspace(len(before)) - self.refresh() - return - - self.line_edit.backspace(len(before) - (start + 1)) - self.refresh() - elif key_event.matches("alt+left") or key_event.matches("alt+b"): - before, _ = self.line_edit.split_at_cursor() - - try: - start, _ = reindex(before, NON_ALPHANUM_PATTERN_END, right=True) - except ValueError: - start = -1 - else: - self.line_edit.left(len(before) - start) - self.refresh() - return - - try: - start, _ = reindex(before, NON_ALPHANUM_PATTERN, right=True) - except ValueError: - self.line_edit.left(len(before)) - self.refresh() - return - - self.line_edit.left(len(before) - (start + 1)) - self.refresh() - elif key_event.matches("alt+right") or key_event.matches("alt+f"): - _, after = self.line_edit.split_at_cursor() - - try: - _, end = reindex(after, NON_ALPHANUM_PATTERN_START) - except ValueError: - end = 0 - else: - self.line_edit.right(end) - self.refresh() - return - - try: - _, end = reindex(after, NON_ALPHANUM_PATTERN) - except ValueError: - self.line_edit.right(len(after)) - self.refresh() - return - - self.line_edit.right(end - 1) - self.refresh() - elif key_event.matches("tab"): - self.switch_mode() - self.refresh() - elif key_event.matches("up"): - for match_arg in self.match_args(): - call_remote_control(["kitten", match_arg, str(SCROLLMARK_FILE)]) - elif key_event.matches("down"): - for match_arg in self.match_args(): - call_remote_control(["kitten", match_arg, str(SCROLLMARK_FILE), "next"]) - elif key_event.matches("enter"): - self.quit(0) - elif key_event.matches("esc"): - self.quit(1) - - def on_interrupt(self) -> None: - self.quit(1) - - def on_eot(self) -> None: - self.quit(1) - - def on_resize(self, screen_size: ScreenSize) -> None: - self.refresh() - - def match_args(self) -> list[str]: - return [f"--match=id:{window_id}" for window_id in self.window_ids] - - def mark(self) -> None: - if not self.window_ids: - return - text = self.line_edit.current_input - if text: - match_case = "i" if text.islower() else "" - match_type = match_case + self.mode - for match_arg in self.match_args(): - try: - call_remote_control( - ["create-marker", match_arg, match_type, "1", text] - ) - except SystemExit: - self.remove_mark() - else: - self.remove_mark() - - def remove_mark(self) -> None: - for match_arg in self.match_args(): - call_remote_control(["remove-marker", match_arg]) - - def quit(self, return_code: int) -> None: - self.cached_values["last_search"] = self.line_edit.current_input - self.remove_mark() - if return_code: - for match_arg in self.match_args(): - call_remote_control(["scroll-window", match_arg, "end"]) - self.quit_loop(return_code) - - -def main(args: list[str]) -> None: - call_remote_control( - ["resize-window", "--self", "--axis=vertical", "--increment", "-100"] - ) - - error = "" - if len(args) < 2 or not args[1].isdigit(): - error = "Error: Window id must be provided as the first argument." - - window_id = int(args[1]) - window_ids = [window_id] - if len(args) > 2 and args[2] == "--all-windows": - ls_output = run(["kitty", "@", "ls"], stdout=PIPE) - ls_json = json.loads(ls_output.stdout.decode()) - current_tab = None - for os_window in ls_json: - for tab in os_window["tabs"]: - for kitty_window in tab["windows"]: - if kitty_window["id"] == window_id: - current_tab = tab - if current_tab: - window_ids = [ - w["id"] for w in current_tab["windows"] if not w["is_focused"] - ] - else: - error = "Error: Could not find the window id provided." - - loop = Loop() - with cached_values_for("search") as cached_values: - handler = Search(cached_values, window_ids, error) - loop.loop(handler)