refactor: group stow packages into common, mac and kde
Split the packages by platform so each app stays an opt-in Stow package under common/, mac/ or kde/. KDE gets its own Fastfetch, Helium and Spectacle packages, and darwin-breeze becomes kde/theme. The READMEs document stowing a whole group as well as individual packages.
This commit is contained in:
1 parent
1e99a15f6c
commit
34e978e84c
74 files changed
+532
-151
No files matched your search
Executable
+49
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
# Regenerate the app themes from the color scheme and apply Darwin Breeze.
|
||||
#
|
||||
# Run `stow -d kde -t "$HOME" theme` from the repo root first.
|
||||
set -euo pipefail
|
||||
|
||||
here="$(cd "$(dirname "$0")" && pwd)"
|
||||
data="${XDG_DATA_HOME:-$HOME/.local/share}"
|
||||
|
||||
if [ ! -e "$data/color-schemes/DarwinBreezeDark.colors" ]; then
|
||||
echo 'DarwinBreezeDark.colors is not installed; run: stow -d kde -t "$HOME" theme' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
python3 -I "$here/build.py"
|
||||
|
||||
plasma-apply-lookandfeel --apply dev.trivk.darwinbreeze.dark
|
||||
|
||||
# plasma-apply-colorscheme skips a scheme that is already active, so edits
|
||||
# to the .colors file would not be picked up. Bounce through stock Breeze.
|
||||
plasma-apply-colorscheme BreezeClassic >/dev/null
|
||||
plasma-apply-colorscheme DarwinBreezeDark >/dev/null
|
||||
|
||||
# Drop the line under the title bar so it blends into the toolbar.
|
||||
kwriteconfig6 --file breezerc --group Windeco --key DrawTitleBarSeparator false
|
||||
|
||||
# A wallpaper-derived accent color would override the blue from the scheme.
|
||||
kwriteconfig6 --file kdeglobals --group General --key AccentColor --delete
|
||||
kwriteconfig6 --file kdeglobals --group General --key accentColorFromWallpaper false
|
||||
|
||||
qdbus6 org.kde.KWin /KWin reconfigure 2>/dev/null \
|
||||
|| dbus-send --session --type=signal /KWin org.kde.KWin.reloadConfig
|
||||
|
||||
# T3 Code skips symlinked theme files, so publish a copy instead of stowing it.
|
||||
t3="$(command -v t3 || echo "$HOME/.t3/bin/t3")"
|
||||
if [ -x "$t3" ]; then
|
||||
"$t3" theme set "$here/t3/darwin-breeze.json" >/dev/null
|
||||
fi
|
||||
|
||||
# VS Code only loads themes from installed extensions. --force reinstalls the
|
||||
# same version, so color changes land without a version bump.
|
||||
if command -v code >/dev/null; then
|
||||
code --install-extension "$here/vscode/darwin-breeze.vsix" --force >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
echo "Applied Darwin Breeze"
|
||||
if pgrep -x helium >/dev/null; then
|
||||
echo "Restart Helium to pick up its theme"
|
||||
fi
|
||||
Reference in new issue
Block a user