chore(sway): update config

This commit is contained in:
2025-03-06 13:26:29 +01:00
parent eb9ff171fb
commit 3b48d97418
2 changed files with 16 additions and 11 deletions

View File

@@ -1,10 +1,13 @@
#!/bin/bash
pid="$(pgrep "wf-recorder" || pgrep "slurp")"
status=$?
main() {
local pid="$(pgrep "wf-recorder" || pgrep "slurp")"
if [[ $status != 0 ]]; then
GEO="$(slurp)" && wf-recorder -g "$GEO" -f "$HOME/Pictures/$(date +'recording_%Y-%m-%d-%H%M%S.mp4')"
else
pkill --signal SIGINT wf-recorder
fi
if [[ $? != 0 ]]; then
GEO="$(slurp)" && wf-recorder -g "$GEO" -f "$HOME/Pictures/$(date +'recording_%Y-%m-%d-%H%M%S.mp4')"
else
pkill --signal SIGINT wf-recorder
fi
}
main