Add Arch Wayland dotfiles: sway/waybar/kitty/nvim/zsh, idempotent installer

Auto-adapts sway workspace routing to however many monitors are
connected (laptop vs. desktop) instead of hardcoding output names.
This commit is contained in:
2026-08-21 22:59:26 -05:00
commit 5c57ee20f7
35 changed files with 870 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
font pango:JetBrainsMono Nerd Font 10
gaps inner 8
gaps outer 4
default_border pixel 2
default_floating_border pixel 2
client.focused #3b82f6 #000000 #60a5fa #2563eb #3b82f6
client.focused_inactive #171717 #000000 #737373 #171717 #171717
client.unfocused #0a0a0a #000000 #525252 #0a0a0a #0a0a0a
client.urgent #60a5fa #000000 #60a5fa #3b82f6 #60a5fa
for_window [app_id="system-monitor"] floating enable, resize set 1000 700, move position center
output * bg ~/.config/sway/wallpapers/blue-horizon.svg fill
# Desktop-only dual-monitor arrangement: DP-3 is the centered primary
# display, DP-2 sits immediately to its left. Sway silently ignores
# `output` directives for names that don't exist, so this is a no-op on
# the single-monitor laptop (its internal panel, e.g. eDP-1, is untouched
# and simply gets everything). Workspace-to-output routing is not pinned
# here; scripts/select-workspace.sh assigns workspaces to whichever
# outputs are actually connected, in left-to-right order, so it adapts
# automatically on both machines without any per-host config.
output DP-3 position 0 0
output DP-2 position -2560 0
output DP-3 scale 1
output DP-2 scale 1
+14
View File
@@ -0,0 +1,14 @@
input type:keyboard {
xkb_layout us
repeat_delay 300
repeat_rate 40
}
input type:touchpad {
tap enabled
natural_scroll enabled
dwt enabled
}
# Make workspace number bindings follow the monitor under the pointer.
focus_follows_mouse always
+4
View File
@@ -0,0 +1,4 @@
exec_always --no-startup-id sh -c 'pkill waybar; exec waybar'
exec --no-startup-id mako
exec --no-startup-id nm-applet --indicator
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
+16
View File
@@ -0,0 +1,16 @@
set $mod Mod1
set $term kitty
set $menu wofi --show drun
# Enable Xwayland
xwayland enable
# Random xorg shit
exec_always dbus-update-activation-environment --systemd \
WAYLAND_DISPLAY DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE
exec_always systemctl --user import-environment \
WAYLAND_DISPLAY DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE
include ~/.config/sway/conf.d/*.conf
include ~/.config/sway/keybinds
+60
View File
@@ -0,0 +1,60 @@
floating_modifier $mod normal
bindsym $mod+Return exec $term
bindsym $mod+d exec $menu
bindsym $mod+Shift+q kill
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r reload
bindsym $mod+Shift+e exec swaynag -t warning -m 'Exit Sway?' -b 'Exit' 'swaymsg exit'
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
bindsym $mod+f fullscreen toggle
bindsym $mod+Shift+space floating toggle
set $workspace_script ~/.config/sway/scripts/select-workspace.sh
bindsym $mod+1 exec $workspace_script 1
bindsym $mod+2 exec $workspace_script 2
bindsym $mod+3 exec $workspace_script 3
bindsym $mod+4 exec $workspace_script 4
bindsym $mod+5 exec $workspace_script 5
bindsym $mod+6 exec $workspace_script 6
bindsym $mod+7 exec $workspace_script 7
bindsym $mod+8 exec $workspace_script 8
bindsym $mod+9 exec $workspace_script 9
bindsym $mod+0 exec $workspace_script 10
bindsym $mod+Shift+1 exec $workspace_script 1 move
bindsym $mod+Shift+2 exec $workspace_script 2 move
bindsym $mod+Shift+3 exec $workspace_script 3 move
bindsym $mod+Shift+4 exec $workspace_script 4 move
bindsym $mod+Shift+5 exec $workspace_script 5 move
bindsym $mod+Shift+6 exec $workspace_script 6 move
bindsym $mod+Shift+7 exec $workspace_script 7 move
bindsym $mod+Shift+8 exec $workspace_script 8 move
bindsym $mod+Shift+9 exec $workspace_script 9 move
bindsym $mod+Shift+0 exec $workspace_script 10 move
bindsym $mod+Shift+s exec grim -g "$(slurp)" - | wl-copy --type image/png
bindsym Print exec grim -g "$(slurp)" - | wl-copy --type image/png
bindsym Shift+Print exec grim "$HOME/Pictures/screenshot-$(date +%F-%H%M%S).png"
bindsym XF86AudioRaiseVolume exec wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+
bindsym XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindsym XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindsym XF86MonBrightnessUp exec brightnessctl set +5%
bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
mode "resize" {
bindsym Left resize shrink width 40px
bindsym Down resize grow height 40px
bindsym Up resize shrink height 40px
bindsym Right resize grow width 40px
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
+32
View File
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
set -Eeuo pipefail
slot=${1:-}
action=${2:-select}
if [[ ! "$slot" =~ ^([1-9]|10)$ ]]; then
printf 'Usage: %s <1-10> [select|move]\n' "${0##*/}" >&2
exit 2
fi
# Outputs are ordered left-to-right by position, not by name, so this works
# unmodified whether there is one output (laptop) or several (desktop):
# the focused output's rank in that order selects its block of 10 workspaces.
outputs=$(swaymsg -t get_outputs -r | jq -c 'sort_by(.rect.x)')
index=$(jq -r '[.[] | .focused] | index(true)' <<<"$outputs")
if [[ "$index" == null ]]; then
printf 'No focused output found\n' >&2
exit 1
fi
workspace=$((slot + index * 10))
case "$action" in
select) swaymsg workspace number "$workspace" >/dev/null ;;
move)
swaymsg move container to workspace number "$workspace" >/dev/null
;;
*)
printf 'Unknown action: %s\n' "$action" >&2
exit 2
;;
esac
+42
View File
@@ -0,0 +1,42 @@
<svg xmlns="http://www.w3.org/2000/svg" width="2560" height="1440" viewBox="0 0 2560 1440">
<rect width="2560" height="1440" fill="#082f68"/>
<g fill="#dbeafe">
<circle cx="118" cy="112" r="1.5" opacity="0.8"/>
<circle cx="284" cy="336" r="1" opacity="0.65"/>
<circle cx="438" cy="178" r="2" opacity="0.85"/>
<circle cx="612" cy="514" r="1.5" opacity="0.7"/>
<circle cx="754" cy="92" r="1" opacity="0.75"/>
<circle cx="902" cy="284" r="1.5" opacity="0.9"/>
<circle cx="1088" cy="438" r="1" opacity="0.65"/>
<circle cx="1246" cy="152" r="2" opacity="0.8"/>
<circle cx="1414" cy="352" r="1" opacity="0.7"/>
<circle cx="1582" cy="86" r="1.5" opacity="0.85"/>
<circle cx="1748" cy="486" r="2" opacity="0.7"/>
<circle cx="1918" cy="224" r="1" opacity="0.9"/>
<circle cx="2086" cy="390" r="1.5" opacity="0.65"/>
<circle cx="2268" cy="126" r="2" opacity="0.8"/>
<circle cx="2442" cy="548" r="1" opacity="0.75"/>
<circle cx="178" cy="746" r="1" opacity="0.7"/>
<circle cx="362" cy="1028" r="2" opacity="0.8"/>
<circle cx="538" cy="842" r="1.5" opacity="0.65"/>
<circle cx="716" cy="1244" r="1" opacity="0.85"/>
<circle cx="886" cy="698" r="2" opacity="0.75"/>
<circle cx="1056" cy="1116" r="1.5" opacity="0.9"/>
<circle cx="1232" cy="908" r="1" opacity="0.65"/>
<circle cx="1402" cy="1302" r="2" opacity="0.8"/>
<circle cx="1574" cy="772" r="1" opacity="0.7"/>
<circle cx="1746" cy="1064" r="1.5" opacity="0.85"/>
<circle cx="1912" cy="876" r="2" opacity="0.7"/>
<circle cx="2088" cy="1268" r="1" opacity="0.9"/>
<circle cx="2260" cy="714" r="1.5" opacity="0.65"/>
<circle cx="2434" cy="1148" r="2" opacity="0.8"/>
<circle cx="328" cy="612" r="3.5" opacity="0.9"/>
<circle cx="676" cy="356" r="4" opacity="0.95"/>
<circle cx="1168" cy="682" r="3" opacity="0.85"/>
<circle cx="1462" cy="226" r="4.5" opacity="0.9"/>
<circle cx="1840" cy="624" r="3.5" opacity="0.95"/>
<circle cx="2184" cy="972" r="4" opacity="0.85"/>
<circle cx="948" cy="1268" r="3.5" opacity="0.9"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB