allow running find_or_open as standalone
This commit is contained in:
parent
847ecd0214
commit
fa119a8d4f
3 changed files with 14 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
helper_find_or_open(){
|
||||
find_or_open(){
|
||||
windows=$(wmctrl -l)
|
||||
if [[ "${windows,,}" == *"$1"* ]]; then
|
||||
xdotool windowactivate "$(wmctrl -l | grep -i "$1" | cut -d " " -f 1)"
|
||||
|
@ -9,3 +9,7 @@ helper_find_or_open(){
|
|||
echo "opening $1"
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ ! -z $1 ]]; then
|
||||
find_or_open $1
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue