From 8a087d123fdfff4536ffe67562c59f7997b2199e Mon Sep 17 00:00:00 2001 From: funman300 Date: Sat, 25 Apr 2026 12:02:56 -0700 Subject: [PATCH] Housekeeping: fix theme SSOT, wire screenshot, remove dead swaylock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - mako/config: generate from theme/colors.json in install.sh instead of symlinking a static file — mako is the only tool that can't use CSS variables, so colors.json is now the single source of truth for it - gtklock/config.ini: remove hardcoded /home/alex absolute path for style; gtklock falls back to $XDG_CONFIG_HOME/gtklock/style.css by default - niri: replace inline grim spawn-sh with `spawn "screenshot"` to use the existing script (which also copies to clipboard via wl-copy) - install.sh: add screenshot symlink; mako generation step - packages.txt: add snixembed (used in niri spawn-at-startup, was missing) - swaylock/config: delete (replaced by gtklock in previous commit) - .gitignore: add mako/config (now generated, not tracked) Co-Authored-By: Claude Sonnet 4.6 --- .gitignore | 1 + gtklock/config.ini | 1 - install.sh | 13 ++++++++++++- niri/config.kdl | 2 +- packages.txt | 1 + swaylock/config | 41 ----------------------------------------- 6 files changed, 15 insertions(+), 44 deletions(-) delete mode 100644 swaylock/config diff --git a/.gitignore b/.gitignore index 8d4bfcf..0e83a5e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ nohup.out +mako/config diff --git a/gtklock/config.ini b/gtklock/config.ini index 7ac568d..2afc3e1 100644 --- a/gtklock/config.ini +++ b/gtklock/config.ini @@ -1,4 +1,3 @@ [main] gtk-theme=Materia-dark -style=/home/alex/.config/gtklock/style.css follow-focus=true diff --git a/install.sh b/install.sh index 348eec4..b7b4401 100755 --- a/install.sh +++ b/install.sh @@ -30,7 +30,17 @@ mkdir -p ~/.config/theme ln -sf "$(pwd)/theme/colors.css" ~/.config/theme/colors.css ln -sf "$(pwd)/wofi/config" ~/.config/wofi/config ln -sf "$(pwd)/wofi/style.css" ~/.config/wofi/style.css -ln -sf "$(pwd)/mako/config" ~/.config/mako/config +python3 - <<'PYEOF' +import json, os +c = json.load(open("theme/colors.json")) +config = f"""background-color={c['background']} +text-color={c['foreground']} +border-size=2 +border-color={c['blue']} +default-timeout=4000 +""" +open(os.path.expanduser("~/.config/mako/config"), "w").write(config) +PYEOF ln -sf "$(pwd)/gtklock/config.ini" ~/.config/gtklock/config ln -sf "$(pwd)/gtklock/style.css" ~/.config/gtklock/style.css ln -sf "$(pwd)/fish/config.fish" ~/.config/fish/config.fish @@ -48,6 +58,7 @@ ln -sf "$(pwd)/scripts/powermenu.sh" ~/.local/bin/powermenu ln -sf "$(pwd)/scripts/clipboard.sh" ~/.local/bin/clipboard-picker ln -sf "$(pwd)/scripts/power-profile.sh" ~/.local/bin/power-profile ln -sf "$(pwd)/scripts/fan-profile.sh" ~/.local/bin/fan-profile +ln -sf "$(pwd)/scripts/screenshot.sh" ~/.local/bin/screenshot echo "==> Enabling systemd user services" mkdir -p ~/.config/systemd/user diff --git a/niri/config.kdl b/niri/config.kdl index 9d940f1..4767c15 100644 --- a/niri/config.kdl +++ b/niri/config.kdl @@ -83,7 +83,7 @@ binds { Mod+Shift+8 { move-window-to-workspace 8; } Mod+Shift+9 { move-window-to-workspace 9; } - Print { spawn-sh "grim -g \"$(slurp)\" ~/Pictures/screenshot-$(date +%s).png"; } + Print { spawn "screenshot"; } Mod+M { move-window-to-workspace "minimized"; } Mod+Shift+M { focus-workspace "minimized"; } diff --git a/packages.txt b/packages.txt index 8923756..ea19193 100644 --- a/packages.txt +++ b/packages.txt @@ -11,6 +11,7 @@ brightnessctl pamixer gtklock swayidle +snixembed ttf-jetbrains-mono-nerd network-manager-applet polkit-gnome diff --git a/swaylock/config b/swaylock/config deleted file mode 100644 index 5e76b38..0000000 --- a/swaylock/config +++ /dev/null @@ -1,41 +0,0 @@ -# swaylock config - Tomorrow Night theme - -# Background -color=1d1f21 - -# Indicator -indicator-radius=80 -indicator-thickness=8 -indicator-idle-visible - -# Ring colors -ring-color=373b41 -ring-clear-color=81a2be -ring-ver-color=b5bd68 -ring-wrong-color=cc6666 - -# Inside colors -inside-color=1d1f21cc -inside-clear-color=1d1f21cc -inside-ver-color=1d1f21cc -inside-wrong-color=1d1f21cc - -# Line (separator between inside and ring) -line-color=00000000 -line-clear-color=00000000 -line-ver-color=00000000 -line-wrong-color=00000000 - -# Text -text-color=c5c8c6 -text-clear-color=81a2be -text-ver-color=b5bd68 -text-wrong-color=cc6666 - -# Key highlight -key-hl-color=81a2be -bs-hl-color=cc6666 - -# Font -font=JetBrainsMono Nerd Font -font-size=14