X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=.xbindkeys%2Fcolours%2FBirmingham%3A%23220044;fp=.xbindkeys%2Fcolours%2FBirmingham%3A%23220044;h=abe73a98c7c3244b4fe19cdf54be7223c8c65979;hb=ccd9a2392417e22f770ba7d7eec7cfc5d997a799;hp=0000000000000000000000000000000000000000;hpb=06fddc543253f8144360348b13ee49a8a3564082;p=profile.git diff --git a/.xbindkeys/colours/Birmingham:#220044 b/.xbindkeys/colours/Birmingham:#220044 new file mode 100755 index 0000000..abe73a9 --- /dev/null +++ b/.xbindkeys/colours/Birmingham:#220044 @@ -0,0 +1,25 @@ +#!/bin/bash +# +# Script to send keystrokes to urxvt to set foreground or background colours. +# Usage: $SOME_PATH// +# 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