Monday, October 26, 2015

i3wm xsession

 2080  while read file;do echo;echo;history|tail -1;echo Filename: "${file}";cat "${file}";echo;echo;echo;done
Filename: xsession
#!/usr/bin/env bash

# Do custom xrandr and i3 config conditional upon Work / Studio / Laptop
~/.i3/i3config.sh
exec /usr/bin/i3

#

i3wm Reboot.sh

 2080  while read file;do echo;echo;history|tail -1;echo Filename: "${file}";cat "${file}";echo;echo;echo;done
Filename: Reboot.sh
#!/bin/bash
# reboot without password

dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" \
/org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart

#

i3wm Poweroff.sh

 2080  while read file;do echo;echo;history|tail -1;echo Filename: "${file}";cat "${file}";echo;echo;echo;done
Filename: Poweroff.sh
#!/bin/bash
# poweroff without password

dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" \
/org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop

#

i3wm i3status.conf

 2080  while read file;do echo;echo;history|tail -1;echo Filename: "${file}";cat "${file}";echo;echo;echo;done
Filename: i3status.conf
# i3status configuration file.
# see "man i3status" for documentation.

# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!

general {
        colors = true
        interval = 10
}

#order += "ipv6"
order += "disk /"
#order += "run_watch DHCP"
#order += "run_watch VPN"
order += "wireless wlan0"
order += "ethernet eth0"
order += "load"
order += "battery 0"
order += "tztime local"

wireless wlan0 {
        #format_up = "W: (%quality at %essid) %ip"
        format_up = "W:%essid:%ip"
        format_down = "W"
}

ethernet eth0 {
        # if you use %speed, i3status requires root privileges
        format_up = "E:%ip"
        format_down = "E"
}

battery 0 {
        format = "%status:%percentage %remaining"
}

run_watch DHCP {
        pidfile = "/var/run/dhclient*.pid"
}

run_watch VPN {
        pidfile = "/var/run/vpnc/pid"
}

tztime local {
        format = "%a %d%b%Y %H:%M"
}

load {
        format = "load:%1min"
}

disk "/" {
        format = "/:%avail"
}

i3wm i3GetWindowCriteria.sh

 2080  while read file;do echo;echo;history|tail -1;echo Filename: "${file}";cat "${file}";echo;echo;echo;done
Filename: i3GetWindowCriteria.sh
#!/bin/sh

# i3-get-window-criteria.sh - Get criteria for use with i3 config commands

# To use, run this script, then click on a window.
# Output is in the format: [<name>=<value> <name>=<value> ...]

# Known problem: when WM_NAME is used as fallback for the 'title="<string>"' criterion,
# quotes in "<string>" are not escaped properly. This is a problem with the output of `xprop`,
# reported upstream: https://bugs.freedesktop.org/show_bug.cgi?id=66807

PROGNAME=`basename "$0"`

# Check for xwininfo and xprop
for cmd in xwininfo xprop; do
    if ! which $cmd > /dev/null 2>&1; then
        echo "$PROGNAME: $cmd: command not found" >&2
        exit 1
    fi
done

match_int='[0-9][0-9]*'
match_string='".*"'
match_qstring='"[^"\\]*(\\.[^"\\]*)*"' # NOTE: Adds 1 backreference

{
    # Run xwininfo, get window id
    window_id=`xwininfo -int | sed -nre "s/^xwininfo: Window id: ($match_int) .*$/\1/p"`
    echo "id=$window_id"

    # Run xprop, transform its output into i3 criteria. Handle fallback to
    # WM_NAME when _NET_WM_NAME isn't set
    xprop -id $window_id |
        sed -nr \
            -e "s/^WM_CLASS\(STRING\) = ($match_qstring), ($match_qstring)$/instance=\1\nclass=\3/p" \
            -e "s/^WM_WINDOW_ROLE\(STRING\) = ($match_qstring)$/window_role=\1/p" \
            -e "/^WM_NAME\(STRING\) = ($match_string)$/{s//title=\1/; h}" \
            -e "/^_NET_WM_NAME\(UTF8_STRING\) = ($match_qstring)$/{s//title=\1/; h}" \
            -e '${g; p}'
} | sort | tr "\n" " " | sed -r 's/^(.*) $/[\1]\n/'

#

i3wm i3ExecAlways

 2080  while read file;do echo;echo;history|tail -1;echo Filename: "${file}";cat "${file}";echo;echo;echo;done
