refactor
This commit is contained in:
parent
a31e08bd5f
commit
388924ed6e
16 changed files with 951 additions and 294 deletions
11
find_or_open.sh
Executable file
11
find_or_open.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
helper_find_or_open(){
|
||||
windows=$(wmctrl -l)
|
||||
if [[ "${windows,,}" == *"$1"* ]]; then
|
||||
xdotool windowactivate "$(wmctrl -l | grep -i "$1" | cut -d " " -f 1)"
|
||||
echo "found $1"
|
||||
else
|
||||
nohup "$1" >/dev/null 2>&1 &
|
||||
echo "opening $1"
|
||||
fi
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue