gtk: force the dark variant, autostart particles

GTK4 ignores gtk-application-prefer-dark-theme, and did not follow the
portal's prefer-dark either, so Adwaita stayed light while the custom css
darkened only some surfaces - that is why pavucontrol had dark-grey labels
on dark backgrounds and a white content pane. GTK_THEME=Adwaita:dark fixes
GTK3 and GTK4 together.

Also recolour the stale ~/.themes Terminal-Dark leftovers, point gtk-4.0 at
a theme and icon set that exist, and start the particle layer from bspwmrc.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cn3dHfbgNYdbZvzb1b3GQt
This commit is contained in:
Sarthak 2026-09-04 00:33:39 +05:30
parent fcb65561d0
commit e2dfb1a67c
5 changed files with 112 additions and 94 deletions

View file

@ -3,6 +3,12 @@
# Qt apps follow qt6ct, which reads ~/.config/qt6ct/colors/dc.conf
export QT_QPA_PLATFORMTHEME=qt6ct
# GTK4 ignores gtk-application-prefer-dark-theme and did not pick up the
# portal's prefer-dark either, which left labels dark-on-dark. Forcing the
# dark variant here covers GTK3 and GTK4 both; ~/.config/gtk-{3,4}.0/gtk.css
# recolours it on top.
export GTK_THEME=Adwaita:dark
# Start sxhkd if it's not already running
pgrep -x sxhkd >/dev/null || sxhkd -c ~/.config/bspwm/sxhkdrc &
@ -83,6 +89,14 @@ sh $HOME/.config/polybar/launch.sh
sh $HOME/.config/scripts/polkitkdeauth.sh
sh $HOME/.config/scripts/set-wallpaper.sh
# Particle field on the wallpaper layer (run `particles` any time to toggle)
if command -v particles >/dev/null 2>&1; then
particles --start &
elif [ -x "$HOME/.local/bin/particles" ]; then
"$HOME/.local/bin/particles" --start &
fi
# Clipboard sync
if command -v clipnotify >/dev/null 2>&1 && command -v xclip >/dev/null 2>&1 && command -v cliphist >/dev/null 2>&1; then
(

View file

@ -1,5 +1,5 @@
gtk-theme-name=dc
gtk-icon-theme-name=Gruvbox-Plus-Dark
gtk-theme-name=Adwaita
gtk-icon-theme-name=Adwaita
gtk-font-name=JetBrainsMono Nerd Font 12
gtk-cursor-theme-name=Bibata-Modern-Classic
gtk-cursor-theme-size=20

View file

@ -208,6 +208,10 @@ post_setup() {
[ "$DRY" = 1 ] && { note "would fix permissions, rebuild fonts, set wallpaper"; return 0; }
command -v fc-cache >/dev/null 2>&1 && fc-cache -f >/dev/null 2>&1 && ok "font cache rebuilt"
if command -v gsettings >/dev/null 2>&1; then
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' 2>/dev/null \
&& ok "gtk colour-scheme set to prefer-dark"
fi
if command -v papirus-folders >/dev/null 2>&1; then
papirus-folders -C blue --theme Papirus-Dark >/dev/null 2>&1 && ok "papirus folders set to blue"
fi