diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-02-27 20:12:38 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-02-27 20:12:38 -0500 |
commit | 4e802e740bb2f7c6891271d3eaab39768360e261 (patch) | |
tree | 52cd247d9ffabab2f5cfb9f7821fbafbb27678f7 /.config/wmii-hg/config.sh | |
parent | bd42aa1b31e2e41cac7ac2ffa6edc05e04354815 (diff) | |
parent | d09fa8687ee01dcb4ef540deb106b8531f56b403 (diff) |
Merge branch 'master' into build64-par/master
Diffstat (limited to '.config/wmii-hg/config.sh')
-rw-r--r-- | .config/wmii-hg/config.sh | 13 |
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 |