summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/lxpanel/default/config3
-rw-r--r--.config/lxpanel/default/panels/panel42
-rw-r--r--.crontab2
-rw-r--r--.maildirproc/default.rc101
-rw-r--r--.offlineimaprc13
-rwxr-xr-x.wmii/autostart3
-rwxr-xr-x.wmii/exec2
-rwxr-xr-x.wmii/quit2
-rw-r--r--.wmii/theme-solarized (renamed from .wmii/wmiirc_solarized)0
-rw-r--r--.wmii/theme-solarized-dark (renamed from .wmii/wmiirc_solarized_dark)8
-rwxr-xr-x.wmii/wmiirc528
-rw-r--r--.xinitrc7
12 files changed, 418 insertions, 293 deletions
diff --git a/.config/lxpanel/default/config b/.config/lxpanel/default/config
new file mode 100644
index 0000000..3ac287f
--- /dev/null
+++ b/.config/lxpanel/default/config
@@ -0,0 +1,3 @@
+[Command]
+FileManager=v-editor %s
+Terminal=urxvt
diff --git a/.config/lxpanel/default/panels/panel b/.config/lxpanel/default/panels/panel
new file mode 100644
index 0000000..9d776bb
--- /dev/null
+++ b/.config/lxpanel/default/panels/panel
@@ -0,0 +1,42 @@
+# lxpanel <profile> config file. Manually editing is not recommended.
+# Use preference dialog in lxpanel to adjust config when you can.
+
+Global {
+ edge=top
+ allign=right
+ margin=0
+ widthtype=percent
+ width=100
+ height=16
+ transparent=1
+ tintcolor=#002b36
+ alpha=255
+ autohide=0
+ heightwhenhidden=2
+ setdocktype=1
+ setpartialstrut=1
+ usefontcolor=1
+ fontsize=10
+ fontcolor=#839496
+ usefontsize=0
+ background=0
+ backgroundfile=/usr/share/lxpanel/images/background.png
+ iconsize=16
+}
+
+Plugin {
+ type = space
+ expand=1
+ Config {
+ Size=2
+ }
+}
+
+Plugin {
+ type = tray
+}
+
+Plugin {
+ type = volumealsa
+}
+
diff --git a/.crontab b/.crontab
index 28d7b0a..c2d8351 100644
--- a/.crontab
+++ b/.crontab
@@ -1,3 +1,3 @@
# m h dom mon dow command
*/5 * * * * cd $HOME && make -
-*/5 * * * * offlineimap-runner
+*/5 * * * * offlineimap-runner 2 -u quiet
diff --git a/.maildirproc/default.rc b/.maildirproc/default.rc
index f49fb9b..24f51e8 100644
--- a/.maildirproc/default.rc
+++ b/.maildirproc/default.rc
@@ -71,32 +71,25 @@ def handle_incoming_unknown(mail):
return
def my_filters(mail):
- # Sort into software mailing lists
+ # Sort mail from GNU mailing lists
+ for list in [ 'bug-gsrc', 'bug-make', 'help-make', 'social', 'help-grub' ]:
+ if (
+ False
+ or mail["List-Id"].matches(list+"\.gnu\.org")
+ or mail["Subject"].contains(list)
+ ):
+ mail.move(".software."+list)
+ return
+ # Sort mail from other software mailing lists
if (
False
- or mail["List-Id"].matches("bug-gsrc\.gnu\.org")
- or mail["Subject"].contains("bug-gsrc")
+ or mail["List-Id"].matches("social-discuss\.gnu\.org")
+ or mail["Subject"].contains("social-discuss")
):
- mail.move(".software.bug-gsrc")
- return
-
- if mail["List-Id"].matches("bug-make\.gnu\.org"):
- mail.move(".software.bug-make")
- return
-
- if mail["List-Id"].matches("help-make\.gnu\.org"):
- mail.move(".software.help-make")
- return
-
- if mail["List-Id"].matches("social(|-discuss)\.gnu\.org"):
mail.move(".software.social")
return
- if mail["List-Id"].matches("help-grub.gnu.org"):
- mail.move(".software.help-grub")
- return
-
if mail["List-Id"].matches("maintenance.lists.parabolagnulinux.org"):
mail.move(".software.parabola-maintenance")
return
@@ -108,9 +101,15 @@ def my_filters(mail):
):
mail.move(".software.parabola-dev")
return
+
+ for subject_re in [
+ "\[Stow-[^\]]*\].*",
+ ]:
+ if mail["Subject"].matches(subject_re):
+ mail.move(".software")
+ return
- # Sort email from some social websites
-
+ # Sort mail from some social websites
if mail["From"].matches("facebook(|mail)\.com"):
mail.move(".Social.Facebook")
return
@@ -131,8 +130,7 @@ def my_filters(mail):
mail.move(".Social.xkcd")
return
- # Sort email related to Troop 276
-
+ # Sort mail related to Troop 276
if (
False
or mail["List-Id"].contains("troopmailinglist.troop276.net")
@@ -154,11 +152,29 @@ def my_filters(mail):
mail.move(".Troop276")
return
+ # Sort mail from misc people
if mail["From"].matches("margieshu@sbcglobal\.net"):
mail.move(".misc.Mom")
return
+
+ for address in [
+ "nintendo.com",
+ "nintendo-news.com",
+ ]:
+ if mail["From"].contains(address):
+ mail.move(".misc.Nintendo")
+ return
+
+ for address in [
+ "@lpi.org",
+ "@pearson.com",
+ "CompTIA",
+ ]:
+ if mail["From"].contains(address):
+ mail.move(".misc.CompTIA")
+ return
- # Sort mail from robotics people
+ # Sort mail from FRC people
for address in [
"jeffreysmith@msdlt.k12.in.us",
"jason.zielke@gmail.com",
@@ -171,7 +187,6 @@ def my_filters(mail):
"skiplittell@comcast.net",
"dave.nelson@ecolab.com",
"@ni.com",
- "@precisepath.com",
"@usfirst.org",
"gamefreak207@gmail.com", # Brett Leedy
"tswilson4801@att.net",
@@ -184,6 +199,7 @@ def my_filters(mail):
mail.move(".School.Robotics")
return
for subject_re in [
+ "FIRST",
"robotics",
"1024",
"kil-?a-?bytes",
@@ -192,9 +208,10 @@ def my_filters(mail):
mail.move(".School.Robotics")
return
- # Sort mail from scoftware people
+ # Sort mail from software people
for address in [
"gnu.org",
+ "eff.org",
"gitorious.org",
"sourceforge.com",
"ietf.org",
@@ -208,30 +225,9 @@ def my_filters(mail):
if is_to_or_from(mail,address):
mail.move(".software")
return
- for subject_re in [
- "\[Stow-[^\]]*\].*",
- ]:
- if mail["Subject"].matches(subject_re):
- mail.move(".software")
- return
- for address in [
- "nintendo.com",
- "nintendo-news.com",
- ]:
- if mail["From"].contains(address):
- mail.move(".Nintendo")
- return
-
- for address in [
- "@lpi.org",
- "@pearson.com",
- "CompTIA",
- ]:
- if mail["From"].contains(address):
- mail.move(".CompTIA")
- return
+ # Sort mail from the school newspaper
if (
False
or is_to_or_from(mail, "@lnnorthstar.org")
@@ -240,8 +236,13 @@ def my_filters(mail):
mail.move(".School.Newspaper")
return
+ # Sort mail from various employers/people who pay me
+ if is_to_or_from(mail, "@precisepath.com"):
+ mail.move(".Work.PrecisePath")
+ return
+
if is_to_or_from(mail,"susyphil@aol.com"):
- mail.move(".PMCH")
+ mail.move(".Work.PMCH")
for address in [
"d.farrar@comcast.net",
@@ -253,7 +254,6 @@ def my_filters(mail):
return
# Sort misc newsletters
-
if (
False
or mail["From"].contains("newsletter")
@@ -261,6 +261,7 @@ def my_filters(mail):
or mail["From"].contains("oreilly.com")
or mail["Subject"].contains("newsletter")
or mail["From"].contains("Info@mailing.jamendo.com")
+ or mail["From"].contains("info@demandprogress.org")
):
mail.move(".misc.Newsletters")
return
diff --git a/.offlineimaprc b/.offlineimaprc
index 0f4cc78..319593c 100644
--- a/.offlineimaprc
+++ b/.offlineimaprc
@@ -1,3 +1,4 @@
+# -*- Mode: Conf -*-
[general]
accounts = LukeShu
@@ -8,13 +9,21 @@ remoterepository = Remote
[Repository Local]
type = Maildir
localfolders = ~/Maildir
-nametrans = lambda foldername: re.sub('^$', 'Inbox', re.sub('^/', '', foldername.replace('.', '/')))
+sep = .
folderfilter = lambda foldername: not re.search('(Trash|Del|-old|Draft)', foldername)
+# transforms local -> remote
+nametrans = lambda foldername: re.sub('^$', 'Inbox', re.sub('^'+re.escape('%(sep)s'), '', foldername))
+
+
[Repository Remote]
type = IMAP
ssl = yes
+cert_fingerprint = 700d84baa7e852240178dc2de18e7e528a2854df
remotehost = imap.mail.yahoo.com
remoteuser = lukeshu@sbcglobal.net
-nametrans = lambda foldername: re.sub('^\.Inbox$', '', "."+foldername.replace('/', '.'))
folderfilter = lambda foldername: not re.search('(Trash|Del)', foldername)
+
+# transforms remote -> local
+# we must assume that sep=/ on the remote IMAP server.
+nametrans = lambda foldername: '/'+re.sub('^Inbox$', '', foldername)
diff --git a/.wmii/autostart b/.wmii/autostart
new file mode 100755
index 0000000..b44ade8
--- /dev/null
+++ b/.wmii/autostart
@@ -0,0 +1,3 @@
+#!/bin/bash
+daemon lxpanel &> /dev/null
+daemon wicd-client -t &> /dev/null
diff --git a/.wmii/exec b/.wmii/exec
new file mode 100755
index 0000000..c83d790
--- /dev/null
+++ b/.wmii/exec
@@ -0,0 +1,2 @@
+#!/bin/bash
+echo exec "$@" >> $WMII_DIR/ctl
diff --git a/.wmii/quit b/.wmii/quit
new file mode 100755
index 0000000..d7a55c3
--- /dev/null
+++ b/.wmii/quit
@@ -0,0 +1,2 @@
+#!/bin/bash
+echo quit >> $WMII_DIR/ctl
diff --git a/.wmii/wmiirc_solarized b/.wmii/theme-solarized
index 5dc830d..5dc830d 100644
--- a/.wmii/wmiirc_solarized
+++ b/.wmii/theme-solarized
diff --git a/.wmii/wmiirc_solarized_dark b/.wmii/theme-solarized-dark
index 4d663d2..83285ba 100644
--- a/.wmii/wmiirc_solarized_dark
+++ b/.wmii/theme-solarized-dark
@@ -1,8 +1,12 @@
+#!/bin/sh
# Solarized-dark
-. $HOME/.wmii/wmiirc_solarized
+. $HOME/.wmii/theme-solarized
+
+WMII_BACKGROUND="$SOL_BASE02"
# ="<text> <background> <border>"
WMII_NORMCOLORS="$SOL_BASE0 $SOL_BASE03 $SOL_BASE02"
WMII_FOCUSCOLORS="$SOL_BASE0 $SOL_BASE02 $SOL_BASE0"
-WMII_BACKGROUND="$SOL_BASE02"
+WMII_URGENTCOLORS="$SOL_RED $SOL_BASE03 $SOL_RED"
+
diff --git a/.wmii/wmiirc b/.wmii/wmiirc
index d41f392..f211d7f 100755
--- a/.wmii/wmiirc
+++ b/.wmii/wmiirc
@@ -1,269 +1,325 @@
-#!/bin/dash -f
-# -*- mode: sh; -*-
+#!/bin/bash
+# Let any running instances of wmiirc know that we're starting
-# Configure wmii
-wmiiscript=wmiirc # For wmii.sh
-. wmii.sh
+echo ' ==> Starting wmiirc'
+wmiir xwrite /event Start
+export WMII_NAMESPACE=`wmiir namespace`
+mount9p=/opt/plan9/bin/9pfuse
-export WMII_FONT='xft:Monospace-8'
-export WMII_TERM=x-terminal-emulator
-. $HOME/.wmii/wmiirc_local
+mkdir -p $WMII_NAMESPACE/mnt
+$mount9p $WMII_NAMESPACE/{wmii,mnt}
+export WMII_DIR=$WMII_NAMESPACE/mnt
+
+# a -- a work-around for buggy IO append in 9pfuse
+# useing '|a' should be just like using '>>', but will work
+# when 9pfuse decides to bug out.
+a() {
+ f="${1/#${WMII_DIR}/}"
+ if [ "$f" = "$1" ]; then
+ cat >> "$1"
+ else
+ if wmiir ls "$f" &>/dev/null; then
+ wmiir write "$f"
+ else
+ wmiir create "$f"
+ fi
+ fi
+}
+# I like wmiir's setsid better than linux-utils'
+setsid() { wmiir setsid "$@"; }
+WMII_FONT='xft:Monospace-8'
+WMII_TERM=x-terminal-emulator
+. $HOME/.wmii/wmiirc_local
# Configuration Variables
UP=p
DOWN=n
LEFT=b
RIGHT=f
-# Bars
-noticetimeout=5
-noticebar=/rbar/!notice
-
# Colors tuples: "<text> <background> <border>"
-. $HOME/.wmii/wmiirc_solarized_dark
+. $HOME/.wmii/theme-solarized-dark
# Menu history
hist="${WMII_CONFPATH%%:*}/history"
-histnum=5000
-
-# Column Rules
-wmiir write /colrules <<!
-/gimp/ -> 17+83+41
-/.*/ -> 62+38 # Golden Ratio
-!
# Tagging Rules
-wmiir write /tagrules <<!
-/MPlayer|VLC/ -> ~
-/Gimp/ -> ~+gimp
-/Emacs|Navigator/ -> +sel
-!
-
-local_events() { true; }
-wi_runconf -s wmiirc_local
-
-echo $WMII_NORMCOLORS | wmiir create $noticebar
-
-# Event processing
-events() {
- events_events
- events_menus
- events_actions
- events_keybindings
+echo '/Emacs|Navigator/ -> +sel' |a $WMII_DIR/tagrules
+echo '/panel/ -> /.*/' |a $WMII_DIR/tagrules
+
+if [ -f "${WMII_CONFPATH%%:*}/wmiirc_local" ]; then
+ . "${WMII_CONFPATH%%:*}/wmiirc_local"
+fi
+
+path_ls() {
+ find -L `echo "$@"|sed 'y/:/ /'` -maxdepth 1 -type f -executable -printf '%f\n' 2>/dev/null| sort -u
}
-events_events() {
- cat <<'!'
-# Events
-Event CreateTag
- echo "$WMII_NORMCOLORS" "$@" | wmiir create "/lbar/$@"
-Event DestroyTag
- wmiir remove "/lbar/$@"
-Event FocusTag
- wmiir xwrite "/lbar/$@" "$WMII_FOCUSCOLORS" "$@"
-Event UnfocusTag
- wmiir xwrite "/lbar/$@" "$WMII_NORMCOLORS" "$@"
-Event UrgentTag
- shift
- wmiir xwrite "/lbar/$@" "*$@"
-Event NotUrgentTag
- shift
- wmiir xwrite "/lbar/$@" "$@"
-Event LeftBarClick LeftBarDND
- shift
- wmiir xwrite /ctl view "$@"
-Event Unresponsive
- {
- client=$1; shift
- msg="The following client is not responding. What would you like to do?$wi_newline"
- resp=$(wihack -transient $client \
- xmessage -nearmouse -buttons Kill,Wait -print
- -fn "${WMII_FONT%%,*}" "$msg $(wmiir read /client/sel/label)")
- if [ "$resp" = Kill ]; then
- wmiir xwrite /client/$client/ctl slay &
- fi
- }&
-Event Notice
- wmiir xwrite $noticebar $wi_arg
-
- kill $xpid 2>/dev/null # Let's hope this isn't reused...
- { sleep $noticetimeout; wmiir xwrite $noticebar ' '; }&
- xpid = $!
-!
+
+path_which() {
+ mypath=$1
+ prog=$2
+ which=`which which`
+ PATH="$mypath" "$which" -- "$prog" 2>/dev/null
}
-events_menus() {
- cat <<'!'
-# Window menus
-Menu Client-3-Delete
- wmiir xwrite /client/$1/ctl kill
-#Menu Client-3-Kill
-# wmiir xwrite /client/$1/ctl slay
-Menu Client-3-Fullscreen
- wmiir xwrite /client/$1/ctl Fullscreen on
-Event ClientMouseDown
- wi_fnmenu Client $2 $1 &
-
-# LBar menus
-Menu LBar-3-Delete
- tag=$1; clients=$(wmiir read "/tag/$tag/index" | awk '/[^#]/{print $2}')
- for c in $clients; do
- if [ "$tag" = "$(wmiir read /client/$c/tags)" ]; then
- wmiir xwrite /client/$c/ctl kill
- else
- wmiir xwrite /client/$c/tags -$tag
- fi
- if [ "$tag" = "$(wi_seltag)" ]; then
- newtag=$(wi_tags | awk -v't='$tag '
- $1 == t { if(!l) getline l
- print l
- exit }
- { l = $0 }')
- wmiir xwrite /ctl view $newtag
- fi
- done
-Event LeftBarMouseDown
- wi_fnmenu LBar "$@" &
-!
+
+lstags() {
+ ls $WMII_DIR/tag | sed '/^sel$/d'
+}
+
+scansection() {
+ file=`path_which "$WMII_CONFPATH" wmiirc`
+ sec=$1
+ tmp=`mktemp`
+ if [ -n "$sec" ]; then
+ < "$file" sed -n "/^\s*$sec\s*()/,/##\s*End $sec/p" | sed '1d;$d'> $tmp
+ else
+ < "$file" sed "/\s*}\s*##\s*End\s/d" > $tmp
+ fi
+ < $tmp sed -n '/##/p'|sed -r 's/^\s*(.*)\)\s*## ?/\t\1\t/;s/\s*## ?//'
+ rm $tmp
}
-events_actions() {
- cat <<'!'
-# Actions
-Action showkeys
- echo "$KeysHelp" | xmessage -file - -fn ${WMII_FONT%%,*}
-Action quit
- wmiir xwrite /ctl quit
-Action exec
- wmiir xwrite /ctl exec "$@"
-Action rehash
- wi_proglist $PATH >$progsfile
-Action status
- set +xv
- if wmiir remove /rbar/status 2>/dev/null; then
- sleep 2
+Action() {
+ prog=`path_which "$WMII_CONFPATH" $1`; shift
+ if [ -n "$prog" ]; then
+ "$prog" "$@"
+ return $?
+ else
+ return 1
fi
- echo "$WMII_NORMCOLORS" | wmiir create /rbar/status
- while status | wmiir write /rbar/status; do
- sleep 1
- done
-!
}
-events_keybindings() {
- cat <<'!'
+Event() {
+ event=$1; shift;
+ case "$event" in
+ ## Mouse event meanings:
+ ## MouseDown = mouse down
+ ## Click = mouse up
+ ## DND = hover, while dragging something (Drag 'n' Drop)
+ ## The associated mouse button is always "1"
+ ##
+ ## Mouse-button IDs:
+ ## 1 = left
+ ## 2 = middle
+ ## 3 = right
+
+ ## WMII-meta events
+ Quit) ## No args
+ fusermount -u $WMII_DIR
+ exit $?;;
+ Warning) ## $@=string
+ notify-send "wmii warning: $@";;
+ Key) ## $1=keystroke
+ Key "$@";;
+
+ ## WMII Window management events
+ FocusFloating) ## No args
+ ;;
+ AreaFocus) ## $1=area
+ ;;
+ DestroyArea) ## $1=area
+ ;;
+ ColumnFocus) ## $1=column
+ ;;
+ CreateColumn) ## $1=column
+ ;;
+
+ ## Client events
+ CreateClient) ## $1=client
+ ;;
+ DestroyClient) ## $1=client
+ ;;
+ Urgent) ## $1=client $2=[Manager|Client]
+ ;;
+ NotUrgent) ## $1=client $2=[Manager|Client]
+ ;;
+ ClientMouseDown) ## $1=client $2=button
+ client=$1
+ button=$2
+ case $button in
+ 1) ;;
+ 2) ;;
+ 3)
+ {
+ case `wmii9menu Delete Fullscreen` in
+ Delete)
+ echo kill |a $WMII_DIR/client/$client/ctl;;
+ Fullscreen)
+ echo Fullscreen on |a $WMII_DIR/client/$1/ctl;;
+ esac
+ }& ;;
+ esac;;
+ ClientClick) ## $1=client $2=button
+ ;;
+ Unresponsive) ## $1=client
+ client=$1
+ client_name=`cat $WMII_DIR/client/$client/label`
+ msg="The client \`${client_name}' is not responding."
+ msg+=" What would you like to do?"
+ {
+ resp=$(wihack -transient $client \
+ xmessage -nearmouse -buttons Kill,Wait -print "$msg")
+ if [ "$resp" = Kill ]; then
+ echo slay |a $WMII_DIR/client/$client/ctl
+ fi
+ }& ;;
+ Fullscreen) ## $1=client $2=[on|off]
+ # TODO: hide any clients with the 'panel' class
+ ;;
+
+ ## Tag events
+ CreateTag) ## $1=tag
+ echo "$WMII_NORMCOLORS" $@ |a $WMII_DIR/lbar/$1;;
+ DestroyTag) ## $1=tag
+ rm $WMII_DIR/lbar/$1;;
+ FocusTag) ## $1=tag
+ echo "$WMII_FOCUSCOLORS" $1 |a $WMII_DIR/lbar/$1;;
+ UnfocusTag) ## $1=tag
+ echo "$WMII_NORMCOLORS" $1 |a $WMII_DIR/lbar/$1;;
+ UrgentTag) ## $1=tag $2=[Manager|Client]
+ echo "$WMII_URGENTCOLORS" $1 |a $WMII_DIR/lbar/$1;;
+ NotUrgentTag) ## $1=tag $2=[Manager|Client]
+ echo "$WMII_NORMCOLORS" $1 |a $WMII_DIR/lbar/$1;;
+
+ ## LeftBar events (usually tag buttons)
+ LeftBarMouseDown) ## $1=button $2=bar_item
+ ;;
+ LeftBarClick) ## $1=button $2=bar_item
+ shift # ignore the button
+ echo view "$@" |a $WMII_DIR/ctl;;
+ LeftMouseDND) ## $1=button $2=bar_item
+ Event LeftBarClick "$@";;
+
+ ## RightBar events
+ RightBarMouseDown) ## $1=button $2=bar_item
+ ;;
+ RightBarClick) ## $1=button $2=bar_item
+ ;;
+ RightMouseDND) ## $1=button $2=bar_item
+ Event RightBarClick "$@";;
+
+ ## Custom (non-WMII-generated) events
+ Start) ## No args
+ Event Quit;; # get out of the way for a new event loop
+ esac
+} ## End Event
+
# Key Bindings
-KeyGroup Moving around
-Key $MODKEY-$LEFT # Select the client to the left
- wmiir xwrite /tag/sel/ctl select left
-Key $MODKEY-$RIGHT # Select the client to the right
- wmiir xwrite /tag/sel/ctl select right
-Key $MODKEY-$UP # Select the client above
- wmiir xwrite /tag/sel/ctl select up
-Key $MODKEY-$DOWN # Select the client below
- wmiir xwrite /tag/sel/ctl select down
-
-Key $MODKEY-space # Toggle between floating and managed layers
- wmiir xwrite /tag/sel/ctl select toggle
-
-KeyGroup Moving clients around
-Key $MODKEY-Shift-$LEFT # Move selected client to the left
- wmiir xwrite /tag/sel/ctl send sel left
-Key $MODKEY-Shift-$RIGHT # Move selected client to the right
- wmiir xwrite /tag/sel/ctl send sel right
-Key $MODKEY-Shift-$UP # Move selected client up
- wmiir xwrite /tag/sel/ctl send sel up
-Key $MODKEY-Shift-$DOWN # Move selected client down
- wmiir xwrite /tag/sel/ctl send sel down
-
-Key $MODKEY-Shift-space # Toggle selected client between floating and managed layers
- wmiir xwrite /tag/sel/ctl send sel toggle
-
-KeyGroup Moving through stacks
-Key $MODKEY-Control-$UP # Select the stack above
- wmiir xwrite /tag/sel/ctl select up stack
-Key $MODKEY-Control-$DOWN # Select the stack below
- wmiir xwrite /tag/sel/ctl select down stack
-
-KeyGroup Client actions
-Key $MODKEY-shift-1 # Toggle selected client's fullsceen state
- wmiir xwrite /client/sel/ctl Fullscreen toggle
-Key $MODKEY-shift-0 # Close client
- wmiir xwrite /client/sel/ctl kill
-
-KeyGroup Changing column modes
-Key $MODKEY-d # Set column to default mode
- wmiir xwrite /tag/sel/ctl colmode sel default-max
-Key $MODKEY-s # Set column to stack mode
- wmiir xwrite /tag/sel/ctl colmode sel stack-max
-Key $MODKEY-m # Set column to max mode
- wmiir xwrite /tag/sel/ctl colmode sel stack+max
-
-KeyGroup Running programs
-Key $MODKEY-a # Open wmii actions menu
- action $(wi_actions | wimenu -h "${hist}.actions" -n $histnum) &
-Key $MODKEY-x # Open program menu
- eval wmiir setsid "$(wimenu -h "${hist}.progs" -n $histnum <$progsfile)" &
-Key $MODKEY-Return # Launch a terminal
- eval wmiir setsid $WMII_TERM &
-
-KeyGroup Other
-Key $MODKEY-Control-t # Toggle all other key bindings
- case $(wmiir read /keys | wc -l | tr -d ' \t\n') in
- 0|1)
- echo -n "$Keys" | wmiir write /keys
- wmiir xwrite /ctl grabmod $MODKEY;;
- *)
- wmiir xwrite /keys $MODKEY-Control-t
- wmiir xwrite /ctl grabmod Mod3;;
+Key() {
+ key=$1
+ case "$key" in
+ ## Moving around
+
+ $MODKEY-$LEFT) ## Select the client to the left
+ echo select left |a $WMII_DIR/tag/sel/ctl;;
+ $MODKEY-$RIGHT) ## Select the client to the right
+ echo select right |a $WMII_DIR/tag/sel/ctl;;
+ $MODKEY-$UP) ## Select the client above
+ echo select up |a $WMII_DIR/tag/sel/ctl;;
+ $MODKEY-$DOWN) ## Select the client below
+ echo select down |a $WMII_DIR/tag/sel/ctl;;
+
+ $MODKEY-space) ## Toggle between floating and managed layers
+ echo select toggle |a $WMII_DIR/tag/sel/ctl;;
+
+ ## Moving clients around
+
+ $MODKEY-Shift-$LEFT) ## Move selected client to the left
+ wmiir xwrite /tag/sel/ctl send sel left;;
+ $MODKEY-Shift-$RIGHT) ## Move selected client to the right
+ wmiir xwrite /tag/sel/ctl send sel right;;
+ $MODKEY-Shift-$UP) ## Move selected client up
+ wmiir xwrite /tag/sel/ctl send sel up;;
+ $MODKEY-Shift-$DOWN) ## Move selected client down
+ wmiir xwrite /tag/sel/ctl send sel down;;
+
+ $MODKEY-Shift-space) ## Toggle selected client between floating and managed layers
+ wmiir xwrite /tag/sel/ctl send sel toggle;;
+
+ ## Moving through stacks
+ $MODKEY-Control-$UP) ## Select the stack above
+ wmiir xwrite /tag/sel/ctl select up stack;;
+ $MODKEY-Control-$DOWN) # Select the stack below
+ wmiir xwrite /tag/sel/ctl select down stack;;
+
+ ## Client actions
+ $MODKEY-shift-1) ## Toggle selected client's fullsceen state
+ wmiir xwrite /client/sel/ctl Fullscreen toggle;;
+ $MODKEY-shift-0) ## Close client
+ wmiir xwrite /client/sel/ctl kill;;
+
+ ## Changing column modes
+ $MODKEY-d) ## Set column to default mode
+ wmiir xwrite /tag/sel/ctl colmode sel default-max;;
+ $MODKEY-s) ## Set column to stack mode
+ wmiir xwrite /tag/sel/ctl colmode sel stack-max;;
+ $MODKEY-m) ## Set column to max mode
+ wmiir xwrite /tag/sel/ctl colmode sel stack+max;;
+
+ ## Running programs
+ $MODKEY-a) ## Open wmii actions menu
+ Action $(path_ls $WMII_CONFPATH | wimenu -h "${hist}.actions" -n 5000) & ;;
+ $MODKEY-x) ## Open program menu
+ setsid $(wimenu -h "${hist}.progs" -n 5000 <$progsfile) & ;;
+ $MODKEY-Return) ## Launch a terminal
+ setsid $WMII_TERM & ;;
+
+ ## Other
+ $MODKEY-Control-t) ## Toggle all other key bindings
+ case $(wmiir read /keys | wc -l | tr -d ' \t\n') in
+ 0|1)
+ echo -n "$Keys" | wmiir write /keys
+ wmiir xwrite /ctl grabmod $MODKEY;;
+ *)
+ wmiir xwrite /keys $MODKEY-Control-t
+ wmiir xwrite /ctl grabmod Mod3;;
+ esac;;
+
+ ## Tag actions
+ $MODKEY-t) ## Change to another tag
+ {
+ tag=$(lstags | wimenu -h "${hist}.tags" -n 50) || return
+ wmiir xwrite /ctl view $tag
+ }& ;;
+ $MODKEY-Shift-t) ## Retag the selected client
+ sel=$(sed 1q $WMII_DIR/client/sel/ctl)
+ {
+ tag=$(lstags | wimenu -h "${hist}.tags" -n 50) || return
+ wmiir xwrite /client/$sel/tags $tag
+ }& ;;
esac
+} ## End Key
-KeyGroup Tag actions
-Key $MODKEY-t # Change to another tag
- (tag=$(wi_tags | wimenu -h "${hist}.tags" -n 50) && wmiir xwrite /ctl view $tag) &
-Key $MODKEY-Shift-t # Retag the selected client
- c=$(wi_selclient)
- (tag=$(wi_tags | wimenu -h "${hist}.tags" -n 50) && wmiir xwrite /client/$c/tags $tag) &
-!
- for i in 0 1 2 3 4 5 6 7 8 9; do
- cat <<'!'
-Key $MODKEY-$i # Move to the numbered view
- wmiir xwrite /ctl view "$i"
-#Key $MODKEY-Shift-$i # Retag selected client with the numbered tag
-# wmiir xwrite /client/sel/tags "$i"
-!
- done
-}
-wi_events events local_events
-
-# WM Configureation
-wmiir write /ctl <<!
- font $WMII_FONT
- focuscolors $WMII_FOCUSCOLORS
- normcolors $WMII_NORMCOLORS
- grabmod $MODKEY
- border 1
-!
+# WM Configuration
+echo font $WMII_FONT |a $WMII_DIR/ctl
+echo focuscolors $WMII_FOCUSCOLORS |a $WMII_DIR/ctl
+echo normcolors $WMII_NORMCOLORS |a $WMII_DIR/ctl
+echo grabmod $MODKEY |a $WMII_DIR/ctl
+echo border 1 |a $WMII_DIR/ctl
xsetroot -solid "$WMII_BACKGROUND" &
-# Misc
-progsfile="$(wmiir namespace)/.proglist"
-action status &
-wi_proglist $PATH >$progsfile &
-
-# Setup Tag Bar
-IFS="$wi_newline"
-wmiir rm $(wmiir ls /lbar | sed 's,^,/lbar/,') >/dev/null
-seltag=$(wmiir read /tag/sel/ctl | sed 1q)
-unset IFS
-wi_tags | while read tag
-do
+progsfile=$WMII_NAMESPACE/.proglist
+path_ls $PATH > $progsfile &
+
+eval arg `scansection Key|cut -sf2` |a $WMII_DIR/keys
+
+# Clear the LBar
+find $WMII_DIR/lbar -type f -delete
+
+# Emulate [Create|Focus]Tag events
+seltag=`sed 1q $WMII_DIR/tag/sel/ctl`
+lstags | while read tag; do
+ Event CreateTag "$tag"
if [ "$tag" = "$seltag" ]; then
- echo "$WMII_FOCUSCOLORS" "$tag"
- else
- echo "$WMII_NORMCOLORS" "$tag"
- fi | wmiir create "/lbar/$tag"
+ Event FocusTag "$tag"
+ fi
done
-wi_eventloop
+Action autostart 2>/dev/null &
+# use wmiir so it doesn't look like an open file
+wmiir read /event | while read event; do
+ Event $event
+done
diff --git a/.xinitrc b/.xinitrc
index 2cf4ea2..203a5cb 100644
--- a/.xinitrc
+++ b/.xinitrc
@@ -5,10 +5,13 @@
# Executed by startx (run your window manager from here)
if [ -d /etc/X11/xinit/xinitrc.d ]; then
+ echo ' ==> Running scripts in Entering xinitrc.d/*'
for f in /etc/X11/xinit/xinitrc.d/*; do
- [ -x "$f" ] && . "$f"
+ echo " -> $f"
+ [ -x "$f" ] && "$f" &
done
unset f
+ echo ' -> done'
fi
usermodmap="$HOME/.xmodmap"
@@ -20,4 +23,4 @@ fi
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice
-exec wmii
+exec ck-launch-session wmii