mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2024-12-23 13:46:47 +00:00
23 lines
280 B
Plaintext
23 lines
280 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
[[ -z $1 ]] && exit 1
|
||
|
|
||
|
active_window=$(xdotool getactivewindow)
|
||
|
window=$(xdotool search --name "$1")
|
||
|
[[ $? -ne 0 ]] && exit 1
|
||
|
|
||
|
if [[ $active_window == $window ]]; then
|
||
|
xdotool windowminimize $window
|
||
|
else
|
||
|
xdotool windowactivate $window
|
||
|
fi
|
||
|
|
||
|
exit 0
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|