Filename: i3ExecAlways
#!/bin/bash
# double fork to avoid zombies
# see http://charlesweldonwitt.blogspot.com/2015/08/double-fork-to-avoid-zombies.html

# autokey for some automation stuff
(( sleep 3 && pgrep -f autokey || autokey 0<&- &>/dev/null &) &)

# nm-applet for wifi, ethernet, vpn
(( sleep 20 && pgrep -f 'nm-applet' || sudo /usr/bin/nm-applet 0<&- &>/dev/null &) &)

# duplicati does versioned backups
(( sleep 3 && pgrep -f duplicati || ~/bin/duplicati.sh 0<&- &>/dev/null &) &)

# insync syncs with Google Drive (most recent version only) - hence duplicati for versioning of some things
# insync notify applet seems to disappear upon i3wm restart, so always quit / pkill it and start it again
(( sleep 5;insync quit;sleep 10;pkill -f insync;insync start 0<&- &>/dev/null &) &)

#

i3wm i3config.sh

cwitt@cwittUbuntuDB:~/.i3$ echo;for file in i3config.sh;do echo;echo 'Filename: '"${file}";cat "${file}";echo;echo;done;echo


Filename: i3config.sh
#!/bin/bash
# xrandr and i3 config conditional upon Work / Studio / Laptop

theme='tango-jungle'

# grep -c returns 1 line then 1 aka true else 0 aka false
xrandr | grep ' connected '
Work="$( \
ifconfig | grep eth0 -A1 | tail -1 | grep -c 'inet addr:10.19.2.' \
&& \
xrandr | grep -c 'HDMI3 connected ' \
)"
echo Work:${Work}
echo Work:${Work} | grep 1 && Work=1 || Work=0
Studio="$( xrandr | grep -c 'VGA1 connected ' )"
Laptop="$( if [[ ${Work} = 0 && ${Studio} = 0 ]];then echo 1;else echo 0;fi )"
# output results for debugging
echo Work:${Work} Studio:${Studio} Laptop:${Laptop}

# being extra vigilant on condition checking to avoid unexpected results
if [[ ${Work} = 1 ]]
then
  location=Work
  echo ${location}
  ~/.i3/ScreenLayout/${location}.sh
  j4-make-config -a config.${location} ${theme}
  rm ~/.stalonetrayrc;ln -s ~/.i3/stalonetrayrc/stalonetrayrc.${location} ~/.stalonetrayrc
fi
if [[ ${Work} = 0 && ${Studio} = 1 && ${Laptop} = 0 ]]
then
  location=Studio
  echo ${location}
  ~/.i3/ScreenLayout/${location}.sh
  j4-make-config -a config.${location} ${theme}
  rm ~/.stalonetrayrc;ln -s ~/.i3/stalonetrayrc/stalonetrayrc.${location} ~/.stalonetrayrc
fi
if [[ ${Work} = 0 && ${Studio} = 0 && ${Laptop} = 1 ]]
then
  location=Studio
  echo ${location}
  ~/.i3/ScreenLayout/${location}.sh
  j4-make-config -a config.${location} ${theme}
  rm ~/.stalonetrayrc;ln -s ~/.i3/stalonetrayrc/stalonetrayrc.${location} ~/.stalonetrayrc
fi
# if above condtions do not match then do not do custom xrandr and do use most recent i3 config

#

i3wm config.Work.All_TR2Skinny1Big_BR1Big

cwitt@cwittUbuntuDB:~/.i3$ echo;for file in config.Work.All_TR2Skinny1Big_BR1Big;do echo;echo 'Filename: '"${file}";cat "${file}";echo;echo;done;echo


Filename: config.Work.All_TR2Skinny1Big_BR1Big
#
#
# BEGIN config.Work to be appended to config.base

# Left Monitor(VGA1) LEFT OF Big Monitor(HDMI3) AND aligned at TOP edge
# VGA1: 1600x900 All: thunderbird
# HDMI3: 1920x1080 Top Half: tiny pidgin, tiny keepassx, big pac Bottom Half: google-chrome
fake-outputs 1600x900+0+0,960x640+1600+440,960x640+2560+440,300x440+1600+0,1620x440+1900+0
# fake-outputs 1600x20+1900+0,1920x1040+1900+40,300x420+1600+20,1620x420+1900+20,960x600+1600+460,960x600+2560+460,1600x900+0+0
workspace hidden output fake-1

