From 06a6ba98a8b15ba7d057945cd38d23eeb8746cdd Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 13:02:39 -0500 Subject: .local/bin/xmessage: quote $@ --- .local/bin/xmessage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/xmessage b/.local/bin/xmessage index 08fd95e..46647e0 100755 --- a/.local/bin/xmessage +++ b/.local/bin/xmessage @@ -1,2 +1,2 @@ #!/bin/sh -exec gxmessage $@ -fn 'Monospace' +exec gxmessage "$@" -fn 'Monospace' -- cgit v1.2.3-54-g00ecf From b17bbf2b8efc093b27f5db13b80b01558d8a486b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 31 Jan 2015 14:39:18 -0500 Subject: wmii: button IDs 4 and 5 are the scroll wheel --- .config/wmii-hg/config.sh | 4 ++++ .config/wmii-hg/rbar.sh | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index be75d65..ad4d2fe 100644 --- a/.config/wmii-hg/config.sh +++ b/.config/wmii-hg/config.sh @@ -25,6 +25,8 @@ Event() { ## 1 = left ## 2 = middle ## 3 = right + ## 4 = scroll up + ## 5 = scroll down ## Custom (non-WMII-generated) events WmiircStart) ## No args @@ -109,6 +111,8 @@ Event() { echo Fullscreen on >> $WMII_DIR/client/$1/ctl;; esac }& ;; + 4) ;; + 5) ;; esac;; ClientClick) ## $1=client $2=button ;; diff --git a/.config/wmii-hg/rbar.sh b/.config/wmii-hg/rbar.sh index 8297b71..4f6faf1 100644 --- a/.config/wmii-hg/rbar.sh +++ b/.config/wmii-hg/rbar.sh @@ -14,5 +14,7 @@ case "$1" in 1) left-click;; 2) middle-click;; 3) right-click;; - *) update "$1";; + 4) scroll-up;; + 5) scroll-down;; + [0-9][0-9]_*) update "$1";; esac -- cgit v1.2.3-54-g00ecf From 98b992702f05cf652ec9417d10e248ed9de1ce80 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 31 Jan 2015 14:39:53 -0500 Subject: wmii: rbar_wifi: add more options --- .config/wmii-hg/rbar_wifi | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/.config/wmii-hg/rbar_wifi b/.config/wmii-hg/rbar_wifi index 63dc653..195df7c 100755 --- a/.config/wmii-hg/rbar_wifi +++ b/.config/wmii-hg/rbar_wifi @@ -29,7 +29,7 @@ right-click() { IFS='' while read -r line; do list+=("$line") - done < <(netctl-auto list | sed 's,$,$,' | column -s '$' -t) + done < <({ netctl-auto list; printf '> %s\n' 'New Network' 'Disable All' 'Enable All';} | sed 's,$,$,' | column -s '$' -t) cur='' for item in "${list[@]}"; do @@ -39,9 +39,27 @@ right-click() { done item=$(wmii9menu -i "$cur" "${list[@]}") - if [[ -n $item ]] && [[ "$item" != '* '* ]]; then - netctl-auto switch-to "$item" - fi + case "$item" in + '') + # Nothing selected + ;; + '* '*) + # Already selected; do nothing + ;; + '> New Network'*) + urxvt +sb -title wifi-menu -e sudo wifi-menu + ;; + '> Disable All'*) + sudo netctl-auto disable-all + ;; + '> Enable All'*) + sudo netctl-auto enable-all + ;; + *) + # NB: do NOT quote $item; we need to strip whitespace + sudo netctl-auto switch-to $item + ;; + esac } . "$(dirname "$0")/rbar.sh" -- cgit v1.2.3-54-g00ecf From 28be8fb283a3f56521a8c8d98553ceae17513599 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 2 Feb 2015 12:45:12 -0500 Subject: window manager: do better error handling round my semaphore --- .config/X11/clientrc | 2 +- .config/systemd/user/wmii@.service | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/X11/clientrc b/.config/X11/clientrc index d18d714..cbcf07a 100755 --- a/.config/X11/clientrc +++ b/.config/X11/clientrc @@ -21,5 +21,5 @@ fi wm=wmii systemctl --user start "${wm}@${DISPLAY}.service" mkfifo "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}" +trap "rm $(printf %q "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}")" EXIT cat "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}" >/dev/null -rm "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}" diff --git a/.config/systemd/user/wmii@.service b/.config/systemd/user/wmii@.service index 10fc4e9..12f585b 100644 --- a/.config/systemd/user/wmii@.service +++ b/.config/systemd/user/wmii@.service @@ -9,4 +9,4 @@ Restart=no Environment=DISPLAY=%I ExecStart=/usr/bin/bash -l -c /usr/bin/wmii ExecStop=/usr/bin/wmiir xwrite /ctl Quit -ExecStopPost=/usr/bin/bash -c ": > ${XDG_RUNTIME_DIR}/x11-wm@%I" +ExecStopPost=/usr/bin/timeout .1 bash -c ": > ${XDG_RUNTIME_DIR}/x11-wm@%I" -- cgit v1.2.3-54-g00ecf From c044c568a8c6aa80b4ea52312baaa8fb8f34342f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 2 Feb 2015 12:45:39 -0500 Subject: redshift: slightly brighten my brightness-night --- .config/redshift.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/redshift.conf b/.config/redshift.conf index 25e731a..7f19a99 100644 --- a/.config/redshift.conf +++ b/.config/redshift.conf @@ -3,7 +3,7 @@ temp-day=6500K temp-night=6500K brightness-day=1.0 -brightness-night=0.45 +brightness-night=0.5 location-provider=manual transition=0 -- cgit v1.2.3-54-g00ecf From a41c113539cab32ccf697219ef024735bc6fd866 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 3 Feb 2015 11:01:50 -0500 Subject: systemd: wmii@: do the handshake by attaching an FD to wmii itself --- .config/X11/clientrc | 2 +- .config/systemd/user/wmii@.service | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.config/X11/clientrc b/.config/X11/clientrc index cbcf07a..9488ec8 100755 --- a/.config/X11/clientrc +++ b/.config/X11/clientrc @@ -19,7 +19,7 @@ fi #exec wmii wm=wmii -systemctl --user start "${wm}@${DISPLAY}.service" mkfifo "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}" trap "rm $(printf %q "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}")" EXIT +systemctl --user start "${wm}@${DISPLAY}.service" cat "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}" >/dev/null diff --git a/.config/systemd/user/wmii@.service b/.config/systemd/user/wmii@.service index 12f585b..3902627 100644 --- a/.config/systemd/user/wmii@.service +++ b/.config/systemd/user/wmii@.service @@ -7,6 +7,5 @@ Type=simple Restart=no Environment=DISPLAY=%I -ExecStart=/usr/bin/bash -l -c /usr/bin/wmii +ExecStart=/usr/bin/bash -l -c 'exec 8>${XDG_RUNTIME_DIR}/x11-wm@%I; exec /usr/bin/wmii' ExecStop=/usr/bin/wmiir xwrite /ctl Quit -ExecStopPost=/usr/bin/timeout .1 bash -c ": > ${XDG_RUNTIME_DIR}/x11-wm@%I" -- cgit v1.2.3-54-g00ecf From cc33e9fda72e1102346034709857fc9f704b6c19 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 3 Feb 2015 22:11:47 -0500 Subject: makepkg: enable ccache if it is available --- .config/pacman/makepkg.conf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.config/pacman/makepkg.conf b/.config/pacman/makepkg.conf index 8dc4536..8389fb5 100644 --- a/.config/pacman/makepkg.conf +++ b/.config/pacman/makepkg.conf @@ -1,3 +1,5 @@ +#!/phony/bash + PKGDEST="${LIBREHOME:-$HOME}/packages/pkgdest" SRCDEST="${LIBREHOME:-$HOME}/packages/srcdest" SRCPKGDEST="${LIBREHOME:-$HOME}/packages/srcpkgdest" @@ -6,3 +8,17 @@ LOGDEST="${LIBREHOME:-$HOME}/packages/logdest" PACKAGER="Luke Shumaker " MAKEFLAGS="-j3" + +if type ccache &>/dev/null; then + f=false + for i in "${!BUILDENV[@]}"; do + if [[ "${BUILDENV[$i]}" == '!ccache' ]]; then + BUILDENV[$i]='ccache' + f=true + fi + done + if [[ $f == false ]]; then + BUILDENV+=('ccache') + fi + unset f i +fi -- cgit v1.2.3-54-g00ecf From 5acf00ac41f711d4102d3c29e63fa705136f8f42 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 3 Feb 2015 22:12:53 -0500 Subject: bash: add dir_colors overrides --- .config/bash/aliases.sh | 3 ++- .config/dir_colors | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .config/dir_colors diff --git a/.config/bash/aliases.sh b/.config/bash/aliases.sh index fe4f2c6..4b87332 100644 --- a/.config/bash/aliases.sh +++ b/.config/bash/aliases.sh @@ -6,7 +6,8 @@ # Set up colors and settings for ls/dir/vdir # ###################################################################### if [ -x "`which dircolors`" ]; then - eval "`dircolors -b`" + eval "$(dircolors -p | cat - "${XDG_CONFIG_HOME}/dir_colors" | + dircolors -b -)" alias ls='ls -1v --color=auto' alias dir='dir -v --color=auto' alias vdir='vdir -v--color=auto' diff --git a/.config/dir_colors b/.config/dir_colors new file mode 100644 index 0000000..80484e8 --- /dev/null +++ b/.config/dir_colors @@ -0,0 +1 @@ +OTHER_WRITABLE 01;34;45 -- cgit v1.2.3-54-g00ecf From 26c23840ee5780b8444423e74607187f000a0877 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 3 Feb 2015 22:13:07 -0500 Subject: bash: fix an old typo in aliases --- .config/bash/aliases.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/bash/aliases.sh b/.config/bash/aliases.sh index 4b87332..28b9923 100644 --- a/.config/bash/aliases.sh +++ b/.config/bash/aliases.sh @@ -10,7 +10,7 @@ if [ -x "`which dircolors`" ]; then dircolors -b -)" alias ls='ls -1v --color=auto' alias dir='dir -v --color=auto' - alias vdir='vdir -v--color=auto' + alias vdir='vdir -v --color=auto' for xgrep in ${PATH//:/\/*grep }/*grep; do if [ -f "$xgrep" ]; then -- cgit v1.2.3-54-g00ecf