Suggestion: have a standard for applications to check a simplified overall "device usage mode" like "phone/touch-first mobile", "pc/mouse- and keyboard first device", ...
I suggest xdg should have a standard for applications to check whether a device is expected to be mainly used as a mobile phone, TV/living room game console, or tablet, by default. New devices like PinePhone and Librem 5 are on the rise, and ideally applications would adapt without being packaged differently just by being launched in the new environment as-is. A lot of this can be done already with just checking screen size, DPI, scaling, and available input methods, but this alone doesn't cover all cases. (See below)
Such a device usage type standard could allow retrieving a value like:
- "phone/touch-first mobile"
- "tablet/large touch-first mobile"
- "tv/gamepad- or remote-first device"
- "pc/mouse- and keyboard-first device"
(The -first is meant to say, this is likely what the user will mainly use and expect the UI to cater for, even if other input methods are available.)
Apologies if this standard exist, but I got the impression after talking to some UBports/Ubuntu Touch community members that it doesn't yet. (Not that they necessarily endorsed the idea that it needs to happen, please consult with them yourself for their opinion.)
Explanation why screen sizes, DPI, scaling, and input methods isn't enough sometimes(!) to detect form factor / ideal UI:
I think the best example is Valve's Steam's Big Picture Mode. It is a simplified UI with big images, focused on larger viewing distances and jumping quicker into games, assuming less time will be spent on the detail configuration. Now why would you want this if it's dumbed down?
Well, Steam Big Picture mode first of all allows a toggle. So if the user wants the "full" UI, it is still available. If you think about where it is used, Steam Big Picture Mode was made for Valve's idea of a game console, a "Steam Machine" (which never took off). The reason this is interesting to look at is because Steam Machine's would often have mouse, keyboard, big screen, and gamepad attached - so essentially same inputs as a desktop PC, yet you'd likely want to default to the Big Picture Mode because the expected default usage is different.
This is why such a standard might be useful, because as just illustrated, sometimes screen sizes and input methods alone don't tell enough about what type of device usage should be catered for.
Some technical suggestions:
-
All desktop environments should attempt to make a reasonable default guess (e.g. distributions made specifically as a boot image for a phone should try to default to "phone/touch-first mobile" mode) but should allow overriding it by the user,
-
the standard should be as easy to query through apps as possible, I guess dbus could be an idea? Env vars would be even easier but
-
the standard should also allow switching in device mode at preferably any time so that users can override e.g. "phone/touch-first mobile" into a regular "laptop/mouse keyboard first" at runtime if they want to, and make all applications recognize the change. I wouldn't expect all applications to support switching their UI around immediately as a response, but if any developers want to support such a quick response I feel like they should at least not be stopped from doing so.
Some organizational notes: it makes no sense to add this in without consulting with UBports/Ubuntu Touch people I believe, as well as those of KDE and GNOME that work on mobile versions like plasma mobile and such things. Also, please just close this if a standard for this is already available and I just missed it.