Difference between revisions of "Projects:PinePhone Daily Driver with Sway"
(Created page with "Implementation of Projects:PinePhone Daily Driver using swayWM. {{Warning|Currently discontinued. Using swayWM (Wayland) proved too hard for now due to proble...") |
|||
| (35 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | Implementation of [[Projects:PinePhone Daily Driver]] using [[ | + | Implementation of [[Projects:PinePhone Daily Driver]] using [[SwayWM]]. |
| − | {{ | + | {{warning|1='''HARDCORE''' |
| − | + | It is too much work to put all of the parts of the system together and maintain them on your own! | |
| − | + | Next stop: [[Projects:PinePhone Daily Driver with Arch Linux]]}} | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | == | + | == Components == |
| − | + | * [[Arch Linux ARM]] with [[SwayWM]] | |
| + | * [[PinePhone-Toolkit|pinephone-toolkit]] | ||
| + | * System packages: [[sddm]] [[bemenu]] [[networkmanager]] [[alacritty]] [[bluez]] [[squeekboard]] | ||
| + | * App packages: [[vim]] [[firefox]] [[galculator]] [[thunderbird]] [[vlc]] [[birdie]] [[htop]] | ||
| − | + | == Setup == | |
| + | Configs are stored in a [https://github.com/Dejvino/pinephone-sway-poc repository]. | ||
| − | + | {{Todo|Create a package for people to use and install easily}} | |
| − | |||
| − | |||
| − | |||
| − | ==== [[Bluetooth]] | + | === 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: | ||
| + | |||
| + | {{codeblock|title=visudo|1=%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. | ||
| + | |||
| + | {{codeblock|title=/usr/share/wayland-sessions/sway.desktop|1= | ||
| + | ... | ||
| + | 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: [https://github.com/carlosdss22/dotfiles/] | ||
| + | * {{IconInfo}} 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: {{code|1=rc-update add bluetooth}} | * Enable the service on boot: {{code|1=rc-update add bluetooth}} | ||
* Enable the controller by default: | * Enable the controller by default: | ||
| Line 37: | Line 63: | ||
}} | }} | ||
| − | + | === TODOs === | |
| − | * {{ | + | {{todo|Complete these TODOs!}} |
| − | ** | + | # power saving (so that I can leave the battery in the device when I'm not using it) |
| − | * {{ | + | ## hibernation / suspend command - needs crust support in pmos: [https://gitlab.com/postmarketOS/pmaports/-/issues/550 issue 550] |
| − | * {{ | + | ## shortcut to enter suspend |
| − | * {{ | + | ##* {{IconInfo}} {{code|1=rtcwake -m mem -s 10}} ... {{IconFail}} does not resume operation after issuing ''s2idle'' |
| − | * {{ | + | # Core UI |
| + | #* Display rotation | ||
| + | #** Vertical waybar - hide/show based on output transformation/waybar-window size [https://github.com/Alexays/Waybar/search?q=hidden&unscoped_q=hidden] | ||
| + | # Install and test essential apps & workflows | ||
| + | ## {{IconDone}} Terminal: [[termite]] | ||
| + | ## {{IconWip}} Web browser: [[Firefox]] | ||
| + | ##* Mostly works. Portrait mode doesn't fit perfectly. Clunky UI, some menus overflow. | ||
| + | ## {{IconWip}} Passwords manager: [[KeepassXC]]) | ||
| + | ##* Doesn't support such a small screen. Modify and submit a PR? | ||
| + | ## {{IconTodo}} Personal Information Manager with [[WebDAV]] sync support for calendar, contacts | ||
| + | ## {{IconTodo}} Email client: [[thunderbird]] | ||
| + | ##* Doesn't support such a small screen. Modify and submit a PR? | ||
| + | ## {{IconDone}} Calculator: [[galculator]] | ||
| + | ## {{IconTodo}} Alarm: ? | ||
| + | ## {{IconTodo}} IM clients | ||
| + | ##* XMPP: ? | ||
| + | ##* Matrix: ? | ||
| + | ##* Slack: ? | ||
| + | ## {{IconWip}} Music player: [[audacious]] | ||
| + | ##* A few problems with the small screen. Otherwise seems to work. | ||
| + | ## {{IconTodo}} Camera & Video recorder: ? | ||
| + | ## {{IconTodo}} VPN client: [[NetworkManager]]? | ||
| + | # Support for non-essential apps & workflows | ||
| + | #* {{IconTodo}} RSS client: ? | ||
| + | #* {{IconTodo}} OTP generator: ? | ||
| + | #* {{IconTodo}} Ebook reader: ? | ||
| + | #* {{IconTodo}} Weather forecast: ? | ||
| + | #* {{IconTodo}} Maps, navigation: ? | ||
| + | #* {{IconTodo}} Calls & Texts: ? | ||
| + | #* {{IconTodo}} Samba share mounted from NAS | ||
| + | #** CIFS is not supported by the kernel right now | ||
| + | # Tweaking | ||
| + | #* Configure [[Firefox]] for touch: [https://wiki.postmarketos.org/wiki/Firefox]? | ||
| + | #* ... | ||
| + | # non-essential userspace apps | ||
| + | #* ... | ||
| + | # cool stuff | ||
| + | #* presentation mode [https://github.com/Alexays/Waybar/wiki/Module:-Idle-Inhibitor] | ||
| + | #* night mode: flux / nightlight / redshift / ... | ||
| + | #* automated brightness based on screen content [https://github.com/maximbaz/wluma] | ||
== Rejected solutions == | == Rejected solutions == | ||
Latest revision as of 04:17, 23 October 2021
Implementation of Projects:PinePhone Daily Driver using SwayWM.
(!) HARDCORE
It is too much work to put all of the parts of the system together and maintain them on your own!
Contents
Components
- Arch Linux ARM with SwayWM
- pinephone-toolkit
- System packages: sddm bemenu networkmanager alacritty bluez squeekboard
- App packages: vim firefox galculator thunderbird vlc birdie htop
Setup
Configs are stored in a repository.
TODO: Create a package for people to use and install easily
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: [1]
- [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!
- power saving (so that I can leave the battery in the device when I'm not using it)
- hibernation / suspend command - needs crust support in pmos: issue 550
- shortcut to enter suspend
- [i]
rtcwake -m mem -s 10... ☓ does not resume operation after issuing s2idle
- [i]
- Core UI
- Display rotation
- Vertical waybar - hide/show based on output transformation/waybar-window size [2]
- Display rotation
- Install and test essential apps & workflows
- ☑ Terminal: termite
- ☆ Web browser: Firefox
- Mostly works. Portrait mode doesn't fit perfectly. Clunky UI, some menus overflow.
- ☆ Passwords manager: KeepassXC)
- Doesn't support such a small screen. Modify and submit a PR?
- ☐ Personal Information Manager with WebDAV sync support for calendar, contacts
- ☐ Email client: thunderbird
- Doesn't support such a small screen. Modify and submit a PR?
- ☑ Calculator: galculator
- ☐ Alarm: ?
- ☐ IM clients
- XMPP: ?
- Matrix: ?
- Slack: ?
- ☆ Music player: audacious
- A few problems with the small screen. Otherwise seems to work.
- ☐ Camera & Video recorder: ?
- ☐ VPN client: NetworkManager?
- Support for non-essential apps & workflows
- ☐ RSS client: ?
- ☐ OTP generator: ?
- ☐ Ebook reader: ?
- ☐ Weather forecast: ?
- ☐ Maps, navigation: ?
- ☐ Calls & Texts: ?
- ☐ Samba share mounted from NAS
- CIFS is not supported by the kernel right now
- Tweaking
- non-essential userspace apps
- ...
- cool stuff
Rejected solutions
under Wayland
- libinput-gestures
- twofing
- onboard virtual keyboard