Comments (5)
I did a bit of investigating and realized that I was using signals wrong...anyways, what I figured out is that I needed my script to actually send the signal to the dwmblocks process. The only problem is that all of the blocks to the right of the block where the signal is defined as 1 are truncated. I have attached my blocks.h file for debugging if that's helpful.
blocks.h
from dwmblocks.
There are two user-defined signals for POSIX Standard signals, SIGUSR1
and SIGUSR2
https://dsa.cs.tsinghua.edu.cn/oj/static/unix_signal.html
https://man.openbsd.org/signal.3
https://www.gnu.org/software/libc/manual/html_node/Miscellaneous-Signals.html
I also use OpenBSD btw.
For volume control, My dwm/config.h has something like this:
{ MODKEY, XK_equal, spawn, SHCMD("sndioctl output.level=+0.05; pkill -SIGUSR1 dwmblocks") },
In dwmblocks:
{"", "sb-volume", 0, 1},
from dwmblocks.
That looks like it would work. Do you know how to bind the actual media keys like on a laptop (in my case the ThinkPad T420) in config.h
so that they can run that command instead of whatever arbitrary command its running?
from dwmblocks.
I think this will do:
{ 0, XF86XK_AudioMute, spawn, SHCMD("pkill -SIGUSR1 dwmblocks") },
{ 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pkill -SIGUSR1 dwmblocks") },
{ 0, XF86XK_AudioLowerVolume, spawn, SHCMD("pkill -SIGUSR1 dwmblocks") },
from dwmblocks.
Thank you! This is quite literally the exact thing I was looking for. In case anyone finds this on Google or something, in order to fix the error: use of undeclared identifier 'XF86XK_AudioRaiseVolume'
error, you need to add a line above all of the keybinds with #include <X11/XF86keysym.h>
from dwmblocks.
Related Issues (20)
- .tar.gz releases to more easily ported to gentoo ebuilds HOT 3
- No protocol specified Failed to open display HOT 6
- Error when I run make
- Conditional icons HOT 2
- clicks not working on certain modules HOT 1
- Weird boxes appearing in bar. HOT 2
- No delimiter (`\0`) gives weird boxes HOT 2
- dwmblocks not loading scripts with zsh HOT 1
- How can I run this on OpenBSD? HOT 1
- Not working with autostart HOT 1
- FreeBSD signal handling HOT 1
- Errors when Applying dwmblocks-statuscmd.diff to Dwmblocks HOT 1
- patch included from README.md won't work, one provided by statuscmd does
- How can I add the patch HOT 1
- Script not showing what it should HOT 3
- Dwmblocks doesn't display FontAwesome icons
- The patch from statuscmd in sucless.org throws error HOT 1
- FreeBSD signaling HOT 1
- How can a dwmblock update its output based on $BUTTON?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dwmblocks.