Projects:PinePhone Daily Driver with Sway

From Dejvino's Knowledge Base
Revision as of 16:24, 14 June 2020 by Dejvino (talk | contribs)
Jump to navigation Jump to search

Implementation of Projects:PinePhone Daily Driver using SwayWM.

Components

Setup

Configs are stored in a repository.

TODO: Create a postmarketOS package? [1]

Power Management

  • backlight off and CPU sleep when screen is locked via power button
  • handled via PinePhone-Toolkit

sudo

Add NOPASSWD for shutdown and reboot to wheel group:

visudo%wheel ALL=(ALL) ALL %wheel ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/reboot

elogind

Power key needs to be locked from elogind, otherwise it would shutdown the system. This way as long as the UI session is running, power button is ignored by elogind. Once the session ends and we're back in the login screen, the power button is again able to shutdown the system.

/usr/share/wayland-sessions/sway.desktop... Exec=elogind-inhibit --what=handle-power-key --mode=block dbus-run-session /usr/bin/sway ... (included in the POC repository)

SwayWM

(config included in the POC repository)

waybar

(config included in the POC repository)

  • Pick a theme! Mine is: [2]
  • [i] For clock module, don't forget to set the locale and timezone parameters, otherwise nothing will show up.

lisgd

sxmo#lisgd reconfigured through command line parameters in SwayWM config.

(config included in the POC repository)

PinePhone-Toolkit

Used mainly in SwayWM config.

Bluetooth

  • Enable the service on boot: rc-update add bluetooth
  • Enable the controller by default:

/etc/bluetooth/main.conf[Policy] AutoEnable=true

TODOs

TODO: Complete these TODOs!

  1. power saving (so that I can leave the battery in the device when I'm not using it)
    1. hibernation / suspend command - needs crust support in pmos: issue 550
    2. shortcut to enter suspend
      • [i] rtcwake -m mem -s 10 ... does not resume operation after issuing s2idle
  2. Install and test essential apps & workflows
    1. Terminal: termite
    2. Web browser: Firefox
      • Mostly works. Portrait mode doesn't fit perfectly. Clunky UI, some menus overflow.
    3. Passwords manager: KeepassXC)
      • Doesn't support such a small screen. Modify and submit a PR?
    4. Personal Information Manager with WebDAV sync support for calendar, contacts
    5. Email client: thunderbird
      • Doesn't support such a small screen. Modify and submit a PR?
    6. Calculator: galculator
    7. Alarm: ?
    8. IM clients
      • XMPP: ?
      • Matrix: ?
      • Slack: ?
    9. Music player: audacious
      • A few problems with the small screen. Otherwise seems to work.
    10. Camera & Video recorder: ?
    11. VPN client: NetworkManager?
  3. Support for non-essential apps & workflows
    • RSS client: ?
    • OTP generator: ?
    • Ebook reader: ?
    • Weather forecast: ?
    • Maps, navigation: ?
    • Calls & Texts: ?
  4. Tweaking
  5. non-essential userspace apps
    • ...
  6. cool stuff
    • presentation mode [4]
    • night mode: flux / nightlight / redshift / ...

Rejected solutions

under Wayland