From 4757cf446565fbd04ba847a454bbb3fd41a7a3d3 Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Thu, 2 Sep 2021 19:53:54 -0400 Subject: [PATCH] merge i3status-rs config --- modules/i3/default.nix | 27 +++++++++++++-------------- modules/i3/i3srs.toml | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 14 deletions(-) create mode 100644 modules/i3/i3srs.toml diff --git a/modules/i3/default.nix b/modules/i3/default.nix index 93738f6..91cfc56 100644 --- a/modules/i3/default.nix +++ b/modules/i3/default.nix @@ -19,6 +19,19 @@ in echo 'Xcursor.size: 24' | xrdb -merge xsetroot -solid '#333333' ''; + configFile = pkgs.runCommand "i3config" { } '' + ( + cat '${pkgs.i3}/etc/i3/config' | + sed 's/Mod1/Mod4/' | + sed 's/^exec i3-config-wizard/#&/' | + sed 's/^font.*/font pango:DejaVuSans, FontAwesome5Free 12/' | + sed 's,status_command i3status,status_command i3status-rs ${./i3srs.toml} \n tray_output primary,' | + sed 's/i3-sensible-terminal/alacritty/' | + sed 's/10%/2%/' + cat '${pkgs.writeText "i3extra" cfg.extraConfig}' + )| + tee "$out" + ''; }; hardware.pulseaudio.enable = true; @@ -29,20 +42,6 @@ in gtk-icon-theme-name=Numix ''; - environment.etc."i3/config".source = pkgs.runCommand "i3config" { } '' - ( - cat '${pkgs.i3}/etc/i3/config' | - sed 's/Mod1/Mod4/' | - sed 's/^exec i3-config-wizard/#&/' | - sed 's/^font.*/font pango:DejaVuSans, FontAwesome5Free 12/' | - sed 's,status_command i3status,status_command i3status-rs \n tray_output primary,' | - sed 's/i3-sensible-terminal/alacritty/' | - sed 's/10%/2%/' - cat '${pkgs.writeText "i3extra" cfg.extraConfig}' - )| - tee "$out" - ''; - sconfig.i3.extraConfig = '' default_border normal 4 default_floating_border normal 4 diff --git a/modules/i3/i3srs.toml b/modules/i3/i3srs.toml new file mode 100644 index 0000000..fe82d2a --- /dev/null +++ b/modules/i3/i3srs.toml @@ -0,0 +1,35 @@ +theme = "native" +icons = "awesome5" + +[[block]] +block = "disk_space" +path = "/nix/store" +alias = "/nix/store" +info_type = "available" +unit = "GB" +interval = 20 +warning = 20.0 +alert = 10.0 + +[[block]] +block = "memory" +display_type = "memory" +format_mem = "{mem_used_percents}" +format_swap = "{swap_used_percents}" + +[[block]] +block = "cpu" +interval = 5 + +[[block]] +block = "sound" +device_kind = "source" + +[[block]] +block = "sound" +device_kind = "sink" + +[[block]] +block = "time" +interval = 5 +format = "%a %m/%d %R"