From 2d20ae56657188129d37eb411f06cb1dfb0bf15e Mon Sep 17 00:00:00 2001 From: coderkun Date: Sun, 31 Mar 2019 22:34:57 +0200 Subject: [PATCH] Split sway config into device specific includes --- sway/config | 31 +++---------------------------- sway/rei | 16 ++++++++++++++++ sway/yuki | 28 ++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 28 deletions(-) create mode 100644 sway/rei create mode 100644 sway/yuki diff --git a/sway/config b/sway/config index c43e730..f912379 100644 --- a/sway/config +++ b/sway/config @@ -11,20 +11,6 @@ set $locker swaylock -f -s center -i "/home/oliver/Bilder/Wallpapers/the\ neon\ ### Font font pango:DejaVu Sans Mono 9 -### Output configuration -output * bg ~/Bilder/Wallpapers/grimes.png fill -output HDMI-A-1 position 0,0 -output DP-1 resolution 1920x1080 position 1920,0 - -### Input configuration -input "65261:4871:ErgoDox_EZ_ErgoDox_EZ" { - xkb_layout de - xkb_variant neo -} -input "5426:66:Razer_Razer_Abys" { - drag_lock disabled - accel_profile flat -} ### Key bindings # Basics @@ -159,23 +145,12 @@ mode "$mode_system" { } bindsym $mod+Shift+P mode "$mode_system" -# Monitor setup -set $mode_monitor Monitor (l) single left, (r) single right, (h) dual horizontal, ((v) dual vertical -mode "$mode_monitor" { - bindsym l output HDMI-A-1 enable, output DP-1 disable, mode "default" - bindsym r output HDMI-A-1 disable, output DP-1 enable position 0 0 transform normal, mode "default" - bindsym h output HDMI-A-1 enable, output DP-1 enable position 1920 0 transform normal, mode "default" - bindsym v output HDMI-A-1 enable, output DP-1 enable position 0 320 transform 270, mode "default" - bindsym Return mode "default" - bindsym mod3+Return mode "default" - bindsym Escape mode "default" - bindsym mod3+Escape mode "default" -} -bindsym $mod+Shift+M mode "$mode_monitor" - # Systemd environment exec systemctl --user import-environment exec systemctl --user start sway-session.target +# Device specific configuration +include device + # Global configuration include /etc/sway/config.d/* diff --git a/sway/rei b/sway/rei new file mode 100644 index 0000000..93de4bd --- /dev/null +++ b/sway/rei @@ -0,0 +1,16 @@ +# Output configuration +output * bg ~/Bilder/natur-wallpaper-hd-03.jpg fill + +# Input configuration +input "1:1:AT_Translated_Set_2_keyboard" { + xkb_layout de + xkb_variant neo +} +input "2:14:ETPS/2_Elantech_Touchpad" { + accel_profile adaptive + tap enabled +} + +# Screen brightness +bindsym XF86MonBrightnessUp exec light -A 5 +bindsym XF86MonBrightnessDown exec light -U 5 diff --git a/sway/yuki b/sway/yuki new file mode 100644 index 0000000..1e864d9 --- /dev/null +++ b/sway/yuki @@ -0,0 +1,28 @@ +# Output configuration +output * bg ~/Bilder/Wallpapers/grimes.png fill +output HDMI-A-1 position 0,0 +output DP-1 resolution 1920x1080 position 1920,0 + +# Input configuration +input "65261:4871:ErgoDox_EZ_ErgoDox_EZ" { + xkb_layout de + xkb_variant neo +} +input "5426:66:Razer_Razer_Abys" { + drag_lock disabled + accel_profile flat +} + +# Monitor setup +set $mode_monitor Monitor (l) single left, (r) single right, (h) dual horizontal, ((v) dual vertical +mode "$mode_monitor" { + bindsym l output HDMI-A-1 enable, output DP-1 disable, mode "default" + bindsym r output HDMI-A-1 disable, output DP-1 enable position 0 0 transform normal, mode "default" + bindsym h output HDMI-A-1 enable, output DP-1 enable position 1920 0 transform normal, mode "default" + bindsym v output HDMI-A-1 enable, output DP-1 enable position 0 320 transform 270, mode "default" + bindsym Return mode "default" + bindsym mod3+Return mode "default" + bindsym Escape mode "default" + bindsym mod3+Escape mode "default" +} +bindsym $mod+Shift+M mode "$mode_monitor"