Sway: Difference between revisions
m Update hardware.opengl to hardware.graphics |
m →Using greeter: removed a somewhat messy fix I added |
||
| (4 intermediate revisions by 3 users not shown) | |||
| Line 107: | Line 107: | ||
}; | }; | ||
}; | }; | ||
</nowiki>}} | </nowiki>|name=|lang=}} | ||
=== Automatic startup on boot === | |||
The snippet below will start Sway immediately on startup, without a greeter and '''without login prompt'''. Only consider using this in conjunction with [[Full Disk Encryption]]! | |||
<syntaxhighlight lang="nix"> | |||
services.getty = { | |||
autologinUser = "your_username"; | |||
autologinOnce = true; | |||
}; | |||
environment.loginShellInit = '' | |||
[[ "$(tty)" == /dev/tty1 ]] && sway | |||
''; | |||
</syntaxhighlight> | |||
== Configuration == | == Configuration == | ||
| Line 146: | Line 159: | ||
== Troubleshooting == | == Troubleshooting == | ||
=== Cursor is too tiny on HiDPI displays === | === Cursor is missing icons or too tiny on HiDPI displays === | ||
Using [[Home Manager]] try configuring a general mouse cursor size and theme | Using [[Home Manager]] try configuring a general mouse cursor size and theme. The reason that your cursor might be missing in some applications, is because <code>XCURSOR_THEME</code>is missing, which will cause applications relying on <code>XWAYLAND</code> to misbehave. Setting <code>sway.enable = true</code>, combined with the <code>name</code>, <code>package</code> and size will set the correct environment variables, which sway will then use. | ||
<syntaxhighlight lang="nix">home-manager.users.myUser = { | <syntaxhighlight lang="nix">home-manager.users.myUser = { | ||
home.pointerCursor = { | home.pointerCursor = { | ||
name = "Adwaita"; | name = "Adwaita"; | ||
package = pkgs | package = pkgs.adwaita-icon-theme; | ||
size = 24; | size = 24; | ||
x11 = { | x11 = { | ||
| Line 160: | Line 172: | ||
defaultCursor = "Adwaita"; | defaultCursor = "Adwaita"; | ||
}; | }; | ||
sway.enable = true; | |||
}; | }; | ||
};</syntaxhighlight> | };</syntaxhighlight> | ||