Rebuild dotfiles as one branch with per-host layers

Replaces the previous repo, which had split into two histories that never
met (mainframe on a dead GitLab remote, the laptops on Gitea) with 146
dirty files across three machines and the NAS never enrolled at all.

Branch-per-machine is gone. One main, with host differences expressed as
small files under hosts/<hostname>/ rather than as branches, so there is
nothing to merge. The reconciled zsh layer reduces 15-33 line forks to
1-7 effective lines per host; distro differences (oh-my-zsh prefix,
syntax-highlighting path, fd vs fdfind) are probed in common/ instead.

Fresh history: the old one carried six plaintext credentials, 45 MB of
mail caches, browser caches and vendored binaries. 5,096 tracked files
and 144 MB become 462 files and 2.6 MB. The .gitignore is now an
allowlist, which is what keeps that true.

Root cause of the rot: ~/.local/bin was a symlink to scripts/ with GOPATH
inside it, so every go install wrote into version control (2.2 GB on the
work laptop). PATH now points at the repo instead of the reverse.

Also: Hyprland replaces sway and is sourced in two halves so $browser is
defined before use; singleton automations carry ConditionHost= alongside
host-layer-only placement; ddns moves from cron to a guarded timer;
package manifests and pkg-snapshot/pkg-restore replace the X11-era
install_scripts/; networkmanager-dmenu added to system76 (the binding
always existed, the package never did).
This commit is contained in:
2026-09-14 14:24:37 -04:00
commit e6644d0616
462 changed files with 23524 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
#!/usr/bin/env bash
# --- CONFIGURATION ---
# Change this to your internal monitor name (use 'hyprctl monitors' to find it)
INTERNAL_DISPLAY="eDP-1"
# Icons for notifications (ensure you have an icon theme installed)
ICON_LAPTOP="computer-laptop"
ICON_MONITOR="video-display"
# --- FUNCTIONS ---
notify_user() {
# Change '-u low' to '-u normal' if you want popups to stay longer
notify-send -u low -i "$3" "$1" "$2"
}
# --- MODES ---
mode_close() {
# Only disable internal screen if an external monitor is connected
MONITORS_COUNT=$(hyprctl monitors all | grep -c "Monitor")
if [[ $MONITORS_COUNT -gt 1 ]]; then
hyprctl keyword monitor "$INTERNAL_DISPLAY, disable"
sed -i "s/^monitor = $INTERNAL_DISPLAY, preferred, auto, auto$/monitor = $INTERNAL_DISPLAY, disable/" ~/.config/hypr/hyprland.conf
fi
}
mode_open() {
# Force enable internal screen
hyprctl keyword monitor "$INTERNAL_DISPLAY, preferred, auto, 1"
sed -i "s/^monitor = $INTERNAL_DISPLAY, disable$/monitor = $INTERNAL_DISPLAY, preferred, auto, auto/" ~/.config/hypr/hyprland.conf
}
# --- LOGIC ---
if [[ "$1" == "close" ]]; then
mode_close
notify_user "Clamshell Mode" "External monitor active. Laptop screen disabled." "$ICON_MONITOR"
elif [[ "$1" == "open" ]]; then
mode_open
notify_user "Laptop Mode" "Laptop screen enabled." "$ICON_LAPTOP"
elif [[ "$1" == "check" ]]; then
# Silent check for startup/reload to sync state
if grep -q "open" /proc/acpi/button/lid/*/state; then
mode_open
else
mode_close
fi
else
echo "Usage: $0 [open|close|check]"
exit 1
fi
+15
View File
@@ -0,0 +1,15 @@
# Hyprland with colors from wallust
# The
# You can use this template by adding the following to wallust.toml:
# hypr = { src = "hyprland-colors.conf", dst = "~/.config/hypr/colors.conf" }
# and then on hyprland.conf:
# source = ~/.config/hypr/colors.conf
general {
# Here we use `saturate` filter to have more vibrant colors,
# not matter the scheme, since the border should seek the attention
col.active_border = rgb(A7692E) rgb(A96D3C) rgb(63B044) rgb(C98945) rgb(F8A24F) rgb(F7A257)
# color0 is almost the same as the background color,
# by putting ee as the alpha, it makes it 100% transparent
col.inactive_border = rgba(3A3939ee)
}
+34
View File
@@ -0,0 +1,34 @@
general {
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
before_sleep_cmd = loginctl lock-session # lock before suspend.
after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
}
listener {
timeout = 600 # 10min.
on-timeout = /usr/local/bin/backlight-idle dim
on-resume = /usr/local/bin/backlight-idle restore
}
# turn off keyboard backlight, comment out this section if you dont have a keyboard backlight.
listener {
timeout = 600 # 10min.
on-timeout = brightnessctl -sd rgb:kbd_backlight set 0 # turn off keyboard backlight.
on-resume = brightnessctl -rd rgb:kbd_backlight # turn on keyboard backlight.
}
listener {
timeout = 900 # 15min
on-timeout = loginctl lock-session # lock screen when timeout has passed
}
listener {
timeout = 930 # 15.5min
on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired.
}
listener {
timeout = 1800 # 30min
on-timeout = systemctl suspend # suspend pc
}
+12
View File
@@ -0,0 +1,12 @@
# Sourced near the top of common/hypr/hyprland.conf. Anything used later in
# that file — $browser, env vars, monitor layout — must be defined here.
# Real layout lives in ~/.config/kanshi/config. This is only a fallback.
monitor = ,preferred,auto,auto
env = XCURSOR_THEME,capitaine-cursors-light
env = XCURSOR_SIZE,36
env = HYPRCURSOR_SIZE,36
# Ubuntu's qutebrowser is too old for common/qutebrowser; self-built wrapper.
$browser = /home/connorjohnstone/.local/bin/qutebrowser-arch
+12
View File
@@ -0,0 +1,12 @@
# Sourced at the very end of common/hypr/hyprland.conf.
general {
gaps_in = 5
gaps_out = 10
}
xwayland {
# Stops the 1x-buffer upscale that blurs XWayland apps on these 1.5x
# monitors. Apps launched under XWayland set their own scale factor.
force_zero_scaling = true
}