# END config.Work

i3wm config.Studio.Vertical

cwitt@cwittUbuntuDB:~/.i3$ echo;for file in config.Studio.Vertical;do echo;echo 'Filename: '"${file}";cat "${file}";echo;echo;done;echo


Filename: config.Studio.Vertical
#
# BEGIN config.Studio to be appended to config.base

# Laptop Monitor(LVDS1) logically RIGHT of Big Monitor(VGA1) AND aligned at TOP edge
# LVDS1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
# VGA1 connected 1050x1680+0+768 right (normal left inverted right x axis y axis) 480mm x 270mm
fake-outputs 1366x768+0+0,1050x1680+0+768
# fake-outputs 1050x768+0+0,1366x768+1050+0,1050x912+0+768

# END config.Studio
#

i3wm config.Laptop

cwitt@cwittUbuntuDB:~/.i3$ echo;for file in config.Laptop;do echo;echo 'Filename: '"${file}";cat "${file}";echo;echo;done;echo


Filename: config.Laptop
#
# BEGIN config.Laptop to be appended to config.base

# Laptop Monitor(LVDS1)
# LVDS1: skinny, big
# LVDS1 1366x768+0+0
fake-outputs 880x20+466+0,1366x728+0+40,466x768+0+0,900x748+466+20

# END config.Laptop
#

i3wm config.base

cwitt@cwittUbuntuDB:~/.i3$ echo;for file in config.base;do echo;echo 'Filename: '"${file}";cat "${file}";echo;echo;done;echo


Filename: config.base
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#

# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!

# Start blueman-applet for bluetooth
exec_always --no-startup-id blueman-applet

# Pulse Audio controls
exec_once --no-startup-id volumeicon
bindsym XF86AudioMute exec ~/bin/ToggleMute.sh # mute sound volume for sink aka output
bindsym $mod+XF86AudioMute exec ~/bin/AudioFullVolume.sh # full sound volume for sink aka output
bindsym XF86AudioRaiseVolume exec ~/bin/AudioRaiseVolume.sh #increase sound volume
bindsym XF86AudioLowerVolume exec ~/bin/AudioLowerVolume.sh #decrease sound volume
bindsym XF86AudioMicMute exec ~/bin/ToggleMuteMicrophone.sh # mute microphone aka sound source


# default border is too small :)
new_window pixel 5

# wallpaper
exec_always --no-startup-id feh --bg-max ~/.i3/wallpaper.jpg

# [class="Vncviewer" id=67108881 instance="vncviewer" title="TightVNC: nocmonitor1:0"]
assign [class="Vncviewer"] 10
for_window [class="Vncviewer"] focus

# various exec_always programs in ~/.i3/i3ExecAlways script to make startup easier and all in one place
exec_always --no-startup-id ~/.i3/i3ExecAlways

# /usr/NX/bin/: nxserver.bin nxd nxnode.bin nxclient.bin start w/o my help, so far so good
# manually start nxplayer if for some reason the applet is not showing

# natural scrolling for touchpad
exec --no-startup-id xinput set-prop 11 "Synaptics Scrolling Distance" -101, -101

# use Mod4 (Windows / Super) as mod
set $mod Mod4

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
#font pango:Ubuntu 16
font -schumacher-clean-bold-r-normal--16-160-75-75-c-80-iso646.1991-irv

# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

# start a terminal
bindsym $mod+Return exec i3-sensible-terminal

# kill focused window
bindsym $mod+Escape kill

# reName workspace
bindsym $mod+n exec i3-input -F 'rename workspace to "%s"' -P 'New name: '

# start a file manager
bindsym $mod+Shift+F12 exec nautilus
# start dmenu (a program launcher)
bindsym $mod+F12 exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop

# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right

# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right

# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

# move focused workspace
bindsym $mod+Shift+Control+j move workspace to output left
bindsym $mod+Shift+Control+k move workspace to output down
bindsym $mod+Shift+Control+l move workspace to output up
bindsym $mod+Shift+Control+semicolon move workspace to output right

# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Control+Left move workspace to output left
bindsym $mod+Shift+Control+Down move workspace to output down
bindsym $mod+Shift+Control+Up move workspace to output up
bindsym $mod+Shift+Control+Right move workspace to output right

# split in horizontal orientation
bindsym $mod+h split h

