Code Monkey home page Code Monkey logo

Comments (11)

johannesjo avatar johannesjo commented on June 22, 2024

That's a little weird indeed. What's the output of xprop | grep "WM_CLASS(STRING)" when you click on the problematic applications? Also: Do you use Wayland or Xorg?

from linux-window-session-manager.

schmunk42 avatar schmunk42 commented on June 22, 2024
> xprop | grep "WM_CLASS(STRING)"
WM_CLASS(STRING) = "evolution", "Evolution"

> xprop | grep "WM_CLASS(STRING)"
WM_CLASS(STRING) = "org.gnome.Nautilus", "Org.gnome.Nautilus"

from linux-window-session-manager.

schmunk42 avatar schmunk42 commented on June 22, 2024

Running X11

> loginctl show-session $(awk '/tty/ {print $1}' <(loginctl)) -p Type | awk -F= '{print $2}'

x11

from linux-window-session-manager.

johannesjo avatar johannesjo commented on June 22, 2024

Thanks. The xprop output for nautlius is different on my machine. I wonder why.

You said that you had to change the following configurations:

    "org.gnome.gedit.Org.gnome.gedit": "org.gnome.gedit",
    "zoom.zoom": "zoom",
    "evolution.Evolution": "evolution",
    "org.gnome.Nautilus.Org.gnome.Nautilus": "nautilus"

What were the values of lwsm for those (in your session file)? Or didn't you even get to that point?

from linux-window-session-manager.

schmunk42 avatar schmunk42 commented on June 22, 2024

PS: I also changed "org.gnome.gedit.Org.gnome.gedit": "gedit",

This is my currently working session file

> cat DEFAULT.json
{
  "name": "DEFAULT",
  "displaysCombinations": [
    {
      "id": "1600x900;2560x1440",
      "windowList": [
        {
          "windowId": " 0x2e00006",
          "windowIdDec": 48234502,
          "states": [
            "_NET_WM_STATE_MAXIMIZED_VERT"
          ],
          "wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
          "wmPid": 11993,
          "wmClassName": "qtpass.QtPass",
          "x": 800,
          "y": 577,
          "width": 800,
          "height": 815,
          "simpleName": "QtPass",
          "executableFile": "qtpass.desktop",
          "desktopFilePath": "/usr/share/applications/qtpass.desktop"
        },
        {
          "windowId": "0x320000a",
          "windowIdDec": 52428810,
          "wmCurrentDesktopNr": 0,
          "states": [
            "_NET_WM_STATE_MAXIMIZED_VERT",
            "_NET_WM_STATE_FOCUSED"
          ],
          "wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
          "wmPid": 12009,
          "wmClassName": "gnome-terminal-server.Gnome-terminal",
          "x": 2854,
          "y": 4,
          "width": 1326,
          "height": 1417,
          "simpleName": "Gnome-terminal",
          "executableFile": "gnome-terminal"
        },
        {
          "windowId": "0x3a00007",
          "windowIdDec": 60817415,
          "wmCurrentDesktopNr": 0,
          "states": [
            "_NET_WM_STATE_MAXIMIZED_VERT"
          ],
          "wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
          "wmPid": 11994,
          "wmClassName": "org.gnome.Nautilus.Org.gnome.Nautilus",
          "x": -26,
          "y": 517,
          "width": 852,
          "height": 904,
          "simpleName": "gnome",
          "executableFile": "nautilus"
        },
        {
          "windowId": "0x4400001",
          "windowIdDec": 71303169,
          "states": [
            "_NET_WM_STATE_MAXIMIZED_VERT"
          ],
          "wmCurrentDesktopNr": 0,
          "wmTitle": "\"- ZA6 - Chromium\"",
          "wmClassName": "chromium.Chromium",
          "wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
          "wmPid": 11997,
          "x": 1600,
          "y": 64,
          "width": 1280,
          "height": 1328,
          "simpleName": "Chromium",
          "executableFile": "chromium.desktop",
          "desktopFilePath": "/usr/share/applications/chromium.desktop"
        },
        {
          "windowId": "0x3600012",
          "windowIdDec": 56623122,
          "states": [
            "_NET_WM_STATE_MAXIMIZED_HORZ",
            "_NET_WM_STATE_MAXIMIZED_VERT"
          ],
          "wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
          "wmPid": 11991,
          "wmClassName": "evolution.Evolution",
          "x": 0,
          "y": 577,
          "width": 1600,
          "height": 815,
          "simpleName": "Evolution",
          "executableFile": "evolution"
        },
        {
          "windowId": "0x4000001",
          "windowIdDec": 67108865,
          "states": [
            "_NET_WM_STATE_MAXIMIZED_HORZ",
            "_NET_WM_STATE_MAXIMIZED_VERT"
          ],
          "wmTitle": "\"Wavebox | - ZA6\"",
          "wmClassName": "wavebox.wavebox",
          "wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
          "wmPid": 11995,
          "x": 0,
          "y": 577,
          "width": 1600,
          "height": 815,
          "simpleName": "wavebox",
          "executableFile": "wavebox.desktop",
          "desktopFilePath": "/usr/share/applications/wavebox.desktop"
        },
        {
          "windowId": "0x5200003",
          "windowIdDec": 85983235,
          "wmCurrentDesktopNr": 1,
          "states": [
            "_NET_WM_STATE_MAXIMIZED_VERT"
          ],
          "wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
          "wmPid": 13276,
          "wmClassName": "Navigator.Firefox",
          "x": 1600,
          "y": 64,
          "width": 1280,
          "height": 1328,
          "simpleName": "Firefox",
          "executableFile": "firefox.desktop",
          "desktopFilePath": "/usr/share/applications/firefox.desktop"
        },
        {
          "windowId": "0x5800046",
          "windowIdDec": 92274758,
          "wmCurrentDesktopNr": 0,
          "wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
          "states": [
            "_NET_WM_STATE_MAXIMIZED_VERT",
            "_NET_WM_STATE_HIDDEN"
          ],
          "wmPid": 13368,
          "wmClassName": "sun-awt-X11-XFramePeer.jetbrains-phpstorm",
          "x": 1600,
          "y": 64,
          "width": 1280,
          "height": 1328,
          "simpleName": "jetbrains-phpstorm",
          "executableFile": "phpstorm"
        },
        {
          "windowId": "0x6600001\n",
          "windowIdDec": 106954753,
          "states": [
            "_NET_WM_STATE_MAXIMIZED_HORZ",
            "_NET_WM_STATE_MAXIMIZED_VERT"
          ],
          "wmTitle": "\"Untitled• - Typora\"",
          "wmClassName": "typora.Typora",
          "wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
          "wmPid": 14404,
          "x": 0,
          "y": 577,
          "width": 1600,
          "height": 815,
          "simpleName": "Typora",
          "executableFile": "typora.desktop",
          "desktopFilePath": "/usr/share/applications/typora.desktop"
        }
      ]
    }
  ]
}

