dots-hyprland/.config/hypr/keybinds.conf

190 lines
8.6 KiB
Text

#################### 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%-
# Brightness
# bindle=, XF86MonBrightnessUp, exec, brightnessctl set '12.75+'
# bindle=, XF86MonBrightnessDown, exec, brightnessctl set '12.75-'
bindle=, XF86MonBrightnessUp, exec, ags run-js 'brightness.screen_value += 0.05;'
bindle=, XF86MonBrightnessDown, exec, ags run-js 'brightness.screen_value -= 0.05;'
#################################### Applications ###################################
# Apps: just normal apps
bind = Super, C, exec, code --password-store=gnome --enable-features=UseOzonePlatform --ozone-platform=wayland
bind = Super, T, exec, foot --override shell=fish
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
# Actions
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, Color picker, Clipboard history
bind = SuperShiftAlt, S, exec, grim -g $SLURP_COMMAND - | swappy -f -
bindl=,Print,exec,grim - | wl-copy
bind = SuperShift, S, exec, grim -g $SLURP_COMMAND - | wl-copy
bind = SuperAlt, R, exec, ~/.config/ags/scripts/record-script.sh
bind = ControlAlt, R, exec, ~/.config/ags/scripts/record-script.sh --fullscreen
bind = SuperShiftAlt, R, exec, ~/.config/ags/scripts/record-script.sh --fullscreen-sound
bind = SuperShift, C, exec, hyprpicker -a
bind = Super, V, exec, pkill fuzzel || cliphist list | fuzzel --no-fuzzy --dmenu | cliphist decode | wl-copy
# Text-to-image
# Normal
bind = ControlSuperShift,S,exec,grim -g $SLURP_COMMAND "tmp.png" && tesseract "tmp.png" - | wl-copy && rm "tmp.png"
# English
bind = SuperShift,T,exec,grim -g $SLURP_COMMAND "tmp.png" && tesseract -l eng "tmp.png" - | wl-copy && rm "tmp.png"
# Japanese
bind = SuperShift,J,exec,grim -g $SLURP_COMMAND "tmp.png" && tesseract -l jpn "tmp.png" - | wl-copy && rm "tmp.png"
# Media
bind = SuperShift, N, exec, playerctl next || playerctl position `bc <<< "100 * $(playerctl metadata mpris:length) / 1000000 / 100"`
bindl= ,XF86AudioNext, 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
bind = ,XF86AudioPlay, exec, playerctl play-pause
#Lock screen | blur: --effect-blur=20x202
bind = Super, L, exec, swaylock
bind = SuperShift, L, exec, swaylock
bindl = SuperShift, L, exec, sleep 0.1 && systemctl suspend
# App launcher
bind = ControlSuper, Slash, exec, pkill anyrun || anyrun
###################################### AGS keybinds #####################################
bindr = ControlSuper, R, exec, killall ags activewin.sh activews.sh gohypr bash ydotool; ags &
bindr = ControlSuperAlt, R, exec, hyprctl reload; killall ags activewin.sh activews.sh gohypr bash ydotool; ags &
bind = ControlSuper, T, exec, ~/.config/ags/scripts/color_generation/switchwall.sh
bindir = Super, Super_L, exec, ags -t 'overview'
bind = Super, Tab, exec, ags -t 'overview'
bind = Super, Slash, exec, ags -t 'cheatsheet'
bind = Super, B, exec, ags -t 'sideleft'
bind = Super, A, exec, ags -t 'sideleft'
bind = Super, O, exec, ags -t 'sideleft' # blame osu for this keybinding
bind = Super, N, exec, ags -t 'sideright'
bind = Super, M, exec, ags run-js 'openMusicControls.value = (!Mpris.getPlayer() ? false : !openMusicControls.value);'
bind = Super, Comma, exec, ags run-js 'openColorScheme.value = true; Utils.timeout(2000, () => openColorScheme.value = false);'
bind = Super, K, exec, ags -t 'osk'
bind = ControlAlt, Delete, exec, ags -t 'session'
bindle = , XF86AudioRaiseVolume, exec, ags run-js 'indicator.popup(1);'
bindle = , XF86AudioLowerVolume, exec, ags run-js 'indicator.popup(1);'
bindle = , XF86MonBrightnessUp, exec, ags run-js 'indicator.popup(1);'
bindle = , XF86MonBrightnessDown, exec, ags run-js 'indicator.popup(1);'
###################################### Plugins #########################################
bind = ControlSuper, P, exec, hyprctl plugin load "~/.config/hypr/plugins/droidbars.so"
bind = ControlSuper, O, exec, hyprctl plugin unload "~/.config/hypr/plugins/droidbars.so"
## Testing
# bind = SuperAlt, f12, exec, notify-send "Hyprland version: $(hyprctl version | head -2 | tail -1 | cut -f2 -d ' ')" "owo" -a 'Hyprland keybind'
bind = SuperAlt, f12, exec, notify-send "Millis since epoch" "$(date +%s%N | cut -b1-13)" -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
bind = SuperAlt, J, exec, ydotool key 105:1 105:0