Code Monkey home page Code Monkey logo

zeno's Introduction

Zeno

Cursor movement with Vim key bindings. Implemented with Xlib.

Intro

Cursor mode is only activated by holding down the Super mod key. There are two methods of interacting with the cursor: search mode and move mode.

In search mode, the cursor will warp to a position halfway between a boundary and the current cursor position(H, J, K, L are mapped to left, down, up, right). At first (or upon reset), the boundary will be at the edges of the screen. The search area halves each time (e.g. if you move the cursor left, then the right boundary will be at the cursor's original position). The cursor can also be reset to the center of the screen by pressing E.

Clicking is done with N (or Enter) and M (for left and right clicking).

After switching to move mode, the cursor can be manipulated at a more finer grained level using the same bindings. (Not implemented yet)

Command Table

Note: All commands must have the Win key (Super mod key) held down.

Command Description
E Centers the mouse cursor in the screen
J Warps cursor upwards, halfway between the top bound and current position.
K Warps cursor downwards, halfway between the bottom bound and current position.
H Warps cursor leftwards, halfway between the left bound and current position.
L Warps cursor rightwards, halfway between the right bound and current position.
N or Enter Left click
M Right click

After each left/right/up/down move, the right/left/bottom/top bound moves left/right/up/down to your previous y/y/x/x coordinate.

To do

  • Refactor code and reset boundaries when the mod key is released. (can we reduce key grabbing?)
  • Implement move mode.
  • Known issue: holding LMB button (currently 'N') causes repeated clicking and not the desired 'click-and-hold' behavior.
  • Known issue: Zeno stops working when Numlock is toggled on.

Notes

  • Build depends on the C Xtst library. On Debian systems, this can be installed with sudo apt-get install libxtst-dev

zeno's People

Contributors

tsani avatar kevin-li-195 avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar  avatar  avatar

zeno's Issues

Scrolling support

I figure something like mod+shift+{h,j,k,l} can be used to issue a scroll in that direction.

Config file

Specifically to configure the keyboard mappings.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.