From 13389620f1c16f2ed95a0477d6dfe01f64e860a9 Mon Sep 17 00:00:00 2001 From: Sunderland93 Date: Sat, 29 Apr 2023 15:05:20 +0400 Subject: [PATCH] Add initial Sway user config --- debian/changelog | 6 +++++ debian/files | 2 +- etc/skel/.config/sway/config | 23 +++++++++++++++++++ .../sway/config.d/XX-keyboard.conf.example | 19 +++++++++++++++ etc/skel/.config/sway/variables.d/README.md | 9 ++++++++ 5 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 etc/skel/.config/sway/config create mode 100644 etc/skel/.config/sway/config.d/XX-keyboard.conf.example create mode 100644 etc/skel/.config/sway/variables.d/README.md diff --git a/debian/changelog b/debian/changelog index 1c7a932..96cdea4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +tileos-settings-sway (0.5~tileos) unstable; urgency=medium + + * Add initial Sway user config + + -- Aleksey Samoilov Sat, 29 Apr 2023 15:04:38 +0400 + tileos-settings-sway (0.4~tileos) unstable; urgency=medium * Initial Sway config diff --git a/debian/files b/debian/files index d098940..b5d9cb5 100644 --- a/debian/files +++ b/debian/files @@ -1 +1 @@ -tileos-settings-sway_0.3~tileos_source.buildinfo x11 optional +tileos-settings-sway_0.4~tileos_source.buildinfo x11 optional diff --git a/etc/skel/.config/sway/config b/etc/skel/.config/sway/config new file mode 100644 index 0000000..452357a --- /dev/null +++ b/etc/skel/.config/sway/config @@ -0,0 +1,23 @@ +# Default config for sway +# +# Copy this to ~/.config/sway/config and edit it to your liking. +# +# Read `man 5 sway` for a complete reference. + +# Global variables +include /etc/sway/variables + +# User variables +include $HOME/.config/sway/variables.d/*.conf + +include /etc/sway/outputs/*.conf +include /etc/sway/inputs/*.conf + +# include modes +include /etc/sway/modes/*.conf + +# Additional configs +include /etc/sway/config.d/*.conf + +# User config +include $HOME/.config/sway/config.d/*.conf diff --git a/etc/skel/.config/sway/config.d/XX-keyboard.conf.example b/etc/skel/.config/sway/config.d/XX-keyboard.conf.example new file mode 100644 index 0000000..af7b480 --- /dev/null +++ b/etc/skel/.config/sway/config.d/XX-keyboard.conf.example @@ -0,0 +1,19 @@ +# input "*" equals all input methods +# to specify settings for a specific input method, use its identifier instead. +# query the connected input methods: `swaymsg -t get_inputs` + +input * { + # toggles through configured layouts via caps-lock + # query the available layout toggles: `localectl list-x11-keymap-options | grep grp:` + # query the available led indicators: `localectl list-x11-keymap-options | grep grp_led` + # enables caps-lock led if not the first layout selected + # regular caps-lock behavior can be reached using shift+caps-lock + xkb_options grp:caps_toggle,grp_led:caps + + # query the available layouts: `localectl list-x11-keymap-layouts` + xkb_layout "us,de" + + # query the available variants for a given layout: `localectl list-x11-keymap-variants de` + # list in the same order as the layouts - empty equals the default layout + xkb_variant "," +} diff --git a/etc/skel/.config/sway/variables.d/README.md b/etc/skel/.config/sway/variables.d/README.md new file mode 100644 index 0000000..86b4956 --- /dev/null +++ b/etc/skel/.config/sway/variables.d/README.md @@ -0,0 +1,9 @@ +# variables overrides for sway + +refer to /etc/sway/variables for global variables that can be overridden here + +e.g.: + +* change modifier key from Win/Pine-Key to Alt: `set $mod Mod1` +* make a foot client instance the default terminal for even faster terminal windows: `set $term footclient` +* follow windows after moving them: `set $focus_after_move true`