Merge branch 'main' of git.zander.im:Zander671/random-scripts
This commit is contained in:
commit
2dcc8b409f
@ -88,8 +88,9 @@ done
|
|||||||
(( "${OPTIND}" > ${#} )) && print_help "${0}"
|
(( "${OPTIND}" > ${#} )) && print_help "${0}"
|
||||||
shift $(( "${OPTIND}" - 1))
|
shift $(( "${OPTIND}" - 1))
|
||||||
|
|
||||||
{
|
function {
|
||||||
set -e
|
emulate -L zsh
|
||||||
|
setopt errexit
|
||||||
[[ -v window_manager ]] ||
|
[[ -v window_manager ]] ||
|
||||||
window_manager='openbox'
|
window_manager='openbox'
|
||||||
[[ -v current_desktop ]] ||
|
[[ -v current_desktop ]] ||
|
||||||
@ -118,8 +119,14 @@ cat <&p >&2
|
|||||||
let cat_pid="${!}"
|
let cat_pid="${!}"
|
||||||
|
|
||||||
sh -c "exec -- ${window_manager}" &
|
sh -c "exec -- ${window_manager}" &
|
||||||
|
function {
|
||||||
sh -c "exec -- ${@}"
|
emulate -L sh
|
||||||
|
eval "${@}"
|
||||||
|
} "${@}"
|
||||||
|
let child_error_code="${?}"
|
||||||
|
if (( ${child_error_code} )); then
|
||||||
|
printf 'Child exited with error code %d\n' "${child_error_code}"
|
||||||
|
fi
|
||||||
trap -
|
trap -
|
||||||
kill %sh %Xwayland
|
kill %sh %Xwayland
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user