### Sway Config
include ~/.config/sway/noctalia

set $mod Mod4

### Applications
set $term alacritty
set $editor nvim
set $filemanager thunar

### Outputs
output HDMI-A-1 scale 1.21

### Appearance
seat seat0 xcursor_theme oreo_white_cursors 28
corner_radius 10
default_border pixel 4
default_floating_border pixel 4
gaps inner 8
gaps outer 0
focus_follows_mouse yes

### Workspaces
workspace 1
workspace 2
workspace 3
workspace 4
workspace 5

### Window behaviour
floating_modifier $mod

### Focus movement
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right

### Move windows
bindsym $mod+Ctrl+h move left
bindsym $mod+Ctrl+j move down
bindsym $mod+Ctrl+k move up
bindsym $mod+Ctrl+l move right

### Resize
mode "resize" {
    bindsym h resize shrink width 20px
    bindsym j resize grow height 20px
    bindsym k resize shrink height 20px
    bindsym l resize grow width 20px
    bindsym Return mode "default"
    bindsym Escape mode "default"
}
bindsym $mod+Shift+r mode "resize"

### Split orientation
bindsym $mod+v splitv
bindsym $mod+b splith

### Layout
bindsym $mod+w layout toggle split
bindsym $mod+Shift+space layout default

### Fullscreen / floating / maximize
bindsym $mod+f fullscreen toggle
bindsym $mod+Ctrl+space floating toggle
bindsym $mod+m fullscreen disable, floating disable

### Kill window
bindsym $mod+q kill

### Window cycling
bindsym $mod+Tab focus next

### Workspace switching
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5

### Move container to workspace
bindsym $mod+Ctrl+1 move container to workspace number 1
bindsym $mod+Ctrl+2 move container to workspace number 2
bindsym $mod+Ctrl+3 move container to workspace number 3
bindsym $mod+Ctrl+4 move container to workspace number 4
bindsym $mod+Ctrl+5 move container to workspace number 5

### Floating rules
for_window [app_id="pavucontrol"] floating enable
for_window [app_id="blueman-manager"] floating enable
for_window [title="Event Tester"] floating enable

### Launchers / apps
set $ipc noctalia msg
bindsym $mod+Return exec $term
bindsym $mod+e exec $filemanager
# bindsym $mod+t exec $term

# Noctalia Settings
bindsym $mod+s exec $ipc settings-toggle

# Noctalia Panels
bindsym $mod+space exec $ipc panel-toggle launcher
bindsym $mod+n exec $ipc panel-toggle control-center
bindsym $mod+c exec $ipc panel-toggle clipboard
bindsym $mod+grave exec $ipc panel-toggle session

### Screenshot
bindsym $mod+Ctrl+p exec grimshot save area

### Audio keys
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +2%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -2%
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle

### Mouse bindings
bindsym --whole-window $mod+Button1 move
bindsym --whole-window $mod+Button3 resize

### Reload
bindsym $mod+Ctrl+r reload

### Startup
exec pgrep -x noctalia >/dev/null || noctalia
exec pipewire
exec snixembed --fork
