summaryrefslogtreecommitdiff
path: root/.config/wmii-hg/config.sh
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-02-27 18:31:31 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-02-27 20:06:11 -0500
commit5e5e5029e76d88b3887bb175e28709a9022323a8 (patch)
treeeb77f3f626988f6592a6d51b2e08914f290b896b /.config/wmii-hg/config.sh
parentc2ee55d77f093d7a5abf8118870900b866dbba52 (diff)
X11 systemd stuff
Diffstat (limited to '.config/wmii-hg/config.sh')
-rw-r--r--.config/wmii-hg/config.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh
index 4b968b0..77d813f 100644
--- a/.config/wmii-hg/config.sh
+++ b/.config/wmii-hg/config.sh
@@ -229,9 +229,9 @@ Key() {
$MODKEY-x) ## Open program menu
local command
command="$(path_ls "$_PATH" | wimenu -h "${HIST}.progs" -n 5000)" || return
- ( PATH=$_PATH; unset _PATH NOTIFY_SOCKET; exec $command ) & ;;
+ runcmd "$command" & ;;
$MODKEY-Return) ## Launch a terminal
- ( PATH=$_PATH; unset _PATH NOTIFY_SOCKET; exec x-terminal-emulator ) & ;;
+ runcmd x-terminal-emulator & ;;
## Tag actions
$MODKEY-t) ## Change to another tag
@@ -246,6 +246,15 @@ Key() {
esac
}
+runcmd() (
+ PATH=$_PATH
+ unset NOTIFY_SOCKET # systemd
+ unset WMII_CONFPATH # wmii
+ unset _PATH WMII_NAMESPACE WMII_DIR # wmiirc
+ exec 8>&- # xinit/systemd handshake
+ exec systemd-run --user --scope -- sh -c "$*"
+)
+
Action() {
local prog=$(path_which "$WMII_CONFPATH" "$1"); shift
if [ -n "$prog" ]; then