update status bar

This commit is contained in:
Ingolf Wagner 2022-10-12 18:27:33 +02:00
parent dc6e79e08c
commit b0c1b414bf
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -7,7 +7,7 @@ let
theme = (import ../../../library/colorThemes.nix).solarized.light.hex; theme = (import ../../../library/colorThemes.nix).solarized.light.hex;
in in
theme // { theme // {
forground = theme.base3; foreground = theme.base3;
background = theme.base03; background = theme.base03;
}; };
@ -15,59 +15,101 @@ in
{ {
home-manager.users.mainUser = { home-manager.users.mainUser = {
programs.i3status-rust.enable = true; programs.i3status-rust = {
enable = true;
bars = {
my = {
icons = "awesome5";
theme = "solarized-light";
# https://github.com/greshake/i3status-rust/blob/v0.22.0/doc/blocks.md
blocks = [
{
block = "cpu";
interval = 1;
}
{
block = "memory";
display_type = "memory";
format_mem = "{mem_used_percents}";
format_swap = "{swap_used_percents}";
}
{
block = "load";
interval = 1;
format = "{1m}";
}
{
block = "battery";
interval = 10;
format = "{percentage} {time}";
}
{ block = "uptime"; }
{
block = "time";
interval = 60;
format = "%Y-%m-%d %R";
}
];
};
};
};
xsession.windowManager.i3 = { xsession.windowManager.i3 = {
enable = true; enable = true;
config = { config = {
modifier = "Mod4"; modifier = "Mod4";
startup = [ startup =
let
height = config.configuration.desktop.height;
width = config.configuration.desktop.width;
in
[
{ command = "${pkgs.albert}/bin/albert"; always = true; } { command = "${pkgs.albert}/bin/albert"; always = true; }
{
command = "${pkgs.polygon-art.polygon-art}/bin/rings --height ${toString height} --width ${toString width} /dev/shm/background.png && ${pkgs.feh}/bin/feh --bg-scale /dev/shm/background.png";
always = true;
}
# { command = "systemctl --user restart polybar"; always = true; notification = false; } # { command = "systemctl --user restart polybar"; always = true; notification = false; }
]; ];
bars = bars =
[{ [{
mode = "hide"; mode = "hide";
hiddenState = "hide"; hiddenState = "hide";
#modifier = "Mod4";
position = "bottom"; position = "bottom";
workspaceButtons = true; workspaceButtons = true;
workspaceNumbers = true; workspaceNumbers = true;
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${config.users.users.mainUser.home}/.config/i3status-rust/config-default.toml"; statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${config.users.users.mainUser.home}/.config/i3status-rust/config-my.toml";
fonts = { fonts = [ "Terminus" ];
names = [ "monospace" ];
size = 8.0;
};
trayOutput = "primary"; trayOutput = "primary";
colors = { colors = {
background = "#000000"; background = colorTheme.background;
statusline = "#ffffff"; statusline = colorTheme.background;
separator = "#666666"; separator = colorTheme.background;
focusedWorkspace = { focusedWorkspace = {
border = "#4c7899"; border = colorTheme.foreground;
background = "#285577"; background = colorTheme.foreground;
text = "#ffffff"; text = colorTheme.background;
}; };
activeWorkspace = { activeWorkspace = {
border = "#333333"; border = colorTheme.background;
background = "#5f676a"; background = colorTheme.background;
text = "#ffffff"; text = colorTheme.foreground;
}; };
inactiveWorkspace = { inactiveWorkspace = {
border = "#333333"; border = colorTheme.background;
background = "#222222"; background = colorTheme.background;
text = "#888888"; text = colorTheme.foreground;
}; };
urgentWorkspace = { urgentWorkspace = {
border = "#2f343a"; border = colorTheme.red;
background = "#900000"; background = colorTheme.background;
text = "#ffffff"; text = colorTheme.foreground;
}; };
bindingMode = { bindingMode = {
border = "#2f343a"; border = colorTheme.background;
background = "#900000"; background = colorTheme.background;
text = "#ffffff"; text = colorTheme.foreground;
}; };
}; };
}]; }];
@ -164,7 +206,7 @@ in
background = colorTheme.background; background = colorTheme.background;
# Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023) # Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023)
foreground = colorTheme.forground; foreground = colorTheme.foreground;
radius = 0; radius = 0;