Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

So i was using i3. Now i want to see dwm. Made keybidings to run firefox on Modkey+w. It works well, but now when i want to do simmilar commands for nvim, ranger, cmus (all terminal programs) it isn't working. Can't run them from dmenu also. Is it ok, or i just fuckedup with my config files??

static const Rule rules[] = {
    /* xprop(1):
     *  WM_CLASS(STRING) = instance, class
     *  WM_NAME(STRING) = title
     */
    /* class      instance    title       tags mask     isfloating   monitor */
    { "Gimp",     NULL,       NULL,       0,            1,           -1 },
    { "Firefox",  NULL,       NULL,       1 << 8,       0,           -1 },
    { "nvim",       NULL,       NULL,       1 << 8,       0,           -1 },
    { "ranger",     NULL,       NULL,       1 << 8,       0,           -1 },

};
static const char *web[]  = { "/usr/bin/firefox", NULL };
static const char *nvim[]  = { "/usr/share/nvim", NULL };
static const char *ranger[]  = { "/usr/bin/ranger", NULL };

{ MODKEY,                       XK_w,        spawn,                  {.v = web } },
{ MODKEY,                       XK_r,        spawn,                  {.v = ranger } },
{ MODKEY|ShiftMask,                       XK_v,          spawn,                  {.v = nvim } },

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
3.4k views
Welcome To Ask or Share your Answers For Others

1 Answer

Nvim and Ranger run in the terminal, so just running the binaries won't do anything. You'll need to run them in your terminal. How that works depends on your terminal, but it is likely something like your-terminal -e ranger, or static const char *ranger[] = {"xterm", "-e", "/usr/bin/ranger", NULL }; for example.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...