i3: add open-messaging script

This commit is contained in:
Julian Mutter 2022-10-27 20:06:04 +02:00
parent e1c834734d
commit 87f267e55d

23
i3/i3/scripts/open-messaging Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh
start_if_not_running()
{
program=$1
pidof -sq $program
if [ "$?" -eq "1" ]; then
start_program $1
else
echo "$program is already running"
fi
}
start_program()
{
program=$1
echo "Starting $program..."
$program & > /dev/null
}
start_program schildichat-desktop
start_program telegram-desktop
start_program thunderbird