A GTK based on screen display for keyboard shortcuts like caps-lock and volume
A GTK based on screen display for keyboard shortcuts like caps-lock and volume
A OSD window for common actions like volume, playback and capslock.
This is my first time coding in Rust so fixes and improvements are appreciated :)
There's a new LibInput watcher binary shipped with SwayOSD (swayosd-libinput-backend)
which can automatically detect key presses, so no need for binding key combos.
The supported keys are listed above in Features
# Please note that the command below might require `--prefix /usr` on some systems
meson setup build --buildtype release
meson compile -C build
meson install -C buildThe package is available on COPR:
dnf copr enable erikreider/swayosd
dnf install swayosdThe package can be layered over the base image after adding the Copr repo as an ostree repo:
sudo curl -sL -o /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:erikreider:swayosd.repo https://copr.fedorainfracloud.org/coprs/erikreider/swayosd/repo/fedora-$(rpm -E %fedora)/erikreider-swayosd-fedora-$(rpm -E %fedora).repo
rpm-ostree install swayosdStarting with Debian trixie and Ubuntu Plucky swayosd is available via apt.
swayosd-server must be running in the background.
Use swayosd-client to send commands and display the OSD.
Used for notifying when caps-lock, scroll-lock, and num-lock is changed.
Using Systemd: sudo systemctl enable --now swayosd-libinput-backend.service
Other users can run: pkexec swayosd-libinput-backend
# OSD server
exec swayosd-server…--device:pactl list short sources, for outputs replace sources with sinks.brightnessctl -l, for backlights, use brightnessctl -l -c backlight.--player:playerctl -l for available players.playerctld [un]shift; use to cycle players.--monitor:# Sway
swayosd-client --monitor "$(swaymsg -t get_outputs | jq -r '.[] | select(.focused == true).name')" --output-volume raise
# Hyprland
swayosd-client --monitor "$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')" --output-volume raiseSince SwayOSD uses GTK, its appearance can be changed. Initially scss is used, which GTK does not support, so we need to use plain css.
The style conifg file is in ~/.config/swayosd/style.css (it is not automatically generated). For reference you can check this and this.
Some devices may not have permission to write /sys/class/backlight/*/brightness.
So using the provided packaged udev rules + adding the user to video group
by running sudo usermod -a -G video $USER, everything should work as expected.
meson setup build
meson compile -C build# Sets the correct environment variables
meson devenv -C build -w .
# Now you can start nvim, vscode, etc in the current shellNo open issues yet, or sync has not completed.