feat: dark theme sync

This commit is contained in:
2025-07-02 20:28:30 +02:00
parent 3992c78c33
commit cfab02a17e
7 changed files with 112 additions and 9 deletions

View File

@@ -1 +0,0 @@
/home/mike/.themes/Rosepine-Dark/gtk-4.0/assets

View File

@@ -1 +0,0 @@
/home/mike/.themes/Rosepine-Dark/gtk-4.0/gtk-dark.css

View File

@@ -1 +0,0 @@
/home/mike/.themes/Rosepine-Dark/gtk-4.0/gtk.css

View File

@@ -3,5 +3,5 @@ lat = 50.27
lon = 19.04 lon = 19.04
[setter] [setter]
command = ['feh', '--bg-fill', '%f'] command = ['feh', '--bg-scale', '%f']
# command = ['swww', 'img', '%f'] # command = ['swww', 'img', '%f']

View File

@@ -28,7 +28,7 @@ config.keys = {
local theme = wezterm.plugin.require('https://github.com/neapsix/wezterm').main local theme = wezterm.plugin.require('https://github.com/neapsix/wezterm').main
-- This is where you actually apply your config choices -- This is where you actually apply your config choices
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- config.color_scheme = "rose-pine" -- Using custom Rose Pine theme -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- config.color_scheme = "rose-pine" -- Using custom Rose Pine theme
-- the font is named 'Source Code Pro ExtraLight', but I actually use the DemiBold weight. looks awesome -- the font is named 'Source Code Pro ExtraLight', but I actually use the DemiBold weight. looks awesome
config.font = wezterm.font('Hack Nerd Font') config.font = wezterm.font('Hack Nerd Font')
config.colors = theme.colors() config.colors = theme.colors()

View File

@@ -36,6 +36,50 @@ gtk-theme-name="Rosepine-Dark"
gtk-icon-theme-name="Papirus-Dark" gtk-icon-theme-name="Papirus-Dark"
EOF EOF
# Configure xsettingsd for dynamic theme updates
mkdir -p "$HOME/.config/xsettingsd"
cat > "$HOME/.config/xsettingsd/xsettingsd.conf" << EOF
Net/ThemeName "Rosepine-Dark"
Net/IconThemeName "Papirus-Dark"
Gtk/CursorThemeName "Adwaita"
Net/EnableEventSounds 1
EnableInputFeedbackSounds 0
Xft/Antialias 1
Xft/Hinting 1
Xft/HintStyle "hintslight"
Xft/RGBA "rgb"
Net/DndDragThreshold 8
Gtk/CanChangeAccels 0
Gtk/ColorPalette "black:white:gray50:red:purple:blue:light blue:green:yellow:orange:lavender:brown:goldenrod4:dodger blue:pink:light green:gray10:gray30:gray75:gray90"
Gtk/FontName "Ubuntu 11"
Gtk/IconSizes ""
Gtk/KeyThemeName ""
Gtk/ToolbarStyle "both"
Gtk/ToolbarIconSize "large-toolbar"
Gtk/MenuImages 1
Gtk/ButtonImages 1
Gtk/MenuBarAccel "F10"
Gtk/CursorBlinkTime 1200
Gtk/CursorThemeSize 24
Gtk/DecorationLayout "close,minimize,maximize:"
Gtk/DialogsUseHeader 1
Gtk/PrimaryButtonWarpsSlider 1
Gtk/RecentFilesMaxAge 30
Gtk/ShellShowsAppMenu 0
Gtk/ShellShowsDesktop 0
Gtk/ShellShowsMenubar 0
Gtk/ShowInputMethodMenu 1
Gtk/ShowUnicodeMenu 1
Gtk/TimeoutExpand 500
Gtk/TimeoutInitial 200
Gtk/TimeoutRepeat 50
Gtk/TitlebarDoubleClick "toggle_maximize"
Gtk/TitlebarMiddleClick "lower"
Gtk/TitlebarRightClick "menu"
Gtk/UseOverlayScrollbars 1
Gtk/ApplicationPreferDarkTheme 1
EOF
# Update Qt6 theme using qt6ct # Update Qt6 theme using qt6ct
if command -v qt6ct >/dev/null 2>&1; then if command -v qt6ct >/dev/null 2>&1; then
export QT_QPA_PLATFORMTHEME=qt6ct export QT_QPA_PLATFORMTHEME=qt6ct
@@ -187,9 +231,18 @@ else
echo "⚠ Bar is not running - start it with: ~/repos/dwm/bar.sh" echo "⚠ Bar is not running - start it with: ~/repos/dwm/bar.sh"
fi fi
# Try to reload GTK applications via xsettingsd if available # Start or restart xsettingsd to apply theme changes dynamically
if command -v xsettingsd >/dev/null 2>&1; then if command -v xsettingsd >/dev/null 2>&1; then
pkill -HUP xsettingsd >/dev/null 2>&1 || true echo "Restarting xsettingsd for dynamic theme updates..."
# Kill existing xsettingsd
pkill xsettingsd >/dev/null 2>&1 || true
sleep 0.2
# Start xsettingsd with new configuration
nohup xsettingsd >/dev/null 2>&1 &
sleep 0.5
echo "✓ xsettingsd started with dark theme configuration"
else
echo "⚠ xsettingsd not found - install it for dynamic GTK theme updates"
fi fi
# Restart GTK settings daemon if using GNOME # Restart GTK settings daemon if using GNOME

View File

@@ -36,6 +36,50 @@ gtk-theme-name="Rosepine-Light"
gtk-icon-theme-name="Papirus-Light" gtk-icon-theme-name="Papirus-Light"
EOF EOF
# Configure xsettingsd for dynamic theme updates
mkdir -p "$HOME/.config/xsettingsd"
cat > "$HOME/.config/xsettingsd/xsettingsd.conf" << EOF
Net/ThemeName "Rosepine-Light"
Net/IconThemeName "Papirus-Light"
Gtk/CursorThemeName "Adwaita"
Net/EnableEventSounds 1
EnableInputFeedbackSounds 0
Xft/Antialias 1
Xft/Hinting 1
Xft/HintStyle "hintslight"
Xft/RGBA "rgb"
Net/DndDragThreshold 8
Gtk/CanChangeAccels 0
Gtk/ColorPalette "black:white:gray50:red:purple:blue:light blue:green:yellow:orange:lavender:brown:goldenrod4:dodger blue:pink:light green:gray10:gray30:gray75:gray90"
Gtk/FontName "Ubuntu 11"
Gtk/IconSizes ""
Gtk/KeyThemeName ""
Gtk/ToolbarStyle "both"
Gtk/ToolbarIconSize "large-toolbar"
Gtk/MenuImages 1
Gtk/ButtonImages 1
Gtk/MenuBarAccel "F10"
Gtk/CursorBlinkTime 1200
Gtk/CursorThemeSize 24
Gtk/DecorationLayout "close,minimize,maximize:"
Gtk/DialogsUseHeader 1
Gtk/PrimaryButtonWarpsSlider 1
Gtk/RecentFilesMaxAge 30
Gtk/ShellShowsAppMenu 0
Gtk/ShellShowsDesktop 0
Gtk/ShellShowsMenubar 0
Gtk/ShowInputMethodMenu 1
Gtk/ShowUnicodeMenu 1
Gtk/TimeoutExpand 500
Gtk/TimeoutInitial 200
Gtk/TimeoutRepeat 50
Gtk/TitlebarDoubleClick "toggle_maximize"
Gtk/TitlebarMiddleClick "lower"
Gtk/TitlebarRightClick "menu"
Gtk/UseOverlayScrollbars 1
Gtk/ApplicationPreferDarkTheme 0
EOF
# Update Qt6 theme using qt6ct # Update Qt6 theme using qt6ct
if command -v qt6ct >/dev/null 2>&1; then if command -v qt6ct >/dev/null 2>&1; then
export QT_QPA_PLATFORMTHEME=qt6ct export QT_QPA_PLATFORMTHEME=qt6ct
@@ -188,9 +232,18 @@ else
echo "⚠ Bar is not running - start it with: ~/repos/dwm/bar.sh" echo "⚠ Bar is not running - start it with: ~/repos/dwm/bar.sh"
fi fi
# Try to reload GTK applications via xsettingsd if available # Start or restart xsettingsd to apply theme changes dynamically
if command -v xsettingsd >/dev/null 2>&1; then if command -v xsettingsd >/dev/null 2>&1; then
pkill -HUP xsettingsd >/dev/null 2>&1 || true echo "Restarting xsettingsd for dynamic theme updates..."
# Kill existing xsettingsd
pkill xsettingsd >/dev/null 2>&1 || true
sleep 0.2
# Start xsettingsd with new configuration
nohup xsettingsd >/dev/null 2>&1 &
sleep 0.5
echo "✓ xsettingsd started with light theme configuration"
else
echo "⚠ xsettingsd not found - install it for dynamic GTK theme updates"
fi fi
# Restart GTK settings daemon if using GNOME # Restart GTK settings daemon if using GNOME