Files
illogical-impulse/m3ww/.config/hypr/keybinds.conf
T
2024-02-22 15:35:06 +07:00

303 lines
15 KiB
Plaintext
Executable File

########################## Language ############################
bind = SuperShift, V, exec, ~/.config/eww/scripts/language --switch '{"name":"Vietnamese","name_abbr":"VIE","name_ibus":"Bamboo::Us","name_method":"Vietnamese Telex (Bamboo Engine)"}' &
bind = SuperShift, E, exec, ~/.config/eww/scripts/language --switch '{"name":"English (United States)","name_abbr":"ENG","name_ibus":"xkb:us::eng","name_method":"US"}' &
bind = Super, Space, exec, ~/.config/eww/scripts/language --cycle &
#################### It just works™ keybinds ###################
# Volume
bindl = ,XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
bindle=, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bindle=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindle = , XF86AudioRaiseVolume, exec, ~/.config/eww/scripts/volume osd &
bindle = , XF86AudioLowerVolume, exec, ~/.config/eww/scripts/volume osd &
bindl = , XF86AudioMute, exec, ~/.config/eww/scripts/volume osd &
# Brightness
bindle=, XF86MonBrightnessUp, exec, light -A 3 && ~/.config/eww/scripts/brightness osd &
bindle=, XF86MonBrightnessDown, exec, light -U 3 && ~/.config/eww/scripts/brightness osd &
######################################## Keybinds ########################################
# Apps: just normal apps
bind = Super, C, exec, code --password-store=gnome --enable-features=UseOzonePlatform --ozone-platform=wayland
bind = ControlShiftAlt, Y, exec, yuzu
bind = Super, T, exec, foot --override shell=fish
bind = SuperShiftAlt, T, exec, foot sleep 0.01 && nmtui
bind = SuperAlt, T, exec, wezterm
bind = Super, Return, exec, wezterm
bind = Super, E, exec, nautilus --new-window
bind = SuperAlt, E, exec, thunar
bind = Super, W, exec, firefox
bind = ControlSuperAlt, E, exec, /usr/bin/microsoft-edge-stable --password-store=gnome --enable-features=UseOzonePlatform --ozone-platform=wayland --gtk-version=4
bind = Super, X, exec, gnome-text-editor --new-window
bind = SuperShift, W, exec, wps
# Apps: Settings and config
bind = Super, I, exec, XDG_CURRENT_DESKTOP="gnome" gnome-control-center
bind = ControlSuper, V, exec, pavucontrol
bind = ControlShift, Escape, exec, gnome-system-monitor
bind = ControlAltShift, Escape, exec, foot -T 'btop' btop
bind = SuperShift, I, exec, ~/.local/bin/guifetch
# Actions
bind = SuperShift, Period, exec, pkill wofi || wofi-emoji
bind = Super, Period, exec, pkill fuzzel || ~/.local/bin/fuzzel-emoji
bind = Super, Q, killactive,
bind = SuperAlt, Space, togglefloating,
bind = ShiftSuperAlt, Q, exec, hyprctl kill
bind = ControlShiftAlt, Delete, exec, pkill wlogout || wlogout -p layer-shell
bind = ControlShiftAltSuper, Delete, exec, systemctl poweroff
# Screenshot, Record, OCR (Optical Character Recognition), Color picker, Clipboard history
bind = SuperShift, D, exec,~/.local/bin/rubyshot | wl-copy
bind = SuperShiftAlt, S, exec, grim -g "$(slurp)" - | swappy -f -
bindl =,Print,exec,grim - | wl-copy
bind = SuperShift, S, exec, grim -g "$(slurp)" - | wl-copy
bind = SuperAlt, R, exec, ~/.local/bin/record-script.sh
bind = ControlAlt, R, exec, ~/.local/bin/record-script.sh --sound
bind = SuperShiftAlt, R, exec, ~/.local/bin/record-script-fullscreen.sh
bind = ControlSuperShift,S,exec,grim -g "$(slurp)" "tmp.png" && tesseract "tmp.png" - | wl-copy && rm "tmp.png"
bind = SuperShift,T,exec,grim -g "$(slurp)" "tmp.png" && tesseract "tmp.png" - | wl-copy && rm "tmp.png"
bind = SuperShift, C, exec, hyprpicker -a
bind = Super, V, exec, pkill fuzzel || cliphist list | fuzzel --no-fuzzy --dmenu | cliphist decode | wl-copy
# Media
bind = SuperShift, N, exec, playerctl next || playerctl position `bc <<< "100 * $(playerctl metadata mpris:length) / 1000000 / 100"`
bind = SuperShift, B, exec, playerctl previous
bind = SuperShift, P, exec, playerctl play-pause
#Lock screen | blur: --effect-blur=20x20
bind = Super, L, exec, ~/.local/bin/lock.sh
bind = SuperShift, L, exec, ~/.local/bin/lock.sh
bindl = SuperShift, L, exec, sleep 0.1 && systemctl suspend
# App launcher
bind = ControlSuper, Slash, exec, pkill anyrun || anyrun
###################################### eww keybinds #####################################
bindr = ControlSuper, R, exec, pkill eww; pkill bash; pkill notify-receive; eww daemon && eww open bar && eww open bgdecor &
bind = ControlSuper, T, exec, cd ~/.config/eww && scripts/switchwall
bind = SuperAlt, W, exec, ~/.config/eww/scripts/toggle-topbottom.sh
bind = Super, Tab, exec, ~/.config/eww/scripts/toggle-powerview.sh &
bind = Super, M, exec, ~/.config/eww/scripts/toggle-visualizer.sh &
bind = Super, B, exec, ~/.config/eww/scripts/toggle-sideleft.sh &
bind = Super, O, exec, ~/.config/eww/scripts/toggle-sideleft.sh &
bind = Super, G, exec, ~/.config/eww/scripts/toggle-mixer.sh &
bind = Super, Slash, exec, ~/.config/eww/scripts/toggle-cheatsheet.sh
bind = Super, N, exec, ~/.config/eww/scripts/toggle-sideright.sh &
bind = Super, A, exec, ~/.config/eww/scripts/toggle-dashboard.sh &
bind = ControlSuper, mouse:273, exec, ~/.config/eww/scripts/toggle-supercontext.sh &
bind = Super, Menu, exec, ~/.config/eww/scripts/toggle-supercontext.sh &
bindr = Control, Control_R, exec, ~/.config/eww/scripts/toggle-notificationspopup.sh --close && eww update notification_read=$(eww get notifications | gojq 'length')
bindr = Control, Control_R, exec, ~/.config/eww/scripts/toggle-sideleft.sh --close &
bindr = Control, Control_R, exec, ~/.config/eww/scripts/toggle-sideright.sh --close &
bindr = Control, Control_R, exec, ~/.config/eww/scripts/toggle-visualizer.sh --close &
######### Cheat sheet #########
bind = Super, Slash, submap, cheatsheet
submap=cheatsheet
bindl =,Print,exec,grim - | wl-copy
bind = Super, Slash, exec, ~/.config/eww/scripts/toggle-cheatsheet.sh --close
bind = , Escape, exec, ~/.config/eww/scripts/toggle-cheatsheet.sh --close
bindr = Control, Control_R, exec, ~/.config/eww/scripts/toggle-cheatsheet.sh --close
bind = Super, Slash, submap, reset
bind = , Escape, submap, reset
bindr = Control, Control_R, submap, reset
submap=reset
######### Power Menu #########
bind=CTRLAlt,Delete,exec, eww open --toggle powermenu
bind=CTRLAlt,Delete,submap,powermenu
submap=powermenu
bindl =,Print,exec,grim - | wl-copy
bind = SuperShift, S, exec, grim -g "$(slurp)" - | wl-copy
bind=,Right,exec,VALUE=$(eww get powermenu_option); eww update powermenu_option=$(( VALUE % 3 == 2 || VALUE > 5 ? VALUE : VALUE + 1 ))
bind=,Left,exec,VALUE=$(eww get powermenu_option); eww update powermenu_option=$(( VALUE % 3 == 0 || VALUE > 5 ? VALUE : VALUE - 1 ))
bind=,Up,exec,VALUE=$(eww get powermenu_option); eww update powermenu_option=$(( VALUE > 2 ? VALUE - 3 : VALUE ))
bind=,Down,exec,VALUE=$(eww get powermenu_option); eww update powermenu_option=$(( VALUE < 3 ? VALUE + 3 : 7 ))
bind=,Return,exec,eval $(eww get POWERMENU_COMMANDS | gojq -r ".[$(eww get powermenu_option)]")
bind=,Space,exec,eval $(eww get POWERMENU_COMMANDS | gojq -r ".[$(eww get powermenu_option)]")
bind=,Grave,exec,eval $(eww get POWERMENU_QUICKLAUNCHES | gojq -r ".[0]") && eww update powermenu_option=0
bind=,1,exec,eval $(eww get POWERMENU_QUICKLAUNCHES | gojq -r ".[1]") && eww update powermenu_option=0
bind=,2,exec,eval $(eww get POWERMENU_QUICKLAUNCHES | gojq -r ".[2]") && eww update powermenu_option=0
bind=,3,exec,eval $(eww get POWERMENU_QUICKLAUNCHES | gojq -r ".[3]") && eww update powermenu_option=0
bind=,4,exec,eval $(eww get POWERMENU_QUICKLAUNCHES | gojq -r ".[4]") && eww update powermenu_option=0
bind=,4,exec,eval $(eww get POWERMENU_QUICKLAUNCHES | gojq -r ".[5]") && eww update powermenu_option=0
bind=CTRLAlt,Delete,exec, eww close powermenu && eww update powermenu_option=0
bind=,Escape,exec, eww close powermenu && eww update powermenu_option=0
bind=,Space,exec, eww close powermenu && eww update powermenu_option=0
bind=,Return,exec, eww close powermenu && eww update powermenu_option=0
bindr=Control,Control_R,exec, eww close powermenu && eww update powermenu_option=0
bind=CTRLAlt,Delete,submap,reset
bind=,Escape,submap,reset
bind=,Space,submap,reset
bind=,Return,submap,reset
bindr = Control, Control_R, submap, reset
bind = ControlSuper, R, exec, hyprctl dispatch submap reset; pkill eww; pkill bash; pkill notify-receive; eww daemon && eww open bar && eww open bgdecor &
submap=reset
#############################
######### Powerview #########
bindr = Super, Super_L, exec, ~/.config/eww/scripts/toggle-powerview.sh --keypress &
submap = powerview
bindl =,Print,exec,grim - | wl-copy
bind = SuperShift, S, exec, grim -g "$(slurp)" - | wl-copy
bind = ControlSuper, right, workspace, +1
bind = ControlSuper, left, workspace, -1
bind = ControlSuper, up, workspace, -5
bind = ControlSuper, down, workspace, +5
bind = Super, Page_Down, workspace, +1
bind = Super, Page_Up, workspace, -1
bind = ControlSuper, Page_Down, workspace, +1
bind = ControlSuper, Page_Up, workspace, -1
bind = Super, Tab, exec, ~/.config/eww/scripts/toggle-powerview.sh --close &
bindr = Super, Super_L, exec, ~/.config/eww/scripts/toggle-powerview.sh --close &
bind = , Escape, exec, ~/.config/eww/scripts/toggle-powerview.sh --close &
bind = Super, Tab, submap, reset
bindr = Super, Super_L, submap, reset
bindr = Control, Control_L, submap, reset
bind = , Escape, submap, reset
submap = reset
#############################
######### Edit mode #########
submap = editmode
bindm = ,mouse:272, movewindow
bindm = ,mouse:273, resizewindow
bindm = ,mouse:274, movewindow
bind = ,mouse_up, workspace, +1
bind = ,mouse_down, workspace, -1
bind = Alt, 1, exec, ~/.config/eww/scripts/dumptows $(hyprctl activeworkspace -j | gojq '.id') 1
bind = Alt, 2, exec, ~/.config/eww/scripts/dumptows $(hyprctl activeworkspace -j | gojq '.id') 2
bind = Alt, 3, exec, ~/.config/eww/scripts/dumptows $(hyprctl activeworkspace -j | gojq '.id') 3
bind = Alt, 4, exec, ~/.config/eww/scripts/dumptows $(hyprctl activeworkspace -j | gojq '.id') 4
bind = Alt, 5, exec, ~/.config/eww/scripts/dumptows $(hyprctl activeworkspace -j | gojq '.id') 5
bind = Alt, 6, exec, ~/.config/eww/scripts/dumptows $(hyprctl activeworkspace -j | gojq '.id') 6
bind = Alt, 7, exec, ~/.config/eww/scripts/dumptows $(hyprctl activeworkspace -j | gojq '.id') 7
bind = Alt, 8, exec, ~/.config/eww/scripts/dumptows $(hyprctl activeworkspace -j | gojq '.id') 8
bind = Alt, 9, exec, ~/.config/eww/scripts/dumptows $(hyprctl activeworkspace -j | gojq '.id') 9
bind = Alt, 0, exec, ~/.config/eww/scripts/dumptows $(hyprctl activeworkspace -j | gojq '.id') 10
bind = Shift, 1, exec, ~/.config/eww/scripts/swapws $(hyprctl activeworkspace -j | gojq '.id') 1
bind = Shift, 2, exec, ~/.config/eww/scripts/swapws $(hyprctl activeworkspace -j | gojq '.id') 2
bind = Shift, 3, exec, ~/.config/eww/scripts/swapws $(hyprctl activeworkspace -j | gojq '.id') 3
bind = Shift, 4, exec, ~/.config/eww/scripts/swapws $(hyprctl activeworkspace -j | gojq '.id') 4
bind = Shift, 5, exec, ~/.config/eww/scripts/swapws $(hyprctl activeworkspace -j | gojq '.id') 5
bind = Shift, 6, exec, ~/.config/eww/scripts/swapws $(hyprctl activeworkspace -j | gojq '.id') 6
bind = Shift, 7, exec, ~/.config/eww/scripts/swapws $(hyprctl activeworkspace -j | gojq '.id') 7
bind = Shift, 8, exec, ~/.config/eww/scripts/swapws $(hyprctl activeworkspace -j | gojq '.id') 8
bind = Shift, 9, exec, ~/.config/eww/scripts/swapws $(hyprctl activeworkspace -j | gojq '.id') 9
bind = Shift, 0, exec, ~/.config/eww/scripts/swapws $(hyprctl activeworkspace -j | gojq '.id') 10
bind = , 1, workspace, 1
bind = , 2, workspace, 2
bind = , 3, workspace, 3
bind = , 4, workspace, 4
bind = , 5, workspace, 5
bind = , 6, workspace, 6
bind = , 7, workspace, 7
bind = , 8, workspace, 8
bind = , 9, workspace, 9
bind = , 0, workspace, 10
bind = , Escape, exec, notify-send 'Edit mode disabled' 'Continue to use your device normally' -a 'Edit mode' &
bind = , Escape, submap, reset
submap = reset
#############################
################################### eww keybinds: end #################################
## Testing
bind = SuperAlt, f12, exec, notify-send "Test notification" "$(hyprctl version | head -1)" -a 'Hyprland keybind'
bind = SuperAlt, Equal, exec, notify-send "Urgent notification" "Ah hell no" -u critical -a 'Hyprland keybind'
############################ Keybinds for Hyprland ############################
# Swap windows
bind = SuperShift, left, movewindow, l
bind = SuperShift, right, movewindow, r
bind = SuperShift, up, movewindow, u
bind = SuperShift, down, movewindow, d
# Move focus
bind = Super, left, movefocus, l
bind = Super, right, movefocus, r
bind = Super, up, movefocus, u
bind = Super, down, movefocus, d
bind = Super, BracketLeft, movefocus, l
bind = Super, BracketRight, movefocus, r
# Workspace, window, tab switch with keyboard
bind = ControlSuper, right, workspace, +1
bind = ControlSuper, left, workspace, -1
bind = ControlSuper, BracketLeft, workspace, -1
bind = ControlSuper, BracketRight, workspace, +1
bind = ControlSuper, up, workspace, -5
bind = ControlSuper, down, workspace, +5
bind = Super, Page_Down, workspace, +1
bind = Super, Page_Up, workspace, -1
bind = ControlSuper, Page_Down, workspace, +1
bind = ControlSuper, Page_Up, workspace, -1
bind = SuperAlt, Page_Down, movetoworkspace, +1
bind = SuperAlt, Page_Up, movetoworkspace, -1
bind = SuperShift, Page_Down, movetoworkspace, +1
bind = SuperShift, Page_Up, movetoworkspace, -1
bind = ControlSuperShift, Right, movetoworkspace, +1
bind = ControlSuperShift, Left, movetoworkspace, -1
bind = SuperShift, mouse_down, movetoworkspace, -1
bind = SuperShift, mouse_up, movetoworkspace, +1
bind = SuperAlt, mouse_down, movetoworkspace, -1
bind = SuperAlt, mouse_up, movetoworkspace, +1
# Window split ratio
binde = Super, Minus, splitratio, -0.1
binde = Super, Equal, splitratio, 0.1
binde = Super, Semicolon, splitratio, -0.1
binde = Super, Apostrophe, splitratio, 0.1
# Fullscreen
bind = Super, F, fullscreen, 0
bind = Super, D, fullscreen, 1
bind = Super_Alt, F, fakefullscreen, 0
# Switching
bind = Super, 1, workspace, 1
bind = Super, 2, workspace, 2
bind = Super, 3, workspace, 3
bind = Super, 4, workspace, 4
bind = Super, 5, workspace, 5
bind = Super, 6, workspace, 6
bind = Super, 7, workspace, 7
bind = Super, 8, workspace, 8
bind = Super, 9, workspace, 9
bind = Super, 0, workspace, 10
bind = Super, S, togglespecialworkspace,
bind = ControlSuper, S, togglespecialworkspace,
bind = Alt, Tab, cyclenext
bind = Alt, Tab, bringactivetotop, # bring it to the top
# Move window to workspace Super + Alt + [0-9]
bind = Super Alt, 1, movetoworkspacesilent, 1
bind = Super Alt, 2, movetoworkspacesilent, 2
bind = Super Alt, 3, movetoworkspacesilent, 3
bind = Super Alt, 4, movetoworkspacesilent, 4
bind = Super Alt, 5, movetoworkspacesilent, 5
bind = Super Alt, 6, movetoworkspacesilent, 6
bind = Super Alt, 7, movetoworkspacesilent, 7
bind = Super Alt, 8, movetoworkspacesilent, 8
bind = Super Alt, 9, movetoworkspacesilent, 9
bind = Super Alt, 0, movetoworkspacesilent, 10
bind = ControlShiftSuper, Up, movetoworkspacesilent, special
bind = SuperAlt, S, movetoworkspacesilent, special
# Scroll through existing workspaces with (Control) + Super + scroll
bind = Super, mouse_up, workspace, +1
bind = Super, mouse_down, workspace, -1
bind = ControlSuper, mouse_up, workspace, +1
bind = ControlSuper, mouse_down, workspace, -1
# Move/resize windows with Super + LMB/RMB and dragging
bindm = Super, mouse:272, movewindow
bindm = Super, mouse:273, resizewindow
bindm = Super, mouse:274, movewindow
bindm = Super, Z, movewindow
bind = ControlSuper, Backslash, resizeactive, exact 640 480