Coder Social home page Coder Social logo

dmenu-ee's People

Contributors

lwilletts avatar sbstnc avatar taye avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dmenu-ee's Issues

Should compress MotionNotify events

Makes hovering more reactive. Do you need a pull request or similar?

diff --git a/dmenu.c b/dmenu.c
index c4b2899..6c66db8 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -955,6 +955,8 @@ run(void) {
                        continue;
                switch(ev.type) {
                case MotionNotify:
+                       while(XCheckTypedEvent(dc->dpy, MotionNotify, &ev))
+                               (void)0;
                        pointermove(&ev);
                        break;
                case ButtonPress:

Fix yoffset issue in setup()

Just after the #ifdef XINERAMA block in setup(), x and y are set. This:

y = topbar ? 0 : DisplayHeight(dc->dpy, screen) - mh - yoffset;

should be this:

y = topbar ? yoffset : DisplayHeight(dc->dpy, screen) - mh - yoffset;

If I need to create a PR for this issue, I can, but I figured since it's basically just a typo I'd just open an issue about it.

Scroll only 3 lines per wheel?

One could add a switch to control this, interpreting "0" (the default) as the present page scrolling behavior.
Opinions?

diff --git a/dmenu.c b/dmenu.c
index 6c66db8..36580aa 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -725,14 +725,18 @@ buttonpress(XEvent *e) {
        }
        /* scroll up */
        if(ev->button == Button4 && prev) {
-               sel = curr = prev;
+               int i = 0;
+               while(++i < 4 && sel && sel->left)
+                       curr = sel = sel->left;
                calcoffsets();
                drawmenu();
                return;
        }
        /* scroll down */
        if(ev->button == Button5 && next) {
-               sel = curr = next;
+               int i = 0;
+               while(++i < 4 && sel && sel->right)
+                       curr = sel = sel->right;
                calcoffsets();
                drawmenu();
                return;

-i -z combination yields nothing

-i works ok, case insensitive
-zworks ok, case sensitive, fuzzy
-i -z nothing happens (well, sometimes looks like it's working eg. enter a number)

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.