Skip to content

Commit

Permalink
Linux: refactor i3status-rust
Browse files Browse the repository at this point in the history
  • Loading branch information
shajra committed Jan 15, 2024
1 parent 0b37913 commit 3d15c70
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 88 deletions.
2 changes: 1 addition & 1 deletion home/modules/base/gui/linux/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
programs.bash = import programs/bash;
programs.firefox = import programs/firefox config pkgs;
programs.fish = import programs/fish config pkgs;
programs.i3status-rust.enable = true;
programs.i3status-rust = import programs/i3status-rust config pkgs;
programs.rofi = import programs/rofi config pkgs;
programs.zathura.enable = true;

Expand Down
42 changes: 42 additions & 0 deletions home/modules/base/gui/linux/programs/i3status-rust/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
config: pkgs:

let

format = f: x: pkgs.lib.colors.format "#%R%G%B" (f x);
id = x: x;
foregroundFor = config.theme.colors.nominal.foregroundFor;
colors = pkgs.lib.colors.transformColors (format id) config.theme.colors;
foreground = pkgs.lib.colors.transformColors (format foregroundFor) config.theme.colors;

in

{
enable = true;
bars = {
bottom = {
icons = "awesome6";
settings.theme = {
overrides = {
idle_bg = colors.semantic.unifying;
idle_fg = foreground.semantic.unifying;
good_bg = colors.semantic.good;
good_fg = foreground.semantic.good;
info_bg = colors.semantic.info;
info_fg = foreground.semantic.info;
warning_bg = colors.semantic.warning;
warning_fg = foreground.semantic.warning;
critical_bg = colors.semantic.urgent;
critical_fg = foreground.semantic.urgent;

alternating_tint_bg = "#202020"; # lighten
alternating_tint_fg = "#202020"; # lighten

separator_bg = "auto";
separator_fg = "auto";
separator = "";
#separator = "";
};
};
};
};
}
29 changes: 0 additions & 29 deletions home/target/cake/programs/i3status-rust/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ let
user = config.home.username;
wpa_gui = "${pkgs.wpa_supplicant_gui}/bin/wpa_gui";

format = f: x: pkgs.lib.colors.format "#%R%G%B" (f x);
id = x: x;
foregroundFor = config.theme.colors.nominal.foregroundFor;
colors = pkgs.lib.colors.transformColors (format id) config.theme.colors;
foreground = pkgs.lib.colors.transformColors (format foregroundFor) config.theme.colors;

i3-zfs-health = pkgs.writeShellScriptBin "i3-zfs-health" ''
HEALTH="$(zpool list -H -o health cake)"
if [ "$HEALTH" != "ONLINE" ]
Expand Down Expand Up @@ -120,29 +114,6 @@ in
format = " $icon $timestamp.datetime(f:'%a %Y-%m-%d %l:%M %p') ";
}
];
icons = "awesome6";
settings.theme = {
overrides = {
idle_bg = colors.semantic.unifying;
idle_fg = foreground.semantic.unifying;
good_bg = colors.semantic.good;
good_fg = foreground.semantic.good;
info_bg = colors.semantic.info;
info_fg = foreground.semantic.info;
warning_bg = colors.semantic.warning;
warning_fg = foreground.semantic.warning;
critical_bg = colors.semantic.urgent;
critical_fg = foreground.semantic.urgent;

alternating_tint_bg = "#202020"; # lighten
alternating_tint_fg = "#202020"; # lighten

separator_bg = "auto";
separator_fg = "auto";
separator = "";
#separator = "";
};
};
};
};
}
29 changes: 0 additions & 29 deletions home/target/hole/programs/i3status-rust/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ let
user = config.home.username;
wpa_gui = "${pkgs.wpa_supplicant_gui}/bin/wpa_gui";

format = f: x: pkgs.lib.colors.format "#%R%G%B" (f x);
id = x: x;
foregroundFor = config.theme.colors.nominal.foregroundFor;
colors = pkgs.lib.colors.transformColors (format id) config.theme.colors;
foreground = pkgs.lib.colors.transformColors (format foregroundFor) config.theme.colors;

in

{
Expand Down Expand Up @@ -121,29 +115,6 @@ in
format = " $icon $timestamp.datetime(f:'%a %Y-%m-%d %l:%M %p') ";
}
];
icons = "awesome6";
settings.theme = {
overrides = {
idle_bg = colors.semantic.unifying;
idle_fg = foreground.semantic.unifying;
good_bg = colors.semantic.good;
good_fg = foreground.semantic.good;
info_bg = colors.semantic.info;
info_fg = foreground.semantic.info;
warning_bg = colors.semantic.warning;
warning_fg = foreground.semantic.warning;
critical_bg = colors.semantic.urgent;
critical_fg = foreground.semantic.urgent;

alternating_tint_bg = "#202020"; # lighten
alternating_tint_fg = "#202020"; # lighten

separator_bg = "auto";
separator_fg = "auto";
separator = "";
#separator = "";
};
};
};
};
}
29 changes: 0 additions & 29 deletions home/target/shajra/programs/i3status-rust/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ let
user = config.home.username;
wpa_gui = "${pkgs.wpa_supplicant_gui}/bin/wpa_gui";

format = f: x: pkgs.lib.colors.format "#%R%G%B" (f x);
id = x: x;
foregroundFor = config.theme.colors.nominal.foregroundFor;
colors = pkgs.lib.colors.transformColors (format id) config.theme.colors;
foreground = pkgs.lib.colors.transformColors (format foregroundFor) config.theme.colors;

in

{
Expand Down Expand Up @@ -74,29 +68,6 @@ in
format = " $icon $timestamp.datetime(f:'%a %Y-%m-%d %l:%M %p') ";
}
];
icons = "awesome6";
settings.theme = {
overrides = {
idle_bg = colors.semantic.unifying;
idle_fg = foreground.semantic.unifying;
good_bg = colors.semantic.good;
good_fg = foreground.semantic.good;
info_bg = colors.semantic.info;
info_fg = foreground.semantic.info;
warning_bg = colors.semantic.warning;
warning_fg = foreground.semantic.warning;
critical_bg = colors.semantic.urgent;
critical_fg = foreground.semantic.urgent;

alternating_tint_bg = "#202020"; # lighten
alternating_tint_fg = "#202020"; # lighten

separator_bg = "auto";
separator_fg = "auto";
separator = "";
#separator = "";
};
};
};
};
}

0 comments on commit 3d15c70

Please sign in to comment.