mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 15:39:58 +00:00
sway: per-host overrides via host.conf and session-env
Adds a host_sway_dotfiles mechanism mirroring host_i3_dotfiles: hosts drop a host.conf into ~/.config/sway/ to override sway settings, and optionally a session-env file sourced by start-sway for per-host environment variables. The base sway/config defines $terminal and includes ~/.config/sway/host.conf; an empty placeholder ships with the base profile so the include never warns on hosts without overrides. nymph gets its own host.conf wrapping alacritty in prime-run (NVIDIA PRIME offload), bumping gaps/corner_radius, and pinning workspaces to eDP-1 / DP-1, plus a session-env exporting SWAY_UNSUPPORTED_GPU=1 and WLR_DRM_DEVICES for the hybrid Intel+NVIDIA setup. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,9 @@ set $down j
|
||||
set $up k
|
||||
set $right l
|
||||
|
||||
# Default terminal (hosts can override via host.conf — e.g. nymph wraps it in prime-run)
|
||||
set $terminal alacritty
|
||||
|
||||
# Workspaces (waybar formatta i numeri in romani via format-icons)
|
||||
set $ws1 "1"
|
||||
set $ws2 "2"
|
||||
@@ -62,6 +65,9 @@ gaps outer 4
|
||||
smart_gaps on
|
||||
smart_borders on
|
||||
|
||||
# Per-host overrides (terminal wrapper, gaps tweaks, workspace→output bindings, …)
|
||||
include ~/.config/sway/host.conf
|
||||
|
||||
# Window rules
|
||||
for_window [app_id="(?i)polkit"] floating enable
|
||||
for_window [class="(?i)polkit"] floating enable
|
||||
@@ -108,7 +114,7 @@ exec swayidle -w \
|
||||
before-sleep '~/.config/sway/scripts/lockscreen'
|
||||
|
||||
# Terminal
|
||||
bindsym $mod+Return exec alacritty
|
||||
bindsym $mod+Return exec $terminal
|
||||
|
||||
# Emacs client
|
||||
bindsym $mod+Shift+e exec emacsclient -c -n
|
||||
|
||||
Reference in New Issue
Block a user