Use long option names

This commit is contained in:
Ohad Livne 2025-12-18 22:27:14 +02:00
parent 38bf705a3c
commit 82cd587d18
Signed by: libohad-dev
GPG key ID: 34FDC68B51191A4D
7 changed files with 23 additions and 23 deletions

View file

@ -37,15 +37,15 @@ else
fi
get_focused_monitor() {
swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name'
swaymsg --type get_outputs | jq --raw-output '.[] | select(.focused) | .name'
}
get_focused_window() {
swaymsg -t get_tree | jq -j '.. | select(.type?) | select(.focused).rect | "\(.x),\(.y) \(.width)x\(.height)"'
swaymsg --type get_tree | jq --join-output '.. | select(.type?) | select(.focused).rect | "\(.x),\(.y) \(.width)x\(.height)"'
}
select_window() {
swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp
swaymsg --type get_tree | jq --raw-output '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp
}
case "${option}" in
@ -68,11 +68,11 @@ case "${option}" in
"📷 Select window → 📋")
grim -g "$(select_window)" - | wl-copy;;
"📽 Record focused monitor")
wf-recorder -o "$(get_focused_monitor)" -f "$(recording_filename)";;
wf-recorder --output "$(get_focused_monitor)" -f "$(recording_filename)";;
"📽 Record select region")
wf-recorder -g "$(slurp)" -f "$(recording_filename)";;
wf-recorder --geometry "$(slurp)" -f "$(recording_filename)";;
"📽 Record focused window")
wf-recorder -g "$(get_focused_window)" -f "$(recording_filename)";;
wf-recorder --geometry "$(get_focused_window)" -f "$(recording_filename)";;
"📽 Record select window")
wf-recorder -g "$(select_window)" -f "$(recording_filename)";;
wf-recorder --geometry "$(select_window)" -f "$(recording_filename)";;
esac