Skip to content

Instantly share code, notes, and snippets.

View 74th's full-sized avatar

Atsushi Morimoto 74th

View GitHub Profile
@74th
74th / toggle-terminal.py
Created May 16, 2021 02:42 — forked from zidizei/toggle-terminal.sh
Toggle your GNOME Terminal window with a keyboard shortcut under Linux.
#!/bin/python
import time
import subprocess
TERMINAL_APP = "gnome-terminal"
def run(command: list[str]) -> list[str]:
return subprocess.run(command, capture_output=True, encoding="ascii").stdout.strip().splitlines()
def toggle_terminal():