Difference between revisions of "Projects:PinePhone Daily Driver with Sway"
Jump to navigation
Jump to search
| Line 1: | Line 1: | ||
Implementation of [[Projects:PinePhone Daily Driver]] using [[swayWM]]. | Implementation of [[Projects:PinePhone Daily Driver]] using [[swayWM]]. | ||
| − | + | == Components == | |
* [[postmarketOS]] with [[swayWM|postmarketos-ui-sway]] | * [[postmarketOS]] with [[swayWM|postmarketos-ui-sway]] | ||
* System packages: [[bemenu]] [[networkmanager]] [[termite]] termite-terminfo [[bluez]] | * System packages: [[bemenu]] [[networkmanager]] [[termite]] termite-terminfo [[bluez]] | ||
* App packages: [[vim]] [[firefox]] [[galculator]] [[thunderbird]] [[gajim]] [[audacious]] audacious-plugins | * App packages: [[vim]] [[firefox]] [[galculator]] [[thunderbird]] [[gajim]] [[audacious]] audacious-plugins | ||
| − | + | == Setup == | |
{{Todo|Move some of this setup into a repository}} | {{Todo|Move some of this setup into a repository}} | ||
{{Todo|Create a [[postmarketOS]] package? [https://wiki.postmarketos.org/wiki/Create_a_package]}} | {{Todo|Create a [[postmarketOS]] package? [https://wiki.postmarketos.org/wiki/Create_a_package]}} | ||
| − | ==== lisgd | + | === [[elogind]] === |
| + | {{codeblock|title=/usr/share/wayland-sessions/sway.desktop|1= | ||
| + | ... | ||
| + | Exec=elogind-inhibit --who=sway --what="handle-power-key" --mode="block" dbus-run-session /usr/bin/sway | ||
| + | ... | ||
| + | }} | ||
| + | |||
| + | === lisgd === | ||
{{codeblock|title=~/build/lisgd/lisgd.h|1= | {{codeblock|title=~/build/lisgd/lisgd.h|1= | ||
/* Commands to execute upon recieving a swipe gesture */ | /* Commands to execute upon recieving a swipe gesture */ | ||
| Line 36: | Line 43: | ||
cp ~/build/lisgd/lisgd /usr/local/bin/lisgd}} | cp ~/build/lisgd/lisgd /usr/local/bin/lisgd}} | ||
| − | + | === [[swayWM]] === | |
# Copy {{code|1=/etc/sway/config}} to {{code|1=~/.config/sway/config}} | # Copy {{code|1=/etc/sway/config}} to {{code|1=~/.config/sway/config}} | ||
# Edit: | # Edit: | ||
| Line 59: | Line 66: | ||
exec lisgd}} | exec lisgd}} | ||
| − | + | === [[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 67: | Line 74: | ||
}} | }} | ||
| − | + | === TODOs === | |
{{todo|Complete these TODOs!}} | {{todo|Complete these TODOs!}} | ||
# power saving (so that I can leave the battery in the device when I'm not using it) | # power saving (so that I can leave the battery in the device when I'm not using it) | ||
Revision as of 21:26, 25 May 2020
Implementation of Projects:PinePhone Daily Driver using swayWM.
Contents
Components
- postmarketOS with postmarketos-ui-sway
- System packages: bemenu networkmanager termite termite-terminfo bluez
- App packages: vim firefox galculator thunderbird gajim audacious audacious-plugins
Setup
TODO: Move some of this setup into a repository
TODO: Create a postmarketOS package? [1]
elogind
/usr/share/wayland-sessions/sway.desktop...
Exec=elogind-inhibit --who=sway --what="handle-power-key" --mode="block" dbus-run-session /usr/bin/sway
...
lisgd
~/build/lisgd/lisgd.h/* Commands to execute upon recieving a swipe gesture */
Gesture gestures[] = {
/* fingers start end command */
{ 1, Left, Right, "swaymsg workspace prev" },
{ 1, Right, Left, "swaymsg workspace next" },
{ 2, Left, Right, "xdotool key --clearmodifiers Alt+e" },
{ 2, Right, Left, "xdotool key --clearmodifiers Alt+r" },
{ 2, Down, Up, "swayphone_keyboard_show" },
{ 2, Up, Down, "swayphone_keyboard_hide" },
{ 3, Down, Up, "sxmo_vol.sh up" },
{ 3, Up, Down, "sxmo_vol.sh down" },
{ 4, Down, Up, "sxmo_brightness.sh up" },
{ 4, Up, Down, "sxmo_brightness.sh down" },
};
TODO: Finish updating this
# TODO: cloning and building the app
cp ~/build/lisgd/lisgd /usr/local/bin/lisgd
swayWM
- Copy
/etc/sway/configto~/.config/sway/config - Edit:
~/.config/sway/config xargs swaymsg exec --
[...]
# Kill focused window
bindsym $mod+q kill
[...]
- Default scaling for the touchscreen
output DSI-1 scale 2
- Initial utility apps
exec squeekboard
exec lisgd
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
- shortcut to enter suspend
- Install and test essential apps & workflows
- Terminal: termite
- Web browser: Firefox
- Passwords manager: KeepassXC)
- Personal Information Manager with WebDAV sync support for calendar, contacts
- Email client: thunderbird
- Calculator: galculator
- Alarm: ?
- IM clients
- XMPP: ?
- Matrix: ?
- Slack: ?
- Music player: audacious
- Camera & Video recorder: ?
- VPN client: NetworkManager?
- Support for non-essential apps & workflows
- RSS client: ?
- OTP generator: ?
- Ebook reader: ?
- Weather forecast: ?
- Maps, navigation: ?
- Calls & Texts: ?
- Touch gestures and controls
- sxmo#lisgd
- twofing
- easystroke (abandoned)
- wmctrl, xdotool, xte, ...
- Custom input device? [2]
- tweaking
- non-essential userspace apps
- ...
Rejected solutions
under Wayland
- libinput-gestures
- twofing
- onboard virtual keyboard