timothycrosley / streamdeck-ui

A Linux compatible UI for the Elgato Stream Deck.
https://timothycrosley.github.io/streamdeck-ui/
MIT License
1.13k stars 241 forks source link

(contribution) 2 small snippets #232

Open gregfr opened 2 years ago

gregfr commented 2 years ago

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

coolapso commented 1 year ago

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