# Same spirit as desktop; laptop gets brightness keys too

$mainMod = SUPER

# App commands (match desktop stack)
$terminal     = uwsm app -- kitty
$fileManager  = uwsm app -- nautilus
$launcher     = uwsm app -- sherlock
$uuctl        = uwsm app -- uuctl wofi -d
$emote        = uwsm app -- emote
$notcenter    = uwsm app -- swaync-client -t -sw
$notdnd       = uwsm app -- swaync-client -d
$nothide      = uwsm app -- swaync-client --hide-latest
$notclose     = uwsm app -- swaync-client --close-latest
$notcloseall  = uwsm app -- swaync-client --close-all
$lockcmd      = hyprlock

# Layout / groups (like desktop)
bind = $mainMod, P, pseudo,
bind = $mainMod, J, togglesplit,
bind = $mainMod SHIFT, J, swapsplit,
bind = $mainMod SHIFT, T, togglegroup,
bind = $mainMod, T, changegroupactive,
bind = $mainMod, F, fullscreen,
bind = $mainMod, V, togglefloating,

# Window move (match desktop)
bind = $mainMod ALT_L, H, movewindoworgroup, l
bind = $mainMod ALT_L, J, movewindoworgroup, d
bind = $mainMod ALT_L, K, movewindoworgroup, u
bind = $mainMod ALT_L, L, movewindoworgroup, r

# Usability
bind = $mainMod SHIFT, Q, killactive,
bind = $mainMod, L, exec, $lockcmd
bind = $mainMod, M, exit,

# Apps
bind = $mainMod, return, exec, $terminal
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, D, exec, $launcher
bind = $mainMod SHIFT, D, exec, $uuctl
bind = $mainMod, PERIOD, exec, $emote
bind = $mainMod, F12, exec, pkill -SIGUSR2 waybar


# SwayNC controls
bind = $mainMod, Grave, exec, $notcenter
bind = $mainMod SHIFT, Grave, exec, $notdnd
bind = $mainMod, A, exec, $nothide
bind = $mainMod SHIFT, A, exec, $notclose
bind = $mainMod CTRL, A, exec, $notcloseall

# Screenshots (use your Satty build like desktop)
#bind = ALT SHIFT, 3, exec, GRIMBLAST_EDITOR="satty -f" grimblast --notify edit output
#bind = ALT SHIFT, 4, exec, GRIMBLAST_EDITOR="satty -f" grimblast --notify edit area

bind = ALT SHIFT, 3, exec, grim ~/Pictures/screenshot-$(date + '%F_%T').png
bind = ALT SHIFT, 4, exec, grim -g "$(slurp)" ~/Pictures/screenshot-$(date + '%F_%T').png
bind = ALT SHIFT, 5, exec, pkill -f wf-recorder || wf-recorder -g "$(slurp)" -f ~/Videos/recording-$(date + '%F_%T').mp4
bind = CTRL ALT SHIFT, 5, exec, pkill -f wf-recorder 

# Focus / move (arrows like desktop)
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, 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

# Workspaces (match numbering)
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

# Move to workspaces
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

# Gestures
gesture = 3, horizontal, workspace
gesture = 3, down, mod: ALT, close
gesture = 3, up, mod: SUPER, scale: 1.5, fullscreen
gesture = 3, left, mod: SUPER, scale: 1.5, float

# Drag move/resize like desktop
bindm = $mainMod SHIFT, mouse:272, movewindow
bindm = $mainMod SHIFT, mouse:273, resizewindow

# Audio via PipeWire ctl (desktop style)
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous
bindl = , XF86AudioNext, exec, playerctl next

# SwayOSD feedback (same as PC)
bindel = , XF86AudioRaiseVolume, exec, swayosd-client --output-volume raise
bindel = , XF86AudioLowerVolume, exec, swayosd-client --output-volume lower
bindel = , XF86AudioMute,        exec, swayosd-client --output-volume mute-toggle
bindel = , XF86AudioMicMute,     exec, swayosd-client --input-volume  mute-toggle

# Brightness (laptop useful)
bindel = , XF86MonBrightnessUp,   exec, swayosd-client --brightness raise
bindel = , XF86MonBrightnessDown, exec, swayosd-client --brightness lower

