-
-
Notifications
You must be signed in to change notification settings - Fork 108
Scale apps to fit with screen
For apps that aren't supported for mobile (e.g. gnome-system-monitor, gnome-maps,...), it's possible to make Phoc to scale the app to fit with the display.
As of phoc-0.4.0-2, scale-to-fit helper script is available, which makes this task simpler, and it's also very easy to adapt it to an app.
To do this, open the terminal:
- Run your favorite wayland app, but with the following environment variable:
WAYLAND_DEBUG=client
- Look for something that looks like this
[email protected]_app_id(“firefox”)
- Now the name inside set_app_id is your appid (which is "firefox"), now to adapt it you need to exit the app and run:
scale-to-fit firefox on
And without reboot or any modification, the application will start just fine.
If you don't want to hunt for one line in a lot of debug output, try using this script:
#!/bin/bash
WAYLAND_DEBUG=1 $1 |& grep 'xdg_toplevel@[0-9]\+\.set_app_id'
Just copy these two lines into a text file, e.g. named get-app-id.sh, on your PinePhone and make it executable by running $ chmod +x get-app-id.sh
.
Let's say, you want to use KeePassXC, which does not scale well by default, but becomes somewhat usable by running scale-to-fit. But you won’t get there by running $ scale-to-fit keepassxc on
. You can now run $ ./get-app-id.sh keepassxc
and KeePassXC will start up. Go back to your terminal and you will find a line of text similar to:
[4049990.198] -> [email protected]_app_id("org.keepassxc.KeePassXC")
The part between the “” is what you are looking for. Just run $ scale-to-fit org.keepassxc.KeePassXC on
and the next time you start KeePassXC, it should be usable.
You can tell Phoc to scale every app that doesn't fit the screen. Tested with 0.5.1-1.
gsettings set sm.puri.phoc scale-to-fit true