lupan-set-theme follow links, awesome lighter fg_normal

- awesome: fg_normal is common between themes so make it somewhat
lighter then it was on dark theme
This commit is contained in:
2025-09-29 22:18:53 +02:00
parent 270338f6d3
commit f76cac70eb
3 changed files with 20 additions and 15 deletions

View File

@@ -16,7 +16,7 @@ theme.bg_minimize = "#454f54" -- hsl(200 10% 30%)
theme.bg_systray = theme.bg_normal theme.bg_systray = theme.bg_normal
theme.tasklist_bg_focus = "#1c3b4a" -- hsl(200 45% 20%) theme.tasklist_bg_focus = "#1c3b4a" -- hsl(200 45% 20%)
theme.fg_normal = "#73848c" -- hsl(200 10% 50%) theme.fg_normal = "#8f9ca3" -- hsl(200 10% 60%)
theme.fg_focus = "#abb5ba" -- hsl(200 10% 70%) theme.fg_focus = "#abb5ba" -- hsl(200 10% 70%)
theme.fg_urgent = theme.bg_focus theme.fg_urgent = theme.bg_focus
theme.fg_minimize = theme.fg_normal theme.fg_minimize = theme.fg_normal

View File

@@ -16,7 +16,7 @@ theme.bg_minimize = "#8596ad" -- hsl(214 20% 60%)
theme.bg_systray = theme.bg_normal theme.bg_systray = theme.bg_normal
theme.tasklist_bg_focus = "#a6c7f2" -- hsl(214 75% 80%) theme.tasklist_bg_focus = "#a6c7f2" -- hsl(214 75% 80%)
theme.fg_normal = "#a9bcd6" -- hsl(214 35% 75%) theme.fg_normal = "#8f9ca3" -- hsl(200 10% 60%)
theme.fg_focus = "#454b54" -- hsl(214 10% 30%) theme.fg_focus = "#454b54" -- hsl(214 10% 30%)
theme.fg_urgent = "#70675c" -- hsl(34 10% 40%) theme.fg_urgent = "#70675c" -- hsl(34 10% 40%)
theme.fg_minimize = "#70675c" -- hsl(34 10% 40%) theme.fg_minimize = "#70675c" -- hsl(34 10% 40%)

View File

@@ -2,8 +2,9 @@
THEME="$1" THEME="$1"
XSET=$(readlink -e ~/.config/xsettingsd/xsettingsd.conf)
if [ "$THEME" = "toggle" ]; then if [ "$THEME" = "toggle" ]; then
if grep Materia-dark ~/.config/xsettingsd/xsettingsd.conf > /dev/null; then if grep Materia-dark "$XSET" > /dev/null; then
THEME=light THEME=light
else else
THEME=dark THEME=dark
@@ -19,22 +20,25 @@ else
exit 1 exit 1
fi fi
if [ -f ~/.Xresources ]; then XRES=$(readlink -e ~/.Xresources)
if [ -n "$XRES" ]; then
if [ "$THEME" = dark ]; then if [ "$THEME" = dark ]; then
sed -i 's/^#undef THEME_DARK/#define THEME_DARK/' ~/.Xresources sed -i 's/^#undef THEME_DARK/#define THEME_DARK/' "$XRES"
elif [ "$THEME" = light ]; then elif [ "$THEME" = light ]; then
sed -i 's/^#define THEME_DARK/#undef THEME_DARK/' ~/.Xresources sed -i 's/^#define THEME_DARK/#undef THEME_DARK/' "$XRES"
fi fi
xrdb -merge ~/.Xresources xrdb -merge "$XRES"
killall -USR1 st killall -USR1 st
fi fi
# Alacritty # Alacritty
if [ -f ~/.config/alacritty/alacritty.yml ]; then AYML=$(readlink -e ~/.config/alacritty/alacritty.yml)
sed -i "s/^colors: [*].*/colors: *$THEME/" ~/.config/alacritty/alacritty.yml if [ -n "$AYML" ]; then
sed -i "s/^colors: [*].*/colors: *$THEME/" "$AYML"
fi fi
if [ -f ~/.config/alacritty/alacritty.toml ]; then ATOML=$(readlink -e ~/.config/alacritty/alacritty.toml)
sed -i "s#^import =.*#import = [\"~/.config/alacritty/$THEME.toml\"]#" ~/.config/alacritty/alacritty.toml if [ -f "$ATOML" ]; then
sed -i "s#^import =.*#import = [\"~/.config/alacritty/$THEME.toml\"]#" "$ATOML"
fi fi
if [ "$THEME" = dark ]; then if [ "$THEME" = dark ]; then
@@ -44,13 +48,14 @@ elif [ "$THEME" = light ]; then
fi fi
# GTK # GTK
if [ -f ~/.config/xsettingsd/xsettingsd.conf ]; then if [ -n "$XSET" ]; then
sed -i -E "s#(Net/ThemeName) .*#\\1 \"${GTK_THEME}\"#" ~/.config/xsettingsd/xsettingsd.conf sed -i -E "s#(Net/ThemeName) .*#\\1 \"${GTK_THEME}\"#" "$XSET"
pkill -HUP -x xsettingsd pkill -HUP -x xsettingsd
gsettings set org.gnome.desktop.interface gtk-theme "${GTK_THEME}" gsettings set org.gnome.desktop.interface gtk-theme "${GTK_THEME}"
fi fi
# waybar # waybar
if [ -f ~/.config/waybar/style.css ]; then WCSS=$(readlink -e ~/.config/waybar/style.css)
sed -i -E "s#file:///.*/(light|dark)[.]css#file://$HOME/.config/waybar/$THEME.css#" ~/.config/waybar/style.css if [ -f "$WCSS" ]; then
sed -i -E "s#file:///.*/(light|dark)[.]css#file://$HOME/.config/waybar/$THEME.css#" "$WCSS"
fi fi