diff --git a/config/i3status-rs/config.toml b/config/i3status-rs/config.toml deleted file mode 100644 index 5c327067..00000000 --- a/config/i3status-rs/config.toml +++ /dev/null @@ -1,29 +0,0 @@ -[[block]] -block = "net" -format = " $ip " - -[[block]] -block = "battery" - -[[block]] -block = "cpu" - -[[block]] -block = "memory" -format = " $icon $mem_total_used_percents.eng(w:2) " -format_alt = " $icon_swap $swap_used_percents.eng(w:2) " - -[[block]] -block = "disk_space" -path = "/" -info_type = "available" -alert_unit = "GB" -interval = 20 -warning = 20.0 -alert = 10.0 -format = " $icon $available.eng(w:2) " - -[[block]] -block = "time" -interval = 60 -format = " $timestamp.datetime(f:'%a %d/%m/%Y %R') " diff --git a/config/sway/config b/config/sway/config index 384a2f1b..7205e4f1 100644 --- a/config/sway/config +++ b/config/sway/config @@ -232,7 +232,7 @@ bar { # When the status_command prints a new line to stdout, swaybar updates. # The default just shows the current date and time. # status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done - status_command /run/current-system/sw/bin/i3status-rs ~/.config/i3status-rs/config.toml + status_command i3status-rs ~/.config/i3status-rust/config-default.toml colors { statusline #ffffff diff --git a/home-manager/modules/common.nix b/home-manager/modules/common.nix index cc305c4e..f3d11d34 100644 --- a/home-manager/modules/common.nix +++ b/home-manager/modules/common.nix @@ -247,11 +247,6 @@ in recursive = true; }; - xdg.configFile.i3status-rs = { - source = ../../config/i3status-rs; - recursive = true; - }; - xdg.configFile.nvim = { source = ../../config/neovim; recursive = true; diff --git a/home-manager/modules/home-manager.nix b/home-manager/modules/home-manager.nix index 780a25da..ef13b046 100644 --- a/home-manager/modules/home-manager.nix +++ b/home-manager/modules/home-manager.nix @@ -5,4 +5,46 @@ home.stateVersion = "22.05"; programs.home-manager.enable = true; + + programs.i3status-rust = { + enable = true; + + bars = { + default = { + blocks = [ + { + block = "net"; + format = " $ip "; + } + { + block = "battery"; + format = " $icon $percentage $time "; + } + { + block = "cpu"; + } + { + block = "memory"; + format = " $icon $mem_total_used_percents.eng(w:2) "; + format_alt = " $icon_swap $swap_used_percents.eng(w:2) "; + } + { + block = "disk_space"; + path = "/"; + info_type = "available"; + alert_unit = "GB"; + interval = 20; + warning = 20.0; + alert = 10.0; + format = " $icon $available.eng(w:2) "; + } + { + block = "time"; + interval = 1; + format = " $timestamp.datetime(f:'%F %T') "; + } + ]; + }; + }; + }; }