Sway: Difference between revisions
→Touchscreen input bound to the wrong monitor in multi-monitor setups: add link to the relevant github issue |
capitalize Sway |
||
| Line 21: | Line 21: | ||
services.gnome.gnome-keyring.enable = true; | services.gnome.gnome-keyring.enable = true; | ||
# enable | # enable Sway window manager | ||
programs.sway = { | programs.sway = { | ||
enable = true; | enable = true; | ||
| Line 30: | Line 30: | ||
A few general comments: | A few general comments: | ||
* There is some friction between GTK theming and | * There is some friction between GTK theming and Sway. Currently the Sway developers suggest using gsettings to set gtk theme attributes as described here [https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland]. There is currently a plan to allow GTK theme attributes to be set directly in the Sway config. | ||
* Running | * Running Sway as a systemd user service is not recommended [https://github.com/swaywm/sway/wiki/Systemd-integration#running-sway-itself-as-a---user-service] [https://github.com/swaywm/sway/issues/5160] | ||
=== Using Home Manager === | === Using Home Manager === | ||
| Line 80: | Line 80: | ||
=== Systemd services === | === Systemd services === | ||
Kanshi is an output configuration daemon. As explained above, we don't run | Kanshi is an output configuration daemon. As explained above, we don't run Sway itself as a systemd service. There are auxiliary daemons that we do want to run as systemd services, for example Kanshi [https://sr.ht/~emersion/kanshi/], which implements monitor hot swapping. It would be enabled as follows: | ||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | {{file|/etc/nixos/configuration.nix|nix|<nowiki> | ||
# kanshi systemd service | # kanshi systemd service | ||
| Line 93: | Line 93: | ||
{{file|sway config|bash| | {{file|sway config|bash| | ||
# give | # give Sway a little time to startup before starting kanshi. | ||
exec sleep 5; systemctl --user start kanshi.service | exec sleep 5; systemctl --user start kanshi.service | ||
}} | }} | ||
When you launch | When you launch Sway, the systemd service is started. | ||
=== Using greeter === | === Using greeter === | ||
| Line 186: | Line 186: | ||
Enabling this option allows any program run by the "users" group to request real-time priority. | Enabling this option allows any program run by the "users" group to request real-time priority. | ||
=== WLR Error when trying to launch | === WLR Error when trying to launch Sway === | ||
When this happens on a new nixos system, enabling opengl in configuration.nix may fix this issue. | When this happens on a new nixos system, enabling opengl in configuration.nix may fix this issue. | ||