summaryrefslogtreecommitdiffstats
path: root/lass/2configs
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-05-10 18:57:57 +0200
committerlassulus <lassulus@lassul.us>2022-05-10 18:57:57 +0200
commitc4888bf3ff629dafebe4758b37ea16cebae0265a (patch)
tree205e1aa26dbb03bd29cdceb8a99c4cca1bd5c296 /lass/2configs
parent376b92c877442ec3be476ea5f4c89f8a715426dd (diff)
l themes: fix startup, add xresources
Diffstat (limited to 'lass/2configs')
-rw-r--r--lass/2configs/themes.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/lass/2configs/themes.nix b/lass/2configs/themes.nix
index 118619c1d..e020c62c4 100644
--- a/lass/2configs/themes.nix
+++ b/lass/2configs/themes.nix
@@ -12,6 +12,7 @@
${pkgs.rsync}/bin/rsync --chown=lass:users -a --delete "/etc/themes/$1/" /var/theme/config/
echo "$1" > /var/theme/current_theme
${pkgs.coreutils}/bin/chown lass:users /var/theme/current_theme
+ ${pkgs.xorg.xrdb}/bin/xrdb -merge /var/theme/config/xresources
${pkgs.procps}/bin/pkill -HUP xsettingsd
else
echo "theme $1 not found"
@@ -26,6 +27,8 @@ in {
serviceConfig = {
ExecStart = "${pkgs.xsettingsd}/bin/xsettingsd -c /var/theme/config/xsettings.conf";
User = "lass";
+ Restart = "always";
+ RestartSec = "15s";
};
};
systemd.tmpfiles.rules = [
@@ -38,11 +41,20 @@ in {
"themes/light/xsettings.conf".text = ''
Net/ThemeName "Adwaita"
'';
+ "themes/light/xresources".text = ''
+ *background: #ffffff
+ *foreground: #000000
+ '';
"themes/dark/xsettings.conf".text = ''
Net/ThemeName "Adwaita-dark"
'';
+ "themes/dark/xresources".text = ''
+ *background: #000000
+ *foreground: #ffffff
+ '';
};
system.activationScripts.theme.text = ''
+ export DISPLAY=:0
if test -e /var/theme/current_theme; then
${switch-theme}/bin/switch-theme "$(cat /var/theme/current_theme)" ||
${switch-theme}/bin/switch-theme dark