Skip to content

Instantly share code, notes, and snippets.

View mathematicalcoffee's full-sized avatar

Amy Chan mathematicalcoffee

  • Australia
View GitHub Profile
#!/usr/bin/env python3.6
# credit https://askubuntu.com/questions/648010/is-there-a-text-based-window-switcher-for-unity/648044
# need 3.6 for fstrings
# @TODO esc to quit zenity window
import subprocess
import socket
import sys
import re
from shlex import quote
@mathematicalcoffee
mathematicalcoffee / list_windows.py
Last active February 20, 2019 12:11
see https://askubuntu.com/questions/648010/is-there-a-text-based-window-switcher-for-unity/648044 . A zenity window for alt-tab. I modified to (a) permit a host name of "N/A" in the `wmctrl -lpG` output (for some reason all the windows get the correct host name except for Rstudio which gets "N/A"), (b) shell-quote the window titles and (c) use f…
#!/usr/bin/env python3.6
# credit https://askubuntu.com/questions/648010/is-there-a-text-based-window-switcher-for-unity/648044
# need 3.6 for fstrings
# @TODO esc to quit zenity window
import subprocess
import socket
import sys
import re
from shlex import quote