Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use the environment variable for window rules #244

Open
nitrogenxx opened this issue Jun 23, 2024 · 0 comments
Open

how to use the environment variable for window rules #244

nitrogenxx opened this issue Jun 23, 2024 · 0 comments

Comments

@nitrogenxx
Copy link

Hi..
i apologizes i don't know i should ask this question here or not

today i though i should change my all the application into environment variable and then use that environment variable thought out the system.. instead of hardcore the application name on 1000 different place

but when i try to configure the environment variable for window rules in the config.h
i am having some trouble

i tried many different method but non of then working
for example :

when i try to change my terminal into environment variable and then use that environment veritable in the window rules in config.h
by using this DWM patch environmentvars

i found this patch is not working for the window rules like

#define TERMINAL_ENVVAR "TERMINAL" // use: terminalcmd

static const Rule rules[] = {

    /* class                            instance    title       tags mask   switchtag  iscentered   isfloating   monitor */
    { terminalcmd,                   NULL,     NULL,       1 << 1,          1,                     0,               0,                -1 },

    };

but this patch is only working for keybindings like

      { MODKEY,                XK_c,             spawn,           {.v = terminalcmd} },

i think this patch is only designed to work with keybinding but with window rules
i tried same thing with multiple application but they are working for keybinding but not working for window rules

i tried many different method non of them are working for window rules like example :

static const Rule rules[] = {

    /* class                            instance    title       tags mask   switchtag  iscentered   isfloating   monitor */
    {  SHCMD("$TERMINAL"),  NULL,     NULL,       1 << 1,          1,                     0,               0,                -1 },
     {  $TERMINAL,           NULL,     NULL,       1 << 2,          1,                     0,               0,                -1 }

    };

I'm looking for the guidance how to use the environment variable for window rules
i will really appreciate your willingness to help or any inside possible 🙆

i really apologize if i shouldn't ask this question here ... pink heart emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant