# Configuration Variables #
MODKEY=Mod4
UP=k
DOWN=j
LEFT=h
RIGHT=l

# Bars #
noticetimeout=5
noticebar=/rbar/!notice

# Colors # "<text> <background> <border>"
# export WMII_NORMCOLORS="#969696 #121212 #313131"
# export WMII_NORMCOLORS="#657b83 #121212 #073642"
# export WMII_NORMCOLORS="#bababa #101010 #595959"
# export WMII_NORMCOLORS="#bababa #00080a #595959"
# export WMII_NORMCOLORS="#c0c0c0 #0c0c0c #216f8a"
# export WMII_NORMCOLORS="#555555 #151515 #333333"
export WMII_NORMCOLORS="#d2d2d2 #151515 #333333"
# export WMII_FOCUSCOLORS="#b4b4b4 #1e1e1e #424242"
# export WMII_FOCUSCOLORS="#93a1a1 #121212 #585858"
# export WMII_FOCUSCOLORS="#f7f7f7 #101010 #818181"
# export WMII_FOCUSCOLORS="#767676 #00080a #595959"
# export WMII_FOCUSCOLORS="#ffffff #0c0c0c #800000"
# export WMII_FOCUSCOLORS="#d2d2d2 #151515 #444444"
export WMII_FOCUSCOLORS="#626262 #151515 #121212"

# Background #
# export WMII_BACKGROUND="feh --bg-center $HOME/wallpapers/wallpaper-507655.jpg"
# export WMII_BACKGROUND="feh --bg-center $HOME/wallpapers/Vampy-wall-1.png"
# export WMII_BACKGROUND="feh --bg-tile $HOME/wallpapers/wallpaper-brick.png"
# export WMII_BACKGROUND="feh --bg-scale $HOME/wallpapers/arch-kis-brick.png"
# export WMII_BACKGROUND="feh --bg-scale $HOME/wallpapers/AmiaMiley-wp2.png"
# export WMII_BACKGROUND="feh --bg-scale $HOME/wallpapers/AmiaMiley-wp2.png"
# export WMII_BACKGROUND="feh --bg-scale $HOME/wallpapers/AmiaMiley-wp3.png"
# export WMII_BACKGROUND="feh --bg-center $HOME/wallpapers/Doctors_Eleven_by_Magmakensuke-1920-by-1080-burnt-grey.png"
# export WMII_BACKGROUND="feh --bg-center $HOME/wallpapers/wallpaper-744159.jpg"
# export WMII_BACKGROUND="feh --bg-center $HOME/wallpapers/Red_Android_Sleeper_Cell_with_Andy-Blue-aka-gradiant.png"
export WMII_BACKGROUND="feh --bg-center $HOME/wallpapers/tube-darkgray.png"

# Font #
# WMII_FONT='*-fixed-medium-r-*-*-12-*-*-*-*-*-*-*' 
# export WMII_FONT="xft:Sans-9"
# export WMII_FONT="xft:Tamsyn Bold:pixelsize=13"
# export WMII_FONT="xft:Tamzen Bold:size=12"
# export WMII_FONT="xft:abeatbyKai:pixelsize=13"
# export WMII_FONT="xft:Antipasto:size=11:antialias=true:bold:hinting=true"
# export WMII_FONT="xft:DejaVu Sans:pixelsize=12:antialias=true:bold:hinting=true"
# export WMII_FONT="xft:Roboto Light:size=8:antialias=true:bold:hinting=true"
export WMII_FONT="xft:Comfortaa:pixelsize=14:antialias=true:hinting=true"
# export WMII_FONT="xft:Pigiarniq:pixelsize=14:antialias=true:hinting=true"

# Terminal #
export WMII_TERM="urxvt"

# Menu history #
hist="$(wmiir namespace)/history"
histnum=5000

# Column Rules #
wmiir write /colrules <<!
  /gimp|Gimp.*/ -> 17+83+41
  /xcalc/ -> 275x350+1638+21
  /Music Manager.*/ -> 159x18+1755+22
  /wineserver.*/ -> 159x18+1755+22
  /Wine.*/ -> 159x18+1755+22
  /.*/ -> 62+38 # Golden Ratio
