<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Quq</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Quq"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Quq"/>
	<updated>2026-05-01T05:54:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Sway&amp;diff=26470</id>
		<title>Talk:Sway</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Sway&amp;diff=26470"/>
		<updated>2024-02-23T23:59:18Z</updated>

		<summary type="html">&lt;p&gt;Quq: re&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Flatpak section has no relevance to sway ==&lt;br /&gt;
&lt;br /&gt;
should be moved to another article&lt;br /&gt;
--[[User:Psykose|Psykose]] ([[User talk:Psykose|talk]]) 11:08, 20 January 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Video and input groups ==&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t revert edits and add these groups again. Being a member of these groups is not required and is actively discouraged by upstream. [[User:WhyNotHugo|WhyNotHugo]] ([[User talk:WhyNotHugo|talk]]) 14:27, 1 November 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:So seatd also allows not using these groups? Sorry, I didn&#039;t know that. [[User:Sertonix|Sertonix]] ([[User talk:Sertonix|talk]]) 15:24, 4 November 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
::I can confirm that sway starts fine using the directions on the current revision of the wiki using seatd. No users were added to video or input group.&lt;br /&gt;
::I didn&#039;t have luck with elogind, but didn&#039;t mess with it much.  &amp;amp;ndash;[[User:zcrayfish|zcrayfish]] &amp;lt;small&amp;gt;([[User talk:zcrayfish|talk]]•[[Special:Contributions/zcrayfish|contribs]]•[[Special:EmailUser/zcrayfish|send email]])&amp;lt;/small&amp;gt; 11:51, 6 November 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::I found the issue that backlight control doesn&#039;t work for me without the video group. It may be resolvable with a udev rule. Setuid is also possible but suid always exposes security problems. It seems like that could/should be handled by seatd but I haven&#039;t found anything like that. [[User:Sertonix|Sertonix]] ([[User talk:Sertonix|talk]]) 20:25, 6 November 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Proposal to remove the &amp;quot;Start as a service&amp;quot; section. ==&lt;br /&gt;
&lt;br /&gt;
I for one think this section should be replaced by a section instructing users to start sway with their .profile.&amp;lt;br&amp;gt;&lt;br /&gt;
Looks to me that the openrc service as written on the page now starts it as root. Would be a lot better from a security standpoint if it was started as a regular user. Thoughts?&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;ndash;[[User:zcrayfish|zcrayfish]] &amp;lt;small&amp;gt;([[User talk:zcrayfish|talk]]•[[Special:Contributions/zcrayfish|contribs]]•[[Special:EmailUser/zcrayfish|send email]])&amp;lt;/small&amp;gt; 11:57, 6 November 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:I fixed the issue with sway running as root. At least I think, I haven&#039;t tested if that can work. I don&#039;t have a opinion if the section should be removed. A link to the [https://wiki.gentoo.org/wiki/OpenRC/User_services OpenRC user services wik] might be appropriate. [[User:Sertonix|Sertonix]] ([[User talk:Sertonix|talk]]) 15:03, 6 November 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Custom keyboard layout section should be replaced. ==&lt;br /&gt;
&lt;br /&gt;
This section should use user environmental variables, like below:&lt;br /&gt;
  XKB_DEFAULT_MODEL=latitude&lt;br /&gt;
  XKB_DEFAULT_LAYOUT=us&lt;br /&gt;
  XKB_DEFAULT_VARIANT=intl&lt;br /&gt;
  #XKB_DEFAULT_OPTIONS=grp:alt_shift_toggle&lt;br /&gt;
OR the appropriate sway config files.&lt;br /&gt;
&lt;br /&gt;
Editing evdev config is far beyond the article scope...&lt;br /&gt;
&amp;amp;ndash;[[User:zcrayfish|zcrayfish]] &amp;lt;small&amp;gt;([[User talk:zcrayfish|talk]]•[[Special:Contributions/zcrayfish|contribs]]•[[Special:EmailUser/zcrayfish|send email]])&amp;lt;/small&amp;gt; 20:13, 20 February 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Agreed.  I fixed that section  to use Sway config instead. [[User:Quq|Quq]] ([[User talk:Quq|talk]]) 23:59, 23 February 2024 (UTC)&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26469</id>
		<title>Sway</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26469"/>
		<updated>2024-02-23T23:58:49Z</updated>

		<summary type="html">&lt;p&gt;Quq: /* Custom keyboard layout */ sway config&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sway is a tiling Wayland compositor and a drop-in replacement for the i3 window manager for X11. It works with your existing i3 configuration and supports most of i3&#039;s features, plus a few extras.&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 # else greetd will fail to start&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
If using &amp;lt;code&amp;gt;swayidle before-sleep&amp;lt;/code&amp;gt;, there will be a race condition, so that when you resume the computer from suspend, the screen shows the contents of the unlocked screen for a second before showing the actual lock screen.  This can be a privacy concern, if someone is filming the screen.&lt;br /&gt;
To solve this issue, do the following:&lt;br /&gt;
&lt;br /&gt;
Create this file &amp;lt;code&amp;gt;/etc/elogind/system-sleep/10-swaylock.sh&amp;lt;/code&amp;gt;, then add the following script to this file:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 if [ &amp;quot;${1}&amp;quot; == &amp;quot;pre&amp;quot; ]; then&lt;br /&gt;
   touch /tmp/swaylock-sleep&lt;br /&gt;
   sleep 1&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
Then set it to executable.&lt;br /&gt;
&lt;br /&gt;
Later, once sway is installed, add the following line to sway config:&lt;br /&gt;
&lt;br /&gt;
 # in ~/.config/sway/config&lt;br /&gt;
 exec sh -c &amp;quot;touch /tmp/swaylock-sleep; inotifyd swaylock /tmp/swaylock-sleep&amp;quot;&lt;br /&gt;
&lt;br /&gt;
With this line, the screen will be promptly locked before suspend-to-RAM starts.&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to run sway with &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt;, this is needed for PipeWire and screensharing in Firefox and Chromium.&lt;br /&gt;
&lt;br /&gt;
== Install doas (optional)==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &lt;br /&gt;
&lt;br /&gt;
 /bin/loginctl suspend&lt;br /&gt;
&lt;br /&gt;
(use full path to executable) and brightness can be adjusted by running&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/brightnessctl set 100&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
== Launch PipeWire and enable screensharing ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native) for launching programs and selecting which screen to share in Firefox/Chromium:&lt;br /&gt;
&lt;br /&gt;
 set $menu bemenu-run | xargs swaymsg exec&lt;br /&gt;
&lt;br /&gt;
== Mouse cursor theme ==&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
== Screen lock and suspend-to-RAM ==&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w timeout 630 &#039;doas /bin/loginctl suspend&#039;&lt;br /&gt;
&lt;br /&gt;
loginctl suspend command will trigger the screenlock, as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;br /&gt;
&lt;br /&gt;
== Brightness control ==&lt;br /&gt;
&lt;br /&gt;
Use brightnessctl.  Configure permission in doas config. Optionally enable brightnessctl service to restore brightness settings on reboot:&lt;br /&gt;
&lt;br /&gt;
 rc-update add brightnessctl&lt;br /&gt;
