#!/bin/sh # configure wmii xwrite() { file="$1"; shift echo -n "$@" | wmiir write "$file" } proglist() { ls -lL `echo "$@" | tr : ' '` 2>/dev/null | awk 'NF>2 && !/^d/ && $1 ~ /x/ {print $NF}' | sort -u } # give wmiiwm a chance to start while ! echo Start wmiirc | wmiir write /event >/dev/null 2>&1 do sleep 1 done MODKEY=Alt WMII_FONT='fixed' export WMII_FONT WMII_NORMCOLORS='#222222 #eeeeee #666666' export WMII_NORMCOLORS WMII_SELCOLORS='#ffffff #285577 #4c7899' export WMII_SELCOLORS # WM CONFIGURATION xwrite /def/border 3 xwrite /def/snap 20 xwrite /def/font $WMII_FONT xwrite /def/selcolors $WMII_SELCOLORS xwrite /def/normcolors $WMII_NORMCOLORS xwrite /ws/tag 1 # TAGGING RULES wmiir write /def/rules < ~ /Gimp.*:.*/ -> ~ EOF # BAR CONFIGURATION wmiir create /bar/spare xwrite /bar/spare/colors $WMII_SELCOLORS xwrite /bar/expand spare # MISC xsetroot -solid '#0b1014' status & proglist $OLD_PATH >/tmp/ns.$USER.$DISPLAY/progs & # SHORTCUTS wmiir write /def/keys </dev/null | while read event do set -- $event type="$1"; shift case "$type" in Start) if test "$1" = wmiirc then exit fi;; NewTag) wmiir create /bar/$1 if test "$1" = "$oldtag" then xwrite /bar/$1/colors $WMII_NORMCOLORS else xwrite /bar/$1/colors $WMII_SELCOLORS fi xwrite /bar/$1/data $1;; RemoveTag) wmiir remove /bar/$1;; FocusTag) if test -n "$oldtag" then xwrite /bar/$oldtag/colors $WMII_SELCOLORS fi xwrite /bar/$1/data $1 xwrite /bar/$1/colors $WMII_NORMCOLORS oldtag=$1;; LabelClick) xwrite /ctl select $1;; Key) case "$1" in $MODKEY-Control-c) xwrite /ws/sel/sel/ctl kill;; $MODKEY-Control-w,y) exec wmiirc;; $MODKEY-Control-q,y) xwrite /ctl quit;; $MODKEY-Control-p) extern `wmiimenu