From 23a888aa872a5deefc000288932ea213f1415402 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sat, 24 Sep 2022 12:13:36 +0200 Subject: add xsettingsd for live gtk theme switching --- .config/i3/autostart##template | 1 + .../xfce4/xfconf/xfce-perchannel-xml/xsettings.xml | 44 ++++++++++++++++++++++ .local/share/bin/mode | 1 + 3 files changed, 46 insertions(+) create mode 100644 .config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml diff --git a/.config/i3/autostart##template b/.config/i3/autostart##template index 6c33a94..be02602 100644 --- a/.config/i3/autostart##template +++ b/.config/i3/autostart##template @@ -15,6 +15,7 @@ xset r rate 250 40 autocutsel & fcitx5 -d zsh -c "xbindkeys -f ~/.config/xbindkeys/main" +xfsettingsd & {% if yadm.hostname == "thoncc" %} xdimmer -t 45 -p 3 & light-locker --no-late-locking & diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml new file mode 100644 index 0000000..c0435d9 --- /dev/null +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.local/share/bin/mode b/.local/share/bin/mode index 27851e2..e25404b 100755 --- a/.local/share/bin/mode +++ b/.local/share/bin/mode @@ -92,6 +92,7 @@ switch_gtk() { sed "s/-Light/-Dark/" -i ~/.config/gtk-3.0/settings.ini sed "s/gtk-application-prefer-dark-theme.*/gtk-application-prefer-dark-theme=true/" -i ~/.config/gtk-3.0/settings.ini fi + grep gtk-theme-name .config/gtk-3.0/settings.ini | cut -f2 -d= | xargs xfconf-query -c xsettings -p /Net/ThemeName -s } switch_fcitx5() { -- cgit v1.2.3