add bar
This commit is contained in:
commit
9c336785ac
2 changed files with 30 additions and 0 deletions
16
bar/README.md
Normal file
16
bar/README.md
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
bar.sh
|
||||||
|
======
|
||||||
|
|
||||||
|
Minimalistic statusbar for [dwm](http://dwm.suckless.org/)
|
||||||
|
|
||||||
|
Requires symbola for fancy utf-8 icons.
|
||||||
|
|
||||||
|
Information
|
||||||
|
-----------
|
||||||
|
|
||||||
|
* Date
|
||||||
|
* Volume percentage
|
||||||
|
* Battery percentage
|
||||||
|
* Charger connection
|
||||||
|
* Connman status
|
||||||
|
* vpn status
|
14
bar/bar.sh
Executable file
14
bar/bar.sh
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
while :
|
||||||
|
do
|
||||||
|
date=$(date "+%d %b %Y %H:%M")
|
||||||
|
battery=$(acpi -b | cut -f 2 -d "," | tr -d [:space:])
|
||||||
|
adapter=$(acpi -a | cut -f 3 -d " " | cut -f 1 -d "-")
|
||||||
|
connection=$(connmanctl state | head -n 1 | cut -d ' ' -f 5)
|
||||||
|
volume=$(amixer sget Master | tail -n 1 | cut -d '[' -f 2 | tr -d '] ')
|
||||||
|
vcn=$(ip addr show dev vcn 2>&1 | grep LOWER_UP | sed 's/.*LOWER_UP.*/\\U002B50/')
|
||||||
|
status=$(echo -e "\U001F553 $date \U1F50A $volume \U1F5F2 $battery \U0001F50C $adapter \U0001F30F $connection $vcn")
|
||||||
|
xsetroot -name "$status"
|
||||||
|
sleep 1
|
||||||
|
done
|
Loading…
Reference in a new issue