All Projects → Dejvino → pinephone-sway-poc

Dejvino / pinephone-sway-poc

Licence: Apache-2.0 license
Sway UI configured for PinePhone (Proof Of Concept)

Programming Languages

CSS
56736 projects
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to pinephone-sway-poc

dotfiles
My dotfiles, with an out-of-date install-script. Arch, Tiling WM (i3, sway), ZSH, Neovim
Stars: ✭ 20 (-80.58%)
Mutual labels:  swaywm
swayinfo
Some goodies for use in Sway and i3 wm
Stars: ✭ 30 (-70.87%)
Mutual labels:  swaywm
wluma
Automatic brightness adjustment based on screen contents and ALS
Stars: ✭ 290 (+181.55%)
Mutual labels:  swaywm
dotfiles
My dotfiles and colorschemes for sway and a variety of other programs.
Stars: ✭ 55 (-46.6%)
Mutual labels:  swaywm
i3status
Simple status bar for i3 / i3-gaps / sway written in bash and python
Stars: ✭ 69 (-33.01%)
Mutual labels:  swaywm
nwg-wrapper
Wrapper to display a script output or a text file content on the desktop in sway or other wlroots-based compositors
Stars: ✭ 60 (-41.75%)
Mutual labels:  swaywm
Signal-Desktop-Builder
Signal Desktop Builder for Mobian Bookworm
Stars: ✭ 28 (-72.82%)
Mutual labels:  pinephone
pine64-scripts
Utility scripts for the pine64
Stars: ✭ 32 (-68.93%)
Mutual labels:  pinephone
waffy
wlroots compatible, touch friendly application launcher
Stars: ✭ 22 (-78.64%)
Mutual labels:  swaywm
Retiled
An attempt at creating a "desktop" environment mainly for Linux phones and tablets that's similar in function to some parts of Microsoft's Windows Phone 8.x, primarily the Start screen, Search app, navigation bar, Action Center, and the status bar. Development is mainly being done using the PinePhone, so that'll be the main supported device.
Stars: ✭ 41 (-60.19%)
Mutual labels:  pinephone
kitti3
Kitty drop-down service for sway & i3wm
Stars: ✭ 73 (-29.13%)
Mutual labels:  swaywm
sway-alttab
Simple Alt-Tab daemon for SwayWM/i3. Switches back to previous focused window on Alt-Tab or SIGUSR1
Stars: ✭ 36 (-65.05%)
Mutual labels:  swaywm
cute-sway-recorder
SwayWM screen recorder; a GUI for wf-recorder
Stars: ✭ 16 (-84.47%)
Mutual labels:  swaywm
dotfiles
my dotfiles
Stars: ✭ 18 (-82.52%)
Mutual labels:  swaywm
markets
A stock, currency and cryptocurrency tracker
Stars: ✭ 103 (+0%)
Mutual labels:  pinephone
openSUSEway
dotfiles for Sway on openSUSE
Stars: ✭ 48 (-53.4%)
Mutual labels:  swaywm
swaystatus
A minimal executable for displaying sway status per second
Stars: ✭ 14 (-86.41%)
Mutual labels:  swaywm
Vanilla
frantic1048's grimoire
Stars: ✭ 19 (-81.55%)
Mutual labels:  swaywm
persway
Small Sway IPC Daemon
Stars: ✭ 51 (-50.49%)
Mutual labels:  swaywm
dotfiles
My arch setup script and dotfiles
Stars: ✭ 37 (-64.08%)
Mutual labels:  swaywm

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

Screenshots

Install

postmarketOS

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

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

Arch Linux ARM

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.

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)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].