Forcing raw file overwrites

This commit is contained in:
2026-04-18 14:38:09 +02:00
parent d8b0eff04c
commit 5ffdc39090
4 changed files with 76 additions and 31 deletions

View File

@@ -4,25 +4,32 @@ let
theme = "dark";
in
{
home.file.".config/waybar/custom/htt.sh".text = ''
home.file.".config/waybar/custom/htt.sh" = {
text = ''
#!/bin/bash
if htt $HOME/.cache/htt/rules -q | grep float > /dev/null; then
echo '{"text": "", "class": "running", "tooltip": "Floating mode"}'
else
echo '{"text": "", "class": "stopped", "tooltip": "Tiling mode"}'
fi
'';
'';
force = true;
};
home.file.".config/waybar/custom/hyprsunset.sh".text = ''
home.file.".config/waybar/custom/hyprsunset.sh" = {
text = ''
#!/bin/bash
if pgrep -x hyprsunset > /dev/null; then
echo '{"text": "", "class": "running", "tooltip": "Night mode on"}'
else
echo '{"text": "", "class": "stopped", "tooltip": "Night mode off"}'
fi
'';
'';
force = true;
};
home.file.".config/waybar/config.jsonc".text = ''
home.file.".config/waybar/config.jsonc" = {
text = ''
// -*- mode: jsonc -*-
[{
"layer": "bottom", // Waybar at top layer
@@ -398,9 +405,12 @@ fi
}
}
}]
'';
'';
force = true;
};
home.file.".config/waybar/style_dark.css".text = ''
home.file.".config/waybar/style_dark.css" = {
text = ''
/*ACCENT COLOR: rgba(55, 87, 86, 1)*/
* {
/* `otf-font-awesome` is required to be installed for icons */
@@ -799,9 +809,12 @@ label:focus {
background-color: transparent;
box-shadow: inset 0 3px #689D6A;
}
'';
'';
force = true;
};
home.file.".config/waybar/style_light.css".text = ''
home.file.".config/waybar/style_light.css" = {
text = ''
/*ACCENT COLOR: rgba(55, 87, 86, 1)*/
* {
/* `otf-font-awesome` is required to be installed for icons */
@@ -1200,7 +1213,12 @@ label:focus {
background-color: transparent;
box-shadow: inset 0 3px #427B58;
}
'';
'';
force = true;
};
home.file.".config/waybar/style.css".source = config.home.file.".config/waybar/style_${theme}.css".source;
home.file.".config/waybar/style.css" = {
source = config.home.file.".config/waybar/style_${theme}.css".source;
force = true;
};
}