stepping it back
This commit is contained in:
@@ -8,6 +8,7 @@ import base64
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from warehouse import Media_flag, rand12
|
||||
from swayipc import Swayipc
|
||||
|
||||
Recordings = Path.home() / "records"
|
||||
Tmp = tempfile.gettempdir()
|
||||
@@ -35,17 +36,16 @@ def find_focused_pid(node):
|
||||
return None
|
||||
|
||||
def force_kill():
|
||||
tree = json.loads(subprocess.check_output(
|
||||
["swaymsg", "-t", "get_tree"],
|
||||
text=True
|
||||
))
|
||||
sway = Swayipc()
|
||||
tree = sway.tree()
|
||||
|
||||
pid = find_focused_pid(tree)
|
||||
|
||||
if not pid:
|
||||
return
|
||||
|
||||
os.kill(pid, 9)
|
||||
|
||||
|
||||
def is_recording():
|
||||
return subprocess.run(
|
||||
["pgrep", "-x", "wf-recorder"],
|
||||
|
||||
Reference in New Issue
Block a user