summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-10-16 18:05:49 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-10-16 18:05:49 +0800
commitcd004d5909d8e7bc7f7b0f67ff534b55fe189a21 (patch)
tree0c6ad6744d323b01cd35328af038c930684bdbc8
parent27dacbbc7c34313e8a69e59450b833730e9ce191 (diff)
feat(binds): expand/shrink window via keybind, centerwindow
change(exec->execr): prob save resource as exec need regex remove
-rw-r--r--dot-config/hypr/binds.conf161
1 files changed, 89 insertions, 72 deletions
diff --git a/dot-config/hypr/binds.conf b/dot-config/hypr/binds.conf
index 38a41bd8..3a82f831 100644
--- a/dot-config/hypr/binds.conf
+++ b/dot-config/hypr/binds.conf
@@ -12,27 +12,27 @@ $mainMod = SUPER # Sets "SUPER" key as main modifier
# Launching...
bind = $mainMod, return, exec, $terminal
bind = $mainMod shift, return, exec, $termfloat
-# bind = $mainMod space, return, exec, $terminal start --class pseudo
-bind = $mainMod alt, Delete, exec, pkill rofi || $rofiexec/rofi_powermenu
-bind = alt, F1, exec, pkill rofi || $rofiexec/rofi_launcher
-bind = alt, F2, exec, pkill rofi || $rofiexec/rofi_runner
-bind = $mainMod, period, exec, pkill rofi || $rofiexec/rofi_emoji
+# bind = $mainMod space, return, execr, $terminal start --class pseudo
+bind = $mainMod alt, Delete, execr, pkill rofi || $rofiexec/rofi_powermenu
+bind = alt, F1, execr, pkill rofi || $rofiexec/rofi_launcher
+bind = alt, F2, execr, pkill rofi || $rofiexec/rofi_runner
+bind = $mainMod, period, execr, pkill rofi || $rofiexec/rofi_emoji
# utils
-bind = $mainMod, c, exec, pkill rofi || $rofiexec/rofi_configs
-bind = $mainMod, m, exec, pkill rofi || $rofiexec/rofi_music
-bind = $mainMod, n, exec, nmd
-bind = $mainMod, r, exec, pkill rofi || $rofiexec/rofi_asroot
-bind = $mainMod, s, exec, pkill rofi || $rofiexec/rofi_screenshot
-bind = $mainMod, v, exec, pkill rofi || $rofiexec/rofi_clipboard
-bind = $mainMod, w, exec, pkill rofi || $rofiexec/rofi_windows
-bind = $mainMod, x, exec, pkill rofi || $rofiexec/rofi_powermenu
-bind = $mainMod, b, exec, pkill rofi || $rofiexec/rofi_bluetooth
+bind = $mainMod, c, execr, pkill rofi || $rofiexec/rofi_configs
+bind = $mainMod, m, execr, pkill rofi || $rofiexec/rofi_music
+bind = $mainMod, n, execr, nmd
+bind = $mainMod, r, execr, pkill rofi || $rofiexec/rofi_asroot
+bind = $mainMod, s, execr, pkill rofi || $rofiexec/rofi_screenshot
+bind = $mainMod, v, execr, pkill rofi || $rofiexec/rofi_clipboard
+bind = $mainMod, w, execr, pkill rofi || $rofiexec/rofi_windows
+bind = $mainMod, x, execr, pkill rofi || $rofiexec/rofi_powermenu
+bind = $mainMod, b, execr, pkill rofi || $rofiexec/rofi_bluetooth
# GUI
-bind = $mainMod shift, f, exec, $fileManager
-bind = $mainMod shift, w, exec, $browser --restore-last-session
-bind = $mainMod shift, e, exec, cursor
-bind = $mainMod shift, d, exec, discord $waylandarg
-bind = $mainMod shift, b, exec, beeper $waylandarg
+bind = $mainMod shift, f, execr, $fileManager
+bind = $mainMod shift, w, execr, $browser --restore-last-session
+bind = $mainMod shift, e, execr, cursor
+bind = $mainMod shift, d, execr, discord $waylandarg
+bind = $mainMod shift, b, execr, beeper $waylandarg
# CLI
bind = ctrl alt, a, exec, $termfloat -T pulsemixer -e pulsemixer
bind = ctrl alt, r, exec, $termfloat -T ranger -e ranger
@@ -40,67 +40,67 @@ bind = ctrl alt, v, exec, $termfloat -e $editor
# Emergency
bindtp = ctrl alt, b, exec, $termfloat -T btop -e sudo nice -n -20 ionice -c 1 sudo btop
-bindtp = ctrl alt, delete, exec, pkill rofi || $rofiexec/rofi_shutdown_menu
+bindtp = ctrl alt, delete, execr, pkill rofi || $rofiexec/rofi_shutdown_menu
# Misc
-# bind = ctrl alt, m, exec, music
-bind = $mainMod, p, exec, hyprpicker --autocopy
-bindtp = ctrl alt, l, exec, hyprlock
+# bind = ctrl alt, m, execr, music
+bind = $mainMod, p, execr, hyprpicker --autocopy
+bindtp = ctrl alt, l, execr, hyprlock
# Misc
-bind = $mainMod shift, g, exec, gtk-launch shortwave.desktop
-# bind = $mainMod shift, c, exec, gtk-launch google-chat.desktop
+bind = $mainMod shift, g, execr, gtk-launch shortwave.desktop
+# bind = $mainMod shift, c, execr, gtk-launch google-chat.desktop
# XF86 keys & Misc
-bind = ,XF86Print, exec, $HOME/scripts/sysutil.sh screenshot --now
-bind = alt, XF86AudioMute, exec, $HOME/scripts/sysutil.sh screenshot --in5sec
-bind = $mainMod shift, s, exec, $HOME/scripts/sysutil.sh screenshot --area
+bind = ,XF86Print, execr, $HOME/scripts/sysutil.sh screenshot --now
+bind = alt, XF86AudioMute, execr, $HOME/scripts/sysutil.sh screenshot --in5sec
+bind = $mainMod shift, s, execr, $HOME/scripts/sysutil.sh screenshot --area
# Volume
-bind = ,XF86AudioRaiseVolume, exec, $HOME/scripts/sysutil.sh volume --inc
-bind = ,XF86AudioLowerVolume, exec, $HOME/scripts/sysutil.sh volume --dec
-bind = ,XF86AudioMute, exec, $HOME/scripts/sysutil.sh volume --toggle
-bind = ,XF86AudioMicMute, exec, $HOME/scripts/sysutil.sh volume --toggle-mic
-bind = ,XF86AudioNext, exec, playerctl -p spotify next
-bind = ,XF86AudioPrev, exec, playerctl -p spotify previous
-bindl = ,XF86AudioPlay, exec, playerctl -p spotify play-pause || LD_PRELOAD=/usr/lib/spotify-adblock.so spotify
-bind = ,XF86AudioStop, exec, playerctl -p spotify stop
-bind = ,XF86PowerOff, exec, pkill rofi || $rofiexec/rofi_shutdown
+bind = ,XF86AudioRaiseVolume, execr, $HOME/scripts/sysutil.sh volume --inc
+bind = ,XF86AudioLowerVolume, execr, $HOME/scripts/sysutil.sh volume --dec
+bind = ,XF86AudioMute, execr, $HOME/scripts/sysutil.sh volume --toggle
+bind = ,XF86AudioMicMute, execr, $HOME/scripts/sysutil.sh volume --toggle-mic
+bind = ,XF86AudioNext, execr, playerctl -p spotify next
+bind = ,XF86AudioPrev, execr, playerctl -p spotify previous
+bindl = ,XF86AudioPlay, exec, [workspace 7 silent] playerctl -p spotify play-pause || LD_PRELOAD=/usr/lib/spotify-adblock.so spotify
+bind = ,XF86AudioStop, execr, playerctl -p spotify stop
+bind = ,XF86PowerOff, execr, pkill rofi || $rofiexec/rofi_shutdown
# Pause
-bind = ,Pause, exec, hyprfreeze -s -a
+bind = ,Pause, execr, hyprfreeze -s -a
# Print
-bind = ,Print, exec, $HOME/scripts/hyprshot --now
+bind = ,Print, execr, $HOME/scripts/hyprshot --now
# Brightness
-bind = ,XF86MonBrightnessUp, exec, $HOME/scripts/sysutil.sh brightness --inc
-bind = ,XF86MonBrightnessDown, exec, $HOME/scripts/sysutil.sh brightness --dec
+bind = ,XF86MonBrightnessUp, execr, $HOME/scripts/sysutil.sh brightness --inc
+bind = ,XF86MonBrightnessDown, execr, $HOME/scripts/sysutil.sh brightness --dec
# Window management
-# bind = $mainMod, d, exec, $HOME/scripts/hyprhide h
-# bind = $mainMod, i, exec, $HOME/scripts/hyprhide s
+# bind = $mainMod, d, execr, $HOME/scripts/hyprhide h
+# bind = $mainMod, i, execr, $HOME/scripts/hyprhide s
bind = $mainMod, d, movetoworkspacesilent, special:minimized
bind = $mainMod, i, togglespecialworkspace, minimized
bind = $mainMod, i, movetoworkspace, +0
bind = $mainMod, q, killactive
-bind = $mainMod shift, q, exec, kill -9 $(hyprctl activewindow | grep pid | tail -1 | awk '{print$2}')
-bind = ctrl alt, escape, exec, hyprctl kill
-bind = ctrl $mainMod shift, r, exec, systemctl restart $sessionManager
+bind = $mainMod shift, q, execr, kill -9 $(hyprctl activewindow | grep pid | tail -1 | awk '{print$2}')
+bind = ctrl alt, escape, execr, hyprctl kill
+bind = ctrl $mainMod shift, r, execr, systemctl restart $sessionManager
# restart bar
-bind = ctrl $mainMod, escape, exec, killall -SIGUSR2 waybar || waybar &
+bind = ctrl $mainMod, escape, execr, killall -SIGUSR2 waybar || waybar &
# reload wall
-bind = $mainMod alt, b, exec, killall wallust; killall mpvpaper.sh; $SCRIPTSDIR/mpvpaper.sh
+bind = $mainMod alt, b, execr, killall wallust; killall mpvpaper.sh; $SCRIPTSDIR/mpvpaper.sh
# bind = ctrl, up, hyprexpo:expo, on
# bind = ctrl, down, hyprexpo:expo, off
-bind = $mainMod ctrl, up, overview:open
-bind = $mainMod ctrl, down, overview:close
-# bind = alt, tab, exec, hyprswitch gui
-# bind = alt, grave, exec, hyprswitch gui --reverse
-# bindr = alt, tab, exec, hyprswitch close
-# bindr = alt, grave, exec, hyprswitch close
-bind = alt, tab, exec, /home/system/.cargo/bin/hyprswitch gui --mod-key alt_l --key tab --close mod-key-release --reverse-key=key=grave && hyprswitch dispatch
-bind = alt, grave, exec, /home/system/.cargo/bin/hyprswitch gui --mod-key alt_l --key tab --close mod-key-release --reverse-key=key=grave && hyprswitch dispatch -r
+bind = ctrl $mainMod alt, up, overview:open
+bind = ctrl $mainMod alt, down, overview:close
+# bind = alt, tab, execr, hyprswitch gui
+# bind = alt, grave, execr, hyprswitch gui --reverse
+# bindr = alt, tab, execr, hyprswitch close
+# bindr = alt, grave, execr, hyprswitch close
+bind = alt, tab, execr, /home/system/.cargo/bin/hyprswitch gui --mod-key alt_l --key tab --close mod-key-release --reverse-key=key=grave && hyprswitch dispatch
+bind = alt, grave, execr, /home/system/.cargo/bin/hyprswitch gui --mod-key alt_l --key tab --close mod-key-release --reverse-key=key=grave && hyprswitch dispatch -r
bind = ctrl alt, left, workspace, -1
bind = ctrl alt, right, workspace, +1
@@ -108,24 +108,41 @@ bind = $mainMod shift, left, movewindow, l
bind = $mainMod shift, right, movewindow, r
bind = $mainMod shift, up, movewindow, u
bind = $mainMod shift, down, movewindow, d
-bind = alt shift, left, resizeactive, left -20 -20
-bind = alt shift, right, resizeactive, 0 20
+bind = $mainMod shift, h, movewindow, l
+bind = $mainMod shift, l, movewindow, r
+bind = $mainMod shift, k, movewindow, u
+bind = $mainMod shift, j, movewindow, d
+bind = alt shift, left, resizeactive, -20 0
+bind = alt shift, left, moveactive, 20 0
+bind = alt shift, right, resizeactive, -20 0
bind = alt shift, up, resizeactive, 0 -20
-bind = alt shift, down, resizeactive, 20 0
-bind = $mainMod ctrl, left, resizeactive, -20 0
-bind = $mainMod ctrl, right, resizeactive, 20 0
-bind = $mainMod ctrl, up, resizeactive, 0 -20
-bind = $mainMod ctrl, down, resizeactive, 0 20
+bind = alt shift, up, moveactive, 0 20
+bind = alt shift, down, resizeactive, 0 -20
+bind = ctrl $mainMod, left, resizeactive, 20 0
+bind = ctrl $mainMod, left, moveactive, -20 0
+bind = ctrl $mainMod, right, resizeactive, 20 0
+bind = ctrl $mainMod, up, resizeactive, 0 20
+bind = ctrl $mainMod, up, moveactive, 0 -20
+bind = ctrl $mainMod, down, resizeactive, 0 20
+bind = ctrl $mainMod alt, f, setfloating, 1
+bind = ctrl $mainMod alt, f, centerwindow, 1
+
+# window shortcuts
bind = $mainMod, f, fullscreen,
bind = $mainMod, space, togglefloating,
bind = $mainMod shift, space, pseudo, # dwindle
-bind = $mainMod shift, h, togglesplit, # dwindle
+bind = $mainMod shift, m, togglesplit, # dwindle
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
+# vim binds
+bind = $mainMod, h, movefocus, l
+bind = $mainMod, l, movefocus, r
+bind = $mainMod, k, movefocus, u
+bind = $mainMod, j, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
@@ -164,18 +181,18 @@ bindm = $mainMod, mouse:273, resizewindow
# bindri = $mainMod, mouse:272, pin, disable
-bindi = ,mouse:276, exec, exec -a autoclicker-left zsh -c 'while true; do wlrctl pointer click; sleep $((0.$RANDOM/10)); done'
-bindi = ,mouse:275, exec, exec -a autoclicker-right zsh -c 'while true; do wlrctl pointer click right; sleep $((0.$RANDOM/10)); done'
-bindri = ,mouse:276, exec, kill $(pgrep -f autoclicker-left)
-bindri = ,mouse:275, exec, kill $(pgrep -f autoclicker-right)
+bindi = ,mouse:276, execr, exec -a autoclicker-left zsh -c 'while true; do wlrctl pointer click; sleep $((0.$RANDOM/10)); done'
+bindi = ,mouse:275, execr, exec -a autoclicker-right zsh -c 'while true; do wlrctl pointer click right; sleep $((0.$RANDOM/10)); done'
+bindri = ,mouse:276, execr, kill $(pgrep -f autoclicker-left)
+bindri = ,mouse:275, execr, kill $(pgrep -f autoclicker-right)
# Make group
bind = $mainMod, g, togglegroup
-# bindie = ,mouse:276, exec, wlrctl pointer click
-# bindie = ,mouse:275, exec, wlrctl pointer click right
-# bindri = ,mouse:276, exec, kill $(pgrep -f autoclicker-left)
-# bindri = ,mouse:275, exec, kill $(pgrep -f autoclicker-right)
+# bindie = ,mouse:276, execr, wlrctl pointer click
+# bindie = ,mouse:275, execr, wlrctl pointer click right
+# bindri = ,mouse:276, execr, kill $(pgrep -f autoclicker-left)
+# bindri = ,mouse:275, execr, kill $(pgrep -f autoclicker-right)
# chroma
bind = $mainMod, O, togglechromakey