diff options
Diffstat (limited to 'scripts/.local/bin/personal/bar/smallstatus')
-rwxr-xr-x | scripts/.local/bin/personal/bar/smallstatus | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/.local/bin/personal/bar/smallstatus b/scripts/.local/bin/personal/bar/smallstatus new file mode 100755 index 0000000..09ddd9f --- /dev/null +++ b/scripts/.local/bin/personal/bar/smallstatus @@ -0,0 +1,21 @@ +#!/bin/dash + +flash() { + second="$(date +'%s')" + + if [ $((second % 2)) = 1 ]; then + echo $1 + else + echo $2 + fi +} + +sep="|" + +message="$(volume) $sep $(network) $sep $(temp) $sep $(datetime)" + +if [ ischarging ]; then + echo "$message" +else + flash "NOT CHARGING" "$message" +fi |