$mainMod = SUPER

# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, kitty
bind = $mainMod, C, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, E, exec, thunar
bind = $mainMod SHIFT, V, togglefloating,
bind = $mainMod, R, exec, rofi -show drun
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, T, togglesplit, # dwindle
bind = $mainMod, F, fullscreen, 1
bind = $mainMod SHIFT, F, fullscreen, 0
bind = $mainMod, V, exec, rofi -modi clipboard:/$HOME/.config/rofi/cliphist-rofi-img.sh -show clipboard -show-icon -config $HOME/.config/rofi/clipboard-config.rasi
bind = $mainMod SHIFT, S, exec, IMG=~/Pictures/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).png && grim -g "$(slurp)" $IMG && wl-copy < $IMG
bind = , PRINT, exec, grim - | wl-copy
bind = CONTROL, ESCAPE, exec, kitty btop

# hyprlock bind
bind = $mainMod, code:49, exec, hyprlock

# waybar bind
bindr = $mainMod, w, exec, pkill -9 waybar || uwsm app -- waybar

# multimedia binds
binde = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1.0;  .config/hypr/scripts/dunst/volume.sh
binde = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 0.0;  .config/hypr/scripts/dunst/volume.sh
bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; .config/hypr/scripts/dunst/volumemute.sh
bind = , XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle; .config/hypr/scripts/dunst/micro.sh
bind = , XF86AudioStop, exec, playerctl stop
bind = , XF86AudioPause, exec, playerctl pause
bind = , XF86AudioPrev, exec, playerctl previous; .config/hypr/scripts/dunst/trackinfo.sh
bind = , XF86AudioNext, exec, playerctl next; .config/hypr/scripts/dunst/trackinfo.sh
bind = , XF86AudioPlay, exec, playerctl play-pause

# brightness binds
bind = , XF86KbdBrightnessUp, exec, brightnessctl --device='asus::kbd_backlight' set 1+
bind = , XF86KbdBrightnessDown, exec, brightnessctl --device='asus::kbd_backlight' set 1-
binde = , XF86MonBrightnessUp , exec, brightnessctl --class='backlight' set 5%+; .config/hypr/scripts/dunst/eDP-1brightness.sh
binde = , XF86MonBrightnessDown , exec, brightnessctl --class='backlight' set 5%-; .config/hypr/scripts/dunst/eDP-1brightness.sh
bind = $mainMod ALT, up, exec, ddcutil -d 1 setvcp 10 + 5; .config/hypr/scripts/dunst/brightness.sh
bind = $mainMod ALT, down, exec, ddcutil -d 1 setvcp 10 - 5; .config/hypr/scripts/dunst/brightness.sh

# power binds
bindl = , switch:off:Lid Switch, exec, hyprctl keyword monitor "eDP-1, 1920x1080@120, 0x0, 1, vrr, 1"
bindl = , switch:on:Lid Switch, exec, .config/hypr/scripts/eDPower.sh
bind = , XF86PowerOff, exec, systemctl suspend

# Move focus with mainMod + arrow keys
bind = $mainMod, H, movefocus, l
bind = $mainMod, L, movefocus, r
bind = $mainMod, K, movefocus, u
bind = $mainMod, J, movefocus, d

bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d

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 = $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, TAB, cyclenext

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

# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod SHIFT, mouse:272, resizewindow
bindm = $mainMod, mouse:273, resizewindow

# Switch workspaces
bind = $mainMod, A, focusworkspaceoncurrentmonitor, r-1
bind = $mainMod, D, focusworkspaceoncurrentmonitor, r+1

# Move active window to the next or previous workspace
bind = $mainMod SHIFT, A, movetoworkspace, r-1
bind = $mainMod SHIFT, D, movetoworkspace, r+1

# Swap worlspaces between monitors
bind = $mainMod, TAB, swapactiveworkspaces, 1 0 

# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, focusworkspaceoncurrentmonitor, 1
bind = $mainMod, 2, focusworkspaceoncurrentmonitor, 2
bind = $mainMod, 3, focusworkspaceoncurrentmonitor, 3
bind = $mainMod, 4, focusworkspaceoncurrentmonitor, 4
bind = $mainMod, 5, focusworkspaceoncurrentmonitor, 5
bind = $mainMod, 6, focusworkspaceoncurrentmonitor, 6
bind = $mainMod, 7, focusworkspaceoncurrentmonitor, 7
bind = $mainMod, 8, focusworkspaceoncurrentmonitor, 8
bind = $mainMod, 9, focusworkspaceoncurrentmonitor, 9
bind = $mainMod, 0, focusworkspaceoncurrentmonitor, 0

# Move active window to a workspace with mainMod + SHIFT + [0-9]
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, 0
