This post goes over some useful utilities I have been using on my Wayland system.
Screen brightness: light
Light is a nice tool to manage screen and keyboard brightness.
- Install
light
- Add your user to the
video
group:usermod -aG video <user>
I really like the light -T
flag, which multiplies the current
brightness by some value. This way you can have fine grained control
both for very low and very high brightness values. To prevent yourself
from decreasing the brightness all the way to 0
, you can run
e.g. light -N 0.2
to set a minimium screen brightness of 0.2
. This
value will be stored in your config directory under ~/.config/light/
.
In my Sway config, I use these settings to change screen and keyboard
brightness. You can find the right path using light -L
.
|
|
In my Waybar config, scrolling on the backlight module also changes the brightness:
|
|
Night mode: gammastep
Gammastep is a fork of redshift that works on Wayland.
Install
gammastep
, and for the tray bar idicator, additionally installpython-xdg
,python-gobject
, andgtk3
.Copy the sample config from here to
~/.config/gammastep/config.ini
.Set a manual location (or configure geoclue).
Set
adjustement-method=wayland
.Change
temp-day
,temp-night
,gamma-day
, andgamma-night
to your liking.Launch from from the Sway config:
1
exec gammastep-indicator &
Notifications daemon: mako
Mako is a notification daemon for Wayland similar to Dunst. I’m using it with an orange-black colour scheme.
![](/ox-hugo/mako.png)
~/.config/mako/config
:
|
|
My Sway Keybindings to dismiss notifications are:
|
|
Program launcher: Rofi
For Wayland, I’m using the rofi-lbonn-wayland-git
AUR
package, based on this branch of
Rofi.
There is also wofi
, but rofi
feels more responsive and does not have
a GTK3 UI like wofi
.
My config ~/.config/rofi/config.rasi
:
|
|
My theme is a slightly modified version of flat-orange.rasi and can be found here.
Some plugins I use:
rofi-calc
: useqalc
as calculator directly inside rofi, with a live preview.1
bindsym $mod+q exec rofi -show calc -modi calc -no-show-match -no-sort -no-bold > /dev/null
rofi-pass-git
for integration withpass
.1
bindsym $mod2+p exec rofi-pass
Add the following to the config (
~/.config/rofi-pass/config
) to fixcopyPass
mode and make it the default.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
_clip_in_primary() { wl-copy -p } _clip_in_clipboard() { wl-copy } _clip_out_primary() { wl-paste -p } _clip_out_clipboard() { wl-paste } default_do='copyPass' clip=primary
There is also
rofi-pass-ydotool-git
, but since I do not use autotype functionality I have not needed this yet.For window switching, I use i3-focus-last. See this post for more.
Clipboard: clipman
, wl-copy
, wl-paste
wl-copy [-p] <args>
copies the arguments to the clipboard.wl-paste [-p]
prints the current [primary] clipboard contents.clipman
keeps a history of copied text which can be selected via Rofi.
![](/ox-hugo/rofi-clipman.png)
Sway config:
|
|
Screenshots: grimshot
I’m using a fork of grimshot
with a custom selection
argument, together with a small wrapper script
that automatically uploads my screenshots to my server. Whenever I make
a screenshot the following happens:
- The screenshot is saved to
~/data/screenshots/<timestamp>.png
. - The screenshot is uploaded to my server, and the URL is copied to the primary clipboard.
- The screenshot is copied to the regular clipboard.
Now I can either share the image itself or just the URL to it.
The wrapper looks like this:
|
|
In Sway, I can just bind the printscreen key to this script:
|
|
There is also Snappy for screenshot editing, but I am not using this at the moment.
Terminal emulator: foot
Foot is the default terminal emulator in Sway and has
native Wayland support. It supports a server/client setup by running
exec foot -s
in the Sway config, and launching new terminals with
footclient
. My config is mostly defaults, with only a few changes:
|
|
Shell: fish
Instead of cleaning up 500 lines of .zshrc
, I decided to give Fish a
try. Fish seems to have better defaults, although there are a few small
drawbacks: tab completion is slightly less intuitive, and autocompletion
is less reliable.
I’m using the Vim keybindings with a few small changes.
|
|
- Instead of the
alias -d ~g=~/git/
hashes I am used to from Zsh, I’m now usingset -U g ~/git/
for a similar effect, although this now requirescd $g
instead ofcd ~g
previously. - The background color for the active tab completion item was invisible
for me. To fix it:
set -U fish_color_search_match --background=blue
- To start fish in the most recent directory:
last-working-dir
fromoh-my-fish
.
Browser: chromium
Chromium supports native Wayland via some flags:
|
|
You should also add these flags to the desktop file to make sure they
also apply when opening a file with chromium. This is best done by
copying /usr/share/applications/chromium.desktop
to
~/.local/share/applications
and adding them to the exec
line. Or
alternatively point the exec
line to a wrapper script.
I have disabled the password manager, since I’m using pass
instead.
Profile-sync-daemon can be used to put the browserprofile in tmpfs and reduce the amount of data written to disk by chromium.
See this post for a fork of Sway that allows detaching the chromium full screen mode from the sway full screen mode. This allows for watching youtube videos filling an entire window, and using chromium with tab bar filling the entire screen.
Some nice extensions:
- Minimal scrollbar hides scrollbars.
- Dark Reader to make all websites dark. This post on dark mode has some more tips for configuring dark mode in both Dark Reader and Vimium.
- Vimium for vim-like browsing. My config is here.
Image viewer: sxiv
and feh
I am using these two image viewers for slightly different purposes.
sxiv
is great because of its thumnail mode. Together with the ranger
integration this is great for quickly browsing through a large (remote)
directory of photos because it only loads the small thumbnails. On the
other hand, the feh-preload-next-image-git
package/branch of feh
is nice because it can load the next image while
the current image is being displayed, saving time waiting for the
network overhead. Also, feh
supports deleting images, which is nice
for sorting through photos.
Note that both of these image viewers run under XWayland.
Bar: waybar
Waybar is a common bar for Sway.
I’m not using anything special here, apart from some custom on-click
actions:
~/.config/sway.conf
|
|
~/.config/waybar/config
|
|
Font: ttf-dejavu
I am using ttf-dejavu
fonts. Some discussion on Reddit is
here.
I am still in doubt between DejaVu Sans Mono and Source Code Pro.
File browser: ranger
ranger is a terminal based file
browser. I am using ranger-git
, since the official Arch ranger
package is relatively old and the git version has some unreleased
bugfixes.
- TODO: make fish cd to last dir: https://codeyarns.com/tech/2014-09-28-how-to-change-directory-in-shell-using-ranger.html
Graphic drivers: Todo
My laptop does have an NVidia card, but I do not have any drivers installed yet.