# split in vertical orientation
bindsym $mod+v split v

# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen

# change container layout (stacked, tabbed, toggle split)
bindsym $mod+Shift+s layout stacking
bindsym $mod+Shift+w layout tabbed
bindsym $mod+Shift+e layout toggle split

# toggle tiling / floating
bindsym $mod+Shift+space floating toggle

# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle

# New workspace in same output
bindsym $mod+Shift+n exec quickswitch.py -e

# workspace assignments and switching - fake-0 is for i3status - fake-1 is for hidden
workspace 1 output fake-1
bindsym $mod+1 workspace number 1
workspace 2 output fake-2
bindsym $mod+2 workspace number 2
workspace 3 output fake-3
bindsym $mod+3 workspace number 3
workspace 4 output fake-4
bindsym $mod+4 workspace number 4
workspace 5 output fake-5
bindsym $mod+5 workspace number 5
workspace 6 output fake-6
bindsym $mod+6 workspace number 6
workspace 7 output fake-7
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
workspace 10 output fake-0
bindsym $mod+0 workspace number 10
bindsym $mod+F1 workspace number 11
bindsym $mod+F2 workspace number 12
bindsym $mod+F3 workspace number 13
bindsym $mod+F4 workspace number 14
bindsym $mod+F5 workspace number 15
bindsym $mod+F6 workspace number 16
bindsym $mod+F7 workspace number 17
bindsym $mod+F8 workspace number 18
bindsym $mod+F9 workspace number 19
bindsym $mod+F10 workspace number 20

# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10
bindsym $mod+Shift+F1 move container to workspace number 11
bindsym $mod+Shift+F2 move container to workspace number 12
bindsym $mod+Shift+F3 move container to workspace number 13
bindsym $mod+Shift+F4 move container to workspace number 14, workspace number 14
bindsym $mod+Shift+F5 move container to workspace number 15, workspace number 15
bindsym $mod+Shift+F6 move container to workspace number 16
bindsym $mod+Shift+F7 move container to workspace number 17
bindsym $mod+Shift+F8 move container to workspace number 18
bindsym $mod+Shift+F9 move container to workspace number 19
bindsym $mod+Shift+F10 move container to workspace number 20

# cwwitt: create new ~/.i3/config
bindsym $mod+Shift+c exec ~/.i3/i3config.sh
# cwwitt: will restart and use current ~/.i3/config
bindsym $mod+Shift+r restart
# lock screen Ctrl-Alt-l
bindsym Control+mod1+l exec i3lock
# BEGIN Create Log out, Reboot, Poweroff bindings
set $mode_system (Enter) logout, (r) reboot, (Esc) poweroff
mode "$mode_system" {
    # Poweroff no password
    bindsym Escape exec ~/bin/Poweroff.sh
    # Logout
    bindsym Return exit
    # Reboot no password
    bindsym r exec ~/bin/Reboot.sh
    # back to normal: very rare, so do Shift+Escape
    bindsym Shift+Escape mode "default"
}
bindsym $mod+Shift+Escape mode "$mode_system"
# END Create Log out, Reboot, Poweroff bindings

# resize window (you can also use the mouse for that)
mode "resize" {
        # These bindings trigger as soon as you enter the resize mode

        # Pressing left will shrink the window’s width.
        # Pressing right will grow the window’s width.
        # Pressing up will shrink the window’s height.
        # Pressing down will grow the window’s height.
        bindsym j resize shrink width 10 px or 10 ppt
        bindsym k resize grow height 10 px or 10 ppt
        bindsym l resize shrink height 10 px or 10 ppt
        bindsym semicolon resize grow width 10 px or 10 ppt

        # same bindings, but for the arrow keys
        bindsym Left resize shrink width 10 px or 10 ppt
        bindsym Down resize grow height 10 px or 10 ppt
        bindsym Up resize shrink height 10 px or 10 ppt
        bindsym Right resize grow width 10 px or 10 ppt

        # back to normal: Enter or Escape
        bindsym Return mode "default"
        bindsym Escape mode "default"
}

bindsym $mod+r mode "resize"

# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
        output fake-0
        position bottom
        status_command i3status
        # $i3-theme-bar
}

bar {
        output fake-1
        output fake-2
        output fake-3
        output fake-4
        output fake-5
        output fake-6
        output fake-7
        tray_output none
        position top
        status_command i3status
        # $i3-theme-bar
}

