Switching to Wayland as a WM user

Hi guys,

I saw this very informative post talking about how ready Wayland is so I thought to share some info that might be useful for people on i3wm+Polybar who are willing to switch to Sway. Keep in mind I am just a hobbyist that like to tinker with stuff. If you know what you are doing you might want to skip this post and check i3wm Migration Guide and useful addons (I recommend you check those anyway if you are reading this post).

Likely you have heard about Sway but if you haven’t Sway is a Wayland compositor(forget picom) based on i3wm that will make you feel at home as an i3 user. Sway has almost all i3 functionalities and some improvements as well but you will have to drop some of the programs like Polybar that you have been running on i3 for Wayland compatible ones. Do check what programs are not Wayland native and look for their replacements.

Ones which make life easier:

  • nwg-panel (see picture): Great panel/bar if you do not want to spend much time editing config files since it allows you to do it graphically plus it comes with great defaults. If you want to add a menu like usual DEs you can get nwg-menu. Or a dock too nwg-dock. This guys work is wonderful!
  • nwg-displays: Graphical displays manager that automatically export config files for you.
  • nwg-look: Simple graphical way of setting GTK3 themes. If you want to create custom gtk themes get gradience
  • yofi: Yofi is a launcher that works very fast for me and is customizable. (could not get icons to work but that seems to be a me problem. If you would like a super minimal, blazing fast launcher then tofi is for you. Personally I use wofi but its not being actively maintained.
  • For your graphical file manager thunar, pcmanfm and nemo work fine but you will have to do some tweaking to get some of the functionalities they offered in their respective Desktop Environments.
  • gammastep: Like redshift but better and for wayland, just configure, set and forget about it.

Little tips:

  • Electron apps like Freetube and Obsidian will not work on Wayland unless you use flags either on Electron’s config file or specify environment variables.
  • Touchpad gestures are supported directly in Sway and you can configure those in the main config file or include it externally.
  • When configuring your Sway input options in the config file I suggest making a global option that will catch all devices for a given type and then if you wish you can specify unique behavior for different devices specifying their id. Like this:

<span style="color:#323232;">input type:keyboard {
</span><span style="color:#323232;">$your_options_here  
</span><span style="color:#323232;">}
</span>
  • If you want to immediately focus the workspace of a window you moved you can do so like this:

<span style="color:#323232;">bindsym $mod+Shift+5 move container to workspace number 5, workspace number 5
</span>
  • SwayFX: Extends Sway to some UI functions like one could have achieved with Picom on i3 that are not available in Sway.
  • autotiling: This lets you achieve the autotiling that Hyprland has by default.

There is much more to it than this post, go check the respective links. Anyway, I hope you find this useful. Peace!

acockworkorange,

Reading the title I thought you meant Window Maker.

slacktoid, (edited )
@slacktoid@lemmy.ml avatar

If youre a terminal user you no longer need to use kitti3 for a dropdown terminal. You can yoink Kitty back and forth a scratch space.

also great post OP

1984,
@1984@lemmy.today avatar

Unfortunately Jetbrains editors are still blurry on both Sway and Gnome in 4k. Only Plasma can handle it and shows sharp text. Not sure what they are doing that the others can’t.

PlusMinus,

Do you use fractional scaling? Because it is sharp on my machine on sway.

1984,
@1984@lemmy.today avatar

Yeah fractional scaling 125%.

deadbeef79000,

I use gnome at 4k and avoided fractional scaling by setting gnome to large text and increasing the ide’s font sizes.

Nice crisp fonts, but annoying settings (but only set once).

mister_monster,

I’ve got a question for you, maybe you have an answer. Is there a launcher out there for Wayland that allows you to launch $PATH, .desktop and allows you to configure aliases? I use aliases quite often in .bashrc and I’d like to be able to either use those or even better, configure them directly for the launcher so that I can launch TUI apps in a new terminal.

theshatterstone54,

Personally, I use bemenu and j4-dmenu-desktop.

I’d recommend you check out the my-bemenu script at .local/bin in my dots repo: gitlab.com/theshatterstone/dotfiles

dino,

Not sure about the alias part but definetly give fuzzel a try as a wayland launcher.

mister_monster,

I did try it, I liked the simplicity of it, right now I’m going with sway-launcher-desktop instead.

thequantumcog, (edited )
@thequantumcog@lemmy.world avatar

Make a .desktop entry in .local/share/applications and any launcher will be able to launch it

Edit: You could also change their names to match your alias

mister_monster,

Yeah I know, I can just make a .desktop file or just make shell scripts and put them in my PATH for each alias I want, but that’s prone to forgetting what I’ve done and I’d like to stick them all in one self documenting place.

Markaos, (edited )

You could put your .desktop files in a separate directory and just symlink them to ~/.local/share/applications. If you want to have all your aliases together, you could have a directory like Aliases or whatever and then have Aliases/desktop for .desktop launchers, Aliases/bin for scripts or binaries (and have it in PATH), Aliases/bashrc for your bash aliases (and just put source …/Aliases/bashrc in ~/.bashrc), etc.

Of course everyone has their own opinions on how to organize stuff, but this is IMHO pretty clean for what you probably want to do.

Edit: and to quickly (re)create the symlinks, you could use a bash one-liner like for f in …/Aliases/desktop/*; do ln -s “$f” “~/.local/share/applications/$(basename “$f”)”; done - put it into your bashrc as a function and remember to run it whenever you create a new .desktop launcher, and you should be golden.

mister_monster,

Yeah, I don’t use .desktop files. I’ve just never seen a launcher that does all 3: PATH, .desktop files and aliases. Most of them seem to do the first two and that’s it.

nfsu2, (edited )
@nfsu2@feddit.cl avatar

Most launchers have a “run” mode were you can launch or exec any command, some require flags and/or config. As well as a “drun” mode that looks for desktop apps, most if not all TUI apps will be catches by this.

Yofi will launch anything if you specify your terminal in the config file. That way you can launch desktop apps and TUI apps.

In Wofi you have to specify the terminal but you have to do a workaround because of a bug that is not their fault. You can otherwise launch Wofi in “run” mode.

Issue, reddit post the solution is linking gnome-terminal(or one of the others specified)

For Tofi I think it comes ready out of the box if I remember correctly.

And as for the aliases, some launchers have a rename function if that is helpful to you. Can’t remember which though… sorry.

thequantumcog,
@thequantumcog@lemmy.world avatar

Rofi also has a wayland fork which I use rofi-lbonn-wayland. All of the previous rofi configs work fine with this.

matcha_addict,

I like fuzzle as a rofi alternative for wayland. It’s made by the same developer as Foot terminal.

flashgnash,

Definitely look at tofi as well, it’s like rofi but it’s almost instant to launch

thequantumcog,
@thequantumcog@lemmy.world avatar

Thanks, I will definitely try that

gamma,
@gamma@programming.dev avatar

How is it compared to wofi?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • DreamBathrooms
  • magazineikmin
  • InstantRegret
  • hgfsjryuu7
  • vwfavf
  • Youngstown
  • slotface
  • thenastyranch
  • ngwrru68w68
  • rosin
  • kavyap
  • PowerRangers
  • Durango
  • khanakhh
  • anitta
  • mdbf
  • tacticalgear
  • ethstaker
  • modclub
  • osvaldo12
  • everett
  • tester
  • cubers
  • GTA5RPClips
  • normalnudes
  • Leos
  • cisconetworking
  • provamag3
  • All magazines