From 69e32828189339c1c8a08fdebd29d0a3d15ab681 Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Mon, 1 Jul 2013 14:45:54 +0100 Subject: [PATCH] Semi-transparent border. Set urxvt's borderColor to match its background. --- .Xdefaults | 2 +- opt/bin/sshcolourterm | 2 +- opt/bin/ucolour | 12 ++++++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.Xdefaults b/.Xdefaults index 227f66e..686b18f 100644 --- a/.Xdefaults +++ b/.Xdefaults @@ -30,7 +30,7 @@ urxvt.foreground: white urxvt.background: [70]black urxvt.highlightColor: [90]#8080ff urxvt.depth: 32 -urxvt.borderColor: black +urxvt.borderColor: [70]black urxvt.scrollBar_right: True urxvt.font: xft:DejaVu Sans Mono:pixelsize=12,xft:AR PL Uming HK urxvt.multichar_encoding: noenc diff --git a/opt/bin/sshcolourterm b/opt/bin/sshcolourterm index e143a75..82ecf58 100755 --- a/opt/bin/sshcolourterm +++ b/opt/bin/sshcolourterm @@ -39,6 +39,6 @@ if [ ! -z "$colour" ]; then colour=${colour##*:} fi -[ -n "$colour" ] && colour="-bg $colour" +[ -n "$colour" ] && colour="-bg $colour -bd $colour" exec ${SSHTERM:-xterm} ${SSHTERM_TITLE:--title} "$title" \ $colour ${SSHTERM_EXEC:--e} ${SSHTERM_SSH:-ssh} ${1+"$@"} diff --git a/opt/bin/ucolour b/opt/bin/ucolour index 796afda..a3d0600 100755 --- a/opt/bin/ucolour +++ b/opt/bin/ucolour @@ -6,38 +6,45 @@ # Options: -b Set background. # -B Set highlight background. # -c Set cursor. +# -d Set border. # -f Set foreground. # -F Set highlight foreground. # -m Set mouse. +# Notes: Border defaults to background. # BG= FG= bg= +bd= fg= cu= mo= tmux_prefix= -while getopts ":B:F:b:c:f:m:" opt; do +while getopts ":B:F:b:c:d:f:m:" opt; do case $opt in B) BG=$OPTARG;; F) FG=$OPTARG;; b) bg=$OPTARG;; c) cu=$OPTARG;; + d) bd=$OPTARG;; f) fg=$OPTARG;; m) mo=$OPTARG;; esac done shift $((OPTIND-1)) -if [ -z "$BG$FG$bg$cu$fg$mo" ]; then +[ -n "$bg" -a -z "$bd" ] && bd=$bg +if [ -z "$BG$FG$bd$bg$cu$fg$mo" ]; then echo >&2 "Usage: ucolour option [option ...]" echo >&2 "Options: -b Set background." echo >&2 " -B Set highlight background." echo >&2 " -c Set cursor." + echo >&2 " -d Set border." echo >&2 " -f Set foreground." echo >&2 " -F Set highlight foreground." echo >&2 " -m Set mouse." + echo >&2 "Notes: Border defaults to background." exit 1 fi @@ -45,6 +52,7 @@ fi [ -n "$BG" ] && echo -en "$tmux_prefix\033]17;$BG\007" [ -n "$FG" ] && echo -en "$tmux_prefix\033]19;$FG\007" [ -n "$bg" ] && echo -en "$tmux_prefix\033]11;$bg\007" +[ -n "$bd" ] && echo -en "$tmux_prefix\033]708;$bd\007" [ -n "$cu" ] && echo -en "$tmux_prefix\033]12;$cu\007" [ -n "$fg" ] && echo -en "$tmux_prefix\033]10;$fg\007" [ -n "$mo" ] && echo -en "$tmux_prefix\033]13;$mo\007" -- 2.7.4