Clean up sway config and add BQ Aquaris X5 support

Signed-off-by: Stacy Harper <contact@stacyharper.net>
master
Maxim Karasev 3 years ago committed by Stacy Harper
parent 8f900c29f8
commit 85e18743bf
No known key found for this signature in database
GPG Key ID: 5BAC92328B7C5D65
  1. 71
      configs/appcfg/sway_template
  2. 4
      scripts/core/sxmo_menumode_toggler.sh

@ -21,11 +21,10 @@ set $term foot
set $menu bemenu-run set $menu bemenu-run
### Output configuration ### Output configuration
# Set default wallpaper for all outputs
output "DSI-1" { output * bg /usr/share/sxmo/background.jpg fill
scale 2 # Set 2x scale for DSI-1 (usually a display panel)
bg /usr/share/sxmo/background.jpg fill output "DSI-1" scale 2
}
### Idle ### Idle
@ -50,6 +49,7 @@ exec sxmo_idle.sh start
# You can get the names of your inputs by running: swaymsg -t get_inputs # You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section. # Read `man 5 sway-input` for more information about this section.
###### Device-specific
# repeat_delay how much time in milisec to consider it is hold pressed # repeat_delay how much time in milisec to consider it is hold pressed
# should be long enough to trigger simple click easily but # should be long enough to trigger simple click easily but
# should be short enough to trigger a repeat before the next threshold # should be short enough to trigger a repeat before the next threshold
@ -57,18 +57,42 @@ exec sxmo_idle.sh start
# adapt it accordingly with the delay. # adapt it accordingly with the delay.
# prefer a lower but enough value # prefer a lower but enough value
# This is enough for 4 multikeys long presses # This is enough for 4 multikeys long presses
### PinePhone (pine64-pinephone) / PineTab (pine64-pinetab)
# Power button # Power button
input 0:0:axp20x-pek { input 0:0:axp20x-pek {
repeat_delay 200 repeat_delay 200
repeat_rate 15 repeat_rate 15
xkb_file /usr/share/sxmo/sway/xkb_mobile_normal_buttons xkb_file /usr/share/sxmo/sway/xkb_mobile_normal_buttons
} }
# Volume buttons # Volume buttons
input 1:1:1c21800.lradc { input 1:1:1c21800.lradc {
repeat_delay 200 repeat_delay 200
repeat_rate 15 repeat_rate 15
xkb_file /usr/share/sxmo/sway/xkb_mobile_normal_buttons xkb_file /usr/share/sxmo/sway/xkb_mobile_normal_buttons
}
### BQ Aquaris X5 (bq-paella)
# Power button
input 0:0:pm8941_pwrkey {
repeat_delay 200
repeat_rate 15
xkb_file /usr/share/sxmo/sway/xkb_mobile_normal_buttons
} }
# Volume up button
input 1:1:GPIO_Buttons {
repeat_delay 200
repeat_rate 15
xkb_file /usr/share/sxmo/sway/xkb_mobile_normal_buttons
}
# Volume down button
input 0:0:pm8941_resin {
repeat_delay 200
repeat_rate 15
xkb_file /usr/share/sxmo/sway/xkb_mobile_normal_buttons
}
###### End of device-specific
exec sxmo_multikey.sh clear exec sxmo_multikey.sh clear
### Key bindings ### Key bindings
@ -77,14 +101,27 @@ exec sxmo_multikey.sh clear
# #
# Start a terminal # Start a terminal
bindsym $mod+Return exec $term bindsym $mod+Return exec $term
bindsym --input-device=0:0:axp20x-pek XF86PowerOff exec sxmo_multikey.sh powerbutton "sxmo_inputhandler.sh powerbutton_one" "sxmo_inputhandler.sh powerbutton_two" "sxmo_inputhandler.sh powerbutton_three"
bindsym $mod+p exec sxmo_appmenu.sh
# Lock sxmo # Launch appmenu
bindsym --input-device=1:1:1c21800.lradc XF86AudioRaiseVolume exec sxmo_multikey.sh volup "sxmo_inputhandler.sh volup_one" "sxmo_inputhandler.sh volup_two" "sxmo_inputhandler.sh volup_three" bindsym $mod+p exec sxmo_appmenu.sh
# Next workspace # Multikey handling for power button
bindsym --input-device=1:1:1c21800.lradc XF86AudioLowerVolume exec sxmo_multikey.sh voldown "sxmo_inputhandler.sh voldown_one" "sxmo_inputhandler.sh voldown_two" "sxmo_inputhandler.sh voldown_three" bindsym XF86PowerOff exec sxmo_multikey.sh powerbutton \
"sxmo_inputhandler.sh powerbutton_one" \
"sxmo_inputhandler.sh powerbutton_two" \
"sxmo_inputhandler.sh powerbutton_three"
# Multikey handling for volup button
bindsym XF86AudioRaiseVolume exec sxmo_multikey.sh volup \
"sxmo_inputhandler.sh volup_one" \
"sxmo_inputhandler.sh volup_two" \
"sxmo_inputhandler.sh volup_three"
# Multikey handling for voldown button
bindsym XF86AudioLowerVolume exec sxmo_multikey.sh voldown \
"sxmo_inputhandler.sh voldown_one" \
"sxmo_inputhandler.sh voldown_two" \
"sxmo_inputhandler.sh voldown_three"
mode "menu" { mode "menu" {
bindsym --input-device=1:1:1c21800.lradc XF86AudioMute exec nothing # placeholder for "menu" mode bindsym --input-device=1:1:1c21800.lradc XF86AudioMute exec nothing # placeholder for "menu" mode

@ -3,6 +3,10 @@
inputs=" inputs="
1:1:1c21800.lradc 1:1:1c21800.lradc
0:0:axp20x-pek 0:0:axp20x-pek
0:0:pm8941_pwrkey
1:1:GPIO_Buttons
0:0:pm8941_resin
" "
setup_xkb() { setup_xkb() {

Loading…
Cancel
Save