Initial commit
authorJulien Valroff <julien@kirya.net>
Mon, 23 May 2011 04:58:08 +0000 (06:58 +0200)
committerJulien Valroff <julien@kirya.net>
Mon, 23 May 2011 04:58:08 +0000 (06:58 +0200)
autostart.sh [new file with mode: 0644]
menu.xml [new file with mode: 0644]
pipemenus/dash_places_menu.sh [new file with mode: 0755]
pipemenus/obpipemenu-places [new file with mode: 0755]
pipemenus/recently_opened_menu.sh [new file with mode: 0755]
rc.xml [new file with mode: 0644]

diff --git a/autostart.sh b/autostart.sh
new file mode 100644 (file)
index 0000000..5af749f
--- /dev/null
@@ -0,0 +1,33 @@
+# Run the system-wide support stuff
+#. $GLOBALAUTOSTART
+
+# Programs to launch at startup
+eval `dbus-launch --sh-syntax --exit-with-session` 
+eval `gnome-keyring-daemon --start --components=ssh,gpg,secrets,pkcs11`
+gnome-settings-daemon &
+gnome-screensaver &
+nitrogen --restore &
+thunar --daemon &
+xcompmgr -c -t-5 -l-5 -r4.2 -o.55 &
+xfce4-power-manager &
+gnome-volume-control-applet &
+gnome-screensaver &
+system-config-printer-applet &
+parcellite &
+conky &
+gajim &
+
+if egrep -iq 'touchpad' /proc/bus/input/devices; then
+    synclient VertEdgeScroll=1 &
+    synclient TapButton1=1 &
+fi
+
+# Export the dbus session address on startup so it can be used by cron
+# http://dev.gentoo.org/~tomka/mail.html
+touch $HOME/.Xdbus
+chmod 600 $HOME/.Xdbus
+env | grep DBUS_SESSION_BUS_ADDRESS > $HOME/.Xdbus
+echo 'export DBUS_SESSION_BUS_ADDRESS' >> $HOME/.Xdbus
+
+tint2 &
+nm-applet &
diff --git a/menu.xml b/menu.xml
new file mode 100644 (file)
index 0000000..0ffa007
--- /dev/null
+++ b/menu.xml
@@ -0,0 +1,287 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openbox_menu xmlns="http://openbox.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://openbox.org/                 file:///usr/share/openbox/menu.xsd">
+       <menu id="root-menu" label="Openbox 3">
+               <item label="Exécuter">
+                       <action name="Execute">
+                               <execute>
+                                       gmrun
+                               </execute>
+                       </action>
+               </item>
+               <separator/>
+               <menu id="Debian"/>
+               <separator/>
+               <menu id="client-list-menu"/>
+               <separator/>
+               <item label="Terminal">
+                       <action name="Execute">
+                               <execute>
+                                       x-terminal-emulator
+                               </execute>
+                       </action>
+               </item>
+               <item label="Navigateur Web">
+                       <action name="Execute">
+                               <execute>
+                                       x-www-browser
+                               </execute>
+                       </action>
+               </item>
+               <item label="Gestionnaire de fichiers">
+                       <action name="Execute">
+                               <execute>
+                                       thunar
+                               </execute>
+                       </action>
+               </item>
+               <item label="Éditeur de texte">
+                       <action name="Execute">
+                               <execute>
+                                       gvim
+                               </execute>
+                       </action>
+               </item>
+               <item label="Lecteur vidéos">
+                       <action name="Execute">
+                               <execute>
+                                       vlc
+                               </execute>
+                       </action>
+               </item>
+               <separator/>
+               <menu execute="~/.config/openbox/pipemenus/recently_opened_menu.sh" id="recent" label="Fichiers récents"/>
+               <menu execute="~/.config/openbox/pipemenus/dash_places_menu.sh ~" id="places" label="Poste de travail"/>
+               <separator/>
+               <menu id="settings" label="Configuration">
+                       <menu id="conkyconfig" label="Conky Config">
+                               <item label="Edit .conkyrc">
+                                       <action name="Execute">
+                                               <execute>
+                                                       gedit ~/.conkyrc
+                                               </execute>
+                                       </action>
+                               </item>
+                               <item label="Restart Conky">
+                                       <action name="Execute">
+                                               <execute>
+                                                       conkywonky
+                                               </execute>
+                                       </action>
+                               </item>
+                               <separator label="Help?"/>
+                               <item label="man page">
+                                       <action name="Execute">
+                                               <execute>
+                                                       terminator --command=&quot;man conky&quot;
+                                               </execute>
+                                       </action>
+                               </item>
+                               <item label="Wiki Page">
+                                       <action name="Execute">
+                                               <execute>
+                                                       x-www-browser http://crunchbanglinux.org/wiki/conky
+                                               </execute>
+                                       </action>
+                               </item>
+                       </menu>
+                       <menu id="dmenuconfig" label="dmenu Config">
+                               <item label="Edit start-up script">
+                                       <action name="Execute">
+                                               <execute>
+                                                       gedit ~/.config/dmenu/dmenu-bind.sh
+                                               </execute>
+                                       </action>
+                               </item>
+                               <separator label="Help?"/>
+                               <item label="man page">
+                                       <action name="Execute">
+                                               <execute>
+                                                       terminator --command=&quot;man dmenu&quot;
+                                               </execute>
+                                       </action>
+                               </item>
+                       </menu>
+                       <menu id="gmrunconfig" label="gmrun Config">
+                               <item label="Edit config file">
+                                       <action name="Execute">
+                                               <execute>
+                                                       gedit ~/.gmrunrc
+                                               </execute>
+                                       </action>
+                               </item>
+                               <separator label="Help?"/>
+                               <item label="man page">
+                                       <action name="Execute">
+                                               <execute>
+                                                       terminator --command=&quot;man gmrun&quot;
+                                               </execute>
+                                       </action>
+                               </item>
+                       </menu>
+                       <menu id="obConfig" label="Openbox Config">
+                               <item label="Edit menu.xml">
+                                       <action name="Execute">
+                                               <execute>
+                                                       gedit ~/.config/openbox/menu.xml
+                                               </execute>
+                                       </action>
+                               </item>
+                               <item label="Edit rc.xml">
+                                       <action name="Execute">
+                                               <execute>
+                                                       gedit ~/.config/openbox/rc.xml
+                                               </execute>
+                                       </action>
+                               </item>
+                               <item label="Edit autostart.sh">
+                                       <action name="Execute">
+                                               <execute>
+                                                       gedit ~/.config/openbox/autostart.sh
+                                               </execute>
+                                       </action>
+                               </item>
+                               <item label="GUI Menu Editor">
+                                       <action name="Execute">
+                                               <execute>
+                                                       obmenu
+                                               </execute>
+                                       </action>
+                               </item>
+                               <item label="GUI Config Tool">
+                                       <action name="Execute">
+                                               <execute>
+                                                       obconf
+                                               </execute>
+                                       </action>
+                               </item>
+                               <item label="Reconfigure">
+                                       <action name="Reconfigure"/>
+                               </item>
+                               <item label="Restart">
+                                       <action name="Restart"/>
+                               </item>
+                       </menu>
+                       <menu id="tint2config" label="tint2 Panel Config">
+                               <item label="Edit config file">
+                                       <action name="Execute">
+                                               <execute>
+                                                       gedit ~/.config/tint2/tint2rc
+                                               </execute>
+                                       </action>
+                               </item>
+                               <item label="GUI Config Tool">
+                                       <action name="Execute">
+                                               <execute>
+                                                       tint2conf
+                                               </execute>
+                                       </action>
+                               </item>
+                               <separator label="Help?"/>
+                               <item label="man page">
+                                       <action name="Execute">
+                                               <execute>
+                                                       terminator --command=&quot;man tint2&quot;
+                                               </execute>
+                                       </action>
+                               </item>
+                               <item label="Online Help">
+                                       <action name="Execute">
+                                               <execute>
+                                                       x-www-browser http://code.google.com/p/tint2/wiki/Welcome
+                                               </execute>
+                                       </action>
+                               </item>
+                       </menu>
+                       <menu id="DisplaySettings" label="Display Settings">
+                               <item label="Adjust with grandr">
+                                       <action name="Execute">
+                                               <execute>
+                                                   grandr
+                                               </execute>
+                                       </action>
+                               </item>
+                               <separator label="Help?"/>
+                               <item label="man xrandr">
+                                       <action name="Execute">
+                                               <execute>
+                                                   terminator --command=&quot;man xrandr&quot;
+                                               </execute>
+                                       </action>
+                               </item>
+                       </menu>
+                       <menu id="NotificationsSettings" label="Notifications">
+                               <item label="Edit config file">
+                                       <action name="Execute">
+                                               <execute>
+                                                       gvim ~/.notify-osd
+                                               </execute>
+                                       </action>
+                               </item>
+                               <item label="Send test notification">
+                                       <action name="Execute">
+                                               <execute>
+                                                   cb-fortune
+                                               </execute>
+                                       </action>
+                               </item>
+                       </menu>
+                       <item label="Applications préférées">
+                               <action name="Execute">
+                                       <execute>
+                                               x-terminal-emulator --command=&quot;sudo update-alternatives --all&quot;
+                                       </execute>
+                               </action>
+                       </item>
+                       <item label="Power Management">
+                               <action name="Execute">
+                                       <execute>
+                                               xfce4-power-manager-settings
+                                       </execute>
+                               </action>
+                       </item>
+                       <item label="Screensaver">
+                               <action name="Execute">
+                                       <execute>
+                                               xscreensaver-demo
+                                       </execute>
+                               </action>
+                       </item>
+                       <item label="Choose Wallpaper">
+                               <action name="Execute">
+                                       <execute>
+                                               nitrogen
+                                       </execute>
+                               </action>
+                       </item>
+               </menu>
+               <separator/>
+               <item label="Verrouiller l'écran">
+                       <action name="Execute">
+                               <execute>
+                                       gnome-screensaver-command --lock
+                               </execute>
+                       </action>
+               </item>
+               <item label="Déconnexion">
+                       <action name="Execute">
+                               <execute>
+                                       openbox --exit
+                               </execute>
+                       </action>
+               </item>
+               <item label="Éteindre">
+                       <action name="Execute">
+                               <execute>
+                                       dbus-send --system --print-reply  --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager  org.freedesktop.ConsoleKit.Manager.Stop
+                               </execute>
+                       </action>
+               </item>
+               <item label="Redémarrer">
+                       <action name="Execute">
+                               <execute>
+                                       dbus-send --system --print-reply  --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager  org.freedesktop.ConsoleKit.Manager.Restart
+                               </execute>
+                       </action>
+               </item>
+       </menu>
+</openbox_menu>
diff --git a/pipemenus/dash_places_menu.sh b/pipemenus/dash_places_menu.sh
new file mode 100755 (executable)
index 0000000..c23d37e
--- /dev/null
@@ -0,0 +1,156 @@
+#!/bin/sh
+#    dash_places_menu.sh - a shell (hopefully dash!) places openbox pipe menu
+#    Copyright (C) 2010  John Crawley
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+
+# Usage: add
+# <menu id="places" label="Places" execute="/path/to/dash_places_menu.sh ~" />
+# to your .config/openbox/menu.xml
+
+# or, if you want the "recent files" menu incorporated at the top, use:
+# <menu id="places" label="Places" execute="/path/to/dash_places_menu.sh --recent ~" />
+# make sure you have recently_opened_menu.sh somewhere, and enter its path below.
+
+# path to your "recent files" script, if you want to incorporate it:
+recent_script="$HOME"/scripts/recently_opened_menu.sh
+
+# Command to open folders at "Browse here..." - any file manager
+open_folder_cmd=thunar
+# Default command to open files with - others might be xdg-open, gnome-open, pcmanfm...
+default_open_cmd=exo-open  # exo-open comes with thunar
+# Text editor of choice
+text_editor=gvim
+
+# function to open files with default open command, or alternative command for certain files
+# - add other conditions to choice
+open_file() {
+       [ -x "$1" ] && exec "$text_editor" "$1"     # comment out this line if you don't want to edit executables instead of executing
+       #[ -x "$1" ] && exec "terminator -e" "$1"     # uncomment this and comment out previous line to run executables in terminal instead of editing
+       [ "${1##*.}" = desktop ] && exec "$text_editor" "$1"     # comment out this line if you don't want to edit .desktop files instead of executing
+       exec "$default_open_cmd" "$1"     # use default open command if above conditions not satisfied
+}
+
+# extra dotfiles to display in HOME folder (dotfiles are hidden by default)
+# edit the list (space separated, surrounded by single quotes) or comment this line out, to taste:
+shown_dotfiles='.config .local .Xresources .zshrc .fonts.conf .gtkrc-2.0.mine .profile .xsession-errors'
+
+# By default, this script will display directories separately, before files.
+# To change this behaviour, see NOTE1, NOTE2 and NOTE3 below, near end of page.
+
+#######################################################################
+
+case $1 in
+# if "--open" option is sent as $1, open file ($2) instead of generating menu
+--open)
+    open_file "$2"
+    echo "$0 : failed to open $2" >&2
+    exit;;    # in case exec command fails
+# if "--recent" option is sent, incorporate "recent files" menu
+--recent)
+    shift
+    output='<openbox_pipe_menu>
+'
+    if [ -x "$recent_script" ]
+    then
+        output="$output"'<separator label="Recently opened..." />
+<menu execute="'"$recent_script"'" id="recent" label="files" />
+'
+    else
+        echo "$0 : cannot find executable script $recent_script" >&2
+    fi;;
+*)
+    output='<openbox_pipe_menu>
+';;
+esac
+
+path="${1:-$HOME}"  # default starting place is ~, otherwise $1
+path="$( echo "${path}"/ | tr -s '/' )"    # ensure one final slash
+[ -d "$path" ] || { echo "$0 : $path is not a directory" >&2; exit 1; }
+
+case "$path" in    # only escape if string needs it
+*\&*|*\<*|*\>*|*\"*|*\'*) pathe=$(sed "s/\&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g;s/\"/\&quot;/g;s/'/\&apos;/g;") <<XXX
+$path
+XXX
+;;
+*)pathe=$path;;
+esac
+
+case "$pathe" in
+*\&apos\;*) pathe_apos=$(sed 's/\&apos;/\&apos;\&quot;\&apos;\&quot;\&apos;/g;')<<XXX
+$pathe
+XXX
+;;
+*) pathe_apos=$pathe;;
+esac
+
+output="$output"'<separator label="'$pathe'" />
+<item label="Explorer ici...">
+       <action name="Execute">
+               <command>
+                &apos;'"$open_folder_cmd"'&apos; &apos;'"$pathe_apos"'&apos;
+               </command>
+       </action>
+</item>
+<separator />
+'
+
+unset extra_entries directories_menu files_menu
+[ "$path" = "$HOME"/ ] && extra_entries="$shown_dotfiles"
+for i in "$path"* $extra_entries
+do
+    [ -e "$i" ] || continue    # only output code if file exists
+    shortname="${i##*/}"
+       case $shortname in
+       *\&*|*\<*|*\>*|*\"*|*\'*) shortnamee=$(sed "s/\&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g;s/\"/\&quot;/g;s/'/\&apos;/g;") <<XXX
+$shortname
+XXX
+    ;;
+    *) shortnamee=$shortname;;
+    esac
+    case $shortnamee in
+    *\&apos\;*) shortnamee_apos=$(sed 's/\&apos;/\&apos;\&quot;\&apos;\&quot;\&apos;/g;')<<XXX
+$shortnamee
+XXX
+    ;;
+    *) shortnamee_apos=$shortnamee;;
+    esac
+       [ -d "$i" ] && { 
+# NOTE1 If you want directories and files listed together      
+# change next line (directories_menu="$directories_menu"') to read:    files_menu="$files_menu"' (note the one single quote at the end)
+       directories_menu="$directories_menu"'
+<menu id="'"${pathe_apos}${shortnamee_apos}"'" label="'"$shortnamee"'" execute="&apos;'"$0"'&apos; &apos;'"${pathe_apos}${shortnamee_apos}"'&apos;" />'; continue; }
+       files_menu="$files_menu"' 
+<item label="'"$shortnamee"'">
+    <action name="Execute">
+        <command>
+        &apos;'"$0"'&apos; --open &apos;'"${pathe_apos}${shortnamee_apos}"'&apos;
+        </command>
+    </action>
+</item>'
+done
+
+[ -n "$directories_menu" ] && {
+# NOTE2 comment out next 2 lines if you don't want "Directories" label
+output="${output}"'<separator label="Dossiers" />
+'
+output="${output}${directories_menu}"'
+'; }
+[ -n "$files_menu" ] && {
+# NOTE3 comment out next 2 lines if you don't want "Files" label
+output="${output}"'<separator label="Fichiers" />
+'
+output="${output}${files_menu}"'
+'; }
+output="${output}"'</openbox_pipe_menu>
+'
+printf '%s' "$output"
+exit
diff --git a/pipemenus/obpipemenu-places b/pipemenus/obpipemenu-places
new file mode 100755 (executable)
index 0000000..3b73618
--- /dev/null
@@ -0,0 +1,102 @@
+#!/usr/bin/perl
+# Recursively browse filesystem through openbox3 pipe menus
+#### Usage: add
+# <menu id="browse" label="Browse" execute="obpipemenu-places ~" />
+# to your .config/openbox/menu.xml
+#### CAVEAT ####
+# This script was hacked on exclusively in stints between the hours of
+# 4 and 5 in the morning. Quality may have suffered.
+####
+# Script by dircha from ob list on 05/17/04
+# suggested improvements by John Russell on 05/17/04 implemented 
+# a year later by Kacper Wysocki.
+# 05/30/05 - Kacper Wysocki
+# - opens files with 'rox', which launches appropriate file handler
+# - hidden directories now stay hidden
+# - spaces, ampersands in dir- and filenames are escaped
+# - newlines at each entry to make output a little readable
+# 06/04/05 - Kacper Wysocki
+# - use $0 for scriptname
+# - use $ENV{'HOME'} as default path
+# - now follows symlinks
+
+use strict;
+
+# Command to lauch files with
+my $cmd = "thunar";
+
+my $path = $ARGV[0];
+$path = "$ENV{'HOME'}" if $path eq "";
+my @files = split /\n/, `ls -1p '$path'`;
+mk_menu_element($path, @files);
+
+sub mk_menu_element {
+    my ($path, @files) = @_;
+
+    print "<openbox_pipe_menu>\n";
+    
+    # "Browse here..." lauches this dir
+    print "<item label=\"Browse here..\">".
+           "\n\t<action name=\"Execute\">".
+           "\n\t\t<execute>$cmd '$path'</execute>".
+           "\n\t</action>".
+           "\n</item>\n".
+           "<separator />";
+
+    foreach $_ (@files) {
+        my $length = length $_;
+        my $last_c = substr $_, $length - 1, 1;
+
+        if ($last_c eq "/") {
+            print mk_dir_element($path, substr $_, 0, $length - 1);
+        } elsif ($last_c eq "@") {
+            print mk_sym_element($path, substr $_, 0, $length - 1);
+        } else {
+            print mk_file_element($path, $_);
+        }
+    }
+    print "</openbox_pipe_menu>\n";
+}
+
+sub mk_dir_element {
+    my ($path, $name) = @_;
+    # escape ampersand and space in pathnames
+    $path =~ s/&/&amp;/g;
+    $name =~ s/&/&amp;/g;
+    $path =~ s/ /\\ /g;
+    $name =~ s/ /\\ /g;
+
+    return "<menu id=\"$path/$name\" label=\"$name\" execute=\"$0 $path/$name\" />\n";
+}
+
+sub mk_sym_element {
+    my ($path, $name) = @_;
+    # escape ampersand in pathnames
+    $path =~ s/&/&amp;/g;
+    $name =~ s/&/&amp;/g;
+
+    # Follow symlinks instead of opening links in rox.
+    return "<menu id=\"$path/$name\" label=\"$name\" execute=\"$0 $path/$name\" />\n";
+=cut
+    return "<item label=\"$name\">".
+           "\n\t<action name=\"Execute\">".
+           "\n\t\t<execute>$cmd '$path/$name'</execute>".
+           "\n\t</action>"
+           . "\n</item>\n";
+=cut
+}
+
+sub mk_file_element {
+    my ($path, $name) = @_;
+    my $label = $name;
+    # escape ampersand in pathnames
+    $path =~ s/&/&amp;/g;
+    $name =~ s/&/&amp;/g;
+
+    return "<item label=\"$name\">".
+           "\n\t<action name=\"Execute\">".
+           "\n\t\t<execute>$cmd '$path/$name'</execute>".
+           "\n\t</action>"
+           . "\n</item>\n";
+}
+
diff --git a/pipemenus/recently_opened_menu.sh b/pipemenus/recently_opened_menu.sh
new file mode 100755 (executable)
index 0000000..c58d651
--- /dev/null
@@ -0,0 +1,82 @@
+#!/bin/sh
+#    recently_opened_menu.sh - a script to parse .recently-used.xbel
+#    and generate openbox pipe menu
+#    Copyright (C) 2010  John Crawley
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+
+# Usage: add
+# <menu id="recent" label="Recent Files" execute="/path/to/recently_opened_menu.sh" />
+# to your .config/openbox/menu.xml, or use with dash_places_menu.sh (see comments there)
+
+maximum_entries=15 # max. number of entries in menu
+
+#######################################################################
+
+# if argument is --clear, empty .recently-used.xbel
+[ "$1" = '--clear' ] && {
+cat <<':EOF' > "${HOME}"/.recently-used.xbel
+<?xml version="1.0" encoding="UTF-8"?>
+<xbel version="1.0"
+      xmlns:bookmark="http://www.freedesktop.org/standards/desktop-bookmarks"
+      xmlns:mime="http://www.freedesktop.org/standards/shared-mime-info"
+>
+</xbel>
+:EOF
+exit
+}
+
+maximum_entries=$((maximum_entries+2))
+
+pre='    <item label="'
+mid='">
+    <action name="Execute"><command>'
+post='</command></action>
+    </item>'
+    
+files=$( tac "${HOME}"/.recently-used.xbel |  awk -v MAX="$maximum_entries" -v PR="$pre" -v MI="$mid" -v PO="$post" 'BEGIN {
+    RS="</bookmark>";
+    FS="<info>";
+}
+(NR == MAX) {exit}
+!/<bookmark/ {next}
+# $1 is the command, $2 the file path
+{
+    sub(/^.*exec=\"\&apos\;/,"",$1)
+    sub(/\&apos\;.*$/,"",$1)
+    sub(/ *%./,"",$1)
+    sub(/^.*file:\/\//,"",$2)
+    sub(/\".*$/,"",$2)
+    gsub(/%22/,"\&quot;",$2)
+    gsub(/%3C/,"\&lt;",$2)
+    gsub(/%3E/,"\&gt;",$2)
+    name=$2
+    sub(/^.*\//,"",name)
+    gsub(/\&apos;/,"\&apos;\&quot;\&apos;\&quot;\&apos;",$2)
+    print (PR name MI $1 " '"'"'" $2 "'"'"'" PO)
+}' )  
+
+# use perl to decode urlencoded characters
+files=$(perl -MURI::Escape -e 'print uri_unescape($ARGV[0]);' "$files")
+
+output='<openbox_pipe_menu>
+'"$files"'
+<separator />
+    <item label="Clear Recent Files">
+        <action name="Execute">
+            <command>
+            &apos;'"$0"'&apos; --clear
+            </command>
+        </action>
+    </item>
+</openbox_pipe_menu>
+'
+printf '%s' "$output"  # printf because echo sometimes eats backslashes
diff --git a/rc.xml b/rc.xml
new file mode 100644 (file)
index 0000000..1eb4a22
--- /dev/null
+++ b/rc.xml
@@ -0,0 +1,821 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openbox_config xmlns="http://openbox.org/3.4/rc">
+  <resistance>
+    <strength>10</strength>
+    <screen_edge_strength>20</screen_edge_strength>
+  </resistance>
+  <focus>
+    <focusNew>yes</focusNew>
+    <!-- always try to focus new windows when they appear. other rules do
+       apply -->
+    <followMouse>no</followMouse>
+    <!-- move focus to a window when you move the mouse into it -->
+    <focusLast>yes</focusLast>
+    <!-- focus the last used window when changing desktops, instead of the one
+       under the mouse pointer. when followMouse is enabled -->
+    <underMouse>no</underMouse>
+    <!-- move focus under the mouse, even when the mouse is not moving -->
+    <focusDelay>200</focusDelay>
+    <!-- when followMouse is enabled, the mouse must be inside the window for
+       this many milliseconds (1000 = 1 sec) before moving focus to it -->
+    <raiseOnFocus>no</raiseOnFocus>
+    <!-- when followMouse is enabled, and a window is given focus by moving the
+       mouse into it, also raise the window -->
+  </focus>
+  <placement>
+    <policy>Smart</policy>
+    <!-- 'Smart' or 'UnderMouse' -->
+    <center>yes</center>
+    <!-- whether to place windows in the center of the free area found or
+       the top left corner -->
+    <monitor>Any</monitor>
+  </placement>
+  <theme>
+    <name>Shiki-Statler</name>
+    <titleLayout>DSLIMC</titleLayout>
+    <!--
+      avaible characters are NDSLIMC, each can occur at most once.
+      N: window icon
+      L: window label (AKA title).
+      I: iconify
+      M: maximize
+      C: close
+      S: shade (roll up/down)
+      D: omnipresent (on all desktops).
+  -->
+    <keepBorder>yes</keepBorder>
+    <animateIconify>yes</animateIconify>
+    <font place="ActiveWindow">
+      <name>Sans</name>
+      <size>8</size>
+      <!-- font size in points -->
+      <weight>Bold</weight>
+      <!-- 'bold' or 'normal' -->
+      <slant>Normal</slant>
+      <!-- 'italic' or 'normal' -->
+    </font>
+    <font place="InactiveWindow">
+      <name>Sans</name>
+      <size>8</size>
+      <!-- font size in points -->
+      <weight>Normal</weight>
+      <!-- 'bold' or 'normal' -->
+      <slant>Normal</slant>
+      <!-- 'italic' or 'normal' -->
+    </font>
+    <font place="MenuHeader">
+      <name>Sans</name>
+      <size>8</size>
+      <!-- font size in points -->
+      <weight>Normal</weight>
+      <!-- 'bold' or 'normal' -->
+      <slant>Normal</slant>
+      <!-- 'italic' or 'normal' -->
+    </font>
+    <font place="MenuItem">
+      <name>Sans</name>
+      <size>8</size>
+      <!-- font size in points -->
+      <weight>Normal</weight>
+      <!-- 'bold' or 'normal' -->
+      <slant>Normal</slant>
+      <!-- 'italic' or 'normal' -->
+    </font>
+    <font place="OnScreenDisplay">
+      <name>Sans</name>
+      <size>8</size>
+      <!-- font size in points -->
+      <weight>Normal</weight>
+      <!-- 'bold' or 'normal' -->
+      <slant>Normal</slant>
+      <!-- 'italic' or 'normal' -->
+    </font>
+  </theme>
+  <desktops>
+    <!-- this stuff is only used at startup, pagers allow you to change them
+       during a session
+
+       these are default values to use when other ones are not already set
+       by other applications, or saved in your session
+
+       use obconf if you want to change these without having to log out
+       and back in -->
+    <number>2</number>
+    <firstdesk>1</firstdesk>
+    <names>
+      <name>1</name>
+      <name>2</name>
+      <name>3</name>
+      <name>4</name>
+    </names>
+    <popupTime>875</popupTime>
+    <!-- The number of milliseconds to show the popup for when switching
+       desktops.  Set this to 0 to disable the popup. -->
+  </desktops>
+  <resize>
+    <drawContents>yes</drawContents>
+    <popupShow>Nonpixel</popupShow>
+    <!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
+    <popupPosition>Center</popupPosition>
+    <!-- 'Center' or 'Top' -->
+    <popupFixedPosition>
+      <x>0</x>
+      <y>0</y>
+    </popupFixedPosition>
+  </resize>
+  <!-- You can reserve a portion of your screen where windows will not cover when
+     they are maximized, or when they are initially placed.
+     Many programs reserve space automatically, but you can use this in other
+     cases. -->
+  <margins>
+    <top>0</top>
+    <bottom>0</bottom>
+    <left>0</left>
+    <right>0</right>
+  </margins>
+  <dock>
+    <position>TopLeft</position>
+    <!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating -->
+    <floatingX>0</floatingX>
+    <floatingY>0</floatingY>
+    <noStrut>no</noStrut>
+    <stacking>Above</stacking>
+    <!-- 'Above', 'Normal', or 'Below' -->
+    <direction>Vertical</direction>
+    <!-- 'Vertical' or 'Horizontal' -->
+    <autoHide>no</autoHide>
+    <hideDelay>300</hideDelay>
+    <!-- in milliseconds (1000 = 1 second) -->
+    <showDelay>300</showDelay>
+    <!-- in milliseconds (1000 = 1 second) -->
+    <moveButton>Middle</moveButton>
+    <!-- 'Left', 'Middle', 'Right' -->
+  </dock>
+  <keyboard>
+    <chainQuitKey>C-g</chainQuitKey>
+    <!-- Keybindings for desktop switching -->
+    <keybind key="C-A-Left">
+      <action name="DesktopLeft">
+        <dialog>no</dialog>
+        <wrap>no</wrap>
+      </action>
+    </keybind>
+    <keybind key="C-A-Right">
+      <action name="DesktopRight">
+        <dialog>no</dialog>
+        <wrap>no</wrap>
+      </action>
+    </keybind>
+    <keybind key="C-A-Up">
+      <action name="DesktopUp">
+        <dialog>no</dialog>
+        <wrap>no</wrap>
+      </action>
+    </keybind>
+    <keybind key="C-A-Down">
+      <action name="DesktopDown">
+        <dialog>no</dialog>
+        <wrap>no</wrap>
+      </action>
+    </keybind>
+    <keybind key="S-A-Left">
+      <action name="SendToDesktopLeft">
+        <dialog>no</dialog>
+        <wrap>no</wrap>
+      </action>
+    </keybind>
+    <keybind key="S-A-Right">
+      <action name="SendToDesktopRight">
+        <dialog>no</dialog>
+        <wrap>no</wrap>
+      </action>
+    </keybind>
+    <keybind key="S-A-Up">
+      <action name="SendToDesktopUp">
+        <dialog>no</dialog>
+        <wrap>no</wrap>
+      </action>
+    </keybind>
+    <keybind key="S-A-Down">
+      <action name="SendToDesktopDown">
+        <dialog>no</dialog>
+        <wrap>no</wrap>
+      </action>
+    </keybind>
+    <keybind key="W-F1">
+      <action name="Desktop">
+        <desktop>1</desktop>
+      </action>
+    </keybind>
+    <keybind key="W-F2">
+      <action name="Desktop">
+        <desktop>2</desktop>
+      </action>
+    </keybind>
+    <keybind key="W-F3">
+      <action name="Desktop">
+        <desktop>3</desktop>
+      </action>
+    </keybind>
+    <keybind key="W-F4">
+      <action name="Desktop">
+        <desktop>4</desktop>
+      </action>
+    </keybind>
+    <keybind key="W-d">
+      <action name="ToggleShowDesktop"/>
+    </keybind>
+    <!-- Keybindings for windows -->
+    <keybind key="A-F4">
+      <action name="Close"/>
+    </keybind>
+    <keybind key="A-Escape">
+      <action name="Lower"/>
+      <action name="FocusToBottom"/>
+      <action name="Unfocus"/>
+    </keybind>
+    <keybind key="A-space">
+      <action name="ShowMenu">
+        <menu>client-menu</menu>
+      </action>
+    </keybind>
+    <keybind key="Print">
+      <action name="Execute">
+        <execute>scrot '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/Images/ &amp; eog ~/Images/$f'</execute>
+      </action>
+    </keybind>
+    <keybind key="A-Print">
+      <action name="Execute">
+        <execute>scrot -d 10 '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/Images/ &amp; eog ~/Images/$f'</execute>
+      </action>
+    </keybind>
+    <!-- Keybindings for window switching -->
+    <keybind key="A-Tab">
+      <action name="NextWindow"/>
+    </keybind>
+    <keybind key="A-S-Tab">
+      <action name="PreviousWindow"/>
+    </keybind>
+    <keybind key="C-A-Tab">
+      <action name="NextWindow">
+          <allDesktops>yes</allDesktops>
+      </action>
+    </keybind>
+    <keybind key="C-A-S-Tab">
+      <action name="PreviousWindow">
+          <allDesktops>yes</allDesktops>
+      </action>
+    </keybind>
+    <!-- Keybindings for running applications -->
+    <keybind key="A-F2">
+      <action name="Execute">
+        <startupnotify>
+          <enabled>true</enabled>
+          <name>Run Program</name>
+        </startupnotify>
+        <command>gmrun</command>
+      </action>
+    </keybind>
+    <keybind key="A-F3">
+      <action name="Execute">
+        <startupnotify>
+          <enabled>true</enabled>
+          <name>dmenu-bind</name>
+        </startupnotify>
+        <command>~/.config/dmenu/dmenu-bind.sh</command>
+      </action>
+    </keybind>
+    <keybind key="W-f">
+      <action name="Execute">
+        <startupnotify>
+          <enabled>true</enabled>
+          <name>thunar</name>
+        </startupnotify>
+        <command>thunar</command>
+      </action>
+    </keybind>
+    <keybind key="W-t">
+      <action name="Execute">
+        <startupnotify>
+          <enabled>true</enabled>
+          <name>Terminal</name>
+        </startupnotify>
+        <command>x-terminal-emulator</command>
+      </action>
+    </keybind>
+    <keybind key="W-w">
+      <action name="Execute">
+        <startupnotify>
+          <enabled>true</enabled>
+          <name>Web Browser</name>
+        </startupnotify>
+        <command>x-www-browser</command>
+      </action>
+    </keybind>
+    <keybind key="W-l">
+      <action name="Execute">
+        <startupnotify>
+          <enabled>true</enabled>
+          <name>Lock screen</name>
+        </startupnotify>
+        <command>cb-lock</command>
+      </action>
+    </keybind>
+    <keybind key="W-e">
+      <action name="Execute">
+        <startupnotify>
+          <enabled>true</enabled>
+          <name>Editor</name>
+        </startupnotify>
+        <command>gvim</command>
+      </action>
+    </keybind>
+    <keybind key="W-m">
+      <action name="Execute">
+        <startupnotify>
+          <enabled>true</enabled>
+          <name>Mediaplayer</name>
+        </startupnotify>
+        <command>vlc</command>
+      </action>
+    </keybind>
+    <keybind key="W-v">
+      <action name="Execute">
+        <startupnotify>
+          <enabled>true</enabled>
+          <name>Volume</name>
+        </startupnotify>
+        <command>gnome-volume-control</command>
+      </action>
+    </keybind>
+    <keybind key="W-x">
+      <action name="Execute">
+        <startupnotify>
+          <enabled>true</enabled>
+          <name>Logout</name>
+        </startupnotify>
+        <command>openbox-logout</command>
+      </action>
+    </keybind>
+    <keybind key="W-Tab">
+      <action name="ShowMenu">
+        <menu>client-list-combined-menu</menu>
+      </action>
+    </keybind>
+    <keybind key="W-space">
+      <action name="ShowMenu">
+        <menu>root-menu</menu>
+      </action>
+    </keybind>
+    <keybind key="A-C-q">
+      <action name="ShowMenu">
+        <menu>root-menu</menu>
+      </action>
+    </keybind>
+    <keybind key="XF86AudioRaiseVolume">
+      <action name="Execute">
+        <command>amixer set Master 5%+ unmute</command>
+      </action>
+    </keybind>
+    <keybind key="XF86AudioLowerVolume">
+      <action name="Execute">
+        <command>amixer set Master 5%- unmute</command>
+      </action>
+    </keybind>
+    <keybind key="XF86AudioMute">
+      <action name="Execute">
+        <command>amixer set Master toggle</command>
+      </action>
+    </keybind>
+  </keyboard>
+  <mouse>
+    <dragThreshold>8</dragThreshold>
+    <!-- number of pixels the mouse must move before a drag begins -->
+    <doubleClickTime>200</doubleClickTime>
+    <!-- in milliseconds (1000 = 1 second) -->
+    <screenEdgeWarpTime>400</screenEdgeWarpTime>
+    <!-- Time before changing desktops when the pointer touches the edge of the
+       screen while moving a window, in milliseconds (1000 = 1 second).
+       Set this to 0 to disable warping -->
+    <context name="Frame">
+      <mousebind button="A-Left" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+      </mousebind>
+      <mousebind button="A-Left" action="Click">
+        <action name="Unshade"/>
+      </mousebind>
+      <mousebind button="A-Left" action="Drag">
+        <action name="Move"/>
+      </mousebind>
+      <mousebind button="A-Right" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+        <action name="Unshade"/>
+      </mousebind>
+      <mousebind button="A-Right" action="Drag">
+        <action name="Resize"/>
+      </mousebind>
+      <mousebind button="A-Middle" action="Press">
+        <action name="Lower"/>
+        <action name="FocusToBottom"/>
+        <action name="Unfocus"/>
+      </mousebind>
+      <mousebind button="A-Up" action="Click">
+        <action name="DesktopPrevious"/>
+      </mousebind>
+      <mousebind button="A-Down" action="Click">
+        <action name="DesktopNext"/>
+      </mousebind>
+      <mousebind button="C-A-Up" action="Click">
+        <action name="DesktopPrevious"/>
+      </mousebind>
+      <mousebind button="C-A-Down" action="Click">
+        <action name="DesktopNext"/>
+      </mousebind>
+      <mousebind button="A-S-Up" action="Click">
+        <action name="SendToDesktopPrevious"/>
+      </mousebind>
+      <mousebind button="A-S-Down" action="Click">
+        <action name="SendToDesktopNext"/>
+      </mousebind>
+    </context>
+    <context name="Titlebar">
+      <mousebind button="Left" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+      </mousebind>
+      <mousebind button="Left" action="Drag">
+        <action name="Move"/>
+      </mousebind>
+      <mousebind button="Left" action="DoubleClick">
+        <action name="ToggleMaximizeFull"/>
+      </mousebind>
+      <mousebind button="Middle" action="Press">
+        <action name="Lower"/>
+        <action name="FocusToBottom"/>
+        <action name="Unfocus"/>
+      </mousebind>
+      <mousebind button="Up" action="Click">
+        <action name="Shade"/>
+        <action name="FocusToBottom"/>
+        <action name="Unfocus"/>
+        <action name="Lower"/>
+      </mousebind>
+      <mousebind button="Down" action="Click">
+        <action name="Unshade"/>
+        <action name="Raise"/>
+      </mousebind>
+      <mousebind button="Right" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+        <action name="ShowMenu">
+          <menu>client-menu</menu>
+        </action>
+      </mousebind>
+    </context>
+    <context name="Top">
+      <mousebind button="Left" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+        <action name="Unshade"/>
+      </mousebind>
+      <mousebind button="Left" action="Drag">
+        <action name="Resize">
+          <edge>top</edge>
+        </action>
+      </mousebind>
+    </context>
+    <context name="Left">
+      <mousebind button="Left" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+      </mousebind>
+      <mousebind button="Left" action="Drag">
+        <action name="Resize">
+          <edge>left</edge>
+        </action>
+      </mousebind>
+    </context>
+    <context name="Right">
+      <mousebind button="Left" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+      </mousebind>
+      <mousebind button="Left" action="Drag">
+        <action name="Resize">
+          <edge>right</edge>
+        </action>
+      </mousebind>
+    </context>
+    <context name="Bottom">
+      <mousebind button="Left" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+      </mousebind>
+      <mousebind button="Left" action="Drag">
+        <action name="Resize">
+          <edge>bottom</edge>
+        </action>
+      </mousebind>
+      <mousebind button="Middle" action="Press">
+        <action name="Lower"/>
+        <action name="FocusToBottom"/>
+        <action name="Unfocus"/>
+      </mousebind>
+      <mousebind button="Right" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+        <action name="ShowMenu">
+          <menu>client-menu</menu>
+        </action>
+      </mousebind>
+    </context>
+    <context name="BLCorner">
+      <mousebind button="Left" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+      </mousebind>
+      <mousebind button="Left" action="Drag">
+        <action name="Resize"/>
+      </mousebind>
+    </context>
+    <context name="BRCorner">
+      <mousebind button="Left" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+      </mousebind>
+      <mousebind button="Left" action="Drag">
+        <action name="Resize"/>
+      </mousebind>
+    </context>
+    <context name="TLCorner">
+      <mousebind button="Left" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+        <action name="Unshade"/>
+      </mousebind>
+      <mousebind button="Left" action="Drag">
+        <action name="Resize"/>
+      </mousebind>
+    </context>
+    <context name="TRCorner">
+      <mousebind button="Left" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+        <action name="Unshade"/>
+      </mousebind>
+      <mousebind button="Left" action="Drag">
+        <action name="Resize"/>
+      </mousebind>
+    </context>
+    <context name="Client">
+      <mousebind button="Left" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+      </mousebind>
+      <mousebind button="Middle" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+      </mousebind>
+      <mousebind button="Right" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+      </mousebind>
+    </context>
+    <context name="Icon">
+      <mousebind button="Left" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+        <action name="Unshade"/>
+        <action name="ShowMenu">
+          <menu>client-menu</menu>
+        </action>
+      </mousebind>
+      <mousebind button="Right" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+        <action name="ShowMenu">
+          <menu>client-menu</menu>
+        </action>
+      </mousebind>
+    </context>
+    <context name="AllDesktops">
+      <mousebind button="Left" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+        <action name="Unshade"/>
+      </mousebind>
+      <mousebind button="Left" action="Click">
+        <action name="ToggleOmnipresent"/>
+      </mousebind>
+    </context>
+    <context name="Shade">
+      <mousebind button="Left" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+      </mousebind>
+      <mousebind button="Left" action="Click">
+        <action name="ToggleShade"/>
+      </mousebind>
+    </context>
+    <context name="Iconify">
+      <mousebind button="Left" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+      </mousebind>
+      <mousebind button="Left" action="Click">
+        <action name="Iconify"/>
+      </mousebind>
+    </context>
+    <context name="Maximize">
+      <mousebind button="Left" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+        <action name="Unshade"/>
+      </mousebind>
+      <mousebind button="Middle" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+        <action name="Unshade"/>
+      </mousebind>
+      <mousebind button="Right" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+        <action name="Unshade"/>
+      </mousebind>
+      <mousebind button="Left" action="Click">
+        <action name="ToggleMaximizeFull"/>
+      </mousebind>
+      <mousebind button="Middle" action="Click">
+        <action name="ToggleMaximizeVert"/>
+      </mousebind>
+      <mousebind button="Right" action="Click">
+        <action name="ToggleMaximizeHorz"/>
+      </mousebind>
+    </context>
+    <context name="Close">
+      <mousebind button="Left" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+        <action name="Unshade"/>
+      </mousebind>
+      <mousebind button="Left" action="Click">
+        <action name="Close"/>
+      </mousebind>
+    </context>
+    <context name="Desktop">
+      <mousebind button="Up" action="Click">
+        <action name="DesktopPrevious"/>
+      </mousebind>
+      <mousebind button="Down" action="Click">
+        <action name="DesktopNext"/>
+      </mousebind>
+      <mousebind button="A-Up" action="Click">
+        <action name="DesktopPrevious"/>
+      </mousebind>
+      <mousebind button="A-Down" action="Click">
+        <action name="DesktopNext"/>
+      </mousebind>
+      <mousebind button="C-A-Up" action="Click">
+        <action name="DesktopPrevious"/>
+      </mousebind>
+      <mousebind button="C-A-Down" action="Click">
+        <action name="DesktopNext"/>
+      </mousebind>
+      <mousebind button="Left" action="Press">
+        <action name="Focus"/>
+        <action name="Raise"/>
+      </mousebind>
+    </context>
+    <context name="Root">
+      <!-- Menus -->
+      <mousebind button="Middle" action="Press">
+        <action name="ShowMenu">
+          <menu>client-list-combined-menu</menu>
+        </action>
+      </mousebind>
+      <mousebind button="Right" action="Press">
+        <action name="ShowMenu">
+          <menu>root-menu</menu>
+        </action>
+      </mousebind>
+    </context>
+    <context name="MoveResize">
+      <mousebind button="Up" action="Click">
+        <action name="DesktopPrevious"/>
+      </mousebind>
+      <mousebind button="Down" action="Click">
+        <action name="DesktopNext"/>
+      </mousebind>
+      <mousebind button="A-Up" action="Click">
+        <action name="DesktopPrevious"/>
+      </mousebind>
+      <mousebind button="A-Down" action="Click">
+        <action name="DesktopNext"/>
+      </mousebind>
+    </context>
+  </mouse>
+  <menu>
+    <!-- You can specify more than one menu file in here and they are all loaded,
+       just don't make menu ids clash or, well, it'll be kind of pointless -->
+    <!-- default menu file (or custom one in $HOME/.config/openbox/) -->
+    <!-- system menu files on Debian systems -->
+    <file>/var/lib/openbox/debian-menu.xml</file>
+    <file>debian-menu.xml</file>
+    <file>menu.xml</file>
+    <hideDelay>200</hideDelay>
+    <middle>no</middle>
+    <submenuShowDelay>100</submenuShowDelay>
+    <applicationIcons>yes</applicationIcons>
+  </menu>
+  <applications>
+    <!--
+  # this is an example with comments through out. use these to make your
+  # own rules, but without the comments of course.
+
+  <application name="first element of window's WM_CLASS property (see xprop)"
+              class="second element of window's WM_CLASS property (see xprop)"
+               role="the window's WM_WINDOW_ROLE property (see xprop)">
+  # the name or the class can be set, or both. this is used to match
+  # windows when they appear. role can optionally be set as well, to
+  # further restrict your matches.
+
+  # the name, class, and role use simple wildcard matching such as those
+  # used by a shell. you can use * to match any characters and ? to match
+  # any single character.
+
+  # when multiple rules match a window, they will all be applied, in the
+  # order that they appear in this list
+
+
+    # each element can be left out or set to 'default' to specify to not 
+    # change that attribute of the window
+
+    <decor>yes</decor>
+    # enable or disable window decorations
+
+    <shade>no</shade>
+    # make the window shaded when it appears, or not
+
+    <position>
+      # the position is only used if both an x and y coordinate are provided
+      # (and not set to 'default')
+      <x>center</x>
+      # a number like 50, or 'center' to center on screen. use a negative number
+      # to start from the right (or bottom for <y>), ie -50 is 50 pixels from the
+      # right edge (or bottom).
+      <y>200</y>
+      <monitor>1</monitor>
+      # specifies the monitor in a xinerama setup.
+      # 1 is the first head, or 'mouse' for wherever the mouse is
+    </position>
+
+    <focus>yes</focus>
+    # if the window should try be given focus when it appears. if this is set
+    # to yes it doesn't guarantee the window will be given focus. some
+    # restrictions may apply, but Openbox will try to
+
+    <desktop>1</desktop>
+    # 1 is the first desktop, 'all' for all desktops
+
+    <layer>normal</layer>
+    # 'above', 'normal', or 'below'
+
+    <iconic>no</iconic>
+    # make the window iconified when it appears, or not
+
+    <skip_pager>no</skip_pager>
+    # asks to not be shown in pagers
+
+    <skip_taskbar>no</skip_taskbar>
+    # asks to not be shown in taskbars. window cycling actions will also
+    # skip past such windows
+
+    <fullscreen>yes</fullscreen>
+    # make the window in fullscreen mode when it appears
+
+    <maximized>true</maximized>
+    # 'Horizontal', 'Vertical' or boolean (yes/no)
+  </application>
+
+  # end of the example
+-->
+    <application name="gmessage">
+      <decor>no</decor>
+      <shade>no</shade>
+      <skip_pager>yes</skip_pager>
+      <skip_taskbar>yes</skip_taskbar>
+      <fullscreen>no</fullscreen>
+      <maximized>no</maximized>
+    </application>
+    <application name="openbox-logout">
+      <decor>no</decor>
+      <shade>no</shade>
+      <skip_pager>yes</skip_pager>
+      <fullscreen>no</fullscreen>
+      <maximized>no</maximized>
+      <layer>above</layer>
+    </application>
+  </applications>
+</openbox_config>