Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
Dejvino b38b29788f Drop pmos il y a 2 ans
home/config Power management supports suspend. Mentioned ALARM. il y a 3 ans
lisgd @ 877beea273 Add lisgd and rot8 support il y a 4 ans
patches Add lisgd patch to support screen rotation. il y a 3 ans
pinephone-toolkit @ 0deaf8473a Update toolkit il y a 3 ans
rot8 @ 8f2128c172 Add lisgd and rot8 support il y a 4 ans
usr Drop pmos il y a 2 ans
.gitmodules Add vertical waybar for landscape mode il y a 3 ans
LICENSE Initial commit il y a 4 ans
Makefile Fixed lisgd version with for the patch file il y a 3 ans
README.md Drop pmos il y a 2 ans
TODO.md Drop pmos il y a 2 ans
screenshots.png Update README with screenshot. il y a 4 ans

README.md

pinephone-sway-poc

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 and use it with a PinePhone.

Screenshots

Install

Arch Linux ARM

Start with a Pine64-Arch image flashed to the phone and get SSH access.

Disable the default phosh.service so that it doesn’t get started on boot (sudo systemctl disable --now phosh.service).

Run this installation:

# system components
$ sudo pacman -S sway waybar bemenu bemenu-wayland swaylock swayidle squeekboard bash dialog tzdata alacritty

# build tools
$ sudo pacman -S git make meson ninja cargo linux-headers 

# user components
$ sudo pacman -S networkmanager htop pavucontrol

# theme components
$ sudo pacman -S ttf-font-awesome

Common

# 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.

Usage

Study the provided config files and shell scripts to get more details. The following is just an introduction.

Power Button

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.

Top and bottom waybar

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.

Touch gestures

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.

Screen Rotation

The screen is automatically rotated based on the readings from the phone’s built-in accelerometer.

TIP!

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.

Components

  • postmarketOS / Arch Linux ARM - base Linux distribution (though any other would work as well)
  • sway (packaged) - tiling Wayland compositor
    • swayidle, swaylock - utils for sway
  • bemenu (packaged) - app launcher
  • waybar (packaged) - Wayland status bar
  • squeekboard (packaged) - on-screen keyboard for Wayland
  • pinephone-toolkit - various utilities for the PinePhone
  • sxmo-lisgd - gesture detection daemon
  • rot8 - screen rotation daemon using data from the accelerometer
  • htop (packaged) - Processes monitoring
  • pavucontrol (packaged) - PulseAudio control panel
  • mako (packaged) - Notify daemon

(packaged = available as a package directly from the repository)