15 lines
479 B
Plaintext
15 lines
479 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
active_monitor="$(hyprctl activeworkspace -j | jq '.monitor' | sed 's/\"//g')"
|
||
|
|
||
|
jq_filter=".[] | select(.name == \"${active_monitor}\")"
|
||
|
active_monitor_json=$(hyprctl monitors -j | jq "${jq_filter}")
|
||
|
|
||
|
x=$(echo "${active_monitor_json}" | jq '.x')
|
||
|
y=$(echo "${active_monitor_json}" | jq '.y')
|
||
|
|
||
|
width=$(echo "${active_monitor_json}" | jq '.width')
|
||
|
height=$(echo "${active_monitor_json}" | jq '.height')
|
||
|
|
||
|
/home/vtimofei/scripts/screenshot "${x},${y} ${width}x${height}"
|