Sway: Difference between revisions

Lulu (talk | contribs)
capitalize Sway
Line 21: Line 21:
   services.gnome.gnome-keyring.enable = true;
   services.gnome.gnome-keyring.enable = true;


   # enable sway window manager
   # 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 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.
* 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 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]
* 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 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:
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 sway a little time to startup before starting kanshi.
# 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 sway, the systemd service is started.  
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 sway ===
=== 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.