Skip to content

Commit

Permalink
Merge pull request #23 from qhuyduong/main
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustash authored Nov 2, 2023
2 parents 382bf0b + 78e6cae commit ff7550e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hyprshot
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,13 @@ function grab_active_output() {
Print "Active workspace: %s\n" "$active_workspace"
local current_monitor="$(echo $monitors | jq -r 'first(.[] | select(.activeWorkspace.id == '$(echo $active_workspace | jq -r '.id')'))')"
Print "Current output: %s\n" "$current_monitor"
echo $current_monitor | jq -r '"\(.x),\(.y) \(.width)x\(.height)"'
echo $current_monitor | jq -r '"\(.x),\(.y) \(.width/.scale|round)x\(.height/.scale|round)"'
}

function grab_selected_output() {
local monitor=`hyprctl -j monitors | jq -r '.[] | select(.name == "'$(echo $1)'")'`
Print "Capturing: %s\n" "${1}"
echo $monitor | jq -r '"\(.x),\(.y) \(.width)x\(.height)"'
echo $monitor | jq -r '"\(.x),\(.y) \(.width/.scale|round)x\(.height/.scale|round)"'
}

function grab_region() {
Expand Down

0 comments on commit ff7550e

Please # to comment.