|Dejvino eff323bf72||2 years ago|
|home/config||2 years ago|
|lisgd @ 877beea273||3 years ago|
|patches||3 years ago|
|pinephone-toolkit @ 0deaf8473a||2 years ago|
|rot8 @ 8f2128c172||3 years ago|
|usr||2 years ago|
|.gitmodules||3 years ago|
|LICENSE||3 years ago|
|Makefile||3 years ago|
|README.md||2 years ago|
|screenshots.png||3 years ago|
Sway UI configured for PINE64 PinePhone (Proof Of Concept)
You can find ready-made config files, scripts and installation instructions on how to set up Sway on Arch Linux ARM or postmarketOS and use it with a PinePhone.
Start with a postmarketOS for PinePhone image with
postmarketos-ui-sway installed. Either use the pre-built demo image or build a custom one with
Flash the system onto the phone (either to an SD card or directly to the eMMC with Jumpdrive).
Open a terminal on the phone (either through SSH, the serial connection or directly on the screen) and run this:
# system components $ sudo apk add waybar bemenu swaylock swayidle squeekboard bash dialog tzdata # user components $ sudo apk add networkmanager htop pavucontrol # build tools $ sudo apk add git make meson ninja cargo linux-headers libinput-dev eudev-dev
Start with a Pine64-Arch image flashed to the phone. You’ll need the
sway package and most of what is mentioned in the
postmarketOS section. Disable (or remove) the default
phosh package so that it doesn’t get loaded on boot.
# installation $ git clone --recurse-submodules https://github.com/Dejvino/pinephone-sway-poc $ cd pinephone-sway-poc $ make install_user $ sudo make install_system # power button sudo vim /etc/systemd/logind.conf # or /etc/elogind/logind.conf for non-systemd distros (pmOS) # replace: # #HandlePowerKey=poweroff # with: # HandlePowerKey=suspend
That’s it. You should now have everything in place. Reboot to use the new settings.
Study the provided config files and shell scripts to get more details. The following is just an introduction.
The power button activates or deactivates a “sleep mode” (suspend). This mode is automatically entered after a period of inactivity (via swayidle). Before that, the backlight is first turned low, then the backlight is turned off and all the CPUs except for the primary one are shut down. The indicator LED is used to indicate the power mode: 1) green = running, low power usage, 2) blue = suspend.
The bars show you CPU/MEM usage, backlight brightness, time, etc. Touching them opens a relevant app (e.g. NetworkManager or htop). Touching the date opens a custom “quick execute” menu to launch an app. The [x] icon closes the active window. Touching the backlight indicator brings up a custom brightness setting app.
Swiping two fingers up / down activates or hides the on-screen keyboard. Swiping two fingers left / right changes the active workspace. Three fingers change the active window in the direction of the swipe. Four fingers move the active window accordingly.
The screen is automatically rotated based on the readings from the phone’s built-in accelerometer.
You can use this as a configs backup mechanism!
$ make fetch
Running this command gathers the relevant config files from your running system and replaces the files in the repository. You can then
git add and
commit your own changes, straight from the phone! This is actually how the config files here were created.
(packaged = available as a package directly from the repository)