diff options
| author | Justine Smithies <justine@smithies.me.uk> | 2026-06-13 11:55:14 +0100 |
|---|---|---|
| committer | Justine Smithies <justine@smithies.me.uk> | 2026-06-13 11:55:14 +0100 |
| commit | 75275359f80bf778d099762d654f4ec3f473d4a8 (patch) | |
| tree | 9299d290e3fc95f5c526cdf46552cced1c76c5dd /.local/bin | |
| parent | 7518708b6af9feec09f8332cca2c45385a3d1b1c (diff) | |
Changes to MangoWM IPC mmsg
Diffstat (limited to '.local/bin')
| -rwxr-xr-x | .local/bin/power-menu-fuzzel.sh | 2 | ||||
| -rwxr-xr-x | .local/bin/screenshot.sh | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/.local/bin/power-menu-fuzzel.sh b/.local/bin/power-menu-fuzzel.sh index a182d31..f41a42a 100755 --- a/.local/bin/power-menu-fuzzel.sh +++ b/.local/bin/power-menu-fuzzel.sh @@ -37,6 +37,6 @@ case $chosen in # $lock && WIP ;; "$log_out") - mmsg -d quit + mmsg dispatch quit ;; esac diff --git a/.local/bin/screenshot.sh b/.local/bin/screenshot.sh index 8276f65..715e9d5 100755 --- a/.local/bin/screenshot.sh +++ b/.local/bin/screenshot.sh @@ -14,11 +14,8 @@ case $1 in ;; focused-window) # Take a screenshot of the focused window - xpos=$(mmsg -o "$output" -x | grep "x" | awk '{print$2}') - ypos=$(mmsg -o "$output" -x | grep "y" | awk '{print$2}') - xsize=$(mmsg -o "$output" -x | grep "width" | awk '{print$2}') - ysize=$(mmsg -o "$output" -x | grep "height" | awk '{print$2}') - grim -g "$xpos"",""$ypos $xsize""x""$ysize" -t jpeg ~/Pictures/Screenshots/"$(date +%Y-%m-%d_%H-%m-%s)".jpg + geometry=$(mmsg get focusing-client | jq -r '"\(.x),\(.y) \(.width)x\(.height)"') + grim -g "$geometry" -t jpeg ~/Pictures/Screenshots/"$(date +%Y-%m-%d_%H-%m-%s)".jpg ;; *) # Take a screenshot of the currently focused output and save it into screenshots |
