diff --git a/Makefile b/Makefile index 3d11ada..585d6c1 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ install_user_htop: ### # INSTALL - SYSTEM ### -install_system: install_system_check install_system_lightdm +install_system: install_system_check install_system_lightdm install_system_bin install_system_check: @echo "Note: install needs to be run as root." @@ -36,6 +36,10 @@ install_system_check: install_system_lightdm: 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 ### diff --git a/home/config/sway/config b/home/config/sway/config old mode 100644 new mode 100755 index a909ee1..b6dbcdb --- a/home/config/sway/config +++ b/home/config/sway/config @@ -80,7 +80,7 @@ output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill floating_modifier $mod normal # Reload the configuration file - bindsym $mod+Shift+c reload + bindsym $mod+Ctrl+c reload # 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' @@ -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. # If there are multiple scratchpad windows, this command cycles through them. bindsym $mod+minus scratchpad show + # # Resizing containers: # @@ -197,6 +198,21 @@ 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 output DSI-1 scale 2 @@ -204,9 +220,28 @@ output DSI-1 scale 2 exec squeekboard # 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 exec "waybar -c ~/.config/waybar/config_0 -b b0" exec "waybar -c ~/.config/waybar/config_1 -b b1" +# Restore backlight +exec "cat ~/.backlight && pptk-backlight set `cat ~/.backlight`" + diff --git a/home/config/waybar/config_0 b/home/config/waybar/config_0 old mode 100644 new mode 100755 index f92c467..541ffbb --- a/home/config/waybar/config_0 +++ b/home/config/waybar/config_0 @@ -38,8 +38,8 @@ "timezone": "Europe/Berlin", "format": " {:%e %b %Y}", // Icon: calendar-alt //"tooltip-format": "{:%e %B %Y}" - "tooltip": true - + "tooltip": true, + "on-click": "termite -e swayphone_menuselect" }, "battery": { diff --git a/usr/local/bin/swayphone_keyboard_hide b/usr/local/bin/swayphone_keyboard_hide new file mode 100755 index 0000000..751de11 --- /dev/null +++ b/usr/local/bin/swayphone_keyboard_hide @@ -0,0 +1,3 @@ +#!/bin/bash + +busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b false diff --git a/usr/local/bin/swayphone_keyboard_show b/usr/local/bin/swayphone_keyboard_show new file mode 100755 index 0000000..d9ec057 --- /dev/null +++ b/usr/local/bin/swayphone_keyboard_show @@ -0,0 +1,4 @@ +#!/bin/bash + +pidof squeekboard || squeekboard & +busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true diff --git a/usr/local/bin/swayphone_menuselect b/usr/local/bin/swayphone_menuselect new file mode 100755 index 0000000..9d36efa --- /dev/null +++ b/usr/local/bin/swayphone_menuselect @@ -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` +