os/arch/.xprofile: do process check for key daemons

This commit is contained in:
Henrik Lissner 2017-01-17 23:22:10 -05:00
parent aca38f9096
commit 02db41a81e

View file

@ -3,9 +3,10 @@
export __GL_THREADED_OPTIMISATIONS=1 export __GL_THREADED_OPTIMISATIONS=1
# Maybe start this daemon # Maybe start this daemon
running() { pgrep "$1" >/dev/null || "$@"; }
run() { run() {
command -v "$1" >/dev/null || return command -v "$1" >/dev/null || return
pgrep "$1" >/dev/null || $@ running "$1" || "$@"
} }
# failsafe # failsafe
@ -33,8 +34,8 @@ run compton & # perdy effects + transparency
# non-essentials # non-essentials
run mpd & # music server run mpd & # music server
run redshift & # screen temperature based on time-of-day run redshift & # screen temperature based on time-of-day
$HOME/.bin/rsl.sh # resilio sync ~/.bin/rsl.sh # resilio sync
# # key agents
ssh-agent -s | sed 's/^echo/#echo/' > ~/.ssh/agentenv running ssh-agent || { ssh-agent -s | sed 's/^echo/#echo/' \> ~/.ssh/agentenv; }
gpg-agent --daemon | sed 's/^echo/#echo/' > ~/.gnupg/agentenv running gpg-agent || { gpg-agent --daemon | sed 's/^echo/#echo/' \> ~/.gnupg/agentenv; }