Fix scripts using import env always exiting
This commit is contained in:
parent
b9b6e44f98
commit
584c900e84
|
@ -7,5 +7,5 @@ if [[ ! -e ${0:a:h}/server ]] then
|
|||
exit 1
|
||||
fi
|
||||
source ${0:a:h:h}/import-env.zsh
|
||||
import-env awesome | exit 1
|
||||
import-env awesome || exit 1
|
||||
exec barrierc --no-daemon $(<${0:a:h}/server)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/zsh
|
||||
source ${0:a:h:h}/import-env.zsh
|
||||
import-env awesome | exit 1
|
||||
import-env awesome || exit 1
|
||||
exec barriers --no-daemon -c ${XDG_CONFIG_HOME:-$HOME/.config}/Debauchee/home.conf
|
||||
|
|
|
@ -3,7 +3,10 @@ import-env() {
|
|||
SOURCE_PID=$(pgrep $source_name | head -n 1)
|
||||
if [[ -n $SOURCE_PID ]]; then break; fi
|
||||
done
|
||||
if [[ -z $SOURCE_PID ]]; then return 1; fi
|
||||
if [[ -z $SOURCE_PID ]]; then
|
||||
echo "import-env: No matching process for: $*"
|
||||
return 1;
|
||||
fi
|
||||
|
||||
SOURCE_ENV=("${(@ps:\000:)$(</proc/${SOURCE_PID}/environ)}")
|
||||
export ${SOURCE_ENV[@]:#}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/zsh
|
||||
source ${0:a:h:h}/import-env.zsh
|
||||
import-env awesome | exit 1
|
||||
source ${0:A:h:h}/import-env.zsh
|
||||
import-env awesome || exit 1
|
||||
exec picom
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/zsh
|
||||
source ${0:a:h:h}/import-env.zsh
|
||||
import-env awesome | exit 1
|
||||
import-env awesome || exit 1
|
||||
exec xss-lock -l -- xsecurelock-wrapper 2>&1
|
||||
|
|
Loading…
Reference in a new issue