From f033c21cacde9b40fe504af652fc7ae1a4925b96 Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Mon, 2 May 2022 23:45:57 +0200 Subject: [PATCH] Show quota --- machines/pvv-terminal.nix | 21 +++++++++++++++------ profiles/base/default.nix | 5 +++-- profiles/xsession/.polybar.nix.swp | Bin 1024 -> 0 bytes profiles/xsession/polybar.nix | 4 ++-- 4 files changed, 20 insertions(+), 10 deletions(-) delete mode 100644 profiles/xsession/.polybar.nix.swp diff --git a/machines/pvv-terminal.nix b/machines/pvv-terminal.nix index db61f84..d5c3353 100644 --- a/machines/pvv-terminal.nix +++ b/machines/pvv-terminal.nix @@ -6,6 +6,7 @@ name = "PVV Terminal"; eth = null; wlan = null; + secondary-fs = null; }; profiles.base.enable = true; profiles.gui.enable = true; @@ -15,14 +16,22 @@ profiles.audio.fancy = false; - services.gammastep = { - enable = true; - dawnTime = "7:00-8:15"; - duskTime = "21:30-22:30"; - }; - profiles.games.enable = false; + services.polybar.config."module/uquota" = { + type = "custom/script"; + exec-if = "which uquota"; + exec = "" + pkgs.writers.writePerl "parse_uquota" { } '' + my $raw = `uquota`; + if ( $raw =~ /Du har brukt (\d+(?:[KMGT]iB)) av (\d+(?:[KMGT]iB)), eller (\d+)/ ) + { + print $3 . "%\n"; + } + ''; + interval = 10; + format = "ﴥ