Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # mfk
- #
- # usage: toggle-xterm COMMAND
- #
- # if COMMAND is running in an xterm close the term; otherwise start COMMAND in
- # an xterm.
- #
- # requires wmctrl
- title="|> $@ <|"
- if wmctrl -l | grep "$title" >/dev/null ; then
- wmctrl -F -c "$title"
- else
- xterm -T "$title" -e $@ &
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement