Hyprland and wlogout

This is another post on the Hyprland series.

In a previous post, I showed how to create a custom button in the Waybar for wlogout: a wlogout is a logout menu for Wayland environments:

Remember that in Arch, this is available as an AUR package, e.g., you have to install it through an AUR helper like Yay:

Of course, you can also test it by running that from the command line.

However, I hadn’t realized that when I click logout in wlogout, I always get a black screen: I don’t return to the SDDM menu.

However, that’s easy to fix, and you can also take the chance to customize its aspect.

First, you have to create its configuration layout file, e.g., by starting from the default one:

Then, we can edit the layout file we copied into “~/.config/wlogout/layout” and change this section

into

Now, logout will work fine.

Let’s also configure “Swaylock” for screen locking, as I have already shown in this previous blog post.

If you still haven’t installed that:

The default screen locking uses a bright screen. Let’s make it darker:

And let’s create and edit its configuration file “~/.config/swaylock/config”; in this example, I’m going to make it “dark green”, so I’m specifying:

By looking at its “man page”, we can see:

-c, –color <rrggbb[aa]>
Turn the screen into the given color instead of white. If -i is used, this sets the background of the image to the given color. Defaults to white (FFFFFF).

The “aa” in the previously present hex notation is the alpha value defining the color’s opacity. In the above example, I’m using no opacity.

This is my complete configuration file for swaylock:

Again, the “man page” explains these values:

-F, –show-failed-attempts
Show the current count of failed authentication attempts.

-f, –daemonize
Detach from the controlling terminal after locking.

In my Hyprland configuration file, I also use “swayidle” (the Idle management daemon for Wayland)

In my waybar configuration, I have:

Note that I’ve used a character using the installed Nerd font. Of course, you can choose anything you like. The “wlogout” menu will appear when you click on that module.

That’s all for this post 🙂

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.