2023-06-06 05:09:22 -04:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
compileSCSS = name: source: "${pkgs.runCommandLocal name {} ''
|
|
|
|
mkdir -p $out
|
|
|
|
${lib.getExe pkgs.sassc} -t expanded '${source}' > $out/${name}.css
|
|
|
|
''}/${name}.css";
|
|
|
|
in {
|
|
|
|
programs.ironbar = {
|
|
|
|
enable = true;
|
|
|
|
systemd = true;
|
|
|
|
style = builtins.readFile (compileSCSS "style" ./style.scss);
|
|
|
|
config = let
|
2023-06-06 18:06:54 -04:00
|
|
|
nixlogo = rec {
|
2023-06-06 05:09:22 -04:00
|
|
|
type = "custom";
|
2023-06-06 18:06:54 -04:00
|
|
|
name = "nixlogo";
|
|
|
|
class = name;
|
2023-06-06 05:09:22 -04:00
|
|
|
bar = [
|
|
|
|
{
|
|
|
|
type = "image";
|
|
|
|
src = "https://files.artturin.com/files/nixoscolorful.svg";
|
|
|
|
size = 24;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2023-06-06 18:06:54 -04:00
|
|
|
pfp = rec {
|
2023-06-06 05:09:22 -04:00
|
|
|
type = "custom";
|
2023-06-06 18:06:54 -04:00
|
|
|
name = "pfp";
|
|
|
|
class = name;
|
2023-06-06 05:09:22 -04:00
|
|
|
bar = [
|
|
|
|
{
|
|
|
|
type = "image";
|
|
|
|
src = "https://img.notohh.dev/JoYRnUdM.png";
|
|
|
|
size = 24;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2023-06-06 18:06:54 -04:00
|
|
|
music = {
|
|
|
|
type = "music";
|
|
|
|
player_type = "mpris";
|
|
|
|
format = "{title} - {artist}";
|
|
|
|
show_status_icon = false;
|
|
|
|
icons.play = "";
|
|
|
|
icons.pause = "";
|
|
|
|
truncate = {
|
|
|
|
mode = "end";
|
|
|
|
max_length = 36;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
music_img = rec {
|
|
|
|
type = "custom";
|
|
|
|
name = "music-img";
|
|
|
|
class = name;
|
|
|
|
bar = [
|
|
|
|
{
|
|
|
|
type = "image";
|
|
|
|
class = name + "-img";
|
2023-06-06 19:52:34 -04:00
|
|
|
src = ''{{poll:2000:playerctl metadata mpris:artUrl}}'';
|
2023-06-06 18:06:54 -04:00
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
spacer = {
|
|
|
|
type = "label";
|
|
|
|
label = "|";
|
|
|
|
};
|
2023-06-06 05:09:22 -04:00
|
|
|
focused = {
|
|
|
|
type = "focused";
|
|
|
|
show_icon = true;
|
|
|
|
icon_size = 24;
|
|
|
|
truncate = {
|
|
|
|
mode = "end";
|
2023-06-06 18:06:54 -04:00
|
|
|
max_length = 24;
|
2023-06-06 05:09:22 -04:00
|
|
|
};
|
|
|
|
};
|
2023-06-06 19:52:34 -04:00
|
|
|
uptime = rec {
|
|
|
|
type = "sys_info";
|
|
|
|
name = "uptime";
|
|
|
|
class = name;
|
|
|
|
format = [" {uptime}"];
|
|
|
|
};
|
2023-06-06 05:09:22 -04:00
|
|
|
sys-info = {
|
|
|
|
type = "sys_info";
|
|
|
|
format = [
|
|
|
|
"{cpu_percent}% "
|
|
|
|
"{memory_percent}% "
|
|
|
|
"{net_up:enp2s0} {net_down:enp2s0}"
|
|
|
|
];
|
|
|
|
};
|
2023-06-18 02:36:50 -04:00
|
|
|
tray = {type = "tray";}; # tray currently broken - issue 166
|
2023-06-06 05:09:22 -04:00
|
|
|
clock = {type = "clock";};
|
|
|
|
in {
|
|
|
|
monitors = {
|
|
|
|
"DP-3" = {
|
|
|
|
position = "top";
|
|
|
|
anchor_to_edges = true;
|
|
|
|
start = [nixlogo];
|
2023-06-06 19:52:34 -04:00
|
|
|
center = [music spacer focused spacer uptime];
|
2023-06-18 02:36:50 -04:00
|
|
|
end = [sys-info clock tray];
|
2023-06-06 05:09:22 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|