vitorpy's Dotfiles

Fix and polish Sway configuration

Major fixes:
- Fixed double waybar issue (changed exec_always to exec)
- Removed vim key bindings that conflicted with lock screen (Mod+L)
- Added Ghostty window decorations (border normal)
- Added mako notification daemon with Zenburn theme
- Fixed workspace gesture behavior to auto-create workspaces

New scripts:
- workspace-swipe.sh: Auto-creates workspaces when swiping
- next_free_ws.sh: Moves window to next free workspace (Mod+Shift+M)

Gesture improvements:
- Updated libinput-gestures to use workspace-swipe.sh
- 3-finger swipe now creates new workspaces seamlessly

Packages added:
- mako (notification daemon for Sway)

Config changes:
- Sway autostart now includes mako
- Mako configured with Zenburn colors matching theme
- Fixed all keybinding conflicts

+104 -31
+3 -3
private_dot_config/libinput-gestures.conf
··· 1 1 # libinput-gestures configuration for Sway 2 2 # Minimal gesture support 3 3 4 - # 3-finger horizontal swipe: switch workspaces 5 - gesture swipe right 3 swaymsg workspace prev 6 - gesture swipe left 3 swaymsg workspace next 4 + # 3-finger horizontal swipe: switch workspaces (auto-creates new ones) 5 + gesture swipe right 3 ~/.config/sway/workspace-swipe.sh prev 6 + gesture swipe left 3 ~/.config/sway/workspace-swipe.sh next 7 7 8 8 # 3-finger up: workspace overview (Sway doesn't have built-in expo view) 9 9 # Uncomment if you install a workspace switcher like swayr
+46
private_dot_config/mako/config
··· 1 + # Mako notification daemon configuration - Zenburn theme 2 + 3 + # Positioning 4 + anchor=top-right 5 + margin=20 6 + padding=15 7 + 8 + # Appearance 9 + width=350 10 + height=150 11 + border-size=2 12 + border-radius=10 13 + 14 + # Colors (Zenburn) 15 + background-color=#3f3f3f 16 + text-color=#dcdccc 17 + border-color=#8faf9f 18 + 19 + # Progress bar 20 + progress-color=over #8faf9f 21 + 22 + # Font 23 + font=Noto Sans 11 24 + 25 + # Timeout (milliseconds) 26 + default-timeout=5000 27 + ignore-timeout=0 28 + 29 + # Icons 30 + icons=1 31 + max-icon-size=48 32 + icon-path=/usr/share/icons/Yaru 33 + 34 + # Grouping 35 + group-by=app-name 36 + 37 + # Do Not Disturb mode 38 + [mode=dnd] 39 + invisible=1 40 + 41 + # Urgency overrides 42 + [urgency=low] 43 + border-color=#7f9f7f 44 + 45 + [urgency=critical] 46 + border-color=#cc9393
+1
private_dot_config/private_arch/packages.txt
··· 61 61 swaybg | pacman 62 62 xdg-desktop-portal-wlr | pacman 63 63 libinput-gestures | aur 64 + mako | pacman 64 65 65 66 # Note: hyprcorners needs to be installed via cargo: 66 67 # cargo install hyprcorners
+10 -28
private_dot_config/private_sway/config
··· 11 11 set $menu wofi --show drun 12 12 set $browser firefox 13 13 14 - # Directions (vim-style) 15 - set $left h 16 - set $down j 17 - set $up k 18 - set $right l 19 - 20 14 ### Output configuration (Monitors) 21 15 # See `man 5 sway-output` for more information 22 16 output DP-3 mode 3840x2160@60Hz pos 0 0 scale 1 ··· 90 84 for_window [app_id="org.gnome.*"] border pixel 0 91 85 for_window [app_id="org.telegram.desktop.*"] border pixel 0 92 86 for_window [class="codium"] border pixel 0 93 - for_window [app_id="com.mitchellh.ghostty"] border pixel 0 94 87 for_window [class="Jan"] border pixel 0 88 + 89 + # Ghostty with decorations (title bar) 90 + for_window [app_id="com.mitchellh.ghostty"] border normal 95 91 96 92 # Fix for dragging XWayland windows 97 93 for_window [shell="xwayland"] title_format "%title [XWayland]" ··· 127 123 # Exit sway 128 124 bindsym $mod+m exec swaynag -t warning -m 'Exit Sway?' -B 'Yes' 'swaymsg exit' 129 125 130 - # Move focus 126 + # Move focus with arrow keys 131 127 bindsym $mod+Left focus left 132 128 bindsym $mod+Down focus down 133 129 bindsym $mod+Up focus up 134 130 bindsym $mod+Right focus right 135 131 136 - # Alternative: vim keys 137 - bindsym $mod+$left focus left 138 - bindsym $mod+$down focus down 139 - bindsym $mod+$up focus up 140 - bindsym $mod+$right focus right 141 - 142 - # Move windows 132 + # Move windows with arrow keys 143 133 bindsym $mod+Shift+Left move left 144 134 bindsym $mod+Shift+Down move down 145 135 bindsym $mod+Shift+Up move up 146 136 bindsym $mod+Shift+Right move right 147 - 148 - # Alternative: vim keys 149 - bindsym $mod+Shift+$left move left 150 - bindsym $mod+Shift+$down move down 151 - bindsym $mod+Shift+$up move up 152 - bindsym $mod+Shift+$right move right 153 137 154 138 # Switch workspaces 155 139 bindsym $mod+1 workspace number 1 ··· 197 181 # Move between monitors 198 182 bindsym $mod+Shift+n move container to output right 199 183 bindsym $mod+Shift+p move container to output left 184 + 185 + # Move to next free workspace 186 + bindsym $mod+Shift+m exec ~/.config/sway/next_free_ws.sh 200 187 201 188 # Navigate workspaces on current output 202 189 bindsym $mod+Control+Left workspace prev_on_output ··· 209 196 bindsym Up resize shrink height 10px 210 197 bindsym Right resize grow width 10px 211 198 212 - # Vim keys 213 - bindsym $left resize shrink width 10px 214 - bindsym $down resize grow height 10px 215 - bindsym $up resize shrink height 10px 216 - bindsym $right resize grow width 10px 217 - 218 199 # Return to normal mode 219 200 bindsym Return mode "default" 220 201 bindsym Escape mode "default" ··· 240 221 bindsym XF86AudioPrev exec playerctl previous 241 222 242 223 ### Autostart applications 243 - exec_always --no-startup-id waybar 224 + exec --no-startup-id waybar 225 + exec --no-startup-id mako 244 226 exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 245 227 exec --no-startup-id dbus-update-activation-environment --all 246 228 exec --no-startup-id gnome-keyring-daemon --start --components=secrets,ssh,pkcs11
+27
private_dot_config/private_sway/executable_next_free_ws.sh
··· 1 + #!/usr/bin/env bash 2 + # Sway: Move window to next free workspace on current monitor 3 + 4 + # Get current output 5 + current_output=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused==true) | .name') 6 + 7 + # Get all workspaces on current output 8 + workspaces=$(swaymsg -t get_workspaces | jq -r --arg out "$current_output" \ 9 + '.[] | select(.output==$out) | .num') 10 + 11 + # Find first empty workspace or create new one 12 + empty_ws=0 13 + for i in {1..100}; do 14 + if ! echo "$workspaces" | grep -q "^$i$"; then 15 + empty_ws=$i 16 + break 17 + fi 18 + done 19 + 20 + # If no gap found, use next number after highest 21 + if [ "$empty_ws" -eq 0 ]; then 22 + empty_ws=$(( $(echo "$workspaces" | sort -n | tail -n1) + 1 )) 23 + fi 24 + 25 + # Move window and follow it 26 + swaymsg move container to workspace number "$empty_ws" 27 + swaymsg workspace number "$empty_ws"
+17
private_dot_config/private_sway/executable_workspace-swipe.sh
··· 1 + #!/usr/bin/env bash 2 + # Sway workspace navigation with auto-creation 3 + 4 + direction="$1" # "next" or "prev" 5 + 6 + # Get current workspace number 7 + current=$(swaymsg -t get_workspaces | jq -r '.[] | select(.focused==true) | .num') 8 + 9 + if [ "$direction" = "next" ]; then 10 + next=$((current + 1)) 11 + swaymsg workspace number "$next" 12 + elif [ "$direction" = "prev" ]; then 13 + if [ "$current" -gt 1 ]; then 14 + prev=$((current - 1)) 15 + swaymsg workspace number "$prev" 16 + fi 17 + fi