streamdeck-ui icon indicating copy to clipboard operation
streamdeck-ui copied to clipboard

(contribution) 2 small snippets

Open gregfr opened this issue 3 years ago • 1 comments

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

#!/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

2 - Open a Chrome window in the current activity:

google-chrome --profile-directory="Default" --new-window

Regards

gregfr avatar May 13 '22 07:05 gregfr

hi, this project seems to be stale and a new fork as been made with the intention of replacing this one.

if this still an issue please reopen it at: https://github.com/streamdeck-linux-gui/streamdeck-linux-gui

coolapso avatar Jul 27 '23 21:07 coolapso