Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- newterm=N
- [ "$1" = "-n" ] && newterm=Y
- program=tilix
- if [[ -z "$(pgrep $program)" || "$newterm" = "Y" ]] ; then
- exec $program
- else
- wids=$(xdotool search --class $program)
- active_wid=$(xdotool getactivewindow)
- for wid in $wids ; do
- if [ $wid -eq $active_wid ] ; then
- xdotool keydown alt key Tab
- else
- xdotool windowactivate $wid
- fi
- done
- fi
Advertisement
Add Comment
Please, Sign In to add comment