Closed I03D closed 1 year ago
Great to hear that mouseless works for you.
I agree that would be a nice feature. The problem is that mouseless currently only simulates a real mouse and does not know where the cursor is, and how to get the cursor position depends on which display manager is in use (Xorg or Wayland), so this might be some more work, but I will have a look how it could be done.
Until then, one could do this by executing external scripts with the exec binding that store and read the cursor position from files, here is an example how to do it in Xorg with saving both x and y positions (it requires that xdotool is installed, which is a nice tool for interacting with windows, keyboards and the mouse):
~/.config/mouseless/save-mark.sh
:
#!/usr/bin/env sh
BASEDIR=$(dirname "$0")
mkdir "$BASEDIR/marks"
xdotool getmouselocation | sed 's/x:\([0-9]*\)\s*y:\([0-9]*\).*/\1 \2/' > "$BASEDIR/marks/$1"
~/.config/mouseless/goto-mark.sh
:
#!/usr/bin/env sh
BASEDIR=$(dirname "$0")
cat "$BASEDIR/marks/$1" | xargs xdotool mousemove
chmod +x ~/.config/mouseless/save-mark.sh ~/.config/mouseless/goto-mark.sh
Here you have to change /home/jbensmann
with the name of your home directory, and one has to define a binding for every key one wants to save a mark to.
When in the mouse layer, one can then e.g. save a mark on a by pressing and holding m, pressing and releasing a, and releasing m, and similarly go to a mark with '
.
Not a very clean solution, but the best I could come up with.
Thanks, it works!
I want to have a mode for remembering the cursor position (preferably three: horizontal, vertical and both) and a mode for restoring the position. Like the standard " m " and " ' " in vim. Your application turned out to be convenient for everyday use, but it took a relatively long time to aim the cursor at small panels or timeline videos.
I have 4*4 keys to teleport the cursor, as in keynav/keynavish/warpd, but this is too universal a solution. I would like to record positions on the fly without a hardcode.
Thanks, mouseless works stably and it is much better than keynav/keynavish/warpd/xmouseless. What an irony, I tried mouseless the last of such programs.