You are not logged in.
Pages: 1
Hey, I've been building a custom desktop environment from scratch and so far, it's been going pretty good and I've learned alot.
However, there is something I'm confused about: Mouse buttons. Particularly, volume up and down on a non-traditional (gaming mouse) one that I'm using. When I was still using KDE, I was able to make use of these of these buttons by pushing up or down (of which I know is now XF86raise/lower volume) but now that I'm in a minimalist environment using just a window manager, I don't have this anymore.
I booted up a command,
xev -event button | grep buttonand have tested that mouse buttons were actually being registered (minus the DPI switch which is built into the mouse), but these volume + and - buttons aren't even being registered unlike the other one's! That's strange!!
Are these buttons linked to something else or do I need an additional piece of software to be able to manipulate the volume as I did in KDE?
Some wisdom would be appreciated!
Last edited by scatherinch (2023-03-13 20:29:30)
Offline
They're almost certainly not "buttons" they're "keys", so get rid of that grep ...actually, that grep is redundant, get rid of the grep and the "-event button".
The keysyms for the mouse keys/buttons will be exactly the same, though, whether or not in KDE. So whatever you used before should still work. I'd bet they are just the standard XF86Audio{Raise/Lower}Volume keys.
Last edited by Trilby (2023-03-13 01:39:11)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Hey, thanks for chiming in! That told me a bit more about how to work the xev command
I took it that knowledge from the Arch Wiki, but still nice to know. Indeed, you are correct. These buttons are registering as XF86 raise/lower keys.
I had a hunch that these weren't 'buttons' at all , but rather a command to tell the machine to raise the volume somehow. The problem is, I don't think I have any software for it make a connection to do so.
So, now that I know these are actually being registered, I need to figure out a way how to 'activate' them I guess? As in, I need to find something to tell it to raise the volume, like I had in the KDE DE, but I'm not sure where to go from here.
Last edited by scatherinch (2023-03-13 03:20:58)
Offline
I need to figure out a way how to 'activate' them I guess?
I've been building a custom desktop environment from scratch
So, what's your shortcut daemon?
And do you want to use alsactl or pactl.
You then bind its actions to the relevant keys in your shortcut daemon.
Online
shortcut daemon?
alsactl, pactl?
forgive me, I am still learning, but I am more than willing to go further, seeing as how I have already managed to go this far with a window manager.
I use pipewire, to give a bit more background, but from what I'm reading, it might not matter much. I assume that everything is based on ALSA, given that it's the default sound mechanism in Linux, So...let's try alsactl.
Where could i start putting these extra xf8audio buttons as @Trillby mentioned?
Last edited by scatherinch (2023-03-13 11:00:24)
Offline
What is your "custom environment" currently comprised of and by which means are you accepting actions based on shortcuts? If none, some of your options are e.g.: https://wiki.archlinux.org/title/Keyboa … tcuts#Xorg - read the docs of whatever you pick and configure the keys you've identified to trigger the action you want.
Alsactl will be the wrong tool for the job if you're on pipewire. use pactl or wpctl: e.g. https://wiki.archlinux.org/title/PulseA … me_control
Last edited by V1del (2023-03-13 11:44:00)
Offline
Note that most WMs will have options for keybindings, and using that seems much cleaner to me than adding yet-another-process to handle key binds. That said, I've heard the counter-argument from people who like to try out lots of WMs: if they configure one binding tool (e.g., xbindkeys) they can use that same configuration across countless WMs.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Alright, @V1del.
I went to those links and went with your suggestion to use pactl (it does make sense, as I am using pipewire). I then downloaded a program called xbindkeys and put this code into an RC file I spawned (.xbindkeysrc):
# Increase volume
"pactl set-sink-volume @DEFAULT_SINK@ +1000"
XF86AudioRaiseVolume
# Decrease volume
"pactl set-sink-volume @DEFAULT_SINK@ -1000"
XF86AudioLowerVolumeIt works, but to ensure that this gets executed at launch, I put the command into my .xprofile (xbindkeys &).
@Trillby I am fairly certain as well that there is a much 'cleaner' way of doing this (I use awesome, so the answer likely lies somewhere in my rc.lua . Unfortunately, I don't know enough about Lua to really understand this yet, so I will need to read more about Awesome's documentation to know what's going on.
Either way, the issue is resolved. Thanks for both of your input, it helped
Last edited by scatherinch (2023-03-13 20:28:30)
Offline
Pages: 1