mirror of
https://git.adityakumar.xyz/dwmbar.git
synced 2024-11-22 02:22:53 +00:00
commit
71f3fd8a77
2 changed files with 26 additions and 0 deletions
13
modules/ram_perc
Executable file
13
modules/ram_perc
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Prints the total ram and used ram in Mb
|
||||
|
||||
PREFIX=' '
|
||||
|
||||
get_ram()
|
||||
{
|
||||
USED_RAM=$(free | awk '/Mem/{printf("%d"), $3/$2*100}')
|
||||
echo "$PREFIX$USED_RAM%"
|
||||
}
|
||||
|
||||
get_ram
|
13
modules/uptime
Executable file
13
modules/uptime
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Prints the total ram and used ram in Mb
|
||||
|
||||
PREFIX=''
|
||||
|
||||
get_uptime()
|
||||
{
|
||||
UPTIME=$(uptime | sed 's/.*up \([^,]*\), .*/\1/')
|
||||
echo "$PREFIX$UPTIME"
|
||||
}
|
||||
|
||||
get_uptime
|
Loading…
Reference in a new issue