Imported colours and scripts.
authorIain Patterson <me@iain.cx>
Wed, 22 Aug 2007 10:04:28 +0000 (10:04 +0000)
committerIain Patterson <me@iain.cx>
Wed, 22 Aug 2007 10:04:28 +0000 (10:04 +0000)
git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@65 6be0d1a5-5cfe-0310-89b6-964be062b18b

35 files changed:
.bash_profile [changed mode: 0755->0644]
.inputrc [changed mode: 0755->0644]
.ssh/colours/cambridge.iain.cx$ [new symlink]
.ssh/colours/furryclan.net$ [new symlink]
.ssh/hosts/iain.cx/aygalades.cambridge.iain.cx [new file with mode: 0755]
.vimrc [changed mode: 0755->0644]
.xbindkeys/39 [new symlink]
.xbindkeys/49 [new symlink]
.xbindkeys/colours/Birmingham:#220044 [new file with mode: 0755]
.xbindkeys/colours/Black [new file with mode: 0755]
.xbindkeys/colours/Blue [new file with mode: 0755]
.xbindkeys/colours/Blue:#2040c0 [new file with mode: 0755]
.xbindkeys/colours/Brown:#a06000 [new file with mode: 0755]
.xbindkeys/colours/CacheLogic:#2569d9 [new file with mode: 0755]
.xbindkeys/colours/DarkBlue [new file with mode: 0755]
.xbindkeys/colours/DarkGreen [new file with mode: 0755]
.xbindkeys/colours/DarkGreen:#004000 [new file with mode: 0755]
.xbindkeys/colours/DarkPurple:#604060 [new file with mode: 0755]
.xbindkeys/colours/DarkRed [new file with mode: 0755]
.xbindkeys/colours/DarkRed:#400000 [new file with mode: 0755]
.xbindkeys/colours/Green [new file with mode: 0755]
.xbindkeys/colours/Grey [new file with mode: 0755]
.xbindkeys/colours/Orange [new file with mode: 0755]
.xbindkeys/colours/Purple [new file with mode: 0755]
.xbindkeys/colours/Red [new file with mode: 0755]
.xbindkeys/colours/Vim:#000040 [new file with mode: 0755]
.xbindkeys/colours/White [new file with mode: 0755]
.xbindkeys/leftclick [new file with mode: 0644]
.xbindkeys/lock [new file with mode: 0755]
.xbindkeys/title [new file with mode: 0755]
.xbindkeysrc [new file with mode: 0644]
lensort [new file with mode: 0755]
sshcolourterm [new file with mode: 0755]
sshterm [new file with mode: 0755]
usize [new file with mode: 0755]

