From 39275eb848ec838cb25b8b827b3aa6d72f30ea38 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 19 Feb 2015 16:56:42 -0500 Subject: wmii: fix stuff --- .config/wmii-hg/config.sh | 1 + 1 file changed, 1 insertion(+) (limited to '.config/wmii-hg/config.sh') diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index 64596a8..ac0a349 100644 --- a/.config/wmii-hg/config.sh +++ b/.config/wmii-hg/config.sh @@ -52,6 +52,7 @@ Event() { done < <(lstags) ;; WmiircQuit) ## No args + trap - EXIT echo ' ==> Stopping wmiirc' exit;; WmiircMount) ## No args -- cgit v1.2.3 From 2f2900213cc8157590f11dcc7988c1a3bb7dc887 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 20 Apr 2015 19:31:17 -0400 Subject: Be careful about shebangs, which shells are used, and what gets executed Use - #!/hint/bash for bash that gets sourced (non-executable) - #!/hint/sh for sh(1) that gets sourced (non-executable) - #!/bin/sh for sh(1) that gets executed - #!/usr/bin/env bash for bash that gets executed To this end, also - Clean up a couple of related comments - Fix a couple of bash-isms that I noticed in sh(1) files - Fix permissions on a couple of files that get sourced --- .config/wmii-hg/config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.config/wmii-hg/config.sh') diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index ac0a349..6846920 100644 --- a/.config/wmii-hg/config.sh +++ b/.config/wmii-hg/config.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/hint/bash MODKEY=Mod4 # "super" UP=p -- cgit v1.2.3 From 4fbcd8769a06ddb9e53b7b647c3e1416b8d9962f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 22 Apr 2015 16:21:08 -0400 Subject: wmii: Use systemd-notify instead of hitting the socket manually --- .config/wmii-hg/config.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to '.config/wmii-hg/config.sh') diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index 6846920..4b968b0 100644 --- a/.config/wmii-hg/config.sh +++ b/.config/wmii-hg/config.sh @@ -68,9 +68,7 @@ Event() { ## WMII-meta events Quit) ## No args trap - EXIT - if [ -S "$NOTIFY_SOCKET" ]; then - echo STOPPING=1 | socat STDIO UNIX-SENDTO:"$NOTIFY_SOCKET" - fi + systemd-notify STOPPING=1 || true Event WmiircUnmount Event WmiircQuit;; Warning) ## $@=string -- cgit v1.2.3