!

# Tagging Rules #
wmiir write /tagrules <<!
    # Apps with system tray icons like to their main windows
    # Give them permission.
    /^Pidgin:/ allow=+activate

    # MPlayer and VLC don't float by default, but should.
    /MPlayer.*|mplayer|VLC/ floating=on

    # ROX puts all of its windows in the same group, so they open
    # with the same tags. Disable grouping for ROX Filer.
    /^ROX-Filer:/ group=0

    /xcalc|nautilus|thunar/ -> ~
    /root/ -> +su
    /irc/ -> +irc
    /Gimp.*|Darktable.*/ -> +art
    /virtualbox.*|Oracle.*|VBE.*/ -> +build
    /code|gedit|leafpad/ -> +code
    /armagetronad/ -> +game
    /Music.Manager.*/ -> ~+music
    /LibreOffice|libreoffice|apvlv|xchm|mcomix/ -> +office
    /Boxee|boxee|huludesktop/ -> ~+video
    /MPlayer.*|mplayer|VLC.*|vlc/ -> ~+code+irc+web+art
    /filezilla|Chromium|Opera|FileZilla|firefox|Firefox|Namoroka|Mozilla|Thunderbird|Muttator|dwb|DWB|vimprobable2|uzbl/ -> +web
    /.*/ -> sel
    /.*/ -> 1
!

# Status Bar Info #
status() {
echo -n $($HOME/.wmii/scripts/wifi-eth0.sh) $($HOME/.wmii/scripts/check_weather.sh) $($HOME/.wmii/scripts/uptime.sh) $(sh $HOME/.wmii/scripts/archupdates.sh) $(date +'%R:%S %m/%d/%Y')
}

local_events() {
#Virtual Desktop Tagging #
            for i in 0 1 2 3 4 5 6 7 8 9; do
                     cat <<!
Key $MODKEY-0
              wmiir xwrite /ctl view "su"
Key $MODKEY-1
              wmiir xwrite /ctl view "irc"
Key $MODKEY-2
              wmiir xwrite /ctl view "code"
Key $MODKEY-3
              wmiir xwrite /ctl view "web"
Key $MODKEY-4
              wmiir xwrite /ctl view "office"
Key $MODKEY-5
              wmiir xwrite /ctl view "art"
Key $MODKEY-6
              wmiir xwrite /ctl view "music"
Key $MODKEY-7
              wmiir xwrite /ctl view "video"
Key $MODKEY-8
              wmiir xwrite /ctl view "game"
Key $MODKEY-9
              wmiir xwrite /ctl view "build"
Key $MODKEY-Shift-0
              wmiir xwrite /client/sel/tags "su"
Key $MODKEY-Shift-1
              wmiir xwrite /client/sel/tags "irc"
Key $MODKEY-Shift-2
              wmiir xwrite /client/sel/tags "code"
Key $MODKEY-Shift-3
              wmiir xwrite /client/sel/tags "web"
Key $MODKEY-Shift-4
              wmiir xwrite /client/sel/tags "office"
Key $MODKEY-Shift-5
              wmiir xwrite /client/sel/tags "art"
Key $MODKEY-Shift-6
              wmiir xwrite /client/sel/tags "music"
Key $MODKEY-Shift-7
              wmiir xwrite /client/sel/tags "video"
Key $MODKEY-Shift-8
              wmiir xwrite /client/sel/tags "game"
Key $MODKEY-Shift-9
              wmiir xwrite /client/sel/tags "build"
!
              done

}

# WM Configuration #
wmiir write /ctl <<!
font $WMII_FONT
focuscolors $WMII_FOCUSCOLORS
normcolors $WMII_NORMCOLORS
grabmod $MODKEY
border 0
bar on top
!
# Set wallpaper #
$WMII_BACKGROUND

# Misc #
# progsfile="$(wmiir namespace)/.proglist"
# Start Apps #
pkill -9 devmon;devmon 2>&1 > ~/tmp/devmon.log &
urxvt -name 'irc' &
urxvt -name 'code' &
sh ~/scripts/net/mntSSHFSzeohn.sh

# Start Scripts #
#
# action weather &
# action uptime &
# action status &