Difference between revisions of "Projects:PinePhone Daily Driver with Sway"

From Dejvino's Knowledge Base
Jump to navigation Jump to search
Line 29: Line 29:
 
}}
 
}}
 
(included in the POC repository)
 
(included in the POC repository)
 
=== lisgd ===
 
[[sxmo#lisgd]] reconfigured via a shell script for [[swaywm]]:
 
 
{{codeblock|title=swayphone-lisgd|1=<pre>#!/bin/bash
 
lisgd \
 
-g "1,l,r, false" \
 
-g "1,r,l, false" \
 
-g "1,u,d, false" \
 
-g "1,d,u, false" \
 
-g "2,l,r, swaymsg workspace prev" \
 
-g "2,r,l, swaymsg workspace next" \
 
-g "2,u,d, swaymsg exec swayphone_keyboard_hide" \
 
-g "2,d,u, swaymsg exec swayphone_keyboard_show" \
 
-g "3,l,r, swaymsg focus right" \
 
-g "3,r,l, swaymsg focus left" \
 
-g "3,u,d, swaymsg focus down" \
 
-g "3,d,u, swaymsg focus up" \
 
-g "4,l,r, swaymsg move right" \
 
-g "4,r,l, swaymsg move left" \
 
-g "4,u,d, swaymsg move down" \
 
-g "4,d,u, swaymsg move up" \
 
-v
 
</pre>}}
 
  
 
=== [[swayWM]] ===
 
=== [[swayWM]] ===
Line 62: Line 38:
 
* Pick a theme! Mine is: [https://github.com/carlosdss22/dotfiles/]
 
* 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.
 
* {{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]] ===
 
=== [[Bluetooth]] ===
Line 76: Line 60:
 
#* hibernation / suspend command
 
#* hibernation / suspend command
 
#* shortcut to enter suspend
 
#* shortcut to enter suspend
#* {{IconInfo}} {{code|1=rtcwake -m mem -s 10}}
+
#* {{IconInfo}} {{code|1=rtcwake -m mem -s 10}} ... {{IconFail}} does not resume operation after issuing ''s2idle''
 
# Install and test essential apps & workflows
 
# Install and test essential apps & workflows
## Terminal: [[termite]]
+
## {{IconDone}} Terminal: [[termite]]
## Web browser: [[Firefox]]
+
## {{IconWip}} Web browser: [[Firefox]]
## Passwords manager: [[KeepassXC]])
+
## {{IconTodo}} Passwords manager: [[KeepassXC]])
## Personal Information Manager with [[WebDAV]] sync support for calendar, contacts
+
## {{IconTodo}} Personal Information Manager with [[WebDAV]] sync support for calendar, contacts
## Email client: [[thunderbird]]
+
## {{IconTodo}} Email client: [[thunderbird]]
## Calculator: [[galculator]]
+
## {{IconDone}} Calculator: [[galculator]]
## Alarm: ?
+
## {{IconTodo}} Alarm: ?
## IM clients
+
## {{IconTodo}} IM clients
 
##* XMPP: ?
 
##* XMPP: ?
 
##* Matrix: ?
 
##* Matrix: ?
 
##* Slack: ?
 
##* Slack: ?
## Music player: [[audacious]]
+
## {{IconWip}} Music player: [[audacious]]
## Camera & Video recorder: ?
+
## {{IconTodo}} Camera & Video recorder: ?
## VPN client: [[NetworkManager]]?
+
## {{IconTodo}} VPN client: [[NetworkManager]]?
 
# Support for non-essential apps & workflows
 
# Support for non-essential apps & workflows
#* RSS client: ?
+
#* {{IconTodo}} RSS client: ?
#* OTP generator: ?
+
#* {{IconTodo}} OTP generator: ?
#* Ebook reader: ?
+
#* {{IconTodo}} Ebook reader: ?
#* Weather forecast: ?
+
#* {{IconTodo}} Weather forecast: ?
#* Maps, navigation: ?
+
#* {{IconTodo}} Maps, navigation: ?
#* Calls & Texts: ?
+
#* {{IconTodo}} Calls & Texts: ?
 
# Touch gestures and controls
 
# Touch gestures and controls
 
#* [[sxmo#lisgd]] {{todo|command line setup, compilation and install from the POC repo}}
 
#* [[sxmo#lisgd]] {{todo|command line setup, compilation and install from the POC repo}}
 
#* Custom input device? [https://python-evdev.readthedocs.io/en/latest/tutorial.html]
 
#* Custom input device? [https://python-evdev.readthedocs.io/en/latest/tutorial.html]
 
#* Wayland touch [https://wayland-book.com/seat/touch.html]
 
#* Wayland touch [https://wayland-book.com/seat/touch.html]
#* keyboard - layout to default to Terminal
 
# Sound
 
#* [https://wiki.alpinelinux.org/wiki/PulseAudio]
 
 
# tweaking
 
# tweaking
 
#* Configure [[Firefox]] for touch: [https://wiki.postmarketos.org/wiki/Firefox]?
 
#* Configure [[Firefox]] for touch: [https://wiki.postmarketos.org/wiki/Firefox]?

Revision as of 01:10, 31 May 2020

Implementation of Projects:PinePhone Daily Driver using swayWM.

Components

Setup

Configs are stored in a repository.

TODO: Create a postmarketOS package? [1]

Power Management

Shutdown secondary CPUs

# echo 0 > /sys/devices/system/cpu/cpu1/online

Don't disable all the CPUs!

cpu0 is the primary CPU, don't disable that one!

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)
    • hibernation / suspend command
    • 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
    3. Passwords manager: KeepassXC)
    4. Personal Information Manager with WebDAV sync support for calendar, contacts
    5. Email client: thunderbird
    6. Calculator: galculator
    7. Alarm: ?
    8. IM clients
      • XMPP: ?
      • Matrix: ?
      • Slack: ?
    9. Music player: audacious
    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. Touch gestures and controls
    • sxmo#lisgd TODO: command line setup, compilation and install from the POC repo
    • Custom input device? [3]
    • Wayland touch [4]
  5. tweaking
    • Configure Firefox for touch: [5]?
    • acpi for battery monitoring?
    • ...
  6. non-essential userspace apps
    • ...
  7. cool stuff
    • presentation mode [6]

Rejected solutions

under Wayland