32 lines
534 B
Python
32 lines
534 B
Python
import subprocess
|
|
|
|
|
|
def get_pass(account: str) -> str:
|
|
proc = subprocess.run(
|
|
["pass", account], # noqa: S607
|
|
stdout=subprocess.PIPE,
|
|
check=True,
|
|
)
|
|
|
|
raw = proc.stdout.decode()
|
|
return raw.splitlines()[0]
|
|
|
|
|
|
def beep() -> None:
|
|
cmd = [
|
|
"play",
|
|
"-n",
|
|
"synth",
|
|
"sine",
|
|
"E4",
|
|
"sine",
|
|
"A5",
|
|
"remix",
|
|
"1-2",
|
|
"fade",
|
|
"0.5",
|
|
"1.2",
|
|
"0.5",
|
|
"2",
|
|
]
|
|
subprocess.run(cmd, check=False)
|