dotfiles

regexghost dotfiles and scripts
git clone https://git.regexghost.com/dotfiles.git
Log | Files | Refs | README

commit 610fa116e18f39139a831c1f4900b731befa65fb
parent a82eb13c53128b87abb8277996fe2dcbb1416f8a
Author: regexghost <dev@regexghost.com>
Date:   Sun, 26 Jul 2026 21:48:56 +0100

check for programs before trying to exit in kshrc shutdown_commands

Diffstat:
Mdotfiles/Power_Management-Substitution-jwm-pi-.kshrc | 12++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/dotfiles/Power_Management-Substitution-jwm-pi-.kshrc b/dotfiles/Power_Management-Substitution-jwm-pi-.kshrc @@ -1,12 +1,16 @@ #### Start Substitute - Power_Management ## Shutdown with confirmation shutdown_commands () { - mocp -M "$XDG_CONFIG_HOME/moc" --stop + if pgrep "mocp" > /dev/null; then + mocp -M "$XDG_CONFIG_HOME/moc" --stop + fi /usr/bin/rm -rf "$XDG_CACHE_HOME/reddit-rss" cp -r /tmp/reddit-rss "$XDG_CACHE_HOME/reddit-rss" - tmux send-keys -t buffer_tmux.o C-s - tmux send-keys -t buffer_tmux.o C-q - tmux kill-session -t buffer_tmux + if pgrep -f "tmux new-session -d -s buffer_tmux" > /dev/null; then + tmux send-keys -t buffer_tmux.0 C-s + tmux send-keys -t buffer_tmux.0 C-q + tmux kill-session -t buffer_tmux + fi } shutdown () {