From 9d819508322c1228b166689404c8dfe0cbe6b635 Mon Sep 17 00:00:00 2001 From: Frieder Schlesier Date: Fri, 28 Jun 2024 21:40:26 +0200 Subject: [PATCH] sway/config: setup monitors and keyboards --- .config/sway/config | 53 +++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/.config/sway/config b/.config/sway/config index 89acb2a..64a5f89 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -3,33 +3,45 @@ set $mod Mod4 # Configure displays +# https://github.com/swaywm/sway/wiki#display-configuration # swaymsg -t get_outputs -set $primary DP-2 -set $secondary DVI-D-1 +set $primary 'LG Electronics 24MB65 512NTHM7N489' +set $secondary 'BNQ BenQ GW2450H K8D03191SL0' set $laptop eDP-1 -# output $laptop pos 1920 135 scale 2 -# output $laptop scale 1.4 output $primary pos 1080 135 output $secondary pos 0 0 transform 90 -# output DP-7 pos 0 0 scale 2 -# output DP-8 pos 0 0 scale 2 -# output HDMI-A-1 scale 2 - # output * bg ~/.dotfiles/backgrounds/samuel-ferrara-uOi3lg8fGl4-unsplash.jpg fill # output * bg ~/.dotfiles/backgrounds/scott-rodgerson-lRtzEExP0H8-unsplash.jpg fill bindsym $mod+Shift+s exec ~/.bin/toggle-display $primary +# https://github.com/swaywm/sway/wiki#input-configuration # localectl list-x11-keymap-layouts - gives you layouts (~100 on modern systems) # localectl list-x11-keymap-variants de - gives you variants for this layout -input type:keyboard { +input "5426:270:Razer_Razer_BlackWidow" { + xkb_layout de + xkb_options ctrl:nocaps +} + +# The internal keyboard of my ThinkPad X13 has a ANSI german keyboard +# which uses the variant E2 and moves +# < to AltGr+2 +# > to AltGr+3 +# | to AltGr+^ +input "1:1:AT_Translated_Set_2_keyboard" { xkb_layout de xkb_variant e2 xkb_options ctrl:nocaps } +# input "4617:8963:Keyboardio_Atreus" { +input "4617:8963:Keyboardio_Atreus_Keyboard" { + xkb_layout de,de + xkb_options ctrl:nocaps +} + font pango:Iosevka ss08 7 # Use Mouse+$mod to drag floating windows to their wanted position @@ -117,7 +129,6 @@ hide_edge_borders --i3 none # Define names for default workspaces for which we configure key bindings later on. # We use variables to avoid repeating the names in multiple places. -set $ws0 "chat" set $ws1 "1 " set $ws2 "2 " set $ws3 "3 " @@ -127,6 +138,7 @@ set $ws5 "5 " set $ws8 "8 " # linux - less often used terminals for background processes set $ws9 "9 " +set $ws0 "chat" # find application info with =swaymsg -t get_tree= assign [app_id="firefox"] $ws1 @@ -135,18 +147,17 @@ assign [title="^DebugScreen"] $ws3 assign [app_id="org.keepassxc.KeePassXC"] $ws8 # Move specific workspaces to outputs -workspace $ws0 output $laptop workspace $ws1 output $primary $laptop workspace $ws2 output $primary $laptop workspace $ws3 output $secondary $laptop workspace $ws4 output $secondary $laptop workspace $ws5 output $secondary $laptop - -# Switch to dev workspace by default -#workspace $ws1 +workspace $ws8 output $laptop +workspace $ws9 output $laptop +workspace $ws0 output $laptop # Switch to workspace -bindsym $mod+grave workspace $ws0 +# bindsym $mod+grave workspace $ws0 bindsym $mod+1 workspace $ws1 bindsym $mod+2 workspace $ws2 bindsym $mod+3 workspace $ws3 @@ -156,10 +167,10 @@ bindsym $mod+6 workspace 6 bindsym $mod+7 workspace 7 bindsym $mod+8 workspace $ws8 bindsym $mod+9 workspace $ws9 -# bindsym $mod+0 workspace 10 +bindsym $mod+0 workspace 0 # Move focused container to workspace -bindsym $mod+Shift+grave move container to workspace $ws0 +# bindsym $mod+Shift+grave move container to workspace $ws0 bindsym $mod+Shift+1 move container to workspace $ws1 bindsym $mod+Shift+2 move container to workspace $ws2 bindsym $mod+Shift+3 move container to workspace $ws3 @@ -169,7 +180,7 @@ bindsym $mod+Shift+6 move container to workspace 6 bindsym $mod+Shift+7 move container to workspace 7 bindsym $mod+Shift+8 move container to workspace $ws8 bindsym $mod+Shift+9 move container to workspace $ws9 -# bindsym $mod+Shift+0 move container to workspace 10 +bindsym $mod+Shift+0 move container to workspace 0 # Bind hotkeys for brightness and volume bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%- @@ -222,14 +233,14 @@ bindsym Ctrl+Shift+L exec $lock for_window [title=".* - mpv$"] floating enable, sticky enable # Autostart applications -# exec waybar --config ~/.config/waybar/x230.config -exec waybar --config ~/.config/waybar/$(hostname).config +exec waybar --config ~/.config/waybar/x13-fedora.config +# exec waybar --config ~/.config/waybar/$(hostname).config exec mako --border-radius=2 --font="Iosevka ss08 10" --max-visible=5 --outer-margin=5 --margin=3 --background="#1c1f26" --border-color="#89AAEB" --border-size=1 --default-timeout=7000 exec nm-applet --indicator exec udiskie -t exec gammastep-indicator -l 50.8643:12.1124 -t 6500:3500 -b 1.0:0.7 -exec emacs --daemon && emacsclient -c +exec swaymsg workspace $ws2 && emacs --daemon && emacsclient -c exec firefox exec keepassxc