Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

README.md 3.6 KiB

há 4 anos
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # pinephone-sway-poc
  2. Sway UI configured for PINE64 PinePhone (Proof Of Concept)
  3. You can find ready-made config files, scripts and installation instructions on how to set up Sway on postmarketOS and use it with a PinePhone.
  4. ![Screenshots](./screenshots.png)
  5. ## Install
  6. Start with a [postmarketOS](https://wiki.postmarketos.org/wiki/PINE64_PinePhone_(pine64-pinephone)) for PinePhone image with `postmarketos-ui-sway` installed. Either use the pre-built demo image or build a custom one with `pmbootstrap`.
  7. Flash the system onto the phone (either to an SD card or directly to the eMMC with Jumpdrive).
  8. Open a terminal on the phone (either through SSH, the serial connection or directly on the screen) and run this:
  9. ```
  10. # components
  11. $ sudo apk add linux-headers waybar bemenu swaylock swayidle networkmanager htop pavucontrol
  12. # build tools
  13. $ sudo apk add git make meson ninja cargo
  14. # installation
  15. $ git clone --recurse-submodules https://github.com/Dejvino/pinephone-sway-poc
  16. $ cd pinephone-sway-poc
  17. $ make install_user
  18. $ sudo make install_system
  19. ```
  20. That's it. You should now have everything in place. Reboot to use the new settings.
  21. ## Usage
  22. Study the provided config files and shell scripts to get more details. The following is just an introduction.
  23. ### Power Button
  24. The power button activates or deactivates a "sleep mode", in which the backlight is turned off, all the CPUs except for the primary one are shut down and the red LED is turned on to indicate the phone is turned on.
  25. ### Top and bottom waybar
  26. 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.
  27. ### Touch gestures
  28. 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.
  29. ### Screen Rotation
  30. The screen is automatically rotated based on the readings from the phone's built-in accelerometer.
  31. ## TIP!
  32. You can use this as a configs backup mechanism!
  33. ```
  34. $ make fetch
  35. ```
  36. 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.
  37. ## Components
  38. * postmarketOS - base Linux distribution (though any other would work as well)
  39. * sway (pmos package) - tiling Wayland compositor
  40. * * swayidle, swaylock - utils for sway
  41. * bemenu (pmos package) - app launcher
  42. * waybar (pmos package) - Wayland status bar
  43. * * [carlosdss22/dotfiles](https://github.com/carlosdss22/dotfiles/tree/master/waybar) - styles used
  44. * squeekboard (pmos package) - on-screen keyboard for Wayland
  45. * * [terminal.yaml](https://source.puri.sm/btantau/squeekboard/blob/btantau-master-patch-76686/data/keyboards/terminal.yaml) - keyboard layout based on this improved version
  46. * [pinephone-toolkit](https://github.com/Dejvino/pinephone-toolkit) - various utilities for the PinePhone
  47. * [sxmo-lisgd](https://git.sr.ht/~mil/lisgd) - gesture detection daemon
  48. * [rot8](https://github.com/efernau/rot8) - screen rotation daemon using data from the accelerometer
  49. * htop (pmos package) - Processes monitoring
  50. * pavucontrol (pmos package) - PulseAudio control panel
  51. (*pmos package* = available as a package directly from the postmarketOS repository)