20250117193613-sway wm configuration attempt
I decided to give swaywm a proper try. I already had an i3 configuration from long time ago as a starting point.
keyboard
I had issues with the keyboard language. i3 would rely on xorg to set this, sway needs its own:
input * {
xkb_layout "gb"
}
the bar
swaybar uses a different config. It can still work with i3menu
bar {
position top
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
status_command while date +'%Y-%m-%d %X'; do sleep 1; done
colors {
statusline[#ffffff](/a/tag/ffffff/)
background[#323232](/a/tag/323232/)
inactive_workspace[#32323200](/a/tag/32323200/)[#32323200](/a/tag/32323200/)[#5c5c5c](/a/tag/5c5c5c/)
}
}
alternatives to rofi
wofi is not very good so I installed fuzzel. for the window picker:
man 7 wofi
includes a script for sway that works well, so I kept
it.
sharing screen
I went through a few links:
- how to enable sharing in firefox /swaywm https://old.reddit.com/r/swaywm/comments/l4e55v/guide_how_to_screenshare_from_chromiumfirefox/
- troubleshooting https://github.com/emersion/xdg-desktop-portal-wlr/wiki/%22It-doesn't-work%22-Troubleshooting-Checklist https://discourse.nixos.org/t/xdg-desktop-portal-not-working-on-wayland-while-kde-is-installed/20919/3
The exec lines is what it was missing. And
~/.config/xdg-desktop-portal/sway-portals.conf
However no support for individual windows https://github.com/emersion/xdg-desktop-portal-wlr/issues/107