Add import-env to repo
This commit is contained in:
parent
283d26d831
commit
2de8087c3e
6
import-env.zsh
Normal file
6
import-env.zsh
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
import-env() {
|
||||||
|
SOURCE_PROCESS=$1
|
||||||
|
SOURCE_PID=$(pgrep $SOURCE_PROCESS | head -n 1)
|
||||||
|
SOURCE_ENV=("${(@ps:\000:)$(</proc/${SOURCE_PID}/environ)}")
|
||||||
|
export ${SOURCE_ENV[@]:#}
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
source import-env.zsh
|
source ${0:a:h:h}/import-env.zsh
|
||||||
import-env awesome
|
import-env awesome
|
||||||
exec picom
|
exec picom
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
source import-env.zsh
|
source ${0:a:h:h}/import-env.zsh
|
||||||
import-env awesome
|
import-env awesome
|
||||||
exec xss-lock -l -- xsecurelock-wrapper 2>&1
|
exec xss-lock -l -- xsecurelock-wrapper 2>&1
|
||||||
|
|
Loading…
Reference in a new issue