Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Update 20120521-074326]

  • Loading branch information...
commit ddf5b9717ff3b9cfec3ca665c23fb0b1e6d1e688 1 parent 1cae6ef
@Wintervenom authored
View
2  audio/mpd/relevant-track/relevant-track-weechat
@@ -22,7 +22,7 @@ log_path="/mnt/ssh/diadian/.logs/irc/$(date +'%Y/%m/%d')/%s.%s.weechatlog"
backup="backup.relevant-track"
channels=(
#'freenode ##<3 #archlinux-offtopic'
- 'dreamviews #dv'
+ 'dreamviews #dv #luciddreaming'
)
swap_words=(
'this that that this'
View
73 herbstluftwm/hlwm-dzen2
@@ -0,0 +1,73 @@
+#!/bin/bash
+### Herbstluftwm Dzen2 Status #########
+# Version 20120520-1 by Scott Garrett #
+# Wintervenom [(at)] archlinux.us #
+#######################################
+
+set -f
+
+hc='herbstclient'
+colors=($(awk '/^\*color/{print $2}' .Xdefaults))
+dzen=(
+ dzen2 -ta l -sa l
+ -bg "$($hc get frame_bg_normal_color)"
+ -fg "$($hc get frame_bg_active_color)"
+ -e "button3=togglehide;button5=exec:$hc use_index -1;button4=exec:$hc use_index +1"
+)
+declare -A tag_colors=(
+ [':']=$($hc get frame_border_active_color)
+ ['#']=$($hc get window_border_active_color)
+)
+
+get_tags () {
+ for t in $($hc tag_status); do
+ [[ ${t:0:1} != '.' ]] &&
+ echo -n "^ca(1, $hc use ${t:1})[^fg(${tag_colors[${t:0:1}]})${t:1}^fg()]^ca()"
+ done
+ echo
+}
+
+status () {
+ window_id=0
+ window_title='(Waiting...)'
+ tags=$(get_tags)
+ while IFS=$'\t' read hook p1 p2; do
+ case "$hook" in
+ tag_changed)
+ tags=$(get_tags) ;;
+ focus_changed)
+ window_id=$p1 window_title=$p2 ;;
+ window_title_changed)
+ [[ $p1 == $window_id ]] && window_title=$p2 ;;
+ update_info)
+ read -d' ' load < /proc/loadavg
+ mem=$(free -h | awk '/cache:/{print $3}')
+ batt=$(acpi -b | cut -d' ' -f4)
+ clock=$(date +'%a %m%d:%H%M')
+ ;;
+ reload|quit_panel)
+ kill $ping_pid
+ exit
+ ;;
+ esac
+ echo " $tags $window_title ^p(_RIGHT)^p(-330)Load: $load Mem: $mem Batt: $batt^p(_RIGHT)^p(-90)$clock"
+ done < <($hc -i \
+ '(focus|window_title|tag)_changed|update_info|reload|quit_panel')
+}
+
+{
+ sleep 1
+ $hc use_index +1
+ $hc use_index -1
+ while :; do
+ $hc emit_hook update_info
+ sleep 5
+ done
+} &
+ping_pid=$!
+trap "kill $ping_pid" INT TERM HUP
+
+#killall trayer 2> /dev/null
+#trayer --edge top --align left --tint "${colors[0]//#/0x}" --alpha 0 --transparent true --height 14 --width 5 --widthtype percent &
+
+status | "${dzen[@]}"
View
4 herbstluftwm/hlwm-xmobar
@@ -2,5 +2,5 @@
colors=($(awk '/^\*color/{print $2}' .Xdefaults))
killall barstatus xmobar trayer
-hlwm-xmobar-tags | xmobar -B "${colors[0]}" -F "${colors[11]}" ~/.config/xmobar/bottom-hlwm &
-trayer --edge bottom --align left --tint "${colors[0]//#/0x}" --alpha 0 --transparent true --height 14 --width 5 --widthtype percent &
+hlwm-xmobar-tags | xmobar -B "${colors[0]}" -F "${colors[11]}" ~/.config/xmobar/top-hlwm &
+trayer --edge top --align left --tint "${colors[0]//#/0x}" --alpha 0 --transparent true --height 14 --width 5 --widthtype percent &
Please sign in to comment.
Something went wrong with that request. Please try again.