Hyprshot icon indicating copy to clipboard operation
Hyprshot copied to clipboard

Feature Request - Hiding the cursor

Open Elibrio opened this issue 1 year ago • 4 comments

An application argument to hide the cursor before the screen freezes with (-z)

Elibrio avatar Nov 03 '24 19:11 Elibrio

I made a really bad but kinda functional work around by setting the timeout of the cursor to really small number so it disappears "^^

hyprctl keyword cursor:inactive_timeout=0.3 1 && sleep 0.05 && hyprshot -m output -z -o '~/path/to/screenshots/' && hyprctl keyword cursor:inactive_timeout=3 1

For some reason hyprctl keyword cursor:inactive_timeout=0.1 1 requires two arguments and I'm not sure why.

F-4Dev avatar Apr 21 '25 20:04 F-4Dev

Now hyprland's latest git have added a new variable called cursor:invisible. It can work with hyprctl keyword cursor:invisible true && hyprshot ... && hyprctl keyword cursor:invisible false

au-summer avatar Jul 31 '25 19:07 au-summer

For those who use older versions of hyprland and don't want any lag before freezing, here is my previous solution:

cursor_pos_x=$(hyprctl cursorpos -j | jq -r '.x')
cursor_pos_y=$(hyprctl cursorpos -j | jq -r '.y')

hyprctl dispatch movecursor 10000 10000

hyprshot -m "$1" -o "$OUTPUT_DIR" --freeze &

sleep 0.1

hyprctl dispatch movecursor "$cursor_pos_x" "$cursor_pos_y"

Here $1 can be region, window, etc.

au-summer avatar Jul 31 '25 19:07 au-summer

I actually want my cursor to appear but no matter what I do, it always disappears when I take a screenshot. I don't even have invisible set in my hyprland config, I only have hide_on_key_press = true; (which is also a workaround for having it disappear in screenshots), but even when disabled using hyprctl keyword cursor:hide_on_key_press = false it still does not show up in screenshots, it just disappears before it freezes with the -z option.

Arroquw avatar Aug 16 '25 22:08 Arroquw