Skip to content

[Solved] Rouge-like configuration #1

Description

@hisacro

Hey! just wanted to say thanks, this is straightforward and awesome piece of code. Yesterday when I was going for dissertation defense review milk container spill, ruining my touchpad - again hearty thanks for this I was able to successfully finish it up today, little nuisance in the beginning but I was able to create a configuration that suited - thought I will share here if someone's interested, it should come very handy for people who are familar with rouge-like games.

    /* 
     *     rouge-like    scroll       Speed          
     *      y  k  u        o     
     *       \ | /         |       (c)...(f)aster
     *    h --   -- l      |                               
     *       / | \         |         (q)uit                              
     *     b   j  n        e                                       
     */
    isleft    = (iskeydown(XK_h)) || (iskeydown(XK_y)) ||  (iskeydown(XK_b))?  1 : 0;
    isdown    = (iskeydown(XK_j)) || (iskeydown(XK_n)) ||  (iskeydown(XK_b))?  1 : 0;
    isup      = (iskeydown(XK_k)) || (iskeydown(XK_y)) ||  (iskeydown(XK_u))?  1 : 0;
    isright   = (iskeydown(XK_l)) || (iskeydown(XK_u)) ||  (iskeydown(XK_n))?  1 : 0;
   

    ism1      = iskeydown(XK_a); /* left click   */
    ism2      = iskeydown(XK_s); /* middle click */
    ism3      = iskeydown(XK_d); /* right click  */
    ism4      = iskeydown(XK_o); /* up   scroll  */
    ism5      = iskeydown(XK_e); /* down scroll  */

and

  root = RootWindow(dpy, DefaultScreen(dpy));
    {
        grabkey(XK_q);                               /* quit    */
        grabkey(XK_a); grabkey(XK_s); grabkey(XK_d); /* mouse   */ 
        grabkey(XK_e); grabkey(XK_o);                /* scrolls */
        grabkey(XK_f); grabkey(XK_c);                /* speed   */
        grabkey(XK_h); grabkey(XK_j); grabkey(XK_k); grabkey(XK_l); /* vim-only */
        grabkey(XK_y); grabkey(XK_u); grabkey(XK_b); grabkey(XK_n); /* rouge-like */
    }

Again thanks for keeping codebase clean! cheers and have a great day

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestwontfixThis will not be worked on

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions