move project to ~/.config/i3blocks/
This commit is contained in:
16
storage
Executable file
16
storage
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
df | gawk '
|
||||
/\/$/ {
|
||||
sfg=$4/1024^2
|
||||
sfm=$4/1024
|
||||
}
|
||||
END {
|
||||
if (sfg > 5) { printf("%.1f GB", sfg) }
|
||||
else { printf( "%.0f MB", sfm ) }
|
||||
print("\n")
|
||||
if (sfg > 15) { print("#04B431\n") }
|
||||
else if (sfg > 5) { print("#FFA500\n") }
|
||||
else if (sfg > 1) { print("#FF0000\n") }
|
||||
else { exit 33 }
|
||||
}'
|
||||
|
Reference in New Issue
Block a user