mirror of
https://git.adityakumar.xyz/dwmbar.git
synced 2024-11-10 06:29:44 +00:00
Added disksize module
This commit is contained in:
parent
d66f63d8fa
commit
4161ad75cc
2 changed files with 16 additions and 0 deletions
16
modules/disksize
Executable file
16
modules/disksize
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Prints out the total disk memory and the availeable memory
|
||||||
|
|
||||||
|
PREFIX=' '
|
||||||
|
|
||||||
|
get_disk()
|
||||||
|
{
|
||||||
|
TOTAL_SIZE=$( df -h --total / | tail -1 | awk {'printf $2'})
|
||||||
|
USED_SIZE=$(df -h --total / | tail -1 | awk {'printf $3'})
|
||||||
|
PERCENTAGE=$(df -h --total / | tail -1 | awk {'printf $5'})
|
||||||
|
|
||||||
|
echo "$PREFIX$USED_SIZE/$TOTAL_SIZE ($PERCENTAGE)"
|
||||||
|
}
|
||||||
|
|
||||||
|
get_disk
|
0
modules/ram
Normal file → Executable file
0
modules/ram
Normal file → Executable file
Loading…
Reference in a new issue