X class names



  • Hi,

    I'm trying to start multiple vivaldi (stable) windows with different class names for X11.
    This way I can bind these windows automatically in i3wm to certain workspaces.

    for example:
    vivaldi-stable --new-window --class="whatsapp"
    vivaldi-stable --new-window --class="jira"
    vivaldi-stable --new-window --class="confluence"
    etc.

    The problem I'm running into is: whatever class name I use for the first window to start will be the class name for all the other windows as well, ending up with all the windows binding to the same workspace.

    Is there any way I can workaround this? I already saw a post about using different user directories (or something similiar) but I really don't want to go down that path because it seems to be a bit overkill and I would probably have to set up my current settings (and keep up changes) for all those user directories.

    Cheers in advance,
    Ralph



  • Using separate user data directories seems to be the only way, coz otherwise it opens a new window in the existing session which (seems to) can have only one WM_CLASS.



  • Thanks a lot for the answer, too bad this cannot be done using WM_CLASS

    I have found another workaround that suits my needs for the time being.
    In case anyone is interested, add to your i3 config:

    1. Open a new browser window and navigate to the page you want to bind
    2. In a terminal, type xprop | grep -i wm_name and click the vivaldi window
    3. Look for the tag WM_NAME(UTF8_STRING) and find a part to identify the webpage (for example Git)
    4. In your i3 config add the following line: for_window [title="Git"] move to workspace {workspace}
    5. Reload i3 config

    Now when you open a browser and navigate to the page in question, i3 will parse the window title and if it matches (can be a substring) the string you put in your config, it will move the window to the bound workspace.

    Cheers,
    Ralph


Log in to reply
 

Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.