Simple status bar (scrot)
baoquocphan May 05, 2016 (info/dzen2)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #!/bin/bash
sleep 1;
home1='\ue802';
calendar='\ue80d';
time='\ue80f';
music='\ue81a';
headphone='\ue809';
r_arr='/home/phqb/.statusbar_icons/r_arr.xbm';
while true; do
echo "^fg(#00536B)^i(${r_arr})^fg()^bg(#00536B)\
^fg(#FF822E)$(printf ${home1})^fg() $(whoami)\
^fg(#193441)^i(${r_arr})^fg()^bg(#193441)\
^fg(#00A388)$(printf ${calendar})^fg() $(date +%a\ %d/%m/%y)\
^fg(#00A388)$(date +%H:%M)^fg()\
^fg(#00536B)^i(${r_arr})^fg()^bg(#00536B)\
^fg(#FF8A6B)$(printf ${time})^fg()\
$(expr 183 - $(date +%j)), $(expr 136 - $(date +%j))\
^fg(#FF8A6B)days^fg() left\
^fg(#193441)^i(${r_arr})^fg()^bg(#193441)\
^fg(#F7E967)$(printf ${headphone})^fg() \
$(if [[ -z $(mpc current) ]]; then \
echo Stopped; else \
mpc current | cut -c1-16; fi)\
^fg(#00536B)^i(${r_arr})^fg()^bg(#00536B)\
^fg(#ecf0f1)$(printf ${music})^fg() $(awk -F"[][]" '/%/ { print $2 }'\
<(amixer sget Master) | head -n1) \
"; sleep 1; done | dzen2 -e - -h '16' -w '600' -ta r -x 1000 \
-fn '-*-dejavu sans with icons-normal-r-normal--*-100-80-*-p-0-utf8-1' \
-bg '#193441' -fg '#cbc9cf'
|
x
1 2 3 4 5 6 | #define r_arr_width 10
#define r_arr_height 16
static unsigned char r_arr_bits[] = {
0x00, 0x02, 0x00, 0x03, 0x80, 0x03, 0xc0, 0x03, 0xe0, 0x03, 0xf0, 0x03,
0xf8, 0x03, 0xfc, 0x03, 0xfc, 0x03, 0xf8, 0x03, 0xf0, 0x03, 0xe0, 0x03,
0xc0, 0x03, 0x80, 0x03, 0x00, 0x03, 0x00, 0x02 };
|
x
Notes
A simple dzen2 status bar with date, countdown, mpd playing and volume.
Bitmap image r_arr.xbm is placed in ~/.statusbar_icons.
Font used is DejaVu Sans (manually added icons)