erikreider / swayosd Goto Github PK
View Code? Open in Web Editor NEWA GTK based on screen display for keyboard shortcuts like caps-lock and volume
License: GNU General Public License v3.0
A GTK based on screen display for keyboard shortcuts like caps-lock and volume
License: GNU General Public License v3.0
Originally posted by octaskin July 10, 2023
Hey there,
Is it possible to use SwayOSD in a similar manner to wob, passing a number (also maybe a flag to handle the icon or text describing which switch it is) letting other scripts to do the actual work?
Having a more stripped down functionality (maybe optionally) could be of interest to other users.
Many Arch users already have wrappers to drive their peripherals, at which point a tool like wob comes in handy, with a more Unix-y approach so to say, by just accepting a number to show the current level.
I like the optics of SwayOSD, but would like the extensibility of wob. I don't know how the icons are queried currently but the script can accept a flag to select from a predefined set of icons, or even can accept a icon name from installed icons, just like notify-send
from libnotify.
Hi, I am using external monitors and was wondering if swayosd --brightness
could control all devices in /sys/class/backlight
?
Thanks a lot!
Hi, it would be a great improvement, if swayosd-libinput-backend
could also listen to keyboard backlight and show an OSD window.
Thank you for the great project!
I get the following error when building: ../data/meson.build:47:43: ERROR: Unknown variable "libdir".
libdir
definition is missing in data/meson.build
Not sure if it's possible using libinput backend, but if it isn't, please add custom message support, so you could do swayosd --custom $(compositor specific command to get current keyboard layout)
Appreciate your script.
But after install it then add exec and binds it doesn't work.
Waiting your help...
Thx
Hello!
just run swayosd-libinput-backend with the following error:
Error: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.50" is not allowed to own the service "org.erikreider.swayosd" due to security policies in the configuration file
How I can modify the policy to match the security policy?
Thanks in advance.
Hi, due to #![feature(if_let_guard)]
line, the project cannot be built in release buildtype with an error error[E0554]: ``#![feature]`` may not be used on the stable release channel
.
I stumbled upon this when trying to update the package through AUR. Yes, I agree it is more of an AUR issue, than swayosd issue, however I'd argue that expecting release channel to work should not be the responsibility of the packager, but of the maintainer.
Thank you for all the work!
Hello, I'm currently working on packaging this project for Void Linux, but it's a requirement to use a version tag.
Thanks for all your work.
bindsym {
--locked {
XF86AudioMute exec swayosd-client --output-volume mute-toggle
XF86AudioRaiseVolume exec swayosd-client --output-volume 1
XF86AudioLowerVolume exec swayosd-client --output-volume -1
}
}
OSD on lockscreen (swaylock)
PS: really nice project this is (:
starting the systemd service doesnt work nor starting the server please help thanks
Hi,
Great work on SwayOSD!
Both pactl
and brightnessctl
offer the possibility to change volume and brightness by a percentage, which is supposed to be closer to how humans perceive changes.
Would you consider making this possible with SwayOSD also? It would also help with compatibility I guess.
Thank you for making this software. Maybe more actions/symbols such as brightness and mute control (maybe play/pause) would make it even better.
Hi, thanks you for the work on this, it's been extremly usefull!
While it works, when you start swayosd
while having both outputs connected/active, the moment you disable and re-enable an output, it breaks the swayosd
layout and it starts appearing all over the screen.
I, for one, am less fond of messing with groups and udev rules to change brightness when I already have other utilities that can do that without such intrusions (e.g. brightnessctl
). I would appreciate a design that relies less on lower-level APIs and/or just having options similar to the ones for caps lock on the 'continuous' inputs as well (rather than the hack of setting to +0), so I can compose my preferred control methods appropriately.
Hi, thank you for the awesome project! I like the aesthetics a lot more than avรญzo, which I was using until now and wanted to make a switch, however it seems, that when I start and enable the swayosd-libinput-backend.service
, the backend is running at 100% of one core.
I don't have any logs for you since it doesn't output anything. If there's a way, how to collect them to be more helpful, please, let me know.
I'm running on Arch, however not using AUR package, which is currently outdated, but a custom one, which uses meson
and therefore installs everything (udev
, polkit
rules, service files, etc.)
Thank you!
Hi ๐
Would you mind to make a copr for this project? I'm already using your other one for SwayNotificationCenter
which is very useful (they could even be under the same one I think).
Thanks for all your work ๐
I add a .rules file to /etc/udev/rules.d/
:
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="acpi_video0", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="acpi_video0", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
and run the command sudo usermod -a -G video $USER
but it didn't work as I expected.
potentially monitor rfkill event
to show 'Airplane mode' OSD notices.
Being able to individually control the volume of specific audio inputs and outputs would be great, I have a couple of audio devices and would love to have a nice OSD when adjusting volumes rather than silent keybound scripts in the background or opening up pavucontrol each time.
if i do exec swayosd-server
um it works but on killing the op, it exits the term too idk why
I want to change it equal 2
IDK how to set the udev rule to give myself permission to write the brightness file in NixOS, while brightnessctl
can still work.
When trying to run the server with swayosd-server --max-volume=150
or wayosd-server --max-volume 150
I get that --max-volume is not a CLI option
Am I doing something wrong here?
Separate the swayosd executable to client & server executables. This would make it easier for new users to configure.
Would cause minor breakage though...
Currently your option for volume and microphone muting is simply toggle mute.
I would like to request 'mute' and 'unmute' variants as I use them for different key combinations
Hello,
Before I begin, I want to say great work on SwayOSD. I found this project a few days ago, and it is a nice addition to my Sway setup.
I want suggest adding this software's custom value usage to the README.
Currently, the README shows examples such as:
bindsym XF86MonBrightnessUp exec swayosd --brightness raise
bindsym XF86AudioRaiseVolume exec swayosd --output-volume raise
I know that passing in '--help' tells how to use the custom amounts for the change of brightness and volume. However, there is an example of using max volume with a value within the README:
exec swayosd --max-volume 120
So I think there should be examples of using custom values for all the brightness and volume within the README. I am willing to do a pr adding to the README file. Before I begin, I am wondering if I should have a sub-section for the Sway examples with something like:
# Brightness raise custom value
bindsym XF86MonBrightnessUp + <key> exec swayosd --brightness 10
# Brightness lower custom value
bindsym XF86MonBrightnessDown + <key> exec swayosd --brightness -10
# Volume raise custom value
bindsym XF86AudioRaiseVolume + <key> exec swayosd --output-volume 10
# Volume raise custom value
bindsym XF86AudioRaiseVolume + <key> exec swayosd --output-volume -10
Or should it be somewhere else?
Any chance this is available through Ubuntu / APT? I'm locked to this distro for a work laptop.
It would be super nice to have the GTK window only spawn on only a certain monitor via a commandline argument or some other config. On dual monitor setups it feels a bit off to have it duplicated.
I use capslock:swapescape a lot
The osd activates when i hit escape (actual key: capslock)
and doesn't when i hit capslock (actual key: escape)
input "type:keyboard" xkb_options caps:swapescape
Hi, I just intalled it with Hyprland, but I noticed that after binding it to the caps lock key, the message is always "Caps Lock On".
My binding in the hyprland,conf
bind = , Caps_Lock, exec, swayosd --caps-lock
Maybe we need a toggle parameter for it?
Good job btw, I'm setting it as a needed package for my custom iso :)
Just letting a note to notify that I added a package to the ArchLinux User Repository https://aur.archlinux.org/packages/swayosd-git
When I execute swayosd --input-volume mute-toggle
to toggle my microphone, I get the regular "microphone volume" popup (volume at 100%), but instead of the microphone being toggled, the output volume gets muted. I'm using swayosd 5c2176a, installed from Arch AUR. Running swayosd --input-volume mute-toggle
again does nothing (so it does not unmute the output volume)
Steps to reproduce:
swayosd --input-volume mute-toggle
If I am reading the documentation correctly, it seems like swayosd is supposed to be able to change the brightness of my display. However, when I run swayosd --brightness lower|raise
doesn't make any effect. brillo -A 10
or brillo -U 10
both work fine, so it doesn't seem to be a permissions issue.
Additionally, no OSD is displayed whatsoever, but other OSD's displayed by swayosd work great (volume, caps lock)
Version: swayosd-git from AUR r18.8ef76c1-1
Compositor: Hyprland (wlroots)
OS: Fully updated Arch Linux as of May 2 11:56 PM MST
Hi
I'm on gentoo linux ~amd64
with geforce gtx 3060
latest nvidia drivers with drm and kernel-open
with wayland and hyprland 0.8.0
dbus version 1.15.8
i use latest version from git,
when i try to run wayosd-libinput-backend manually i get:
Error: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.80" is not allowed to own the service "org.erikreider.swayosd" due to security policies in the configuration file
i'm really not familiar with dbus so maybe my angel is completely wrong, but i tried to add the file /etc/dbus-1/session.d/swayosd.conf
and to add to it <allow send_destination="org.erikreider.swayosd" />
but it didn't make any difference.
Extend caps lock like feature also for num lock. Especially useful when the numlock doesn't have a visual indicator like on laptops
Support system icon theme settings.
Also, allow discrimination between enabled/disabled state
cargo package
Hello! I was trying to use swayOSD on my machine, but couldnt get it to work. I have started the libinput backend via systemd, but when I run swayosd-server, it says that it is connecting to the swayosd libinput backend, but it never seems to connect. It just hangs and does nothing.
I am running Hyprland, so maybe that has something to do with it? I found this project in this list awesome-hyprland
I installed with the AUR package swayosd-git.
systemctl status swayosd-libinput-backend.service gives the following message multiple times that seems to be unrelated:
jan 15 17:24:59 laptop swayosd-libinput-backend[8257]: See https://wayland.freedesktop.org/libinput/doc/1.24.0/touchpad-jumping-cursors.html for details
jan 15 17:24:59 laptop swayosd-libinput-backend[8257]: libinput error: event4 - MSFT0001:00 04F3:31BD Touchpad: kernel bug: Touch jump detected and discarded.
Thanks for the help!
(Edit for spelling)
I have caps lock bound to keyboard layout change, and every time i press it the "caps lock off" notification shows up. Is there already an undocumented option to do that, and if there isn't, can it be implemented?
Small question regarding this change, is there a way to disable trying to access the listener when using swayosd
?
I don't have the listener running (I just want to use the keybindings in the config), but when I run any swayosd
command it now hangs waiting for the listener
$ swayosd --brightness raise
SwayOSD LibInput Backend isn't available, waiting...
P.S. Brightness change works fine for me, can't reproduce the issue as described in #12
Originally posted by @simonvanderveldt in #23 (comment)
Is there any config file to configure it's look? Or do I miss something?
Since #60 we have the option to use swayosd-client --brightness <number>|raise|lower
, and supposedly --brightness +n|-n
, but the latter two are parsed as if the prefixes weren't there. This is inconsistent with both the behaviour of the other control elements and the documentation (swayosd --help
).
I cannot use BrightnessCtl with my external monitor so I use ddcutil to control my monitor brightness.
Can I somehow pass on current brightness value to swayosd-client --brightness <value>
so the progress is displayed?
I tried swayosd-client --brightness <integer 0 to 100>
, here anything below 50, shows blank progress bar and anything 51 and above, full progress bar.
On server I get this for each request from above: Trying BrightnessCtl Backend...
Maybe limit max volume to 100% or 150% (and add config option)?
Thanks for your work. gtk4-layershell is already available. No idea how much effort a port from GTK3 to 4 is in this scope, but that would be nice to have imo. I might look into this.
For example, brightnessctl: https://github.com/Hummer12007/brightnessctl/blob/ef49d475bedc447fd01998bdd53590cfdc36b96c/brightnessctl.c#L393
This works for me without setting udev rules.
Small feature request, would it be possible to show over-amplication (when running with --max-volume
> 100 and going over that 100), similar to how for example GNOME does it?
https://i.ytimg.com/vi/abIERSciMRc/maxresdefault.jpg
This is not my screenshot, also don't think this is how it currently looks in GNOME, but it shows the idea. I can make a screenshot later.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.