old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/.ssh/colours/cambridge.iain.cx$ b/.ssh/colours/cambridge.iain.cx$
new file mode 120000 (symlink)
index 0000000..d3c3d42
--- /dev/null
@@ -0,0 +1 @@
+DarkRed:#400000
\ No newline at end of file
diff --git a/.ssh/colours/furryclan.net$ b/.ssh/colours/furryclan.net$
new file mode 120000 (symlink)
index 0000000..ee9ee8b
--- /dev/null
@@ -0,0 +1 @@
+Brown:#a06000
\ No newline at end of file
diff --git a/.ssh/hosts/iain.cx/aygalades.cambridge.iain.cx b/.ssh/hosts/iain.cx/aygalades.cambridge.iain.cx
new file mode 100755 (executable)
index 0000000..d394b13
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/bash
+exec sshterm $(basename "$0")
diff --git a/.vimrc b/.vimrc
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/.xbindkeys/39 b/.xbindkeys/39
new file mode 120000 (symlink)
index 0000000..c5f7552
--- /dev/null
@@ -0,0 +1 @@
+colours
\ No newline at end of file
diff --git a/.xbindkeys/49 b/.xbindkeys/49
new file mode 120000 (symlink)
index 0000000..c5f7552
--- /dev/null
@@ -0,0 +1 @@
+colours
\ No newline at end of file
diff --git a/.xbindkeys/colours/Birmingham:#220044 b/.xbindkeys/colours/Birmingham:#220044
new file mode 100755 (executable)
index 0000000..abe73a9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Script to send keystrokes to urxvt to set foreground or background colours.
+# Usage: $SOME_PATH/<fgbg>/<colour>
+# Notes: fgbg should be 39 (foreground) or 49 (background).
+#        colour should be a colour name or a hex code or a string name:#hex
+#        Create a hardlink to the script with the name of a new colour.
+# Example: 39/Blue
+#          49/#2569d9
+#          49/CacheLogic:#2569d9
+#
+
+# Find the type by checking which dir we're in and extracting the 39/49 part.
+dir=$(dirname $0)
+fgbg=$(basename $dir)
+
+# Find the desired colour by looking at this script's name.
+colour=$(basename $0)
+colour=${colour#*:}
+
+cat << EOF | xmacroplay $DISPLAY &>/dev/null
+KeyStr Escape
+String iecho -e '\033]$fgbg;$colour\007'
+KeyStr Return
+EOF
diff --git a/.xbindkeys/colours/Black b/.xbindkeys/colours/Black
new file mode 100755 (executable)
index 0000000..abe73a9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Script to send keystrokes to urxvt to set foreground or background colours.
+# Usage: $SOME_PATH/<fgbg>/<colour>
+# Notes: fgbg should be 39 (foreground) or 49 (background).
+#        colour should be a colour name or a hex code or a string name:#hex
+#        Create a hardlink to the script with the name of a new colour.
+# Example: 39/Blue
+#          49/#2569d9
+#          49/CacheLogic:#2569d9
+#
+
+# Find the type by checking which dir we're in and extracting the 39/49 part.
+dir=$(dirname $0)
+fgbg=$(basename $dir)
+
+# Find the desired colour by looking at this script's name.
+colour=$(basename $0)
+colour=${colour#*:}
+
+cat << EOF | xmacroplay $DISPLAY &>/dev/null
+KeyStr Escape
+String iecho -e '\033]$fgbg;$colour\007'
+KeyStr Return
+EOF
diff --git a/.xbindkeys/colours/Blue b/.xbindkeys/colours/Blue
new file mode 100755 (executable)
index 0000000..abe73a9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Script to send keystrokes to urxvt to set foreground or background colours.
+# Usage: $SOME_PATH/<fgbg>/<colour>
+# Notes: fgbg should be 39 (foreground) or 49 (background).
+#        colour should be a colour name or a hex code or a string name:#hex
+#        Create a hardlink to the script with the name of a new colour.
+# Example: 39/Blue
+#          49/#2569d9
+#          49/CacheLogic:#2569d9
+#
+
+# Find the type by checking which dir we're in and extracting the 39/49 part.
+dir=$(dirname $0)
+fgbg=$(basename $dir)
+
+# Find the desired colour by looking at this script's name.
+colour=$(basename $0)
+colour=${colour#*:}
+
+cat << EOF | xmacroplay $DISPLAY &>/dev/null
+KeyStr Escape
+String iecho -e '\033]$fgbg;$colour\007'
+KeyStr Return
+EOF
diff --git a/.xbindkeys/colours/Blue:#2040c0 b/.xbindkeys/colours/Blue:#2040c0
new file mode 100755 (executable)
index 0000000..abe73a9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Script to send keystrokes to urxvt to set foreground or background colours.
+# Usage: $SOME_PATH/<fgbg>/<colour>
+# Notes: fgbg should be 39 (foreground) or 49 (background).
+#        colour should be a colour name or a hex code or a string name:#hex
+#        Create a hardlink to the script with the name of a new colour.
+# Example: 39/Blue
+#          49/#2569d9
+#          49/CacheLogic:#2569d9
+#
+
+# Find the type by checking which dir we're in and extracting the 39/49 part.
+dir=$(dirname $0)
+fgbg=$(basename $dir)
+
+# Find the desired colour by looking at this script's name.
+colour=$(basename $0)
+colour=${colour#*:}
+
+cat << EOF | xmacroplay $DISPLAY &>/dev/null
+KeyStr Escape
+String iecho -e '\033]$fgbg;$colour\007'
+KeyStr Return
+EOF
diff --git a/.xbindkeys/colours/Brown:#a06000 b/.xbindkeys/colours/Brown:#a06000
new file mode 100755 (executable)
index 0000000..abe73a9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Script to send keystrokes to urxvt to set foreground or background colours.
+# Usage: $SOME_PATH/<fgbg>/<colour>
+# Notes: fgbg should be 39 (foreground) or 49 (background).
+#        colour should be a colour name or a hex code or a string name:#hex
+#        Create a hardlink to the script with the name of a new colour.
+# Example: 39/Blue
+#          49/#2569d9
+#          49/CacheLogic:#2569d9
+#
+
+# Find the type by checking which dir we're in and extracting the 39/49 part.
+dir=$(dirname $0)
+fgbg=$(basename $dir)
+
+# Find the desired colour by looking at this script's name.
+colour=$(basename $0)
+colour=${colour#*:}
+
+cat << EOF | xmacroplay $DISPLAY &>/dev/null
+KeyStr Escape
+String iecho -e '\033]$fgbg;$colour\007'
+KeyStr Return
+EOF
diff --git a/.xbindkeys/colours/CacheLogic:#2569d9 b/.xbindkeys/colours/CacheLogic:#2569d9
new file mode 100755 (executable)
index 0000000..abe73a9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Script to send keystrokes to urxvt to set foreground or background colours.
+# Usage: $SOME_PATH/<fgbg>/<colour>
+# Notes: fgbg should be 39 (foreground) or 49 (background).
+#        colour should be a colour name or a hex code or a string name:#hex
+#        Create a hardlink to the script with the name of a new colour.
+# Example: 39/Blue
+#          49/#2569d9
+#          49/CacheLogic:#2569d9
+#
+
+# Find the type by checking which dir we're in and extracting the 39/49 part.
+dir=$(dirname $0)
+fgbg=$(basename $dir)
+
+# Find the desired colour by looking at this script's name.
+colour=$(basename $0)
+colour=${colour#*:}
+
+cat << EOF | xmacroplay $DISPLAY &>/dev/null
+KeyStr Escape
+String iecho -e '\033]$fgbg;$colour\007'
+KeyStr Return
+EOF
diff --git a/.xbindkeys/colours/DarkBlue b/.xbindkeys/colours/DarkBlue
new file mode 100755 (executable)
index 0000000..abe73a9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Script to send keystrokes to urxvt to set foreground or background colours.
+# Usage: $SOME_PATH/<fgbg>/<colour>
+# Notes: fgbg should be 39 (foreground) or 49 (background).
+#        colour should be a colour name or a hex code or a string name:#hex
+#        Create a hardlink to the script with the name of a new colour.
+# Example: 39/Blue
+#          49/#2569d9
+#          49/CacheLogic:#2569d9
+#
+
+# Find the type by checking which dir we're in and extracting the 39/49 part.
+dir=$(dirname $0)
+fgbg=$(basename $dir)
+
+# Find the desired colour by looking at this script's name.
+colour=$(basename $0)
+colour=${colour#*:}
+
+cat << EOF | xmacroplay $DISPLAY &>/dev/null
+KeyStr Escape
+String iecho -e '\033]$fgbg;$colour\007'
+KeyStr Return
+EOF
diff --git a/.xbindkeys/colours/DarkGreen b/.xbindkeys/colours/DarkGreen
new file mode 100755 (executable)
index 0000000..abe73a9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Script to send keystrokes to urxvt to set foreground or background colours.
+# Usage: $SOME_PATH/<fgbg>/<colour>
+# Notes: fgbg should be 39 (foreground) or 49 (background).
+#        colour should be a colour name or a hex code or a string name:#hex
+#        Create a hardlink to the script with the name of a new colour.
+# Example: 39/Blue
+#          49/#2569d9
+#          49/CacheLogic:#2569d9
+#
+
+# Find the type by checking which dir we're in and extracting the 39/49 part.
+dir=$(dirname $0)
+fgbg=$(basename $dir)
+
+# Find the desired colour by looking at this script's name.
+colour=$(basename $0)
+colour=${colour#*:}
+
+cat << EOF | xmacroplay $DISPLAY &>/dev/null
+KeyStr Escape
+String iecho -e '\033]$fgbg;$colour\007'
+KeyStr Return
+EOF
diff --git a/.xbindkeys/colours/DarkGreen:#004000 b/.xbindkeys/colours/DarkGreen:#004000
new file mode 100755 (executable)
index 0000000..abe73a9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Script to send keystrokes to urxvt to set foreground or background colours.
+# Usage: $SOME_PATH/<fgbg>/<colour>
+# Notes: fgbg should be 39 (foreground) or 49 (background).
+#        colour should be a colour name or a hex code or a string name:#hex
+#        Create a hardlink to the script with the name of a new colour.
+# Example: 39/Blue
+#          49/#2569d9
+#          49/CacheLogic:#2569d9
+#
+
+# Find the type by checking which dir we're in and extracting the 39/49 part.
+dir=$(dirname $0)
+fgbg=$(basename $dir)
+
+# Find the desired colour by looking at this script's name.
+colour=$(basename $0)
+colour=${colour#*:}
+
+cat << EOF | xmacroplay $DISPLAY &>/dev/null
+KeyStr Escape
+String iecho -e '\033]$fgbg;$colour\007'
+KeyStr Return
+EOF
diff --git a/.xbindkeys/colours/DarkPurple:#604060 b/.xbindkeys/colours/DarkPurple:#604060
new file mode 100755 (executable)
index 0000000..abe73a9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Script to send keystrokes to urxvt to set foreground or background colours.
+# Usage: $SOME_PATH/<fgbg>/<colour>
+# Notes: fgbg should be 39 (foreground) or 49 (background).
+#        colour should be a colour name or a hex code or a string name:#hex
+#        Create a hardlink to the script with the name of a new colour.
+# Example: 39/Blue
+#          49/#2569d9
+#          49/CacheLogic:#2569d9
+#
+
+# Find the type by checking which dir we're in and extracting the 39/49 part.
+dir=$(dirname $0)
+fgbg=$(basename $dir)
+
+# Find the desired colour by looking at this script's name.
+colour=$(basename $0)
+colour=${colour#*:}
+
+cat << EOF | xmacroplay $DISPLAY &>/dev/null
+KeyStr Escape
+String iecho -e '\033]$fgbg;$colour\007'
+KeyStr Return
+EOF
diff --git a/.xbindkeys/colours/DarkRed b/.xbindkeys/colours/DarkRed
new file mode 100755 (executable)
index 0000000..abe73a9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Script to send keystrokes to urxvt to set foreground or background colours.
+# Usage: $SOME_PATH/<fgbg>/<colour>
+# Notes: fgbg should be 39 (foreground) or 49 (background).
+#        colour should be a colour name or a hex code or a string name:#hex
+#        Create a hardlink to the script with the name of a new colour.
+# Example: 39/Blue
+#          49/#2569d9
+#          49/CacheLogic:#2569d9
+#
+
+# Find the type by checking which dir we're in and extracting the 39/49 part.
+dir=$(dirname $0)
+fgbg=$(basename $dir)
+
+# Find the desired colour by looking at this script's name.
+colour=$(basename $0)
+colour=${colour#*:}
+
+cat << EOF | xmacroplay $DISPLAY &>/dev/null
+KeyStr Escape
+String iecho -e '\033]$fgbg;$colour\007'
+KeyStr Return
+EOF
diff --git a/.xbindkeys/colours/DarkRed:#400000 b/.xbindkeys/colours/DarkRed:#400000
new file mode 100755 (executable)
index 0000000..abe73a9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Script to send keystrokes to urxvt to set foreground or background colours.
+# Usage: $SOME_PATH/<fgbg>/<colour>
+# Notes: fgbg should be 39 (foreground) or 49 (background).
+#        colour should be a colour name or a hex code or a string name:#hex
+#        Create a hardlink to the script with the name of a new colour.
+# Example: 39/Blue
+#          49/#2569d9
+#          49/CacheLogic:#2569d9
+#
+
+# Find the type by checking which dir we're in and extracting the 39/49 part.
+dir=$(dirname $0)
+fgbg=$(basename $dir)
+
+# Find the desired colour by looking at this script's name.
+colour=$(basename $0)
+colour=${colour#*:}
+
+cat << EOF | xmacroplay $DISPLAY &>/dev/null
+KeyStr Escape
+String iecho -e '\033]$fgbg;$colour\007'
+KeyStr Return
+EOF
diff --git a/.xbindkeys/colours/Green b/.xbindkeys/colours/Green
new file mode 100755 (executable)
index 0000000..abe73a9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Script to send keystrokes to urxvt to set foreground or background colours.
+# Usage: $SOME_PATH/<fgbg>/<colour>
+# Notes: fgbg should be 39 (foreground) or 49 (background).
+#        colour should be a colour name or a hex code or a string name:#hex
+#        Create a hardlink to the script with the name of a new colour.
+# Example: 39/Blue
+#          49/#2569d9
+#          49/CacheLogic:#2569d9
+#
+
+# Find the type by checking which dir we're in and extracting the 39/49 part.
+dir=$(dirname $0)
+fgbg=$(basename $dir)
+
+# Find the desired colour by looking at this script's name.
+colour=$(basename $0)
+colour=${colour#*:}
+
+cat << EOF | xmacroplay $DISPLAY &>/dev/null
+KeyStr Escape
+String iecho -e '\033]$fgbg;$colour\007'
+KeyStr Return
+EOF
diff --git a/.xbindkeys/colours/Grey b/.xbindkeys/colours/Grey
new file mode 100755 (executable)
index 0000000..abe73a9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Script to send keystrokes to urxvt to set foreground or background colours.
+# Usage: $SOME_PATH/<fgbg>/<colour>
+# Notes: fgbg should be 39 (foreground) or 49 (background).
+#        colour should be a colour name or a hex code or a string name:#hex
+#        Create a hardlink to the script with the name of a new colour.
+# Example: 39/Blue
+#          49/#2569d9
+#          49/CacheLogic:#2569d9
+#
+
+# Find the type by checking which dir we're in and extracting the 39/49 part.
+dir=$(dirname $0)
+fgbg=$(basename $dir)
+
+# Find the desired colour by looking at this script's name.
+colour=$(basename $0)
+colour=${colour#*:}
+
+cat << EOF | xmacroplay $DISPLAY &>/dev/null
+KeyStr Escape
+String iecho -e '\033]$fgbg;$colour\007'
+KeyStr Return
+EOF
diff --git a/.xbindkeys/colours/Orange b/.xbindkeys/colours/Orange
new file mode 100755 (executable)
index 0000000..abe73a9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Script to send keystrokes to urxvt to set foreground or background colours.
+# Usage: $SOME_PATH/<fgbg>/<colour>
+# Notes: fgbg should be 39 (foreground) or 49 (background).
+#        colour should be a colour name or a hex code or a string name:#hex
+#        Create a hardlink to the script with the name of a new colour.
+# Example: 39/Blue
+#          49/#2569d9
+#          49/CacheLogic:#2569d9
+#
+
+# Find the type by checking which dir we're in and extracting the 39/49 part.
+dir=$(dirname $0)
+fgbg=$(basename $dir)
+
+# Find the desired colour by looking at this script's name.
+colour=$(basename $0)
+colour=${colour#*:}
+
+cat << EOF | xmacroplay $DISPLAY &>/dev/null
+KeyStr Escape
+String iecho -e '\033]$fgbg;$colour\007'
+KeyStr Return
+EOF
diff --git a/.xbindkeys/colours/Purple b/.xbindkeys/colours/Purple
new file mode 100755 (executable)
index 0000000..abe73a9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Script to send keystrokes to urxvt to set foreground or background colours.
+# Usage: $SOME_PATH/<fgbg>/<colour>
+# Notes: fgbg should be 39 (foreground) or 49 (background).
+#        colour should be a colour name or a hex code or a string name:#hex
+#        Create a hardlink to the script with the name of a new colour.
+# Example: 39/Blue
+#          49/#2569d9
+#          49/CacheLogic:#2569d9
+#
+
+# Find the type by checking which dir we're in and extracting the 39/49 part.
+dir=$(dirname $0)
+fgbg=$(basename $dir)
+
+# Find the desired colour by looking at this script's name.
+colour=$(basename $0)
+colour=${colour#*:}
+
+cat << EOF | xmacroplay $DISPLAY &>/dev/null
+KeyStr Escape
+String iecho -e '\033]$fgbg;$colour\007'
+KeyStr Return
+EOF
diff --git a/.xbindkeys/colours/Red b/.xbindkeys/colours/Red
new file mode 100755 (executable)
index 0000000..abe73a9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Script to send keystrokes to urxvt to set foreground or background colours.
+# Usage: $SOME_PATH/<fgbg>/<colour>
+# Notes: fgbg should be 39 (foreground) or 49 (background).
+#        colour should be a colour name or a hex code or a string name:#hex
+#        Create a hardlink to the script with the name of a new colour.
+# Example: 39/Blue
+#          49/#2569d9
+#          49/CacheLogic:#2569d9
+#
+
+# Find the type by checking which dir we're in and extracting the 39/49 part.
+dir=$(dirname $0)
+fgbg=$(basename $dir)
+
+# Find the desired colour by looking at this script's name.
+colour=$(basename $0)
+colour=${colour#*:}
+
+cat << EOF | xmacroplay $DISPLAY &>/dev/null
+KeyStr Escape
+String iecho -e '\033]$fgbg;$colour\007'
+KeyStr Return
+EOF
diff --git a/.xbindkeys/colours/Vim:#000040 b/.xbindkeys/colours/Vim:#000040
new file mode 100755 (executable)
index 0000000..abe73a9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Script to send keystrokes to urxvt to set foreground or background colours.
+# Usage: $SOME_PATH/<fgbg>/<colour>
+# Notes: fgbg should be 39 (foreground) or 49 (background).
+#        colour should be a colour name or a hex code or a string name:#hex
+#        Create a hardlink to the script with the name of a new colour.
+# Example: 39/Blue
+#          49/#2569d9
+#          49/CacheLogic:#2569d9
+#
+
+# Find the type by checking which dir we're in and extracting the 39/49 part.
+dir=$(dirname $0)
+fgbg=$(basename $dir)
+
+# Find the desired colour by looking at this script's name.
+colour=$(basename $0)
+colour=${colour#*:}
+
+cat << EOF | xmacroplay $DISPLAY &>/dev/null
+KeyStr Escape
+String iecho -e '\033]$fgbg;$colour\007'
+KeyStr Return
+EOF
diff --git a/.xbindkeys/colours/White b/.xbindkeys/colours/White
new file mode 100755 (executable)
index 0000000..abe73a9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Script to send keystrokes to urxvt to set foreground or background colours.
+# Usage: $SOME_PATH/<fgbg>/<colour>
+# Notes: fgbg should be 39 (foreground) or 49 (background).
+#        colour should be a colour name or a hex code or a string name:#hex
+#        Create a hardlink to the script with the name of a new colour.
+# Example: 39/Blue
+#          49/#2569d9
+#          49/CacheLogic:#2569d9
+#
+
+# Find the type by checking which dir we're in and extracting the 39/49 part.
+dir=$(dirname $0)
+fgbg=$(basename $dir)
+
+# Find the desired colour by looking at this script's name.
+colour=$(basename $0)
+colour=${colour#*:}
+
+cat << EOF | xmacroplay $DISPLAY &>/dev/null
+KeyStr Escape
+String iecho -e '\033]$fgbg;$colour\007'
+KeyStr Return
+EOF
diff --git a/.xbindkeys/leftclick b/.xbindkeys/leftclick
new file mode 100644 (file)
index 0000000..4dcc39e
--- /dev/null
@@ -0,0 +1,2 @@
+ButtonPress 1
+ButtonRelease 1
diff --git a/.xbindkeys/lock b/.xbindkeys/lock
new file mode 100755 (executable)
index 0000000..835eb23
--- /dev/null
@@ -0,0 +1 @@
+xscreensaver-command -lock
diff --git a/.xbindkeys/title b/.xbindkeys/title
new file mode 100755 (executable)
index 0000000..0e56507
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+cat << EOF | xmacroplay $DISPLAY &>/dev/null
+KeyStr Escape
+String iecho -e '\033]2;${1+"$@"}\007'
+KeyStr Return
+EOF
diff --git a/.xbindkeysrc b/.xbindkeysrc
new file mode 100644 (file)
index 0000000..ffc93c2
--- /dev/null
@@ -0,0 +1,4 @@
+# "Focus window under cursor"
+# Mod4 and Return => Send click at current pointer location.
+"xmacroplay $DISPLAY < ~/.xbindkeys/leftclick"
+  mod4 + Return
diff --git a/lensort b/lensort
new file mode 100755 (executable)
index 0000000..cb1fd7a
--- /dev/null
+++ b/lensort
@@ -0,0 +1,13 @@
+#!/bin/bash
+#
+# $Id$
+#
+
+if [ "$1" = "-r" ]; then
+  shift
+  sort_opts="-r"
+fi
+
+awk 'BEGIN { FS=RS }; { print length, $0 }' ${1+"$@"} |
+sort -n $sort_opts |
+sed 's/^[0-9][0-9]* //'
diff --git a/sshcolourterm b/sshcolourterm
new file mode 100755 (executable)
index 0000000..02ae9e1
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/bash
+#
+# $Id$
+#
+
+SSHCOLOURS=~/.ssh/colours
+
+fqdn=${1##*@}
+colour=
+
+# Get colour by regex.
+for path in $(ls "$SSHCOLOURS" | lensort -r); do
+  re=${path##*/}
+  echo "$fqdn" | grep -qs "$re" || continue
+  colour=$(readlink "$SSHCOLOURS/$path")
+  break
+done
+
+if [ ! -z "$colour" ]; then
+  colour=${colour##*/}
+  colour=${colour##*:}
+  echo -e "\033]49;$colour\007"
+  clear
+fi
+
+exec ${SSHTERM_SSH:-ssh} ${1+"$@"}
diff --git a/sshterm b/sshterm
new file mode 100755 (executable)
index 0000000..3e9f734
--- /dev/null
+++ b/sshterm
@@ -0,0 +1,7 @@
+#!/bin/bash
+#
+# $Id$
+#
+
+${SSHTERM:-xterm} ${SSHTERM_TITLE:--title} "$1" ${SSHTERM_EXEC:--e} \
+sshcolourterm ${1+"$@"}
diff --git a/usize b/usize
new file mode 100755 (executable)
index 0000000..6a806ab
--- /dev/null
+++ b/usize
@@ -0,0 +1,10 @@
+#!/bin/bash
+#
+# $Id$
+#
+
+if [ $# -lt 2 ]; then
+  echo "Usage: usize <width> <height>"
+  exit 1
+fi
+echo -e "\e[8;$2;$1;t"