diff options
author | Ryan Kavanagh <rak@rak.ac> | 2021-12-13 16:34:55 -0500 |
---|---|---|
committer | Ryan Kavanagh <rak@rak.ac> | 2021-12-13 16:34:55 -0500 |
commit | 41fa4263c042bcef66918092efcdbb6a991bc84f (patch) | |
tree | f484ccafe0ad0d5c8731fc4f5bb6b405f9798b2f /dot_dzen | |
parent | more renames (diff) |
more renames
Diffstat (limited to 'dot_dzen')
54 files changed, 521 insertions, 0 deletions
diff --git a/dot_dzen/battery.sh b/dot_dzen/battery.sh new file mode 100755 index 0000000..c50e53d --- /dev/null +++ b/dot_dzen/battery.sh @@ -0,0 +1,49 @@ +#!/bin/sh +# +# original script by lyon8 <lyon8@gmx.net> +# modifications from original by <sean.escriva@gmail.com> +# show your laptop battery state in dzen +# Taken from http://www.webframp.com/2008/08/17/switchdzen/ and modified by Ryan +# Kavanagh <ryanakca@kubuntu.org> to add support for a missing battery and use +# /sys instead of /proc/acpi/battery + +BG='#000000' # dzen backgrounad +FG='#008dd5' # dzen foreground +W=114 # width of the dzen bar +GW=50 # width of the gauge +GFG='#33ccff' # color of the gauge +GH=7 # height of the gauge +GBG='#333' # color of gauge background +X=0 # x position +Y=0 # y position +FN='-misc-fixed-medium-r-semicondensed--12-110-75-75-c-60-iso8859-1' # font + +LOWBAT=10 # percentage of battery life marked as low +LOWCOL='#ff4747' # color when battery is low +CHGCOL='#60da11' # color when battery is charging +TIME_INT=2 # time interval in seconds to hold display +TIME_ITER=5 # no of iterations in which time is displayed + +PREBAR="^i(${HOME}/.dzen/icons/power-bat.xbm) " # caption (also icons are possible) + +echo -n $PREBAR #uncomment for an icon + +PRESENT=`acpi -b`; +if [ "${PRESENT}" ]; then + STATUS=`echo ${PRESENT} | grep Charging`; + + RPERC=`echo ${PRESENT} | cut -d, -f2 | sed -e 's/[^0-9]//g'`; + + # draw the bar and pipe everything into dzen + if [ $RPERC -le $LOWBAT ]; then + GFG=$LOWCOL; + fi + if [ "${STATUS}" ]; then + GFG=$CHGCOL; + else + GFG='#33ccff'; + fi + echo $RPERC +else + echo '??' +fi diff --git a/dot_dzen/dzen.sh b/dot_dzen/dzen.sh new file mode 100755 index 0000000..0d2b8e4 --- /dev/null +++ b/dot_dzen/dzen.sh @@ -0,0 +1,156 @@ +#!/bin/sh + +typeset -A DISKS +### +# Config +### +DATE_FORMAT="%a %d %b, %Y" +TIME_ZONES=("America/Toronto" "UTC") +DISKS=(home /home root /) +SEPERATOR=' ^fg(#86AA3F)^c(3)^fg() ' +BAR_BG='#7DA926' +BAR_FG='#B9D56E' +BAR_HH=6 +BAR_HW=40 +BAR_VH=12 +BAR_VW=3 +BAR_ARGS="-bg $BAR_BG -fg $BAR_FG -w $BAR_HW -h $BAR_HH" +ICON_DIR="$HOME/.dzen/icons/" +NETWORK_INTERFACE=eth0 +NET_DOWN_MAX=55 +NET_UP_MAX=14 +MAILDIR=~/.maildb/GMAIL/ + +GLOBALIVAL=1m +DATEIVAL=60 +TIMEIVAL=1 +DISKIVAL=1 +#CPUTEMPIVAL=5 +#CPUIVAL=1 +#NPIVAL=3 +NETIVAL=1 + + +### +# Functions +### +_date() +{ + date +${DATE_FORMAT} +} + +_time() +{ + local zone + print_space=0 + for zone in $TIME_ZONES; do + [[ $print_space -eq 1 ]] && print -n " " + print -n "${zone:t}: $(TZ=$zone date '+%H:%M')" + print_space=1 + done +} + +# +# Format: label1 mountpoint1 label2 mountpoint2 ... labelN mountpointN +# Copied and modified from Rob +get_disk_usage() { + local rstr; local tstr; local i; local sep + for i in ${(k)DISKS}; do + tstr=$(print `df -h $DISKS[$i]|sed -ne 's/^.* \([0-9]*\)% .*/\1/p'` 100 | \ + dzen2-gdbar -h $BAR_HH -w $BAR_HW -fg $BAR_FG -bg $BAR_BG -l "${i}" -nonl | \ + sed 's/[0-9]\+%//g;s/ / /g') + if [ ! -z "$rstr" ]; then + sep=${SEPERATOR} + fi + rstr="${rstr}${sep}${tstr}" + done + print -n $rstr +} + +# Requires mesure +get_net_rates() { + local up; local down + up=`mesure -K -l -c 3 -t -o $NETWORK_INTERFACE` + down=`mesure -K -l -c 3 -t -i $NETWORK_INTERFACE` + echo "$down $up" +} + +#cpu_temp() +#{ +# print -n ${(@)$(</proc/acpi/thermal_zone/THRM/temperature)[2,3]} +#} +# +#np() +#{ +# #MAXPOS="100" +# CAPTION="^i(${ICON_DIR}/musicS.xbm)" +# #POS=`mpc | sed -ne 's/^.*(\([0-9]*\)%).*$/\1/p'` +# #POSM="$POS $MAXPOS" +# print -n "$CAPTION " +# mpc | head -n1 | tr -d '\n' +# #echo "$POSM" | gdbar -h 7 -w 50 -fg $BAR_FG -bg $BAR_BG +#} +# +#cpu() +#{ +# gcpubar -c 2 -bg $BAR_BG -fg $BAR_FG -w $BAR_HW -h $BAR_HH | tail -n1 | tr -d '\n' +#} + +has_new_mail() { + find ${MAILDIR}/*/new -not -type d | wc -l +} + +DATEI=0 +TIMEI=0 +DISKI=0 +#NPI=0 +#CPUTEMPI=0 +#CPUI=0 +NETI=0 + +date=$(_date) +times=$(_time) +disk_usage=$(get_disk_usage) +#now_playing=$(np) +#temp=$(cpu_temp) +#cpumeter=$(cpu) +net_rates=( `get_net_rates` ) + +while true; do + [[ $DATEI -ge $DATEIVAL ]] && date=$(_date) && DATEI=0 + [[ $TIMEI -ge $TIMEIVAL ]] && times=$(_time) && TIMEI=0 + [[ $DISKI -ge $DISKIVAL ]] && disk_usage=$(get_disk_usage) && DISKI=0 + #[[ $NPI -ge $NPIVAL ]] && now_playing=$(np) && NPI=0 + #[[ $CPUI -ge $CPUIVAL ]] && cpumeter=$(cpu) && CPUI=0 + #[[ $CPUTEMPI -ge $CPUTEMPIVAL ]] && temp=$(cpu_temp) && CPUTEMPI=0 + [[ $NETI -ge $NETIVAL ]] && net_rates=( `get_net_rates` ) && NETI=0 + + # Disk usage + echo -n "${disk_usage}${SEPERATOR}" + # Network + echo $net_rates[1] | dzen2-gdbar -nonl -s v -w $BAR_VW -h $BAR_VH -min 0 \ + -max $NET_DOWN_MAX -fg $BAR_FG -bg $BAR_BG + echo -n " " + echo $net_rates[2] | dzen2-gdbar -nonl -s v -w $BAR_VW -h $BAR_VH -min 0 \ + -max $NET_UP_MAX -fg $BAR_FG -bg $BAR_BG + echo -n "${SEPERATOR}" + # Mail notification + if [ `has_new_mail` -gt 0 ]; then + echo -n "^fg(#73d216)" + fi + echo -n "^i(${ICON_DIR}/mail.xbm)^fg()${SEPERATOR}" + # Time and date + echo -n "${times}${SEPERATOR}" + echo -n "${date}" + echo + + DATEI=$(($DATEI+1)) + TIMEI=$(($TIMEI+1)) + DISKI=$(($DISKI+1)) + #NPI=$(($NPI+1)) + #CPUI=$(($CPUI+1)) + #CPUTEMPI=$(($CPUTEMPI+1)) + NETI=$(($NETI+1)) + + sleep $GLOBALIVAL +done diff --git a/dot_dzen/icons/arrow_down.xbm b/dot_dzen/icons/arrow_down.xbm new file mode 100644 index 0000000..0502235 --- /dev/null +++ b/dot_dzen/icons/arrow_down.xbm @@ -0,0 +1,4 @@ +#define net_down_03_width 8 +#define net_down_03_height 8 +static unsigned char net_down_03_bits[] = { + 0x38, 0x38, 0x38, 0x38, 0xFE, 0x7C, 0x38, 0x10 }; diff --git a/dot_dzen/icons/arrow_up.xbm b/dot_dzen/icons/arrow_up.xbm new file mode 100644 index 0000000..b21c007 --- /dev/null +++ b/dot_dzen/icons/arrow_up.xbm @@ -0,0 +1,4 @@ +#define net_up_03_width 8 +#define net_up_03_height 8 +static unsigned char net_up_03_bits[] = { + 0x10, 0x38, 0x7C, 0xFE, 0x38, 0x38, 0x38, 0x38 }; diff --git a/dot_dzen/icons/bluetooth.xbm b/dot_dzen/icons/bluetooth.xbm new file mode 100644 index 0000000..3cc42d5 --- /dev/null +++ b/dot_dzen/icons/bluetooth.xbm @@ -0,0 +1,4 @@ +#define bluetooth_width 8 +#define bluetooth_height 8 +static unsigned char bluetooth_bits[] = { + 0x18, 0x2A, 0x6C, 0x38, 0x38, 0x6C, 0x2A, 0x18 }; diff --git a/dot_dzen/icons/corner.xbm b/dot_dzen/icons/corner.xbm new file mode 100644 index 0000000..0851adf --- /dev/null +++ b/dot_dzen/icons/corner.xbm @@ -0,0 +1,5 @@ +#define corner_width 8 +#define corner_height 16 +static unsigned char corner_bits[] = { + 0x00, 0x00, 0x1e, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/cpu.xbm b/dot_dzen/icons/cpu.xbm new file mode 100644 index 0000000..2c7d0e8 --- /dev/null +++ b/dot_dzen/icons/cpu.xbm @@ -0,0 +1,6 @@ +#define cpu2_width 16 +#define cpu2_height 16 +static unsigned char cpu2_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x12, 0xfc, 0x3f, + 0xfc, 0x3f, 0x1c, 0x38, 0x1c, 0x38, 0x1e, 0x78, 0xfc, 0x3f, 0xfe, 0x7f, + 0xfc, 0x3f, 0x48, 0x12, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/down.xbm b/dot_dzen/icons/down.xbm new file mode 100644 index 0000000..bc350dd --- /dev/null +++ b/dot_dzen/icons/down.xbm @@ -0,0 +1,6 @@ +#define down_width 16 +#define down_height 16 +static unsigned char down_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xe0, 0x03, 0xc0, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/fwd.xbm b/dot_dzen/icons/fwd.xbm new file mode 100644 index 0000000..3f52ea9 --- /dev/null +++ b/dot_dzen/icons/fwd.xbm @@ -0,0 +1,4 @@ +#define fwd_width 8 +#define fwd_height 8 +static unsigned char fwd_bits[] = { + 0x00, 0x12, 0x36, 0x7E, 0x7E, 0x36, 0x12, 0x00 }; diff --git a/dot_dzen/icons/layout-full-black.xbm b/dot_dzen/icons/layout-full-black.xbm new file mode 100644 index 0000000..1c97fde --- /dev/null +++ b/dot_dzen/icons/layout-full-black.xbm @@ -0,0 +1,5 @@ +#define full_width 12 +#define full_height 12 +static unsigned char full_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0xfc, 0x03, 0x04, 0x02, 0x04, 0x02, + 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0xfc, 0x03, 0x00, 0x00}; diff --git a/dot_dzen/icons/layout-full.xbm b/dot_dzen/icons/layout-full.xbm new file mode 100644 index 0000000..f0492b6 --- /dev/null +++ b/dot_dzen/icons/layout-full.xbm @@ -0,0 +1,8 @@ +#define max_width 18 +#define max_height 18 +static unsigned char max_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFC, 0xFF, 0x00, 0xFC, 0xFF, 0x00, 0x04, 0x80, 0x00, 0x04, 0x80, 0x00, + 0x04, 0x80, 0x00, 0x04, 0x80, 0x00, 0x04, 0x80, 0x00, 0x04, 0x80, 0x00, + 0x04, 0x80, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/layout-gimp.xbm b/dot_dzen/icons/layout-gimp.xbm new file mode 100644 index 0000000..4711c31 --- /dev/null +++ b/dot_dzen/icons/layout-gimp.xbm @@ -0,0 +1,8 @@ +#define layout_gimp_width 18 +#define layout_gimp_height 18 +static unsigned char layout_gimp_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x7c, 0xfd, 0x01, 0x00, 0x00, 0x00, 0x7c, 0xfd, 0x01, 0x44, 0x25, 0x01, + 0x44, 0x25, 0x01, 0x44, 0x25, 0x01, 0x7c, 0x01, 0x00, 0x40, 0xfd, 0x01, + 0x7c, 0x05, 0x01, 0x00, 0x04, 0x01, 0xfc, 0xff, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/layout-im-full.xbm b/dot_dzen/icons/layout-im-full.xbm new file mode 100644 index 0000000..ba75847 --- /dev/null +++ b/dot_dzen/icons/layout-im-full.xbm @@ -0,0 +1,8 @@ +#define layout_im_full_width 18 +#define layout_im_full_height 18 +static unsigned char layout_im_full_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0xff, 0x00, 0x44, 0x80, 0x00, 0x44, 0x80, 0x00, 0x44, 0x80, 0x00, + 0x44, 0x80, 0x00, 0x44, 0x80, 0x00, 0x44, 0x80, 0x00, 0x44, 0x80, 0x00, + 0x44, 0x80, 0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/layout-im-mirror.xbm b/dot_dzen/icons/layout-im-mirror.xbm new file mode 100644 index 0000000..6cb3ed1 --- /dev/null +++ b/dot_dzen/icons/layout-im-mirror.xbm @@ -0,0 +1,8 @@ +#define layout_im_mirror_width 18 +#define layout_im_mirror_height 18 +static unsigned char layout_im_mirror_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0xff, 0x00, 0x44, 0x80, 0x00, 0x44, 0x80, 0x00, 0x44, 0x80, 0x00, + 0x44, 0x80, 0x00, 0x44, 0x80, 0x00, 0xc4, 0xff, 0x00, 0x44, 0x80, 0x00, + 0x44, 0x80, 0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/layout-im-tall.xbm b/dot_dzen/icons/layout-im-tall.xbm new file mode 100644 index 0000000..704f503 --- /dev/null +++ b/dot_dzen/icons/layout-im-tall.xbm @@ -0,0 +1,8 @@ +#define layout_im_tall_width 18 +#define layout_im_tall_height 18 +static unsigned char layout_im_tall_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0xff, 0x00, 0x44, 0x90, 0x00, 0x44, 0x90, 0x00, 0x44, 0x90, 0x00, + 0x44, 0x90, 0x00, 0x44, 0x90, 0x00, 0x44, 0x90, 0x00, 0x44, 0x90, 0x00, + 0x44, 0x90, 0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/layout-im.xbm b/dot_dzen/icons/layout-im.xbm new file mode 100644 index 0000000..e5e296a --- /dev/null +++ b/dot_dzen/icons/layout-im.xbm @@ -0,0 +1,8 @@ +#define layout_im_grid_width 18 +#define layout_im_grid_height 18 +static unsigned char layout_im_grid_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0xff, 0x00, 0x04, 0x80, 0x00, 0xa4, 0xbf, 0x00, 0x84, 0xa4, 0x00, + 0xa4, 0xa4, 0x00, 0xa4, 0xa4, 0x00, 0xa4, 0xa4, 0x00, 0xa4, 0xa4, 0x00, + 0x04, 0x80, 0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/layout-mirror-black.xbm b/dot_dzen/icons/layout-mirror-black.xbm new file mode 100644 index 0000000..246fd37 --- /dev/null +++ b/dot_dzen/icons/layout-mirror-black.xbm @@ -0,0 +1,5 @@ +#define mtall_width 12 +#define mtall_height 12 +static unsigned char mtall_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0xfc, 0x03, 0xfc, 0x03, 0xfc, 0x03, + 0xfc, 0x03, 0x00, 0x00, 0x6c, 0x03, 0x6c, 0x03, 0x6c, 0x03, 0x00, 0x00}; diff --git a/dot_dzen/icons/layout-mirror-bottom.xbm b/dot_dzen/icons/layout-mirror-bottom.xbm new file mode 100644 index 0000000..e1d8679 --- /dev/null +++ b/dot_dzen/icons/layout-mirror-bottom.xbm @@ -0,0 +1,8 @@ +#define tilebottom_width 18 +#define tilebottom_height 18 +static unsigned char tilebottom_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFC, 0xFF, 0x00, 0x04, 0x80, 0x00, 0x04, 0x80, 0x00, 0x04, 0x80, 0x00, + 0x04, 0x80, 0x00, 0x04, 0x80, 0x00, 0xFC, 0xFF, 0x00, 0x44, 0x88, 0x00, + 0x44, 0x88, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/layout-mirror-top.xbm b/dot_dzen/icons/layout-mirror-top.xbm new file mode 100644 index 0000000..10e8ca2 --- /dev/null +++ b/dot_dzen/icons/layout-mirror-top.xbm @@ -0,0 +1,8 @@ +#define tiletop_width 18 +#define tiletop_height 18 +static unsigned char tiletop_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFC, 0xFF, 0x00, 0x44, 0x88, 0x00, 0x44, 0x88, 0x00, 0xFC, 0xFF, 0x00, + 0x04, 0x80, 0x00, 0x04, 0x80, 0x00, 0x04, 0x80, 0x00, 0x04, 0x80, 0x00, + 0x04, 0x80, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/layout-tall-black.xbm b/dot_dzen/icons/layout-tall-black.xbm new file mode 100644 index 0000000..1a67757 --- /dev/null +++ b/dot_dzen/icons/layout-tall-black.xbm @@ -0,0 +1,5 @@ +#define tall_width 12 +#define tall_height 12 +static unsigned char tall_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x7e, 0x07, 0x7e, 0x07, 0x7e, 0x00, 0x7e, 0x07, + 0x7e, 0x07, 0x7e, 0x00, 0x7e, 0x07, 0x7e, 0x07, 0x00, 0x00, 0x00, 0x00}; diff --git a/dot_dzen/icons/layout-tall-left.xbm b/dot_dzen/icons/layout-tall-left.xbm new file mode 100644 index 0000000..91e9b75 --- /dev/null +++ b/dot_dzen/icons/layout-tall-left.xbm @@ -0,0 +1,8 @@ +#define tileleft_width 18 +#define tileleft_height 18 +static unsigned char tileleft_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFC, 0xFF, 0x00, 0x44, 0x80, 0x00, 0x44, 0x80, 0x00, 0x7C, 0x80, 0x00, + 0x44, 0x80, 0x00, 0x44, 0x80, 0x00, 0x7C, 0x80, 0x00, 0x44, 0x80, 0x00, + 0x44, 0x80, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/layout-tall-right.xbm b/dot_dzen/icons/layout-tall-right.xbm new file mode 100644 index 0000000..f3c44ba --- /dev/null +++ b/dot_dzen/icons/layout-tall-right.xbm @@ -0,0 +1,8 @@ +#define tileright_width 18 +#define tileright_height 18 +static unsigned char tileright_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFC, 0xFF, 0x00, 0x04, 0x88, 0x00, 0x04, 0x88, 0x00, 0x04, 0xF8, 0x00, + 0x04, 0x88, 0x00, 0x04, 0x88, 0x00, 0x04, 0xF8, 0x00, 0x04, 0x88, 0x00, + 0x04, 0x88, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/layout-threecol.xbm b/dot_dzen/icons/layout-threecol.xbm new file mode 100644 index 0000000..3009ecc --- /dev/null +++ b/dot_dzen/icons/layout-threecol.xbm @@ -0,0 +1,8 @@ +#define threecol_width 18 +#define threecol_height 18 +static unsigned char threecol_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFC, 0xFF, 0x00, 0x44, 0x88, 0x00, 0x44, 0x88, 0x00, 0x44, 0x88, 0x00, + 0x44, 0x88, 0x00, 0x44, 0x88, 0x00, 0x44, 0x88, 0x00, 0x44, 0x88, 0x00, + 0x44, 0x88, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/load.xbm b/dot_dzen/icons/load.xbm new file mode 100644 index 0000000..b9a1061 --- /dev/null +++ b/dot_dzen/icons/load.xbm @@ -0,0 +1,6 @@ +#define load_width 16 +#define load_height 16 +static unsigned char load_bits[] = { + 0x00, 0x00, 0xfe, 0x7f, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, + 0x02, 0x44, 0x02, 0x4a, 0x02, 0x71, 0x8e, 0x40, 0x52, 0x40, 0x22, 0x40, + 0x02, 0x40, 0x02, 0x40, 0xfe, 0x7f, 0x00, 0x00 }; diff --git a/dot_dzen/icons/mail.xbm b/dot_dzen/icons/mail.xbm new file mode 100644 index 0000000..295eb73 --- /dev/null +++ b/dot_dzen/icons/mail.xbm @@ -0,0 +1,4 @@ +#define mail_width 8 +#define mail_height 8 +static unsigned char mail_bits[] = { + 0x00, 0xFF, 0x7E, 0xBD, 0xDB, 0xE7, 0xFF, 0x00 }; diff --git a/dot_dzen/icons/mem.xbm b/dot_dzen/icons/mem.xbm new file mode 100644 index 0000000..5c5bc8e --- /dev/null +++ b/dot_dzen/icons/mem.xbm @@ -0,0 +1,6 @@ +#define load_mem_width 16 +#define load_mem_height 16 +static unsigned char load_mem_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x12, 0x48, 0x12, 0xfc, 0x3f, + 0xfc, 0x3f, 0xfc, 0x3f, 0xfc, 0x3f, 0xfc, 0x3f, 0xfc, 0x3f, 0x48, 0x12, + 0x48, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/mpd.xbm b/dot_dzen/icons/mpd.xbm new file mode 100644 index 0000000..8211667 --- /dev/null +++ b/dot_dzen/icons/mpd.xbm @@ -0,0 +1,6 @@ +#define mpd_width 16 +#define mpd_height 16 +static unsigned char mpd_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x40, 0x10, + 0x40, 0x10, 0x40, 0x10, 0x40, 0x10, 0x40, 0x10, 0x70, 0x1c, 0x78, 0x1e, + 0x30, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/net-wifi.xbm b/dot_dzen/icons/net-wifi.xbm new file mode 100644 index 0000000..0b3a4a1 --- /dev/null +++ b/dot_dzen/icons/net-wifi.xbm @@ -0,0 +1,6 @@ +#define net_wifi4_width 16 +#define net_wifi4_height 16 +static unsigned char net_wifi4_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x08, 0x10, 0xe4, 0x27, 0x10, 0x08, + 0xc0, 0x03, 0x20, 0x04, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, + 0xc0, 0x03, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x00 }; diff --git a/dot_dzen/icons/net-wifi3.xbm b/dot_dzen/icons/net-wifi3.xbm new file mode 100644 index 0000000..7ebb55d --- /dev/null +++ b/dot_dzen/icons/net-wifi3.xbm @@ -0,0 +1,6 @@ +#define wireless3_full_width 16 +#define wireless3_full_height 16 +static unsigned char wireless3_full_bits[] = { + 0x00, 0x00, 0xf0, 0x0f, 0x08, 0x10, 0xe4, 0x27, 0x10, 0x08, 0x00, 0x00, + 0xc0, 0x03, 0xc0, 0x03, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, + 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/net-wifi4.xbm b/dot_dzen/icons/net-wifi4.xbm new file mode 100644 index 0000000..8179eb4 --- /dev/null +++ b/dot_dzen/icons/net-wifi4.xbm @@ -0,0 +1,6 @@ +#define net_wifi4_width 16 +#define net_wifi4_height 16 +static unsigned char net_wifi4_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0xfe, 0x7f, 0x00, 0x00, + 0xfc, 0x3f, 0xfc, 0x3f, 0x00, 0x00, 0xf8, 0x1f, 0xf8, 0x1f, 0x00, 0x00, + 0xe0, 0x07, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/net-wifi5.xbm b/dot_dzen/icons/net-wifi5.xbm new file mode 100644 index 0000000..8a097ef --- /dev/null +++ b/dot_dzen/icons/net-wifi5.xbm @@ -0,0 +1,6 @@ +#define wireless_full_width 16 +#define wireless_full_height 16 +static unsigned char wireless_full_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x3f, 0xfe, 0x7f, 0x00, 0x00, + 0xfc, 0x3f, 0xf8, 0x1f, 0x00, 0x00, 0xf0, 0x0f, 0xe0, 0x07, 0x00, 0x00, + 0xc0, 0x03, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/net-wired.xbm b/dot_dzen/icons/net-wired.xbm new file mode 100644 index 0000000..d9655d7 --- /dev/null +++ b/dot_dzen/icons/net-wired.xbm @@ -0,0 +1,6 @@ +#define network_eth2_width 16 +#define network_eth2_height 16 +static unsigned char network_eth2_bits[] = { + 0x00, 0x00, 0xfe, 0x7f, 0x02, 0x40, 0x02, 0x40, 0xc2, 0x43, 0xc2, 0x43, + 0xc2, 0x43, 0xf2, 0x4f, 0xf2, 0x4f, 0xf2, 0x4f, 0xf2, 0x4f, 0xf2, 0x4f, + 0x02, 0x40, 0x02, 0x40, 0xfe, 0x7f, 0x00, 0x00 }; diff --git a/dot_dzen/icons/net-wired2.xbm b/dot_dzen/icons/net-wired2.xbm new file mode 100644 index 0000000..fb7276a --- /dev/null +++ b/dot_dzen/icons/net-wired2.xbm @@ -0,0 +1,6 @@ +#define network_eth1_width 16 +#define network_eth1_height 16 +static unsigned char network_eth1_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x60, 0x03, 0x70, 0x07, + 0x78, 0x0f, 0x7f, 0x7f, 0x7f, 0x7f, 0x78, 0x0f, 0x70, 0x07, 0x60, 0x03, + 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/next.xbm b/dot_dzen/icons/next.xbm new file mode 100644 index 0000000..3937532 --- /dev/null +++ b/dot_dzen/icons/next.xbm @@ -0,0 +1,4 @@ +#define next_width 8 +#define next_height 8 +static unsigned char next_bits[] = { + 0x00, 0x42, 0x4E, 0x7E, 0x7E, 0x4E, 0x42, 0x00 }; diff --git a/dot_dzen/icons/pause.xbm b/dot_dzen/icons/pause.xbm new file mode 100644 index 0000000..6bb2251 --- /dev/null +++ b/dot_dzen/icons/pause.xbm @@ -0,0 +1,4 @@ +#define pause_width 8 +#define pause_height 8 +static unsigned char pause_bits[] = { + 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00 }; diff --git a/dot_dzen/icons/phones.xbm b/dot_dzen/icons/phones.xbm new file mode 100644 index 0000000..cab8c58 --- /dev/null +++ b/dot_dzen/icons/phones.xbm @@ -0,0 +1,4 @@ +#define phones_width 8 +#define phones_height 8 +static unsigned char phones_bits[] = { + 0x3C, 0x42, 0x81, 0x81, 0xA5, 0xE7, 0xE7, 0x66 }; diff --git a/dot_dzen/icons/play.xbm b/dot_dzen/icons/play.xbm new file mode 100644 index 0000000..d42ad52 --- /dev/null +++ b/dot_dzen/icons/play.xbm @@ -0,0 +1,4 @@ +#define play_width 8 +#define play_height 8 +static unsigned char play_bits[] = { + 0x00, 0x06, 0x1E, 0x7E, 0x7E, 0x1E, 0x06, 0x00 }; diff --git a/dot_dzen/icons/plus.xbm b/dot_dzen/icons/plus.xbm new file mode 100644 index 0000000..f8e5f8a --- /dev/null +++ b/dot_dzen/icons/plus.xbm @@ -0,0 +1,5 @@ +#define occupied_width 8 +#define occupied_height 16 +static unsigned char occupied_bits[] = { + 0x00, 0x00, 0x08, 0x08, 0x3e, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/power-ac.xbm b/dot_dzen/icons/power-ac.xbm new file mode 100644 index 0000000..45ed243 --- /dev/null +++ b/dot_dzen/icons/power-ac.xbm @@ -0,0 +1,6 @@ +#define power_ac_width 16 +#define power_ac_height 16 +static unsigned char power_ac_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x07, 0xc0, 0x3f, + 0xe0, 0x07, 0xfc, 0x07, 0xfc, 0x07, 0xe0, 0x07, 0xc0, 0x3f, 0x80, 0x07, + 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/power-bat.xbm b/dot_dzen/icons/power-bat.xbm new file mode 100644 index 0000000..c450bbc --- /dev/null +++ b/dot_dzen/icons/power-bat.xbm @@ -0,0 +1,6 @@ +#define battery_width 16 +#define battery_height 16 +static unsigned char battery_bits[] = { + 0x00, 0x00, 0xc0, 0x03, 0xc0, 0x03, 0xf0, 0x0f, 0xf0, 0x0f, 0x10, 0x08, + 0x10, 0x08, 0x10, 0x08, 0x10, 0x08, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, + 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0x00, 0x00 }; diff --git a/dot_dzen/icons/power-bat2.xbm b/dot_dzen/icons/power-bat2.xbm new file mode 100644 index 0000000..e7be632 --- /dev/null +++ b/dot_dzen/icons/power-bat2.xbm @@ -0,0 +1,6 @@ +#define power_bat2_width 16 +#define power_bat2_height 16 +static unsigned char power_bat2_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x7e, 0x18, + 0x7e, 0x78, 0x7e, 0x78, 0x7e, 0x78, 0x7e, 0x78, 0x7e, 0x18, 0xfe, 0x1f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/prev.xbm b/dot_dzen/icons/prev.xbm new file mode 100644 index 0000000..8774315 --- /dev/null +++ b/dot_dzen/icons/prev.xbm @@ -0,0 +1,4 @@ +#define prev_width 8 +#define prev_height 8 +static unsigned char prev_bits[] = { + 0x00, 0x42, 0x72, 0x7E, 0x7E, 0x72, 0x42, 0x00 }; diff --git a/dot_dzen/icons/rwd.xbm b/dot_dzen/icons/rwd.xbm new file mode 100644 index 0000000..5170b21 --- /dev/null +++ b/dot_dzen/icons/rwd.xbm @@ -0,0 +1,4 @@ +#define rwd_width 8 +#define rwd_height 8 +static unsigned char rwd_bits[] = { + 0x00, 0x48, 0x6C, 0x7E, 0x7E, 0x6C, 0x48, 0x00 }; diff --git a/dot_dzen/icons/spkr_hi.xbm b/dot_dzen/icons/spkr_hi.xbm new file mode 100644 index 0000000..7c2ffc4 --- /dev/null +++ b/dot_dzen/icons/spkr_hi.xbm @@ -0,0 +1,4 @@ +#define spkr_01_width 8 +#define spkr_01_height 8 +static unsigned char spkr_01_bits[] = { + 0x08, 0x4C, 0x8F, 0xAF, 0xAF, 0x8F, 0x4C, 0x08 }; diff --git a/dot_dzen/icons/spkr_mute.xbm b/dot_dzen/icons/spkr_mute.xbm new file mode 100644 index 0000000..8265bf8 --- /dev/null +++ b/dot_dzen/icons/spkr_mute.xbm @@ -0,0 +1,4 @@ +#define spkr_02_width 8 +#define spkr_02_height 8 +static unsigned char spkr_02_bits[] = { + 0x08, 0x0C, 0x0F, 0x1F, 0x1F, 0x0F, 0x0C, 0x08 }; diff --git a/dot_dzen/icons/square.xbm b/dot_dzen/icons/square.xbm new file mode 100644 index 0000000..4bc66cd --- /dev/null +++ b/dot_dzen/icons/square.xbm @@ -0,0 +1,5 @@ +#define square_width 8 +#define square_height 16 +static unsigned char square_bits[] = { + 0x00, 0x00, 0x1e, 0x1e, 0x1e, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/stop.xbm b/dot_dzen/icons/stop.xbm new file mode 100644 index 0000000..f92b64d --- /dev/null +++ b/dot_dzen/icons/stop.xbm @@ -0,0 +1,4 @@ +#define stop_width 8 +#define stop_height 8 +static unsigned char stop_bits[] = { + 0x00, 0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x00 }; diff --git a/dot_dzen/icons/temp.xbm b/dot_dzen/icons/temp.xbm new file mode 100644 index 0000000..f37932b --- /dev/null +++ b/dot_dzen/icons/temp.xbm @@ -0,0 +1,6 @@ +#define temp_width 16 +#define temp_height 16 +static unsigned char temp_bits[] = { + 0x00, 0x00, 0x80, 0x01, 0xc0, 0x0b, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x0b, + 0x40, 0x02, 0x40, 0x02, 0x40, 0x0a, 0x40, 0x02, 0x40, 0x02, 0x60, 0x06, + 0x20, 0x04, 0x60, 0x06, 0xc0, 0x03, 0x00, 0x00 }; diff --git a/dot_dzen/icons/up.xbm b/dot_dzen/icons/up.xbm new file mode 100644 index 0000000..2fb6f25 --- /dev/null +++ b/dot_dzen/icons/up.xbm @@ -0,0 +1,6 @@ +#define up_width 16 +#define up_height 16 +static unsigned char up_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x00, 0xc0, 0x01, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/vol-hi.xbm b/dot_dzen/icons/vol-hi.xbm new file mode 100644 index 0000000..7c4a849 --- /dev/null +++ b/dot_dzen/icons/vol-hi.xbm @@ -0,0 +1,6 @@ +#define vol_hi2_width 16 +#define vol_hi2_height 16 +static unsigned char vol_hi2_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x80, 0x21, 0xc0, 0x49, 0xfc, 0x51, + 0xfc, 0x55, 0xfc, 0x55, 0xfc, 0x55, 0xfc, 0x55, 0xfc, 0x51, 0xc0, 0x49, + 0x80, 0x21, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/vol-mute.xbm b/dot_dzen/icons/vol-mute.xbm new file mode 100644 index 0000000..2d01f7b --- /dev/null +++ b/dot_dzen/icons/vol-mute.xbm @@ -0,0 +1,6 @@ +#define vol_mute2_width 16 +#define vol_mute2_height 16 +static unsigned char vol_mute2_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x01, 0xc0, 0x01, 0xfc, 0x01, + 0xfc, 0x01, 0xfc, 0x29, 0xfc, 0x11, 0xfc, 0x29, 0xfc, 0x01, 0xc0, 0x01, + 0x80, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 }; diff --git a/dot_dzen/icons/wifi_01.xbm b/dot_dzen/icons/wifi_01.xbm new file mode 100644 index 0000000..315d0f7 --- /dev/null +++ b/dot_dzen/icons/wifi_01.xbm @@ -0,0 +1,4 @@ +#define wifi_01_width 8 +#define wifi_01_height 8 +static unsigned char wifi_01_bits[] = { + 0x80, 0xA0, 0xA8, 0xAB, 0xAB, 0xA8, 0xA0, 0x80 }; diff --git a/dot_dzen/icons/wifi_02.xbm b/dot_dzen/icons/wifi_02.xbm new file mode 100644 index 0000000..bd2b3ee --- /dev/null +++ b/dot_dzen/icons/wifi_02.xbm @@ -0,0 +1,4 @@ +#define wifi_02_width 8 +#define wifi_02_height 8 +static unsigned char wifi_02_bits[] = { + 0x40, 0x90, 0xA4, 0xA9, 0xA9, 0xA4, 0x90, 0x40 }; diff --git a/dot_dzen/temperature.sh b/dot_dzen/temperature.sh new file mode 100755 index 0000000..4badbc5 --- /dev/null +++ b/dot_dzen/temperature.sh @@ -0,0 +1,26 @@ +#!/bin/sh +# +# original script by lyon8 <lyon8@gmx.net> +# modifications from original by <sean.escriva@gmail.com> +# show your laptop battery state in dzen +# Taken from http://www.webframp.com/2008/08/17/switchdzen/ and modified by Ryan +# Kavanagh <ryanakca@kubuntu.org> to add support for a missing battery and use +# /sys instead of /proc/acpi/battery + +BG='#171717' # dzen backgrounad +FG='#11DD11' # dzen foreground +W=130 # width of the dzen bar +GW=50 # width of the gauge +GFG='#33ccff' # color of the gauge +GH=7 # height of the gauge +GBG='#333' # color of gauge background +X=922 # x position +Y=0 # y position +FN='snap' # font +TIME_INT=10 + +TEMPERATURE=`acpi -t` + +while true; do + echo $TEMPERATURE | sed -e 's/.*ok, //g' && sleep $TIME_INT +done | dzen2 -ta c -tw $W -y $Y -x $X -fg $FG -bg $BG #-fn $FN |