from linux-window-session-manager.

johannesjo avatar johannesjo commented on June 22, 2024

But how does the non working one look like?

from linux-window-session-manager.

schmunk42 avatar schmunk42 commented on June 22, 2024

Here's a log for save and restore and the corresponding session.json: https://gist.github.com/schmunk42/2098c4fd575acefbfad5480ccd36337c

[edit]
I removed my custom mappings to create it.

btw: might be a separate issue, but in case of an error it would be good to have an additional switch like -f to force saving on not save by default, because you'll very like have a broken config.
And for an extended validation it would be nice to "check" the saved config somehow.

from linux-window-session-manager.

johannesjo avatar johannesjo commented on June 22, 2024

Thanks! Not sure why the WM_CLASS_NAMEs are different on your machine. How did you install gnome and the problematic applications? Normally the wm class name has a specific pattern, which allows for guessing the corresponding desktop file name. But it's not consistent a 100% of the time that's why it is possible to manually configure it. If there is some regularity about it and some indicator how to know that's the case I gladly add some logic for it but honestly I wouldn't know what those might be.

from linux-window-session-manager.

schmunk42 avatar schmunk42 commented on June 22, 2024

How did you install gnome and the problematic applications?

I installed Arch via "Antergos (Installer)", I don't really remember if Gnome was my first desktop (from the installer) - maybe I installed it via pamac.

But it's not consistent a 100% of the time that's why it is possible to manually configure it. If there is some regularity about it and some indicator how to know that's the case I gladly add some logic for it but honestly I wouldn't know what those might be.

It might help to do a "case-insensitive uniqueness" check of the items in WM_CLASS.

Two other weird entries:

WM_CLASS(STRING) = "wavebox", "wavebox"
WM_CLASS(STRING) = "zoom", "zoom"

Maybe a question for Stackoverflow, why they're duplicated?!

from linux-window-session-manager.

johannesjo avatar johannesjo commented on June 22, 2024

Yes probably. Checking for double inputs. It's not really consistent though as your example shows:

    "org.gnome.gedit.Org.gnome.gedit": "org.gnome.gedit",
    "zoom.zoom": "zoom",
    "evolution.Evolution": "evolution",
    "org.gnome.Nautilus.Org.gnome.Nautilus": "nautilus"

And there might be problems e.g. if an app is really called bam.bam or something like that.

I think about it. Currently I'm pretty busy with this project. I will revisit the issue when I have more time or if more people run into it ;)

from linux-window-session-manager.

johannesjo avatar johannesjo commented on June 22, 2024

As I can't think of a good generic solution, I am leaving things as they are. If somebody has a good concept how to handle that or even a better approach, please let me know!

from linux-window-session-manager.

Related Issues (20)

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.