Mobile optimised apps on the home screen

Hello,

On the home screen of Librem 5, the apps are divided into ‘mobile optimised apps’ and ‘all apps’. In the meantime, however, I have installed apps that are indeed ‘mobile optimised’ but do not appear in the corresponding category, but only when I switch to the ‘all apps’ screen. I can’t move them all to the favourites bar either, the basic apps such as Phone, Mail etc. are already there.

What can I do?

Best regards
Klaus Hoffmann

2 Likes

You can add the following line of metadata code to the app’s respective .desktop entry:

X-Purism-FormFactor=Workstation;Mobile;

See also:

2 Likes

You can either:

  1. add them to the set of adaptive apps overrides, see
$ gsettings get sm.puri.phosh force-adaptive 
['re.sonny.Tangram.desktop ']
  1. or you can always show all applications, see
$ gsettings get sm.puri.phosh app-filter-mode
  1. or add X-Purism-FormFactor=Workstation;Mobile; to the apps desktop file but that means that it gets overwritten on updates

  2. Create a new desktop file in ~/.local/share/applications with X-Purism-FormFactor=Workstation;Mobile; but then you don’t pick up any changes to the apps desktop file

Hence solutions 1. and 2. are recommended (and work in the Phosh version shipped in PureOS Byzantium and recent versions).

3 Likes

That worked.

Thank you very much!

2 Likes

How does one add an app to “the set of adaptive apps overrides” ?

$ gsettings get sm.puri.phosh force-adaptive ['re.sonny.Tangram.desktop ']

gives

Usage:
 gsettings [--schemadir SCHEMADIR] get SCHEMA[:PATH] KEY

Get the value of KEY

Arguments:
 SCHEMADIR A directory to search for aditional schemas
 CHEMA     The name of the schema
 PATH      The path, for relocatable schemas
 KEY       They key within the schema

On it’s own

gsettings get sm.puri.phosh force-adaptive

gives what I think is the current list of adaptive apps.

2 Likes

The piece in red is the output from the command. You don’t type it.

However that command is get not set

3 Likes

Sorry, I don’t understand >…<

The piece in red is the output from the command. You don’t type it.

If you just type gsettings get sm.puri.phosh force-adaptive it will give you a list of what I think are the current adaptive apps.
So then, as OP asked: How do you make an app that is not mobile optimised, show in the optimised list?

However that command is get not set

gsettings get sm.puri.phosh force-adaptive
Outputs: a list of what I think are current adaptive apps

gsettings set sm.puri.phosh force-adaptive
Outputs:

Usage:
 gsettings [--schemadir SCHEMADIR] get SCHEMA[:PATH] KEY

Get the value of KEY

Arguments:
 SCHEMADIR A directory to search for aditional schemas
 CHEMA     The name of the schema
 PATH      The path, for relocatable schemas
 KEY       They key within the schema
1 Like

gsettings [--schemadir SCHEMADIR] set SCHEMA[:PATH] KEY VALUE

To get the current value you use get and don’t include a value.

To set the current value you use set and do include a value.

Note though that the syntax for set when used with a list of values is a bit baroque. The entire value argument needs to be enclosed in double quotes. The entire value inside the double quotes is enclosed in square brackets. Each value inside the square brackets is enclosed in single quotes and separated by a comma from the value that follows. Approximately like "['foo','bar']"

3 Likes

Thank you for sir. It does not work for me, I think I am just stupid.

The app I want to test with is called io.github.mlm_games.asteroids_revenge. It does not show in the menu and I have to tap on “Show All Apps” to see it in the menu.

As you suggested I tried gsettings set sm.puri.phosh force-adaptive "['io.github.mlm_games.asteroids_revenge']". There was no output so I assumed the command was successful.
Now, when typing gsettings get sm.puri.phosh force-adaptive it only outputs this one app ['io.github.mlm_games.asteroids_revenge'], which is a bit odd as before it gave me a list with more apps, but whatever.

Checking the menu, I still have to tap on “Show All Apps” to see the app. Even after a phone restart the app is not showing.

The value is an array so if you want more apps you do:

gsettings set sm.puri.phosh force-adaptive "['appid1', 'appid2', 'appid3']"

So go get back the default you use:

gsettings reset sm.puri.phosh force-adaptive

You can then grab that list via get and add your app. The manpage (man phosh) has examples and links to the Wiki at Configuration · Wiki · World / Phosh / phosh · GitLab

3 Likes

You also could install dconf-editor and go to the directory sm/puri/phosh/force-adaptive and edit the list if you are more familiar with UI than command lines or desktop files.

2 Likes

Maybe it needs the .desktop to be present in the name (and would, I guess, have to be an exact match on what the .desktop file is actually called).

2 Likes

OMG. You are right, thank you so much!
I was missing the .desktop, that’s why it was not working. It even shows the dconf-editor GUI that I should have added a .desktop at the end.


Now it works as expected :partying_face:

3 Likes