Thanks to Windows 11 giving me some some issues, I decided it was time to move back to Ubuntu LTS. Thank to @lightrush and his handy salt script I was able to get up and running in NO time. That is until I decided to give i3 and Sway a shot.
After getting them both configured I have to say that I love tiling managers. Installing them on top of Ubuntu is also great, because you have the flexibility to switch between them and use Gnome as well.
Sway works smoother and seems to use less resources, but i3 runs perfectly as well.
Getting i3 to lock automatically when suspending (via the lid switch) or hibernating is still a work in progress.
Iām also trying to figure out how to map the brightness function keys to a keybinding in either i3 or sway. It will be reliant on brightnessctl. Iād like to get all of the keyboard shortcuts working (transport controls for media, etc.) as well, but that isnāt crucial.
Any of our tiling manger professionals have some tips after getting it all set up on your Framework?
You can determine what the symbols are by running xev (or wev) and pressing the key. For example (Iām typing from my desktop, so Iāll use the media keys here), if I run wev and press the key that has a āstopā icon on it (in this keyboard, thatās Fn+F10), I see that wev reports that the sym for that key is XF86AudioStop.
Once you obtain that sym, you can put something like bind XF86AudioStop exec mpc stop in your sway/i3 config and it should ājust workā.
If you want, Iāll edit this post when I open up my Framework later and put the exact lines I have in my sway config for brightness and media keys.
Any chance you are an expert at i3 xss-lock i3locking when the lid switch or hibernation take place? I got it working but with a white background. Iād like to set it black or use an image, but everytime I add those options in sway config is doesnāt work. It is always just a white background.
Any thoughts?
Thanks a ton for this! If I wasnāt having Workstation 3d acceleration issues I would probably not even be messing with i3. Very happy with Sway and Waybar.
Sorry, I actually went from using awesome on X11 to using sway on Wayland since there wasnāt a real Wayland version/successor of awesome. Also, presumably youād use swaylock with sway (not xss-lock and i3lock?), but that was probably a typo (the default sway config over at /etc/sway/config contains a snippet to automatically deal with screenlocking using swaylock).
No problem! Iām still somewhat new to sway and Wayland more generally, even if Iām pretty used to tiling WMs at this point (Iāve been using awesome for several years at this point).
Yeah, thank you! swaylock work SOOO much better than i3lock. It is basically un-comment a couple lines and it just works. So much easier, especially getting a specific image to be shown instead of just a color background.
But there is something about i3, that I also really like. I canāt put my finger on it. Maybe it is just the fact that Putty and VMware Workstation just work.
Personally, I setup a config file (in ~/.config/swaylock/config) so that I donāt have to edit the multiple places I have swaylock invocations in my sway config (I setup a keybinding to manually lock the screen i.e. bindsym $mod+l exec 'LANG=en_US.UTF8 swaylock' ā the LANG=en_US.UTF8 is because my actual locale isnāt English, but swaylock isnāt localized so it just ends up not being able to display its messages ).
Yeah, I do the Mod + L for manual lock as well. What I meant by easier is that it is easier to configure. I was able to add a background to the lockscreen and set it to trigger from suspend and hibernate, with very little effort.
i3lock, by comparison, is still not working properly, and I canāt figure out why. Iāve got services files written in /etc/systemd/system etc, but no dice.
My last hurdle to using Sway in the long term is figuring out how to get Putty (which is dependent on X for tunneling) to work on Wayland.
Right. What I mean is that I donāt have to separately configure the swayidle command (which runs swaylock at preconfigured events) and the manual lock command, since everything is read from the config file. Thatās just a personal preference, though, just to keep my sway config a bit more tidy.
Presumably it would be a user, not a system service? But yeah, as I said, I donāt have much experience with it (though I used to use slock with xss-lock, configured as a user systemd service, which worked fairly well).
It should work if you install Xwayland (youāll have to restart sway afterwards to have it recognize that xwayland is installed).
Iām bilingual in both English and Kannada. I keep LANG=kn_IN.UTF8 set just to see how well (or poorly) programs are localized, and thatās how I realized that swaylock is completely English-specific xD
Hopefully only for now. As it gains popularity maybe it will gain some translations.
Just wanted to thank you again, as Iāve been able to fix all of my issues with Workstation. All the shortcut function keys are properly mapped and functional.
It took a couple of days, but Iām very happy with this setup.
One quick thing Iāve found is that when rebooting your sink source can change. If you use @DEFAULT_SINK@ instead of 0 (or any other number for that matter) you wont have issues upon reboot. Your volume keys should always just work.
I am using i3 window manager on Fedora 35. Though this thread is about Ubuntu. Maybe the content could be similar between Ubuntu and Fedora. So let me post here.
Note I checked each media keyās symbol by xev -event keyboard. For print screen key, I am using gnome-screenshot command as I also have Gnome environment. To use mpc, you need to install mpd from RPMFusion. I havenāt tested the mpc settings by myself.
# Media keys
# $ xev -event keyboard
# Use pactl.
# Framework Laptop F1: XF86AudioMute
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
# Framework Laptop F2: XF86AudioRaiseVolume
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +10%
# Framework Laptop F3: XF86AudioLowerVolume
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -10%
# Use mpc (Music Playing Client) and mpd (Music Playing Daemon) from RPM Fusion.
# https://fedoramagazine.org/playing-music-on-your-fedora-terminal-with-mpd-and-ncmpcpp/
# Framework Laptop F4: XF86AudioPrev
bindsym XF86AudioPrev exec mpc prev
# Framework Laptop F5: XF86AudioPlay
bindsym XF86AudioPlay exec mpc toggle
# Framework Laptop F6: XF86AudioNext
bindsym XF86AudioNext exec mpc next
# Framework Laptop F7: XF86MonBrightnessDown
# The --min-value option is important to prevent the complete darkness.
bindsym XF86MonBrightnessDown exec "brightnessctl --device intel_backlight --min-value=5 set 5%-"
# Framework Laptop F8: XF86MonBrightnessUp
bindsym XF86MonBrightnessUp exec "brightnessctl --device intel_backlight set 5%+"
# Framework Laptop F9: Super_L + p
# TODO: Assign this multiple screen key with the toggle multiple screens when using it.
# https://fedoramagazine.org/using-i3-with-multiple-monitors/
bindsym $mod+p exec firefox https://fedoramagazine.org/using-i3-with-multiple-monitors/
# Framework Laptop F10: XF86RFKill (already available)
# $ rfkill list all
# $ nmcli radio all
# Framework Laptop F11: Print
# https://unix.stackexchange.com/questions/497897/print-screen-key-in-i3
bindsym Print exec gnome-screenshot -i
# Framework Laptop F12: XF86AudioMedia
bindsym XF86AudioMedia exec firefox https://community.frame.work/
Seeing the GitHub repository of i3 and sway, sway has more stars than i3. But both seems well-maintained. I have been using i3 on my ThinkPad Carbon, and now customizing the i3 on my Framework Laptop.
My experience in general is that Sway works better than i3 on the Framework Laptop, but both work. I have noticed better performance on swap and zero tearing.
The cool thing about i3 and sway is that sway was designed to be a drop in replacement for it. It is i3 for Wayland basically. So your i3 config will work with Sway, with perhaps minimal updates.
Thanks for the info. After checking both sway and i3ās GitHub repositories and Wikipedia pages, sway is on Wayland and completely written in C. The performance might be better in C. And i3 is on X-Window system written in C + some script languages. And the Wayland looks more modern than X Window system. Maybe I will try sway.