I've been using streamdeck-ui for a while now, and I want to share 2 snippets I'm using, in case that may help others.
Note: I'm using KDE's wonderful "activities" features
1 - Script to switch or run new instance
#!/bin/bash
SEARCH=$1
PROGRAM=$2
xdotool search --desktop 0 --name "$SEARCH" windowactivate
if [ $? -eq 1 ]
then
notify-send "Running new instance of $SEARCH"
echo Running new instance of $SEARCH
$PROGRAM &
else
notify-send "Switching to $SEARCH"
echo Switching to $SEARCH
fi
Example usage: bash /home/greg/Documents/SDScripts/activate_X.sh 'DBeaver' dbeaver
Greetings
I've been using streamdeck-ui for a while now, and I want to share 2 snippets I'm using, in case that may help others.
Note: I'm using KDE's wonderful "activities" features
1 - Script to switch or run new instance
Example usage:
bash /home/greg/Documents/SDScripts/activate_X.sh 'DBeaver' dbeaver
2 - Open a Chrome window in the current activity:
Regards