i3: add open-messaging script
This commit is contained in:
parent
e1c834734d
commit
87f267e55d
23
i3/i3/scripts/open-messaging
Executable file
23
i3/i3/scripts/open-messaging
Executable 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
|
Loading…
x
Reference in New Issue
Block a user