summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
Diffstat (limited to '.config')
-rw-r--r--.config/wmii-hg/config.sh22
1 files changed, 19 insertions, 3 deletions
diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh
index 19cebca..ade2dfe 100644
--- a/.config/wmii-hg/config.sh
+++ b/.config/wmii-hg/config.sh
@@ -12,6 +12,23 @@ mkdir -p -- "${HIST%/*}"
# Colors tuples: "<text> <background> <border>"
. theme-tango-dark
+if [[ "$(uname -m)" = i686 ]]; then
+ mount.9p() {
+ 9pfuse "$1" "$2"
+ while ! [[ -f "$2/event" ]]; do :; done
+ }
+ umount.9p() {
+ fusermount -u "$1"
+ }
+else
+ mount.9p() {
+ 9mount -i "$1" "$2"
+ }
+ umount.9p() {
+ 9umount "$1"
+ }
+fi
+
Event() {
local event=$1; shift;
case "$event" in
@@ -59,12 +76,11 @@ Event() {
echo " -> Creating mountpoint WMII_DIR=$WMII_DIR..."
mkdir -p "$WMII_DIR"
echo " -> Mounting WMII_DIR=$WMII_DIR..."
- 9pfuse "$WMII_ADDRESS" "$WMII_DIR"
- while ! [[ -f "$WMII_DIR/event" ]]; do :; done
+ mount.9p "$WMII_ADDRESS" "$WMII_DIR"
;;
WmiircUnmount) ## No args
echo " -> Unmounting WMII_DIR=$WMII_DIR..."
- fusermount -u "$WMII_DIR"
+ umount.9p "$WMII_DIR"
echo " -> Removing mountpoint WMII_DIR=$WMII_DIR..."
rmdir -p "$WMII_DIR" 2>/dev/null;;
## WMII-meta events