# App launching
bind = $mod, Return, exec, $terminal
bind = $mod SHIFT, Return, exec, $browser
bind = $mod, a, exec, $audio
bind = $mod, n, exec, $networking
bind = $mod, b, exec, $bluetooth
bind = $mod, p, exec, $display
bind = $mod, d, exec, $menu
bind = $mod, escape, exec, $lock

bind = CTRL, Print, exec,  ~/.config/hypr/scripts/recording.sh
bind = , Print, exec, mkdir -p ~/Pictures/Screenshots && grim -t ppm -o "$(hyprctl activeworkspace -j | jq -r '.monitor')" - | satty -f - -o ~/Pictures/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png


bind = $mod, Q, killactive
bind = $mod, F, fullscreen
bind = $mod SHIFT, E, exit
bind = $mod, Space, togglefloating

# App moving
bind = $mod, h, movefocus, l
bind = $mod, l, movefocus, r
bind = $mod, k, movefocus, u
bind = $mod, j, movefocus, d

bind = $mod SHIFT, h, movewindow, l
bind = $mod SHIFT, l, movewindow, r
bind = $mod SHIFT, k, movewindow, u
bind = $mod SHIFT, j, movewindow, d

# App resizing
bind = $mod, R, submap, resize
submap = resize
binde = , h, resizeactive, -10 0
binde = , l, resizeactive, 10 0
binde = , k, resizeactive, 0, -10
binde = , j, resizeactive, 0, 10
bind = $mod, R, submap, reset
bind = , Return, submap, reset
bind = , escape, submap, reset
submap = reset

# Workspaces
bind = $mod, 1, workspace, 1
bind = $mod, 2, workspace, 2
bind = $mod, 3, workspace, 3
bind = $mod, 4, workspace, 4
bind = $mod, 5, workspace, 5
bind = $mod, 6, workspace, 6
bind = $mod, 7, workspace, 7
bind = $mod, 8, workspace, 8
bind = $mod, 9, workspace, 9
bind = $mod, 0, workspace, 10

bind = $mod SHIFT, 1, movetoworkspace, 1
bind = $mod SHIFT, 2, movetoworkspace, 2
bind = $mod SHIFT, 3, movetoworkspace, 3
bind = $mod SHIFT, 4, movetoworkspace, 4
bind = $mod SHIFT, 5, movetoworkspace, 5
bind = $mod SHIFT, 6, movetoworkspace, 6
bind = $mod SHIFT, 7, movetoworkspace, 7
bind = $mod SHIFT, 8, movetoworkspace, 8
bind = $mod SHIFT, 9, movetoworkspace, 9
bind = $mod SHIFT, 0, movetoworkspace, 10

## TODO: changeme scratchpad
bind = $mod, S, togglespecialworkspace, magic
bind = $mod SHIFT, S, movetoworkspace, special:magic

# Mouse bindings
bind = $mod, mouse_down, workspace, e+1
bind = $mod, mouse_up, workspace, e-1
bindm = $mod, mouse:272, movewindow
bindm = $mod, mouse:273, resizewindow

# Laptop multimedia keys for volume and LCD brightness
bind   = ,XF86AudioMedia, exec, ~/.config/hypr/scripts/switch_powerprofiles.sh toggle
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+
bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-

# Playback
bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous

