hardcode uquota binary path since, its not available in the PATH of the systemd unit

This commit is contained in:
Daniel Lovbrotte Olsen 2022-05-22 05:02:06 +02:00
parent d927b9d4a3
commit 313cd57bf3
1 changed files with 2 additions and 2 deletions

View File

@ -20,9 +20,9 @@
services.polybar.config."module/uquota" = { services.polybar.config."module/uquota" = {
type = "custom/script"; type = "custom/script";
exec-if = "which uquota"; exec-if = "test -f /usr/local/bin/uquota";
exec = "" + pkgs.writers.writePerl "parse_uquota" { } '' exec = "" + pkgs.writers.writePerl "parse_uquota" { } ''
my $raw = `uquota`; my $raw = `/usr/local/bin/uquota`;
if ( $raw =~ /Du har brukt (\d+(?:[KMGT]iB)) av (\d+(?:[KMGT]iB)), eller (\d+)/ ) if ( $raw =~ /Du har brukt (\d+(?:[KMGT]iB)) av (\d+(?:[KMGT]iB)), eller (\d+)/ )
{ {
print $3 . "%\n"; print $3 . "%\n";