Show quota
This commit is contained in:
		
							parent
							
								
									176c0569b8
								
							
						
					
					
						commit
						f033c21cac
					
				@ -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 = "ﴥ <label>";
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  programs.home-manager = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    path = "https://github.com/rycee/home-manager/archive/release-21.11.tar.gz";
 | 
			
		||||
 | 
			
		||||
@ -11,8 +11,9 @@ in {
 | 
			
		||||
    eth = lib.mkOption {};
 | 
			
		||||
    wlan = lib.mkOption {};
 | 
			
		||||
    secondary-fs = lib.mkOption {
 | 
			
		||||
      type = lib.types.str;
 | 
			
		||||
      default = "$HOME";
 | 
			
		||||
      type = lib.types.nullOr lib.types.nonEmptyStr;
 | 
			
		||||
      default = null;
 | 
			
		||||
      example = "''${env:HOME}";
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							@ -45,7 +45,7 @@ in
 | 
			
		||||
          module-margin-right = "2";
 | 
			
		||||
 | 
			
		||||
          modules-left = "i3 title";
 | 
			
		||||
          modules-right = "wlan eth filesystem cpu memory battery date";
 | 
			
		||||
          modules-right = "wlan eth filesystem uquota cpu memory battery date";
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        "module/i3" = {
 | 
			
		||||
@ -115,7 +115,7 @@ in
 | 
			
		||||
          interval = 25;
 | 
			
		||||
 | 
			
		||||
          mount-0 = "/";
 | 
			
		||||
          mount-1 = config.machine.secondary-fs;
 | 
			
		||||
          mount-1 = lib.mkIf (config.machine.secondary-fs != null) config.machine.secondary-fs;
 | 
			
		||||
 | 
			
		||||
          label-mounted = "%{F#0a81f5}%mountpoint%%{F-}: %free%";
 | 
			
		||||
          label-unmounted = "%mountpoint% not mounted";
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user