PINE64
Using sway along phosh - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+---- Forum: Mobian on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=139)
+---- Thread: Using sway along phosh (/showthread.php?tid=12875)



Using sway along phosh - fdlamotte - 01-23-2021

As a sway user on desktop, I've been trying to use it on my pinephone. One of the shortcomings is that on mobian, most of the phone related functions are (well) integrated into phosh and I didn't want to loose that. 

Sway use on the pinephone is mostly interesting in docked mode or when a keyboard is plugged in ...

I've identified 3 ways to achieve sway integration 

 1 - run sway on a tty
 2 - run sway inside phosh
 3 - replace phoc with sway as phosh compositor

1 is trivial, you switch to a tty (Ctrl+Alt+F1 on the keyboard), log in and launch sway. It works well but is not really integrated. For instance, when you receive a call you need to switch to phosh terminal, and so I quickly abandoned this solution

3 seems to need some work and might not be feasible due to the way phoc and phosh seems to be tight together through D-Bus things ...

2 has always had my preference, and I didn't know why it never worked when I tried it, since as sway can be used as a wayland client, it should be as easy as typing sway in a terminal. Today I gave it another try and figured out what was wrong. Before launching phoc it restricts WLR_BACKENDS to drm and libinput. And sway was using this variable. So to run sway this way all you have to do is type WLR_BACKENDS=wayland sway ... and it magically works.

Then to use it fullscreen I associated toggle-fullscreen command to Alt+F11

There are still some issues, one is that sway don't get the good keys from the squeekboard that runs in phosh. But this way, you can keep a full desktop in a corner, pop it up when connected to a screen or just to a keyboard, and I find this quite interesting ...

Hope it will be of some help to some of you

Regards,
--
FdL


RE: Using sway along phosh - fdlamotte - 01-24-2021

phosh can also be run from sway or any wm/compositor ... and its very neat as convergent desktop


RE: Using sway along phosh - kabouik - 05-11-2023

I just found your thread while looking for something else, but I am using the same on Droidian with a keyboard-slider phone, made a quick video to demonstrate it: https://youtu.be/WkxzsoP8BvI?t=154

However, have you found a way to make apps open from Sway open in Sway? This only works for a fraction of apps, most of them will still open as new Phosh windows instead of within Sway, or won't open at all. Still really useful for TUI apps, but I would like to be able to show 100% of apps as Sway windows.