dotfiles

personal dotfiles
git clone anongit@rnpnr.xyz:dotfiles.git
Log | Files | Refs | Feed | Submodules

Commit: b9acc844794748e8b35c224ab561b1c889bdf7bc
Parent: 50abf78a650d7e2299063d420171f3bf962ce3d6
Author: Randy Palamar
Date:   Thu,  2 Mar 2023 10:27:45 -0700

xinitrc: use pidof to check if commands are already running

Diffstat:
M.config/x11/xinitrc | 16++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/.config/x11/xinitrc b/.config/x11/xinitrc @@ -1,19 +1,19 @@ bgs -z ~/.config/h_wallpaper.jpg [ -z $SSH_AGENT_PID ] && eval $(ssh-agent) -[ $(pgrep gpg-agent) ] || gpg-agent --daemon +pidof -s gpg-agent || gpg-agent --daemon -[ $(pgrep mpd) ] || mpd -[ $(pgrep cron) ] || cron -f ~/.config/cron/crontab -[ $(pgrep xbanish) ] || xbanish & +pidof -s cron || cron -f ~/.config/cron/crontab -[ $(pgrep status) ] || status & -[ $(pgrep mpdidle) ] || mpdidle & - -[ -d /tmp/downloads ] || mkdir /tmp/downloads +as="mpd mpdidle status xbanish" +for cmd in $as; do + pidof -s "$cmd" || "$cmd" & +done >/dev/null 2>&1 xset s off -dpms +[ -d /tmp/downloads ] || mkdir /tmp/downloads + export $(dbus-launch) export XMODIFIERS=@im=ibus