From 5d8004fd9ebc19070b608f124c293ab5b895f529 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Sat, 13 May 2023 11:36:40 +0530 Subject: [PATCH] Send GUI processes to background Use disown to keep the processs alive. Fixes https://github.com/sayanarijit/xplr/issues/616 --- docs/en/src/post-install.md | 4 +--- src/init.lua | 15 ++++----------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/docs/en/src/post-install.md b/docs/en/src/post-install.md index 84a502b..4564fc3 100644 --- a/docs/en/src/post-install.md +++ b/docs/en/src/post-install.md @@ -12,9 +12,7 @@ version="$(xplr --version | awk '{print $2}')" echo "version = '${version:?}'" > ~/.config/xplr/init.lua ``` -Then -**[copy from here][2]** -and remove / comment out what you don't want to customize. +Then **[copy from here][2]** and remove / comment out what you don't want to customize. ## Run diff --git a/src/init.lua b/src/init.lua index 256009a..8883384 100644 --- a/src/init.lua +++ b/src/init.lua @@ -1818,7 +1818,8 @@ xplr.config.modes.builtin.go_to = { fi fi (while IFS= read -r -d '' PTH; do - $OPENER "${PTH:?}" > /dev/null 2>&1 + $OPENER "${PTH:?}" > /dev/null 2>&1 & + disown done < "${XPLR_PIPE_RESULT_OUT:?}") ]===], }, @@ -2705,21 +2706,13 @@ xplr.config.modes.builtin.edit_permissions = { ["m"] = { help = "max", messages = { - { - BashExecSilently0 = [===[ - "$XPLR" -m 'SetInputBuffer: %q' "777" - ]===], - }, + { SetInputBuffer = "777" }, }, }, ["M"] = { help = "min", messages = { - { - BashExecSilently0 = [===[ - "$XPLR" -m 'SetInputBuffer: %q' "000" - ]===], - }, + { SetInputBuffer = "000" }, }, }, ["ctrl-r"] = {