# Special workspace keybinds
bind = $mainMod, Z, togglespecialworkspace, quick
bind = $mainMod SHIFT, Z, movetoworkspace, special:quick

bind = $mainMod, GRAVE, togglespecialworkspace, music
bind = $mainMod SHIFT, GRAVE, movetoworkspace, special:music

# Hot reload
bind = $mainMod SHIFT, B, exec, bash ~/config/scripts/hot-reload.sh

# Wallpaper
bind = $mainMod SHIFT, RETURN, exec, pkill wofi || bash ~/config/scripts/select-wallpaper.sh

# Screenshot keybinds
bind = $mainMod, PRINT, exec, bash ~/config/scripts/screenshot-selection.sh
bind = $mainMod SHIFT, PRINT, exec, bash ~/config/scripts/screenshot-fullscreen.sh
bind = $mainMod CTRL SHIFT, PRINT, exec, bash ~/config/scripts/edit-last-screenshot.sh

# Global shit
bind = ALT, F9, pass, class:^(com\.obsproject\.Studio)$

# Music volume control
bindl = $mainMod, XF86AudioRaiseVolume, exec, playerctl -p chromium,cmus,elisa,cider,spotify,OCbwoy3_s_iPhone,OCbwoy3__s_iPhone,OCbwoy3___s_iPhone volume 0.02+
bindl = $mainMod, XF86AudioLowerVolume, exec, playerctl -p chromium,cmus,elisa,cider,spotify,OCbwoy3_s_iPhone,OCbwoy3__s_iPhone,OCbwoy3___s_iPhone volume 0.02-

# Screen locker and logout keybinds
bind = CTRL ALT, DELETE, exec, wlogout
bindl = SUPER SHIFT, L, exec, pkill -USR1 hyprlock || hyprlock

# Group Stuff, complicated stuff. Enable if you dare!
# bind = SUPER, M, togglegroup
# bind = SUPER ALT, M, lockactivegroup, toggle
# bind = $mainMod ALT, right, changegroupactive, f
# bind = $mainMod ALT, down, changegroupactive, b
# bind = $mainMod ALT, up, moveoutofgroup
# bind = $mainMod CTRL ALT, left, moveintogroup, l
# bind = $mainMod CTRL ALT, right, moveintogroup, r
# bind = $mainMod CTRL ALT, up, moveintogroup, u
# bind = $mainMod CTRL ALT, down, moveintogroup, d

# zoom
bind = $mainMod SHIFT CTRL, mouse_down, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor * 1.25}')"
bind = $mainMod SHIFT CTRL, mouse_up, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor / 1.25}')"

bind = $mainMod SHIFT, M, exec, bun run $HOME/config/scripts/bin/r2Upload.ts
bind = $mainMod, F1, exec, bash $HOME/config/scripts/roblox-fullscreen.sh
bind = $mainMod, F2, exec, bash -c "xdg-open roblox://"
bind = $mainMod, F5, exec, notify-send -u critical "Hyprland" "Enabled debug overlay" && hyprctl keyword debug:overlay 1
# bind = $mainMod SHIFT, F3, exec, bash -c "NIXPKGS_ALLOW_UNFREE=1 nix-shell -p osu-lazer-bin --command osu\!"

bind = $mainMod CTRL SHIFT, F9, exec, pkill wofi || bash $HOME/config/scripts/open-game.sh

bind = $mainMod SHIFT, F, fullscreen, 1
bind = $mainMod, SPACE, exec, bash $HOME/config/scripts/toggle-language.sh

# VM Passtrough
bind = $mainMod, Insert, submap, passthru
submap = passthru
bind = $mainMod, Escape, submap, reset
submap = reset
