summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-02-02 12:51:54 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-02-02 12:51:54 -0500
commit3a22183b721e08d0ef9b186ca13df1e05f0c2bc6 (patch)
tree0a46dc6f7ef3d461fed58848b431d3a0b5c0a7b1
parent874368760f5511ff24b44759acc07f3060b9f793 (diff)
parentc044c568a8c6aa80b4ea52312baaa8fb8f34342f (diff)
Merge branch 'master' into gluglugt60-par/master
-rwxr-xr-x.config/X11/clientrc2
-rw-r--r--.config/redshift.conf2
-rw-r--r--.config/systemd/user/wmii@.service2
-rw-r--r--.config/wmii-hg/config.sh4
-rw-r--r--.config/wmii-hg/rbar.sh4
-rwxr-xr-x.config/wmii-hg/rbar_wifi26
6 files changed, 32 insertions, 8 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/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
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"
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
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"