diff --git a/.config/i3/i3-status.toml b/.config/i3/i3-status.toml index 5f50434f..dbb887cc 100644 --- a/.config/i3/i3-status.toml +++ b/.config/i3/i3-status.toml @@ -26,6 +26,11 @@ block = "memory" display_type = "memory" format_mem = "{mem_used} /{mem_total}({mem_used_percents})" +[[block]] +block = "custom" +command = ''' sudo intel_gpu_top -l | head -n4 | tail -n1 | awk '{print " " $8 "%"}' ''' +interval = 5 + [[block]] block = "load" interval = 5 diff --git a/nixos/i3/default.nix b/nixos/i3/default.nix index 451db57c..ad77450f 100644 --- a/nixos/i3/default.nix +++ b/nixos/i3/default.nix @@ -5,6 +5,13 @@ ]; programs.dconf.enable = true; + security.sudo.extraRules = [ + { + users = [ "cyryl" ]; + commands = [ { command = "${pkgs.intel-gpu-tools}/bin/intel_gpu_top"; options = [ "NOPASSWD" ]; } ]; + } + ]; + services = { physlock = { enable = true; diff --git a/nixos/i3/i3.nix b/nixos/i3/i3.nix index 720b848a..56fc0d06 100644 --- a/nixos/i3/i3.nix +++ b/nixos/i3/i3.nix @@ -5,7 +5,7 @@ in { home.packages = with pkgs; [ font-awesome-ttf - unstable.i3status-rust + intel-gpu-tools ]; xsession.windowManager.i3 = {