vitorpy's Dotfiles

Add Sway configuration as Hyprland alternative

Created equivalent Sway config to enable migration from Hyprland:
- Main Sway config with all keybindings and window rules translated
- swaylock-fprintd config for fingerprint authentication
- Environment variables setup matching Hyprland
- swayidle configuration for power management
- Systemd service for swaylock
- Added Sway packages to packages.txt (commented out)

Sway config mirrors Hyprland functionality with Zenburn theme.
To migrate: uncomment Sway packages and install them.

+379 -3
+3 -3
private_dot_claude/settings.json
··· 1 { 2 "includeCoAuthoredBy": false, 3 - "alwaysThinkingEnabled": true, 4 "hooks": { 5 "Stop": [ 6 { ··· 13 ] 14 } 15 ] 16 - } 17 - }
··· 1 { 2 "includeCoAuthoredBy": false, 3 "hooks": { 4 "Stop": [ 5 { ··· 12 ] 13 } 14 ] 15 + }, 16 + "alwaysThinkingEnabled": true 17 + }
+9
private_dot_config/private_arch/packages.txt
··· 54 loupe | pacman 55 vlc | pacman 56 57 # Note: hyprcorners needs to be installed via cargo: 58 # cargo install hyprcorners 59
··· 54 loupe | pacman 55 vlc | pacman 56 57 + # Sway ecosystem (alternative to Hyprland) 58 + # Uncomment if migrating from Hyprland to Sway 59 + # sway | pacman 60 + # swayidle | pacman 61 + # swaylock-effects-git | aur 62 + # swaylock-fprintd | aur 63 + # swaybg | pacman 64 + # xdg-desktop-portal-wlr | pacman 65 + 66 # Note: hyprcorners needs to be installed via cargo: 67 # cargo install hyprcorners 68
+274
private_dot_config/private_sway/config
···
··· 1 + # Sway configuration 2 + # Read `man 5 sway` for reference 3 + 4 + ### Variables 5 + # Logo key (Mod4 = Super/Windows key) 6 + set $mod Mod4 7 + 8 + # Programs 9 + set $term ghostty 10 + set $filemanager nautilus 11 + set $menu wofi --show drun 12 + set $browser firefox 13 + 14 + # Directions (vim-style) 15 + set $left h 16 + set $down j 17 + set $up k 18 + set $right l 19 + 20 + ### Output configuration (Monitors) 21 + # See `man 5 sway-output` for more information 22 + output DP-3 mode 3840x2160@60Hz pos 0 0 scale 1 23 + output eDP-1 mode 2256x1504@60Hz pos 0 0 scale 1 24 + 25 + # Wallpaper 26 + output * bg /home/vitorpy/Pictures/ashinoko_lake-wallpaper-2736x1824.jpg fill 27 + 28 + ### Idle configuration 29 + exec swayidle -w \ 30 + timeout 150 'brightnessctl -s set 10' \ 31 + resume 'brightnessctl -r' \ 32 + timeout 150 'brightnessctl -sd rgb:kbd_backlight set 0' \ 33 + resume 'brightnessctl -rd rgb:kbd_backlight' \ 34 + timeout 300 'swaylock -f -C ~/.config/sway/swaylock.conf' \ 35 + timeout 330 'swaymsg "output * dpms off"' \ 36 + resume 'swaymsg "output * dpms on" && brightnessctl -r' \ 37 + timeout 1800 'systemctl suspend' \ 38 + before-sleep 'swaylock -f -C ~/.config/sway/swaylock.conf' 39 + 40 + # Lock screen (handled by swayidle, see above) 41 + 42 + ### Input configuration 43 + # Keyboard 44 + input type:keyboard { 45 + xkb_layout pl,us 46 + xkb_variant ,intl 47 + xkb_options grp:alt_shift_toggle 48 + } 49 + 50 + # Touchpad 51 + input type:touchpad { 52 + dwt enabled 53 + tap enabled 54 + natural_scroll enabled 55 + click_method clickfinger 56 + } 57 + 58 + # Specific device (Logitech Pebble Mouse) 59 + input "1133:16511:Logitech_Pebble_Mouse" { 60 + natural_scroll enabled 61 + } 62 + 63 + ### Appearance 64 + # Font 65 + font pango:Noto Sans 10 66 + 67 + # Colors (Zenburn-inspired) 68 + # class border backgr. text indicator child_border 69 + client.focused #8faf9f #8faf9f #1f1f1f #8faf9f #8faf9f 70 + client.focused_inactive #4f4f4f #3f3f3f #dcdccc #4f4f4f #4f4f4f 71 + client.unfocused #4f4f4f #3f3f3f #dcdccc #4f4f4f #4f4f4f 72 + client.urgent #cc9393 #cc9393 #1f1f1f #cc9393 #cc9393 73 + 74 + # Gaps 75 + gaps inner 5 76 + gaps outer 20 77 + 78 + # Borders 79 + default_border pixel 2 80 + default_floating_border pixel 2 81 + 82 + # Hide title bars (cleaner look) 83 + titlebar_border_thickness 0 84 + titlebar_padding 0 85 + 86 + ### Window rules 87 + # No borders for specific apps 88 + for_window [app_id="firefox"] border pixel 0 89 + for_window [app_id="chromium"] border pixel 0 90 + for_window [app_id="org.gnome.*"] border pixel 0 91 + for_window [app_id="org.telegram.desktop.*"] border pixel 0 92 + for_window [class="codium"] border pixel 0 93 + for_window [app_id="com.mitchellh.ghostty"] border pixel 0 94 + for_window [class="Jan"] border pixel 0 95 + 96 + # Fix for dragging XWayland windows 97 + for_window [shell="xwayland"] title_format "%title [XWayland]" 98 + 99 + ### Key bindings 100 + # Start a terminal 101 + bindsym $mod+q exec $term 102 + 103 + # Kill focused window 104 + bindsym $mod+c kill 105 + 106 + # Start launcher 107 + bindsym $mod+r exec $menu 108 + 109 + # File manager 110 + bindsym $mod+e exec $filemanager 111 + 112 + # Browser 113 + bindsym $mod+b exec $browser 114 + 115 + # Screenshot (using grim + slurp) 116 + bindsym Print exec grim -g "$(slurp)" - | wl-copy 117 + 118 + # Lock screen 119 + bindsym $mod+l exec swaylock -f -C ~/.config/sway/swaylock.conf 120 + 121 + # Switch keyboard layout 122 + bindsym $mod+space exec swaymsg input type:keyboard xkb_switch_layout next 123 + 124 + # Reload configuration 125 + bindsym $mod+Shift+c reload 126 + 127 + # Exit sway 128 + bindsym $mod+m exec swaynag -t warning -m 'Exit Sway?' -B 'Yes' 'swaymsg exit' 129 + 130 + # Move focus 131 + bindsym $mod+Left focus left 132 + bindsym $mod+Down focus down 133 + bindsym $mod+Up focus up 134 + bindsym $mod+Right focus right 135 + 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 143 + bindsym $mod+Shift+Left move left 144 + bindsym $mod+Shift+Down move down 145 + bindsym $mod+Shift+Up move up 146 + 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 + 154 + # Switch workspaces 155 + bindsym $mod+1 workspace number 1 156 + bindsym $mod+2 workspace number 2 157 + bindsym $mod+3 workspace number 3 158 + bindsym $mod+4 workspace number 4 159 + bindsym $mod+5 workspace number 5 160 + bindsym $mod+6 workspace number 6 161 + bindsym $mod+7 workspace number 7 162 + bindsym $mod+8 workspace number 8 163 + bindsym $mod+9 workspace number 9 164 + bindsym $mod+0 workspace number 10 165 + 166 + # Move window to workspace 167 + bindsym $mod+Shift+1 move container to workspace number 1 168 + bindsym $mod+Shift+2 move container to workspace number 2 169 + bindsym $mod+Shift+3 move container to workspace number 3 170 + bindsym $mod+Shift+4 move container to workspace number 4 171 + bindsym $mod+Shift+5 move container to workspace number 5 172 + bindsym $mod+Shift+6 move container to workspace number 6 173 + bindsym $mod+Shift+7 move container to workspace number 7 174 + bindsym $mod+Shift+8 move container to workspace number 8 175 + bindsym $mod+Shift+9 move container to workspace number 9 176 + bindsym $mod+Shift+0 move container to workspace number 10 177 + 178 + # Scratchpad 179 + bindsym $mod+s scratchpad show 180 + bindsym $mod+Shift+s move scratchpad 181 + 182 + # Layout modes 183 + bindsym $mod+v floating toggle 184 + bindsym $mod+f fullscreen toggle 185 + 186 + # Split orientation 187 + bindsym $mod+j split toggle 188 + 189 + # Pseudo-tiling (tabbed/stacked modes) 190 + bindsym $mod+w layout tabbed 191 + bindsym $mod+x layout stacking 192 + bindsym $mod+z layout toggle split 193 + 194 + # Toggle focus between tiling and floating 195 + bindsym $mod+Shift+v focus mode_toggle 196 + 197 + # Move between monitors 198 + bindsym $mod+Shift+n move container to output right 199 + bindsym $mod+Shift+p move container to output left 200 + 201 + # Navigate workspaces on current output 202 + bindsym $mod+Control+Left workspace prev_on_output 203 + bindsym $mod+Control+Right workspace next_on_output 204 + 205 + # Resize mode 206 + mode "resize" { 207 + bindsym Left resize shrink width 10px 208 + bindsym Down resize grow height 10px 209 + bindsym Up resize shrink height 10px 210 + bindsym Right resize grow width 10px 211 + 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 + # Return to normal mode 219 + bindsym Return mode "default" 220 + bindsym Escape mode "default" 221 + bindsym $mod+r mode "default" 222 + } 223 + bindsym $mod+Ctrl+r mode "resize" 224 + 225 + # Drag windows with mouse 226 + floating_modifier $mod normal 227 + 228 + # Multimedia keys 229 + bindsym XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ 230 + bindsym XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- 231 + bindsym XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle 232 + bindsym XF86AudioMicMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle 233 + bindsym XF86MonBrightnessUp exec brightnessctl s 10%+ 234 + bindsym XF86MonBrightnessDown exec brightnessctl s 10%- 235 + 236 + # Media player controls (requires playerctl) 237 + bindsym XF86AudioNext exec playerctl next 238 + bindsym XF86AudioPause exec playerctl play-pause 239 + bindsym XF86AudioPlay exec playerctl play-pause 240 + bindsym XF86AudioPrev exec playerctl previous 241 + 242 + ### Autostart applications 243 + exec_always --no-startup-id waybar 244 + exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 245 + exec --no-startup-id dbus-update-activation-environment --all 246 + exec --no-startup-id gnome-keyring-daemon --start --components=secrets,ssh,pkcs11 247 + exec --no-startup-id nm-applet --indicator 248 + 249 + # XDG Desktop Portal (for screen sharing, etc.) 250 + exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway 251 + 252 + # Bar (using waybar - comment out if you want sway's built-in bar) 253 + bar { 254 + swaybar_command waybar 255 + } 256 + 257 + # Alternative: Sway's built-in bar (uncomment to use) 258 + # bar { 259 + # position top 260 + # status_command while date +'%Y-%m-%d %H:%M:%S %p'; do sleep 1; done 261 + # 262 + # colors { 263 + # statusline #dcdccc 264 + # background #3f3f3f 265 + # inactive_workspace #3f3f3f #3f3f3f #dcdccc 266 + # active_workspace #8faf9f #8faf9f #1f1f1f 267 + # focused_workspace #8faf9f #8faf9f #1f1f1f 268 + # urgent_workspace #cc9393 #cc9393 #1f1f1f 269 + # } 270 + # } 271 + 272 + ### Include additional configs 273 + include /etc/sway/config.d/* 274 + include ~/.config/sway/config.d/*
+19
private_dot_config/private_sway/config.d/environment.conf
···
··· 1 + # Environment variables for Sway 2 + 3 + # Cursor 4 + set $cursor_size 24 5 + 6 + # XDG 7 + exec_always systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP 8 + exec_always dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway XDG_SESSION_TYPE=wayland XDG_SESSION_DESKTOP=sway 9 + 10 + # Firefox/Mozilla 11 + exec_always systemctl --user set-environment MOZ_ENABLE_WAYLAND=1 12 + 13 + # Theming 14 + exec_always systemctl --user set-environment GTK_THEME=Yaru:dark 15 + exec_always systemctl --user set-environment QT_QPA_PLATFORMTHEME=adwaita-qt5 16 + exec_always systemctl --user set-environment QT_STYLE_OVERRIDE=adwaita-dark 17 + 18 + # Node.js memory limit 19 + exec_always systemctl --user set-environment NODE_OPTIONS=--max-old-space-size=8192
+61
private_dot_config/private_sway/swaylock.conf
···
··· 1 + # Swaylock-fprintd configuration - Zenburn style 2 + # Supports fingerprint authentication via fprintd 3 + 4 + # Image 5 + image=/home/vitorpy/Pictures/ashinoko_lake-wallpaper-2736x1824.jpg 6 + scaling=fill 7 + 8 + # Colors (Zenburn palette) 9 + color=3f3f3f 10 + 11 + # Ring colors 12 + indicator-radius=120 13 + indicator-thickness=10 14 + 15 + ring-color=4f4f4f 16 + key-hl-color=8faf9f 17 + bs-hl-color=cc9393 18 + 19 + inside-color=1f1f1fcc 20 + inside-clear-color=1f1f1fcc 21 + inside-ver-color=1f1f1fcc 22 + inside-wrong-color=1f1f1fcc 23 + 24 + ring-clear-color=9ece9e 25 + ring-ver-color=8faf9f 26 + ring-wrong-color=e89393 27 + 28 + line-color=00000000 29 + line-clear-color=00000000 30 + line-ver-color=00000000 31 + line-wrong-color=00000000 32 + 33 + separator-color=00000000 34 + 35 + text-color=dcdccc 36 + text-clear-color=dcdccc 37 + text-ver-color=dcdccc 38 + text-wrong-color=dcdccc 39 + 40 + # Text 41 + font=Noto Sans 42 + font-size=24 43 + 44 + # Indicator positioning 45 + indicator-x-position=50 46 + indicator-y-position=50 47 + 48 + # Show failed attempts 49 + show-failed-attempts 50 + show-keyboard-layout 51 + 52 + # Disable screen clearing (show content behind lock) 53 + daemonize 54 + 55 + # Fade in time (milliseconds) 56 + fade-in=0.2 57 + 58 + # Grace period (no lock if unlocked within this time) 59 + grace=2 60 + grace-no-mouse 61 + grace-no-touch
+13
private_dot_config/systemd/user/swaylock.service
···
··· 1 + [Unit] 2 + Description=Lock screen with swaylock-fprintd 3 + Documentation=man:swaylock(1) 4 + PartOf=graphical-session.target 5 + 6 + [Service] 7 + Type=simple 8 + ExecStart=/usr/bin/swaylock -f -C /home/vitorpy/.config/sway/swaylock.conf 9 + Restart=on-failure 10 + RestartSec=1 11 + 12 + [Install] 13 + WantedBy=graphical-session.target