&lt;br /&gt;
== Output scaling for high resolution displays ==&lt;br /&gt;
&lt;br /&gt;
Without further configuration, program interfaces might be too small to use on high resolution displays.&lt;br /&gt;
&lt;br /&gt;
Sway supports the per-display configuration of&lt;br /&gt;
&lt;br /&gt;
* fractional (e.g., 1.5x), and&lt;br /&gt;
* integer scaling (e.g., 2x) &lt;br /&gt;
&lt;br /&gt;
However, fractional scaling is discouraged due to both the performance impact and the blurry output it produces. In this case, where 1x scaling is too small and 2x scaling is too large, program-specific GTK/QT based scaling is recommended.  See below.&lt;br /&gt;
&lt;br /&gt;
To enable Sway scaling, the user can first preview different scaling factors with &amp;lt;code&amp;gt;wdisplays&amp;lt;/code&amp;gt; package.  Note the output name (eDP-1, LVDS-1) and try apply scaling factors such as 1 and 2.  To make changes permanent, add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
output &amp;lt;name&amp;gt; scale &amp;lt;factor&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to ~/.config/sway/config.&lt;br /&gt;
&lt;br /&gt;
To use toolkit scaling, use&lt;br /&gt;
{{Cmd|# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE{{=}}2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}&amp;quot;physical&amp;quot;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; or if still too small, use a custom DPI&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}192 # 2x scaling&lt;br /&gt;
export QT_QPA_PLATFORM{{=}}&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Make clipboard content persistent ==&lt;br /&gt;
By default the clipboard content does not persist after terminating the program: you copy some text from Firefox and then exit Firefox, the copied text is also lost.&lt;br /&gt;
&lt;br /&gt;
Install clipman from testing repo and add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec wl-paste --type text/plain --watch clipman store --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
bindsym $mod+h exec clipman pick --tool wofi --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox picture-in-picture mode/floating windows ==&lt;br /&gt;
Add this to your sway config file (modify the numeric values to suit your needs and your display):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for_window [app_id=&amp;quot;firefox&amp;quot; title=&amp;quot;^Picture-in-Picture$&amp;quot;] floating enable, move position 877 450, sticky enable, border none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
A simple tool that works well under Wayland is Grimshot. Example keybindings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bindsym Print exec grimshot copy area&lt;br /&gt;
bindsym Shift+Print exec grimshot copy screen&lt;br /&gt;
bindsym Control+Print exec grimshot save area ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
bindsym Control+Shift+Print exec grimshot save screen ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway the sway wiki&#039;s article] for a list of screenshot tools.&lt;br /&gt;
&lt;br /&gt;
== Start with NumLock enabled ==&lt;br /&gt;
Add this to your sway config file:&lt;br /&gt;
&amp;lt;code&amp;gt;input type:keyboard xkb_numlock enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change cursor theme and size ==&lt;br /&gt;
Add to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seat seat0 xcursor_theme my_cursor_theme my_cursor_size&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can inspect their values with &amp;lt;code&amp;gt;echo $XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;echo $XCURSOR_THEME&amp;lt;/code&amp;gt;. If reloading your config does not result in change, try logging out and in.&lt;br /&gt;
{{Note|Wayland uses client-side cursors. It is possible that applications do not evaluate the values of &amp;lt;code&amp;gt;$XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$XCURSOR_THEME&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Custom keyboard layout ==&lt;br /&gt;
&lt;br /&gt;
To use custom keyboard layout, just use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input type:keyboard {&lt;br /&gt;
  xkb_file /path/to/my/custom/layout&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Default font ==&lt;br /&gt;
&lt;br /&gt;
This is not related to Sway, but still nice to have: change system wide default font selection.  In &amp;lt;code&amp;gt;/etc/fonts/conf.d/52-my-default-fonts.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&#039;1.0&#039;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE fontconfig SYSTEM &#039;urn:fontconfig:fonts.dtd&#039;&amp;gt;&lt;br /&gt;
&amp;lt;fontconfig&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Default fonts --&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;sans-serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;monospace&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans Mono&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
&amp;lt;/fontconfig&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can obtain a list of installed fonts with &amp;lt;code&amp;gt;fc-list&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If you encounter any issues, try running &amp;lt;code&amp;gt;sway -Vc /etc/sway/config&amp;lt;/code&amp;gt;. It will run sway with the default config file and set the output to be more verbose. It is generally a good idea to track your config files with git (when and if at all you use a remote repository for them, keep it private for security reasons). &lt;br /&gt;
&lt;br /&gt;
== Flatpaks ==&lt;br /&gt;
{{main|Flatpak}}&lt;br /&gt;
Due to their sandboxing, flatpaks require the use of a portal frontend (xdg-desktop-portal) and backends (such as xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, xdg-desktop-portal-gnome) that implement the methods. When in doubt, install multiple backends. For more information on backends, see [https://github.com/flatpak/xdg-desktop-portal/#using-portals flatpak&#039;s page on the subject]. In addition to the steps under the &amp;quot;Firefox Screensharing&amp;quot; section, it may also be necessary to launch additional backends in your Sway config file. Otherwise, you may run into GDBus errors as your flatpak fails to interface with the portal. This can cause issues such as with opening your file directories from a flatpak application.&lt;br /&gt;
&lt;br /&gt;
After installing different backends, you might need to add the relevant backends to your sway config file similarly to in the &amp;quot;Firefox Screensharing&amp;quot; section above. For example, an autostart section of your sway config file may include:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gtk&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-wlr&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gnome&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is only needed if they are not started automatically via other means.&lt;br /&gt;
&lt;br /&gt;
== Firefox (Flatpak) and/or GTK apps ==&lt;br /&gt;
=== Disappearing cursor ===&lt;br /&gt;
You may need to get an icon pack and possibly a theme from [https://www.pling.com/browse?cat=107&amp;amp;ord=latest Pling store] and set &amp;lt;code&amp;gt;GTK_THEME&amp;lt;/code&amp;gt; environmental variable. Alternatively you can install a theme      for all users (search [https://pkgs.alpinelinux.org/ Alpine Linux Packages] for &#039;&#039;*-icon-theme&#039;&#039;) using &amp;lt;code&amp;gt;apk add&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Missing file picker/cannot download ===&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;about:config&#039;&#039; and set &amp;lt;code&amp;gt;widget.use-xdg-desktop-portal.file-picker&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
== Failing to start under certain graphics cards/multiple wlroots stacked windows spawning upon start ==&lt;br /&gt;
As of Dec 31 2022, [https://developer.nvidia.com/docs/drive/drive-os/latest/linux/sdk/common/topics/window_system_stub/Gnome-WaylandDesktopShellSupport136.html Nvidia still doesn&#039;t fully support Wayland]. Therefore, the possible solutions are as outlined in the link, or setting your WLR_BACKENDS environmental variables to &amp;lt;code&amp;gt;drm,libinput&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;x11&amp;lt;/code&amp;gt; (add libinput here as well if you cannot use your mouse and keyboard after starting Sway). The latter also works for AMD/ATI cards (&#039;&#039;&#039;make sure to install libinput first&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
== Sway socket not detected ==&lt;br /&gt;
&lt;br /&gt;
See [[Sway#Installation|Installation]] for instructions on how to set this environmental variable. This issue may occur with terminal multiplexers, such as [[tmux]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [https://wiki.archlinux.org/title/Sway Archwiki]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Sway Gentoo Wiki]&lt;br /&gt;
* [https://wiki.postmarketos.org/wiki/Sway PostmarketOS Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]]&lt;br /&gt;
[[Category:Window Managers]]&lt;br /&gt;
[[Category:Wayland]]&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26468</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26468"/>
		<updated>2024-02-23T23:51:16Z</updated>

		<summary type="html">&lt;p&gt;Quq: Redirected page to Sway&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#redirect[[Sway]]&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Emacs&amp;diff=26467</id>
		<title>Emacs</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Emacs&amp;diff=26467"/>
		<updated>2024-02-23T23:50:15Z</updated>

		<summary type="html">&lt;p&gt;Quq: create dir file for info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Empty Info directory node =&lt;br /&gt;
&lt;br /&gt;
Emacs uses the texinfo documenting system, but the docs are shipped in a separate package in Alpine Linux.  You need to install&lt;br /&gt;
&lt;br /&gt;
 apk add texinfo emacs-docs&lt;br /&gt;
&lt;br /&gt;
Then generate the [https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Directory-File.html dir] index file for Info documenting system.&lt;br /&gt;
&lt;br /&gt;
 # run as root&lt;br /&gt;
 find /usr/share/info/ -name &#039;*.info*&#039; -print0 | xargs -0I{} install-info {} /usr/share/info/dir&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26466</id>
		<title>Sway</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26466"/>
		<updated>2024-02-23T23:42:51Z</updated>

		<summary type="html">&lt;p&gt;Quq: /* Install elogind (optional) */ details on inotifyd&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sway is a tiling Wayland compositor and a drop-in replacement for the i3 window manager for X11. It works with your existing i3 configuration and supports most of i3&#039;s features, plus a few extras.&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 # else greetd will fail to start&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
If using &amp;lt;code&amp;gt;swayidle before-sleep&amp;lt;/code&amp;gt;, there will be a race condition, so that when you resume the computer from suspend, the screen shows the contents of the unlocked screen for a second before showing the actual lock screen.  This can be a privacy concern, if someone is filming the screen.&lt;br /&gt;
To solve this issue, do the following:&lt;br /&gt;
&lt;br /&gt;
Create this file &amp;lt;code&amp;gt;/etc/elogind/system-sleep/10-swaylock.sh&amp;lt;/code&amp;gt;, then add the following script to this file:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 if [ &amp;quot;${1}&amp;quot; == &amp;quot;pre&amp;quot; ]; then&lt;br /&gt;
   touch /tmp/swaylock-sleep&lt;br /&gt;
   sleep 1&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
Then set it to executable.&lt;br /&gt;
&lt;br /&gt;
Later, once sway is installed, add the following line to sway config:&lt;br /&gt;
&lt;br /&gt;
 # in ~/.config/sway/config&lt;br /&gt;
 exec sh -c &amp;quot;touch /tmp/swaylock-sleep; inotifyd swaylock /tmp/swaylock-sleep&amp;quot;&lt;br /&gt;
&lt;br /&gt;
With this line, the screen will be promptly locked before suspend-to-RAM starts.&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to run sway with &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt;, this is needed for PipeWire and screensharing in Firefox and Chromium.&lt;br /&gt;
&lt;br /&gt;
== Install doas (optional)==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &lt;br /&gt;
&lt;br /&gt;
 /bin/loginctl suspend&lt;br /&gt;
&lt;br /&gt;
(use full path to executable) and brightness can be adjusted by running&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/brightnessctl set 100&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
== Launch PipeWire and enable screensharing ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native) for launching programs and selecting which screen to share in Firefox/Chromium:&lt;br /&gt;
&lt;br /&gt;
 set $menu bemenu-run | xargs swaymsg exec&lt;br /&gt;
&lt;br /&gt;
== Mouse cursor theme ==&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
== Screen lock and suspend-to-RAM ==&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w timeout 630 &#039;doas /bin/loginctl suspend&#039;&lt;br /&gt;
&lt;br /&gt;
loginctl suspend command will trigger the screenlock, as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;br /&gt;
&lt;br /&gt;
== Brightness control ==&lt;br /&gt;
&lt;br /&gt;
Use brightnessctl.  Configure permission in doas config. Optionally enable brightnessctl service to restore brightness settings on reboot:&lt;br /&gt;
&lt;br /&gt;
 rc-update add brightnessctl&lt;br /&gt;
&lt;br /&gt;
== Output scaling for high resolution displays ==&lt;br /&gt;
&lt;br /&gt;
Without further configuration, program interfaces might be too small to use on high resolution displays.&lt;br /&gt;
&lt;br /&gt;
Sway supports the per-display configuration of&lt;br /&gt;
&lt;br /&gt;
* fractional (e.g., 1.5x), and&lt;br /&gt;
* integer scaling (e.g., 2x) &lt;br /&gt;
&lt;br /&gt;
However, fractional scaling is discouraged due to both the performance impact and the blurry output it produces. In this case, where 1x scaling is too small and 2x scaling is too large, program-specific GTK/QT based scaling is recommended.  See below.&lt;br /&gt;
&lt;br /&gt;
To enable Sway scaling, the user can first preview different scaling factors with &amp;lt;code&amp;gt;wdisplays&amp;lt;/code&amp;gt; package.  Note the output name (eDP-1, LVDS-1) and try apply scaling factors such as 1 and 2.  To make changes permanent, add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
output &amp;lt;name&amp;gt; scale &amp;lt;factor&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to ~/.config/sway/config.&lt;br /&gt;
&lt;br /&gt;
To use toolkit scaling, use&lt;br /&gt;
{{Cmd|# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE{{=}}2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}&amp;quot;physical&amp;quot;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; or if still too small, use a custom DPI&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}192 # 2x scaling&lt;br /&gt;
export QT_QPA_PLATFORM{{=}}&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Make clipboard content persistent ==&lt;br /&gt;
By default the clipboard content does not persist after terminating the program: you copy some text from Firefox and then exit Firefox, the copied text is also lost.&lt;br /&gt;
&lt;br /&gt;
Install clipman from testing repo and add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec wl-paste --type text/plain --watch clipman store --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
bindsym $mod+h exec clipman pick --tool wofi --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox picture-in-picture mode/floating windows ==&lt;br /&gt;
Add this to your sway config file (modify the numeric values to suit your needs and your display):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for_window [app_id=&amp;quot;firefox&amp;quot; title=&amp;quot;^Picture-in-Picture$&amp;quot;] floating enable, move position 877 450, sticky enable, border none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
A simple tool that works well under Wayland is Grimshot. Example keybindings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bindsym Print exec grimshot copy area&lt;br /&gt;
bindsym Shift+Print exec grimshot copy screen&lt;br /&gt;
bindsym Control+Print exec grimshot save area ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
bindsym Control+Shift+Print exec grimshot save screen ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway the sway wiki&#039;s article] for a list of screenshot tools.&lt;br /&gt;
&lt;br /&gt;
== Start with NumLock enabled ==&lt;br /&gt;
Add this to your sway config file:&lt;br /&gt;
&amp;lt;code&amp;gt;input type:keyboard xkb_numlock enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change cursor theme and size ==&lt;br /&gt;
Add to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seat seat0 xcursor_theme my_cursor_theme my_cursor_size&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can inspect their values with &amp;lt;code&amp;gt;echo $XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;echo $XCURSOR_THEME&amp;lt;/code&amp;gt;. If reloading your config does not result in change, try logging out and in.&lt;br /&gt;
{{Note|Wayland uses client-side cursors. It is possible that applications do not evaluate the values of &amp;lt;code&amp;gt;$XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$XCURSOR_THEME&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Custom keyboard layout ==&lt;br /&gt;
&lt;br /&gt;
Since wayland does not support setxkbmap, you will also need to add similar content to your &#039;&#039;/usr/share/X11/xkb/rules/evdev.xml&#039;&#039;, after &amp;lt;code&amp;gt;&amp;lt;/modelList&amp;gt;&amp;lt;/code&amp;gt; and after &amp;lt;code&amp;gt;&amp;lt;layoutList&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;&lt;br /&gt;
      &amp;lt;configItem&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;[the name of your layout, same as the name of the file in /usr/share/X11/xkb/symbols]&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;shortDescription&amp;gt;[usually just two letters]&amp;lt;/shortDescription&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt;[description of your layout]&amp;lt;/description&amp;gt;&lt;br /&gt;
        &amp;lt;countryList&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;US&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;NO&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
        &amp;lt;/countryList&amp;gt;&lt;br /&gt;
        &amp;lt;languageList&amp;gt;&lt;br /&gt;
          &amp;lt;iso639Id&amp;gt;eng&amp;lt;/iso639Id&amp;gt;&lt;br /&gt;
        &amp;lt;/languageList&amp;gt;&lt;br /&gt;
      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;!--[other layouts]--&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, to enable for all keyboards, navigate to the input section of &#039;&#039;~/.config/sway/config&#039;&#039; and modify it to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input type:keyboard {&lt;br /&gt;
  xkb_layout &amp;quot;my_layout&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have enabled &amp;lt;code&amp;gt;xkb_numlock&amp;lt;/code&amp;gt;, include this setting inside those braces as well.&lt;br /&gt;
&lt;br /&gt;
== Default font ==&lt;br /&gt;
&lt;br /&gt;
This is not related to Sway, but still nice to have: change system wide default font selection.  In &amp;lt;code&amp;gt;/etc/fonts/conf.d/52-my-default-fonts.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&#039;1.0&#039;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE fontconfig SYSTEM &#039;urn:fontconfig:fonts.dtd&#039;&amp;gt;&lt;br /&gt;
&amp;lt;fontconfig&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Default fonts --&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;sans-serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;monospace&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans Mono&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
&amp;lt;/fontconfig&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can obtain a list of installed fonts with &amp;lt;code&amp;gt;fc-list&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If you encounter any issues, try running &amp;lt;code&amp;gt;sway -Vc /etc/sway/config&amp;lt;/code&amp;gt;. It will run sway with the default config file and set the output to be more verbose. It is generally a good idea to track your config files with git (when and if at all you use a remote repository for them, keep it private for security reasons). &lt;br /&gt;
&lt;br /&gt;
== Flatpaks ==&lt;br /&gt;
{{main|Flatpak}}&lt;br /&gt;
Due to their sandboxing, flatpaks require the use of a portal frontend (xdg-desktop-portal) and backends (such as xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, xdg-desktop-portal-gnome) that implement the methods. When in doubt, install multiple backends. For more information on backends, see [https://github.com/flatpak/xdg-desktop-portal/#using-portals flatpak&#039;s page on the subject]. In addition to the steps under the &amp;quot;Firefox Screensharing&amp;quot; section, it may also be necessary to launch additional backends in your Sway config file. Otherwise, you may run into GDBus errors as your flatpak fails to interface with the portal. This can cause issues such as with opening your file directories from a flatpak application.&lt;br /&gt;
&lt;br /&gt;
After installing different backends, you might need to add the relevant backends to your sway config file similarly to in the &amp;quot;Firefox Screensharing&amp;quot; section above. For example, an autostart section of your sway config file may include:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gtk&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-wlr&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gnome&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is only needed if they are not started automatically via other means.&lt;br /&gt;
&lt;br /&gt;
== Firefox (Flatpak) and/or GTK apps ==&lt;br /&gt;
=== Disappearing cursor ===&lt;br /&gt;
You may need to get an icon pack and possibly a theme from [https://www.pling.com/browse?cat=107&amp;amp;ord=latest Pling store] and set &amp;lt;code&amp;gt;GTK_THEME&amp;lt;/code&amp;gt; environmental variable. Alternatively you can install a theme      for all users (search [https://pkgs.alpinelinux.org/ Alpine Linux Packages] for &#039;&#039;*-icon-theme&#039;&#039;) using &amp;lt;code&amp;gt;apk add&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Missing file picker/cannot download ===&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;about:config&#039;&#039; and set &amp;lt;code&amp;gt;widget.use-xdg-desktop-portal.file-picker&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
== Failing to start under certain graphics cards/multiple wlroots stacked windows spawning upon start ==&lt;br /&gt;
As of Dec 31 2022, [https://developer.nvidia.com/docs/drive/drive-os/latest/linux/sdk/common/topics/window_system_stub/Gnome-WaylandDesktopShellSupport136.html Nvidia still doesn&#039;t fully support Wayland]. Therefore, the possible solutions are as outlined in the link, or setting your WLR_BACKENDS environmental variables to &amp;lt;code&amp;gt;drm,libinput&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;x11&amp;lt;/code&amp;gt; (add libinput here as well if you cannot use your mouse and keyboard after starting Sway). The latter also works for AMD/ATI cards (&#039;&#039;&#039;make sure to install libinput first&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
== Sway socket not detected ==&lt;br /&gt;
&lt;br /&gt;
See [[Sway#Installation|Installation]] for instructions on how to set this environmental variable. This issue may occur with terminal multiplexers, such as [[tmux]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [https://wiki.archlinux.org/title/Sway Archwiki]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Sway Gentoo Wiki]&lt;br /&gt;
* [https://wiki.postmarketos.org/wiki/Sway PostmarketOS Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]]&lt;br /&gt;
[[Category:Window Managers]]&lt;br /&gt;
[[Category:Wayland]]&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26465</id>
		<title>Sway</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26465"/>
		<updated>2024-02-23T23:41:05Z</updated>

		<summary type="html">&lt;p&gt;Quq: brightness&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sway is a tiling Wayland compositor and a drop-in replacement for the i3 window manager for X11. It works with your existing i3 configuration and supports most of i3&#039;s features, plus a few extras.&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 # else greetd will fail to start&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
If using &amp;lt;code&amp;gt;swayidle before-sleep&amp;lt;/code&amp;gt;, there will be a race condition, so that when you resume the computer from suspend, the screen shows the contents of the unlocked screen for a second before showing the actual lock screen.  This can be a privacy concern, if someone is filming the screen.&lt;br /&gt;
To solve this issue, do the following:&lt;br /&gt;
&lt;br /&gt;
Create this file &amp;lt;code&amp;gt;/etc/elogind/system-sleep/10-swaylock.sh&amp;lt;/code&amp;gt;, then add the following script to this file:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 if [ &amp;quot;${1}&amp;quot; == &amp;quot;pre&amp;quot; ]; then&lt;br /&gt;
   touch /tmp/swaylock-sleep&lt;br /&gt;
   sleep 1&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
Then set it to executable.&lt;br /&gt;
&lt;br /&gt;
Later, once sway is installed, add the following line to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec sh -c &amp;quot;touch /tmp/swaylock-sleep; inotifyd swaylock /tmp/swaylock-sleep&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to run sway with &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt;, this is needed for PipeWire and screensharing in Firefox and Chromium.&lt;br /&gt;
&lt;br /&gt;
== Install doas (optional)==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &lt;br /&gt;
&lt;br /&gt;
 /bin/loginctl suspend&lt;br /&gt;
&lt;br /&gt;
(use full path to executable) and brightness can be adjusted by running&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/brightnessctl set 100&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
== Launch PipeWire and enable screensharing ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native) for launching programs and selecting which screen to share in Firefox/Chromium:&lt;br /&gt;
&lt;br /&gt;
 set $menu bemenu-run | xargs swaymsg exec&lt;br /&gt;
&lt;br /&gt;
== Mouse cursor theme ==&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
== Screen lock and suspend-to-RAM ==&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w timeout 630 &#039;doas /bin/loginctl suspend&#039;&lt;br /&gt;
&lt;br /&gt;
loginctl suspend command will trigger the screenlock, as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;br /&gt;
&lt;br /&gt;
== Brightness control ==&lt;br /&gt;
&lt;br /&gt;
Use brightnessctl.  Configure permission in doas config. Optionally enable brightnessctl service to restore brightness settings on reboot:&lt;br /&gt;
&lt;br /&gt;
 rc-update add brightnessctl&lt;br /&gt;
&lt;br /&gt;
== Output scaling for high resolution displays ==&lt;br /&gt;
&lt;br /&gt;
Without further configuration, program interfaces might be too small to use on high resolution displays.&lt;br /&gt;
&lt;br /&gt;
Sway supports the per-display configuration of&lt;br /&gt;
&lt;br /&gt;
* fractional (e.g., 1.5x), and&lt;br /&gt;
* integer scaling (e.g., 2x) &lt;br /&gt;
&lt;br /&gt;
However, fractional scaling is discouraged due to both the performance impact and the blurry output it produces. In this case, where 1x scaling is too small and 2x scaling is too large, program-specific GTK/QT based scaling is recommended.  See below.&lt;br /&gt;
&lt;br /&gt;
To enable Sway scaling, the user can first preview different scaling factors with &amp;lt;code&amp;gt;wdisplays&amp;lt;/code&amp;gt; package.  Note the output name (eDP-1, LVDS-1) and try apply scaling factors such as 1 and 2.  To make changes permanent, add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
output &amp;lt;name&amp;gt; scale &amp;lt;factor&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to ~/.config/sway/config.&lt;br /&gt;
&lt;br /&gt;
To use toolkit scaling, use&lt;br /&gt;
{{Cmd|# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE{{=}}2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}&amp;quot;physical&amp;quot;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; or if still too small, use a custom DPI&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}192 # 2x scaling&lt;br /&gt;
export QT_QPA_PLATFORM{{=}}&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Make clipboard content persistent ==&lt;br /&gt;
By default the clipboard content does not persist after terminating the program: you copy some text from Firefox and then exit Firefox, the copied text is also lost.&lt;br /&gt;
&lt;br /&gt;
Install clipman from testing repo and add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec wl-paste --type text/plain --watch clipman store --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
bindsym $mod+h exec clipman pick --tool wofi --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox picture-in-picture mode/floating windows ==&lt;br /&gt;
Add this to your sway config file (modify the numeric values to suit your needs and your display):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for_window [app_id=&amp;quot;firefox&amp;quot; title=&amp;quot;^Picture-in-Picture$&amp;quot;] floating enable, move position 877 450, sticky enable, border none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
A simple tool that works well under Wayland is Grimshot. Example keybindings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bindsym Print exec grimshot copy area&lt;br /&gt;
bindsym Shift+Print exec grimshot copy screen&lt;br /&gt;
bindsym Control+Print exec grimshot save area ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
bindsym Control+Shift+Print exec grimshot save screen ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway the sway wiki&#039;s article] for a list of screenshot tools.&lt;br /&gt;
&lt;br /&gt;
== Start with NumLock enabled ==&lt;br /&gt;
Add this to your sway config file:&lt;br /&gt;
&amp;lt;code&amp;gt;input type:keyboard xkb_numlock enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change cursor theme and size ==&lt;br /&gt;
Add to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seat seat0 xcursor_theme my_cursor_theme my_cursor_size&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can inspect their values with &amp;lt;code&amp;gt;echo $XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;echo $XCURSOR_THEME&amp;lt;/code&amp;gt;. If reloading your config does not result in change, try logging out and in.&lt;br /&gt;
{{Note|Wayland uses client-side cursors. It is possible that applications do not evaluate the values of &amp;lt;code&amp;gt;$XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$XCURSOR_THEME&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Custom keyboard layout ==&lt;br /&gt;
&lt;br /&gt;
Since wayland does not support setxkbmap, you will also need to add similar content to your &#039;&#039;/usr/share/X11/xkb/rules/evdev.xml&#039;&#039;, after &amp;lt;code&amp;gt;&amp;lt;/modelList&amp;gt;&amp;lt;/code&amp;gt; and after &amp;lt;code&amp;gt;&amp;lt;layoutList&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;&lt;br /&gt;
      &amp;lt;configItem&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;[the name of your layout, same as the name of the file in /usr/share/X11/xkb/symbols]&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;shortDescription&amp;gt;[usually just two letters]&amp;lt;/shortDescription&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt;[description of your layout]&amp;lt;/description&amp;gt;&lt;br /&gt;
        &amp;lt;countryList&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;US&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;NO&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
        &amp;lt;/countryList&amp;gt;&lt;br /&gt;
        &amp;lt;languageList&amp;gt;&lt;br /&gt;
          &amp;lt;iso639Id&amp;gt;eng&amp;lt;/iso639Id&amp;gt;&lt;br /&gt;
        &amp;lt;/languageList&amp;gt;&lt;br /&gt;
      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;!--[other layouts]--&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, to enable for all keyboards, navigate to the input section of &#039;&#039;~/.config/sway/config&#039;&#039; and modify it to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input type:keyboard {&lt;br /&gt;
  xkb_layout &amp;quot;my_layout&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have enabled &amp;lt;code&amp;gt;xkb_numlock&amp;lt;/code&amp;gt;, include this setting inside those braces as well.&lt;br /&gt;
&lt;br /&gt;
== Default font ==&lt;br /&gt;
&lt;br /&gt;
This is not related to Sway, but still nice to have: change system wide default font selection.  In &amp;lt;code&amp;gt;/etc/fonts/conf.d/52-my-default-fonts.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&#039;1.0&#039;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE fontconfig SYSTEM &#039;urn:fontconfig:fonts.dtd&#039;&amp;gt;&lt;br /&gt;
&amp;lt;fontconfig&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Default fonts --&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;sans-serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;monospace&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans Mono&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
&amp;lt;/fontconfig&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can obtain a list of installed fonts with &amp;lt;code&amp;gt;fc-list&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If you encounter any issues, try running &amp;lt;code&amp;gt;sway -Vc /etc/sway/config&amp;lt;/code&amp;gt;. It will run sway with the default config file and set the output to be more verbose. It is generally a good idea to track your config files with git (when and if at all you use a remote repository for them, keep it private for security reasons). &lt;br /&gt;
&lt;br /&gt;
== Flatpaks ==&lt;br /&gt;
{{main|Flatpak}}&lt;br /&gt;
Due to their sandboxing, flatpaks require the use of a portal frontend (xdg-desktop-portal) and backends (such as xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, xdg-desktop-portal-gnome) that implement the methods. When in doubt, install multiple backends. For more information on backends, see [https://github.com/flatpak/xdg-desktop-portal/#using-portals flatpak&#039;s page on the subject]. In addition to the steps under the &amp;quot;Firefox Screensharing&amp;quot; section, it may also be necessary to launch additional backends in your Sway config file. Otherwise, you may run into GDBus errors as your flatpak fails to interface with the portal. This can cause issues such as with opening your file directories from a flatpak application.&lt;br /&gt;
&lt;br /&gt;
After installing different backends, you might need to add the relevant backends to your sway config file similarly to in the &amp;quot;Firefox Screensharing&amp;quot; section above. For example, an autostart section of your sway config file may include:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gtk&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-wlr&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gnome&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is only needed if they are not started automatically via other means.&lt;br /&gt;
&lt;br /&gt;
== Firefox (Flatpak) and/or GTK apps ==&lt;br /&gt;
=== Disappearing cursor ===&lt;br /&gt;
You may need to get an icon pack and possibly a theme from [https://www.pling.com/browse?cat=107&amp;amp;ord=latest Pling store] and set &amp;lt;code&amp;gt;GTK_THEME&amp;lt;/code&amp;gt; environmental variable. Alternatively you can install a theme      for all users (search [https://pkgs.alpinelinux.org/ Alpine Linux Packages] for &#039;&#039;*-icon-theme&#039;&#039;) using &amp;lt;code&amp;gt;apk add&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Missing file picker/cannot download ===&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;about:config&#039;&#039; and set &amp;lt;code&amp;gt;widget.use-xdg-desktop-portal.file-picker&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
== Failing to start under certain graphics cards/multiple wlroots stacked windows spawning upon start ==&lt;br /&gt;
As of Dec 31 2022, [https://developer.nvidia.com/docs/drive/drive-os/latest/linux/sdk/common/topics/window_system_stub/Gnome-WaylandDesktopShellSupport136.html Nvidia still doesn&#039;t fully support Wayland]. Therefore, the possible solutions are as outlined in the link, or setting your WLR_BACKENDS environmental variables to &amp;lt;code&amp;gt;drm,libinput&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;x11&amp;lt;/code&amp;gt; (add libinput here as well if you cannot use your mouse and keyboard after starting Sway). The latter also works for AMD/ATI cards (&#039;&#039;&#039;make sure to install libinput first&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
== Sway socket not detected ==&lt;br /&gt;
&lt;br /&gt;
See [[Sway#Installation|Installation]] for instructions on how to set this environmental variable. This issue may occur with terminal multiplexers, such as [[tmux]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [https://wiki.archlinux.org/title/Sway Archwiki]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Sway Gentoo Wiki]&lt;br /&gt;
* [https://wiki.postmarketos.org/wiki/Sway PostmarketOS Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]]&lt;br /&gt;
[[Category:Window Managers]]&lt;br /&gt;
[[Category:Wayland]]&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26464</id>
		<title>Sway</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26464"/>
		<updated>2024-02-23T23:37:10Z</updated>

		<summary type="html">&lt;p&gt;Quq: dedup sections&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sway is a tiling Wayland compositor and a drop-in replacement for the i3 window manager for X11. It works with your existing i3 configuration and supports most of i3&#039;s features, plus a few extras.&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 # else greetd will fail to start&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
If using &amp;lt;code&amp;gt;swayidle before-sleep&amp;lt;/code&amp;gt;, there will be a race condition, so that when you resume the computer from suspend, the screen shows the contents of the unlocked screen for a second before showing the actual lock screen.  This can be a privacy concern, if someone is filming the screen.&lt;br /&gt;
To solve this issue, do the following:&lt;br /&gt;
&lt;br /&gt;
Create this file &amp;lt;code&amp;gt;/etc/elogind/system-sleep/10-swaylock.sh&amp;lt;/code&amp;gt;, then add the following script to this file:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 if [ &amp;quot;${1}&amp;quot; == &amp;quot;pre&amp;quot; ]; then&lt;br /&gt;
   touch /tmp/swaylock-sleep&lt;br /&gt;
   sleep 1&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
Then set it to executable.&lt;br /&gt;
&lt;br /&gt;
Later, once sway is installed, add the following line to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec sh -c &amp;quot;touch /tmp/swaylock-sleep; inotifyd swaylock /tmp/swaylock-sleep&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to run sway with &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt;, this is needed for PipeWire and screensharing in Firefox and Chromium.&lt;br /&gt;
&lt;br /&gt;
== Install doas (optional)==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &lt;br /&gt;
&lt;br /&gt;
 /bin/loginctl suspend&lt;br /&gt;
&lt;br /&gt;
(use full path to executable) and brightness can be adjusted by running&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/brightnessctl set 100&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
== Launch PipeWire and enable screensharing ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native) for launching programs and selecting which screen to share in Firefox/Chromium:&lt;br /&gt;
&lt;br /&gt;
 set $menu bemenu-run | xargs swaymsg exec&lt;br /&gt;
&lt;br /&gt;
== Mouse cursor theme ==&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
== Screen lock and suspend-to-RAM ==&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w timeout 630 &#039;doas /bin/loginctl suspend&#039;&lt;br /&gt;
&lt;br /&gt;
loginctl suspend command will trigger the screenlock, as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;br /&gt;
&lt;br /&gt;
== Output scaling for high resolution displays ==&lt;br /&gt;
&lt;br /&gt;
Without further configuration, program interfaces might be too small to use on high resolution displays.&lt;br /&gt;
&lt;br /&gt;
Sway supports the per-display configuration of&lt;br /&gt;
&lt;br /&gt;
* fractional (e.g., 1.5x), and&lt;br /&gt;
* integer scaling (e.g., 2x) &lt;br /&gt;
&lt;br /&gt;
However, fractional scaling is discouraged due to both the performance impact and the blurry output it produces. In this case, where 1x scaling is too small and 2x scaling is too large, program-specific GTK/QT based scaling is recommended.  See below.&lt;br /&gt;
&lt;br /&gt;
To enable Sway scaling, the user can first preview different scaling factors with &amp;lt;code&amp;gt;wdisplays&amp;lt;/code&amp;gt; package.  Note the output name (eDP-1, LVDS-1) and try apply scaling factors such as 1 and 2.  To make changes permanent, add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
output &amp;lt;name&amp;gt; scale &amp;lt;factor&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to ~/.config/sway/config.&lt;br /&gt;
&lt;br /&gt;
To use toolkit scaling, use&lt;br /&gt;
{{Cmd|# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE{{=}}2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}&amp;quot;physical&amp;quot;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; or if still too small, use a custom DPI&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}192 # 2x scaling&lt;br /&gt;
export QT_QPA_PLATFORM{{=}}&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Make clipboard content persistent ==&lt;br /&gt;
By default the clipboard content does not persist after terminating the program: you copy some text from Firefox and then exit Firefox, the copied text is also lost.&lt;br /&gt;
&lt;br /&gt;
Install clipman from testing repo and add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec wl-paste --type text/plain --watch clipman store --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
bindsym $mod+h exec clipman pick --tool wofi --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox picture-in-picture mode/floating windows ==&lt;br /&gt;
Add this to your sway config file (modify the numeric values to suit your needs and your display):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for_window [app_id=&amp;quot;firefox&amp;quot; title=&amp;quot;^Picture-in-Picture$&amp;quot;] floating enable, move position 877 450, sticky enable, border none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
A simple tool that works well under Wayland is Grimshot. Example keybindings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bindsym Print exec grimshot copy area&lt;br /&gt;
bindsym Shift+Print exec grimshot copy screen&lt;br /&gt;
bindsym Control+Print exec grimshot save area ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
bindsym Control+Shift+Print exec grimshot save screen ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway the sway wiki&#039;s article] for a list of screenshot tools.&lt;br /&gt;
&lt;br /&gt;
== Start with NumLock enabled ==&lt;br /&gt;
Add this to your sway config file:&lt;br /&gt;
&amp;lt;code&amp;gt;input type:keyboard xkb_numlock enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change cursor theme and size ==&lt;br /&gt;
Add to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seat seat0 xcursor_theme my_cursor_theme my_cursor_size&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can inspect their values with &amp;lt;code&amp;gt;echo $XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;echo $XCURSOR_THEME&amp;lt;/code&amp;gt;. If reloading your config does not result in change, try logging out and in.&lt;br /&gt;
{{Note|Wayland uses client-side cursors. It is possible that applications do not evaluate the values of &amp;lt;code&amp;gt;$XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$XCURSOR_THEME&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Custom keyboard layout ==&lt;br /&gt;
&lt;br /&gt;
Since wayland does not support setxkbmap, you will also need to add similar content to your &#039;&#039;/usr/share/X11/xkb/rules/evdev.xml&#039;&#039;, after &amp;lt;code&amp;gt;&amp;lt;/modelList&amp;gt;&amp;lt;/code&amp;gt; and after &amp;lt;code&amp;gt;&amp;lt;layoutList&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;&lt;br /&gt;
      &amp;lt;configItem&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;[the name of your layout, same as the name of the file in /usr/share/X11/xkb/symbols]&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;shortDescription&amp;gt;[usually just two letters]&amp;lt;/shortDescription&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt;[description of your layout]&amp;lt;/description&amp;gt;&lt;br /&gt;
        &amp;lt;countryList&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;US&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;NO&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
        &amp;lt;/countryList&amp;gt;&lt;br /&gt;
        &amp;lt;languageList&amp;gt;&lt;br /&gt;
          &amp;lt;iso639Id&amp;gt;eng&amp;lt;/iso639Id&amp;gt;&lt;br /&gt;
        &amp;lt;/languageList&amp;gt;&lt;br /&gt;
      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;!--[other layouts]--&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, to enable for all keyboards, navigate to the input section of &#039;&#039;~/.config/sway/config&#039;&#039; and modify it to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input type:keyboard {&lt;br /&gt;
  xkb_layout &amp;quot;my_layout&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have enabled &amp;lt;code&amp;gt;xkb_numlock&amp;lt;/code&amp;gt;, include this setting inside those braces as well.&lt;br /&gt;
&lt;br /&gt;
== Default font ==&lt;br /&gt;
&lt;br /&gt;
This is not related to Sway, but still nice to have: change system wide default font selection.  In &amp;lt;code&amp;gt;/etc/fonts/conf.d/52-my-default-fonts.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&#039;1.0&#039;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE fontconfig SYSTEM &#039;urn:fontconfig:fonts.dtd&#039;&amp;gt;&lt;br /&gt;
&amp;lt;fontconfig&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Default fonts --&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;sans-serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;monospace&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans Mono&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
&amp;lt;/fontconfig&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can obtain a list of installed fonts with &amp;lt;code&amp;gt;fc-list&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If you encounter any issues, try running &amp;lt;code&amp;gt;sway -Vc /etc/sway/config&amp;lt;/code&amp;gt;. It will run sway with the default config file and set the output to be more verbose. It is generally a good idea to track your config files with git (when and if at all you use a remote repository for them, keep it private for security reasons). &lt;br /&gt;
&lt;br /&gt;
== Flatpaks ==&lt;br /&gt;
{{main|Flatpak}}&lt;br /&gt;
Due to their sandboxing, flatpaks require the use of a portal frontend (xdg-desktop-portal) and backends (such as xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, xdg-desktop-portal-gnome) that implement the methods. When in doubt, install multiple backends. For more information on backends, see [https://github.com/flatpak/xdg-desktop-portal/#using-portals flatpak&#039;s page on the subject]. In addition to the steps under the &amp;quot;Firefox Screensharing&amp;quot; section, it may also be necessary to launch additional backends in your Sway config file. Otherwise, you may run into GDBus errors as your flatpak fails to interface with the portal. This can cause issues such as with opening your file directories from a flatpak application.&lt;br /&gt;
&lt;br /&gt;
After installing different backends, you might need to add the relevant backends to your sway config file similarly to in the &amp;quot;Firefox Screensharing&amp;quot; section above. For example, an autostart section of your sway config file may include:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gtk&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-wlr&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gnome&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is only needed if they are not started automatically via other means.&lt;br /&gt;
&lt;br /&gt;
== Firefox (Flatpak) and/or GTK apps ==&lt;br /&gt;
=== Disappearing cursor ===&lt;br /&gt;
You may need to get an icon pack and possibly a theme from [https://www.pling.com/browse?cat=107&amp;amp;ord=latest Pling store] and set &amp;lt;code&amp;gt;GTK_THEME&amp;lt;/code&amp;gt; environmental variable. Alternatively you can install a theme      for all users (search [https://pkgs.alpinelinux.org/ Alpine Linux Packages] for &#039;&#039;*-icon-theme&#039;&#039;) using &amp;lt;code&amp;gt;apk add&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Missing file picker/cannot download ===&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;about:config&#039;&#039; and set &amp;lt;code&amp;gt;widget.use-xdg-desktop-portal.file-picker&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
== Failing to start under certain graphics cards/multiple wlroots stacked windows spawning upon start ==&lt;br /&gt;
As of Dec 31 2022, [https://developer.nvidia.com/docs/drive/drive-os/latest/linux/sdk/common/topics/window_system_stub/Gnome-WaylandDesktopShellSupport136.html Nvidia still doesn&#039;t fully support Wayland]. Therefore, the possible solutions are as outlined in the link, or setting your WLR_BACKENDS environmental variables to &amp;lt;code&amp;gt;drm,libinput&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;x11&amp;lt;/code&amp;gt; (add libinput here as well if you cannot use your mouse and keyboard after starting Sway). The latter also works for AMD/ATI cards (&#039;&#039;&#039;make sure to install libinput first&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
== Sway socket not detected ==&lt;br /&gt;
&lt;br /&gt;
See [[Sway#Installation|Installation]] for instructions on how to set this environmental variable. This issue may occur with terminal multiplexers, such as [[tmux]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [https://wiki.archlinux.org/title/Sway Archwiki]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Sway Gentoo Wiki]&lt;br /&gt;
* [https://wiki.postmarketos.org/wiki/Sway PostmarketOS Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]]&lt;br /&gt;
[[Category:Window Managers]]&lt;br /&gt;
[[Category:Wayland]]&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26463</id>
		<title>Sway</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26463"/>
		<updated>2024-02-23T23:36:24Z</updated>

		<summary type="html">&lt;p&gt;Quq: fix indentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sway is a tiling Wayland compositor and a drop-in replacement for the i3 window manager for X11. It works with your existing i3 configuration and supports most of i3&#039;s features, plus a few extras.&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 # else greetd will fail to start&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
If using &amp;lt;code&amp;gt;swayidle before-sleep&amp;lt;/code&amp;gt;, there will be a race condition, so that when you resume the computer from suspend, the screen shows the contents of the unlocked screen for a second before showing the actual lock screen.  This can be a privacy concern, if someone is filming the screen.&lt;br /&gt;
To solve this issue, do the following:&lt;br /&gt;
&lt;br /&gt;
Create this file &amp;lt;code&amp;gt;/etc/elogind/system-sleep/10-swaylock.sh&amp;lt;/code&amp;gt;, then add the following script to this file:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 if [ &amp;quot;${1}&amp;quot; == &amp;quot;pre&amp;quot; ]; then&lt;br /&gt;
   touch /tmp/swaylock-sleep&lt;br /&gt;
   sleep 1&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
Then set it to executable.&lt;br /&gt;
&lt;br /&gt;
Later, once sway is installed, add the following line to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec sh -c &amp;quot;touch /tmp/swaylock-sleep; inotifyd swaylock /tmp/swaylock-sleep&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to run sway with &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt;, this is needed for PipeWire and screensharing in Firefox and Chromium.&lt;br /&gt;
&lt;br /&gt;
== Install doas (optional)==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &lt;br /&gt;
&lt;br /&gt;
 /bin/loginctl suspend&lt;br /&gt;
&lt;br /&gt;
(use full path to executable) and brightness can be adjusted by running&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/brightnessctl set 100&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
== Launch PipeWire and enable screensharing ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native) for launching programs and selecting which screen to share in Firefox/Chromium:&lt;br /&gt;
&lt;br /&gt;
 set $menu bemenu-run | xargs swaymsg exec&lt;br /&gt;
&lt;br /&gt;
== Mouse cursor theme ==&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
== Screen lock and suspend-to-RAM ==&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w timeout 630 &#039;doas /bin/loginctl suspend&#039;&lt;br /&gt;
&lt;br /&gt;
loginctl suspend command will trigger the screenlock, as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;br /&gt;
&lt;br /&gt;
== Output scaling for high resolution displays ==&lt;br /&gt;
&lt;br /&gt;
Without further configuration, program interfaces might be too small to use on high resolution displays.&lt;br /&gt;
&lt;br /&gt;
Sway supports the per-display configuration of&lt;br /&gt;
&lt;br /&gt;
* fractional (e.g., 1.5x), and&lt;br /&gt;
* integer scaling (e.g., 2x) &lt;br /&gt;
&lt;br /&gt;
However, fractional scaling is discouraged due to both the performance impact and the blurry output it produces. In this case, where 1x scaling is too small and 2x scaling is too large, program-specific GTK/QT based scaling is recommended.  See below.&lt;br /&gt;
&lt;br /&gt;
To enable Sway scaling, the user can first preview different scaling factors with &amp;lt;code&amp;gt;wdisplays&amp;lt;/code&amp;gt; package.  Note the output name (eDP-1, LVDS-1) and try apply scaling factors such as 1 and 2.  To make changes permanent, add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
output &amp;lt;name&amp;gt; scale &amp;lt;factor&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to ~/.config/sway/config.&lt;br /&gt;
&lt;br /&gt;
To use toolkit scaling, use&lt;br /&gt;
{{Cmd|# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE{{=}}2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}&amp;quot;physical&amp;quot;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; or if still too small, use a custom DPI&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}192 # 2x scaling&lt;br /&gt;
export QT_QPA_PLATFORM{{=}}&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Make clipboard content persistent ==&lt;br /&gt;
By default the clipboard content does not persist after terminating the program: you copy some text from Firefox and then exit Firefox, the copied text is also lost.&lt;br /&gt;
&lt;br /&gt;
Install clipman from testing repo and add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec wl-paste --type text/plain --watch clipman store --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
bindsym $mod+h exec clipman pick --tool wofi --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox picture-in-picture mode/floating windows ==&lt;br /&gt;
Add this to your sway config file (modify the numeric values to suit your needs and your display):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for_window [app_id=&amp;quot;firefox&amp;quot; title=&amp;quot;^Picture-in-Picture$&amp;quot;] floating enable, move position 877 450, sticky enable, border none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
A simple tool that works well under Wayland is Grimshot. Example keybindings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bindsym Print exec grimshot copy area&lt;br /&gt;
bindsym Shift+Print exec grimshot copy screen&lt;br /&gt;
bindsym Control+Print exec grimshot save area ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
bindsym Control+Shift+Print exec grimshot save screen ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway the sway wiki&#039;s article] for a list of screenshot tools.&lt;br /&gt;
&lt;br /&gt;
== Start with NumLock enabled ==&lt;br /&gt;
Add this to your sway config file:&lt;br /&gt;
&amp;lt;code&amp;gt;input type:keyboard xkb_numlock enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change cursor theme and size ==&lt;br /&gt;
Add to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seat seat0 xcursor_theme my_cursor_theme my_cursor_size&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can inspect their values with &amp;lt;code&amp;gt;echo $XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;echo $XCURSOR_THEME&amp;lt;/code&amp;gt;. If reloading your config does not result in change, try logging out and in.&lt;br /&gt;
{{Note|Wayland uses client-side cursors. It is possible that applications do not evaluate the values of &amp;lt;code&amp;gt;$XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$XCURSOR_THEME&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Custom keyboard layout ==&lt;br /&gt;
&lt;br /&gt;
Since wayland does not support setxkbmap, you will also need to add similar content to your &#039;&#039;/usr/share/X11/xkb/rules/evdev.xml&#039;&#039;, after &amp;lt;code&amp;gt;&amp;lt;/modelList&amp;gt;&amp;lt;/code&amp;gt; and after &amp;lt;code&amp;gt;&amp;lt;layoutList&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;&lt;br /&gt;
      &amp;lt;configItem&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;[the name of your layout, same as the name of the file in /usr/share/X11/xkb/symbols]&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;shortDescription&amp;gt;[usually just two letters]&amp;lt;/shortDescription&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt;[description of your layout]&amp;lt;/description&amp;gt;&lt;br /&gt;
        &amp;lt;countryList&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;US&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;NO&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
        &amp;lt;/countryList&amp;gt;&lt;br /&gt;
        &amp;lt;languageList&amp;gt;&lt;br /&gt;
          &amp;lt;iso639Id&amp;gt;eng&amp;lt;/iso639Id&amp;gt;&lt;br /&gt;
        &amp;lt;/languageList&amp;gt;&lt;br /&gt;
      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;!--[other layouts]--&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, to enable for all keyboards, navigate to the input section of &#039;&#039;~/.config/sway/config&#039;&#039; and modify it to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input type:keyboard {&lt;br /&gt;
  xkb_layout &amp;quot;my_layout&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have enabled &amp;lt;code&amp;gt;xkb_numlock&amp;lt;/code&amp;gt;, include this setting inside those braces as well.&lt;br /&gt;
&lt;br /&gt;
== Default font ==&lt;br /&gt;
&lt;br /&gt;
This is not related to Sway, but still nice to have: change system wide default font selection.  In &amp;lt;code&amp;gt;/etc/fonts/conf.d/52-my-default-fonts.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&#039;1.0&#039;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE fontconfig SYSTEM &#039;urn:fontconfig:fonts.dtd&#039;&amp;gt;&lt;br /&gt;
&amp;lt;fontconfig&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Default fonts --&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;sans-serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;monospace&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans Mono&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
&amp;lt;/fontconfig&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can obtain a list of installed fonts with &amp;lt;code&amp;gt;fc-list&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If you encounter any issues, try running &amp;lt;code&amp;gt;sway -Vc /etc/sway/config&amp;lt;/code&amp;gt;. It will run sway with the default config file and set the output to be more verbose. It is generally a good idea to track your config files with git (when and if at all you use a remote repository for them, keep it private for security reasons). &lt;br /&gt;
&lt;br /&gt;
== Flatpaks ==&lt;br /&gt;
{{main|Flatpak}}&lt;br /&gt;
Due to their sandboxing, flatpaks require the use of a portal frontend (xdg-desktop-portal) and backends (such as xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, xdg-desktop-portal-gnome) that implement the methods. When in doubt, install multiple backends. For more information on backends, see [https://github.com/flatpak/xdg-desktop-portal/#using-portals flatpak&#039;s page on the subject]. In addition to the steps under the &amp;quot;Firefox Screensharing&amp;quot; section, it may also be necessary to launch additional backends in your Sway config file. Otherwise, you may run into GDBus errors as your flatpak fails to interface with the portal. This can cause issues such as with opening your file directories from a flatpak application.&lt;br /&gt;
&lt;br /&gt;
After installing different backends, you might need to add the relevant backends to your sway config file similarly to in the &amp;quot;Firefox Screensharing&amp;quot; section above. For example, an autostart section of your sway config file may include:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gtk&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-wlr&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gnome&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is only needed if they are not started automatically via other means.&lt;br /&gt;
&lt;br /&gt;
== Firefox (Flatpak) and/or GTK apps ==&lt;br /&gt;
=== Disappearing cursor ===&lt;br /&gt;
You may need to get an icon pack and possibly a theme from [https://www.pling.com/browse?cat=107&amp;amp;ord=latest Pling store] and set &amp;lt;code&amp;gt;GTK_THEME&amp;lt;/code&amp;gt; environmental variable. Alternatively you can install a theme      for all users (search [https://pkgs.alpinelinux.org/ Alpine Linux Packages] for &#039;&#039;*-icon-theme&#039;&#039;) using &amp;lt;code&amp;gt;apk add&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Missing file picker/cannot download ===&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;about:config&#039;&#039; and set &amp;lt;code&amp;gt;widget.use-xdg-desktop-portal.file-picker&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
== Failing to start under certain graphics cards/multiple wlroots stacked windows spawning upon start ==&lt;br /&gt;
As of Dec 31 2022, [https://developer.nvidia.com/docs/drive/drive-os/latest/linux/sdk/common/topics/window_system_stub/Gnome-WaylandDesktopShellSupport136.html Nvidia still doesn&#039;t fully support Wayland]. Therefore, the possible solutions are as outlined in the link, or setting your WLR_BACKENDS environmental variables to &amp;lt;code&amp;gt;drm,libinput&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;x11&amp;lt;/code&amp;gt; (add libinput here as well if you cannot use your mouse and keyboard after starting Sway). The latter also works for AMD/ATI cards (&#039;&#039;&#039;make sure to install libinput first&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
== Sway socket not detected ==&lt;br /&gt;
&lt;br /&gt;
See [[Sway#Installation|Installation]] for instructions on how to set this environmental variable. This issue may occur with terminal multiplexers, such as [[tmux]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [https://wiki.archlinux.org/title/Sway Archwiki]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Sway Gentoo Wiki]&lt;br /&gt;
* [https://wiki.postmarketos.org/wiki/Sway PostmarketOS Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]]&lt;br /&gt;
[[Category:Window Managers]]&lt;br /&gt;
[[Category:Wayland]]&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26462</id>
		<title>Sway</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26462"/>
		<updated>2024-02-23T23:36:06Z</updated>

		<summary type="html">&lt;p&gt;Quq: add a nice intro&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; Sway is a tiling Wayland compositor and a drop-in replacement for the i3 window manager for X11. It works with your existing i3 configuration and supports most of i3&#039;s features, plus a few extras.&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 # else greetd will fail to start&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
If using &amp;lt;code&amp;gt;swayidle before-sleep&amp;lt;/code&amp;gt;, there will be a race condition, so that when you resume the computer from suspend, the screen shows the contents of the unlocked screen for a second before showing the actual lock screen.  This can be a privacy concern, if someone is filming the screen.&lt;br /&gt;
To solve this issue, do the following:&lt;br /&gt;
&lt;br /&gt;
Create this file &amp;lt;code&amp;gt;/etc/elogind/system-sleep/10-swaylock.sh&amp;lt;/code&amp;gt;, then add the following script to this file:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 if [ &amp;quot;${1}&amp;quot; == &amp;quot;pre&amp;quot; ]; then&lt;br /&gt;
   touch /tmp/swaylock-sleep&lt;br /&gt;
   sleep 1&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
Then set it to executable.&lt;br /&gt;
&lt;br /&gt;
Later, once sway is installed, add the following line to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec sh -c &amp;quot;touch /tmp/swaylock-sleep; inotifyd swaylock /tmp/swaylock-sleep&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to run sway with &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt;, this is needed for PipeWire and screensharing in Firefox and Chromium.&lt;br /&gt;
&lt;br /&gt;
== Install doas (optional)==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &lt;br /&gt;
&lt;br /&gt;
 /bin/loginctl suspend&lt;br /&gt;
&lt;br /&gt;
(use full path to executable) and brightness can be adjusted by running&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/brightnessctl set 100&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
== Launch PipeWire and enable screensharing ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native) for launching programs and selecting which screen to share in Firefox/Chromium:&lt;br /&gt;
&lt;br /&gt;
 set $menu bemenu-run | xargs swaymsg exec&lt;br /&gt;
&lt;br /&gt;
== Mouse cursor theme ==&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
== Screen lock and suspend-to-RAM ==&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w timeout 630 &#039;doas /bin/loginctl suspend&#039;&lt;br /&gt;
&lt;br /&gt;
loginctl suspend command will trigger the screenlock, as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;br /&gt;
&lt;br /&gt;
== Output scaling for high resolution displays ==&lt;br /&gt;
&lt;br /&gt;
Without further configuration, program interfaces might be too small to use on high resolution displays.&lt;br /&gt;
&lt;br /&gt;
Sway supports the per-display configuration of&lt;br /&gt;
&lt;br /&gt;
* fractional (e.g., 1.5x), and&lt;br /&gt;
* integer scaling (e.g., 2x) &lt;br /&gt;
&lt;br /&gt;
However, fractional scaling is discouraged due to both the performance impact and the blurry output it produces. In this case, where 1x scaling is too small and 2x scaling is too large, program-specific GTK/QT based scaling is recommended.  See below.&lt;br /&gt;
&lt;br /&gt;
To enable Sway scaling, the user can first preview different scaling factors with &amp;lt;code&amp;gt;wdisplays&amp;lt;/code&amp;gt; package.  Note the output name (eDP-1, LVDS-1) and try apply scaling factors such as 1 and 2.  To make changes permanent, add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
output &amp;lt;name&amp;gt; scale &amp;lt;factor&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to ~/.config/sway/config.&lt;br /&gt;
&lt;br /&gt;
To use toolkit scaling, use&lt;br /&gt;
{{Cmd|# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE{{=}}2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}&amp;quot;physical&amp;quot;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; or if still too small, use a custom DPI&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}192 # 2x scaling&lt;br /&gt;
export QT_QPA_PLATFORM{{=}}&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Make clipboard content persistent ==&lt;br /&gt;
By default the clipboard content does not persist after terminating the program: you copy some text from Firefox and then exit Firefox, the copied text is also lost.&lt;br /&gt;
&lt;br /&gt;
Install clipman from testing repo and add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec wl-paste --type text/plain --watch clipman store --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
bindsym $mod+h exec clipman pick --tool wofi --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox picture-in-picture mode/floating windows ==&lt;br /&gt;
Add this to your sway config file (modify the numeric values to suit your needs and your display):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for_window [app_id=&amp;quot;firefox&amp;quot; title=&amp;quot;^Picture-in-Picture$&amp;quot;] floating enable, move position 877 450, sticky enable, border none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
A simple tool that works well under Wayland is Grimshot. Example keybindings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bindsym Print exec grimshot copy area&lt;br /&gt;
bindsym Shift+Print exec grimshot copy screen&lt;br /&gt;
bindsym Control+Print exec grimshot save area ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
bindsym Control+Shift+Print exec grimshot save screen ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway the sway wiki&#039;s article] for a list of screenshot tools.&lt;br /&gt;
&lt;br /&gt;
== Start with NumLock enabled ==&lt;br /&gt;
Add this to your sway config file:&lt;br /&gt;
&amp;lt;code&amp;gt;input type:keyboard xkb_numlock enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change cursor theme and size ==&lt;br /&gt;
Add to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seat seat0 xcursor_theme my_cursor_theme my_cursor_size&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can inspect their values with &amp;lt;code&amp;gt;echo $XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;echo $XCURSOR_THEME&amp;lt;/code&amp;gt;. If reloading your config does not result in change, try logging out and in.&lt;br /&gt;
{{Note|Wayland uses client-side cursors. It is possible that applications do not evaluate the values of &amp;lt;code&amp;gt;$XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$XCURSOR_THEME&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Custom keyboard layout ==&lt;br /&gt;
&lt;br /&gt;
Since wayland does not support setxkbmap, you will also need to add similar content to your &#039;&#039;/usr/share/X11/xkb/rules/evdev.xml&#039;&#039;, after &amp;lt;code&amp;gt;&amp;lt;/modelList&amp;gt;&amp;lt;/code&amp;gt; and after &amp;lt;code&amp;gt;&amp;lt;layoutList&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;&lt;br /&gt;
      &amp;lt;configItem&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;[the name of your layout, same as the name of the file in /usr/share/X11/xkb/symbols]&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;shortDescription&amp;gt;[usually just two letters]&amp;lt;/shortDescription&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt;[description of your layout]&amp;lt;/description&amp;gt;&lt;br /&gt;
        &amp;lt;countryList&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;US&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;NO&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
        &amp;lt;/countryList&amp;gt;&lt;br /&gt;
        &amp;lt;languageList&amp;gt;&lt;br /&gt;
          &amp;lt;iso639Id&amp;gt;eng&amp;lt;/iso639Id&amp;gt;&lt;br /&gt;
        &amp;lt;/languageList&amp;gt;&lt;br /&gt;
      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;!--[other layouts]--&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, to enable for all keyboards, navigate to the input section of &#039;&#039;~/.config/sway/config&#039;&#039; and modify it to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input type:keyboard {&lt;br /&gt;
  xkb_layout &amp;quot;my_layout&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have enabled &amp;lt;code&amp;gt;xkb_numlock&amp;lt;/code&amp;gt;, include this setting inside those braces as well.&lt;br /&gt;
&lt;br /&gt;
== Default font ==&lt;br /&gt;
&lt;br /&gt;
This is not related to Sway, but still nice to have: change system wide default font selection.  In &amp;lt;code&amp;gt;/etc/fonts/conf.d/52-my-default-fonts.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&#039;1.0&#039;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE fontconfig SYSTEM &#039;urn:fontconfig:fonts.dtd&#039;&amp;gt;&lt;br /&gt;
&amp;lt;fontconfig&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Default fonts --&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;sans-serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;monospace&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans Mono&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
&amp;lt;/fontconfig&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can obtain a list of installed fonts with &amp;lt;code&amp;gt;fc-list&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If you encounter any issues, try running &amp;lt;code&amp;gt;sway -Vc /etc/sway/config&amp;lt;/code&amp;gt;. It will run sway with the default config file and set the output to be more verbose. It is generally a good idea to track your config files with git (when and if at all you use a remote repository for them, keep it private for security reasons). &lt;br /&gt;
&lt;br /&gt;
== Flatpaks ==&lt;br /&gt;
{{main|Flatpak}}&lt;br /&gt;
Due to their sandboxing, flatpaks require the use of a portal frontend (xdg-desktop-portal) and backends (such as xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, xdg-desktop-portal-gnome) that implement the methods. When in doubt, install multiple backends. For more information on backends, see [https://github.com/flatpak/xdg-desktop-portal/#using-portals flatpak&#039;s page on the subject]. In addition to the steps under the &amp;quot;Firefox Screensharing&amp;quot; section, it may also be necessary to launch additional backends in your Sway config file. Otherwise, you may run into GDBus errors as your flatpak fails to interface with the portal. This can cause issues such as with opening your file directories from a flatpak application.&lt;br /&gt;
&lt;br /&gt;
After installing different backends, you might need to add the relevant backends to your sway config file similarly to in the &amp;quot;Firefox Screensharing&amp;quot; section above. For example, an autostart section of your sway config file may include:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gtk&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-wlr&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gnome&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is only needed if they are not started automatically via other means.&lt;br /&gt;
&lt;br /&gt;
== Firefox (Flatpak) and/or GTK apps ==&lt;br /&gt;
=== Disappearing cursor ===&lt;br /&gt;
You may need to get an icon pack and possibly a theme from [https://www.pling.com/browse?cat=107&amp;amp;ord=latest Pling store] and set &amp;lt;code&amp;gt;GTK_THEME&amp;lt;/code&amp;gt; environmental variable. Alternatively you can install a theme      for all users (search [https://pkgs.alpinelinux.org/ Alpine Linux Packages] for &#039;&#039;*-icon-theme&#039;&#039;) using &amp;lt;code&amp;gt;apk add&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Missing file picker/cannot download ===&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;about:config&#039;&#039; and set &amp;lt;code&amp;gt;widget.use-xdg-desktop-portal.file-picker&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
== Failing to start under certain graphics cards/multiple wlroots stacked windows spawning upon start ==&lt;br /&gt;
As of Dec 31 2022, [https://developer.nvidia.com/docs/drive/drive-os/latest/linux/sdk/common/topics/window_system_stub/Gnome-WaylandDesktopShellSupport136.html Nvidia still doesn&#039;t fully support Wayland]. Therefore, the possible solutions are as outlined in the link, or setting your WLR_BACKENDS environmental variables to &amp;lt;code&amp;gt;drm,libinput&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;x11&amp;lt;/code&amp;gt; (add libinput here as well if you cannot use your mouse and keyboard after starting Sway). The latter also works for AMD/ATI cards (&#039;&#039;&#039;make sure to install libinput first&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
== Sway socket not detected ==&lt;br /&gt;
&lt;br /&gt;
See [[Sway#Installation|Installation]] for instructions on how to set this environmental variable. This issue may occur with terminal multiplexers, such as [[tmux]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [https://wiki.archlinux.org/title/Sway Archwiki]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Sway Gentoo Wiki]&lt;br /&gt;
* [https://wiki.postmarketos.org/wiki/Sway PostmarketOS Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]]&lt;br /&gt;
[[Category:Window Managers]]&lt;br /&gt;
[[Category:Wayland]]&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26461</id>
		<title>Sway</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26461"/>
		<updated>2024-02-23T23:35:39Z</updated>

		<summary type="html">&lt;p&gt;Quq: elogind, suspend-to-RAM, etc&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Install and configure Sway&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 # else greetd will fail to start&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
If using &amp;lt;code&amp;gt;swayidle before-sleep&amp;lt;/code&amp;gt;, there will be a race condition, so that when you resume the computer from suspend, the screen shows the contents of the unlocked screen for a second before showing the actual lock screen.  This can be a privacy concern, if someone is filming the screen.&lt;br /&gt;
To solve this issue, do the following:&lt;br /&gt;
&lt;br /&gt;
Create this file &amp;lt;code&amp;gt;/etc/elogind/system-sleep/10-swaylock.sh&amp;lt;/code&amp;gt;, then add the following script to this file:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 if [ &amp;quot;${1}&amp;quot; == &amp;quot;pre&amp;quot; ]; then&lt;br /&gt;
   touch /tmp/swaylock-sleep&lt;br /&gt;
   sleep 1&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
Then set it to executable.&lt;br /&gt;
&lt;br /&gt;
Later, once sway is installed, add the following line to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec sh -c &amp;quot;touch /tmp/swaylock-sleep; inotifyd swaylock /tmp/swaylock-sleep&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to run sway with &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt;, this is needed for PipeWire and screensharing in Firefox and Chromium.&lt;br /&gt;
&lt;br /&gt;
== Install doas (optional)==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &lt;br /&gt;
&lt;br /&gt;
 /bin/loginctl suspend&lt;br /&gt;
&lt;br /&gt;
(use full path to executable) and brightness can be adjusted by running&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/brightnessctl set 100&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
== Launch PipeWire and enable screensharing ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native) for launching programs and selecting which screen to share in Firefox/Chromium:&lt;br /&gt;
&lt;br /&gt;
 set $menu bemenu-run | xargs swaymsg exec&lt;br /&gt;
&lt;br /&gt;
== Mouse cursor theme ==&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
== Screen lock and suspend-to-RAM ==&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w timeout 630 &#039;doas /bin/loginctl suspend&#039;&lt;br /&gt;
&lt;br /&gt;
loginctl suspend command will trigger the screenlock, as mentioned above.&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;br /&gt;
&lt;br /&gt;
== Output scaling for high resolution displays ==&lt;br /&gt;
&lt;br /&gt;
Without further configuration, program interfaces might be too small to use on high resolution displays.&lt;br /&gt;
&lt;br /&gt;
Sway supports the per-display configuration of&lt;br /&gt;
&lt;br /&gt;
* fractional (e.g., 1.5x), and&lt;br /&gt;
* integer scaling (e.g., 2x) &lt;br /&gt;
&lt;br /&gt;
However, fractional scaling is discouraged due to both the performance impact and the blurry output it produces. In this case, where 1x scaling is too small and 2x scaling is too large, program-specific GTK/QT based scaling is recommended.  See below.&lt;br /&gt;
&lt;br /&gt;
To enable Sway scaling, the user can first preview different scaling factors with &amp;lt;code&amp;gt;wdisplays&amp;lt;/code&amp;gt; package.  Note the output name (eDP-1, LVDS-1) and try apply scaling factors such as 1 and 2.  To make changes permanent, add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
output &amp;lt;name&amp;gt; scale &amp;lt;factor&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to ~/.config/sway/config.&lt;br /&gt;
&lt;br /&gt;
To use toolkit scaling, use&lt;br /&gt;
{{Cmd|# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE{{=}}2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}&amp;quot;physical&amp;quot;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; or if still too small, use a custom DPI&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}192 # 2x scaling&lt;br /&gt;
export QT_QPA_PLATFORM{{=}}&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Make clipboard content persistent ==&lt;br /&gt;
By default the clipboard content does not persist after terminating the program: you copy some text from Firefox and then exit Firefox, the copied text is also lost.&lt;br /&gt;
&lt;br /&gt;
Install clipman from testing repo and add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec wl-paste --type text/plain --watch clipman store --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
bindsym $mod+h exec clipman pick --tool wofi --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox picture-in-picture mode/floating windows ==&lt;br /&gt;
Add this to your sway config file (modify the numeric values to suit your needs and your display):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for_window [app_id=&amp;quot;firefox&amp;quot; title=&amp;quot;^Picture-in-Picture$&amp;quot;] floating enable, move position 877 450, sticky enable, border none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
A simple tool that works well under Wayland is Grimshot. Example keybindings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bindsym Print exec grimshot copy area&lt;br /&gt;
bindsym Shift+Print exec grimshot copy screen&lt;br /&gt;
bindsym Control+Print exec grimshot save area ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
bindsym Control+Shift+Print exec grimshot save screen ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway the sway wiki&#039;s article] for a list of screenshot tools.&lt;br /&gt;
&lt;br /&gt;
== Start with NumLock enabled ==&lt;br /&gt;
Add this to your sway config file:&lt;br /&gt;
&amp;lt;code&amp;gt;input type:keyboard xkb_numlock enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change cursor theme and size ==&lt;br /&gt;
Add to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seat seat0 xcursor_theme my_cursor_theme my_cursor_size&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can inspect their values with &amp;lt;code&amp;gt;echo $XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;echo $XCURSOR_THEME&amp;lt;/code&amp;gt;. If reloading your config does not result in change, try logging out and in.&lt;br /&gt;
{{Note|Wayland uses client-side cursors. It is possible that applications do not evaluate the values of &amp;lt;code&amp;gt;$XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$XCURSOR_THEME&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Custom keyboard layout ==&lt;br /&gt;
&lt;br /&gt;
Since wayland does not support setxkbmap, you will also need to add similar content to your &#039;&#039;/usr/share/X11/xkb/rules/evdev.xml&#039;&#039;, after &amp;lt;code&amp;gt;&amp;lt;/modelList&amp;gt;&amp;lt;/code&amp;gt; and after &amp;lt;code&amp;gt;&amp;lt;layoutList&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;&lt;br /&gt;
      &amp;lt;configItem&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;[the name of your layout, same as the name of the file in /usr/share/X11/xkb/symbols]&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;shortDescription&amp;gt;[usually just two letters]&amp;lt;/shortDescription&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt;[description of your layout]&amp;lt;/description&amp;gt;&lt;br /&gt;
        &amp;lt;countryList&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;US&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;NO&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
        &amp;lt;/countryList&amp;gt;&lt;br /&gt;
        &amp;lt;languageList&amp;gt;&lt;br /&gt;
          &amp;lt;iso639Id&amp;gt;eng&amp;lt;/iso639Id&amp;gt;&lt;br /&gt;
        &amp;lt;/languageList&amp;gt;&lt;br /&gt;
      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;!--[other layouts]--&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, to enable for all keyboards, navigate to the input section of &#039;&#039;~/.config/sway/config&#039;&#039; and modify it to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input type:keyboard {&lt;br /&gt;
  xkb_layout &amp;quot;my_layout&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have enabled &amp;lt;code&amp;gt;xkb_numlock&amp;lt;/code&amp;gt;, include this setting inside those braces as well.&lt;br /&gt;
&lt;br /&gt;
== Default font ==&lt;br /&gt;
&lt;br /&gt;
This is not related to Sway, but still nice to have: change system wide default font selection.  In &amp;lt;code&amp;gt;/etc/fonts/conf.d/52-my-default-fonts.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&#039;1.0&#039;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE fontconfig SYSTEM &#039;urn:fontconfig:fonts.dtd&#039;&amp;gt;&lt;br /&gt;
&amp;lt;fontconfig&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Default fonts --&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;sans-serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;monospace&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans Mono&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
&amp;lt;/fontconfig&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can obtain a list of installed fonts with &amp;lt;code&amp;gt;fc-list&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If you encounter any issues, try running &amp;lt;code&amp;gt;sway -Vc /etc/sway/config&amp;lt;/code&amp;gt;. It will run sway with the default config file and set the output to be more verbose. It is generally a good idea to track your config files with git (when and if at all you use a remote repository for them, keep it private for security reasons). &lt;br /&gt;
&lt;br /&gt;
== Flatpaks ==&lt;br /&gt;
{{main|Flatpak}}&lt;br /&gt;
Due to their sandboxing, flatpaks require the use of a portal frontend (xdg-desktop-portal) and backends (such as xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, xdg-desktop-portal-gnome) that implement the methods. When in doubt, install multiple backends. For more information on backends, see [https://github.com/flatpak/xdg-desktop-portal/#using-portals flatpak&#039;s page on the subject]. In addition to the steps under the &amp;quot;Firefox Screensharing&amp;quot; section, it may also be necessary to launch additional backends in your Sway config file. Otherwise, you may run into GDBus errors as your flatpak fails to interface with the portal. This can cause issues such as with opening your file directories from a flatpak application.&lt;br /&gt;
&lt;br /&gt;
After installing different backends, you might need to add the relevant backends to your sway config file similarly to in the &amp;quot;Firefox Screensharing&amp;quot; section above. For example, an autostart section of your sway config file may include:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gtk&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-wlr&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gnome&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is only needed if they are not started automatically via other means.&lt;br /&gt;
&lt;br /&gt;
== Firefox (Flatpak) and/or GTK apps ==&lt;br /&gt;
=== Disappearing cursor ===&lt;br /&gt;
You may need to get an icon pack and possibly a theme from [https://www.pling.com/browse?cat=107&amp;amp;ord=latest Pling store] and set &amp;lt;code&amp;gt;GTK_THEME&amp;lt;/code&amp;gt; environmental variable. Alternatively you can install a theme      for all users (search [https://pkgs.alpinelinux.org/ Alpine Linux Packages] for &#039;&#039;*-icon-theme&#039;&#039;) using &amp;lt;code&amp;gt;apk add&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Missing file picker/cannot download ===&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;about:config&#039;&#039; and set &amp;lt;code&amp;gt;widget.use-xdg-desktop-portal.file-picker&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
== Failing to start under certain graphics cards/multiple wlroots stacked windows spawning upon start ==&lt;br /&gt;
As of Dec 31 2022, [https://developer.nvidia.com/docs/drive/drive-os/latest/linux/sdk/common/topics/window_system_stub/Gnome-WaylandDesktopShellSupport136.html Nvidia still doesn&#039;t fully support Wayland]. Therefore, the possible solutions are as outlined in the link, or setting your WLR_BACKENDS environmental variables to &amp;lt;code&amp;gt;drm,libinput&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;x11&amp;lt;/code&amp;gt; (add libinput here as well if you cannot use your mouse and keyboard after starting Sway). The latter also works for AMD/ATI cards (&#039;&#039;&#039;make sure to install libinput first&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
== Sway socket not detected ==&lt;br /&gt;
&lt;br /&gt;
See [[Sway#Installation|Installation]] for instructions on how to set this environmental variable. This issue may occur with terminal multiplexers, such as [[tmux]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [https://wiki.archlinux.org/title/Sway Archwiki]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Sway Gentoo Wiki]&lt;br /&gt;
* [https://wiki.postmarketos.org/wiki/Sway PostmarketOS Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]]&lt;br /&gt;
[[Category:Window Managers]]&lt;br /&gt;
[[Category:Wayland]]&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Sway_on_Laptop&amp;diff=26460</id>
		<title>Talk:Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Sway_on_Laptop&amp;diff=26460"/>
		<updated>2024-02-23T23:21:16Z</updated>

		<summary type="html">&lt;p&gt;Quq: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Proposal to merge==&lt;br /&gt;
The content here is about 75% the same as the main [[Sway]] article... It doesn&#039;t seem, at a glance, to cover anything laptop related either.&lt;br /&gt;
&amp;amp;ndash;[[User:zcrayfish|zcrayfish]] &amp;lt;small&amp;gt;([[User talk:zcrayfish|talk]]•[[Special:Contributions/zcrayfish|contribs]]•[[Special:EmailUser/zcrayfish|send email]])&amp;lt;/small&amp;gt; 09:57, 20 February 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
:{{replyto|zcrayfish}} I think it does.  This page adds elogind, for suspend-to-RAM.  I thought adding to the main sway page would go against the minimalist philosophy of Alpine. [[User:Quq|Quq]] ([[User talk:Quq|talk]]) 00:04, 21 February 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
::suspend-to-RAM is not laptop specific; desktop computers (e.g. those sold in OECD countries) should all support it since at least 2010. &amp;amp;ndash;[[User:zcrayfish|zcrayfish]] &amp;lt;small&amp;gt;([[User talk:zcrayfish|talk]]•[[Special:Contributions/zcrayfish|contribs]]•[[Special:EmailUser/zcrayfish|send email]])&amp;lt;/small&amp;gt; 01:52, 23 February 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Great! Then I will move the relevant sections to [[Sway]], then empty this page. [[User:Quq|Quq]] ([[User talk:Quq|talk]]) 23:21, 23 February 2024 (UTC)&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Sway_on_Laptop&amp;diff=26453</id>
		<title>Talk:Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Sway_on_Laptop&amp;diff=26453"/>
		<updated>2024-02-21T00:04:59Z</updated>

		<summary type="html">&lt;p&gt;Quq: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Proposal to merge==&lt;br /&gt;
The content here is about 75% the same as the main [[Sway]] article... It doesn&#039;t seem, at a glance, to cover anything laptop related either.&lt;br /&gt;
&amp;amp;ndash;[[User:zcrayfish|zcrayfish]] &amp;lt;small&amp;gt;([[User talk:zcrayfish|talk]]•[[Special:Contributions/zcrayfish|contribs]]•[[Special:EmailUser/zcrayfish|send email]])&amp;lt;/small&amp;gt; 09:57, 20 February 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
{{replyto|zcrayfish}} I think it does.  This page adds elogind, for suspend-to-RAM.  I thought adding to the main sway page would go against the minimalist philosophy of Alpine. [[User:Quq|Quq]] ([[User talk:Quq|talk]]) 00:04, 21 February 2024 (UTC)&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26444</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26444"/>
		<updated>2024-02-19T23:55:26Z</updated>

		<summary type="html">&lt;p&gt;Quq: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Install and configure Sway&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM with swayidle:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to run sway with &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt;, this is needed for PipeWire and screensharing in Firefox and Chromium.&lt;br /&gt;
&lt;br /&gt;
== Install doas ==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &lt;br /&gt;
&lt;br /&gt;
 /bin/loginctl suspend&lt;br /&gt;
&lt;br /&gt;
(use full path to executable) and brightness can be adjusted by running&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/brightnessctl set 100&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install PipeWire, WirePlumber and XDG portals ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Later, we need to launch PipeWire with Sway and configure several environment variables.&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
== Launch PipeWire and enable screensharing ==&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native) for launching programs and selecting which screen to share in Firefox/Chromium:&lt;br /&gt;
&lt;br /&gt;
 set $menu dmenu_path | bemenu | xargs swaymsg exec --&lt;br /&gt;
&lt;br /&gt;
== Mouse cursor theme ==&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
== Screen lock and suspend-to-RAM ==&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w \&lt;br /&gt;
          timeout 300 &#039;swaylock --daemonize&#039; \&lt;br /&gt;
          timeout 330 &#039;doas /bin/loginctl suspend&#039; \&lt;br /&gt;
          before-sleep &#039;swaylock --daemonize&#039;&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;br /&gt;
&lt;br /&gt;
== Output scaling for high resolution displays ==&lt;br /&gt;
&lt;br /&gt;
Without further configuration, program interfaces might be too small to use on high resolution displays.&lt;br /&gt;
&lt;br /&gt;
Sway supports the per-display configuration of&lt;br /&gt;
&lt;br /&gt;
* fractional (e.g., 1.5x), and&lt;br /&gt;
* integer scaling (e.g., 2x) &lt;br /&gt;
&lt;br /&gt;
However, fractional scaling is discouraged due to both the performance impact and the blurry output it produces. In this case, where 1x scaling is too small and 2x scaling is too large, program-specific GTK/QT based scaling is recommended.  See below.&lt;br /&gt;
&lt;br /&gt;
To enable Sway scaling, the user can first preview different scaling factors with &amp;lt;code&amp;gt;wdisplays&amp;lt;/code&amp;gt; package.  Note the output name (eDP-1, LVDS-1) and try apply scaling factors such as 1 and 2.  To make changes permanent, add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
output &amp;lt;name&amp;gt; scale &amp;lt;factor&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to ~/.config/sway/config.&lt;br /&gt;
&lt;br /&gt;
To use toolkit scaling, use&lt;br /&gt;
{{Cmd|# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE{{=}}2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}&amp;quot;physical&amp;quot;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; or if still too small, use a custom DPI&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}192 # 2x scaling&lt;br /&gt;
export QT_QPA_PLATFORM{{=}}&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Make clipboard content persistent ==&lt;br /&gt;
By default the clipboard content does not persist after terminating the program: you copy some text from Firefox and then exit Firefox, the copied text is also lost.&lt;br /&gt;
&lt;br /&gt;
Install clipman from testing repo and add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec wl-paste --type text/plain --watch clipman store --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
bindsym $mod+h exec clipman pick --tool wofi --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox picture-in-picture mode/floating windows ==&lt;br /&gt;
Add this to your sway config file (modify the numeric values to suit your needs and your display):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for_window [app_id=&amp;quot;firefox&amp;quot; title=&amp;quot;^Picture-in-Picture$&amp;quot;] floating enable, move position 877 450, sticky enable, border none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
A simple tool that works well under Wayland is Grimshot. Example keybindings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bindsym Print exec grimshot copy area&lt;br /&gt;
bindsym Shift+Print exec grimshot copy screen&lt;br /&gt;
bindsym Control+Print exec grimshot save area ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
bindsym Control+Shift+Print exec grimshot save screen ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway the sway wiki&#039;s article] for a list of screenshot tools.&lt;br /&gt;
&lt;br /&gt;
== Start with NumLock enabled ==&lt;br /&gt;
Add this to your sway config file:&lt;br /&gt;
&amp;lt;code&amp;gt;input type:keyboard xkb_numlock enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change cursor theme and size ==&lt;br /&gt;
Add to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seat seat0 xcursor_theme my_cursor_theme my_cursor_size&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can inspect their values with &amp;lt;code&amp;gt;echo $XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;echo $XCURSOR_THEME&amp;lt;/code&amp;gt;. If reloading your config does not result in change, try logging out and in.&lt;br /&gt;
{{Note|Wayland uses client-side cursors. It is possible that applications do not evaluate the values of &amp;lt;code&amp;gt;$XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$XCURSOR_THEME&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Custom keyboard layout ==&lt;br /&gt;
&lt;br /&gt;
Since wayland does not support setxkbmap, you will also need to add similar content to your &#039;&#039;/usr/share/X11/xkb/rules/evdev.xml&#039;&#039;, after &amp;lt;code&amp;gt;&amp;lt;/modelList&amp;gt;&amp;lt;/code&amp;gt; and after &amp;lt;code&amp;gt;&amp;lt;layoutList&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;&lt;br /&gt;
      &amp;lt;configItem&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;[the name of your layout, same as the name of the file in /usr/share/X11/xkb/symbols]&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;shortDescription&amp;gt;[usually just two letters]&amp;lt;/shortDescription&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt;[description of your layout]&amp;lt;/description&amp;gt;&lt;br /&gt;
        &amp;lt;countryList&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;US&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;NO&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
        &amp;lt;/countryList&amp;gt;&lt;br /&gt;
        &amp;lt;languageList&amp;gt;&lt;br /&gt;
          &amp;lt;iso639Id&amp;gt;eng&amp;lt;/iso639Id&amp;gt;&lt;br /&gt;
        &amp;lt;/languageList&amp;gt;&lt;br /&gt;
      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;!--[other layouts]--&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, to enable for all keyboards, navigate to the input section of &#039;&#039;~/.config/sway/config&#039;&#039; and modify it to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input * {&lt;br /&gt;
  xkb_layout &amp;quot;my_layout&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have enabled &amp;lt;code&amp;gt;xkb_numlock&amp;lt;/code&amp;gt;, include this setting inside those braces as well.&lt;br /&gt;
&lt;br /&gt;
== Default font ==&lt;br /&gt;
&lt;br /&gt;
This is not related to Sway, but still nice to have: change system wide default font selection.  In &amp;lt;code&amp;gt;/etc/fonts/conf.d/52-my-default-fonts.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&#039;1.0&#039;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE fontconfig SYSTEM &#039;urn:fontconfig:fonts.dtd&#039;&amp;gt;&lt;br /&gt;
&amp;lt;fontconfig&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Default fonts --&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;sans-serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;monospace&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans Mono&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
&amp;lt;/fontconfig&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can obtain a list of installed fonts with &amp;lt;code&amp;gt;fc-list&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If you encounter any issues, try running &amp;lt;code&amp;gt;sway -Vc /etc/sway/config&amp;lt;/code&amp;gt;. It will run sway with the default config file and set the output to be more verbose. It is generally a good idea to track your config files with git (when and if at all you use a remote repository for them, keep it private for security reasons). &lt;br /&gt;
&lt;br /&gt;
== Flatpaks ==&lt;br /&gt;
&lt;br /&gt;
Due to their sandboxing, flatpaks require the use of a portal frontend (xdg-desktop-portal) and backends (such as xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, xdg-desktop-portal-gnome) that implement the methods. When in doubt, install multiple backends. For more information on backends, see [https://github.com/flatpak/xdg-desktop-portal/#using-portals flatpak&#039;s page on the subject]. In addition to the steps under the &amp;quot;Firefox Screensharing&amp;quot; section, it may also be necessary to launch additional backends in your Sway config file. Otherwise, you may run into GDBus errors as your flatpak fails to interface with the portal. This can cause issues such as with opening your file directories from a flatpak application.&lt;br /&gt;
&lt;br /&gt;
After installing different backends, you might need to add the relevant backends to your sway config file similarly to in the &amp;quot;Firefox Screensharing&amp;quot; section above. For example, an autostart section of your sway config file may include:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gtk&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-wlr&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gnome&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is only needed if they are not started automatically via other means.&lt;br /&gt;
&lt;br /&gt;
== Firefox (Flatpak) and/or GTK apps ==&lt;br /&gt;
=== Disappearing cursor ===&lt;br /&gt;
You may need to get an icon pack and possibly a theme from [https://www.pling.com/browse?cat=107&amp;amp;ord=latest Pling store] and set &amp;lt;code&amp;gt;GTK_THEME&amp;lt;/code&amp;gt; environmental variable. Alternatively you can install a theme      for all users (search [https://pkgs.alpinelinux.org/ Alpine Linux Packages] for &#039;&#039;*-icon-theme&#039;&#039;) using &amp;lt;code&amp;gt;apk add&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Missing file picker/cannot download ===&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;about:config&#039;&#039; and set &amp;lt;code&amp;gt;widget.use-xdg-desktop-portal.file-picker&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
== Failing to start under certain graphics cards/multiple wlroots stacked windows spawning upon start ==&lt;br /&gt;
As of Dec 31 2022, [https://developer.nvidia.com/docs/drive/drive-os/latest/linux/sdk/common/topics/window_system_stub/Gnome-WaylandDesktopShellSupport136.html Nvidia still doesn&#039;t fully support Wayland]. Therefore, the possible solutions are as outlined in the link, or setting your WLR_BACKENDS environmental variables to &amp;lt;code&amp;gt;drm,libinput&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;x11&amp;lt;/code&amp;gt; (add libinput here as well if you cannot use your mouse and keyboard after starting Sway). The latter also works for AMD/ATI cards (&#039;&#039;&#039;make sure to install libinput first&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
== Sway socket not detected ==&lt;br /&gt;
&lt;br /&gt;
See [[Sway#Installation|Installation]] for instructions on how to set this environmental variable. This issue may occur with terminal multiplexers, such as [[tmux]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]]&lt;br /&gt;
[[Category:Window Managers]]&lt;br /&gt;
[[Category:Wayland]]&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sandbox:quq&amp;diff=26443</id>
		<title>Sandbox:quq</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sandbox:quq&amp;diff=26443"/>
		<updated>2024-02-19T23:54:55Z</updated>

		<summary type="html">&lt;p&gt;Quq: Quq moved page Sandbox:quq to Sway on Laptop&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Sway on Laptop]]&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26442</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26442"/>
		<updated>2024-02-19T23:54:55Z</updated>

		<summary type="html">&lt;p&gt;Quq: Quq moved page Sandbox:quq to Sway on Laptop&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Install and configure Sway&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM with swayidle:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to run sway with &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt;, this is needed for PipeWire and screensharing in Firefox and Chromium.&lt;br /&gt;
&lt;br /&gt;
== Install doas ==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &lt;br /&gt;
&lt;br /&gt;
 /bin/loginctl suspend&lt;br /&gt;
&lt;br /&gt;
(use full path to executable) and brightness can be adjusted by running&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/brightnessctl set 100&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install PipeWire, WirePlumber and XDG portals ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Later, we need to launch PipeWire with Sway and configure several environment variables.&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
== Launch PipeWire and enable screensharing ==&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native) for launching programs and selecting which screen to share in Firefox/Chromium:&lt;br /&gt;
&lt;br /&gt;
 set $menu dmenu_path | bemenu | xargs swaymsg exec --&lt;br /&gt;
&lt;br /&gt;
== Mouse cursor theme ==&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
== Screen lock and suspend-to-RAM ==&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w \&lt;br /&gt;
          timeout 300 &#039;swaylock --daemonize&#039; \&lt;br /&gt;
          timeout 330 &#039;doas /bin/loginctl suspend&#039; \&lt;br /&gt;
          before-sleep &#039;swaylock --daemonize&#039;&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;br /&gt;
&lt;br /&gt;
== Output scaling for high resolution displays ==&lt;br /&gt;
&lt;br /&gt;
Without further configuration, program interfaces might be too small to use on high resolution displays.&lt;br /&gt;
&lt;br /&gt;
Sway supports the per-display configuration of&lt;br /&gt;
&lt;br /&gt;
* fractional (e.g., 1.5x), and&lt;br /&gt;
* integer scaling (e.g., 2x) &lt;br /&gt;
&lt;br /&gt;
However, fractional scaling is discouraged due to both the performance impact and the blurry output it produces. In this case, where 1x scaling is too small and 2x scaling is too large, program-specific GTK/QT based scaling is recommended.  See below.&lt;br /&gt;
&lt;br /&gt;
To enable Sway scaling, the user can first preview different scaling factors with &amp;lt;code&amp;gt;wdisplays&amp;lt;/code&amp;gt; package.  Note the output name (eDP-1, LVDS-1) and try apply scaling factors such as 1 and 2.  To make changes permanent, add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
output &amp;lt;name&amp;gt; scale &amp;lt;factor&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to ~/.config/sway/config.&lt;br /&gt;
&lt;br /&gt;
To use toolkit scaling, use&lt;br /&gt;
{{Cmd|# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE{{=}}2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}&amp;quot;physical&amp;quot;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; or if still too small, use a custom DPI&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}192 # 2x scaling&lt;br /&gt;
export QT_QPA_PLATFORM{{=}}&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Make clipboard content persistent ==&lt;br /&gt;
By default the clipboard content does not persist after terminating the program: you copy some text from Firefox and then exit Firefox, the copied text is also lost.&lt;br /&gt;
&lt;br /&gt;
Install clipman from testing repo and add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec wl-paste --type text/plain --watch clipman store --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
bindsym $mod+h exec clipman pick --tool wofi --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox picture-in-picture mode/floating windows ==&lt;br /&gt;
Add this to your sway config file (modify the numeric values to suit your needs and your display):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for_window [app_id=&amp;quot;firefox&amp;quot; title=&amp;quot;^Picture-in-Picture$&amp;quot;] floating enable, move position 877 450, sticky enable, border none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
A simple tool that works well under Wayland is Grimshot. Example keybindings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bindsym Print exec grimshot copy area&lt;br /&gt;
bindsym Shift+Print exec grimshot copy screen&lt;br /&gt;
bindsym Control+Print exec grimshot save area ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
bindsym Control+Shift+Print exec grimshot save screen ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway the sway wiki&#039;s article] for a list of screenshot tools.&lt;br /&gt;
&lt;br /&gt;
== Start with NumLock enabled ==&lt;br /&gt;
Add this to your sway config file:&lt;br /&gt;
&amp;lt;code&amp;gt;input type:keyboard xkb_numlock enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change cursor theme and size ==&lt;br /&gt;
Add to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seat seat0 xcursor_theme my_cursor_theme my_cursor_size&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can inspect their values with &amp;lt;code&amp;gt;echo $XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;echo $XCURSOR_THEME&amp;lt;/code&amp;gt;. If reloading your config does not result in change, try logging out and in.&lt;br /&gt;
{{Note|Wayland uses client-side cursors. It is possible that applications do not evaluate the values of &amp;lt;code&amp;gt;$XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$XCURSOR_THEME&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Custom keyboard layout ==&lt;br /&gt;
&lt;br /&gt;
Since wayland does not support setxkbmap, you will also need to add similar content to your &#039;&#039;/usr/share/X11/xkb/rules/evdev.xml&#039;&#039;, after &amp;lt;code&amp;gt;&amp;lt;/modelList&amp;gt;&amp;lt;/code&amp;gt; and after &amp;lt;code&amp;gt;&amp;lt;layoutList&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;&lt;br /&gt;
      &amp;lt;configItem&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;[the name of your layout, same as the name of the file in /usr/share/X11/xkb/symbols]&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;shortDescription&amp;gt;[usually just two letters]&amp;lt;/shortDescription&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt;[description of your layout]&amp;lt;/description&amp;gt;&lt;br /&gt;
        &amp;lt;countryList&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;US&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;NO&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
        &amp;lt;/countryList&amp;gt;&lt;br /&gt;
        &amp;lt;languageList&amp;gt;&lt;br /&gt;
          &amp;lt;iso639Id&amp;gt;eng&amp;lt;/iso639Id&amp;gt;&lt;br /&gt;
        &amp;lt;/languageList&amp;gt;&lt;br /&gt;
      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;!--[other layouts]--&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, to enable for all keyboards, navigate to the input section of &#039;&#039;~/.config/sway/config&#039;&#039; and modify it to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input * {&lt;br /&gt;
  xkb_layout &amp;quot;my_layout&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have enabled &amp;lt;code&amp;gt;xkb_numlock&amp;lt;/code&amp;gt;, include this setting inside those braces as well.&lt;br /&gt;
&lt;br /&gt;
== Default font ==&lt;br /&gt;
&lt;br /&gt;
This is not related to Sway, but still nice to have: change system wide default font selection.  In &amp;lt;code&amp;gt;/etc/fonts/conf.d/52-my-default-fonts.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&#039;1.0&#039;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE fontconfig SYSTEM &#039;urn:fontconfig:fonts.dtd&#039;&amp;gt;&lt;br /&gt;
&amp;lt;fontconfig&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Default fonts --&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;sans-serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;monospace&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans Mono&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
&amp;lt;/fontconfig&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can obtain a list of installed fonts with &amp;lt;code&amp;gt;fc-list&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If you encounter any issues, try running &amp;lt;code&amp;gt;sway -Vc /etc/sway/config&amp;lt;/code&amp;gt;. It will run sway with the default config file and set the output to be more verbose. It is generally a good idea to track your config files with git (when and if at all you use a remote repository for them, keep it private for security reasons). &lt;br /&gt;
&lt;br /&gt;
== Flatpaks ==&lt;br /&gt;
&lt;br /&gt;
Due to their sandboxing, flatpaks require the use of a portal frontend (xdg-desktop-portal) and backends (such as xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, xdg-desktop-portal-gnome) that implement the methods. When in doubt, install multiple backends. For more information on backends, see [https://github.com/flatpak/xdg-desktop-portal/#using-portals flatpak&#039;s page on the subject]. In addition to the steps under the &amp;quot;Firefox Screensharing&amp;quot; section, it may also be necessary to launch additional backends in your Sway config file. Otherwise, you may run into GDBus errors as your flatpak fails to interface with the portal. This can cause issues such as with opening your file directories from a flatpak application.&lt;br /&gt;
&lt;br /&gt;
After installing different backends, you might need to add the relevant backends to your sway config file similarly to in the &amp;quot;Firefox Screensharing&amp;quot; section above. For example, an autostart section of your sway config file may include:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gtk&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-wlr&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gnome&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is only needed if they are not started automatically via other means.&lt;br /&gt;
&lt;br /&gt;
== Firefox (Flatpak) and/or GTK apps ==&lt;br /&gt;
=== Disappearing cursor ===&lt;br /&gt;
You may need to get an icon pack and possibly a theme from [https://www.pling.com/browse?cat=107&amp;amp;ord=latest Pling store] and set &amp;lt;code&amp;gt;GTK_THEME&amp;lt;/code&amp;gt; environmental variable. Alternatively you can install a theme      for all users (search [https://pkgs.alpinelinux.org/ Alpine Linux Packages] for &#039;&#039;*-icon-theme&#039;&#039;) using &amp;lt;code&amp;gt;apk add&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Missing file picker/cannot download ===&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;about:config&#039;&#039; and set &amp;lt;code&amp;gt;widget.use-xdg-desktop-portal.file-picker&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
== Failing to start under certain graphics cards/multiple wlroots stacked windows spawning upon start ==&lt;br /&gt;
As of Dec 31 2022, [https://developer.nvidia.com/docs/drive/drive-os/latest/linux/sdk/common/topics/window_system_stub/Gnome-WaylandDesktopShellSupport136.html Nvidia still doesn&#039;t fully support Wayland]. Therefore, the possible solutions are as outlined in the link, or setting your WLR_BACKENDS environmental variables to &amp;lt;code&amp;gt;drm,libinput&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;x11&amp;lt;/code&amp;gt; (add libinput here as well if you cannot use your mouse and keyboard after starting Sway). The latter also works for AMD/ATI cards (&#039;&#039;&#039;make sure to install libinput first&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
== Sway socket not detected ==&lt;br /&gt;
&lt;br /&gt;
See [[Sway#Installation|Installation]] for instructions on how to set this environmental variable. This issue may occur with terminal multiplexers, such as [[tmux]]&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26441</id>
		<title>Sway</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26441"/>
		<updated>2024-02-19T23:53:09Z</updated>

		<summary type="html">&lt;p&gt;Quq: update seatd&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Install and configure Sway&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 rc-update add seatd&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
== Launch PipeWire and enable screensharing ==&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native) for launching programs and selecting which screen to share in Firefox/Chromium:&lt;br /&gt;
&lt;br /&gt;
 set $menu dmenu_path | bemenu | xargs swaymsg exec --&lt;br /&gt;
&lt;br /&gt;
== Mouse cursor theme ==&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
== Screen lock and suspend-to-RAM ==&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w \&lt;br /&gt;
          timeout 300 &#039;swaylock --daemonize&#039; \&lt;br /&gt;
          timeout 330 &#039;doas /bin/loginctl suspend&#039; \&lt;br /&gt;
          before-sleep &#039;swaylock --daemonize&#039;&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;br /&gt;
&lt;br /&gt;
== Output scaling for high resolution displays ==&lt;br /&gt;
&lt;br /&gt;
Without further configuration, program interfaces might be too small to use on high resolution displays.&lt;br /&gt;
&lt;br /&gt;
Sway supports the per-display configuration of&lt;br /&gt;
&lt;br /&gt;
* fractional (e.g., 1.5x), and&lt;br /&gt;
* integer scaling (e.g., 2x) &lt;br /&gt;
&lt;br /&gt;
However, fractional scaling is discouraged due to both the performance impact and the blurry output it produces. In this case, where 1x scaling is too small and 2x scaling is too large, program-specific GTK/QT based scaling is recommended.  See below.&lt;br /&gt;
&lt;br /&gt;
To enable Sway scaling, the user can first preview different scaling factors with &amp;lt;code&amp;gt;wdisplays&amp;lt;/code&amp;gt; package.  Note the output name (eDP-1, LVDS-1) and try apply scaling factors such as 1 and 2.  To make changes permanent, add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
output &amp;lt;name&amp;gt; scale &amp;lt;factor&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to ~/.config/sway/config.&lt;br /&gt;
&lt;br /&gt;
To use toolkit scaling, use&lt;br /&gt;
{{Cmd|# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE{{=}}2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}&amp;quot;physical&amp;quot;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; or if still too small, use a custom DPI&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}192 # 2x scaling&lt;br /&gt;
export QT_QPA_PLATFORM{{=}}&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Make clipboard content persistent ==&lt;br /&gt;
By default the clipboard content does not persist after terminating the program: you copy some text from Firefox and then exit Firefox, the copied text is also lost.&lt;br /&gt;
&lt;br /&gt;
Install clipman from testing repo and add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec wl-paste --type text/plain --watch clipman store --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
bindsym $mod+h exec clipman pick --tool wofi --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox picture-in-picture mode/floating windows ==&lt;br /&gt;
Add this to your sway config file (modify the numeric values to suit your needs and your display):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for_window [app_id=&amp;quot;firefox&amp;quot; title=&amp;quot;^Picture-in-Picture$&amp;quot;] floating enable, move position 877 450, sticky enable, border none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
A simple tool that works well under Wayland is Grimshot. Example keybindings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bindsym Print exec grimshot copy area&lt;br /&gt;
bindsym Shift+Print exec grimshot copy screen&lt;br /&gt;
bindsym Control+Print exec grimshot save area ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
bindsym Control+Shift+Print exec grimshot save screen ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway the sway wiki&#039;s article] for a list of screenshot tools.&lt;br /&gt;
&lt;br /&gt;
== Start with NumLock enabled ==&lt;br /&gt;
Add this to your sway config file:&lt;br /&gt;
&amp;lt;code&amp;gt;input type:keyboard xkb_numlock enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change cursor theme and size ==&lt;br /&gt;
Add to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seat seat0 xcursor_theme my_cursor_theme my_cursor_size&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can inspect their values with &amp;lt;code&amp;gt;echo $XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;echo $XCURSOR_THEME&amp;lt;/code&amp;gt;. If reloading your config does not result in change, try logging out and in.&lt;br /&gt;
{{Note|Wayland uses client-side cursors. It is possible that applications do not evaluate the values of &amp;lt;code&amp;gt;$XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$XCURSOR_THEME&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Custom keyboard layout ==&lt;br /&gt;
&lt;br /&gt;
Since wayland does not support setxkbmap, you will also need to add similar content to your &#039;&#039;/usr/share/X11/xkb/rules/evdev.xml&#039;&#039;, after &amp;lt;code&amp;gt;&amp;lt;/modelList&amp;gt;&amp;lt;/code&amp;gt; and after &amp;lt;code&amp;gt;&amp;lt;layoutList&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;&lt;br /&gt;
      &amp;lt;configItem&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;[the name of your layout, same as the name of the file in /usr/share/X11/xkb/symbols]&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;shortDescription&amp;gt;[usually just two letters]&amp;lt;/shortDescription&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt;[description of your layout]&amp;lt;/description&amp;gt;&lt;br /&gt;
        &amp;lt;countryList&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;US&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;NO&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
        &amp;lt;/countryList&amp;gt;&lt;br /&gt;
        &amp;lt;languageList&amp;gt;&lt;br /&gt;
          &amp;lt;iso639Id&amp;gt;eng&amp;lt;/iso639Id&amp;gt;&lt;br /&gt;
        &amp;lt;/languageList&amp;gt;&lt;br /&gt;
      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;!--[other layouts]--&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, to enable for all keyboards, navigate to the input section of &#039;&#039;~/.config/sway/config&#039;&#039; and modify it to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input type:keyboard {&lt;br /&gt;
  xkb_layout &amp;quot;my_layout&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have enabled &amp;lt;code&amp;gt;xkb_numlock&amp;lt;/code&amp;gt;, include this setting inside those braces as well.&lt;br /&gt;
&lt;br /&gt;
== Default font ==&lt;br /&gt;
&lt;br /&gt;
This is not related to Sway, but still nice to have: change system wide default font selection.  In &amp;lt;code&amp;gt;/etc/fonts/conf.d/52-my-default-fonts.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&#039;1.0&#039;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE fontconfig SYSTEM &#039;urn:fontconfig:fonts.dtd&#039;&amp;gt;&lt;br /&gt;
&amp;lt;fontconfig&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Default fonts --&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;sans-serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;monospace&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans Mono&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
&amp;lt;/fontconfig&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can obtain a list of installed fonts with &amp;lt;code&amp;gt;fc-list&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If you encounter any issues, try running &amp;lt;code&amp;gt;sway -Vc /etc/sway/config&amp;lt;/code&amp;gt;. It will run sway with the default config file and set the output to be more verbose. It is generally a good idea to track your config files with git (when and if at all you use a remote repository for them, keep it private for security reasons). &lt;br /&gt;
&lt;br /&gt;
== Flatpaks ==&lt;br /&gt;
&lt;br /&gt;
Due to their sandboxing, flatpaks require the use of a portal frontend (xdg-desktop-portal) and backends (such as xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, xdg-desktop-portal-gnome) that implement the methods. When in doubt, install multiple backends. For more information on backends, see [https://github.com/flatpak/xdg-desktop-portal/#using-portals flatpak&#039;s page on the subject]. In addition to the steps under the &amp;quot;Firefox Screensharing&amp;quot; section, it may also be necessary to launch additional backends in your Sway config file. Otherwise, you may run into GDBus errors as your flatpak fails to interface with the portal. This can cause issues such as with opening your file directories from a flatpak application.&lt;br /&gt;
&lt;br /&gt;
After installing different backends, you might need to add the relevant backends to your sway config file similarly to in the &amp;quot;Firefox Screensharing&amp;quot; section above. For example, an autostart section of your sway config file may include:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gtk&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-wlr&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gnome&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is only needed if they are not started automatically via other means.&lt;br /&gt;
&lt;br /&gt;
== Firefox (Flatpak) and/or GTK apps ==&lt;br /&gt;
=== Disappearing cursor ===&lt;br /&gt;
You may need to get an icon pack and possibly a theme from [https://www.pling.com/browse?cat=107&amp;amp;ord=latest Pling store] and set &amp;lt;code&amp;gt;GTK_THEME&amp;lt;/code&amp;gt; environmental variable. Alternatively you can install a theme      for all users (search [https://pkgs.alpinelinux.org/ Alpine Linux Packages] for &#039;&#039;*-icon-theme&#039;&#039;) using &amp;lt;code&amp;gt;apk add&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Missing file picker/cannot download ===&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;about:config&#039;&#039; and set &amp;lt;code&amp;gt;widget.use-xdg-desktop-portal.file-picker&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
== Failing to start under certain graphics cards/multiple wlroots stacked windows spawning upon start ==&lt;br /&gt;
As of Dec 31 2022, [https://developer.nvidia.com/docs/drive/drive-os/latest/linux/sdk/common/topics/window_system_stub/Gnome-WaylandDesktopShellSupport136.html Nvidia still doesn&#039;t fully support Wayland]. Therefore, the possible solutions are as outlined in the link, or setting your WLR_BACKENDS environmental variables to &amp;lt;code&amp;gt;drm,libinput&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;x11&amp;lt;/code&amp;gt; (add libinput here as well if you cannot use your mouse and keyboard after starting Sway). The latter also works for AMD/ATI cards (&#039;&#039;&#039;make sure to install libinput first&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
== Sway socket not detected ==&lt;br /&gt;
&lt;br /&gt;
See [[Sway#Installation|Installation]] for instructions on how to set this environmental variable. This issue may occur with terminal multiplexers, such as [[tmux]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [https://wiki.archlinux.org/title/Sway Archwiki]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Sway Gentoo Wiki]&lt;br /&gt;
* [https://wiki.postmarketos.org/wiki/Sway PostmarketOS Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]]&lt;br /&gt;
[[Category:Window Managers]]&lt;br /&gt;
[[Category:Wayland]]&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26440</id>
		<title>Sway</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26440"/>
		<updated>2024-02-19T23:50:11Z</updated>

		<summary type="html">&lt;p&gt;Quq: categories&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Install and configure Sway&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
== Launch PipeWire and enable screensharing ==&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native) for launching programs and selecting which screen to share in Firefox/Chromium:&lt;br /&gt;
&lt;br /&gt;
 set $menu dmenu_path | bemenu | xargs swaymsg exec --&lt;br /&gt;
&lt;br /&gt;
== Mouse cursor theme ==&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
== Screen lock and suspend-to-RAM ==&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w \&lt;br /&gt;
          timeout 300 &#039;swaylock --daemonize&#039; \&lt;br /&gt;
          timeout 330 &#039;doas /bin/loginctl suspend&#039; \&lt;br /&gt;
          before-sleep &#039;swaylock --daemonize&#039;&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;br /&gt;
&lt;br /&gt;
== Output scaling for high resolution displays ==&lt;br /&gt;
&lt;br /&gt;
Without further configuration, program interfaces might be too small to use on high resolution displays.&lt;br /&gt;
&lt;br /&gt;
Sway supports the per-display configuration of&lt;br /&gt;
&lt;br /&gt;
* fractional (e.g., 1.5x), and&lt;br /&gt;
* integer scaling (e.g., 2x) &lt;br /&gt;
&lt;br /&gt;
However, fractional scaling is discouraged due to both the performance impact and the blurry output it produces. In this case, where 1x scaling is too small and 2x scaling is too large, program-specific GTK/QT based scaling is recommended.  See below.&lt;br /&gt;
&lt;br /&gt;
To enable Sway scaling, the user can first preview different scaling factors with &amp;lt;code&amp;gt;wdisplays&amp;lt;/code&amp;gt; package.  Note the output name (eDP-1, LVDS-1) and try apply scaling factors such as 1 and 2.  To make changes permanent, add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
output &amp;lt;name&amp;gt; scale &amp;lt;factor&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to ~/.config/sway/config.&lt;br /&gt;
&lt;br /&gt;
To use toolkit scaling, use&lt;br /&gt;
{{Cmd|# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE{{=}}2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}&amp;quot;physical&amp;quot;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; or if still too small, use a custom DPI&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}192 # 2x scaling&lt;br /&gt;
export QT_QPA_PLATFORM{{=}}&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Make clipboard content persistent ==&lt;br /&gt;
By default the clipboard content does not persist after terminating the program: you copy some text from Firefox and then exit Firefox, the copied text is also lost.&lt;br /&gt;
&lt;br /&gt;
Install clipman from testing repo and add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec wl-paste --type text/plain --watch clipman store --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
bindsym $mod+h exec clipman pick --tool wofi --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox picture-in-picture mode/floating windows ==&lt;br /&gt;
Add this to your sway config file (modify the numeric values to suit your needs and your display):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for_window [app_id=&amp;quot;firefox&amp;quot; title=&amp;quot;^Picture-in-Picture$&amp;quot;] floating enable, move position 877 450, sticky enable, border none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
A simple tool that works well under Wayland is Grimshot. Example keybindings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bindsym Print exec grimshot copy area&lt;br /&gt;
bindsym Shift+Print exec grimshot copy screen&lt;br /&gt;
bindsym Control+Print exec grimshot save area ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
bindsym Control+Shift+Print exec grimshot save screen ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway the sway wiki&#039;s article] for a list of screenshot tools.&lt;br /&gt;
&lt;br /&gt;
== Start with NumLock enabled ==&lt;br /&gt;
Add this to your sway config file:&lt;br /&gt;
&amp;lt;code&amp;gt;input type:keyboard xkb_numlock enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change cursor theme and size ==&lt;br /&gt;
Add to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seat seat0 xcursor_theme my_cursor_theme my_cursor_size&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can inspect their values with &amp;lt;code&amp;gt;echo $XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;echo $XCURSOR_THEME&amp;lt;/code&amp;gt;. If reloading your config does not result in change, try logging out and in.&lt;br /&gt;
{{Note|Wayland uses client-side cursors. It is possible that applications do not evaluate the values of &amp;lt;code&amp;gt;$XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$XCURSOR_THEME&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Custom keyboard layout ==&lt;br /&gt;
&lt;br /&gt;
Since wayland does not support setxkbmap, you will also need to add similar content to your &#039;&#039;/usr/share/X11/xkb/rules/evdev.xml&#039;&#039;, after &amp;lt;code&amp;gt;&amp;lt;/modelList&amp;gt;&amp;lt;/code&amp;gt; and after &amp;lt;code&amp;gt;&amp;lt;layoutList&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;&lt;br /&gt;
      &amp;lt;configItem&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;[the name of your layout, same as the name of the file in /usr/share/X11/xkb/symbols]&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;shortDescription&amp;gt;[usually just two letters]&amp;lt;/shortDescription&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt;[description of your layout]&amp;lt;/description&amp;gt;&lt;br /&gt;
        &amp;lt;countryList&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;US&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;NO&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
        &amp;lt;/countryList&amp;gt;&lt;br /&gt;
        &amp;lt;languageList&amp;gt;&lt;br /&gt;
          &amp;lt;iso639Id&amp;gt;eng&amp;lt;/iso639Id&amp;gt;&lt;br /&gt;
        &amp;lt;/languageList&amp;gt;&lt;br /&gt;
      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;!--[other layouts]--&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, to enable for all keyboards, navigate to the input section of &#039;&#039;~/.config/sway/config&#039;&#039; and modify it to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input type:keyboard {&lt;br /&gt;
  xkb_layout &amp;quot;my_layout&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have enabled &amp;lt;code&amp;gt;xkb_numlock&amp;lt;/code&amp;gt;, include this setting inside those braces as well.&lt;br /&gt;
&lt;br /&gt;
== Default font ==&lt;br /&gt;
&lt;br /&gt;
This is not related to Sway, but still nice to have: change system wide default font selection.  In &amp;lt;code&amp;gt;/etc/fonts/conf.d/52-my-default-fonts.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&#039;1.0&#039;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE fontconfig SYSTEM &#039;urn:fontconfig:fonts.dtd&#039;&amp;gt;&lt;br /&gt;
&amp;lt;fontconfig&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Default fonts --&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;sans-serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;monospace&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans Mono&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
&amp;lt;/fontconfig&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can obtain a list of installed fonts with &amp;lt;code&amp;gt;fc-list&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If you encounter any issues, try running &amp;lt;code&amp;gt;sway -Vc /etc/sway/config&amp;lt;/code&amp;gt;. It will run sway with the default config file and set the output to be more verbose. It is generally a good idea to track your config files with git (when and if at all you use a remote repository for them, keep it private for security reasons). &lt;br /&gt;
&lt;br /&gt;
== Flatpaks ==&lt;br /&gt;
&lt;br /&gt;
Due to their sandboxing, flatpaks require the use of a portal frontend (xdg-desktop-portal) and backends (such as xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, xdg-desktop-portal-gnome) that implement the methods. When in doubt, install multiple backends. For more information on backends, see [https://github.com/flatpak/xdg-desktop-portal/#using-portals flatpak&#039;s page on the subject]. In addition to the steps under the &amp;quot;Firefox Screensharing&amp;quot; section, it may also be necessary to launch additional backends in your Sway config file. Otherwise, you may run into GDBus errors as your flatpak fails to interface with the portal. This can cause issues such as with opening your file directories from a flatpak application.&lt;br /&gt;
&lt;br /&gt;
After installing different backends, you might need to add the relevant backends to your sway config file similarly to in the &amp;quot;Firefox Screensharing&amp;quot; section above. For example, an autostart section of your sway config file may include:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gtk&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-wlr&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gnome&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is only needed if they are not started automatically via other means.&lt;br /&gt;
&lt;br /&gt;
== Firefox (Flatpak) and/or GTK apps ==&lt;br /&gt;
=== Disappearing cursor ===&lt;br /&gt;
You may need to get an icon pack and possibly a theme from [https://www.pling.com/browse?cat=107&amp;amp;ord=latest Pling store] and set &amp;lt;code&amp;gt;GTK_THEME&amp;lt;/code&amp;gt; environmental variable. Alternatively you can install a theme      for all users (search [https://pkgs.alpinelinux.org/ Alpine Linux Packages] for &#039;&#039;*-icon-theme&#039;&#039;) using &amp;lt;code&amp;gt;apk add&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Missing file picker/cannot download ===&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;about:config&#039;&#039; and set &amp;lt;code&amp;gt;widget.use-xdg-desktop-portal.file-picker&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
== Failing to start under certain graphics cards/multiple wlroots stacked windows spawning upon start ==&lt;br /&gt;
As of Dec 31 2022, [https://developer.nvidia.com/docs/drive/drive-os/latest/linux/sdk/common/topics/window_system_stub/Gnome-WaylandDesktopShellSupport136.html Nvidia still doesn&#039;t fully support Wayland]. Therefore, the possible solutions are as outlined in the link, or setting your WLR_BACKENDS environmental variables to &amp;lt;code&amp;gt;drm,libinput&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;x11&amp;lt;/code&amp;gt; (add libinput here as well if you cannot use your mouse and keyboard after starting Sway). The latter also works for AMD/ATI cards (&#039;&#039;&#039;make sure to install libinput first&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
== Sway socket not detected ==&lt;br /&gt;
&lt;br /&gt;
See [[Sway#Installation|Installation]] for instructions on how to set this environmental variable. This issue may occur with terminal multiplexers, such as [[tmux]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [https://wiki.archlinux.org/title/Sway Archwiki]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Sway Gentoo Wiki]&lt;br /&gt;
* [https://wiki.postmarketos.org/wiki/Sway PostmarketOS Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]]&lt;br /&gt;
[[Category:Window Managers]]&lt;br /&gt;
[[Category:Wayland]]&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26439</id>
		<title>Sway</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26439"/>
		<updated>2024-02-19T23:48:45Z</updated>

		<summary type="html">&lt;p&gt;Quq: dedup&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Install and configure Sway&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
== Launch PipeWire and enable screensharing ==&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native) for launching programs and selecting which screen to share in Firefox/Chromium:&lt;br /&gt;
&lt;br /&gt;
 set $menu dmenu_path | bemenu | xargs swaymsg exec --&lt;br /&gt;
&lt;br /&gt;
== Mouse cursor theme ==&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
== Screen lock and suspend-to-RAM ==&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w \&lt;br /&gt;
          timeout 300 &#039;swaylock --daemonize&#039; \&lt;br /&gt;
          timeout 330 &#039;doas /bin/loginctl suspend&#039; \&lt;br /&gt;
          before-sleep &#039;swaylock --daemonize&#039;&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;br /&gt;
&lt;br /&gt;
== Output scaling for high resolution displays ==&lt;br /&gt;
&lt;br /&gt;
Without further configuration, program interfaces might be too small to use on high resolution displays.&lt;br /&gt;
&lt;br /&gt;
Sway supports the per-display configuration of&lt;br /&gt;
&lt;br /&gt;
* fractional (e.g., 1.5x), and&lt;br /&gt;
* integer scaling (e.g., 2x) &lt;br /&gt;
&lt;br /&gt;
However, fractional scaling is discouraged due to both the performance impact and the blurry output it produces. In this case, where 1x scaling is too small and 2x scaling is too large, program-specific GTK/QT based scaling is recommended.  See below.&lt;br /&gt;
&lt;br /&gt;
To enable Sway scaling, the user can first preview different scaling factors with &amp;lt;code&amp;gt;wdisplays&amp;lt;/code&amp;gt; package.  Note the output name (eDP-1, LVDS-1) and try apply scaling factors such as 1 and 2.  To make changes permanent, add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
output &amp;lt;name&amp;gt; scale &amp;lt;factor&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to ~/.config/sway/config.&lt;br /&gt;
&lt;br /&gt;
To use toolkit scaling, use&lt;br /&gt;
{{Cmd|# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE{{=}}2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}&amp;quot;physical&amp;quot;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; or if still too small, use a custom DPI&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}192 # 2x scaling&lt;br /&gt;
export QT_QPA_PLATFORM{{=}}&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Make clipboard content persistent ==&lt;br /&gt;
By default the clipboard content does not persist after terminating the program: you copy some text from Firefox and then exit Firefox, the copied text is also lost.&lt;br /&gt;
&lt;br /&gt;
Install clipman from testing repo and add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec wl-paste --type text/plain --watch clipman store --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
bindsym $mod+h exec clipman pick --tool wofi --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox picture-in-picture mode/floating windows ==&lt;br /&gt;
Add this to your sway config file (modify the numeric values to suit your needs and your display):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for_window [app_id=&amp;quot;firefox&amp;quot; title=&amp;quot;^Picture-in-Picture$&amp;quot;] floating enable, move position 877 450, sticky enable, border none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
A simple tool that works well under Wayland is Grimshot. Example keybindings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bindsym Print exec grimshot copy area&lt;br /&gt;
bindsym Shift+Print exec grimshot copy screen&lt;br /&gt;
bindsym Control+Print exec grimshot save area ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
bindsym Control+Shift+Print exec grimshot save screen ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway the sway wiki&#039;s article] for a list of screenshot tools.&lt;br /&gt;
&lt;br /&gt;
== Start with NumLock enabled ==&lt;br /&gt;
Add this to your sway config file:&lt;br /&gt;
&amp;lt;code&amp;gt;input type:keyboard xkb_numlock enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change cursor theme and size ==&lt;br /&gt;
Add to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seat seat0 xcursor_theme my_cursor_theme my_cursor_size&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can inspect their values with &amp;lt;code&amp;gt;echo $XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;echo $XCURSOR_THEME&amp;lt;/code&amp;gt;. If reloading your config does not result in change, try logging out and in.&lt;br /&gt;
{{Note|Wayland uses client-side cursors. It is possible that applications do not evaluate the values of &amp;lt;code&amp;gt;$XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$XCURSOR_THEME&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Custom keyboard layout ==&lt;br /&gt;
&lt;br /&gt;
Since wayland does not support setxkbmap, you will also need to add similar content to your &#039;&#039;/usr/share/X11/xkb/rules/evdev.xml&#039;&#039;, after &amp;lt;code&amp;gt;&amp;lt;/modelList&amp;gt;&amp;lt;/code&amp;gt; and after &amp;lt;code&amp;gt;&amp;lt;layoutList&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;&lt;br /&gt;
      &amp;lt;configItem&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;[the name of your layout, same as the name of the file in /usr/share/X11/xkb/symbols]&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;shortDescription&amp;gt;[usually just two letters]&amp;lt;/shortDescription&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt;[description of your layout]&amp;lt;/description&amp;gt;&lt;br /&gt;
        &amp;lt;countryList&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;US&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;NO&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
        &amp;lt;/countryList&amp;gt;&lt;br /&gt;
        &amp;lt;languageList&amp;gt;&lt;br /&gt;
          &amp;lt;iso639Id&amp;gt;eng&amp;lt;/iso639Id&amp;gt;&lt;br /&gt;
        &amp;lt;/languageList&amp;gt;&lt;br /&gt;
      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;!--[other layouts]--&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, to enable for all keyboards, navigate to the input section of &#039;&#039;~/.config/sway/config&#039;&#039; and modify it to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input type:keyboard {&lt;br /&gt;
  xkb_layout &amp;quot;my_layout&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have enabled &amp;lt;code&amp;gt;xkb_numlock&amp;lt;/code&amp;gt;, include this setting inside those braces as well.&lt;br /&gt;
&lt;br /&gt;
== Default font ==&lt;br /&gt;
&lt;br /&gt;
This is not related to Sway, but still nice to have: change system wide default font selection.  In &amp;lt;code&amp;gt;/etc/fonts/conf.d/52-my-default-fonts.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&#039;1.0&#039;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE fontconfig SYSTEM &#039;urn:fontconfig:fonts.dtd&#039;&amp;gt;&lt;br /&gt;
&amp;lt;fontconfig&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Default fonts --&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;sans-serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;monospace&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans Mono&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
&amp;lt;/fontconfig&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can obtain a list of installed fonts with &amp;lt;code&amp;gt;fc-list&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If you encounter any issues, try running &amp;lt;code&amp;gt;sway -Vc /etc/sway/config&amp;lt;/code&amp;gt;. It will run sway with the default config file and set the output to be more verbose. It is generally a good idea to track your config files with git (when and if at all you use a remote repository for them, keep it private for security reasons). &lt;br /&gt;
&lt;br /&gt;
== Flatpaks ==&lt;br /&gt;
&lt;br /&gt;
Due to their sandboxing, flatpaks require the use of a portal frontend (xdg-desktop-portal) and backends (such as xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, xdg-desktop-portal-gnome) that implement the methods. When in doubt, install multiple backends. For more information on backends, see [https://github.com/flatpak/xdg-desktop-portal/#using-portals flatpak&#039;s page on the subject]. In addition to the steps under the &amp;quot;Firefox Screensharing&amp;quot; section, it may also be necessary to launch additional backends in your Sway config file. Otherwise, you may run into GDBus errors as your flatpak fails to interface with the portal. This can cause issues such as with opening your file directories from a flatpak application.&lt;br /&gt;
&lt;br /&gt;
After installing different backends, you might need to add the relevant backends to your sway config file similarly to in the &amp;quot;Firefox Screensharing&amp;quot; section above. For example, an autostart section of your sway config file may include:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gtk&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-wlr&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gnome&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is only needed if they are not started automatically via other means.&lt;br /&gt;
&lt;br /&gt;
== Firefox (Flatpak) and/or GTK apps ==&lt;br /&gt;
=== Disappearing cursor ===&lt;br /&gt;
You may need to get an icon pack and possibly a theme from [https://www.pling.com/browse?cat=107&amp;amp;ord=latest Pling store] and set &amp;lt;code&amp;gt;GTK_THEME&amp;lt;/code&amp;gt; environmental variable. Alternatively you can install a theme      for all users (search [https://pkgs.alpinelinux.org/ Alpine Linux Packages] for &#039;&#039;*-icon-theme&#039;&#039;) using &amp;lt;code&amp;gt;apk add&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Missing file picker/cannot download ===&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;about:config&#039;&#039; and set &amp;lt;code&amp;gt;widget.use-xdg-desktop-portal.file-picker&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
== Failing to start under certain graphics cards/multiple wlroots stacked windows spawning upon start ==&lt;br /&gt;
As of Dec 31 2022, [https://developer.nvidia.com/docs/drive/drive-os/latest/linux/sdk/common/topics/window_system_stub/Gnome-WaylandDesktopShellSupport136.html Nvidia still doesn&#039;t fully support Wayland]. Therefore, the possible solutions are as outlined in the link, or setting your WLR_BACKENDS environmental variables to &amp;lt;code&amp;gt;drm,libinput&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;x11&amp;lt;/code&amp;gt; (add libinput here as well if you cannot use your mouse and keyboard after starting Sway). The latter also works for AMD/ATI cards (&#039;&#039;&#039;make sure to install libinput first&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
== Sway socket not detected ==&lt;br /&gt;
&lt;br /&gt;
See [[Sway#Installation|Installation]] for instructions on how to set this environmental variable. This issue may occur with terminal multiplexers, such as [[tmux]]&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Suspend_on_LID_close&amp;diff=26438</id>
		<title>Suspend on LID close</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Suspend_on_LID_close&amp;diff=26438"/>
		<updated>2024-02-19T23:27:18Z</updated>

		<summary type="html">&lt;p&gt;Quq: elogind&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to make your laptop go to Suspend when closing the LID.&lt;br /&gt;
&lt;br /&gt;
== acpid2 ==&lt;br /&gt;
&lt;br /&gt;
[https://sourceforge.net/projects/acpid2/ acpid2] (provided by package {{pkg|acpid}}) is a flexible and extensible daemon with Netlink support for delivering ACPI events.&lt;br /&gt;
The [https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/acpid/handler.sh default handler script] ({{path|/etc/acpi/handler.sh}}) installed with the package provides support for suspend on LID close out of the box.&lt;br /&gt;
We recommend installing {{pkg|zzz}} along with {{pkg|acpid}} to get support for pre/post suspend hooks etc.&lt;br /&gt;
&lt;br /&gt;
# Install {{pkg|acpid}} and {{pkg|zzz}}: {{cmd|# apk add acpid zzz}}&lt;br /&gt;
# Enable and start the acpid daemon: {{cmd|# rc-update add acpid &amp;amp;&amp;amp; rc-service acpid start}}&lt;br /&gt;
&lt;br /&gt;
== Busybox acpid ==&lt;br /&gt;
&lt;br /&gt;
This can be done via [[Busybox acpid]] with a hook in {{path|/etc/acpi/LID/00000080}}:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;with zzz:&#039;&#039;&#039;{{cmd|# apk add zzz}} {{cat|/etc/acpi/LID/00000080|#!/bin/sh&lt;br /&gt;
exec zzz&lt;br /&gt;
}}&lt;br /&gt;
# &#039;&#039;&#039;or with pm-utils:&#039;&#039;&#039; {{cmd|# apk add pm-utils}} {{cat|/etc/acpi/LID/00000080|#!/bin/sh&lt;br /&gt;
exec pm-suspend&lt;br /&gt;
}}&lt;br /&gt;
# &#039;&#039;&#039;or with raw variant&#039;&#039;&#039;: {{cat|/etc/acpi/LID/00000080|#!/bin/sh&lt;br /&gt;
echo mem &amp;gt; /sys/power/state&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Make the hook executable:&lt;br /&gt;
{{cmd|# chmod +x /etc/acpi/LID/00000080}}&lt;br /&gt;
&lt;br /&gt;
That should be it. To make sure that the acpid daemon is running, execute:&lt;br /&gt;
{{cmd|# rc-service acoud start}}&lt;br /&gt;
&lt;br /&gt;
== elogind ==&lt;br /&gt;
&lt;br /&gt;
Use elogind to trigger suspend and use doas to grant normal user such permissions.&lt;br /&gt;
&lt;br /&gt;
Install elogind:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
Now suspend on lid close should be working as expected.&lt;br /&gt;
&lt;br /&gt;
For normal user to trigger suspend, install doas:&lt;br /&gt;
&lt;br /&gt;
 apk add doas&lt;br /&gt;
&lt;br /&gt;
Configure doas in &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
&lt;br /&gt;
You should now be able to suspend the computer as a normal user, using the full path to executable.&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
* [https://github.com/jirutka/zzz zzz]&lt;br /&gt;
* [https://unix.stackexchange.com/questions/484550/pm-suspend-vs-systemctl-suspend pm-suspend vs systemd...]&lt;br /&gt;
* [https://wiki.archlinux.org/index.php?title=Pm-utils&amp;amp;oldid=498864 Archwiki pm-utils (archived page)]&lt;br /&gt;
&lt;br /&gt;
[[Category:Power Management]]&lt;br /&gt;
[[category: Desktop]]&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26437</id>
		<title>Sway</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26437"/>
		<updated>2024-02-19T23:23:19Z</updated>

		<summary type="html">&lt;p&gt;Quq: /* Custom keyboard layout */ use type:keyboard&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Install and configure Sway&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM with swayidle:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to run sway with &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt;, this is needed for PipeWire and screensharing in Firefox and Chromium.&lt;br /&gt;
&lt;br /&gt;
== Install doas ==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &lt;br /&gt;
&lt;br /&gt;
 /bin/loginctl suspend&lt;br /&gt;
&lt;br /&gt;
(use full path to executable) and brightness can be adjusted by running&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/brightnessctl set 100&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install PipeWire, WirePlumber and XDG portals ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Later, we need to launch PipeWire with Sway and configure several environment variables.&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
== Launch PipeWire and enable screensharing ==&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native) for launching programs and selecting which screen to share in Firefox/Chromium:&lt;br /&gt;
&lt;br /&gt;
 set $menu dmenu_path | bemenu | xargs swaymsg exec --&lt;br /&gt;
&lt;br /&gt;
== Mouse cursor theme ==&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
== Screen lock and suspend-to-RAM ==&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w \&lt;br /&gt;
          timeout 300 &#039;swaylock --daemonize&#039; \&lt;br /&gt;
          timeout 330 &#039;doas /bin/loginctl suspend&#039; \&lt;br /&gt;
          before-sleep &#039;swaylock --daemonize&#039;&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;br /&gt;
&lt;br /&gt;
== Output scaling for high resolution displays ==&lt;br /&gt;
&lt;br /&gt;
Without further configuration, program interfaces might be too small to use on high resolution displays.&lt;br /&gt;
&lt;br /&gt;
Sway supports the per-display configuration of&lt;br /&gt;
&lt;br /&gt;
* fractional (e.g., 1.5x), and&lt;br /&gt;
* integer scaling (e.g., 2x) &lt;br /&gt;
&lt;br /&gt;
However, fractional scaling is discouraged due to both the performance impact and the blurry output it produces. In this case, where 1x scaling is too small and 2x scaling is too large, program-specific GTK/QT based scaling is recommended.  See below.&lt;br /&gt;
&lt;br /&gt;
To enable Sway scaling, the user can first preview different scaling factors with &amp;lt;code&amp;gt;wdisplays&amp;lt;/code&amp;gt; package.  Note the output name (eDP-1, LVDS-1) and try apply scaling factors such as 1 and 2.  To make changes permanent, add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
output &amp;lt;name&amp;gt; scale &amp;lt;factor&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to ~/.config/sway/config.&lt;br /&gt;
&lt;br /&gt;
To use toolkit scaling, use&lt;br /&gt;
{{Cmd|# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE{{=}}2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}&amp;quot;physical&amp;quot;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; or if still too small, use a custom DPI&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}192 # 2x scaling&lt;br /&gt;
export QT_QPA_PLATFORM{{=}}&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Make clipboard content persistent ==&lt;br /&gt;
By default the clipboard content does not persist after terminating the program: you copy some text from Firefox and then exit Firefox, the copied text is also lost.&lt;br /&gt;
&lt;br /&gt;
Install clipman from testing repo and add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec wl-paste --type text/plain --watch clipman store --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
bindsym $mod+h exec clipman pick --tool wofi --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox picture-in-picture mode/floating windows ==&lt;br /&gt;
Add this to your sway config file (modify the numeric values to suit your needs and your display):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for_window [app_id=&amp;quot;firefox&amp;quot; title=&amp;quot;^Picture-in-Picture$&amp;quot;] floating enable, move position 877 450, sticky enable, border none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
A simple tool that works well under Wayland is Grimshot. Example keybindings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bindsym Print exec grimshot copy area&lt;br /&gt;
bindsym Shift+Print exec grimshot copy screen&lt;br /&gt;
bindsym Control+Print exec grimshot save area ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
bindsym Control+Shift+Print exec grimshot save screen ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway the sway wiki&#039;s article] for a list of screenshot tools.&lt;br /&gt;
&lt;br /&gt;
== Start with NumLock enabled ==&lt;br /&gt;
Add this to your sway config file:&lt;br /&gt;
&amp;lt;code&amp;gt;input type:keyboard xkb_numlock enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change cursor theme and size ==&lt;br /&gt;
Add to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seat seat0 xcursor_theme my_cursor_theme my_cursor_size&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can inspect their values with &amp;lt;code&amp;gt;echo $XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;echo $XCURSOR_THEME&amp;lt;/code&amp;gt;. If reloading your config does not result in change, try logging out and in.&lt;br /&gt;
{{Note|Wayland uses client-side cursors. It is possible that applications do not evaluate the values of &amp;lt;code&amp;gt;$XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$XCURSOR_THEME&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Custom keyboard layout ==&lt;br /&gt;
&lt;br /&gt;
Since wayland does not support setxkbmap, you will also need to add similar content to your &#039;&#039;/usr/share/X11/xkb/rules/evdev.xml&#039;&#039;, after &amp;lt;code&amp;gt;&amp;lt;/modelList&amp;gt;&amp;lt;/code&amp;gt; and after &amp;lt;code&amp;gt;&amp;lt;layoutList&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;&lt;br /&gt;
      &amp;lt;configItem&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;[the name of your layout, same as the name of the file in /usr/share/X11/xkb/symbols]&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;shortDescription&amp;gt;[usually just two letters]&amp;lt;/shortDescription&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt;[description of your layout]&amp;lt;/description&amp;gt;&lt;br /&gt;
        &amp;lt;countryList&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;US&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;NO&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
        &amp;lt;/countryList&amp;gt;&lt;br /&gt;
        &amp;lt;languageList&amp;gt;&lt;br /&gt;
          &amp;lt;iso639Id&amp;gt;eng&amp;lt;/iso639Id&amp;gt;&lt;br /&gt;
        &amp;lt;/languageList&amp;gt;&lt;br /&gt;
      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;!--[other layouts]--&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, to enable for all keyboards, navigate to the input section of &#039;&#039;~/.config/sway/config&#039;&#039; and modify it to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input type:keyboard {&lt;br /&gt;
  xkb_layout &amp;quot;my_layout&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have enabled &amp;lt;code&amp;gt;xkb_numlock&amp;lt;/code&amp;gt;, include this setting inside those braces as well.&lt;br /&gt;
&lt;br /&gt;
== Default font ==&lt;br /&gt;
&lt;br /&gt;
This is not related to Sway, but still nice to have: change system wide default font selection.  In &amp;lt;code&amp;gt;/etc/fonts/conf.d/52-my-default-fonts.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&#039;1.0&#039;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE fontconfig SYSTEM &#039;urn:fontconfig:fonts.dtd&#039;&amp;gt;&lt;br /&gt;
&amp;lt;fontconfig&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Default fonts --&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;sans-serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;monospace&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans Mono&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
&amp;lt;/fontconfig&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can obtain a list of installed fonts with &amp;lt;code&amp;gt;fc-list&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If you encounter any issues, try running &amp;lt;code&amp;gt;sway -Vc /etc/sway/config&amp;lt;/code&amp;gt;. It will run sway with the default config file and set the output to be more verbose. It is generally a good idea to track your config files with git (when and if at all you use a remote repository for them, keep it private for security reasons). &lt;br /&gt;
&lt;br /&gt;
== Flatpaks ==&lt;br /&gt;
&lt;br /&gt;
Due to their sandboxing, flatpaks require the use of a portal frontend (xdg-desktop-portal) and backends (such as xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, xdg-desktop-portal-gnome) that implement the methods. When in doubt, install multiple backends. For more information on backends, see [https://github.com/flatpak/xdg-desktop-portal/#using-portals flatpak&#039;s page on the subject]. In addition to the steps under the &amp;quot;Firefox Screensharing&amp;quot; section, it may also be necessary to launch additional backends in your Sway config file. Otherwise, you may run into GDBus errors as your flatpak fails to interface with the portal. This can cause issues such as with opening your file directories from a flatpak application.&lt;br /&gt;
&lt;br /&gt;
After installing different backends, you might need to add the relevant backends to your sway config file similarly to in the &amp;quot;Firefox Screensharing&amp;quot; section above. For example, an autostart section of your sway config file may include:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gtk&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-wlr&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gnome&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is only needed if they are not started automatically via other means.&lt;br /&gt;
&lt;br /&gt;
== Firefox (Flatpak) and/or GTK apps ==&lt;br /&gt;
=== Disappearing cursor ===&lt;br /&gt;
You may need to get an icon pack and possibly a theme from [https://www.pling.com/browse?cat=107&amp;amp;ord=latest Pling store] and set &amp;lt;code&amp;gt;GTK_THEME&amp;lt;/code&amp;gt; environmental variable. Alternatively you can install a theme      for all users (search [https://pkgs.alpinelinux.org/ Alpine Linux Packages] for &#039;&#039;*-icon-theme&#039;&#039;) using &amp;lt;code&amp;gt;apk add&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Missing file picker/cannot download ===&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;about:config&#039;&#039; and set &amp;lt;code&amp;gt;widget.use-xdg-desktop-portal.file-picker&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
== Failing to start under certain graphics cards/multiple wlroots stacked windows spawning upon start ==&lt;br /&gt;
As of Dec 31 2022, [https://developer.nvidia.com/docs/drive/drive-os/latest/linux/sdk/common/topics/window_system_stub/Gnome-WaylandDesktopShellSupport136.html Nvidia still doesn&#039;t fully support Wayland]. Therefore, the possible solutions are as outlined in the link, or setting your WLR_BACKENDS environmental variables to &amp;lt;code&amp;gt;drm,libinput&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;x11&amp;lt;/code&amp;gt; (add libinput here as well if you cannot use your mouse and keyboard after starting Sway). The latter also works for AMD/ATI cards (&#039;&#039;&#039;make sure to install libinput first&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
== Sway socket not detected ==&lt;br /&gt;
&lt;br /&gt;
See [[Sway#Installation|Installation]] for instructions on how to set this environmental variable. This issue may occur with terminal multiplexers, such as [[tmux]]&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26436</id>
		<title>Sway</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=26436"/>
		<updated>2024-02-19T23:14:38Z</updated>

		<summary type="html">&lt;p&gt;Quq: add details about seatd, elogind and optional greeter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Install and configure Sway&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM with swayidle:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to run sway with &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt;, this is needed for PipeWire and screensharing in Firefox and Chromium.&lt;br /&gt;
&lt;br /&gt;
== Install doas ==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &lt;br /&gt;
&lt;br /&gt;
 /bin/loginctl suspend&lt;br /&gt;
&lt;br /&gt;
(use full path to executable) and brightness can be adjusted by running&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/brightnessctl set 100&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install PipeWire, WirePlumber and XDG portals ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Later, we need to launch PipeWire with Sway and configure several environment variables.&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
== Launch PipeWire and enable screensharing ==&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native) for launching programs and selecting which screen to share in Firefox/Chromium:&lt;br /&gt;
&lt;br /&gt;
 set $menu dmenu_path | bemenu | xargs swaymsg exec --&lt;br /&gt;
&lt;br /&gt;
== Mouse cursor theme ==&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
== Screen lock and suspend-to-RAM ==&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w \&lt;br /&gt;
          timeout 300 &#039;swaylock --daemonize&#039; \&lt;br /&gt;
          timeout 330 &#039;doas /bin/loginctl suspend&#039; \&lt;br /&gt;
          before-sleep &#039;swaylock --daemonize&#039;&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;br /&gt;
&lt;br /&gt;
== Output scaling for high resolution displays ==&lt;br /&gt;
&lt;br /&gt;
Without further configuration, program interfaces might be too small to use on high resolution displays.&lt;br /&gt;
&lt;br /&gt;
Sway supports the per-display configuration of&lt;br /&gt;
&lt;br /&gt;
* fractional (e.g., 1.5x), and&lt;br /&gt;
* integer scaling (e.g., 2x) &lt;br /&gt;
&lt;br /&gt;
However, fractional scaling is discouraged due to both the performance impact and the blurry output it produces. In this case, where 1x scaling is too small and 2x scaling is too large, program-specific GTK/QT based scaling is recommended.  See below.&lt;br /&gt;
&lt;br /&gt;
To enable Sway scaling, the user can first preview different scaling factors with &amp;lt;code&amp;gt;wdisplays&amp;lt;/code&amp;gt; package.  Note the output name (eDP-1, LVDS-1) and try apply scaling factors such as 1 and 2.  To make changes permanent, add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
output &amp;lt;name&amp;gt; scale &amp;lt;factor&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to ~/.config/sway/config.&lt;br /&gt;
&lt;br /&gt;
To use toolkit scaling, use&lt;br /&gt;
{{Cmd|# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE{{=}}2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}&amp;quot;physical&amp;quot;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; or if still too small, use a custom DPI&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}192 # 2x scaling&lt;br /&gt;
export QT_QPA_PLATFORM{{=}}&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Make clipboard content persistent ==&lt;br /&gt;
By default the clipboard content does not persist after terminating the program: you copy some text from Firefox and then exit Firefox, the copied text is also lost.&lt;br /&gt;
&lt;br /&gt;
Install clipman from testing repo and add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec wl-paste --type text/plain --watch clipman store --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
bindsym $mod+h exec clipman pick --tool wofi --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox picture-in-picture mode/floating windows ==&lt;br /&gt;
Add this to your sway config file (modify the numeric values to suit your needs and your display):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for_window [app_id=&amp;quot;firefox&amp;quot; title=&amp;quot;^Picture-in-Picture$&amp;quot;] floating enable, move position 877 450, sticky enable, border none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
A simple tool that works well under Wayland is Grimshot. Example keybindings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bindsym Print exec grimshot copy area&lt;br /&gt;
bindsym Shift+Print exec grimshot copy screen&lt;br /&gt;
bindsym Control+Print exec grimshot save area ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
bindsym Control+Shift+Print exec grimshot save screen ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway the sway wiki&#039;s article] for a list of screenshot tools.&lt;br /&gt;
&lt;br /&gt;
== Start with NumLock enabled ==&lt;br /&gt;
Add this to your sway config file:&lt;br /&gt;
&amp;lt;code&amp;gt;input type:keyboard xkb_numlock enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change cursor theme and size ==&lt;br /&gt;
Add to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seat seat0 xcursor_theme my_cursor_theme my_cursor_size&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can inspect their values with &amp;lt;code&amp;gt;echo $XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;echo $XCURSOR_THEME&amp;lt;/code&amp;gt;. If reloading your config does not result in change, try logging out and in.&lt;br /&gt;
{{Note|Wayland uses client-side cursors. It is possible that applications do not evaluate the values of &amp;lt;code&amp;gt;$XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$XCURSOR_THEME&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Custom keyboard layout ==&lt;br /&gt;
&lt;br /&gt;
Since wayland does not support setxkbmap, you will also need to add similar content to your &#039;&#039;/usr/share/X11/xkb/rules/evdev.xml&#039;&#039;, after &amp;lt;code&amp;gt;&amp;lt;/modelList&amp;gt;&amp;lt;/code&amp;gt; and after &amp;lt;code&amp;gt;&amp;lt;layoutList&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;&lt;br /&gt;
      &amp;lt;configItem&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;[the name of your layout, same as the name of the file in /usr/share/X11/xkb/symbols]&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;shortDescription&amp;gt;[usually just two letters]&amp;lt;/shortDescription&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt;[description of your layout]&amp;lt;/description&amp;gt;&lt;br /&gt;
        &amp;lt;countryList&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;US&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;NO&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
        &amp;lt;/countryList&amp;gt;&lt;br /&gt;
        &amp;lt;languageList&amp;gt;&lt;br /&gt;
          &amp;lt;iso639Id&amp;gt;eng&amp;lt;/iso639Id&amp;gt;&lt;br /&gt;
        &amp;lt;/languageList&amp;gt;&lt;br /&gt;
      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;!--[other layouts]--&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, to enable for all keyboards, navigate to the input section of &#039;&#039;~/.config/sway/config&#039;&#039; and modify it to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input * {&lt;br /&gt;
  xkb_layout &amp;quot;my_layout&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have enabled &amp;lt;code&amp;gt;xkb_numlock&amp;lt;/code&amp;gt;, include this setting inside those braces as well.&lt;br /&gt;
&lt;br /&gt;
== Default font ==&lt;br /&gt;
&lt;br /&gt;
This is not related to Sway, but still nice to have: change system wide default font selection.  In &amp;lt;code&amp;gt;/etc/fonts/conf.d/52-my-default-fonts.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&#039;1.0&#039;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE fontconfig SYSTEM &#039;urn:fontconfig:fonts.dtd&#039;&amp;gt;&lt;br /&gt;
&amp;lt;fontconfig&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Default fonts --&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;sans-serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;monospace&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans Mono&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
&amp;lt;/fontconfig&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can obtain a list of installed fonts with &amp;lt;code&amp;gt;fc-list&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If you encounter any issues, try running &amp;lt;code&amp;gt;sway -Vc /etc/sway/config&amp;lt;/code&amp;gt;. It will run sway with the default config file and set the output to be more verbose. It is generally a good idea to track your config files with git (when and if at all you use a remote repository for them, keep it private for security reasons). &lt;br /&gt;
&lt;br /&gt;
== Flatpaks ==&lt;br /&gt;
&lt;br /&gt;
Due to their sandboxing, flatpaks require the use of a portal frontend (xdg-desktop-portal) and backends (such as xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, xdg-desktop-portal-gnome) that implement the methods. When in doubt, install multiple backends. For more information on backends, see [https://github.com/flatpak/xdg-desktop-portal/#using-portals flatpak&#039;s page on the subject]. In addition to the steps under the &amp;quot;Firefox Screensharing&amp;quot; section, it may also be necessary to launch additional backends in your Sway config file. Otherwise, you may run into GDBus errors as your flatpak fails to interface with the portal. This can cause issues such as with opening your file directories from a flatpak application.&lt;br /&gt;
&lt;br /&gt;
After installing different backends, you might need to add the relevant backends to your sway config file similarly to in the &amp;quot;Firefox Screensharing&amp;quot; section above. For example, an autostart section of your sway config file may include:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gtk&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-wlr&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gnome&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is only needed if they are not started automatically via other means.&lt;br /&gt;
&lt;br /&gt;
== Firefox (Flatpak) and/or GTK apps ==&lt;br /&gt;
=== Disappearing cursor ===&lt;br /&gt;
You may need to get an icon pack and possibly a theme from [https://www.pling.com/browse?cat=107&amp;amp;ord=latest Pling store] and set &amp;lt;code&amp;gt;GTK_THEME&amp;lt;/code&amp;gt; environmental variable. Alternatively you can install a theme      for all users (search [https://pkgs.alpinelinux.org/ Alpine Linux Packages] for &#039;&#039;*-icon-theme&#039;&#039;) using &amp;lt;code&amp;gt;apk add&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Missing file picker/cannot download ===&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;about:config&#039;&#039; and set &amp;lt;code&amp;gt;widget.use-xdg-desktop-portal.file-picker&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
== Failing to start under certain graphics cards/multiple wlroots stacked windows spawning upon start ==&lt;br /&gt;
As of Dec 31 2022, [https://developer.nvidia.com/docs/drive/drive-os/latest/linux/sdk/common/topics/window_system_stub/Gnome-WaylandDesktopShellSupport136.html Nvidia still doesn&#039;t fully support Wayland]. Therefore, the possible solutions are as outlined in the link, or setting your WLR_BACKENDS environmental variables to &amp;lt;code&amp;gt;drm,libinput&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;x11&amp;lt;/code&amp;gt; (add libinput here as well if you cannot use your mouse and keyboard after starting Sway). The latter also works for AMD/ATI cards (&#039;&#039;&#039;make sure to install libinput first&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
== Sway socket not detected ==&lt;br /&gt;
&lt;br /&gt;
See [[Sway#Installation|Installation]] for instructions on how to set this environmental variable. This issue may occur with terminal multiplexers, such as [[tmux]]&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26435</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26435"/>
		<updated>2024-02-19T23:13:51Z</updated>

		<summary type="html">&lt;p&gt;Quq: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Install and configure Sway&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM with swayidle:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to run sway with &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt;, this is needed for PipeWire and screensharing in Firefox and Chromium.&lt;br /&gt;
&lt;br /&gt;
== Install doas ==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &lt;br /&gt;
&lt;br /&gt;
 /bin/loginctl suspend&lt;br /&gt;
&lt;br /&gt;
(use full path to executable) and brightness can be adjusted by running&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/brightnessctl set 100&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install PipeWire, WirePlumber and XDG portals ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Later, we need to launch PipeWire with Sway and configure several environment variables.&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
== Launch PipeWire and enable screensharing ==&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native) for launching programs and selecting which screen to share in Firefox/Chromium:&lt;br /&gt;
&lt;br /&gt;
 set $menu dmenu_path | bemenu | xargs swaymsg exec --&lt;br /&gt;
&lt;br /&gt;
== Mouse cursor theme ==&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
== Screen lock and suspend-to-RAM ==&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w \&lt;br /&gt;
          timeout 300 &#039;swaylock --daemonize&#039; \&lt;br /&gt;
          timeout 330 &#039;doas /bin/loginctl suspend&#039; \&lt;br /&gt;
          before-sleep &#039;swaylock --daemonize&#039;&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;br /&gt;
&lt;br /&gt;
== Output scaling for high resolution displays ==&lt;br /&gt;
&lt;br /&gt;
Without further configuration, program interfaces might be too small to use on high resolution displays.&lt;br /&gt;
&lt;br /&gt;
Sway supports the per-display configuration of&lt;br /&gt;
&lt;br /&gt;
* fractional (e.g., 1.5x), and&lt;br /&gt;
* integer scaling (e.g., 2x) &lt;br /&gt;
&lt;br /&gt;
However, fractional scaling is discouraged due to both the performance impact and the blurry output it produces. In this case, where 1x scaling is too small and 2x scaling is too large, program-specific GTK/QT based scaling is recommended.  See below.&lt;br /&gt;
&lt;br /&gt;
To enable Sway scaling, the user can first preview different scaling factors with &amp;lt;code&amp;gt;wdisplays&amp;lt;/code&amp;gt; package.  Note the output name (eDP-1, LVDS-1) and try apply scaling factors such as 1 and 2.  To make changes permanent, add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
output &amp;lt;name&amp;gt; scale &amp;lt;factor&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to ~/.config/sway/config.&lt;br /&gt;
&lt;br /&gt;
To use toolkit scaling, use&lt;br /&gt;
{{Cmd|# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE{{=}}2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}&amp;quot;physical&amp;quot;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; or if still too small, use a custom DPI&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}192 # 2x scaling&lt;br /&gt;
export QT_QPA_PLATFORM{{=}}&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Make clipboard content persistent ==&lt;br /&gt;
By default the clipboard content does not persist after terminating the program: you copy some text from Firefox and then exit Firefox, the copied text is also lost.&lt;br /&gt;
&lt;br /&gt;
Install clipman from testing repo and add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec wl-paste --type text/plain --watch clipman store --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
bindsym $mod+h exec clipman pick --tool wofi --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox picture-in-picture mode/floating windows ==&lt;br /&gt;
Add this to your sway config file (modify the numeric values to suit your needs and your display):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for_window [app_id=&amp;quot;firefox&amp;quot; title=&amp;quot;^Picture-in-Picture$&amp;quot;] floating enable, move position 877 450, sticky enable, border none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
A simple tool that works well under Wayland is Grimshot. Example keybindings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bindsym Print exec grimshot copy area&lt;br /&gt;
bindsym Shift+Print exec grimshot copy screen&lt;br /&gt;
bindsym Control+Print exec grimshot save area ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
bindsym Control+Shift+Print exec grimshot save screen ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway the sway wiki&#039;s article] for a list of screenshot tools.&lt;br /&gt;
&lt;br /&gt;
== Start with NumLock enabled ==&lt;br /&gt;
Add this to your sway config file:&lt;br /&gt;
&amp;lt;code&amp;gt;input type:keyboard xkb_numlock enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change cursor theme and size ==&lt;br /&gt;
Add to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seat seat0 xcursor_theme my_cursor_theme my_cursor_size&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can inspect their values with &amp;lt;code&amp;gt;echo $XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;echo $XCURSOR_THEME&amp;lt;/code&amp;gt;. If reloading your config does not result in change, try logging out and in.&lt;br /&gt;
{{Note|Wayland uses client-side cursors. It is possible that applications do not evaluate the values of &amp;lt;code&amp;gt;$XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$XCURSOR_THEME&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Custom keyboard layout ==&lt;br /&gt;
&lt;br /&gt;
Since wayland does not support setxkbmap, you will also need to add similar content to your &#039;&#039;/usr/share/X11/xkb/rules/evdev.xml&#039;&#039;, after &amp;lt;code&amp;gt;&amp;lt;/modelList&amp;gt;&amp;lt;/code&amp;gt; and after &amp;lt;code&amp;gt;&amp;lt;layoutList&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;&lt;br /&gt;
      &amp;lt;configItem&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;[the name of your layout, same as the name of the file in /usr/share/X11/xkb/symbols]&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;shortDescription&amp;gt;[usually just two letters]&amp;lt;/shortDescription&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt;[description of your layout]&amp;lt;/description&amp;gt;&lt;br /&gt;
        &amp;lt;countryList&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;US&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;NO&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
        &amp;lt;/countryList&amp;gt;&lt;br /&gt;
        &amp;lt;languageList&amp;gt;&lt;br /&gt;
          &amp;lt;iso639Id&amp;gt;eng&amp;lt;/iso639Id&amp;gt;&lt;br /&gt;
        &amp;lt;/languageList&amp;gt;&lt;br /&gt;
      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;!--[other layouts]--&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, to enable for all keyboards, navigate to the input section of &#039;&#039;~/.config/sway/config&#039;&#039; and modify it to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input * {&lt;br /&gt;
  xkb_layout &amp;quot;my_layout&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have enabled &amp;lt;code&amp;gt;xkb_numlock&amp;lt;/code&amp;gt;, include this setting inside those braces as well.&lt;br /&gt;
&lt;br /&gt;
== Default font ==&lt;br /&gt;
&lt;br /&gt;
This is not related to Sway, but still nice to have: change system wide default font selection.  In &amp;lt;code&amp;gt;/etc/fonts/conf.d/52-my-default-fonts.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&#039;1.0&#039;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE fontconfig SYSTEM &#039;urn:fontconfig:fonts.dtd&#039;&amp;gt;&lt;br /&gt;
&amp;lt;fontconfig&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Default fonts --&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;sans-serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;monospace&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans Mono&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
&amp;lt;/fontconfig&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can obtain a list of installed fonts with &amp;lt;code&amp;gt;fc-list&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If you encounter any issues, try running &amp;lt;code&amp;gt;sway -Vc /etc/sway/config&amp;lt;/code&amp;gt;. It will run sway with the default config file and set the output to be more verbose. It is generally a good idea to track your config files with git (when and if at all you use a remote repository for them, keep it private for security reasons). &lt;br /&gt;
&lt;br /&gt;
== Flatpaks ==&lt;br /&gt;
&lt;br /&gt;
Due to their sandboxing, flatpaks require the use of a portal frontend (xdg-desktop-portal) and backends (such as xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, xdg-desktop-portal-gnome) that implement the methods. When in doubt, install multiple backends. For more information on backends, see [https://github.com/flatpak/xdg-desktop-portal/#using-portals flatpak&#039;s page on the subject]. In addition to the steps under the &amp;quot;Firefox Screensharing&amp;quot; section, it may also be necessary to launch additional backends in your Sway config file. Otherwise, you may run into GDBus errors as your flatpak fails to interface with the portal. This can cause issues such as with opening your file directories from a flatpak application.&lt;br /&gt;
&lt;br /&gt;
After installing different backends, you might need to add the relevant backends to your sway config file similarly to in the &amp;quot;Firefox Screensharing&amp;quot; section above. For example, an autostart section of your sway config file may include:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gtk&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-wlr&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gnome&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is only needed if they are not started automatically via other means.&lt;br /&gt;
&lt;br /&gt;
== Firefox (Flatpak) and/or GTK apps ==&lt;br /&gt;
=== Disappearing cursor ===&lt;br /&gt;
You may need to get an icon pack and possibly a theme from [https://www.pling.com/browse?cat=107&amp;amp;ord=latest Pling store] and set &amp;lt;code&amp;gt;GTK_THEME&amp;lt;/code&amp;gt; environmental variable. Alternatively you can install a theme      for all users (search [https://pkgs.alpinelinux.org/ Alpine Linux Packages] for &#039;&#039;*-icon-theme&#039;&#039;) using &amp;lt;code&amp;gt;apk add&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Missing file picker/cannot download ===&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;about:config&#039;&#039; and set &amp;lt;code&amp;gt;widget.use-xdg-desktop-portal.file-picker&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
== Failing to start under certain graphics cards/multiple wlroots stacked windows spawning upon start ==&lt;br /&gt;
As of Dec 31 2022, [https://developer.nvidia.com/docs/drive/drive-os/latest/linux/sdk/common/topics/window_system_stub/Gnome-WaylandDesktopShellSupport136.html Nvidia still doesn&#039;t fully support Wayland]. Therefore, the possible solutions are as outlined in the link, or setting your WLR_BACKENDS environmental variables to &amp;lt;code&amp;gt;drm,libinput&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;x11&amp;lt;/code&amp;gt; (add libinput here as well if you cannot use your mouse and keyboard after starting Sway). The latter also works for AMD/ATI cards (&#039;&#039;&#039;make sure to install libinput first&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
== Sway socket not detected ==&lt;br /&gt;
&lt;br /&gt;
See [[Sway#Installation|Installation]] for instructions on how to set this environmental variable. This issue may occur with terminal multiplexers, such as [[tmux]]&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26434</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26434"/>
		<updated>2024-02-19T23:11:45Z</updated>

		<summary type="html">&lt;p&gt;Quq: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Install and configure Sway&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM with swayidle:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to run sway with &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt;, this is needed for PipeWire and screensharing in Firefox and Chromium.&lt;br /&gt;
&lt;br /&gt;
== Install doas ==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &lt;br /&gt;
&lt;br /&gt;
 /bin/loginctl suspend&lt;br /&gt;
&lt;br /&gt;
(use full path to executable) and brightness can be adjusted by running&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/brightnessctl set 100&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install PipeWire, WirePlumber and XDG portals ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Later, we need to launch PipeWire with Sway and configure several environment variables.&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
== Launch PipeWire and enable screensharing ==&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native) for launching programs and selecting which screen to share in Firefox/Chromium:&lt;br /&gt;
&lt;br /&gt;
 set $menu dmenu_path | bemenu | xargs swaymsg exec --&lt;br /&gt;
&lt;br /&gt;
== Mouse cursor theme ==&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
== Screen lock and suspend-to-RAM ==&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w \&lt;br /&gt;
          timeout 300 &#039;swaylock --daemonize&#039; \&lt;br /&gt;
          timeout 330 &#039;doas /bin/loginctl suspend&#039; \&lt;br /&gt;
          before-sleep &#039;swaylock --daemonize&#039;&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;br /&gt;
&lt;br /&gt;
== Output scaling for high resolution displays ==&lt;br /&gt;
&lt;br /&gt;
Without further configuration, program interfaces might be too small to use on high resolution displays.&lt;br /&gt;
&lt;br /&gt;
Sway supports the per-display configuration of&lt;br /&gt;
&lt;br /&gt;
* fractional (e.g., 1.5x), and&lt;br /&gt;
* integer scaling (e.g., 2x) &lt;br /&gt;
&lt;br /&gt;
However, fractional scaling is discouraged due to both the performance impact and the blurry output it produces. In this case, where 1x scaling is too small and 2x scaling is too large, program-specific GTK/QT based scaling is recommended.  See below.&lt;br /&gt;
&lt;br /&gt;
To enable Sway scaling, the user can first preview different scaling factors with &amp;lt;code&amp;gt;wdisplays&amp;lt;/code&amp;gt; package.  Note the output name (eDP-1, LVDS-1) and try apply scaling factors such as 1 and 2.  To make changes permanent, add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
output &amp;lt;name&amp;gt; scale &amp;lt;factor&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to ~/.config/sway/config.&lt;br /&gt;
&lt;br /&gt;
To use toolkit scaling, use&lt;br /&gt;
{{Cmd|# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE{{=}}2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}&amp;quot;physical&amp;quot;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; or if still too small, use a custom DPI&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}192 # 2x scaling&lt;br /&gt;
export QT_QPA_PLATFORM{{=}}&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Make clipboard content persistent ==&lt;br /&gt;
By default the clipboard content does not persist after terminating the program: you copy some text from Firefox and then exit Firefox, the copied text is also lost.&lt;br /&gt;
&lt;br /&gt;
Install clipman from testing repo and add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec wl-paste --type text/plain --watch clipman store --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
bindsym $mod+h exec clipman pick --tool wofi --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox picture-in-picture mode/floating windows ==&lt;br /&gt;
Add this to your sway config file (modify the numeric values to suit your needs and your display):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for_window [app_id=&amp;quot;firefox&amp;quot; title=&amp;quot;^Picture-in-Picture$&amp;quot;] floating enable, move position 877 450, sticky enable, border none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
A simple tool that works well under Wayland is Grimshot. Example keybindings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bindsym Print exec grimshot copy area&lt;br /&gt;
bindsym Shift+Print exec grimshot copy screen&lt;br /&gt;
bindsym Control+Print exec grimshot save area ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
bindsym Control+Shift+Print exec grimshot save screen ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway the sway wiki&#039;s article] for a list of screenshot tools.&lt;br /&gt;
&lt;br /&gt;
== Start with NumLock enabled ==&lt;br /&gt;
Add this to your sway config file:&lt;br /&gt;
&amp;lt;code&amp;gt;input type:keyboard xkb_numlock enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change cursor theme and size ==&lt;br /&gt;
Add to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seat seat0 xcursor_theme my_cursor_theme my_cursor_size&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can inspect their values with &amp;lt;code&amp;gt;echo $XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;echo $XCURSOR_THEME&amp;lt;/code&amp;gt;. If reloading your config does not result in change, try logging out and in.&lt;br /&gt;
{{Note|Wayland uses client-side cursors. It is possible that applications do not evaluate the values of &amp;lt;code&amp;gt;$XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$XCURSOR_THEME&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Custom keyboard layout ==&lt;br /&gt;
&lt;br /&gt;
Since wayland does not support setxkbmap, you will also need to add similar content to your &#039;&#039;/usr/share/X11/xkb/rules/evdev.xml&#039;&#039;, after &amp;lt;code&amp;gt;&amp;lt;/modelList&amp;gt;&amp;lt;/code&amp;gt; and after &amp;lt;code&amp;gt;&amp;lt;layoutList&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;&lt;br /&gt;
      &amp;lt;configItem&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;[the name of your layout, same as the name of the file in /usr/share/X11/xkb/symbols]&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;shortDescription&amp;gt;[usually just two letters]&amp;lt;/shortDescription&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt;[description of your layout]&amp;lt;/description&amp;gt;&lt;br /&gt;
        &amp;lt;countryList&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;US&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;NO&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
        &amp;lt;/countryList&amp;gt;&lt;br /&gt;
        &amp;lt;languageList&amp;gt;&lt;br /&gt;
          &amp;lt;iso639Id&amp;gt;eng&amp;lt;/iso639Id&amp;gt;&lt;br /&gt;
        &amp;lt;/languageList&amp;gt;&lt;br /&gt;
      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;!--[other layouts]--&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, to enable for all keyboards, navigate to the input section of &#039;&#039;~/.config/sway/config&#039;&#039; and modify it to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input * {&lt;br /&gt;
  xkb_layout &amp;quot;my_layout&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have enabled &amp;lt;code&amp;gt;xkb_numlock&amp;lt;/code&amp;gt;, include this setting inside those braces as well.&lt;br /&gt;
&lt;br /&gt;
== Default font ==&lt;br /&gt;
&lt;br /&gt;
This is not related to Sway, but still nice to have: change system wide default font selection.  In &amp;lt;code&amp;gt;/etc/fonts/conf.d/52-my-default-fonts.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&#039;1.0&#039;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE fontconfig SYSTEM &#039;urn:fontconfig:fonts.dtd&#039;&amp;gt;&lt;br /&gt;
&amp;lt;fontconfig&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Default fonts --&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;sans-serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;monospace&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans Mono&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
&amp;lt;/fontconfig&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can obtain a list of installed fonts with &amp;lt;code&amp;gt;fc-list&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26433</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26433"/>
		<updated>2024-02-19T23:09:45Z</updated>

		<summary type="html">&lt;p&gt;Quq: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Install and configure Sway&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM with swayidle:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to run sway with &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt;, this is needed for PipeWire and screensharing in Firefox and Chromium.&lt;br /&gt;
&lt;br /&gt;
== Install doas ==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &lt;br /&gt;
&lt;br /&gt;
 /bin/loginctl suspend&lt;br /&gt;
&lt;br /&gt;
(use full path to executable) and brightness can be adjusted by running&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/brightnessctl set 100&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install PipeWire, WirePlumber and XDG portals ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Later, we need to launch PipeWire with Sway and configure several environment variables.&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native) for launching programs and selecting which screen to share in Firefox/Chromium:&lt;br /&gt;
&lt;br /&gt;
 set $menu dmenu_path | bemenu | xargs swaymsg exec --&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w \&lt;br /&gt;
          timeout 300 &#039;swaylock --daemonize&#039; \&lt;br /&gt;
          timeout 330 &#039;doas /bin/loginctl suspend&#039; \&lt;br /&gt;
          before-sleep &#039;swaylock --daemonize&#039;&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;br /&gt;
&lt;br /&gt;
== Output scaling for high resolution displays ==&lt;br /&gt;
&lt;br /&gt;
Without further configuration, program interfaces might be too small to use on high resolution displays.&lt;br /&gt;
&lt;br /&gt;
Sway supports the per-display configuration of&lt;br /&gt;
&lt;br /&gt;
* fractional (e.g., 1.5x), and&lt;br /&gt;
* integer scaling (e.g., 2x) &lt;br /&gt;
&lt;br /&gt;
However, fractional scaling is discouraged due to both the performance impact and the blurry output it produces. In this case, where 1x scaling is too small and 2x scaling is too large, program-specific GTK/QT based scaling is recommended.  See below.&lt;br /&gt;
&lt;br /&gt;
To enable Sway scaling, the user can first preview different scaling factors with &amp;lt;code&amp;gt;wdisplays&amp;lt;/code&amp;gt; package.  Note the output name (eDP-1, LVDS-1) and try apply scaling factors such as 1 and 2.  To make changes permanent, add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
output &amp;lt;name&amp;gt; scale &amp;lt;factor&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to ~/.config/sway/config.&lt;br /&gt;
&lt;br /&gt;
To use toolkit scaling, use&lt;br /&gt;
{{Cmd|# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE{{=}}2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}&amp;quot;physical&amp;quot;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; or if still too small, use a custom DPI&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}192 # 2x scaling&lt;br /&gt;
export QT_QPA_PLATFORM{{=}}&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Make clipboard content persistent ==&lt;br /&gt;
By default the clipboard content does not persist after terminating the program: you copy some text from Firefox and then exit Firefox, the copied text is also lost.&lt;br /&gt;
&lt;br /&gt;
Install clipman from testing repo and add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec wl-paste --type text/plain --watch clipman store --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
bindsym $mod+h exec clipman pick --tool wofi --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox picture-in-picture mode/floating windows ==&lt;br /&gt;
Add this to your sway config file (modify the numeric values to suit your needs and your display):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for_window [app_id=&amp;quot;firefox&amp;quot; title=&amp;quot;^Picture-in-Picture$&amp;quot;] floating enable, move position 877 450, sticky enable, border none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
A simple tool that works well under Wayland is Grimshot. Example keybindings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bindsym Print exec grimshot copy area&lt;br /&gt;
bindsym Shift+Print exec grimshot copy screen&lt;br /&gt;
bindsym Control+Print exec grimshot save area ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
bindsym Control+Shift+Print exec grimshot save screen ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway the sway wiki&#039;s article] for a list of screenshot tools.&lt;br /&gt;
&lt;br /&gt;
== Start with NumLock enabled ==&lt;br /&gt;
Add this to your sway config file:&lt;br /&gt;
&amp;lt;code&amp;gt;input type:keyboard xkb_numlock enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change cursor theme and size ==&lt;br /&gt;
Add to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seat seat0 xcursor_theme my_cursor_theme my_cursor_size&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can inspect their values with &amp;lt;code&amp;gt;echo $XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;echo $XCURSOR_THEME&amp;lt;/code&amp;gt;. If reloading your config does not result in change, try logging out and in.&lt;br /&gt;
{{Note|Wayland uses client-side cursors. It is possible that applications do not evaluate the values of &amp;lt;code&amp;gt;$XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$XCURSOR_THEME&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Custom keyboard layout ==&lt;br /&gt;
&lt;br /&gt;
Since wayland does not support setxkbmap, you will also need to add similar content to your &#039;&#039;/usr/share/X11/xkb/rules/evdev.xml&#039;&#039;, after &amp;lt;code&amp;gt;&amp;lt;/modelList&amp;gt;&amp;lt;/code&amp;gt; and after &amp;lt;code&amp;gt;&amp;lt;layoutList&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;&lt;br /&gt;
      &amp;lt;configItem&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;[the name of your layout, same as the name of the file in /usr/share/X11/xkb/symbols]&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;shortDescription&amp;gt;[usually just two letters]&amp;lt;/shortDescription&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt;[description of your layout]&amp;lt;/description&amp;gt;&lt;br /&gt;
        &amp;lt;countryList&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;US&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;NO&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
        &amp;lt;/countryList&amp;gt;&lt;br /&gt;
        &amp;lt;languageList&amp;gt;&lt;br /&gt;
          &amp;lt;iso639Id&amp;gt;eng&amp;lt;/iso639Id&amp;gt;&lt;br /&gt;
        &amp;lt;/languageList&amp;gt;&lt;br /&gt;
      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;!--[other layouts]--&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, to enable for all keyboards, navigate to the input section of &#039;&#039;~/.config/sway/config&#039;&#039; and modify it to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input * {&lt;br /&gt;
  xkb_layout &amp;quot;my_layout&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have enabled &amp;lt;code&amp;gt;xkb_numlock&amp;lt;/code&amp;gt;, include this setting inside those braces as well.&lt;br /&gt;
&lt;br /&gt;
== Default font ==&lt;br /&gt;
&lt;br /&gt;
This is not related to Sway, but still nice to have: change system wide default font selection.  In &amp;lt;code&amp;gt;/etc/fonts/conf.d/52-my-default-fonts.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&#039;1.0&#039;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE fontconfig SYSTEM &#039;urn:fontconfig:fonts.dtd&#039;&amp;gt;&lt;br /&gt;
&amp;lt;fontconfig&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Default fonts --&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;sans-serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Serif&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
  &amp;lt;alias binding=&amp;quot;same&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;family&amp;gt;monospace&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;prefer&amp;gt;&lt;br /&gt;
      &amp;lt;family&amp;gt;DejaVu Sans Mono&amp;lt;/family&amp;gt;&lt;br /&gt;
    &amp;lt;/prefer&amp;gt;&lt;br /&gt;
  &amp;lt;/alias&amp;gt;&lt;br /&gt;
&amp;lt;/fontconfig&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can obtain a list of installed fonts with &amp;lt;code&amp;gt;fc-list&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26432</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26432"/>
		<updated>2024-02-19T23:04:24Z</updated>

		<summary type="html">&lt;p&gt;Quq: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Install and configure Sway&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM with swayidle:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to run sway with &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt;, this is needed for PipeWire and screensharing in Firefox and Chromium.&lt;br /&gt;
&lt;br /&gt;
== Install doas ==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &amp;lt;code&amp;gt;/bin/loginctl suspend&amp;lt;/code&amp;gt; (use full path to executable) and brightness can be adjusted by running &amp;lt;code&amp;gt;/usr/bin/brightnessctl set 100&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install PipeWire, WirePlumber and XDG portals ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Later, we need to launch PipeWire with Sway and configure several environment variables.&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native) for launching programs and selecting which screen to share in Firefox/Chromium:&lt;br /&gt;
&lt;br /&gt;
 set $menu dmenu_path | bemenu | xargs swaymsg exec --&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w \&lt;br /&gt;
          timeout 300 &#039;swaylock --daemonize&#039; \&lt;br /&gt;
          timeout 330 &#039;doas /bin/loginctl suspend&#039; \&lt;br /&gt;
          before-sleep &#039;swaylock --daemonize&#039;&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;br /&gt;
&lt;br /&gt;
== Output scaling for high resolution displays ==&lt;br /&gt;
&lt;br /&gt;
Without further configuration, program interfaces might be too small to use on high resolution displays.&lt;br /&gt;
&lt;br /&gt;
Sway supports the per-display configuration of&lt;br /&gt;
&lt;br /&gt;
* fractional (e.g., 1.5x), and&lt;br /&gt;
* integer scaling (e.g., 2x) &lt;br /&gt;
&lt;br /&gt;
However, fractional scaling is discouraged due to both the performance impact and the blurry output it produces. In this case, where 1x scaling is too small and 2x scaling is too large, program-specific GTK/QT based scaling is recommended.  See below.&lt;br /&gt;
&lt;br /&gt;
To enable Sway scaling, the user can first preview different scaling factors with &amp;lt;code&amp;gt;wdisplays&amp;lt;/code&amp;gt; package.  Note the output name (eDP-1, LVDS-1) and try apply scaling factors such as 1 and 2.  To make changes permanent, add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
output &amp;lt;name&amp;gt; scale &amp;lt;factor&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to ~/.config/sway/config.&lt;br /&gt;
&lt;br /&gt;
To use toolkit scaling, use&lt;br /&gt;
{{Cmd|# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE{{=}}2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}&amp;quot;physical&amp;quot;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; or if still too small, use a custom DPI&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}192 # 2x scaling&lt;br /&gt;
export QT_QPA_PLATFORM{{=}}&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Make clipboard content persistent ==&lt;br /&gt;
By default the clipboard content does not persist after terminating the program: you copy some text from Firefox and then exit Firefox, the copied text is also lost.&lt;br /&gt;
&lt;br /&gt;
Install clipman from testing repo and add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec wl-paste --type text/plain --watch clipman store --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
bindsym $mod+h exec clipman pick --tool wofi --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox picture-in-picture mode/floating windows ==&lt;br /&gt;
Add this to your sway config file (modify the numeric values to suit your needs and your display):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for_window [app_id=&amp;quot;firefox&amp;quot; title=&amp;quot;^Picture-in-Picture$&amp;quot;] floating enable, move position 877 450, sticky enable, border none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
A simple tool that works well under Wayland is Grimshot. Example keybindings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bindsym Print exec grimshot copy area&lt;br /&gt;
bindsym Shift+Print exec grimshot copy screen&lt;br /&gt;
bindsym Control+Print exec grimshot save area ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
bindsym Control+Shift+Print exec grimshot save screen ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway the sway wiki&#039;s article] for a list of screenshot tools.&lt;br /&gt;
&lt;br /&gt;
== Start with NumLock enabled ==&lt;br /&gt;
Add this to your sway config file:&lt;br /&gt;
&amp;lt;code&amp;gt;input type:keyboard xkb_numlock enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change cursor theme and size ==&lt;br /&gt;
Add to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seat seat0 xcursor_theme my_cursor_theme my_cursor_size&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can inspect their values with &amp;lt;code&amp;gt;echo $XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;echo $XCURSOR_THEME&amp;lt;/code&amp;gt;. If reloading your config does not result in change, try logging out and in.&lt;br /&gt;
{{Note|Wayland uses client-side cursors. It is possible that applications do not evaluate the values of &amp;lt;code&amp;gt;$XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$XCURSOR_THEME&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Custom keyboard layout ==&lt;br /&gt;
&lt;br /&gt;
Since wayland does not support setxkbmap, you will also need to add similar content to your &#039;&#039;/usr/share/X11/xkb/rules/evdev.xml&#039;&#039;, after &amp;lt;code&amp;gt;&amp;lt;/modelList&amp;gt;&amp;lt;/code&amp;gt; and after &amp;lt;code&amp;gt;&amp;lt;layoutList&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;&lt;br /&gt;
      &amp;lt;configItem&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;[the name of your layout, same as the name of the file in /usr/share/X11/xkb/symbols]&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;shortDescription&amp;gt;[usually just two letters]&amp;lt;/shortDescription&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt;[description of your layout]&amp;lt;/description&amp;gt;&lt;br /&gt;
        &amp;lt;countryList&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;US&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;NO&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
        &amp;lt;/countryList&amp;gt;&lt;br /&gt;
        &amp;lt;languageList&amp;gt;&lt;br /&gt;
          &amp;lt;iso639Id&amp;gt;eng&amp;lt;/iso639Id&amp;gt;&lt;br /&gt;
        &amp;lt;/languageList&amp;gt;&lt;br /&gt;
      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;!--[other layouts]--&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, to enable for all keyboards, navigate to the input section of &#039;&#039;~/.config/sway/config&#039;&#039; and modify it to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input * {&lt;br /&gt;
  xkb_layout &amp;quot;my_layout&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have enabled &amp;lt;code&amp;gt;xkb_numlock&amp;lt;/code&amp;gt;, include this setting inside those braces as well.&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26431</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26431"/>
		<updated>2024-02-19T23:02:53Z</updated>

		<summary type="html">&lt;p&gt;Quq: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Install and configure Sway&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM with swayidle:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to run sway with &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt;, this is needed for PipeWire and screensharing in Firefox and Chromium.&lt;br /&gt;
&lt;br /&gt;
== Install doas ==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &amp;lt;code&amp;gt;/bin/loginctl suspend&amp;lt;/code&amp;gt; (use full path to executable) and brightness can be adjusted by running &amp;lt;code&amp;gt;/usr/bin/brightnessctl set 100&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install PipeWire, WirePlumber and XDG portals ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Later, we need to launch PipeWire with Sway and configure several environment variables.&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native):&lt;br /&gt;
&lt;br /&gt;
 set $menu dmenu_path | bemenu | xargs swaymsg exec --&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w \&lt;br /&gt;
          timeout 300 &#039;swaylock --daemonize&#039; \&lt;br /&gt;
          timeout 330 &#039;doas /bin/loginctl suspend&#039; \&lt;br /&gt;
          before-sleep &#039;swaylock --daemonize&#039;&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;br /&gt;
&lt;br /&gt;
== Output scaling for high resolution displays ==&lt;br /&gt;
&lt;br /&gt;
Without further configuration, program interfaces might be too small to use on high resolution displays.&lt;br /&gt;
&lt;br /&gt;
Sway supports the per-display configuration of&lt;br /&gt;
&lt;br /&gt;
* fractional (e.g., 1.5x), and&lt;br /&gt;
* integer scaling (e.g., 2x) &lt;br /&gt;
&lt;br /&gt;
However, fractional scaling is discouraged due to both the performance impact and the blurry output it produces. In this case, where 1x scaling is too small and 2x scaling is too large, program-specific GTK/QT based scaling is recommended.  See below.&lt;br /&gt;
&lt;br /&gt;
To enable Sway scaling, the user can first preview different scaling factors with &amp;lt;code&amp;gt;wdisplays&amp;lt;/code&amp;gt; package.  Note the output name (eDP-1, LVDS-1) and try apply scaling factors such as 1 and 2.  To make changes permanent, add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
output &amp;lt;name&amp;gt; scale &amp;lt;factor&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to ~/.config/sway/config.&lt;br /&gt;
&lt;br /&gt;
To use toolkit scaling, use&lt;br /&gt;
{{Cmd|# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE{{=}}2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}&amp;quot;physical&amp;quot;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; or if still too small, use a custom DPI&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}192 # 2x scaling&lt;br /&gt;
export QT_QPA_PLATFORM{{=}}&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Make clipboard content persistent ==&lt;br /&gt;
By default the clipboard content does not persist after terminating the program: you copy some text from Firefox and then exit Firefox, the copied text is also lost.&lt;br /&gt;
&lt;br /&gt;
Install clipman from testing repo and add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec wl-paste --type text/plain --watch clipman store --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
bindsym $mod+h exec clipman pick --tool wofi --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox picture-in-picture mode/floating windows ==&lt;br /&gt;
Add this to your sway config file (modify the numeric values to suit your needs and your display):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for_window [app_id=&amp;quot;firefox&amp;quot; title=&amp;quot;^Picture-in-Picture$&amp;quot;] floating enable, move position 877 450, sticky enable, border none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
A simple tool that works well under Wayland is Grimshot. Example keybindings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bindsym Print exec grimshot copy area&lt;br /&gt;
bindsym Shift+Print exec grimshot copy screen&lt;br /&gt;
bindsym Control+Print exec grimshot save area ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
bindsym Control+Shift+Print exec grimshot save screen ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway the sway wiki&#039;s article] for a list of screenshot tools.&lt;br /&gt;
&lt;br /&gt;
== Start with NumLock enabled ==&lt;br /&gt;
Add this to your sway config file:&lt;br /&gt;
&amp;lt;code&amp;gt;input type:keyboard xkb_numlock enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change cursor theme and size ==&lt;br /&gt;
Add to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seat seat0 xcursor_theme my_cursor_theme my_cursor_size&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can inspect their values with &amp;lt;code&amp;gt;echo $XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;echo $XCURSOR_THEME&amp;lt;/code&amp;gt;. If reloading your config does not result in change, try logging out and in.&lt;br /&gt;
{{Note|Wayland uses client-side cursors. It is possible that applications do not evaluate the values of &amp;lt;code&amp;gt;$XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$XCURSOR_THEME&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Custom keyboard layout ==&lt;br /&gt;
&lt;br /&gt;
Since wayland does not support setxkbmap, you will also need to add similar content to your &#039;&#039;/usr/share/X11/xkb/rules/evdev.xml&#039;&#039;, after &amp;lt;code&amp;gt;&amp;lt;/modelList&amp;gt;&amp;lt;/code&amp;gt; and after &amp;lt;code&amp;gt;&amp;lt;layoutList&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;&lt;br /&gt;
      &amp;lt;configItem&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;[the name of your layout, same as the name of the file in /usr/share/X11/xkb/symbols]&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;shortDescription&amp;gt;[usually just two letters]&amp;lt;/shortDescription&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt;[description of your layout]&amp;lt;/description&amp;gt;&lt;br /&gt;
        &amp;lt;countryList&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;US&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;NO&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
        &amp;lt;/countryList&amp;gt;&lt;br /&gt;
        &amp;lt;languageList&amp;gt;&lt;br /&gt;
          &amp;lt;iso639Id&amp;gt;eng&amp;lt;/iso639Id&amp;gt;&lt;br /&gt;
        &amp;lt;/languageList&amp;gt;&lt;br /&gt;
      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;!--[other layouts]--&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, to enable for all keyboards, navigate to the input section of &#039;&#039;~/.config/sway/config&#039;&#039; and modify it to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input * {&lt;br /&gt;
  xkb_layout &amp;quot;my_layout&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have enabled &amp;lt;code&amp;gt;xkb_numlock&amp;lt;/code&amp;gt;, include this setting inside those braces as well.&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26430</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26430"/>
		<updated>2024-02-19T22:58:49Z</updated>

		<summary type="html">&lt;p&gt;Quq: /* Sway configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Install and configure Sway&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM with swayidle:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to run sway with &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt;, this is needed for PipeWire and screensharing in Firefox and Chromium.&lt;br /&gt;
&lt;br /&gt;
== Install doas ==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &amp;lt;code&amp;gt;/bin/loginctl suspend&amp;lt;/code&amp;gt; (use full path to executable) and brightness can be adjusted by running &amp;lt;code&amp;gt;/usr/bin/brightnessctl set 100&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install PipeWire, WirePlumber and XDG portals ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Later, we need to launch PipeWire with Sway and configure several environment variables.&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Sway configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native):&lt;br /&gt;
&lt;br /&gt;
 set $menu dmenu_path | bemenu | xargs swaymsg exec --&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w \&lt;br /&gt;
          timeout 300 &#039;swaylock --daemonize&#039; \&lt;br /&gt;
          timeout 330 &#039;doas /bin/loginctl suspend&#039; \&lt;br /&gt;
          before-sleep &#039;swaylock --daemonize&#039;&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26429</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26429"/>
		<updated>2024-02-19T22:57:46Z</updated>

		<summary type="html">&lt;p&gt;Quq: /* Install greetd (optional) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Install and configure Sway&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM with swayidle:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to run sway with &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt;, this is needed for PipeWire and screensharing in Firefox and Chromium.&lt;br /&gt;
&lt;br /&gt;
== Install doas ==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &amp;lt;code&amp;gt;/bin/loginctl suspend&amp;lt;/code&amp;gt; (use full path to executable) and brightness can be adjusted by running &amp;lt;code&amp;gt;/usr/bin/brightnessctl set 100&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install PipeWire, WirePlumber and XDG portals ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Later, we need to launch PipeWire with Sway and configure several environment variables.&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Sway configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native):&lt;br /&gt;
&lt;br /&gt;
 set $menu dmenu_path | bemenu | xargs swaymsg exec --&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w \&lt;br /&gt;
          timeout 300 &#039;swaylock --daemonize&#039; \&lt;br /&gt;
          timeout 330 &#039;doas /bin/loginctl suspend&#039; \&lt;br /&gt;
          before-sleep &#039;swaylock --daemonize&#039;&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26428</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26428"/>
		<updated>2024-02-19T22:56:19Z</updated>

		<summary type="html">&lt;p&gt;Quq: /* Install seatd */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Install and configure Sway&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
&lt;br /&gt;
 # add seatd to boot run-level, because it must be running before greetd&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM with swayidle:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Running sway with DBus is needed for PipeWire and screen sharing.&lt;br /&gt;
&lt;br /&gt;
== Install doas ==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &amp;lt;code&amp;gt;/bin/loginctl suspend&amp;lt;/code&amp;gt; (use full path to executable) and brightness can be adjusted by running &amp;lt;code&amp;gt;/usr/bin/brightnessctl set 100&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install PipeWire, WirePlumber and XDG portals ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Later, we need to launch PipeWire with Sway and configure several environment variables.&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Sway configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native):&lt;br /&gt;
&lt;br /&gt;
 set $menu dmenu_path | bemenu | xargs swaymsg exec --&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w \&lt;br /&gt;
          timeout 300 &#039;swaylock --daemonize&#039; \&lt;br /&gt;
          timeout 330 &#039;doas /bin/loginctl suspend&#039; \&lt;br /&gt;
          before-sleep &#039;swaylock --daemonize&#039;&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26427</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26427"/>
		<updated>2024-02-19T22:54:53Z</updated>

		<summary type="html">&lt;p&gt;Quq: /* Install Sway */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Install and configure Sway&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
 # add seatd to boot run-level, because greetd requires it to be running&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM with swayidle:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Running sway with DBus is needed for PipeWire and screen sharing.&lt;br /&gt;
&lt;br /&gt;
== Install doas ==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &amp;lt;code&amp;gt;/bin/loginctl suspend&amp;lt;/code&amp;gt; (use full path to executable) and brightness can be adjusted by running &amp;lt;code&amp;gt;/usr/bin/brightnessctl set 100&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install PipeWire, WirePlumber and XDG portals ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Later, we need to launch PipeWire with Sway and configure several environment variables.&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
For complimentary software alternatives, see for example [https://wiki.gentoo.org/wiki/List_of_software_for_Wayland this list at Gentoo Wiki.]&lt;br /&gt;
&lt;br /&gt;
== Sway configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native):&lt;br /&gt;
&lt;br /&gt;
 set $menu dmenu_path | bemenu | xargs swaymsg exec --&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w \&lt;br /&gt;
          timeout 300 &#039;swaylock --daemonize&#039; \&lt;br /&gt;
          timeout 330 &#039;doas /bin/loginctl suspend&#039; \&lt;br /&gt;
          before-sleep &#039;swaylock --daemonize&#039;&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26426</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26426"/>
		<updated>2024-02-19T22:53:43Z</updated>

		<summary type="html">&lt;p&gt;Quq: sway&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Install and configure Sway&lt;br /&gt;
&lt;br /&gt;
== Install Graphics Drivers ==&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
&lt;br /&gt;
== Add a normal user ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;setup-user&amp;lt;/code&amp;gt; to add a non-system normal user for running Sway.&lt;br /&gt;
&lt;br /&gt;
== Install seatd ==&lt;br /&gt;
&lt;br /&gt;
Install seatd, a minimal seat management daemon.  This grants the required permissions to the user running sway:&lt;br /&gt;
&lt;br /&gt;
 apk add seatd&lt;br /&gt;
 # add seatd to boot run-level, because greetd requires it to be running&lt;br /&gt;
 rc-update add seatd boot&lt;br /&gt;
 rc-service seatd start&lt;br /&gt;
 adduser $USER seat&lt;br /&gt;
&lt;br /&gt;
== Install elogind (optional) ==&lt;br /&gt;
&lt;br /&gt;
elogind is used to enable suspend-to-RAM with swayidle:&lt;br /&gt;
&lt;br /&gt;
 apk add elogind&lt;br /&gt;
 rc-update add elogind&lt;br /&gt;
 rc-service elogind start&lt;br /&gt;
&lt;br /&gt;
== Set up eudev ==&lt;br /&gt;
&lt;br /&gt;
[[eudev]] is recommended and required for the greeter. Or else it will not be able to find any input device (libinput failure).&lt;br /&gt;
&lt;br /&gt;
 setup-devd udev&lt;br /&gt;
&lt;br /&gt;
== Install greetd (optional) ==&lt;br /&gt;
&lt;br /&gt;
greetd is used to set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and properly configure seat:&lt;br /&gt;
&lt;br /&gt;
 apk add greetd greetd-gtkgreet cage greetd-openrc&lt;br /&gt;
 rc-update add greetd&lt;br /&gt;
 adduser greetd seat&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/config.toml&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[default_session]&lt;br /&gt;
&lt;br /&gt;
command = &amp;quot;cage -s -- gtkgreet&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/greetd/environments&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Launch Sway with a D-Bus server available, use:&lt;br /&gt;
dbus-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Running sway with DBus is needed for PipeWire and screen sharing.&lt;br /&gt;
&lt;br /&gt;
== Install doas ==&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &amp;lt;code&amp;gt;/bin/loginctl suspend&amp;lt;/code&amp;gt; (use full path to executable) and brightness can be adjusted by running &amp;lt;code&amp;gt;/usr/bin/brightnessctl set 100&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Install fonts ==&lt;br /&gt;
&lt;br /&gt;
Install DejaVu fonts, which has good Unicode coverage:&lt;br /&gt;
&lt;br /&gt;
 apk add font-dejavu&lt;br /&gt;
&lt;br /&gt;
== Install PipeWire, WirePlumber and XDG portals ==&lt;br /&gt;
&lt;br /&gt;
For a reasonable desktop experience with support for audio and screensharing, install pipewire, wireplumber and xdg portals:&lt;br /&gt;
&lt;br /&gt;
 apk add pipewire pipewire-pulse pipewire-tools&lt;br /&gt;
 apk add wireplumber&lt;br /&gt;
 apk add xdg-desktop-portal xdg-desktop-portal-wlr&lt;br /&gt;
&lt;br /&gt;
Later, we need to launch PipeWire with Sway and configure several environment variables.&lt;br /&gt;
&lt;br /&gt;
== Install Sway ==&lt;br /&gt;
&lt;br /&gt;
 apk add sway \&lt;br /&gt;
    xwayland             \ # if you need xserver&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland native menu for choosing program and screensharing monitor&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    grim                 \ # screenshot tool&lt;br /&gt;
    wl-clipboard         \ # clipboard management&lt;br /&gt;
    i3status             \ # simple status bar&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&lt;br /&gt;
== Sway configuration ==&lt;br /&gt;
&lt;br /&gt;
Copy default sway configuration to &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # as normal user&lt;br /&gt;
 mkdir -p ~/.config/sway&lt;br /&gt;
 cp /etc/sway/config ~/.config/sway/&lt;br /&gt;
&lt;br /&gt;
Launch PipeWire with Sway, add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
 exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&lt;br /&gt;
You also need to set DBus variables for the portal and screensharing features to work:&lt;br /&gt;
&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
Replace dmenu (depends on X server) with bemenu (Wayland native):&lt;br /&gt;
&lt;br /&gt;
 set $menu dmenu_path | bemenu | xargs swaymsg exec --&lt;br /&gt;
&lt;br /&gt;
Set a mouse cursor, using GNOME Adwaita theme:&lt;br /&gt;
&lt;br /&gt;
 seat &amp;quot;*&amp;quot; xcursor_theme Adwaita 16&lt;br /&gt;
&lt;br /&gt;
Set screen lock and suspend-to-RAM:&lt;br /&gt;
&lt;br /&gt;
 exec swayidle -w \&lt;br /&gt;
          timeout 300 &#039;swaylock --daemonize&#039; \&lt;br /&gt;
          timeout 330 &#039;doas /bin/loginctl suspend&#039; \&lt;br /&gt;
          before-sleep &#039;swaylock --daemonize&#039;&lt;br /&gt;
&lt;br /&gt;
Do not lock the screen if program is running in full screen:&lt;br /&gt;
&lt;br /&gt;
 for_window [app_id=&amp;quot;^.*&amp;quot;] inhibit_idle fullscreen&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26423</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26423"/>
		<updated>2024-02-18T03:08:51Z</updated>

		<summary type="html">&lt;p&gt;Quq: fixed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quq&#039;s guide for installing Alpine with Sway, for latitude 7370.&lt;br /&gt;
&lt;br /&gt;
Download Alpine Linux, verify checksum then&lt;br /&gt;
&lt;br /&gt;
  dd if=alpine-extended.iso of=/dev/sdb&lt;br /&gt;
&lt;br /&gt;
Known issues: screen sharing appears to be broken.&lt;br /&gt;
&lt;br /&gt;
More details forth-coming.&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;code&amp;gt;f12&amp;lt;/code&amp;gt; at boot to enter Setup, wipe disk under Maintenance&amp;gt;Data Wipe. Check Wipe on Next Boot check box. Exit.&lt;br /&gt;
&lt;br /&gt;
Plug in external storage device with alpine extended on it. Let it boot.&lt;br /&gt;
&lt;br /&gt;
Login as root.  There is no password.&lt;br /&gt;
&lt;br /&gt;
Set up internet connection&lt;br /&gt;
&lt;br /&gt;
  # -r is needed for starting the network after configuration&lt;br /&gt;
  setup-interfaces -r&lt;br /&gt;
&lt;br /&gt;
  Initialize: wlan0&lt;br /&gt;
  Enter SSID: my net&lt;br /&gt;
  Password, DHCP.&lt;br /&gt;
&lt;br /&gt;
Set up SSH server:&lt;br /&gt;
&lt;br /&gt;
   setup-sshd&lt;br /&gt;
   # example:&lt;br /&gt;
   ssh server:        openssh&lt;br /&gt;
   allow root:        &amp;quot;prohibit-password&amp;quot; or &amp;quot;yes&amp;quot;&lt;br /&gt;
   ssh key:           &amp;quot;none&amp;quot; or &amp;quot;&amp;lt;public key&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Configurations set here will be copied verbatim to the installed system.&lt;br /&gt;
&lt;br /&gt;
Set root password or /root/.ssh/authorized_keys.&lt;br /&gt;
Choose a strong root password, as it will be copied to the installed system. However, authorized_keys is not copied.&lt;br /&gt;
&lt;br /&gt;
Set up time:&lt;br /&gt;
&lt;br /&gt;
  setup-ntp chrony&lt;br /&gt;
&lt;br /&gt;
Set up repos:&lt;br /&gt;
&lt;br /&gt;
  setup-apkrepos -c&lt;br /&gt;
   # show mirror list, then select geographically nearest mirror&lt;br /&gt;
   # -c argument enables community repo&lt;br /&gt;
&lt;br /&gt;
Install encrypted:&lt;br /&gt;
&lt;br /&gt;
  setup-disk -v -e -m sys -k edge -s 0 /dev/sda&lt;br /&gt;
&lt;br /&gt;
Exit chroot and power off:&lt;br /&gt;
&lt;br /&gt;
  exit&lt;br /&gt;
  poweroff&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26419</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26419"/>
		<updated>2024-02-17T23:21:01Z</updated>

		<summary type="html">&lt;p&gt;Quq: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quq&#039;s guide for installing Alpine with Sway, for latitude 7370.&lt;br /&gt;
&lt;br /&gt;
Download Alpine Linux, verify checksum then&lt;br /&gt;
&lt;br /&gt;
  dd if=alpine-extended.iso of=/dev/sdb&lt;br /&gt;
&lt;br /&gt;
Known issues: screen sharing appears to be broken.&lt;br /&gt;
&lt;br /&gt;
More details forth-coming.&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;code&amp;gt;f12&amp;lt;/code&amp;gt; at boot to enter Setup, wipe disk under Maintenance&amp;gt;Data Wipe. Check Wipe on Next Boot check box. Exit.&lt;br /&gt;
&lt;br /&gt;
Plug in external storage device with alpine extended on it. Let it boot.&lt;br /&gt;
&lt;br /&gt;
Login as root.  There is no password.&lt;br /&gt;
&lt;br /&gt;
Set up internet connection&lt;br /&gt;
&lt;br /&gt;
  # -r is needed for starting the network after configuration&lt;br /&gt;
  setup-interfaces -r&lt;br /&gt;
&lt;br /&gt;
  Initialize: wlan0&lt;br /&gt;
  Enter SSID: my net&lt;br /&gt;
  Password, DHCP.&lt;br /&gt;
&lt;br /&gt;
Set up SSH server:&lt;br /&gt;
&lt;br /&gt;
   setup-sshd&lt;br /&gt;
   # example:&lt;br /&gt;
   ssh server:        openssh&lt;br /&gt;
   allow root:        &amp;quot;prohibit-password&amp;quot; or &amp;quot;yes&amp;quot;&lt;br /&gt;
   ssh key:           &amp;quot;none&amp;quot; or &amp;quot;&amp;lt;public key&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Configurations set here will be copied verbatim to the installed system.&lt;br /&gt;
&lt;br /&gt;
Set root password or /root/.ssh/authorized_keys.&lt;br /&gt;
Choose a strong root password, as it will be copied to the installed system. However, authorized_keys is not copied.&lt;br /&gt;
&lt;br /&gt;
Set up time:&lt;br /&gt;
&lt;br /&gt;
  setup-ntp chrony&lt;br /&gt;
&lt;br /&gt;
Set up repos:&lt;br /&gt;
&lt;br /&gt;
  setup-apkrepos -c&lt;br /&gt;
   # show mirror list, then select geographically nearest mirror&lt;br /&gt;
   # -c argument enables community repo&lt;br /&gt;
&lt;br /&gt;
Larger font for high res screen:&lt;br /&gt;
&lt;br /&gt;
  apk add terminus-font&lt;br /&gt;
&lt;br /&gt;
Partition the disk:&lt;br /&gt;
&lt;br /&gt;
  apk add parted cryptsetup e2fsprogs&lt;br /&gt;
  parted --script --align=optimal /dev/sda -- mklabel gpt mkpart EFI 1MiB 4GiB mkpart alpine 4GiB -1MiB set 1 esp on&lt;br /&gt;
  mkfs.vfat /dev/sda1&lt;br /&gt;
  cryptsetup luksFormat --type luks2 /dev/sda2&lt;br /&gt;
  cryptsetup luksOpen /dev/sda2 alpine-luks&lt;br /&gt;
  mkfs.ext4 /dev/mapper/alpine-luks&lt;br /&gt;
&lt;br /&gt;
Mount.&lt;br /&gt;
&lt;br /&gt;
  mount -t ext4 /dev/mapper/alpine-luks /mnt&lt;br /&gt;
  mkdir /mnt/boot&lt;br /&gt;
  mount -t vfat /dev/sda1 /mnt/boot&lt;br /&gt;
&lt;br /&gt;
Generate Unified Kernel Image as Bootloader&lt;br /&gt;
&lt;br /&gt;
  apk add secureboot-hook gummiboot-efistub efibootmgr&lt;br /&gt;
  apk add efi-mkkeys&lt;br /&gt;
&lt;br /&gt;
Install system:&lt;br /&gt;
&lt;br /&gt;
  BOOTLOADER=none setup-disk -m sys -k edge -s 0 /mnt&lt;br /&gt;
&lt;br /&gt;
Blkid:&lt;br /&gt;
&lt;br /&gt;
  ROOTUUID=$(blkid /dev/sda2 | sed &#039;s|.*UUID=&amp;quot;||&#039; | sed &#039;s|&amp;quot;.*||&#039;)&lt;br /&gt;
&lt;br /&gt;
Cmdline:&lt;br /&gt;
&lt;br /&gt;
  echo cmdline=\&amp;quot;root=/dev/mapper/alpine-luks cryptroot=UUID=$ROOTUUID  cryptdm=alpine-luks rootfstype=ext4 modules=sd-mod,usb-storage,ext4\&amp;quot; &amp;gt;&amp;gt; /mnt/etc/kernel-hooks.d/secureboot.conf&lt;br /&gt;
&lt;br /&gt;
Disable mkinitfs trigger:&lt;br /&gt;
&lt;br /&gt;
  echo &#039;disable_trigger=yes&#039; &amp;gt;&amp;gt; /mnt/etc/mkinitfs/mkinitfs.conf&lt;br /&gt;
&lt;br /&gt;
Enable cryptroot in mkinitfs:&lt;br /&gt;
&lt;br /&gt;
   sed -i &#039;s|ext4|ext4 cryptsetup|&#039; /mnt/etc/mkinitfs/mkinitfs.conf&lt;br /&gt;
&lt;br /&gt;
Chroot again:&lt;br /&gt;
&lt;br /&gt;
  chroot /mnt /bin/sh&lt;br /&gt;
&lt;br /&gt;
Create dummy efi keys:&lt;br /&gt;
&lt;br /&gt;
  efi-mkkeys -s &amp;quot;Your Name&amp;quot; -o /etc/uefi-keys&lt;br /&gt;
&lt;br /&gt;
Generate image:&lt;br /&gt;
&lt;br /&gt;
  apk fix kernel-hooks&lt;br /&gt;
&lt;br /&gt;
Exit chroot and power off:&lt;br /&gt;
&lt;br /&gt;
  exit&lt;br /&gt;
  poweroff&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26418</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26418"/>
		<updated>2024-02-17T22:42:21Z</updated>

		<summary type="html">&lt;p&gt;Quq: fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quq&#039;s guide for installing Alpine with Sway, for latitude 7370.&lt;br /&gt;
&lt;br /&gt;
Download Alpine Linux, verify checksum then&lt;br /&gt;
&lt;br /&gt;
  dd if=alpine-extended.iso of=/dev/sdb&lt;br /&gt;
&lt;br /&gt;
Known issues: screen sharing appears to be broken.&lt;br /&gt;
&lt;br /&gt;
More details forth-coming.&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;code&amp;gt;f12&amp;lt;/code&amp;gt; at boot to enter Setup, wipe disk under Maintenance&amp;gt;Data Wipe. Check Wipe on Next Boot check box. Exit.&lt;br /&gt;
&lt;br /&gt;
Plug in external storage device with alpine extended on it. Let it boot.&lt;br /&gt;
&lt;br /&gt;
Login as root.  There is no password.&lt;br /&gt;
&lt;br /&gt;
Set up internet connection&lt;br /&gt;
&lt;br /&gt;
  # -r is needed for starting the network after configuration&lt;br /&gt;
  setup-interfaces -r&lt;br /&gt;
&lt;br /&gt;
  Initialize: wlan0&lt;br /&gt;
  Enter SSID: my net&lt;br /&gt;
  Password, DHCP.&lt;br /&gt;
&lt;br /&gt;
Set up SSH server:&lt;br /&gt;
&lt;br /&gt;
   setup-sshd&lt;br /&gt;
   # example:&lt;br /&gt;
   ssh server:        openssh&lt;br /&gt;
   allow root:        &amp;quot;prohibit-password&amp;quot; or &amp;quot;yes&amp;quot;&lt;br /&gt;
   ssh key:           &amp;quot;none&amp;quot; or &amp;quot;&amp;lt;public key&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Configurations set here will be copied verbatim to the installed system.&lt;br /&gt;
&lt;br /&gt;
Set root password or /root/.ssh/authorized_keys.&lt;br /&gt;
Choose a strong root password, as it will be copied to the installed system. However, authorized_keys is not copied.&lt;br /&gt;
&lt;br /&gt;
Set up time:&lt;br /&gt;
&lt;br /&gt;
  setup-ntp chrony&lt;br /&gt;
&lt;br /&gt;
Set up repos:&lt;br /&gt;
&lt;br /&gt;
  setup-apkrepos -c&lt;br /&gt;
   # show mirror list, then select geographically nearest mirror&lt;br /&gt;
   # -c argument enables community repo&lt;br /&gt;
&lt;br /&gt;
Larger font for high res screen:&lt;br /&gt;
&lt;br /&gt;
  apk add terminus-font&lt;br /&gt;
&lt;br /&gt;
Partition the disk:&lt;br /&gt;
&lt;br /&gt;
  apk add parted cryptsetup e2fsprogs&lt;br /&gt;
  parted --script --align=optimal /dev/sda -- mklabel gpt mkpart EFI 1MiB 4GiB mkpart alpine 4GiB -1MiB set 1 esp on&lt;br /&gt;
  mkfs.vfat /dev/sda1&lt;br /&gt;
  cryptsetup luksFormat --type luks2 /dev/sda2&lt;br /&gt;
  cryptsetup luksOpen /dev/sda2 alpine-luks&lt;br /&gt;
  mkfs.ext4 /dev/mapper/alpine-luks&lt;br /&gt;
&lt;br /&gt;
Mount.&lt;br /&gt;
&lt;br /&gt;
  mount -t ext4 /dev/mapper/alpine-luks /mnt&lt;br /&gt;
  mkdir /mnt/boot&lt;br /&gt;
  mount -t vfat /dev/sda1 /mnt/boot&lt;br /&gt;
&lt;br /&gt;
Generate Unified Kernel Image as Bootloader&lt;br /&gt;
&lt;br /&gt;
  apk add secureboot-hook gummiboot-efistub efibootmgr&lt;br /&gt;
  apk add efi-mkkeys&lt;br /&gt;
&lt;br /&gt;
Install system:&lt;br /&gt;
&lt;br /&gt;
  BOOTLOADER=none setup-disk -m sys -k edge -s 0 /mnt&lt;br /&gt;
&lt;br /&gt;
Blkid:&lt;br /&gt;
&lt;br /&gt;
  ROOTUUID=$(blkid /dev/sda2 | sed &#039;s|.*UUID=&amp;quot;||&#039; | sed &#039;s|&amp;quot;.*||&#039;)&lt;br /&gt;
&lt;br /&gt;
Cmdline:&lt;br /&gt;
&lt;br /&gt;
  echo cmdline=\&amp;quot;root=/dev/mapper/alpine-luks cryptroot=UUID=$ROOTUUID  cryptdm=alpine-luks rootfstype=ext4 modules=sd-mod,usb-storage,ext4\&amp;quot; &amp;gt;&amp;gt; /mnt/etc/kernel-hooks.d/secureboot.conf&lt;br /&gt;
&lt;br /&gt;
Disable mkinitfs trigger:&lt;br /&gt;
&lt;br /&gt;
  echo &#039;disable_trigger=yes&#039; &amp;gt;&amp;gt; /mnt/etc/mkinitfs/mkinitfs.conf&lt;br /&gt;
&lt;br /&gt;
Enable cryptroot in mkinitfs:&lt;br /&gt;
&lt;br /&gt;
   sed -i &#039;s|nvme|nvme cryptsetup|&#039; /mnt/etc/mkinitfs/mkinitfs.conf&lt;br /&gt;
&lt;br /&gt;
Chroot again:&lt;br /&gt;
&lt;br /&gt;
  chroot /mnt /bin/sh&lt;br /&gt;
&lt;br /&gt;
Create dummy efi keys:&lt;br /&gt;
&lt;br /&gt;
  efi-mkkeys -s &amp;quot;Your Name&amp;quot; -o /etc/uefi-keys&lt;br /&gt;
&lt;br /&gt;
Generate image:&lt;br /&gt;
&lt;br /&gt;
  apk fix kernel-hooks&lt;br /&gt;
&lt;br /&gt;
Exit chroot and power off:&lt;br /&gt;
&lt;br /&gt;
  exit&lt;br /&gt;
  poweroff&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26417</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26417"/>
		<updated>2024-02-17T22:37:16Z</updated>

		<summary type="html">&lt;p&gt;Quq: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quq&#039;s guide for installing Alpine with Sway, for latitude 7370.&lt;br /&gt;
&lt;br /&gt;
Download Alpine Linux, verify checksum then&lt;br /&gt;
&lt;br /&gt;
  dd if=alpine-extended.iso of=/dev/sdb&lt;br /&gt;
&lt;br /&gt;
Known issues: screen sharing appears to be broken.&lt;br /&gt;
&lt;br /&gt;
More details forth-coming.&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;code&amp;gt;f12&amp;lt;/code&amp;gt; at boot to enter Setup, wipe disk under Maintenance&amp;gt;Data Wipe. Check Wipe on Next Boot check box. Exit.&lt;br /&gt;
&lt;br /&gt;
Plug in external storage device with alpine extended on it. Let it boot.&lt;br /&gt;
&lt;br /&gt;
Login as root.  There is no password.&lt;br /&gt;
&lt;br /&gt;
Set up internet connection&lt;br /&gt;
&lt;br /&gt;
  # -r is needed for starting the network after configuration&lt;br /&gt;
  setup-interfaces -r&lt;br /&gt;
&lt;br /&gt;
  Initialize: wlan0&lt;br /&gt;
  Enter SSID: my net&lt;br /&gt;
  Password, DHCP.&lt;br /&gt;
&lt;br /&gt;
Set up SSH server:&lt;br /&gt;
&lt;br /&gt;
   setup-sshd&lt;br /&gt;
   # example:&lt;br /&gt;
   ssh server:        openssh&lt;br /&gt;
   allow root:        &amp;quot;prohibit-password&amp;quot; or &amp;quot;yes&amp;quot;&lt;br /&gt;
   ssh key:           &amp;quot;none&amp;quot; or &amp;quot;&amp;lt;public key&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Configurations set here will be copied verbatim to the installed system.&lt;br /&gt;
&lt;br /&gt;
Set root password or /root/.ssh/authorized_keys.&lt;br /&gt;
Choose a strong root password, as it will be copied to the installed system. However, authorized_keys is not copied.&lt;br /&gt;
&lt;br /&gt;
Set up time:&lt;br /&gt;
&lt;br /&gt;
  setup-ntp chrony&lt;br /&gt;
&lt;br /&gt;
Set up repos:&lt;br /&gt;
&lt;br /&gt;
  setup-apkrepos -c&lt;br /&gt;
   # show mirror list, then select geographically nearest mirror&lt;br /&gt;
   # -c argument enables community repo&lt;br /&gt;
&lt;br /&gt;
Larger font for high res screen:&lt;br /&gt;
&lt;br /&gt;
  apk add terminus-font&lt;br /&gt;
&lt;br /&gt;
Partition the disk:&lt;br /&gt;
&lt;br /&gt;
  apk add parted cryptsetup e2fsprogs&lt;br /&gt;
  parted --script --align=optimal /dev/sda -- mklabel gpt mkpart EFI 1MiB 4GiB mkpart alpine 4GiB -1MiB set 1 esp on&lt;br /&gt;
  mkfs.vfat /dev/sda1&lt;br /&gt;
  cryptsetup luksFormat --type luks2 /dev/sda2&lt;br /&gt;
  cryptsetup luksOpen /dev/sda2 alpine-luks&lt;br /&gt;
  mkfs.ext4 /dev/mapper/alpine-luks&lt;br /&gt;
&lt;br /&gt;
Mount.&lt;br /&gt;
&lt;br /&gt;
  mount -t ext4 /dev/mapper/alpine-luks /mnt&lt;br /&gt;
  mkdir /mnt/boot&lt;br /&gt;
  mount -t vfat /dev/sda1 /mnt/boot&lt;br /&gt;
&lt;br /&gt;
Generate Unified Kernel Image as Bootloader&lt;br /&gt;
&lt;br /&gt;
  apk add secureboot-hook gummiboot-efistub efibootmgr&lt;br /&gt;
  apk add efi-mkkeys&lt;br /&gt;
&lt;br /&gt;
Install system:&lt;br /&gt;
&lt;br /&gt;
  BOOTLOADER=none setup-disk -m sys -k edge -s 0 /mnt&lt;br /&gt;
&lt;br /&gt;
Blkid:&lt;br /&gt;
&lt;br /&gt;
  ROOTUUID=$(blkid /dev/sda2 | sed &#039;s|.*UUID=&amp;quot;||&#039; | sed &#039;s|&amp;quot;.*||&#039;)&lt;br /&gt;
  CRPTUUID=$(blkid /dev/mapper/alpine-luks | sed &#039;s|.*UUID=&amp;quot;||&#039; | sed &#039;s|&amp;quot;.*||&#039;)&lt;br /&gt;
&lt;br /&gt;
Cmdline:&lt;br /&gt;
&lt;br /&gt;
  echo cmdline=\&amp;quot;root=UUID=$CRPTUUID cryptroot=UUID=$ROOTUUID  cryptdm=root rootfstype=ext4 modules=sd-mod,usb-storage,ext4\&amp;quot; &amp;gt;&amp;gt; /mnt/etc/kernel-hooks.d/secureboot.conf&lt;br /&gt;
&lt;br /&gt;
Disable mkinitfs trigger:&lt;br /&gt;
&lt;br /&gt;
  echo &#039;disable_trigger=yes&#039; &amp;gt;&amp;gt; /mnt/etc/mkinitfs/mkinitfs.conf&lt;br /&gt;
&lt;br /&gt;
Enable cryptroot in mkinitfs:&lt;br /&gt;
&lt;br /&gt;
   sed -i &#039;s|nvme|nvme cryptsetup|&#039; /mnt/etc/mkinitfs/mkinitfs.conf&lt;br /&gt;
&lt;br /&gt;
Chroot again:&lt;br /&gt;
&lt;br /&gt;
  chroot /mnt /bin/sh&lt;br /&gt;
&lt;br /&gt;
Create dummy efi keys:&lt;br /&gt;
&lt;br /&gt;
  efi-mkkeys -s &amp;quot;Your Name&amp;quot; -o /etc/uefi-keys&lt;br /&gt;
&lt;br /&gt;
Generate image:&lt;br /&gt;
&lt;br /&gt;
  apk fix kernel-hooks&lt;br /&gt;
&lt;br /&gt;
Exit chroot and power off:&lt;br /&gt;
&lt;br /&gt;
  exit&lt;br /&gt;
  poweroff&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26416</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26416"/>
		<updated>2024-02-17T21:54:03Z</updated>

		<summary type="html">&lt;p&gt;Quq: fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quq&#039;s guide for installing Alpine with Sway, for latitude 7370.&lt;br /&gt;
&lt;br /&gt;
Download Alpine Linux, verify checksum then&lt;br /&gt;
&lt;br /&gt;
  dd if=alpine-extended.iso of=/dev/sdb&lt;br /&gt;
&lt;br /&gt;
Known issues: screen sharing appears to be broken.&lt;br /&gt;
&lt;br /&gt;
More details forth-coming.&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;code&amp;gt;f12&amp;lt;/code&amp;gt; at boot to enter Setup, wipe disk under Maintenance&amp;gt;Data Wipe. Check Wipe on Next Boot check box. Exit.&lt;br /&gt;
&lt;br /&gt;
Plug in external storage device with alpine extended on it. Let it boot.&lt;br /&gt;
&lt;br /&gt;
Login as root.  There is no password.&lt;br /&gt;
&lt;br /&gt;
Set up internet connection&lt;br /&gt;
&lt;br /&gt;
  # -r is needed for starting the network after configuration&lt;br /&gt;
  setup-interfaces -r&lt;br /&gt;
&lt;br /&gt;
  Initialize: wlan0&lt;br /&gt;
  Enter SSID: my net&lt;br /&gt;
  Password, DHCP.&lt;br /&gt;
&lt;br /&gt;
Set up SSH server:&lt;br /&gt;
&lt;br /&gt;
   setup-sshd&lt;br /&gt;
   # example:&lt;br /&gt;
   ssh server:        openssh&lt;br /&gt;
   allow root:        &amp;quot;prohibit-password&amp;quot; or &amp;quot;yes&amp;quot;&lt;br /&gt;
   ssh key:           &amp;quot;none&amp;quot; or &amp;quot;&amp;lt;public key&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Configurations set here will be copied verbatim to the installed system.&lt;br /&gt;
&lt;br /&gt;
Set root password or /root/.ssh/authorized_keys.&lt;br /&gt;
Choose a strong root password, as it will be copied to the installed system. However, authorized_keys is not copied.&lt;br /&gt;
&lt;br /&gt;
Set up time:&lt;br /&gt;
&lt;br /&gt;
  setup-ntp chrony&lt;br /&gt;
&lt;br /&gt;
Set up repos:&lt;br /&gt;
&lt;br /&gt;
  setup-apkrepos -c&lt;br /&gt;
   # show mirror list, then select geographically nearest mirror&lt;br /&gt;
   # -c argument enables community repo&lt;br /&gt;
&lt;br /&gt;
Larger font for high res screen:&lt;br /&gt;
&lt;br /&gt;
  apk add terminus-font&lt;br /&gt;
&lt;br /&gt;
Partition the disk:&lt;br /&gt;
&lt;br /&gt;
  apk add parted cryptsetup e2fsprogs&lt;br /&gt;
  parted --script --align=optimal /dev/sda -- mklabel gpt mkpart EFI 1MiB 4GiB mkpart alpine 4GiB -1MiB set 1 esp on&lt;br /&gt;
  mkfs.vfat /dev/sda1&lt;br /&gt;
  cryptsetup luksFormat --type luks2 /dev/sda2&lt;br /&gt;
  cryptsetup luksOpen /dev/sda2 alpine-luks&lt;br /&gt;
  mkfs.ext4 /dev/mapper/alpine-luks&lt;br /&gt;
&lt;br /&gt;
Mount.&lt;br /&gt;
&lt;br /&gt;
  mount -t ext4 /dev/mapper/alpine-luks /mnt&lt;br /&gt;
  mkdir /mnt/boot&lt;br /&gt;
  mount -t vfat /dev/sda1 /mnt/boot&lt;br /&gt;
&lt;br /&gt;
Generate Unified Kernel Image as Bootloader&lt;br /&gt;
&lt;br /&gt;
  apk add secureboot-hook gummiboot-efistub efibootmgr&lt;br /&gt;
  apk add efi-mkkeys&lt;br /&gt;
&lt;br /&gt;
Install system:&lt;br /&gt;
&lt;br /&gt;
  BOOTLOADER=none setup-disk -m sys -k edge -s 0 /mnt&lt;br /&gt;
&lt;br /&gt;
Blkid:&lt;br /&gt;
&lt;br /&gt;
  BLKUUID=$(blkid /dev/sda2 | sed &#039;s|.*UUID=&amp;quot;||&#039; | sed &#039;s|&amp;quot;.*||&#039;)&lt;br /&gt;
&lt;br /&gt;
Cmdline:&lt;br /&gt;
&lt;br /&gt;
  echo cmdline=\&amp;quot;cryptroot=UUID=$BLKUUID  cryptdm=root rootfstype=ext4 modules=ext4\&amp;quot; &amp;gt;&amp;gt; /mnt/etc/kernel-hooks.d/secureboot.conf&lt;br /&gt;
&lt;br /&gt;
Disable mkinitfs trigger:&lt;br /&gt;
&lt;br /&gt;
  echo &#039;disable_trigger=yes&#039; &amp;gt;&amp;gt; /mnt/etc/mkinitfs/mkinitfs.conf&lt;br /&gt;
&lt;br /&gt;
Enable cryptroot in mkinitfs:&lt;br /&gt;
&lt;br /&gt;
   sed -i &#039;s|nvme|nvme cryptsetup|&#039; /mnt/etc/mkinitfs/mkinitfs.conf&lt;br /&gt;
&lt;br /&gt;
Chroot again:&lt;br /&gt;
&lt;br /&gt;
  chroot /mnt /bin/sh&lt;br /&gt;
&lt;br /&gt;
Create dummy efi keys:&lt;br /&gt;
&lt;br /&gt;
  efi-mkkeys -s &amp;quot;Your Name&amp;quot; -o /etc/uefi-keys&lt;br /&gt;
&lt;br /&gt;
Generate image:&lt;br /&gt;
&lt;br /&gt;
  apk fix kernel-hooks&lt;br /&gt;
&lt;br /&gt;
Exit chroot and power off:&lt;br /&gt;
&lt;br /&gt;
  exit&lt;br /&gt;
  poweroff&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26415</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26415"/>
		<updated>2024-02-17T21:44:48Z</updated>

		<summary type="html">&lt;p&gt;Quq: fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quq&#039;s guide for installing Alpine with Sway, for latitude 7370.&lt;br /&gt;
&lt;br /&gt;
Download Alpine Linux, verify checksum then&lt;br /&gt;
&lt;br /&gt;
  dd if=alpine-extended.iso of=/dev/sdb&lt;br /&gt;
&lt;br /&gt;
Known issues: screen sharing appears to be broken.&lt;br /&gt;
&lt;br /&gt;
More details forth-coming.&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;code&amp;gt;f12&amp;lt;/code&amp;gt; at boot to enter Setup, wipe disk under Maintenance&amp;gt;Data Wipe. Check Wipe on Next Boot check box. Exit.&lt;br /&gt;
&lt;br /&gt;
Plug in external storage device with alpine extended on it. Let it boot.&lt;br /&gt;
&lt;br /&gt;
Login as root.  There is no password.&lt;br /&gt;
&lt;br /&gt;
Set up internet connection&lt;br /&gt;
&lt;br /&gt;
  # -r is needed for starting the network after configuration&lt;br /&gt;
  setup-interfaces -r&lt;br /&gt;
&lt;br /&gt;
  Initialize: wlan0&lt;br /&gt;
  Enter SSID: my net&lt;br /&gt;
  Password, DHCP.&lt;br /&gt;
&lt;br /&gt;
Set up SSH server:&lt;br /&gt;
&lt;br /&gt;
   setup-sshd&lt;br /&gt;
   # example:&lt;br /&gt;
   ssh server:        openssh&lt;br /&gt;
   allow root:        &amp;quot;prohibit-password&amp;quot; or &amp;quot;yes&amp;quot;&lt;br /&gt;
   ssh key:           &amp;quot;none&amp;quot; or &amp;quot;&amp;lt;public key&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Configurations set here will be copied verbatim to the installed system.&lt;br /&gt;
&lt;br /&gt;
Set root password or /root/.ssh/authorized_keys.&lt;br /&gt;
Choose a strong root password, as it will be copied to the installed system. However, authorized_keys is not copied.&lt;br /&gt;
&lt;br /&gt;
Set up time:&lt;br /&gt;
&lt;br /&gt;
  setup-ntp chrony&lt;br /&gt;
&lt;br /&gt;
Set up repos:&lt;br /&gt;
&lt;br /&gt;
  setup-apkrepos-c&lt;br /&gt;
   # show mirror list, then select geographically nearest mirror&lt;br /&gt;
   # -c argument enables community repo&lt;br /&gt;
&lt;br /&gt;
Larger font for high res screen:&lt;br /&gt;
&lt;br /&gt;
  apk add terminus-font&lt;br /&gt;
  setfont /usr/share/consolefonts/ter-132n.psf.gz&lt;br /&gt;
&lt;br /&gt;
Partition the disk:&lt;br /&gt;
&lt;br /&gt;
  apk add parted cryptsetup e2fsprogs&lt;br /&gt;
  parted --script --align=optimal /dev/sda -- mklabel gpt mkpart EFI 1MiB 4GiB mkpart alpine 4GiB -1MiB set 1 esp on&lt;br /&gt;
  mkfs.vfat /dev/sda1&lt;br /&gt;
  cryptsetup luksFormat /dev/sda2&lt;br /&gt;
  cryptsetup luksOpen /dev/sda2 alpine-luks&lt;br /&gt;
  mkfs.ext4 /dev/mapper/alpine-luks&lt;br /&gt;
&lt;br /&gt;
Mount.&lt;br /&gt;
&lt;br /&gt;
  mount -t ext4 /dev/mapper/alpine-luks /mnt&lt;br /&gt;
  mkdir /mnt/boot&lt;br /&gt;
  mount -t vfat /dev/sda1 /mnt/boot&lt;br /&gt;
&lt;br /&gt;
Install system:&lt;br /&gt;
&lt;br /&gt;
  BOOTLOADER=none setup-disk -m sys -k edge -s 0 /mnt&lt;br /&gt;
&lt;br /&gt;
Chroot:&lt;br /&gt;
&lt;br /&gt;
  chroot /mnt /bin/sh&lt;br /&gt;
&lt;br /&gt;
Generate Unified Kernel Image as Bootloader&lt;br /&gt;
&lt;br /&gt;
  apk add secureboot-hook gummiboot-efistub efibootmgr&lt;br /&gt;
&lt;br /&gt;
Exit chroot:&lt;br /&gt;
&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
Blkid:&lt;br /&gt;
&lt;br /&gt;
  BLKUUID=$(blkid /dev/sda2 | sed &#039;s|.*UUID=&amp;quot;||&#039; | sed &#039;s|&amp;quot;.*||&#039;)&lt;br /&gt;
&lt;br /&gt;
Cmdline:&lt;br /&gt;
&lt;br /&gt;
  echo cmdline=\&amp;quot;cryptroot=UUID=$BLKUUID  cryptdm=root rootfstype=ext4 modules=ext4\&amp;quot; &amp;gt;&amp;gt; /mnt/etc/kernel-hooks.d/secureboot.conf&lt;br /&gt;
&lt;br /&gt;
Disable mkinitfs trigger:&lt;br /&gt;
&lt;br /&gt;
  echo &#039;disable_trigger=yes&#039; &amp;gt;&amp;gt; /mnt/etc/mkinitfs/mkinitfs.conf&lt;br /&gt;
&lt;br /&gt;
Enable cryptroot in mkinitfs:&lt;br /&gt;
&lt;br /&gt;
   sed -i &#039;s|nvme|nvme cryptsetup|&#039; /mnt/etc/mkinitfs/mkinitfs.conf&lt;br /&gt;
&lt;br /&gt;
Chroot again:&lt;br /&gt;
&lt;br /&gt;
  chroot /mnt /bin/sh&lt;br /&gt;
&lt;br /&gt;
Create dummy efi keys:&lt;br /&gt;
&lt;br /&gt;
  apk add efi-mkkeys&lt;br /&gt;
  efi-mkkeys -s &amp;quot;Your Name&amp;quot; -o /etc/uefi-keys&lt;br /&gt;
&lt;br /&gt;
Generate image:&lt;br /&gt;
&lt;br /&gt;
  apk fix kernel-hooks&lt;br /&gt;
&lt;br /&gt;
Exit chroot and power off:&lt;br /&gt;
&lt;br /&gt;
  exit&lt;br /&gt;
  poweroff&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26414</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26414"/>
		<updated>2024-02-17T21:44:14Z</updated>

		<summary type="html">&lt;p&gt;Quq: ssh server stuff&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quq&#039;s guide for installing Alpine with Sway, for latitude 7370.&lt;br /&gt;
&lt;br /&gt;
Download Alpine Linux, verify checksum then&lt;br /&gt;
&lt;br /&gt;
  dd if=alpine-extended.iso of=/dev/sdb&lt;br /&gt;
&lt;br /&gt;
Known issues: screen sharing appears to be broken.&lt;br /&gt;
&lt;br /&gt;
More details forth-coming.&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;code&amp;gt;f12&amp;lt;/code&amp;gt; at boot to enter Setup, wipe disk under Maintenance&amp;gt;Data Wipe. Check Wipe on Next Boot check box. Exit.&lt;br /&gt;
&lt;br /&gt;
Plug in external storage device with alpine extended on it. Let it boot.&lt;br /&gt;
&lt;br /&gt;
Login as root.  There is no password.&lt;br /&gt;
&lt;br /&gt;
Set up internet connection&lt;br /&gt;
&lt;br /&gt;
  # -r is needed for starting the network after configuration&lt;br /&gt;
  setup-interfaces -r&lt;br /&gt;
&lt;br /&gt;
  Initialize: wlan0&lt;br /&gt;
  Enter SSID: my net&lt;br /&gt;
  Password, DHCP.&lt;br /&gt;
&lt;br /&gt;
Set up SSH server:&lt;br /&gt;
&lt;br /&gt;
   setup-sshd&lt;br /&gt;
   # example:&lt;br /&gt;
   ssh server:        openssh&lt;br /&gt;
   allow root:        &amp;quot;prohibit-password&amp;quot; or &amp;quot;yes&amp;quot;&lt;br /&gt;
   ssh key:           &amp;quot;none&amp;quot; or &amp;quot;&amp;lt;public key&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Configurations set here will be copied verbatim to the installed system.&lt;br /&gt;
&lt;br /&gt;
Set root password or /root/.ssh/authorized_keys.&lt;br /&gt;
Choose a strong root password, as it will be copied to the installed system. However, authorized_keys is not copied.&lt;br /&gt;
&lt;br /&gt;
Set up time:&lt;br /&gt;
&lt;br /&gt;
  setup-ntp chrony&lt;br /&gt;
&lt;br /&gt;
Set up repos:&lt;br /&gt;
&lt;br /&gt;
  setup-apkrepos-c&lt;br /&gt;
   # show mirror list, then select geographically nearest mirror&lt;br /&gt;
   # -c argument enables community repo&lt;br /&gt;
&lt;br /&gt;
Larger font for high res screen:&lt;br /&gt;
&lt;br /&gt;
  apk add terminus-font&lt;br /&gt;
  setfont /usr/share/consolefonts/ter-132n.psf.gz&lt;br /&gt;
&lt;br /&gt;
Partition the disk:&lt;br /&gt;
&lt;br /&gt;
  apk add parted cryptsetup e2fsprogs&lt;br /&gt;
  parted --script --align=optimal /dev/sda -- mklabel gpt mkpart EFI 1MiB 4GiB mkpart alpine 4GiB -1MiB set 1 esp on&lt;br /&gt;
  mkfs.vfat /dev/sda1&lt;br /&gt;
  cryptsetup luksFormat /dev/sda2&lt;br /&gt;
  cryptsetup luksOpen /dev/sda2 alpine-luks&lt;br /&gt;
  mkfs.ext4 /dev/mapper/alpine-luks&lt;br /&gt;
&lt;br /&gt;
Mount.&lt;br /&gt;
&lt;br /&gt;
  mount -t ext4 /dev/mapper/alpine-luks /mnt&lt;br /&gt;
  mkdir /mnt/boot&lt;br /&gt;
  mount -t vfat /dev/sda1 /mnt/boot&lt;br /&gt;
&lt;br /&gt;
Install system:&lt;br /&gt;
&lt;br /&gt;
  BOOTLOADER=none setup-disk -m sys -k edge -s 0 /mnt&lt;br /&gt;
&lt;br /&gt;
Chroot:&lt;br /&gt;
&lt;br /&gt;
  chroot /mnt /bin/sh&lt;br /&gt;
&lt;br /&gt;
Generate Unified Kernel Image as Bootloader&lt;br /&gt;
&lt;br /&gt;
  apk add secureboot-hook gummiboot-efistub efibootmgr&lt;br /&gt;
&lt;br /&gt;
Exit chroot:&lt;br /&gt;
&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
Blkid:&lt;br /&gt;
&lt;br /&gt;
  BLKUUID=$(blkid /dev/sda2 | sed &#039;s|.*UUID=&amp;quot;||&#039; | sed &#039;s|&amp;quot;.*||&#039;)&lt;br /&gt;
&lt;br /&gt;
Cmdline:&lt;br /&gt;
&lt;br /&gt;
  echo cmdline=\&amp;quot;cryptroot=UUID=$BLKUUID  cryptdm=root rootfstype=ext4 modules=ext4\&amp;quot; &amp;gt;&amp;gt; /mnt/etc/kernel-hooks.d/secureboot.conf&lt;br /&gt;
&lt;br /&gt;
Disable mkinitfs trigger:&lt;br /&gt;
&lt;br /&gt;
  echo &#039;disable_trigger=yes&#039; &amp;gt;&amp;gt; /mnt/etc/mkinitfs/mkinitfs.conf&lt;br /&gt;
&lt;br /&gt;
Enable cryptroot in mkinitfs:&lt;br /&gt;
&lt;br /&gt;
   sed -i &#039;s|nvme|nvme cryptsetup|&#039; /mnt/etc/mkinitfs/mkinitfs.conf&lt;br /&gt;
&lt;br /&gt;
Chroot again:&lt;br /&gt;
&lt;br /&gt;
  chroot /mnt /bin/sh&lt;br /&gt;
&lt;br /&gt;
Create dummy efi keys:&lt;br /&gt;
&lt;br /&gt;
  apk add efi-mkkeys&lt;br /&gt;
  efi-mkkeys -s &amp;quot;Your Name&amp;quot; -o /etc/uefi-keys&lt;br /&gt;
&lt;br /&gt;
Generate image:&lt;br /&gt;
&lt;br /&gt;
  apk fix kernel-hooks&lt;br /&gt;
&lt;br /&gt;
Set root password:&lt;br /&gt;
&lt;br /&gt;
  passwd&lt;br /&gt;
&lt;br /&gt;
Exit chroot and power off:&lt;br /&gt;
&lt;br /&gt;
  exit&lt;br /&gt;
  poweroff&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26413</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26413"/>
		<updated>2024-02-17T21:41:04Z</updated>

		<summary type="html">&lt;p&gt;Quq: fixes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quq&#039;s guide for installing Alpine with Sway, for latitude 7370.&lt;br /&gt;
&lt;br /&gt;
Download Alpine Linux, verify checksum then&lt;br /&gt;
&lt;br /&gt;
  dd if=alpine-extended.iso of=/dev/sdb&lt;br /&gt;
&lt;br /&gt;
Known issues: screen sharing appears to be broken.&lt;br /&gt;
&lt;br /&gt;
More details forth-coming.&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;code&amp;gt;f12&amp;lt;/code&amp;gt; at boot to enter Setup, wipe disk under Maintenance&amp;gt;Data Wipe. Check Wipe on Next Boot check box. Exit.&lt;br /&gt;
&lt;br /&gt;
Plug in external storage device with alpine extended on it. Let it boot.&lt;br /&gt;
&lt;br /&gt;
Login as root.  There is no password.&lt;br /&gt;
&lt;br /&gt;
Set up internet connection&lt;br /&gt;
&lt;br /&gt;
  # -r is needed for starting the network after configuration&lt;br /&gt;
  setup-interfaces -r&lt;br /&gt;
&lt;br /&gt;
  Initialize: wlan0&lt;br /&gt;
  Enter SSID: my net&lt;br /&gt;
  Password, DHCP.&lt;br /&gt;
&lt;br /&gt;
Set up time:&lt;br /&gt;
&lt;br /&gt;
  setup-ntp chrony&lt;br /&gt;
&lt;br /&gt;
Set up repos:&lt;br /&gt;
&lt;br /&gt;
  setup-apkrepos-c&lt;br /&gt;
   # show mirror list, then select geographically nearest mirror&lt;br /&gt;
   # -c argument enables community repo&lt;br /&gt;
&lt;br /&gt;
Larger font for high res screen:&lt;br /&gt;
&lt;br /&gt;
  apk add terminus-font&lt;br /&gt;
  setfont /usr/share/consolefonts/ter-132n.psf.gz&lt;br /&gt;
&lt;br /&gt;
Partition the disk:&lt;br /&gt;
&lt;br /&gt;
  apk add parted cryptsetup e2fsprogs&lt;br /&gt;
  parted --script --align=optimal /dev/sda -- mklabel gpt mkpart EFI 1MiB 4GiB mkpart alpine 4GiB -1MiB set 1 esp on&lt;br /&gt;
  mkfs.vfat /dev/sda1&lt;br /&gt;
  cryptsetup luksFormat /dev/sda2&lt;br /&gt;
  cryptsetup luksOpen /dev/sda2 alpine-luks&lt;br /&gt;
  mkfs.ext4 /dev/mapper/alpine-luks&lt;br /&gt;
&lt;br /&gt;
Mount.&lt;br /&gt;
&lt;br /&gt;
  mount -t ext4 /dev/mapper/alpine-luks /mnt&lt;br /&gt;
  mkdir /mnt/boot&lt;br /&gt;
  mount -t vfat /dev/sda1 /mnt/boot&lt;br /&gt;
&lt;br /&gt;
Install system:&lt;br /&gt;
&lt;br /&gt;
  BOOTLOADER=none setup-disk -m sys -k edge -s 0 /mnt&lt;br /&gt;
&lt;br /&gt;
Chroot:&lt;br /&gt;
&lt;br /&gt;
  chroot /mnt /bin/sh&lt;br /&gt;
&lt;br /&gt;
Generate Unified Kernel Image as Bootloader&lt;br /&gt;
&lt;br /&gt;
  apk add secureboot-hook gummiboot-efistub efibootmgr&lt;br /&gt;
&lt;br /&gt;
Exit chroot:&lt;br /&gt;
&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
Blkid:&lt;br /&gt;
&lt;br /&gt;
  BLKUUID=$(blkid /dev/sda2 | sed &#039;s|.*UUID=&amp;quot;||&#039; | sed &#039;s|&amp;quot;.*||&#039;)&lt;br /&gt;
&lt;br /&gt;
Cmdline:&lt;br /&gt;
&lt;br /&gt;
  echo cmdline=\&amp;quot;cryptroot=UUID=$BLKUUID  cryptdm=root rootfstype=ext4 modules=ext4\&amp;quot; &amp;gt;&amp;gt; /mnt/etc/kernel-hooks.d/secureboot.conf&lt;br /&gt;
&lt;br /&gt;
Disable mkinitfs trigger:&lt;br /&gt;
&lt;br /&gt;
  echo &#039;disable_trigger=yes&#039; &amp;gt;&amp;gt; /mnt/etc/mkinitfs/mkinitfs.conf&lt;br /&gt;
&lt;br /&gt;
Enable cryptroot in mkinitfs:&lt;br /&gt;
&lt;br /&gt;
   sed -i &#039;s|nvme|nvme cryptsetup|&#039; /mnt/etc/mkinitfs/mkinitfs.conf&lt;br /&gt;
&lt;br /&gt;
Chroot again:&lt;br /&gt;
&lt;br /&gt;
  chroot /mnt /bin/sh&lt;br /&gt;
&lt;br /&gt;
Create dummy efi keys:&lt;br /&gt;
&lt;br /&gt;
  apk add efi-mkkeys&lt;br /&gt;
  efi-mkkeys -s &amp;quot;Your Name&amp;quot; -o /etc/uefi-keys&lt;br /&gt;
&lt;br /&gt;
Generate image:&lt;br /&gt;
&lt;br /&gt;
  apk fix kernel-hooks&lt;br /&gt;
&lt;br /&gt;
Set root password:&lt;br /&gt;
&lt;br /&gt;
  passwd&lt;br /&gt;
&lt;br /&gt;
Exit chroot and power off:&lt;br /&gt;
&lt;br /&gt;
  exit&lt;br /&gt;
  poweroff&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26412</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26412"/>
		<updated>2024-02-17T21:36:24Z</updated>

		<summary type="html">&lt;p&gt;Quq: save&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quq&#039;s guide for installing Alpine with Sway, for latitude 7370.&lt;br /&gt;
&lt;br /&gt;
Download Alpine Linux, verify checksum then&lt;br /&gt;
&lt;br /&gt;
  dd if=alpine-extended.iso of=/dev/sdb&lt;br /&gt;
&lt;br /&gt;
Known issues: screen sharing appears to be broken.&lt;br /&gt;
&lt;br /&gt;
More details forth-coming.&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;code&amp;gt;f12&amp;lt;/code&amp;gt; at boot to enter Setup, wipe disk under Maintenance&amp;gt;Data Wipe. Check Wipe on Next Boot check box. Exit.&lt;br /&gt;
&lt;br /&gt;
Plug in external storage device with alpine extended on it. Let it boot.&lt;br /&gt;
&lt;br /&gt;
Login as root.  There is no password.&lt;br /&gt;
&lt;br /&gt;
Set up internet connection&lt;br /&gt;
&lt;br /&gt;
  # -r is needed for starting the network after configuration&lt;br /&gt;
  setup-interfaces -r&lt;br /&gt;
&lt;br /&gt;
  Initialize: wlan0&lt;br /&gt;
  Enter SSID: my net&lt;br /&gt;
  Password, DHCP.&lt;br /&gt;
&lt;br /&gt;
Set up time:&lt;br /&gt;
&lt;br /&gt;
  setup-ntp chrony&lt;br /&gt;
&lt;br /&gt;
Set up repos:&lt;br /&gt;
&lt;br /&gt;
  setup-apkrepos-c&lt;br /&gt;
   # show mirror list, then select geographically nearest mirror&lt;br /&gt;
   # -c argument enables community repo&lt;br /&gt;
&lt;br /&gt;
Larger font for high res screen:&lt;br /&gt;
&lt;br /&gt;
  apk add terminus-font&lt;br /&gt;
  setfont /usr/share/consolefonts/ter-132n.psf.gz&lt;br /&gt;
&lt;br /&gt;
Partition the disk:&lt;br /&gt;
&lt;br /&gt;
  apk add parted cryptsetup e2fsprogs&lt;br /&gt;
  parted --script --align=optimal /dev/sda -- mklabel gpt mkpart EFI 1MiB 4GiB mkpart alpine 4GiB -1MiB set 1 esp on&lt;br /&gt;
  mkfs.vfat /dev/sda1&lt;br /&gt;
  cryptsetup luksFormat /dev/sda2&lt;br /&gt;
  cryptsetup luksOpen /dev/sda2 alpine-luks&lt;br /&gt;
  mkfs.ext4 /dev/mapper/alpine-luks&lt;br /&gt;
&lt;br /&gt;
Mount.&lt;br /&gt;
&lt;br /&gt;
  mount -t ext4 /dev/mapper/alpine-luks /mnt&lt;br /&gt;
  mkdir /mnt/boot&lt;br /&gt;
  mount -t vfat /dev/sda1 /mnt/boot&lt;br /&gt;
&lt;br /&gt;
Install system:&lt;br /&gt;
&lt;br /&gt;
  BOOTLOADER=none setup-disk -m sys -k edge -s 0 /mnt&lt;br /&gt;
&lt;br /&gt;
Chroot:&lt;br /&gt;
&lt;br /&gt;
  chroot /mnt /bin/sh&lt;br /&gt;
&lt;br /&gt;
Generate Unified Kernel Image as Bootloader&lt;br /&gt;
&lt;br /&gt;
  apk add secureboot-hook gummiboot-efistub efibootmgr&lt;br /&gt;
&lt;br /&gt;
Exit chroot:&lt;br /&gt;
&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
Blkid:&lt;br /&gt;
&lt;br /&gt;
  BLKUUID=$(blkid /dev/sda2 | sed &#039;s|.*UUID=&amp;quot;||&#039; | sed &#039;s|&amp;quot;.*||&#039;)&lt;br /&gt;
&lt;br /&gt;
Cmdline:&lt;br /&gt;
&lt;br /&gt;
  echo cmdline=\&amp;quot;cryptroot=UUID=$BLKUUID  cryptdm=root modules=ext4,cryptsetup\&amp;quot; &amp;gt;&amp;gt; /mnt/etc/kernel-hooks.d/secureboot.conf&lt;br /&gt;
&lt;br /&gt;
Disable mkinitfs trigger:&lt;br /&gt;
&lt;br /&gt;
  echo &#039;disable_trigger=yes&#039; &amp;gt;&amp;gt; /mnt/etc/mkinitfs/mkinitfs.conf&lt;br /&gt;
&lt;br /&gt;
Chroot again:&lt;br /&gt;
&lt;br /&gt;
  chroot /mnt /bin/sh&lt;br /&gt;
&lt;br /&gt;
Create dummy efi keys:&lt;br /&gt;
&lt;br /&gt;
  apk add efi-mkkeys&lt;br /&gt;
  efi-mkkeys -s &amp;quot;Your Name&amp;quot; -o /etc/uefi-keys&lt;br /&gt;
&lt;br /&gt;
Generate image:&lt;br /&gt;
&lt;br /&gt;
  apk fix kernel-hooks&lt;br /&gt;
&lt;br /&gt;
Set root password:&lt;br /&gt;
&lt;br /&gt;
  passwd&lt;br /&gt;
&lt;br /&gt;
Exit chroot and power off:&lt;br /&gt;
&lt;br /&gt;
  exit&lt;br /&gt;
  poweroff&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26411</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26411"/>
		<updated>2024-02-17T21:27:10Z</updated>

		<summary type="html">&lt;p&gt;Quq: save hook&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quq&#039;s guide for installing Alpine with Sway, for latitude 7370.&lt;br /&gt;
&lt;br /&gt;
Download Alpine Linux, verify checksum then&lt;br /&gt;
&lt;br /&gt;
  dd if=alpine-extended.iso of=/dev/sdb&lt;br /&gt;
&lt;br /&gt;
Known issues: screen sharing appears to be broken.&lt;br /&gt;
&lt;br /&gt;
More details forth-coming.&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;code&amp;gt;f12&amp;lt;/code&amp;gt; at boot to enter Setup, wipe disk under Maintenance&amp;gt;Data Wipe. Check Wipe on Next Boot check box. Exit.&lt;br /&gt;
&lt;br /&gt;
Plug in external storage device with alpine extended on it. Let it boot.&lt;br /&gt;
&lt;br /&gt;
Login as root.  There is no password.&lt;br /&gt;
&lt;br /&gt;
Set up internet connection&lt;br /&gt;
&lt;br /&gt;
  # -r is needed for starting the network after configuration&lt;br /&gt;
  setup-interfaces -r&lt;br /&gt;
&lt;br /&gt;
  Initialize: wlan0&lt;br /&gt;
  Enter SSID: my net&lt;br /&gt;
  Password, DHCP.&lt;br /&gt;
&lt;br /&gt;
Set up time:&lt;br /&gt;
&lt;br /&gt;
  setup-ntp chrony&lt;br /&gt;
&lt;br /&gt;
Set up repos:&lt;br /&gt;
&lt;br /&gt;
  setup-apkrepos-c&lt;br /&gt;
   # show mirror list, then select geographically nearest mirror&lt;br /&gt;
   # -c argument enables community repo&lt;br /&gt;
&lt;br /&gt;
Larger font for high res screen:&lt;br /&gt;
&lt;br /&gt;
  apk add terminus-font&lt;br /&gt;
  setfont /usr/share/consolefonts/ter-132n.psf.gz&lt;br /&gt;
&lt;br /&gt;
Partition the disk:&lt;br /&gt;
&lt;br /&gt;
  apk add parted cryptsetup e2fsprogs&lt;br /&gt;
  parted --script --align=optimal /dev/sda -- mklabel gpt mkpart EFI 1MiB 4GiB mkpart alpine 4GiB -1MiB set 1 esp on&lt;br /&gt;
  mkfs.vfat /dev/sda1&lt;br /&gt;
  cryptsetup luksFormat /dev/sda2&lt;br /&gt;
  cryptsetup luksOpen /dev/sda2 alpine-luks&lt;br /&gt;
  mkfs.ext4 /dev/mapper/alpine-luks&lt;br /&gt;
&lt;br /&gt;
Mount.&lt;br /&gt;
&lt;br /&gt;
  mount -t ext4 /dev/mapper/alpine-luks /mnt&lt;br /&gt;
  mkdir /mnt/boot&lt;br /&gt;
  mount -t vfat /dev/sda1 /mnt/boot&lt;br /&gt;
&lt;br /&gt;
Install system:&lt;br /&gt;
&lt;br /&gt;
  BOOTLOADER=none setup-disk -m sys -k edge -s 0 /mnt&lt;br /&gt;
&lt;br /&gt;
Chroot:&lt;br /&gt;
&lt;br /&gt;
  chroot /mnt /bin/sh&lt;br /&gt;
&lt;br /&gt;
Generate Unified Kernel Image as Bootloader&lt;br /&gt;
&lt;br /&gt;
  apk add secureboot-hook gummiboot-efistub efibootmgr&lt;br /&gt;
&lt;br /&gt;
Exit chroot:&lt;br /&gt;
&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
Blkid:&lt;br /&gt;
&lt;br /&gt;
  BLKUUID=$(blkid /dev/sda2 | sed &#039;s|.*UUID=&amp;quot;||&#039; | sed &#039;s|&amp;quot;.*||&#039;)&lt;br /&gt;
&lt;br /&gt;
Cmdline:&lt;br /&gt;
&lt;br /&gt;
  echo cmdline=\&amp;quot;cryptroot=UUID=$BLKUUID  cryptdm=root modules=ext4,cryptsetup\&amp;quot; &amp;gt;&amp;gt; /mnt/etc/kernel-hooks.d/secureboot.conf&lt;br /&gt;
&lt;br /&gt;
Disable mkinitfs trigger:&lt;br /&gt;
&lt;br /&gt;
  echo &#039;disable_trigger=yes&#039; &amp;gt;&amp;gt; /mnt/etc/mkinitfs/mkinitfs.conf&lt;br /&gt;
&lt;br /&gt;
Chroot again:&lt;br /&gt;
&lt;br /&gt;
  chroot /mnt /bin/sh&lt;br /&gt;
&lt;br /&gt;
Generate image:&lt;br /&gt;
&lt;br /&gt;
  apk fix kernel-hooks&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26410</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26410"/>
		<updated>2024-02-17T21:16:13Z</updated>

		<summary type="html">&lt;p&gt;Quq: Save&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quq&#039;s guide for installing Alpine with Sway, for latitude 7370.&lt;br /&gt;
&lt;br /&gt;
Download Alpine Linux, verify checksum then&lt;br /&gt;
&lt;br /&gt;
  dd if=alpine-extended.iso of=/dev/sdb&lt;br /&gt;
&lt;br /&gt;
Known issues: screen sharing appears to be broken.&lt;br /&gt;
&lt;br /&gt;
More details forth-coming.&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;code&amp;gt;f12&amp;lt;/code&amp;gt; at boot to enter Setup, wipe disk under Maintenance&amp;gt;Data Wipe. Check Wipe on Next Boot check box. Exit.&lt;br /&gt;
&lt;br /&gt;
Plug in external storage device with alpine extended on it. Let it boot.&lt;br /&gt;
&lt;br /&gt;
Login as root.  There is no password.&lt;br /&gt;
&lt;br /&gt;
Set up internet connection&lt;br /&gt;
&lt;br /&gt;
  # -r is needed for starting the network after configuration&lt;br /&gt;
  setup-interfaces -r&lt;br /&gt;
&lt;br /&gt;
  Initialize: wlan0&lt;br /&gt;
  Enter SSID: my net&lt;br /&gt;
  Password, DHCP.&lt;br /&gt;
&lt;br /&gt;
Set up time:&lt;br /&gt;
&lt;br /&gt;
  setup-ntp chrony&lt;br /&gt;
&lt;br /&gt;
Set up repos:&lt;br /&gt;
&lt;br /&gt;
  setup-apkrepos-c&lt;br /&gt;
   # show mirror list, then select geographically nearest mirror&lt;br /&gt;
   # -c argument enables community repo&lt;br /&gt;
&lt;br /&gt;
Larger font for high res screen:&lt;br /&gt;
&lt;br /&gt;
  apk add terminus-font&lt;br /&gt;
  setfont /usr/share/consolefonts/ter-132n.psf.gz&lt;br /&gt;
&lt;br /&gt;
Partition the disk:&lt;br /&gt;
&lt;br /&gt;
  apk add parted cryptsetup e2fsprogs&lt;br /&gt;
  parted --script --align=optimal /dev/sda -- mklabel gpt mkpart EFI 1MiB 4GiB mkpart alpine 4GiB -1MiB set 1 esp on&lt;br /&gt;
  mkfs.vfat /dev/sda1&lt;br /&gt;
  cryptsetup luksFormat /dev/sda2&lt;br /&gt;
  cryptsetup luksOpen /dev/sda2 alpine-luks&lt;br /&gt;
  mkfs.ext4 /dev/mapper/alpine-luks&lt;br /&gt;
&lt;br /&gt;
Mount.&lt;br /&gt;
&lt;br /&gt;
  mount -t ext4 /dev/mapper/alpine-luks /mnt&lt;br /&gt;
  mkdir /mnt/boot&lt;br /&gt;
  mount -t vfat /dev/sda1 /mnt/boot&lt;br /&gt;
&lt;br /&gt;
Install system:&lt;br /&gt;
&lt;br /&gt;
  BOOTLOADER=none setup-disk -m sys -k edge -s 0 /mnt&lt;br /&gt;
&lt;br /&gt;
Chroot:&lt;br /&gt;
&lt;br /&gt;
  chroot /mnt /bin/sh&lt;br /&gt;
&lt;br /&gt;
Generate Unified Kernel Image as Bootloader&lt;br /&gt;
&lt;br /&gt;
  apk add secureboot-hook gummiboot-efistub efibootmgr&lt;br /&gt;
&lt;br /&gt;
Exit chroot:&lt;br /&gt;
&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
Blkid:&lt;br /&gt;
&lt;br /&gt;
  BLKUUID=$(blkid /dev/sda2 | sed &#039;s|.*UUID=&amp;quot;||&#039; | sed &#039;s|&amp;quot;.*||&#039;)&lt;br /&gt;
&lt;br /&gt;
Cmdline:&lt;br /&gt;
&lt;br /&gt;
  echo cmdline=\&amp;quot;cryptroot=UUID=$BLKUUID\&amp;quot; &amp;gt;&amp;gt; /mnt/etc/kernel-hooks.d/secureboot.conf&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26409</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26409"/>
		<updated>2024-02-17T20:24:00Z</updated>

		<summary type="html">&lt;p&gt;Quq: wipe data&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quq&#039;s guide for installing Alpine with Sway, for latitude 7370.&lt;br /&gt;
&lt;br /&gt;
Download Alpine Linux, verify checksum then&lt;br /&gt;
&lt;br /&gt;
  dd if=alpine-extended.iso of=/dev/sdb&lt;br /&gt;
&lt;br /&gt;
Known issues: screen sharing appears to be broken.&lt;br /&gt;
&lt;br /&gt;
More details forth-coming.&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;code&amp;gt;f12&amp;lt;/code&amp;gt; at boot to enter Setup, wipe disk under Maintenance&amp;gt;Wipe.&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26408</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26408"/>
		<updated>2024-02-17T20:17:14Z</updated>

		<summary type="html">&lt;p&gt;Quq: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quq&#039;s guide for installing Alpine with Sway&lt;br /&gt;
&lt;br /&gt;
Download Alpine Linux, verify checksum then&lt;br /&gt;
&lt;br /&gt;
  dd if=alpine-extended.iso of=/dev/sdb&lt;br /&gt;
&lt;br /&gt;
Known issues: screen sharing appears to be broken.&lt;br /&gt;
&lt;br /&gt;
More details forth-coming.&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26407</id>
		<title>Sway on Laptop</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway_on_Laptop&amp;diff=26407"/>
		<updated>2024-02-17T20:16:51Z</updated>

		<summary type="html">&lt;p&gt;Quq: init&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quq&#039;s guide for installing Alpine with Sway&lt;br /&gt;
&lt;br /&gt;
Download Alpine Linux, verify checksum then&lt;br /&gt;
&lt;br /&gt;
  dd if=alpine-extended.iso of=/dev/sdb&lt;br /&gt;
&lt;br /&gt;
Known issues: screen sharing appears to be broken.&lt;/div&gt;</summary>
		<author><name>Quq</name></author>
	</entry>
</feed>