# $i3-theme-window

i3wm config

cwitt@cwittUbuntuDB:~/.i3$ echo;for file in config;do echo;echo 'Filename: '"${file}";cat "${file}";echo;echo;done;echo

Filename: config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#

# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!

# Start blueman-applet for bluetooth
exec_always --no-startup-id blueman-applet

# Pulse Audio controls
exec_once --no-startup-id volumeicon
bindsym XF86AudioMute exec ~/bin/ToggleMute.sh # mute sound volume for sink aka output
bindsym $mod+XF86AudioMute exec ~/bin/AudioFullVolume.sh # full sound volume for sink aka output
bindsym XF86AudioRaiseVolume exec ~/bin/AudioRaiseVolume.sh #increase sound volume
bindsym XF86AudioLowerVolume exec ~/bin/AudioLowerVolume.sh #decrease sound volume
bindsym XF86AudioMicMute exec ~/bin/ToggleMuteMicrophone.sh # mute microphone aka sound source


# default border is too small :)
new_window pixel 5

# wallpaper
exec_always --no-startup-id feh --bg-max ~/.i3/wallpaper.jpg

# [class="Vncviewer" id=67108881 instance="vncviewer" title="TightVNC: nocmonitor1:0"]
assign [class="Vncviewer"] 10
for_window [class="Vncviewer"] focus

# various exec_always programs in ~/.i3/i3ExecAlways script to make startup easier and all in one place
exec_always --no-startup-id ~/.i3/i3ExecAlways

# /usr/NX/bin/: nxserver.bin nxd nxnode.bin nxclient.bin start w/o my help, so far so good
# manually start nxplayer if for some reason the applet is not showing

# natural scrolling for touchpad
exec --no-startup-id xinput set-prop 11 "Synaptics Scrolling Distance" -101, -101

# use Mod4 (Windows / Super) as mod
set $mod Mod4

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
#font pango:Ubuntu 16
font -schumacher-clean-bold-r-normal--16-160-75-75-c-80-iso646.1991-irv

# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

# start a terminal
bindsym $mod+Return exec i3-sensible-terminal

# kill focused window
bindsym $mod+Escape kill

# reName workspace
bindsym $mod+n exec i3-input -F 'rename workspace to "%s"' -P 'New name: '

# start a file manager
bindsym $mod+Shift+F12 exec nautilus
# start dmenu (a program launcher)
bindsym $mod+F12 exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop

# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right

# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right

# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

# move focused workspace
bindsym $mod+Shift+Control+j move workspace to output left
bindsym $mod+Shift+Control+k move workspace to output down
bindsym $mod+Shift+Control+l move workspace to output up
bindsym $mod+Shift+Control+semicolon move workspace to output right

# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Control+Left move workspace to output left
bindsym $mod+Shift+Control+Down move workspace to output down
bindsym $mod+Shift+Control+Up move workspace to output up
bindsym $mod+Shift+Control+Right move workspace to output right

# split in horizontal orientation
bindsym $mod+h split h

# split in vertical orientation
bindsym $mod+v split v

# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen

# change container layout (stacked, tabbed, toggle split)
bindsym $mod+Shift+s layout stacking
bindsym $mod+Shift+w layout tabbed
bindsym $mod+Shift+e layout toggle split

# toggle tiling / floating
bindsym $mod+Shift+space floating toggle

# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle

# New workspace in same output
bindsym $mod+Shift+n exec quickswitch.py -e

# workspace assignments and switching - fake-0 is for i3status - fake-1 is for hidden
workspace 1 output fake-1
bindsym $mod+1 workspace number 1
workspace 2 output fake-2
bindsym $mod+2 workspace number 2
workspace 3 output fake-3
bindsym $mod+3 workspace number 3
workspace 4 output fake-4
bindsym $mod+4 workspace number 4
workspace 5 output fake-5
bindsym $mod+5 workspace number 5
workspace 6 output fake-6
bindsym $mod+6 workspace number 6
workspace 7 output fake-7
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
workspace 10 output fake-0
bindsym $mod+0 workspace number 10
bindsym $mod+F1 workspace number 11
bindsym $mod+F2 workspace number 12
bindsym $mod+F3 workspace number 13
bindsym $mod+F4 workspace number 14
bindsym $mod+F5 workspace number 15
bindsym $mod+F6 workspace number 16
bindsym $mod+F7 workspace number 17
bindsym $mod+F8 workspace number 18
bindsym $mod+F9 workspace number 19
bindsym $mod+F10 workspace number 20

# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10
bindsym $mod+Shift+F1 move container to workspace number 11
bindsym $mod+Shift+F2 move container to workspace number 12
bindsym $mod+Shift+F3 move container to workspace number 13
bindsym $mod+Shift+F4 move container to workspace number 14, workspace number 14
bindsym $mod+Shift+F5 move container to workspace number 15, workspace number 15
bindsym $mod+Shift+F6 move container to workspace number 16
bindsym $mod+Shift+F7 move container to workspace number 17
bindsym $mod+Shift+F8 move container to workspace number 18
bindsym $mod+Shift+F9 move container to workspace number 19
bindsym $mod+Shift+F10 move container to workspace number 20

# cwwitt: create new ~/.i3/config
bindsym $mod+Shift+c exec ~/.i3/i3config.sh
# cwwitt: will restart and use current ~/.i3/config
bindsym $mod+Shift+r restart
# lock screen Ctrl-Alt-l
bindsym Control+mod1+l exec i3lock
# BEGIN Create Log out, Reboot, Poweroff bindings
set $mode_system (Enter) logout, (r) reboot, (Esc) poweroff
mode "$mode_system" {
    # Poweroff no password
    bindsym Escape exec ~/bin/Poweroff.sh
    # Logout
    bindsym Return exit
    # Reboot no password
    bindsym r exec ~/bin/Reboot.sh
    # back to normal: very rare, so do Shift+Escape
    bindsym Shift+Escape mode "default"
}
bindsym $mod+Shift+Escape mode "$mode_system"
# END Create Log out, Reboot, Poweroff bindings

# resize window (you can also use the mouse for that)
mode "resize" {
        # These bindings trigger as soon as you enter the resize mode

        # Pressing left will shrink the window’s width.
        # Pressing right will grow the window’s width.
        # Pressing up will shrink the window’s height.
        # Pressing down will grow the window’s height.
        bindsym j resize shrink width 10 px or 10 ppt
        bindsym k resize grow height 10 px or 10 ppt
        bindsym l resize shrink height 10 px or 10 ppt
        bindsym semicolon resize grow width 10 px or 10 ppt

        # same bindings, but for the arrow keys
        bindsym Left resize shrink width 10 px or 10 ppt
        bindsym Down resize grow height 10 px or 10 ppt
        bindsym Up resize shrink height 10 px or 10 ppt
        bindsym Right resize grow width 10 px or 10 ppt

        # back to normal: Enter or Escape
        bindsym Return mode "default"
        bindsym Escape mode "default"
}

bindsym $mod+r mode "resize"

# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
        output fake-0
        position bottom
        status_command i3status
colors {
    # tango jungle <workclass> <border> <backg> <text>
    focused_workspace $green $darkgreen $white
    active_workspace $brown $darkbrown $grey
    inactive_workspace $black $darkblack $grey
    urgent_workspace $yellow $darkyellow $white
  background black
separator  #444444
statusline $darkgrey
}
}

bar {
        output fake-1
        output fake-2
        output fake-3
        output fake-4
        output fake-5
        output fake-6
        output fake-7
        tray_output none
        position top
        status_command i3status
colors {
    # tango jungle <workclass> <border> <backg> <text>
    focused_workspace $green $darkgreen $white
    active_workspace $brown $darkbrown $grey
    inactive_workspace $black $darkblack $grey
    urgent_workspace $yellow $darkyellow $white
  background black
separator  #444444
statusline $darkgrey
}
}

# tango dark
set $darkblue #204A87
set $darkbrown #8F5902
set $darkgreen #4E9A06
set $darkmagenta #5C3566
set $darkred #A40000
set $darkyellow #C4A000
set $darkorange #CE5C00

# tango light
set $lightblue #729FCF
set $lightbrown #E9B96E
set $lightgreen #8AE234
set $lightmagenta #AD7FA8
set $lightred #EF2929
set $lightyellow #FCE94F
set $lightorange #FCAF3E

# tango normal
set $blue #3465A4
set $brown #C17D11
set $green #73D216
set $magenta #75507B
set $red #CC0000
set $yellow #EDD400
set $orange #F57900

# tango mono
set $black #555753
set $grey #BABDB6
set $white #EEEEEC
set $darkblack #2E3436
set $darkgrey #888A85
set $darkwhite #D3D7CF

