mirror of
https://github.com/caelestia-dots/cli.git
synced 2026-06-05 14:59:29 -05:00
fix: only screenshot focused monitor in fs mode
This commit is contained in:
@@ -2,6 +2,7 @@ import subprocess
|
||||
from argparse import Namespace
|
||||
from datetime import datetime
|
||||
|
||||
from caelestia.utils import hypr
|
||||
from caelestia.utils.notify import notify
|
||||
from caelestia.utils.paths import screenshots_cache_dir, screenshots_dir
|
||||
|
||||
@@ -33,7 +34,12 @@ class Command:
|
||||
swappy.stdin.close()
|
||||
|
||||
def fullscreen(self) -> None:
|
||||
sc_data = subprocess.check_output(["grim", "-"])
|
||||
cmd = ["grim"]
|
||||
focused_monitor = next(monitor for monitor in hypr.message("monitors") if monitor["focused"])
|
||||
if focused_monitor:
|
||||
cmd += ["-o", focused_monitor["name"]]
|
||||
cmd += ["-"]
|
||||
sc_data = subprocess.check_output(cmd)
|
||||
|
||||
subprocess.run(["wl-copy"], input=sc_data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user