From 0db513c848c5355a5a19970eec15f2b4a8952134 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 14 Aug 2026 12:56:07 +0000 Subject: [PATCH] move satty window --- scripts/screenshot/screenshot_area.sh | 8 +++++++- scripts/screenshot/screenshot_monitor.sh | 8 +++++++- scripts/screenshot/screenshot_window.sh | 8 +++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/scripts/screenshot/screenshot_area.sh b/scripts/screenshot/screenshot_area.sh index c12ff8f..ce5e752 100755 --- a/scripts/screenshot/screenshot_area.sh +++ b/scripts/screenshot/screenshot_area.sh @@ -36,7 +36,13 @@ if command -v satty >/dev/null 2>&1; then [ -n "$addr" ] && break sleep 0.1 done - [ -n "$addr" ] && hyprctl dispatch movewindowpixel "exact $x,$y,address:$addr" >/dev/null 2>&1 + if [ -n "$addr" ]; then + # Lua config (Hyprland 0.55+) dispatches through hl.dsp.*, so try + # hyprctl eval first, then the raw lua dispatch, then classic syntax. + hyprctl eval "hl.dispatch(hl.dsp.window.move({ x = $x, y = $y, window = 'address:$addr' }))" >/dev/null 2>&1 || + hyprctl dispatch "hl.dsp.window.move({ x = $x, y = $y, window = 'address:$addr' })" >/dev/null 2>&1 || + hyprctl dispatch movewindowpixel "exact $x $y,address:$addr" >/dev/null 2>&1 + fi wait "$pid" wl-copy -t image/png < "$dir/$file" fi diff --git a/scripts/screenshot/screenshot_monitor.sh b/scripts/screenshot/screenshot_monitor.sh index ff738bd..e6ce6e6 100755 --- a/scripts/screenshot/screenshot_monitor.sh +++ b/scripts/screenshot/screenshot_monitor.sh @@ -37,7 +37,13 @@ if command -v satty >/dev/null 2>&1; then [ -n "$addr" ] && break sleep 0.1 done - [ -n "$addr" ] && hyprctl dispatch movewindowpixel "exact $x,$y,address:$addr" >/dev/null 2>&1 + if [ -n "$addr" ]; then + # Lua config (Hyprland 0.55+) dispatches through hl.dsp.*, so try + # hyprctl eval first, then the raw lua dispatch, then classic syntax. + hyprctl eval "hl.dispatch(hl.dsp.window.move({ x = $x, y = $y, window = 'address:$addr' }))" >/dev/null 2>&1 || + hyprctl dispatch "hl.dsp.window.move({ x = $x, y = $y, window = 'address:$addr' })" >/dev/null 2>&1 || + hyprctl dispatch movewindowpixel "exact $x $y,address:$addr" >/dev/null 2>&1 + fi wait "$pid" wl-copy -t image/png < "$dir/$file" fi diff --git a/scripts/screenshot/screenshot_window.sh b/scripts/screenshot/screenshot_window.sh index 368ec70..06b0efd 100755 --- a/scripts/screenshot/screenshot_window.sh +++ b/scripts/screenshot/screenshot_window.sh @@ -56,7 +56,13 @@ if command -v satty >/dev/null 2>&1; then [ -n "$addr" ] && break sleep 0.1 done - [ -n "$addr" ] && hyprctl dispatch movewindowpixel "exact $x,$y,address:$addr" >/dev/null 2>&1 + if [ -n "$addr" ]; then + # Lua config (Hyprland 0.55+) dispatches through hl.dsp.*, so try + # hyprctl eval first, then the raw lua dispatch, then classic syntax. + hyprctl eval "hl.dispatch(hl.dsp.window.move({ x = $x, y = $y, window = 'address:$addr' }))" >/dev/null 2>&1 || + hyprctl dispatch "hl.dsp.window.move({ x = $x, y = $y, window = 'address:$addr' })" >/dev/null 2>&1 || + hyprctl dispatch movewindowpixel "exact $x $y,address:$addr" >/dev/null 2>&1 + fi wait "$pid" wl-copy -t image/png < "$dir/$file" fi