summaryrefslogtreecommitdiff
path: root/.config/wmii-hg
diff options
context:
space:
mode:
Diffstat (limited to '.config/wmii-hg')
-rw-r--r--.config/wmii-hg/config.sh16
1 files changed, 10 insertions, 6 deletions
diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh
index 967d5de..ca32e1a 100644
--- a/.config/wmii-hg/config.sh
+++ b/.config/wmii-hg/config.sh
@@ -12,6 +12,10 @@ mkdir -p -- "${HIST%/*}"
# Colors tuples: "<text> <background> <border>"
. theme-abyss
+log() {
+ echo "wmiirc[$$]: $*"
+}
+
Event() {
local event=$1; shift;
case "$event" in
@@ -30,7 +34,7 @@ Event() {
## Custom (non-WMII-generated) events
WmiircStart) ## No args
- echo ' ==> Starting wmiirc'
+ log " ==> Starting wmiirc[$$]"
is_mounted $WMII_DIR && Event WmiircUnmount
Event WmiircMount
@@ -53,18 +57,18 @@ Event() {
;;
WmiircQuit) ## No args
trap - EXIT
- echo ' ==> Stopping wmiirc'
+ log " ==> Stopping wmiirc[$$]"
exit;;
WmiircMount) ## No args
- echo " -> Creating mountpoint WMII_DIR=$WMII_DIR..."
+ log " -> Creating mountpoint WMII_DIR=$WMII_DIR..."
mkdir -p "$WMII_DIR"
- echo " -> Mounting WMII_DIR=$WMII_DIR..."
+ log " -> Mounting WMII_DIR=$WMII_DIR..."
mount.9p "$WMII_ADDRESS" "$WMII_DIR"
;;
WmiircUnmount) ## No args
- echo " -> Unmounting WMII_DIR=$WMII_DIR..."
+ log " -> Unmounting WMII_DIR=$WMII_DIR..."
umount.9p "$WMII_DIR"
- echo " -> Removing mountpoint WMII_DIR=$WMII_DIR..."
+ log " -> Removing mountpoint WMII_DIR=$WMII_DIR..."
rmdir -p "$WMII_DIR" 2>/dev/null;;
## WMII-meta events
Quit) ## No args