Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 946 Bytes

README.md

File metadata and controls

30 lines (21 loc) · 946 Bytes

i3-center-mouse

Listens for i3 events (e.g. focus, exec, workspace, ...) and centers the mouse in the currently focused window when they occur. It can be used to keep track of which window is focused without having to rely on decorations.

Since a GIF is worth 1000^2 words, this is how it works when changing focus between windows:

Demo

Dependencies

  • python3 (sudo apt install python3 on Ubuntu / Debian based systems)
  • i3ipc-python (pip3 install i3ipc, after installing python3-pip)
  • xdotool (sudo apt install xdotool on Ubuntu / Debian based systems)

Usage

The script is supposed to be run in background, by adding something like this to your i3 config:

exec --no-startup-id ~/.scripts/i3-center-mouse.py --all

See i3-center-mouse.py --help for more info.