sway/swaynag: Deduplicate config

This commit is contained in:
Simon Bruder 2021-03-04 09:39:14 +01:00
parent da6788d036
commit 4d474043a0
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -270,23 +270,26 @@ lib.mkIf nixosConfig.sbruder.gui.enable {
wdisplays # graphical output manager wdisplays # graphical output manager
]; ];
# FIXME deduplicate (everything except text is redundant) xdg.configFile."swaynag/config".text =
xdg.configFile."swaynag/config".text = '' let
# adding it to the header doesnt work since the defaults overwrite it
commonConfig = ''
background=fdf6e3
border-bottom=eee8d5
border=eee8d5
button-background=eee8d5
'';
in
''
font=Monospace 12 font=Monospace 12
[warning] [warning]
text=b58900 text=b58900
background=fdf6e3 ${commonConfig}
border=eee8d5
border-bottom=eee8d5
button-background=eee8d5
[error] [error]
text=dc322f text=dc322f
background=fdf6e3 ${commonConfig}
border=eee8d5
border-bottom=eee8d5
button-background=eee8d5
''; '';
# home-managers waybar module performs additional checks that are overly strict # home-managers waybar module performs additional checks that are overly strict