10000 Feature Request: Last session per User · Issue #11 · nwg-piotr/nwg-hello · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Feature Request: Last session per User #11

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

Closed
loaidheach opened this issue May 17, 2024 · 5 comments · Fixed by #14
Closed

Feature Request: Last session per User #11

loaidheach opened this issue May 17, 2024 · 5 comments · Fixed by #14

Comments

@loaidheach
Copy link
Contributor

It would be nice if the last session could be stored on a per user basis.
I haven't looked at the code in detail, but in looks like it should be relatively easy to implement. Apart from changing the session when the user select is changed (via notify::selected), the cache.json would need a different format, e.g.

{
  "user": "someguy",
  "sessions": {
    "someguy": "Hyprland",
    "otherguy": "sway"
  }
}
@BluishHumility
Copy link

I agree that the last-used session being stored as the default on the login screen would be a nice feature. As it is, it appears to default to whatever session file is alphabetically first in the session_dirs directories. Users who do not use the alphabetically first session need to manually change it every time they log in.

@loaidheach
Copy link
Contributor Author

Currently it should already store the last user and the last session, but the session is not stored on a per user basis.
That said, ensure that /var/cache/nwg-hello/cache.json exists. It should be created during installation. For me using the (unofficial) NixOS package it was not.

@BluishHumility
Copy link
BluishHumility commented May 26, 2024

Ah, I see. Thank you for the clarification; I do see that file and after looking at it I understand what is happening.

{
  "session": "sway",
  "user": "jeremy"
}

I was testing something unrelated, and had multiple .desktop files in /usr/share/wayland-sessions/ with identical Exec lines. The cache.json file appears to use this line for differentiating between sessions, so all of those test .desktop files would rightly appear to be exactly the same.

Since this kind of setup would never have a practical reason to exist on an actual user's system, this seems like a non-issue in my case.

Apologies for hijacking your issue @loaidheach, at first glance I thought you had made the same observation that I had, but now I see my thing is totally unrelated. Thanks again for the tip on /var/cache/nwg-hello/cache.json.

@nwg-piotr
Copy link
Owner

Due to an influx of real life job, I haven't had much time lately. I'll try to get down to it soon.

@loaidheach
Copy link
Contributor Author

No worries and thanks for creating nwg-hello at all!

I should have some time to look at it tomorrow. I will implement it tomorrow and create a pull request.

< 60A7 a class="d-inline-block" data-hovercard-type="user" data-hovercard-url="/users/loaidheach/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/loaidheach">@loaidheach loaidheach mentioned this issue May 28, 2024
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

Successfully merging a pull request may close this issue.

3 participants
0