# $i3-background
exec_always --no-startup-id xsetroot -solid '#2E3436'

# tango jungle <clientclass> <border> <backg> <text> <indicator>
client.focused          $green $darkgreen $white $lightgreen
client.focused_inactive black black $grey black
client.unfocused        black black $grey black
client.urgent           $yellow $darkyellow $white $lightyellow

#
# BEGIN config.Studio to be appended to config.base

# Laptop Monitor(LVDS1) logically RIGHT of Big Monitor(VGA1) AND aligned at TOP edge
# LVDS1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
# VGA1 connected 1050x1680+0+768 right (normal left inverted right x axis y axis) 480mm x 270mm
fake-outputs 1366x768+0+0,1050x1680+0+768
# fake-outputs 1050x768+0+0,1366x768+1050+0,1050x912+0+768

# END config.Studio
#

autokey data

cwitt@cwittUbuntuDB:~/.i3/autokey_data$ find
./cwitt/Shift-Right.py
./cwitt/.Shift-Right.json
./cwitt/Super-V.py
./cwitt/.Super-V.json
./cwitt/Super-C.py
./cwitt/.Super-C.json
./My Phrases/CRM Note WEB.txt
./My Phrases/.CRM Note WEB.json

cwitt@cwittUbuntuDB:~/.i3/autokey_data$ echo;for file in ./cwitt/Super-C.py ./cwitt/.Super-C.json ./cwitt/Shift-Right.py ./cwitt/.Shift-Right.json ./cwitt/Super-V.py ./cwitt/.Super-V.json './My Phrases/CRM Note WEB.txt' './My Phrases/.CRM Note WEB.json';do echo;echo 'Filename: '"${file}";cat "${file}";echo;echo;done;echo


Filename: ./cwitt/Super-C.py
# "<ctrl>+<super>+c" also sends "<ctrl>+<c>" 
keyboard.send_keys("<shift>+<ctrl>+c")


Filename: ./cwitt/.Super-C.json
{
    "usageCount": 18, 
    "omitTrigger": false, 
    "prompt": false, 
    "description": "Super-C", 
    "abbreviation": {
        "wordChars": "[\\w]", 
        "abbreviations": [], 
        "immediate": false, 
        "ignoreCase": false, 
        "backspace": true, 
        "triggerInside": false
    }, 
    "hotkey": {
        "hotKey": "c", 
        "modifiers": [
            "<ctrl>"
        ]
    }, 
    "modes": [
        3
    ], 
    "showInTrayMenu": false, 
    "filter": {
        "regex": ".*Pac|.*terminal", 
        "isRecursive": false
    }, 
    "type": "script", 
    "store": {}
}


Filename: ./cwitt/Shift-Right.py
keyboard.send_keys("<shift>+<right>")
keyboard.send_keys("<shift>+<right>")
keyboard.send_keys("<shift>+<right>")
keyboard.send_keys("<shift>+<right>")



Filename: ./cwitt/.Shift-Right.json
{
    "usageCount": 0, 
    "omitTrigger": false, 
    "prompt": false, 
    "description": "Shift-Right", 
    "abbreviation": {
        "wordChars": "[\\w]", 
        "abbreviations": [], 
        "immediate": false, 
        "ignoreCase": false, 
        "backspace": true, 
        "triggerInside": false
    }, 
    "hotkey": {
        "hotKey": "<right>", 
        "modifiers": [
            "<shift>"
        ]
    }, 
    "modes": [
        3
    ], 
    "showInTrayMenu": false, 
    "filter": {
        "regex": "Audacity.Audacity", 
        "isRecursive": false
    }, 
    "type": "script", 
    "store": {}
}


Filename: ./cwitt/Super-V.py
keyboard.send_keys("<shift>+<ctrl>+v")


Filename: ./cwitt/.Super-V.json
{
    "usageCount": 12, 
    "omitTrigger": false, 
    "prompt": false, 
    "description": "Super-V", 
    "abbreviation": {
        "wordChars": "[\\w]", 
        "abbreviations": [], 
        "immediate": false, 
        "ignoreCase": false, 
        "backspace": true, 
        "triggerInside": false
    }, 
    "hotkey": {
        "hotKey": "v", 
        "modifiers": [
            "<ctrl>"
        ]
    }, 
    "modes": [
        3
    ], 
    "showInTrayMenu": false, 
    "filter": {
        "regex": ".*Pac|.*terminal", 
        "isRecursive": false
    }, 
    "type": "script", 
    "store": {}
}


