Skip to content

vthriller/x11-mouse-trampoline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 

Repository files navigation

X11 mouse trampoline

Quick and dirty alternative to mouse jump feature from Microsoft PowerToys.

Usage

pipe=${XDG_RUNTIME_DIR:-$HOME/.local}/mouse-trampoline.pipe
# or wherever you want to put this file

# start the daemon
mouse-trampoline $pipe

# show the window
echo > $pipe

Dependencies

  • Tkinter
  • Pillow
  • python-xlib

Limitations

Should run as daemon for quicker response times. If you're a suckless.org fanatic and rather concerned about saving as much free PIDs as possible, git checkout v1.0.

This uses 3 (yes, three) connections to X server: one for Tk, one for python-xlib (to get/set cursor position), one for Pillow to take screenshot of the screen. Theoretically it's possible to reduce this number to 2 without complete rewrite, but blt::winop query yields X Error of failed request: BadWindow (invalid Window parameter) for some reason.

Not tested with multiple monitors.

Good luck writing similar thing for bazillion of Wayland compositors.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages