battery, date, and music in dwmstatus
This commit is contained in:
+39
-4
@@ -7,12 +7,47 @@
|
|||||||
## eric@ewpt3ch.com ####
|
## eric@ewpt3ch.com ####
|
||||||
## dwmstatus ###########
|
## dwmstatus ###########
|
||||||
########################
|
########################
|
||||||
# colors:
|
|
||||||
|
# colors from dwm.config.h
|
||||||
|
color_normal="\x01" #normal
|
||||||
|
color_selected="\x02" #selected
|
||||||
|
color_blue="\x06" #blue
|
||||||
|
color_red="\x03" #red
|
||||||
|
|
||||||
|
# Icon glyphs from Inconsolataicon
|
||||||
|
glyph_cpu="\u01B0"
|
||||||
|
glyph_mem="\u01B1"
|
||||||
|
glyph_dl="\u01A5"
|
||||||
|
glyph_ul="\u01A4"
|
||||||
|
glyph_pow="\u01B2"
|
||||||
|
glyph_clk="\u01Af"
|
||||||
|
glyph_bln="\u01AA"
|
||||||
|
glyph_msc="\u01AB"
|
||||||
|
glyph_vol="\u01AC"
|
||||||
|
glyph_mail="\u01AD"
|
||||||
|
glyph_wifi="\u01AE"
|
||||||
|
|
||||||
|
# Song info
|
||||||
|
msc(){
|
||||||
|
if [ -x /usr/bin/cmus-remote ]
|
||||||
|
then
|
||||||
|
artist=`cmus-remote -Q | grep -w artist | cut -d ' ' -f3-`
|
||||||
|
song=`cmus-remote -Q | grep title | cut -d ' ' -f3-`
|
||||||
|
song_info=${artist}-${song}
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -ne "${glyph_msc} ${song_info}"
|
||||||
|
}
|
||||||
|
|
||||||
dte(){
|
dte(){
|
||||||
dte="$(date "+%I:%M")"
|
datetime="$(date "+%F %T")"
|
||||||
echo -e "\x02$dte\x01"
|
echo -ne "${glyph_clk} ${datetime}"
|
||||||
|
}
|
||||||
|
|
||||||
|
bat(){
|
||||||
|
charge=`acpi -b | awk '{print +$4}'`
|
||||||
|
echo -ne "${glyph_pow} ${charge}%"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Pipe to statusbar
|
# Pipe to statusbar
|
||||||
xsetroot -name "$(dte) "
|
xsetroot -name "$(msc) $(bat) $(dte) "
|
||||||
|
|||||||
Reference in New Issue
Block a user