# Keybindings
$mainMod = SUPER

# General
bind = $mainMod, P, pseudo,
bind = $mainMod, DELETE, exit,
bind = $mainMod, C, killactive,
bind = $mainMod, M, fullscreen,
bind = $mainMod, S, togglesplit,
bind = $mainMod, F, togglefloating,
bind = $mainMod, O, exec, hyprlock
bind = $mainMod, F4, exec, ags -t powermenu
bind = $mainMod, SPACE, exec, ags -t launcher
bind = $mainMod, TAB, exec, ags -t overview
bind = $mainMod, V, exec, ags -t clipboard
bind = $mainMod, COMMA, exec, ags -t symbols
bind = $mainMod SHIFT, S, exec, grimblast --freeze copy area
bind = $mainMod CTRL, S, exec, grimblast --freeze copysave area ~/Pictures/Screenshots/"$(date --rfc-3339=seconds)".png

# Media keys
bind = , XF86AudioNext, exec, playerctl next
bind = , XF86AudioPrev, exec, playerctl previous 
bind = , XF86AudioPlay, exec, playerctl play
bind = , XF86AudioPause, exec, playerctl pause
bind = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
bind = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle
binde = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_SINK@ 5%+
binde = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_SINK@ 5%-
binde = , XF86MonBrightnessDown, exec, brightnessctl set 5%-
binde = , XF86MonBrightnessUp, exec, brightnessctl set 5%+
#bind = , XF86PowerOff, exec, systemctl shutdown

# Applications
bind = $mainMod, T, exec, alacritty
bind = $mainMod, E, exec, nemo
bind = $mainMod, G, exec, ags -t calc
bind = CTRL SHIFT, ESCAPE, exec, alacritty -e btop

# Move focus
bind = $mainMod, left, movefocus, l
bind = $mainMod, H, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, L, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, K, movefocus, u
bind = $mainMod, down, movefocus, d
bind = $mainMod, J, movefocus, d

# Scrachtpad
bind = $mainMod CTRL, 2, togglespecialworkspace,
bind = $mainMod CTRL, 1, movetoworkspace, special

# Move window
bind = $mainMod SHIFT, left, movewindow, l
bind = $mainMod SHIFT, H, movewindow, l
bind = $mainMod SHIFT, right, movewindow, r
bind = $mainMod SHIFT, L, movewindow, r
bind = $mainMod SHIFT, up, movewindow, u
bind = $mainMod SHIFT, K, movewindow, u
bind = $mainMod SHIFT, down, movewindow, d
bind = $mainMod SHIFT, J, movewindow, d
bindm = $mainMod, mouse:272, movewindow

# Resize windows
binde = $mainMod CTRL, left, resizeactive, -20 0
binde = $mainMod CTRL, h, resizeactive, -20 0
binde = $mainMod CTRL, right, resizeactive, 20 0
binde = $mainMod CTRL, l, resizeactive, 20 0
binde = $mainMod CTRL, up, resizeactive, 0 -20
binde = $mainMod CTRL, k, resizeactive, 0 -20
binde = $mainMod CTRL, down, resizeactive, 0 20
binde = $mainMod CTRL, j, resizeactive, 0 20
bindm = $mainMod, mouse:273, resizewindow

# Move active window to a workspace
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 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

# Switch workspaces
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10

# Scroll through existing workspaces
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
