jpochyla / psst

Fast and multi-platform Spotify client with native GUI
MIT License
8.56k stars 219 forks source link

Kiosk mode #533

Open SO9010 opened 2 months ago

SO9010 commented 2 months ago

This is a PR for issue #528. It is essentially done and can be run by adding the system command psst-gui -- --k or psst-gui -- --kiosk to run in kiosk mode.

What I have implemented is that it opens everything in full screen without window decorations. Additionally, the settings are shown directly after logging in with a button to close it, so the settings are set but cannot be changed as I removed the button to access settings.

I have it so that when this kiosk mode is enabled, the keyboard shortcuts don't work (even though they also only work on Mac), and it cannot be exited in this way.

I think that the keyboard shortcuts to access the desktop need to be done on the system level because I can't interrupt things like clicking the super key. Correct me if I'm wrong. If I'm not, this should be ready to be merged with the MR with @jacksongoode's approval.

jacksongoode commented 2 months ago

This doesn't appear to fullscreen on macOS. I'm trying to figure out why. I just get a borderless small window.

jacksongoode commented 2 months ago

@SO9010 I made a few tweaks so that on macOS this works. I've also confirmed that the binary can be run as psst-gui -k or psst-gui --kiosk. Happy to merge if those changes look good on Windows and Linux for you

SO9010 commented 2 months ago

This doesn't appear to fullscreen on macOS. I'm trying to figure out why. I just get a borderless small window.

Heya same issue on Linux!

SO9010 commented 1 month ago

Need to lint I'll do that tomorrow evening.

jacksongoode commented 1 month ago

Linted, should be good!

SO9010 commented 1 month ago

So I believe there is not way to get this to actually work for the raspberry pi due to upstream limitations.

But as it still works for windows and Mac do you think we should still merge it then I could detail how to get it working on any Linux system (by using a different window manager). Maybe as suggested we should rename this to --start-maximize. We could perhaps then add other options like --no-prefrence-cog and then --no-title-bar and we mention the limitations that on some systems it will still show the title bar.

What do you think @jacksongoode

jacksongoode commented 1 month ago

Sure, I think that's probably a good approach. We could separate each one of these features into individual flags that could be passed altogether to create the kiosk mode experience.

jacksongoode commented 1 month ago

Or I'm also fine with merging this as it is? It doesn't have any immediate effect and if people want it to me more granular we can make another PR to expand it.

SO9010 commented 1 month ago

Yeah that works I can open another issue stating things we need to add/change about the readme

jacksongoode commented 1 month ago

Sorry I just tried this out and the sign in window is a bit odd? Do we actually need a completely separate styled window for the kiosk mode?