From 86f99da8d08e1f2e290d8ebfd5adb016faff7bac Mon Sep 17 00:00:00 2001 From: Biswakalyan Bhuyan Date: Sat, 24 Sep 2022 12:21:56 +0530 Subject: script's --- dwm_bar | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100755 dwm_bar (limited to 'dwm_bar') diff --git a/dwm_bar b/dwm_bar new file mode 100755 index 0000000..487c9a3 --- /dev/null +++ b/dwm_bar @@ -0,0 +1,66 @@ +#!/bin/env sh + +# INIT +printf "$$" > ~/.cache/pidofbar +sec=0 + +update_memory () { + memory="$(free -h | sed -n "2s/\([^ ]* *\)\{2\}\([^ ]*\).*/\2/p")" +} + +update_time () { + time="$(date "+[  %a %d %b ] [  %I:%M %P ]")" +} + +update_bat () { + # you might need to change the path depending on your device + read -r bat_status