1
0
mirror of https://github.com/Dejvino/pinephone-sway-poc.git synced 2024-12-22 02:28:49 +00:00

Add gestures via lisgd. Add keyboard show and hide. Add quicklaunch menu.

This commit is contained in:
Dejvino 2020-05-31 03:02:24 +02:00
parent b6346d721c
commit 707d0c77c2
6 changed files with 65 additions and 5 deletions

View File

@ -28,7 +28,7 @@ install_user_htop:
### ###
# INSTALL - SYSTEM # INSTALL - SYSTEM
### ###
install_system: install_system_check install_system_lightdm install_system: install_system_check install_system_lightdm install_system_bin
install_system_check: install_system_check:
@echo "Note: install needs to be run as root." @echo "Note: install needs to be run as root."
@ -36,6 +36,10 @@ install_system_check:
install_system_lightdm: install_system_lightdm:
cp usr/share/wayland-sessions/* /usr/share/wayland-sessions/ cp usr/share/wayland-sessions/* /usr/share/wayland-sessions/
install_system_bin:
chmod go+rx usr/local/bin/*
cp usr/local/bin/* /usr/local/bin/
### ###
# FETCH # FETCH
### ###

39
home/config/sway/config Normal file → Executable file
View File

@ -80,7 +80,7 @@ output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
floating_modifier $mod normal floating_modifier $mod normal
# Reload the configuration file # Reload the configuration file
bindsym $mod+Shift+c reload bindsym $mod+Ctrl+c reload
# Exit sway (logs you out of your Wayland session) # Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
@ -172,6 +172,7 @@ output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
# Show the next scratchpad window or hide the focused scratchpad window. # Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them. # If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show bindsym $mod+minus scratchpad show
# #
# Resizing containers: # Resizing containers:
# #
@ -197,6 +198,21 @@ mode "resize" {
} }
bindsym $mod+r mode "resize" bindsym $mod+r mode "resize"
#
# Power Button
#
set $lockapp swaylock
set $lock '$lockapp -f -c 000000'
set $unlock 'killall $lockapp'
set $pplock 'pptk-led set red 1; pptk-cpu-sleep enable; pptk-backlight get > ~/.backlight ; pptk-backlight set 0'
set $ppunlock 'pptk-led set red 0; pptk-cpu-sleep disable; pptk-backlight set `cat ~/.backlight`'
## wish this worked...
#bindsym XF86PowerOff exec $lock
#bindsym --locked XF86PowerOff exec $unlock
# alternative:
bindcode 124 exec $lock; exec $pplock
bindcode --locked 124 exec $unlock; exec $ppunlock
# Scale the touchscreen LCD 2x # Scale the touchscreen LCD 2x
output DSI-1 scale 2 output DSI-1 scale 2
@ -204,9 +220,28 @@ output DSI-1 scale 2
exec squeekboard exec squeekboard
# Gesture detection # Gesture detection
exec lisgd exec 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"
# Top and bottom status bar # Top and bottom status bar
exec "waybar -c ~/.config/waybar/config_0 -b b0" exec "waybar -c ~/.config/waybar/config_0 -b b0"
exec "waybar -c ~/.config/waybar/config_1 -b b1" exec "waybar -c ~/.config/waybar/config_1 -b b1"
# Restore backlight
exec "cat ~/.backlight && pptk-backlight set `cat ~/.backlight`"

4
home/config/waybar/config_0 Normal file → Executable file
View File

@ -38,8 +38,8 @@
"timezone": "Europe/Berlin", "timezone": "Europe/Berlin",
"format": " {:%e %b %Y}", // Icon: calendar-alt "format": " {:%e %b %Y}", // Icon: calendar-alt
//"tooltip-format": "{:%e %B %Y}" //"tooltip-format": "{:%e %B %Y}"
"tooltip": true "tooltip": true,
"on-click": "termite -e swayphone_menuselect"
}, },
"battery": { "battery": {

View File

@ -0,0 +1,3 @@
#!/bin/bash
busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b false

View File

@ -0,0 +1,4 @@
#!/bin/bash
pidof squeekboard || squeekboard &
busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true

View File

@ -0,0 +1,14 @@
#!/bin/bash
MENUOPTIONS=~/.menuoptions
MENUSELECT=~/.menuselect
if [ ! -f $MENUOPTIONS ]
then
echo 'termite Terminal' > $MENUOPTIONS
echo 'audacious Music_Player' >> $MENUOPTIONS
echo 'firefox Web_Browser' >> $MENUOPTIONS
fi
dialog --menu EXECUTE 15 40 6 `cat $MENUOPTIONS` 2>$MENUSELECT && swaymsg exec `cat $MENUSELECT`