dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit dd0ab4213e6cc7aa5c9387a4c901310ea1a165fd
parent d08b7c9afb804c378879b708a33745d8ac1ecd34
Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date:   Tue,  4 Feb 2014 11:24:51 +0100

Custom panel

Diffstat:
M.config/bspwm/bspwmrc | 4++--
D.config/bspwm/panel/launcher | 7-------
D.config/bspwm/panel/launcher_apps | 15---------------
D.config/bspwm/panel/launcher_conky | 10----------
D.config/bspwm/panel/launcher_menu | 53-----------------------------------------------------
D.config/bspwm/panel/panel | 31-------------------------------
D.config/bspwm/panel/panel_bar | 49-------------------------------------------------
D.config/bspwm/panel/panel_battery | 62--------------------------------------------------------------
D.config/bspwm/panel/panel_conky | 13-------------
D.config/bspwm/panel/panel_wifi | 32--------------------------------
M.i3/config | 2+-
M.i3/status | 3++-
Mbin/panel_bar | 61++++++++++++++++++++++++++++++++++++++++++-------------------
13 files changed, 47 insertions(+), 295 deletions(-)

diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc @@ -57,5 +57,5 @@ bspc config rule_command "$(which rule_command)" # Move focus to the primary monitor bspc monitor -f primary -#/home/adc/bin/panel & -/home/adc/.config/bspwm/panel/panel & +/home/adc/bin/panel & +#/home/adc/.config/bspwm/panel/panel & diff --git a/.config/bspwm/panel/launcher b/.config/bspwm/panel/launcher @@ -1,7 +0,0 @@ -#!/bin/bash - -font="-*-tamsyn-medium-r-normal-*-12-110-75-75-m-50-iso8859-*" -background="#181512" -foreground="#9a875f" - -conky -qc ./launcher_conky | dzen2 -x '0' -w '100' -h '14' -ta 'l' -bg $background -fg $foreground -y '0' -fn $font -dock & diff --git a/.config/bspwm/panel/launcher_apps b/.config/bspwm/panel/launcher_apps @@ -1,15 +0,0 @@ - ^fg(#504339)^i(/home/sunn/.dzen/arch.xbm)^fg() term:urxvtc - ^fg(#504339)^i(/home/sunn/.dzen/fs_01.xbm)^fg() www:firefox - ^fg(#504339)^i(/home/sunn/.dzen/fwd.xbm)^fg() thunar:thunar - ^fg(#504339)^i(/home/sunn/.dzen/diskette.xbm)^fg() pdf:zathura - ^fg(#504339)^i(/home/sunn/.dzen/plug.xbm)^fg() doc:lowriter - ^fg(#504339)^i(/home/sunn/.dzen/stop.xbm)^fg() xls:localc - ^fg(#504339)^i(/home/sunn/.dzen/ac.xbm)^fg() ppt:loimpress - ^fg(#504339)^i(/home/sunn/.dzen/fox.xbm)^fg() gimp:gimp - ^fg(#504339)^i(/home/sunn/.dzen/note.xbm)^fg() ario:ario - ^fg(#504339)^i(/home/sunn/.dzen/mem.xbm)^fg() matlab:urxvt -e matlab -nodesktop -nosplash ----------- - ^fg(#504339)^i(/home/sunn/.dzen/play.xbm)^fg() run:gmrun - ^fg(#504339)^i(/home/sunn/.dzen/full.xbm)^fg() suspend:systemctl suspend - ^fg(#504339)^i(/home/sunn/.dzen/half.xbm)^fg() restart:systemctl reboot - ^fg(#504339)^i(/home/sunn/.dzen/empty.xbm)^fg() shutdown:systemctl poweroff diff --git a/.config/bspwm/panel/launcher_conky b/.config/bspwm/panel/launcher_conky @@ -1,10 +0,0 @@ -short_units yes -background yes -out_to_console yes -out_to_x no -# Update interval in seconds -update_interval 99999 -update_interval_on_battery 999999 - -TEXT -^ca(1,./launcher_menu launcher_apps) ^fg(\#504339) ^i(/home/sunn/.dzen/arch_10x10.xbm)^fg(\#9a875f) bspwm ^ca() diff --git a/.config/bspwm/panel/launcher_menu b/.config/bspwm/panel/launcher_menu @@ -1,53 +0,0 @@ -#!/bin/sh - -WIDTH=85 -#FONT="-artwiz-limey-medium-r-normal-*-10-110-75-75-m-50-iso8859-*" -#FONT='sans:size=11' -#FONT='sawasdee:size=10' -#FONT='-*-gohufontmod11-*-*-*-*-*-*-*-*-*-*-*-*' -#FONT='-*-suxus-*-*-normal-*-10-100-75-75-c-50-iso8859-1' -#FONT='-*-nu-*-*-normal-*-10-100-75-75-c-50-iso8859-1' -FONT='-*-tewi-medium-*-normal-*-*-*-*-*-*-*-*-*' - - -# Width of the graphical separator (default 80% of window's width) -SEPARATOR_WIDTH=`expr $WIDTH - \( $WIDTH / 100 \) \* 20` - -#Position -X=48 -Y=0 - -MENUFILE=$1 - -# number of visible menu entries (access the others through scrolling up/down) -LINES=`wc -l "$MENUFILE"|sed -e 's/ .*//'` -[ $LINES -gt 20 ] && LINES=20 - -execute () { - read PROG - - while read LINE; do - LBL=;APP= - LBL=$(echo $LINE|sed -e 's/:.*$//' -e 's/^[ \t]*//' -e 's/[ \t]*$//') - APP=$(echo $LINE|sed -e 's/^.*://' -e 's/^[ \t]*//' -e 's/[ \t]*$//') - - if [ x"$APP" = x"exit" ]; then - exit - elif [ x"$LBL" = x"$PROG" ]; then - if [ x"$APP" = x"" ]; then - $LBL& - else - $APP& - fi - exit - fi - done < "$MENUFILE" -} - - -( -echo " " -sed -e 's/:.*$//' \ - -e 's/^.--*/^r('${SEPARATOR_WIDTH}'x1)/' "$MENUFILE" -) | \ - dzen2 -tw 1 -l $LINES -w $WIDTH -x $X -y $Y -fn $FONT -bg '#181512' -fg '#9a875f' -p -m -sa l -e 'onstart=uncollapse;leaveslave=exit;button1=menuprint_noparse,exit' | execute diff --git a/.config/bspwm/panel/panel b/.config/bspwm/panel/panel @@ -1,31 +0,0 @@ -#! /bin/sh - -cd $(dirname $0) -#./launcher - -if [ $(pgrep -cx panel) -gt 1 ] ; then - printf "%s\n" "The panel is already running." >&2 - exit 1 -fi - -trap 'trap - TERM; kill 0' INT TERM QUIT EXIT - -flavor=${1:-bar} - -bspc control --subscribe > "$PANEL_FIFO" & -#xtitle -sf 'T%s' > "$PANEL_FIFO" & -#clock -sf 'S%a %H:%M' > "$PANEL_FIFO" & -echo "T" > "$PANEL_FIFO" & -conky -c ./panel_conky > "$PANEL_FIFO" & - -case "$flavor" in - bar) - cat "$PANEL_FIFO" | ./panel_bar | bar - ;; - dzen2) - PANEL_HEIGHT=24 - FONT_FAMILY='DejaVu Sans' - FONT_SIZE=11 - cat "$PANEL_FIFO" | panel_dzen2 -f "$FONT_FAMILY" -s "$FONT_SIZE" | dzen2 -h $PANEL_HEIGHT -dock -ta l -title-name panel -fn "${FONT_FAMILY}:pixelsize=${FONT_SIZE}" -fg "$COLOR_FOREGROUND" -bg "$COLOR_BACKGROUND" - ;; -esac diff --git a/.config/bspwm/panel/panel_bar b/.config/bspwm/panel/panel_bar @@ -1,49 +0,0 @@ -#! /bin/sh -# -# Example panel for LemonBoy's bar - -while read -r line ; do - case $line in - S*) - sys_infos="\\r${line#?}\\fr" - ;; - T*) - title="\\f8  \\f9 bspwm" - ;; - W*) - wm_infos="\\c" - IFS=':' - set -- ${line#?} - while [ $# -gt 0 ] ; do - item=$1 - name=${item#?} - case $item in - [OFU]*) - # active desktop - wm_infos="$wm_infos\\f9 • \\fr\\br" - ;; - o*) - # inactive but occupied desktop - wm_infos="$wm_infos\\f8 • \\fr" - ;; - f*) - # inactive desktop - wm_infos="$wm_infos\\f8 ○ \\fr" - ;; - u*) - # urgent desktop - wm_infos="$wm_infos \\f3•\\fr " - ;; - L*) - # layout -# layout=$(printf "%s" "${name}" | sed 's/\(.\).*/\U\1/') - layout="" - wm_infos="$wm_infos \\b4\\f0$layout\\br\\fr" - ;; - esac - shift - done - ;; - esac - printf "%s\n" "$title $wm_infos $sys_infos" -done diff --git a/.config/bspwm/panel/panel_battery b/.config/bspwm/panel/panel_battery @@ -1,62 +0,0 @@ -#!/bin/bash - -# BATTERY ICONS: -#      - -BAT=`acpi -b | awk '{gsub(/%,/,""); print $4}' | sed 's/%//g'` -STATUS=`acpi -b | awk '{gsub(/,/,""); print $3}'` - -# Set Icon -icon="" -if [[ $STATUS != "Discharging" ]]; then - icon="" -elif [[ $BAT -lt 10 ]]; then - icon="" -elif [[ $BAT -lt 40 ]]; then - icon="" -elif [[ $BAT -lt 70 ]]; then - icon="" -else - icon="" -fi - -bar="" -case $BAT in - 100) - bar="" - ;; - [0-5]) - bar="\f8—————————" - ;; - [5-9]) - bar="\f3—\f8————————" - ;; - [1-2]*) - bar="——\f8———————" - ;; - 3*) - bar="———\f8——————" - ;; - 4*) - bar="————\f8—————" - ;; - 5*) - bar="—————\f8————" - ;; - 6*) - bar="——————\f8———" - ;; - 7*) - bar="———————\f8——" - ;; - 8*) - bar="————————\f8—" - ;; - *) - bar="—————————" - ;; -esac - -# Create Bar - -echo "$icon $BAT \f9$bar" diff --git a/.config/bspwm/panel/panel_conky b/.config/bspwm/panel/panel_conky @@ -1,13 +0,0 @@ -short_units yes -background yes -out_to_console yes -out_to_x no -# Update interval in seconds -update_interval 3 -update_interval_on_battery 3 - -#TEXT -#S\f8${execi 1 ./panel_wifi} \f9${wireless_essid wlan0} \f8${execi 1 ./panel_battery} \fr${time %Y-%m-%d %H:%M } - -TEXT -S\f8${execi 1 ./panel_wifi} \f9${wireless_essid wlan0} \f8${execi 1 ./panel_battery} \fr${time %Y-%m-%d %H:%M } diff --git a/.config/bspwm/panel/panel_wifi b/.config/bspwm/panel/panel_wifi @@ -1,32 +0,0 @@ -#!/bin/bash - -# WIFI ICONS -#  - -QUAL=`iwconfig wlan0 | grep 'Link Quality=' | awk '{gsub(/[=/]/," "); print $3}'` -MAX=`iwconfig wlan0 | grep 'Link Quality=' | awk '{gsub(/[=/]/," "); print $4}'` -PERC=`echo $QUAL*100/$MAX | bc` - -icon="" -case $PERC in - [0-4]) - icon="" - ;; - [4-9]) - icon="" - ;; - [2-3]*) - icon="" - ;; - [4-5]*) - icon="" - ;; - [6-7]*) - icon="" - ;; - *) - icon="" - ;; -esac - -echo "$icon" diff --git a/.i3/config b/.i3/config @@ -188,7 +188,7 @@ bar { #position top position bottom #mode dock - mode hide + #mode hide workspace_buttons yes #tray_output none tray_output primary diff --git a/.i3/status b/.i3/status @@ -43,7 +43,8 @@ run_watch DHCP { } run_watch VPN { - pidfile = "/var/run/vpnc/pid" + #pidfile = "/var/run/vpnc/pid" + pidfile = "/var/run/vpnc/defaultroute" } time { diff --git a/bin/panel_bar b/bin/panel_bar @@ -19,34 +19,56 @@ while read -r line ; do item=$1 name=${item#?} case $item in - O*) - # focused occupied desktop - wm_infos="$wm_infos \\u3\\br\\fr${name}\\ur" - ;; - F*) - # focused free desktop - wm_infos="$wm_infos \\u4\\br\\f7${name}\\ur" - ;; - U*) - # focused urgent desktop - wm_infos="$wm_infos \\u9\\br\\fr${name}\\ur" + #O*) + ## focused occupied desktop + #wm_infos="$wm_infos \\u3\\br\\fr${name}\\ur" + #;; + #F*) + ## focused free desktop + #wm_infos="$wm_infos \\u4\\br\\f7${name}\\ur" + #;; + #U*) + ## focused urgent desktop + #wm_infos="$wm_infos \\u9\\br\\fr${name}\\ur" + #;; + #o*) + ## occupied desktop + #wm_infos="$wm_infos \\br\\fr${name}" + #;; + #f*) + ## free desktop + #wm_infos="$wm_infos \\br\\f7${name}" + #;; + #u*) + ## urgent desktop + #wm_infos="$wm_infos \\b1\\fr${name}" + #;; + #L*) + ## layout + #layout=$(printf "%s" "${name}" | sed 's/\(.\).*/\U\1/') + #wm_infos="$wm_infos \\br\\f2$layout" + #;; + [OFU]*) + # active desktop + wm_infos="$wm_infos\\f9 • \\fr\\br" ;; o*) - # occupied desktop - wm_infos="$wm_infos \\br\\fr${name}" + # inactive but occupied desktop + wm_infos="$wm_infos\\f8 • \\fr" ;; f*) - # free desktop - wm_infos="$wm_infos \\br\\f7${name}" + # inactive desktop + wm_infos="$wm_infos\\f8 ○ \\fr" ;; u*) # urgent desktop - wm_infos="$wm_infos \\b1\\fr${name}" + wm_infos="$wm_infos\\f3•\\fr " ;; L*) # layout - layout=$(printf "%s" "${name}" | sed 's/\(.\).*/\U\1/') - wm_infos="$wm_infos \\br\\f2$layout" +# layout=$(printf "%s" "${name}" | sed 's/\(.\).*/\U\1/') + layout="" + wm_infos="$wm_infos \\b4\\f0$layout\\br\\fr" ;; [Mm]*) # monitor @@ -61,5 +83,6 @@ while read -r line ; do ;; esac #printf "%s\n" "\\l $wm_infos \\c $title \\r $sys_infos " - printf "%s\n" "\\l $wm_infos $title \\r $sys_infos " + #printf "%s\n" "\\l $wm_infos $title \\r $sys_infos " + printf "%s\n" "\\l $title \\c $wm_infos \\r $sys_infos " done