Filename: ./My Phrases/CRM Note WEB.txt
*WEB* 


Filename: ./My Phrases/.CRM Note WEB.json
{
    "usageCount": 0, 
    "omitTrigger": false, 
    "prompt": false, 
    "description": "CRM Note *WEB*", 
    "abbreviation": {
        "wordChars": "[\\w]", 
        "abbreviations": [], 
        "immediate": false, 
        "ignoreCase": false, 
        "backspace": true, 
        "triggerInside": false
    }, 
    "hotkey": {
        "hotKey": "w", 
        "modifiers": [
            "<super>"
        ]
    }, 
    "modes": [
        3
    ], 
    "showInTrayMenu": false, 
    "matchCase": false, 
    "filter": {
        "regex": "gedit.Gedit|Google-chrome.Google-chrome", 
        "isRecursive": false
    }, 
    "type": "phrase", 
    "sendMode": "kb"
}

i3wm

These are my related configuration files for i3wm known by some as simply i3. i3wm is a tiling window manager for Linux lubbers by the way. See my previous post Adventures In Tiling. :)

For my reference here is a list of ~/.i3 with some irrelevant results excluded:
cwitt@cwittUbuntuDB:~/.i3$ ll
total 92
drwxr-xr-x   4 cwitt cwitt  4096 Oct 26 14:33 ./
drwxr-xr-x 138 cwitt cwitt 12288 Oct 26 13:41 ../
lrwxrwxrwx   1 cwitt cwitt    32 Feb 19  2015 autokey_data -> /home/cwitt/.config/autokey/data/
-rw-rw-r--   1 cwitt cwitt 10879 Oct 26 13:41 config
-rw-rw-r--   1 cwitt cwitt  8798 Oct 26 13:41 config.base
-rw-rw-rw-   1 cwitt cwitt  5188 Jan 31  2015 config.default
-rw-rw-rw-   1 cwitt cwitt   211 Mar  2  2015 config.Laptop
lrwxrwxrwx   1 cwitt cwitt    38 Mar  3  2015 config.Studio -> /home/cwitt/.i3/config.Studio.Vertical
-rw-rw-r--   1 cwitt cwitt   449 Mar  2  2015 config.Studio.Horizontal
-rw-rw-r--   1 cwitt cwitt   456 Mar  3  2015 config.Studio.Vertical
lrwxrwxrwx   1 cwitt cwitt    36 Feb  9  2015 config.Work -> config.Work.All_TR2Skinny1Big_BR1Big
-rw-rw-rw-   1 cwitt cwitt   523 Mar  2  2015 config.Work.All_TR2Skinny1Big_BR1Big
-rw-rw-rw-   1 cwitt cwitt   275 Feb  9  2015 config.Work.BigSkinnySkinnyBig
-rwxr-x---   1 cwitt cwitt  1547 Mar  2  2015 i3config.sh*
-rwxr-x---   1 cwitt cwitt   770 Aug 28 23:39 i3ExecAlways*
-rwxr-x---   1 cwitt cwitt  1526 Feb 10  2015 i3GetWindowCriteria.sh*
lrwxrwxrwx   1 cwitt cwitt    26 Feb 10  2015 i3status.conf -> /home/cwitt/.i3status.conf
lrwxrwxrwx   1 cwitt cwitt    30 Feb 16  2015 j4-make-config -> /home/cwitt/bin/j4-make-config*
lrwxrwxrwx   1 cwitt cwitt    27 Feb 16  2015 Poweroff.sh -> /home/cwitt/bin/Poweroff.sh*
lrwxrwxrwx   1 cwitt cwitt    25 Feb 16  2015 Reboot.sh -> /home/cwitt/bin/Reboot.sh*
drwxrwxr-x   2 cwitt cwitt  4096 Mar  3  2015 ScreenLayout/
drwx------   2 cwitt cwitt  4096 Feb 19  2015 themes/
lrwxrwxrwx   1 cwitt cwitt    56 Feb  6  2015 wallpaper.jpg -> /usr/share/backgrounds/salcantayperu_by_Life_Nomadic.jpg
lrwxrwxrwx   1 cwitt cwitt    21 Feb 11  2015 xsession -> /home/cwitt/.xsession*