$mainMod = SUPER
$secMod = SUPER SHIFT
$terminal = kitty
$fileManager = thunar
$menu = walker
$menuLauncher = ~/.config/rofi/launchers/type-2/launcher.sh

# System
bind = $mainMod, F4, exec, wlogout -l ~/.config/wlogout/layout -s ~/.config/wlogout/style.css -b 4 -T 350 -B 350
bind = $mainMod, Q, exec, $terminal
bind = $mainMod, C, killactive,
bind = $mainMod, M, exec, command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch exit
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, L, exec, hyprlock

# Windows
bind = $secMod, V, togglefloating
bind = $mainMod, F11, fullscreen, 0
bind = $mainMod, T, layoutmsg, togglesplit
bind = $secMod, right, movewindow, r
bind = $secMod, left, movewindow, l
bind = $secMod, up, movewindow, u
bind = $secMod, down, movewindow, d
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

# Applications
bind = $mainMod, F, exec, firefox
bind = $mainMod, S, exec, spotify
bind = $mainMod, N, exec, swaync-client -t -sw
bind = $secMod, N, exec, swaync-cleint --close-all
bind = ALT, SPACE, exec, $menu
bind = $mainMod, V, exec, walker --provider clipboard
bind = ALT, Tab, exec, hyprswitch gui --mod-key=alt --key=tab --close=mod-key-release --reverse-key=mod=shift

# Screenshots
bind = $secMod, S, exec, hyprshot -m region -z

# Screen recording
bind = $mainMod, R, exec, notify-send "Recording Started" "Screen recording has started, Press Super + Shift + R to end it."; wf-recorder -f ~/Videos/$(date +%Y%m%d_%H%M%S).mp4 -g "$(slurp)"
bind = $mainMod SHIFT, R, exec, pkill -INT wf-recorder && notify-send "Recording Saved" "Screen recording saved to ~/Videos/"
bind = ALT, E, exec, killall -SIGUSR1 gpu-screen-recorder && notify-send "Replay Saved" "Clip dumped to ~/Videos/Replays"

# Audio
bind = , XF86AudioPlay, exec, playerctl play-pause
bind = , XF86AudioNext, exec, playerctl next
bind = , XF86AudioPrev, exec, playerctl previous
bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bind = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bind = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+

# Display
bind = , XF86MonBrightnessDown, exec, brightnessctl set 5%-
bind = , XF86MonBrightnessUp, exec, brightnessctl set 5%+

# Opacity
bind = $secMod, mouse_down, exec, ~/.config/hypr/scripts/opacity.sh decrease
bind = $secMod, mouse_up, exec, ~/.config/hypr/scripts/opacity.sh increase

# Touchpad
bind = , XF86TouchpadToggle, exec, hyprctl keyword input:touchpad:enabled toggle

# Switch to workspace
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

# Move window to workspace
bind = $secMod, 1, movetoworkspace, 1
bind = $secMod, 2, movetoworkspace, 2
bind = $secMod, 3, movetoworkspace, 3
bind = $secMod, 4, movetoworkspace, 4
bind = $secMod, 5, movetoworkspace, 5
bind = $secMod, 6, movetoworkspace, 6

# Next/previous workspace on focused monitor
bind = $mainMod, mouse_up, workspace, m+1
bind = $mainMod, mouse_down, workspace, m-1
bind = $mainMod, bracketright, exec, ~/.config/hypr/workspace_next.sh
bind = $mainMod, bracketleft, exec, ~/.config/hypr/workspace_prev.sh

# Pin workspaces to monitors (uncomment to use)
#workspace = 1, monitor:DP-1
#workspace = 2, monitor:DP-1
#workspace = 3, monitor:DP-1
#workspace = 1, monitor:HDMI-A-1
#workspace = 2, monitor:HDMI-A-1
#workspace = 3, monitor:HDMI-A-1
#workspace = 4, monitor:eDP-2
#workspace = 5, monitor:eDP-2
#workspace = 6, monitor:eDP-2
#monitor = DP-1, 1920x1080@60, 0x0, 1
#monitor = eDP-2, 2560x1600@144, 0x1080, 1.67
#monitor = eDP-2, disable
