summaryrefslogtreecommitdiff
path: root/src/caelestia/subcommands
diff options
context:
space:
mode:
Diffstat (limited to 'src/caelestia/subcommands')
-rw-r--r--src/caelestia/subcommands/record.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/caelestia/subcommands/record.py b/src/caelestia/subcommands/record.py
index f251cf3..6481a0a 100644
--- a/src/caelestia/subcommands/record.py
+++ b/src/caelestia/subcommands/record.py
@@ -58,11 +58,11 @@ class Command:
else:
region = self.args.region
args += ["-g", region.strip()]
-
- monitors = json.loads(subprocess.check_output(["hyprctl", "monitors", "-j"]))
- focused_monitor = next(monitor for monitor in monitors if monitor["focused"])
- if focused_monitor:
- args += ["-o", focused_monitor["name"]]
+ else:
+ monitors = json.loads(subprocess.check_output(["hyprctl", "monitors", "-j"]))
+ focused_monitor = next(monitor for monitor in monitors if monitor["focused"])
+ if focused_monitor:
+ args += ["-o", focused_monitor["name"]]
if self.args.sound:
sources = subprocess.check_output(["pactl", "list", "short", "sources"], text=True).splitlines()