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

View file

@ -2,26 +2,26 @@
/* Based on kitty terminal colors */
/* Color Definitions */
@define-color theme_bg_color #141414;
@define-color theme_fg_color #feffd3;
@define-color theme_base_color #1a1a1a;
@define-color theme_text_color #feffd3;
@define-color theme_selected_bg_color #e1c47d;
@define-color theme_selected_fg_color #141414;
@define-color insensitive_bg_color #262626;
@define-color insensitive_fg_color #778284;
@define-color borders #5a5d61;
@define-color warning_color #dd7c4c;
@define-color error_color #c06c43;
@define-color success_color #cbd88c;
@define-color theme_bg_color #0f0d17;
@define-color theme_fg_color #e9eefb;
@define-color theme_base_color #100d18;
@define-color theme_text_color #e9eefb;
@define-color theme_selected_bg_color #92b9ea;
@define-color theme_selected_fg_color #0f0d17;
@define-color insensitive_bg_color #221c33;
@define-color insensitive_fg_color #7f7796;
@define-color borders #3d3752;
@define-color warning_color #e0798f;
@define-color error_color #cf6a80;
@define-color success_color #8fae74;
/* Additional semantic colors */
@define-color accent_color #e1c47d;
@define-color accent_bg_color #e1c47d;
@define-color accent_fg_color #141414;
@define-color destructive_color #dd7c4c;
@define-color destructive_bg_color #dd7c4c;
@define-color destructive_fg_color #141414;
@define-color accent_color #92b9ea;
@define-color accent_bg_color #92b9ea;
@define-color accent_fg_color #0f0d17;
@define-color destructive_color #e0798f;
@define-color destructive_bg_color #e0798f;
@define-color destructive_fg_color #0f0d17;
/* Base styling */
* {
@ -59,7 +59,7 @@ iconview:selected:focus {
.sidebar,
sidebar,
.nemo-window .sidebar {
background-color: #262626;
background-color: #221c33;
border-right: 1px solid @borders;
}
@ -71,13 +71,13 @@ sidebar row {
.sidebar row:hover,
sidebar row:hover {
background-color: #303030;
background-color: #2e2842;
border-left-color: @accent_color;
}
.sidebar row:selected,
sidebar row:selected {
background-color: #303030;
background-color: #2e2842;
color: @theme_fg_color;
border-left-color: @theme_fg_color;
}
@ -86,7 +86,7 @@ sidebar row:selected {
headerbar,
toolbar,
.toolbar {
background-color: #262626;
background-color: #221c33;
color: @theme_fg_color;
border-bottom: 2px solid @borders;
padding: 8px;
@ -104,7 +104,7 @@ toolbar button {
headerbar button:hover,
toolbar button:hover {
background-color: #303030;
background-color: #2e2842;
border-color: @accent_color;
color: @accent_color;
}
@ -119,7 +119,7 @@ toolbar button:checked {
/* Regular Buttons */
button {
background-color: #262626;
background-color: #221c33;
color: @theme_fg_color;
border: 2px solid @borders;
border-radius: 0;
@ -129,7 +129,7 @@ button {
}
button:hover {
background-color: #303030;
background-color: #2e2842;
border-color: @accent_color;
color: @accent_color;
box-shadow: 0 0 8px rgba(225, 196, 125, 0.3);
@ -138,7 +138,7 @@ button:hover {
button:active,
button:checked {
background-color: @accent_color;
color: #141414;
color: #0f0d17;
}
button:disabled {
@ -149,13 +149,13 @@ button:disabled {
button.suggested-action {
background-color: @accent_color;
color: #141414;
color: #0f0d17;
border-color: @accent_color;
}
button.destructive-action {
background-color: @destructive_color;
color: #141414;
color: #0f0d17;
border-color: @destructive_color;
}
@ -192,7 +192,7 @@ scrollbar slider {
}
scrollbar slider:hover {
background-color: #c2a86c;
background-color: #d8a87c;
}
scrollbar.vertical slider {
@ -207,7 +207,7 @@ scrollbar.horizontal slider {
menu,
.menu,
.context-menu {
background-color: #262626;
background-color: #221c33;
color: @theme_fg_color;
border: 2px solid @borders;
padding: 4px 0;
@ -220,7 +220,7 @@ menuitem,
menuitem:hover,
.menuitem:hover {
background-color: #303030;
background-color: #2e2842;
color: @accent_color;
}
@ -230,7 +230,7 @@ menuitem:disabled,
}
menubar {
background-color: #262626;
background-color: #221c33;
border-bottom: 1px solid @borders;
}
@ -239,12 +239,12 @@ menubar>menuitem {
}
menubar>menuitem:hover {
background-color: #303030;
background-color: #2e2842;
}
/* Popover */
popover {
background-color: #262626;
background-color: #221c33;
border: 2px solid @borders;
border-radius: 0;
}
@ -259,13 +259,13 @@ notebook {
}
notebook>header {
background-color: #262626;
background-color: #221c33;
border-bottom: 2px solid @borders;
}
notebook>header>tabs>tab {
background-color: transparent;
color: #c2a86c;
color: #d8a87c;
border-bottom: 2px solid transparent;
padding: 12px 24px;
}
@ -308,7 +308,7 @@ treeview entry {
}
.path-bar button:hover {
background-color: #303030;
background-color: #2e2842;
color: @accent_color;
}
@ -319,16 +319,16 @@ treeview entry {
/* Selection mode (batch operations) */
.selection-mode headerbar {
background-color: @accent_color;
color: #141414;
color: #0f0d17;
}
.selection-mode button {
color: #141414;
color: #0f0d17;
}
/* Tooltips */
tooltip {
background-color: #262626;
background-color: #221c33;
color: @theme_fg_color;
border: 1px solid @borders;
border-radius: 0;
@ -456,7 +456,7 @@ levelbar block.empty {
/* Nemo-specific styling */
.nemo-window .floating-bar {
background-color: #262626;
background-color: #221c33;
border: 2px solid @borders;
border-radius: 0;
padding: 6px;
@ -469,7 +469,7 @@ levelbar block.empty {
/* Statusbar */
statusbar {
background-color: #262626;
background-color: #221c33;
color: @theme_fg_color;
border-top: 1px solid @borders;
padding: 4px 8px;
@ -482,21 +482,21 @@ infobar {
infobar.info {
background-color: @accent_color;
color: #141414;
color: #0f0d17;
}
infobar.warning {
background-color: @warning_color;
color: #141414;
color: #0f0d17;
}
infobar.error {
background-color: @error_color;
color: #feffd3;
color: #e9eefb;
}
/* Selection in text */
selection {
background-color: #303030;
background-color: #2e2842;
color: @theme_fg_color;
}

View file

@ -2,26 +2,26 @@
/* Based on kitty terminal colors */
/* Color Definitions */
@define-color theme_bg_color #141414;
@define-color theme_fg_color #feffd3;
@define-color theme_base_color #1a1a1a;
@define-color theme_text_color #feffd3;
@define-color theme_selected_bg_color #e1c47d;
@define-color theme_selected_fg_color #141414;
@define-color insensitive_bg_color #262626;
@define-color insensitive_fg_color #778284;
@define-color borders #5a5d61;
@define-color warning_color #dd7c4c;
@define-color error_color #c06c43;
@define-color success_color #cbd88c;
@define-color theme_bg_color #0f0d17;
@define-color theme_fg_color #e9eefb;
@define-color theme_base_color #100d18;
@define-color theme_text_color #e9eefb;
@define-color theme_selected_bg_color #92b9ea;
@define-color theme_selected_fg_color #0f0d17;
@define-color insensitive_bg_color #221c33;
@define-color insensitive_fg_color #7f7796;
@define-color borders #3d3752;
@define-color warning_color #e0798f;
@define-color error_color #cf6a80;
@define-color success_color #8fae74;
/* Additional semantic colors */
@define-color accent_color #e1c47d;
@define-color accent_bg_color #e1c47d;
@define-color accent_fg_color #141414;
@define-color destructive_color #dd7c4c;
@define-color destructive_bg_color #dd7c4c;
@define-color destructive_fg_color #141414;
@define-color accent_color #92b9ea;
@define-color accent_bg_color #92b9ea;
@define-color accent_fg_color #0f0d17;
@define-color destructive_color #e0798f;
@define-color destructive_bg_color #e0798f;
@define-color destructive_fg_color #0f0d17;
/* Base styling */
* {
@ -59,7 +59,7 @@ iconview:selected:focus {
.sidebar,
sidebar,
.nemo-window .sidebar {
background-color: #262626;
background-color: #221c33;
border-right: 1px solid @borders;
}
@ -71,13 +71,13 @@ sidebar row {
.sidebar row:hover,
sidebar row:hover {
background-color: #303030;
background-color: #2e2842;
border-left-color: @accent_color;
}
.sidebar row:selected,
sidebar row:selected {
background-color: #303030;
background-color: #2e2842;
color: @theme_fg_color;
border-left-color: @theme_fg_color;
}
@ -86,7 +86,7 @@ sidebar row:selected {
headerbar,
toolbar,
.toolbar {
background-color: #262626;
background-color: #221c33;
color: @theme_fg_color;
border-bottom: 2px solid @borders;
padding: 8px;
@ -104,7 +104,7 @@ toolbar button {
headerbar button:hover,
toolbar button:hover {
background-color: #303030;
background-color: #2e2842;
border-color: @accent_color;
color: @accent_color;
}
@ -119,7 +119,7 @@ toolbar button:checked {
/* Regular Buttons */
button {
background-color: #262626;
background-color: #221c33;
color: @theme_fg_color;
border: 2px solid @borders;
border-radius: 0;
@ -129,7 +129,7 @@ button {
}
button:hover {
background-color: #303030;
background-color: #2e2842;
border-color: @accent_color;
color: @accent_color;
box-shadow: 0 0 8px rgba(225, 196, 125, 0.3);
@ -138,7 +138,7 @@ button:hover {
button:active,
button:checked {
background-color: @accent_color;
color: #141414;
color: #0f0d17;
}
button:disabled {
@ -149,13 +149,13 @@ button:disabled {
button.suggested-action {
background-color: @accent_color;
color: #141414;
color: #0f0d17;
border-color: @accent_color;
}
button.destructive-action {
background-color: @destructive_color;
color: #141414;
color: #0f0d17;
border-color: @destructive_color;
}
@ -192,7 +192,7 @@ scrollbar slider {
}
scrollbar slider:hover {
background-color: #c2a86c;
background-color: #d8a87c;
}
scrollbar.vertical slider {
@ -207,7 +207,7 @@ scrollbar.horizontal slider {
menu,
.menu,
.context-menu {
background-color: #262626;
background-color: #221c33;
color: @theme_fg_color;
border: 2px solid @borders;
padding: 4px 0;
@ -220,7 +220,7 @@ menuitem,
menuitem:hover,
.menuitem:hover {
background-color: #303030;
background-color: #2e2842;
color: @accent_color;
}
@ -230,7 +230,7 @@ menuitem:disabled,
}
menubar {
background-color: #262626;
background-color: #221c33;
border-bottom: 1px solid @borders;
}
@ -239,12 +239,12 @@ menubar>menuitem {
}
menubar>menuitem:hover {
background-color: #303030;
background-color: #2e2842;
}
/* Popover */
popover {
background-color: #262626;
background-color: #221c33;
border: 2px solid @borders;
border-radius: 0;
}
@ -259,13 +259,13 @@ notebook {
}
notebook>header {
background-color: #262626;
background-color: #221c33;
border-bottom: 2px solid @borders;
}
notebook>header>tabs>tab {
background-color: transparent;
color: #c2a86c;
color: #d8a87c;
border-bottom: 2px solid transparent;
padding: 12px 24px;
}
@ -308,7 +308,7 @@ treeview entry {
}
.path-bar button:hover {
background-color: #303030;
background-color: #2e2842;
color: @accent_color;
}
@ -319,16 +319,16 @@ treeview entry {
/* Selection mode (batch operations) */
.selection-mode headerbar {
background-color: @accent_color;
color: #141414;
color: #0f0d17;
}
.selection-mode button {
color: #141414;
color: #0f0d17;
}
/* Tooltips */
tooltip {
background-color: #262626;
background-color: #221c33;
color: @theme_fg_color;
border: 1px solid @borders;
border-radius: 0;
@ -456,7 +456,7 @@ levelbar block.empty {
/* Nemo-specific styling */
.nemo-window .floating-bar {
background-color: #262626;
background-color: #221c33;
border: 2px solid @borders;
border-radius: 0;
padding: 6px;
@ -469,7 +469,7 @@ levelbar block.empty {
/* Statusbar */
statusbar {
background-color: #262626;
background-color: #221c33;
color: @theme_fg_color;
border-top: 1px solid @borders;
padding: 4px 8px;
@ -482,21 +482,21 @@ infobar {
infobar.info {
background-color: @accent_color;
color: #141414;
color: #0f0d17;
}
infobar.warning {
background-color: @warning_color;
color: #141414;
color: #0f0d17;
}
infobar.error {
background-color: @error_color;
color: #feffd3;
color: #e9eefb;
}
/* Selection in text */
selection {
background-color: #303030;
background-color: #2e2842;
color: @theme_fg_color;
}