Compare commits
No commits in common. "502f596c87b44c6711aefa011d9c672a802e336c" and "5400dcfc75b67f9fe677c8712cb60bcd3b947cb2" have entirely different histories.
502f596c87
...
5400dcfc75
37
README.md
37
README.md
@ -1,26 +1,15 @@
|
|||||||
# dwmblocks
|
# dwmblocks
|
||||||
My personal fork of dwmblocks. Original found
|
Modular status bar for dwm written in c.
|
||||||
[here](https://github.com/torrinfail/dwmblocks).
|
# usage
|
||||||
|
|
||||||
Dwmblocks is a modular status bar for dwm written in c.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
To use dwmblocks first run 'make' and then install it with 'sudo make install'.
|
To use dwmblocks first run 'make' and then install it with 'sudo make install'.
|
||||||
After that you can put dwmblocks in your xinitrc or other startup script to have
|
After that you can put dwmblocks in your xinitrc or other startup script to have it start with dwm.
|
||||||
it start with dwm.
|
# modifying blocks
|
||||||
|
The statusbar is made from text output from commandline programs.
|
||||||
The dwmblocks-pulse-listener program is a small daemon that takes the pid of a
|
Blocks are added and removed by editing the blocks.h header file.
|
||||||
dwmblocks instance and notifies it of pulse audio volume changes.
|
By default the blocks.h header file is created the first time you run make which copies the default config from blocks.def.h.
|
||||||
|
This is so you can edit your status bar commands and they will not get overwritten in a future update.
|
||||||
## Modifying Blocks
|
# patches
|
||||||
The status bar is made from text output from command-line programs. Blocks are
|
Here are some patches to dwmblocks that add features that I either don't want to merge in, or that require a dwm patch to work.
|
||||||
added and removed by editing the blocks.h header file. By default the blocks.h
|
I do not maintain these but I will take pull requests to update them.
|
||||||
header file is created the first time you run make which copies the default
|
<br>
|
||||||
config from blocks.def.h. This is so you can edit your status bar commands and
|
<a href=https://gist.github.com/IGeraGera/e4a5583b91b3eec2e81fdceb44dea717>dwmblocks-statuscmd-b6b0be4.diff</a>
|
||||||
they will not get overwritten in a future update.
|
|
||||||
|
|
||||||
## Other Changes
|
|
||||||
Note that the intervals listed in blocks.h are in milliseconds (1/1000 second).
|
|
||||||
Because of this, the SECONDS() macro is provided for readability. I also
|
|
||||||
implemented some changes from Luke Smith's fork found
|
|
||||||
[here](https://github.com/LukeSmithxyz/dwmblocks).
|
|
||||||
|
@ -7,14 +7,6 @@
|
|||||||
|
|
||||||
#define ERROR(...) fprintf(stderr, "error: " __VA_ARGS__)
|
#define ERROR(...) fprintf(stderr, "error: " __VA_ARGS__)
|
||||||
|
|
||||||
#ifdef __OpenBSD__
|
|
||||||
#define SIGMAX (SIGUSR2 - 1)
|
|
||||||
#define SIGMIN (SIGUSR1 - 1)
|
|
||||||
#else
|
|
||||||
#define SIGMAX SIGRTMAX
|
|
||||||
#define SIGMIN SIGRTMIN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
size_t pid;
|
size_t pid;
|
||||||
unsigned int signum;
|
unsigned int signum;
|
||||||
@ -87,15 +79,15 @@ int main(int argc, const char **argv) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
char *endptr = NULL;
|
char *endptr = NULL;
|
||||||
unsigned int signum = SIGMIN + 1;
|
unsigned int signum = SIGRTMIN + 1;
|
||||||
if (argc >= 3 && argv[1][0] == '-') {
|
if (argc >= 3 && argv[1][0] == '-') {
|
||||||
const char *signumstr = argv[1] + 1;
|
const char *signumstr = argv[1] + 1;
|
||||||
unsigned long num = strtoul(signumstr, &endptr, 10);
|
unsigned long num = strtoul(signumstr, &endptr, 10);
|
||||||
if (num > SIGMAX - SIGMIN) {
|
if (num > (SIGRTMAX - SIGRTMIN) + 1) {
|
||||||
ERROR("signal out of range: %lu\n", num);
|
ERROR("signal out of range: %lu\n", num);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
signum = SIGMIN + num;
|
signum = SIGRTMIN + num;
|
||||||
++argv;
|
++argv;
|
||||||
}
|
}
|
||||||
endptr = NULL;
|
endptr = NULL;
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
#include<X11/Xlib.h>
|
#include<X11/Xlib.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef __OpenBSD__
|
#ifdef __OpenBSD__
|
||||||
#define SIGPLUS (SIGUSR1 + 1)
|
#define SIGPLUS SIGUSR1+1
|
||||||
#define SIGMINUS (SIGUSR1 - 1)
|
#define SIGMINUS SIGUSR1-1
|
||||||
#else
|
#else
|
||||||
#define SIGPLUS SIGRTMIN
|
#define SIGPLUS SIGRTMIN
|
||||||
#define SIGMINUS SIGRTMIN
|
#define SIGMINUS SIGRTMIN
|
||||||
|
Loading…
Reference in New Issue
Block a user