{"id":17139117,"url":"https://github.com/erikreider/swayosd","last_synced_at":"2026-01-16T19:21:14.009Z","repository":{"id":107347822,"uuid":"547250899","full_name":"ErikReider/SwayOSD","owner":"ErikReider","description":"A GTK based on screen display for keyboard shortcuts like caps-lock and volume","archived":false,"fork":false,"pushed_at":"2026-01-15T23:34:43.000Z","size":24412,"stargazers_count":1082,"open_issues_count":16,"forks_count":57,"subscribers_count":7,"default_branch":"main","last_synced_at":"2026-01-16T03:05:07.664Z","etag":null,"topics":["on-screen-display","sway","swaywm","wayland"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ErikReider.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["erikreider"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2022-10-07T11:28:37.000Z","updated_at":"2026-01-16T01:36:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"b6311c10-74e0-41dd-8c48-fcebab4916df","html_url":"https://github.com/ErikReider/SwayOSD","commit_stats":{"total_commits":65,"total_committers":21,"mean_commits":"3.0952380952380953","dds":0.3846153846153846,"last_synced_commit":"47ef7826bce2c758a156a4a7186b970ff2396ea4"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ErikReider/SwayOSD","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikReider%2FSwayOSD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikReider%2FSwayOSD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikReider%2FSwayOSD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikReider%2FSwayOSD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ErikReider","download_url":"https://codeload.github.com/ErikReider/SwayOSD/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikReider%2FSwayOSD/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28481675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["on-screen-display","sway","swaywm","wayland"],"created_at":"2024-10-14T20:11:27.515Z","updated_at":"2026-01-16T19:21:14.003Z","avatar_url":"https://github.com/ErikReider.png","language":"Rust","funding_links":["https://github.com/sponsors/erikreider"],"categories":[],"sub_categories":[],"readme":"# SwayOSD\n\nA OSD window for common actions like volume, playback and capslock.\n\nThis is my first time coding in Rust so fixes and improvements are appreciated :)\n\n## Features:\n\n- LibInput listener Backend for these keys:\n  - Caps Lock\n  - Num Lock\n  - Scroll Lock\n  - Audio playback\n- Input and output volume change indicator\n- Input and output mute change indicator\n- Audio playback indicator\n- Customizable maximum Volume\n- Capslock change (Note: doesn't change the caps lock state)\n- Brightness change indicator\n\n## Images\n\n![image](https://user-images.githubusercontent.com/35975961/200685357-fb9697ae-a32d-4c60-a2ae-7791e70097b9.png)\n\n![image](https://user-images.githubusercontent.com/35975961/200685469-96c3398f-0169-4d13-8df0-90951e30ff33.png)\n\n## Install:\n\nThere's a new LibInput watcher binary shipped with SwayOSD (`swayosd-libinput-backend`)\nwhich can automatically detect key presses, so no need for binding key combos.\nThe supported keys are listed above in [Features](#features)\n\n### Through Meson\n\n```sh\n# Please note that the command below might require `--prefix /usr` on some systems\nmeson setup build --buildtype release\nmeson compile -C build\nmeson install -C build\n```\n\n### Fedora\n\nThe package is available on COPR:\n\n```sh\ndnf copr enable erikreider/swayosd\ndnf install swayosd\n```\n\n### Fedora Silverblue (and other rpm-ostree variants)\n\nThe package can be layered over the base image after adding the Copr repo as an ostree repo:\n\n```sh\nsudo 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\nrpm-ostree install swayosd\n```\n\n### Arch Linux\n\n- extra: [swayosd](https://archlinux.org/packages/extra/x86_64/swayosd/)\n- AUR: [swayosd-git](https://aur.archlinux.org/packages/swayosd-git) (thanks to @jgmdev! Don't report AUR packaging issues here)\n\n### Debian / Ubuntu\n\nStarting with Debian trixie and Ubuntu Plucky swayosd is available via apt.\n\n- [swayosd](https://tracker.debian.org/swayosd)\n\n## Usage:\n\n### SwayOSD Frontend\n\n`swayosd-server` must be running in the background.\nUse `swayosd-client` to send commands and display the OSD.\n\n### SwayOSD LibInput Backend (Optional)\n\nUsed for notifying when caps-lock, scroll-lock, and num-lock is changed.\n\nUsing Systemd: `sudo systemctl enable --now swayosd-libinput-backend.service`\n\nOther users can run: `pkexec swayosd-libinput-backend`\n\n### Sway examples\n\n#### Start Server\n\n```sh\n# OSD server\nexec swayosd-server\n```\n\n#### Add Client bindings\n\n```ini\n# Sink volume raise optionally with --device\nbindsym XF86AudioRaiseVolume exec swayosd-client --output-volume raise\n# Sink volume lower optionally with --device\nbindsym XF86AudioLowerVolume exec  swayosd-client --output-volume lower --device alsa_output.pci-0000_11_00.4.analog-stereo.monitor\n# Sink volume toggle mute\nbindsym XF86AudioMute exec swayosd-client --output-volume mute-toggle\n# Source volume toggle mute\nbindsym XF86AudioMicMute exec swayosd-client --input-volume mute-toggle\n\n# Volume raise with custom value\nbindsym XF86AudioRaiseVolume exec swayosd-client --output-volume 15\n# Volume lower with custom value\nbindsym XF86AudioLowerVolume exec swayosd-client --output-volume -15\n\n# Volume raise with max value\nbindsym XF86AudioRaiseVolume exec swayosd-client --output-volume raise --max-volume 120\n# Volume lower with max value\nbindsym XF86AudioLowerVolume exec swayosd-client --output-volume lower --max-volume 120\n\n# Sink volume raise with custom value optionally with --device\nbindsym XF86AudioRaiseVolume exec  swayosd-client --output-volume +10 --device alsa_output.pci-0000_11_00.4.analog-stereo.monitor\n# Sink volume lower with custom value optionally with --device\nbindsym XF86AudioLowerVolume exec  swayosd-client --output-volume -10 --device alsa_output.pci-0000_11_00.4.analog-stereo.monitor\n\n# Capslock (If you don't want to use the backend)\nbindsym --release Caps_Lock exec swayosd-client --caps-lock\n# Capslock but specific LED name (/sys/class/leds/)\nbindsym --release Caps_Lock exec swayosd-client --caps-lock-led input19::capslock\n\n# Brightness raise (optionally with --device, can be device name or wildcard)\nbindsym XF86MonBrightnessUp exec swayosd-client --brightness raise --device intel_backlight\n# Brightness lower (optionally with --device, can be device name or wildcard)\nbindsym XF86MonBrightnessDown exec swayosd-client --brightness lower --device intel_backlight\n\n# Brightness raise with custom value('+' sign needed)\nbindsym XF86MonBrightnessUp  exec swayosd-client --brightness +10\n# Brightness lower with custom value('-' sign needed)\nbindsym XF86MonBrightnessDown exec swayosd-client --brightness -10\n\n# Play/Pause current player\nbindsym XF86AudioPlay exec swayosd-client --playerctl play-pause\n# Next song for current player\nbindsym XF86AudioNext exec swayosd-client --playerctl next\n```\n\n### Notes on using `--device`:\n\n- It is for audio and BrightnessCtl devices only.\n- If it is omitted, the default audio / first BrightnessCtl device is used.\n- It only changes the target device for the current action that changes the volume / brightness.\n- You can list your input audio devices using `pactl list short sources`, for outputs replace `sources` with `sinks`.\n- You can list your brightness devices using `brightnessctl -l`, for backlights, use `brightnessctl -l -c backlight`.\n\n### Notes on using `--monitor`:\n\n- By default, without using --monitor the osd will be shown on all monitors\n- On setups with multiple monitors, if you only want to show the osd on the focused monitor, you can do so with the help of window manager specific commands:\n\n```sh\n# Sway\nswayosd-client --monitor \"$(swaymsg -t get_outputs | jq -r '.[] | select(.focused == true).name')\" --output-volume raise\n\n# Hyprland\nswayosd-client --monitor \"$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')\" --output-volume raise\n```\n\n## Theming\n\nSince SwayOSD uses GTK, its appearance can be changed. Initially scss is used, which GTK does not support, so we need to use plain css.\nThe style conifg file is in `~/.config/swayosd/style.css` (it is not automatically generated). For reference you can check [this](https://github.com/ErikReider/SwayOSD/blob/main/data/style/style.scss) and [this](https://github.com/ErikReider/SwayOSD/issues/36).\n\n## Brightness Control\n\nSome devices may not have permission to write `/sys/class/backlight/*/brightness`.\nSo using the provided packaged `udev` rules + adding the user to `video` group\nby running `sudo usermod -a -G video $USER`, everything should work as expected.\n\n### Development\n\n#### Setup and build\n\n```sh\nmeson setup build\nmeson compile -C build\n```\n\n#### Set the environment\n\n```sh\n# Sets the correct environment variables\nmeson devenv -C build -w .\n# Now you can start nvim, vscode, etc in the current shell to reduce duplicated builds\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikreider%2Fswayosd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferikreider%2Fswayosd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikreider%2Fswayosd/lists"}