From b38fd56740eb1b6910d7f92f64a56940954b50fd Mon Sep 17 00:00:00 2001 From: hok7z Date: Sun, 25 Dec 2022 13:37:30 +0200 Subject: [PATCH] Add restart script --- bin/restart | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 bin/restart diff --git a/bin/restart b/bin/restart new file mode 100755 index 0000000..91fe34e --- /dev/null +++ b/bin/restart @@ -0,0 +1,26 @@ +#!/bin/bash + +if [ -z "$1" ] +then + echo "./restart --picom/--polybar/--sxhkd"; + exit 1; +fi + + +case $1 in + "--picom") + pkill -USR1 -x picom + dunstify "picom restarted" -t 3500 + ;; + + "--polybar") + pkill -USR1 -x polybar + dunstify "polybar restarted" -t 3500 + ;; + + "--sxhkd") + pkill -USR1 -x sxhkd + dunstify "sxhkd restarted" -t 3500 + ;; + +esac