From fe1fa83844111b3fcc49513e19304aab6ce89a78 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 14 Sep 2016 12:52:05 -0400 Subject: bash: have wdiff and chardiff obey colordiffrc --- .config/bash/rc.d/10_aliases.sh | 42 +++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/.config/bash/rc.d/10_aliases.sh b/.config/bash/rc.d/10_aliases.sh index da214e9..2e28a5d 100644 --- a/.config/bash/rc.d/10_aliases.sh +++ b/.config/bash/rc.d/10_aliases.sh @@ -22,15 +22,20 @@ if [ -x "`which dircolors`" ]; then wdiff() { if [[ -t 1 ]]; then - local red="$(tput setaf 1)" - local blue="$(tput setaf 4)" - local bold="$(tput bold)" - local reset="$(tput sgr0)" + local old new off + if type colordiff &>/dev/null; then + eval "$(colordiff <(echo old) <(echo new)|sed -rn 's@(.*)[<>] (old|new)(.*)@\2='\''\1'\''\noff='\''\3'\''\n@p')" + else + new="$(tput setaf 2)" + old="$(tput setaf 1)" + off="$(tput sgr0)" + fi command wdiff \ - -w "$bold$red[-" \ - -x "-]$reset" \ - -y "$bold$blue{+" \ - -z "+}$reset" "$@" + -w "$old[-" \ + -x "-]$off" \ + -y "$new{+" \ + -z "+}$off" \ + "$@" else command wdiff "$@" fi @@ -38,15 +43,20 @@ if [ -x "`which dircolors`" ]; then chardiff() { if [[ -t 1 ]]; then - local red="$(tput setaf 1)" - local blue="$(tput setaf 4)" - local bold="$(tput bold)" - local reset="$(tput sgr0)" + local old new off + if type colordiff &>/dev/null; then + eval "$(colordiff <(echo old) <(echo new)|sed -rn 's@(.*)[<>] (old|new)(.*)@\2='\''\1'\''\noff='\''\3'\''\n@p')" + else + new="$(tput setaf 2)" + old="$(tput setaf 1)" + off="$(tput sgr0)" + fi command chardiff \ - -w "$bold$red[-" \ - -x "-]$reset" \ - -y "$bold$blue{+" \ - -z "+}$reset" "$@" + -w "$old[-" \ + -x "-]$off" \ + -y "$new{+" \ + -z "+}$off" \ + "$@" else command chardiff "$@" fi -- cgit v1.1-4-g5e80 From 659154f49be4df733639a9c7f0687a03e18c48c3 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 14 Sep 2016 12:52:43 -0400 Subject: ssh: my hosts --- .config/ssh/config | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.config/ssh/config b/.config/ssh/config index 61f4862..9dbf510 100644 --- a/.config/ssh/config +++ b/.config/ssh/config @@ -23,18 +23,19 @@ Host parabola.nu *.parabola.nu Host lukeshu.com Port 1863 User lukeshu +Host ssl.lukeshu.com + User lukeshu + ProxyCommand proxytunnel --proxy=lukeshu.com:8443 --proxyauth=frc4272:password --encrypt-proxy --dest=lukeshu.com:1863 Match host build64-par exec "nslookup %n.lan." HostName build64-par Port 22 - ForwardX11 yes - ForwardX11Trusted yes Host build64-par User luke HostName lukeshu.com Port 1864 - ForwardX11 no - ForwardX11Trusted no + ForwardX11 yes + ForwardX11Trusted yes Host 192.168.*.1 10.* StrictHostKeyChecking no -- cgit v1.1-4-g5e80 From 9f960375876b6857be02d53fce188b099c34991c Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 14 Sep 2016 12:53:46 -0400 Subject: systemd: use %t in ExecStart --- .config/systemd/user/xresources-dpi@.service | 2 +- .config/systemd/user/xresources@.service | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/systemd/user/xresources-dpi@.service b/.config/systemd/user/xresources-dpi@.service index 51bb1d5..a112825 100644 --- a/.config/systemd/user/xresources-dpi@.service +++ b/.config/systemd/user/xresources-dpi@.service @@ -8,7 +8,7 @@ Requisite=X11@%i.target Environment=DISPLAY=%I Type=oneshot -ExecStart=/usr/bin/env flock ${XDG_RUNTIME_DIR}/x11-xrdb@%I -c xrdb-set-dpi +ExecStart=/usr/bin/env flock %t/x11-xrdb@%I -c xrdb-set-dpi [Install] WantedBy=X11@%i.target diff --git a/.config/systemd/user/xresources@.service b/.config/systemd/user/xresources@.service index 3d723c6..83e4523 100644 --- a/.config/systemd/user/xresources@.service +++ b/.config/systemd/user/xresources@.service @@ -8,7 +8,7 @@ Requisite=X11@%i.target Environment=DISPLAY=%I Type=oneshot -ExecStart=/usr/bin/env flock ${XDG_RUNTIME_DIR}/x11-xrdb@%I -c 'xrdb -merge ${XDG_CONFIG_HOME}/X11/resources' +ExecStart=/usr/bin/env flock %t/x11-xrdb@%I -c 'xrdb -merge ${XDG_CONFIG_HOME}/X11/resources' [Install] WantedBy=X11@%i.target -- cgit v1.1-4-g5e80 From 080d369c9f8c22b27d9107dfd0344743f4b3fb6f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 14 Sep 2016 12:54:32 -0400 Subject: wmii: add a ToggleFloat option to the window bar menu --- .config/wmii-hg/config.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index ade2dfe..1b48cc4 100644 --- a/.config/wmii-hg/config.sh +++ b/.config/wmii-hg/config.sh @@ -123,11 +123,13 @@ Event() { 2) ;; 3) { - case $(wmii9menu Delete Fullscreen) in + case $(wmii9menu Delete Fullscreen ToggleFloat) in Delete) echo kill >> $WMII_DIR/client/$client/ctl;; Fullscreen) - echo Fullscreen on >> $WMII_DIR/client/$1/ctl;; + echo Fullscreen on >> $WMII_DIR/client/$client/ctl;; + ToggleFloat) + echo send $client toggle >> $WMII_DIR/tag/sel/ctl;; esac }& ;; 4) ;; -- cgit v1.1-4-g5e80