From 08801db8bd9369176822162af2e0623037b3be7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 18 Apr 2020 13:02:19 +0100 Subject: [PATCH] switch to i3-status-rust --- .config/i3/status.toml | 36 ++++++++++++++++++++++++++++++++++++ nixos/i3/autorandr.nix | 2 +- nixos/i3/home.nix | 1 - nixos/i3/i3.nix | 13 ++++++++++++- 4 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 .config/i3/status.toml diff --git a/.config/i3/status.toml b/.config/i3/status.toml new file mode 100644 index 00000000..248a06db --- /dev/null +++ b/.config/i3/status.toml @@ -0,0 +1,36 @@ +theme = "solarized-dark" +icons = "awesome" + +[[block]] +block = "disk_space" +path = "/" +alias = "/" +info_type = "available" +unit = "GB" +interval = 20 +warning = 20.0 +alert = 10.0 + +[[block]] +block = "memory" +display_type = "memory" +format_mem = "{Mup}%" +format_swap = "{SUp}%" + +[[block]] +block = "cpu" +interval = 1 + +[[block]] +block = "load" +interval = 1 +format = "{1m}" + +[[block]] +block = "sound" + +[[block]] +block = "time" +interval = 60 +format = "%a %d/%m %R" + diff --git a/nixos/i3/autorandr.nix b/nixos/i3/autorandr.nix index be2a50b5..4a7bfdd9 100644 --- a/nixos/i3/autorandr.nix +++ b/nixos/i3/autorandr.nix @@ -8,7 +8,7 @@ postswitch = { "restart-compton" = "systemctl --user restart picom"; "restart-i3" = "i3-msg restart"; - "restart-services" = "systemctl --user restart kdeconnect-indicator.service kdeconnect.service network-manager-applet.service pasystray.service polybar.service"; + "restart-services" = "systemctl --user restart kdeconnect-indicator.service kdeconnect.service network-manager-applet.service pasystray.service"; }; }; diff --git a/nixos/i3/home.nix b/nixos/i3/home.nix index 3b4faaeb..7da32cf2 100644 --- a/nixos/i3/home.nix +++ b/nixos/i3/home.nix @@ -1,7 +1,6 @@ { config, pkgs, ... }: { imports = [ - ./polybar/polybar.nix ./i3.nix ./dunst.nix ./autorandr.nix diff --git a/nixos/i3/i3.nix b/nixos/i3/i3.nix index 493a3c17..73e77709 100644 --- a/nixos/i3/i3.nix +++ b/nixos/i3/i3.nix @@ -3,7 +3,12 @@ let mod = "Mod4"; in { + home.packages = with pkgs; [ + font-awesome-ttf + i3status-rust + ]; + home.file.".config/i3/status.toml".source = ~/dev/dotfiles/.config/i3/status.toml; xsession.windowManager.i3 = { enable = true; package = pkgs.i3-gaps; @@ -24,7 +29,13 @@ in }; workspaceLayout = "tabbed"; - bars = []; + bars = [ + { + position = "top"; + fonts = [ "Iosevka" "FontAwesome 10" ]; + statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${config.xdg.configHome}/i3/status.toml"; + } + ]; modifier = mod; keybindings = {