aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshmibs <shmibs@gmail.com>2014-07-05 09:01:43 -0700
committershmibs <shmibs@gmail.com>2014-07-05 09:01:43 -0700
commit556f82efe07a363fc8d380e259df62968322afb0 (patch)
tree426fb678b304fd39c5814936b8ac1a0e19e23adf
parent59e00dc75d43bd2940de603507fbb84446eff480 (diff)
downloaddotfiles-556f82efe07a363fc8d380e259df62968322afb0.tar.gz
added coloured icons
stlarch is fun!
-rwxr-xr-x.config/herbstluftwm/config_vars6
-rwxr-xr-x.config/herbstluftwm/panel.sh50
-rw-r--r--.config/herbstluftwm/panel/conky_stats3
3 files changed, 45 insertions, 14 deletions
diff --git a/.config/herbstluftwm/config_vars b/.config/herbstluftwm/config_vars
index d5d7dff..4704733 100755
--- a/.config/herbstluftwm/config_vars
+++ b/.config/herbstluftwm/config_vars
@@ -8,8 +8,12 @@ bg_urgent='#ff4070'
fg_urgent='#efefef'
fg_grey='#ababab'
+fg_red='#ff6699'
+fg_green='#d5f85f'
+fg_yellow='#ffa466'
+fg_blue='#00aad4'
bheight=18
-dfont='-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*'
+dfont='-*-stlarch-medium-r-*-*-10-*-*-*-*-*-*-*,-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*'
efont='-*-tamsyn-medium-*-*-*-14-*-*-*-*-*-*-*'
diff --git a/.config/herbstluftwm/panel.sh b/.config/herbstluftwm/panel.sh
index 8e1211f..e052b13 100755
--- a/.config/herbstluftwm/panel.sh
+++ b/.config/herbstluftwm/panel.sh
@@ -25,16 +25,17 @@ bg_normal=$(echo -n $alpha; echo "$bg_normal" | tr -d '#')
fg_normal=$(echo -n '#ff'; echo "$fg_normal" | tr -d '#')
bg_focus=$(echo -n $alpha; echo "$bg_focus" | tr -d '#')
fg_focus=$(echo -n '#ff'; echo "$fg_focus" | tr -d '#')
-bg_urgent=$(echo -n '#ff'; echo "$bg_urgent" | tr -d '#')
+bg_urgent=$(echo -n $alpha; echo "$bg_urgent" | tr -d '#')
fg_urgent=$(echo -n '#ff'; echo "$fg_urgent" | tr -d '#')
fg_grey=$(echo -n '#ff'; echo "$fg_grey" | tr -d '#')
+fg_red=$(echo -n '#ff'; echo "$fg_red" | tr -d '#')
+fg_green=$(echo -n '#ff'; echo "$fg_green" | tr -d '#')
+fg_yellow=$(echo -n '#ff'; echo "$fg_yellow" | tr -d '#')
+fg_blue=$(echo -n '#ff'; echo "$fg_blue" | tr -d '#')
hc pad $monitor $bheight
-# global content variables
-winlist=""
-
#################
@@ -116,9 +117,7 @@ fields[8]="%{F${bg_focus}}| %{F${fg_normal}}"
get_stat() {
{
conky -c ~/.config/herbstluftwm/panel/conky_stats
- # suppress lines that do not differ from
- # previous lines
- } | awk '$0 != l { print ; l=$0 ; fflush(); }'
+ }
}
get_date() {
@@ -187,11 +186,36 @@ get_when() {
# accordingly
case "${event[0]}" in
date)
- fields[7]="%{F${bg_focus}}|%{F${fg_normal} A:date:} ${event[@]:1} %{A}"
+ fields[7]="%{F${bg_focus}}|%{F${fg_normal} A:date:} \uE015 ${event[@]:1} %{A}"
;;
+
stats)
- fields[6]="%{F${bg_focus}}|%{F${fg_normal} A:stats:} ${event[@]:1} %{A}"
+ # enforce fixed widths with sed. printf
+ # pads in the other direction
+ event[1]=$(echo ${event[1]} | sed \
+ -e 's/^\(..\)$/\1 /' \
+ -e 's/^\(...\)$/\1 /')
+ event[2]=$(echo ${event[2]} | sed \
+ -e 's/^\(..\)$/\1 /' \
+ -e 's/^\(...\)$/\1 /')
+ event[3]=$(echo ${event[3]} | sed \
+ -e 's/^\(..\)$/\1 /' \
+ -e 's/^\(...\)$/\1 /' \
+ -e 's/^\(....\)$/\1 /')
+ event[4]=$(echo ${event[4]} | sed \
+ -e 's/^\(..\)$/\1 /' \
+ -e 's/^\(...\)$/\1 /' \
+ -e 's/^\(....\)$/\1 /')
+ fields[6]=$(
+ echo -n "%{F${bg_focus}}|%{F${fg_normal} A:stats:} "
+ echo -n "%{F${fg_blue}}\uE023%{F${fg_normal}} ${event[1]} "
+ echo -n "%{F${fg_yellow}}\uE020%{F${fg_normal}} ${event[2]} "
+ echo -n "%{F${bg_focus}}|%{F${fg_normal}} "
+ echo -n "%{F${fg_green}}\uE07B%{F${fg_normal}} ${event[3]} "
+ echo -n "%{F${fg_red}}\uE07C%{F${fg_normal}} ${event[4]} "
+ echo -n "%{A}")
;;
+
when)
if [[ "${events[1]}" -eq 1 ]]; then
fields[4]="%{F${bg_focus}}|%{F${fg_normal} A:when:} * %{A}"
@@ -204,6 +228,7 @@ get_when() {
focus_changed|window_title_changed)
fields[2]=$(update_winlist)
;;
+
tag_changed|tag_flags)
fields[1]=$(update_taglist)
fields[2]=$(update_winlist)
@@ -215,9 +240,10 @@ get_when() {
# i wish i could just print the entire array
# this easily, but that inserts spaces
- #echo "${fields[@]}"
- echo -n "${fields[1]}${fields[2]}${fields[3]}${fields[4]}"
- echo "${fields[5]}${fields[6]}${fields[7]}${fields[8]}"
+ #echo -e "${fields[@]}"
+
+ echo -en "${fields[1]}${fields[2]}${fields[3]}${fields[4]}"
+ echo -e "${fields[5]}${fields[6]}${fields[7]}${fields[8]}"
done
diff --git a/.config/herbstluftwm/panel/conky_stats b/.config/herbstluftwm/panel/conky_stats
index a425958..978aecc 100644
--- a/.config/herbstluftwm/panel/conky_stats
+++ b/.config/herbstluftwm/panel/conky_stats
@@ -4,6 +4,7 @@ out_to_x no
update_interval 2.0
total_run_times 0
use_spacer none
+short_units yes
TEXT
-stats mem: %%${memperc} cpu: %%${cpu cpu0}
+stats %%${cpu cpu0} %%${memperc} ${downspeed wlp7s0} ${upspeed wlp7s0}