Git Product home page Git Product logo

dwmblocks's Introduction

dwmblocks

Modular status bar for dwm written in c.

usage

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 it start with dwm.

modifying blocks

The statusbar is made from text output from commandline programs. Blocks are added and removed by editing the blocks.h header file. 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.

patches

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. I do not maintain these but I will take pull requests to update them.
dwmblocks-statuscmd-b6b0be4.diff

dwmblocks's People

Contributors

anntnzrb avatar crian avatar igeragera avatar kdkasad avatar keikari avatar markcaudill avatar mehmetumit avatar strahinja avatar tinnamchoi avatar tomboehmer avatar toniz4 avatar torrinfail avatar tph5595 avatar victor-timofei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dwmblocks's Issues

strange objects

Strange triangle objects in between each block, i am guessing it have something to do with the fonts, i am using DejaVuMonoSpace Nerd Font. Is there somethin gi can do to fix this?

The patch from statuscmd in sucless.org throws error

As the patch given in the readme doesn't works I applied this but it too throws this error

dwmblocks.c:57:12: warning: ‘returnStatus’ defined but not used [-Wunused-variable]
   57 | static int returnStatus = 0;
      |   

What should I do?

Support for float intervals?

I noticed that intervals use an int value rather than float; which is potentially limiting to some use cases.

Error when I run make

cp blocks.def.h blocks.h
cc `pkg-config --cflags x11 --libs x11` dwmblocks.c -o dwmblocks
/bin/sh: 1: pkg-config: not found
/usr/bin/ld: /tmp/ccAfJJlF.o: in function `setroot':
dwmblocks.c:(.text+0x3e1): undefined reference to `XStoreName'
/usr/bin/ld: dwmblocks.c:(.text+0x3f0): undefined reference to `XFlush'
/usr/bin/ld: /tmp/ccAfJJlF.o: in function `setupX':
dwmblocks.c:(.text+0x403): undefined reference to `XOpenDisplay'
/usr/bin/ld: /tmp/ccAfJJlF.o: in function `main':
dwmblocks.c:(.text+0x6c7): undefined reference to `XCloseDisplay'
collect2: error: ld returned 1 exit status
make: *** [Makefile:5: output] Error 1

openBSD - does signalling work?

Hi,

I'm using openBSD. I see you've made some commits recently targeting OpenBSD. I'm wondering how I actually make this work?

I seeSIGUSR1 is being used as a base. If I kill -l the SIGUSR1 has a signal value of 30. If I've got a block with an update signal of 10 - I assumed I'd send either kill -40 pidofdwmblocks or pkill -40 dwmblocks - both of these fail with similar to pkill: signalling pid 52624: Invalid argument ? (I've also tried multiple numbers north of 30 to no avail)

How do you send the signal to dwmblocks to "make the magic happen" !

Thanks

Rob

dwmblock stops with error zsh:unknown signal dwmblocks

When I run dwmblocks it will run for a minute or two before stopping with an error from zsh: zsh: unknown signal dwmblocks. It seems to add an extra space in the error message before dwmblocks, so I'm not sure if zsh is just parsing something wrong?

I've looked around but I can't seem to find much about this unknown signal error. Any help would be greatly appreciated!

Not working with autostart

I use Devuan Chimaera, DWM 6.2, and dwmblocks current version.
I have problem with dwmblocks, why mine cant launch automatically with .xinitrc and cool autostart dwm patch?

this is my xinitrc file

exec dwmblocks &
exec dwm

this is my dwm config.h

static const char *const autostart[] = {
"feh", "--bg-fill", "/mnt/430356562D272084/gambarrandom/Evening_on_Karl_Johan_Street.jpg", NULL,
"dwmblocks", NULL,
"mpd", NULL,
"pulseaudio", NULL,
NULL
};

Delimiter doesn't vanish when a module is stopped

I was running an old build of dwmblocks where I had my music module (through mpd) as my first module in blocks.h. It looked something like this:
play-old

However, when I stopped (not paused) my music, the delimiter right next to it would vanish, looking like this:
stop-old

I really like this behaviour and recently I updated my build to be current with this repo, since my old build did not support multicharacter delimiter. Everything works fine but when I stop my music module, the delimiter right next to it stays in place unlike the older build:
stop-new

I've tried looking at dwmblocks.c but am unable to figure out what part of the code is responsible for this behaviour. I know this isn't much of an issue but I'd be glad if you could help me rectify it. Thanks in advance!

Here's the old dwmblocks.c:

#include<stdlib.h>
#include<stdio.h>
#include<string.h>
#include<unistd.h>
#include<signal.h>
#include<X11/Xlib.h>
#define LENGTH(X)               (sizeof(X) / sizeof (X[0]))
#define CMDLENGTH		80

typedef struct {
	char* icon;
	char* command;
	unsigned int interval;
	unsigned int signal;
} Block;
void sighandler(int num);
void getcmds(int time);
#ifndef __OpenBSD__
void getsigcmds(int signal);
void setupsignals();
void sighandler(int signum);
#endif
int getstatus(char *str, char *last);
void setroot();
void statusloop();
void termhandler(int signum);


#include "blocks.h"

static Display *dpy;
static int screen;
static Window root;
static char statusbar[LENGTH(blocks)][CMDLENGTH] = {0};
static char statusstr[2][256];
static int statusContinue = 1;
static void (*writestatus) () = setroot;

//opens process *cmd and stores output in *output
void getcmd(const Block *block, char *output)
{
	strcpy(output, block->icon);
	char *cmd = block->command;
	FILE *cmdf = popen(cmd,"r");
	if (!cmdf)
		return;
	char c;
	int i = strlen(block->icon);
	fgets(output+i, CMDLENGTH-i, cmdf);
	i = strlen(output);
	if (delim != '\0' && --i)
		output[i++] = delim;
	output[i++] = '\0';
	pclose(cmdf);
}

void getcmds(int time)
{
	const Block* current;
	for(int i = 0; i < LENGTH(blocks); i++)
	{	
		current = blocks + i;
		if ((current->interval != 0 && time % current->interval == 0) || time == -1)
			getcmd(current,statusbar[i]);
	}
}

#ifndef __OpenBSD__
void getsigcmds(int signal)
{
	const Block *current;
	for (int i = 0; i < LENGTH(blocks); i++)
	{
		current = blocks + i;
		if (current->signal == signal)
			getcmd(current,statusbar[i]);
	}
}

void setupsignals()
{
	for(int i = 0; i < LENGTH(blocks); i++)
	{	  
		if (blocks[i].signal > 0)
			signal(SIGRTMIN+blocks[i].signal, sighandler);
	}

}
#endif

int getstatus(char *str, char *last)
{
	strcpy(last, str);
	str[0] = '\0';
	for(int i = 0; i < LENGTH(blocks); i++)
		strcat(str, statusbar[i]);
	str[strlen(str)-1] = '\0';
	return strcmp(str, last);//0 if they are the same
}

void setroot()
{
	if (!getstatus(statusstr[0], statusstr[1]))//Only set root if text has changed.
		return;
	Display *d = XOpenDisplay(NULL);
	if (d) {
		dpy = d;
	}
	screen = DefaultScreen(dpy);
	root = RootWindow(dpy, screen);
	XStoreName(dpy, root, statusstr[0]);
	XCloseDisplay(dpy);
}

void pstdout()
{
	if (!getstatus(statusstr[0], statusstr[1]))//Only write out if text has changed.
		return;
	printf("%s\n",statusstr[0]);
	fflush(stdout);
}


void statusloop()
{
#ifndef __OpenBSD__
	setupsignals();
#endif
	int i = 0;
	getcmds(-1);
	while(statusContinue)
	{
		getcmds(i);
		writestatus();
		sleep(1.0);
		i++;
	}
}

#ifndef __OpenBSD__
void sighandler(int signum)
{
	getsigcmds(signum-SIGRTMIN);
	writestatus();
}
#endif

void termhandler(int signum)
{
	statusContinue = 0;
	exit(0);
}

int main(int argc, char** argv)
{
	for(int i = 0; i < argc; i++)
	{	
		if (!strcmp("-d",argv[i]))
			delim = argv[++i][0];
		else if(!strcmp("-p",argv[i]))
			writestatus = pstdout;
	}
	signal(SIGTERM, termhandler);
	signal(SIGINT, termhandler);
	statusloop();
}

BUILD FAILING ON UBUNTU

tried to build using the makefile, it failed in ubuntu (maybe I was missing some libs but I doubt that...)
searching in the internet I came to try : gcc dwmblocks.c -lX11 -o dwmblocks which successfully compiled

dwmblocks modules

hi there, been looking to chekout various dwmblock builds, where can I find your statusbar modules/scripts etc that you are using in your dwmblocks build?

dwmblocks Sometimes stop.

Hi, thanks for dwmblocks
I am using Luke's build of dwmblocks but added some on my own module but once in a while dwmblocks stops running which I have verified from htop. But the problem is there is no set pattern(ie time) on which this happens. To counter this problem I run

kill -HUP $(pidof -s dwm)

This refreshes dwm and dwmblocks itself but not solves the main problem.

FreeBSD signaling

I have a block set to update on signal 1 by sending SIGUSR1, however when I do so, the program closes as if I wanted to kill it. I'm simply running pkill -SIGUSR1 dwmblocks and instead of updating the block, the entire program is permanently killed. How do I fix this? Sorry if it's obvious, I am unfamiliar with signaling.

Errors when Applying dwmblocks-statuscmd.diff to Dwmblocks

Hi there,
I seem to be getting make errors when building dwmblocks after applying dwmblocks-statuscmd-20210402-96cbb45.diff

make
cc  dwmblocks.c -lX11 -o dwmblocks
dwmblocks.c: In function ‘getcmd’:
dwmblocks.c:69:37: error: ‘delimLen’ undeclared (first use in this function); did you mean ‘delim’?
   69 |         fgets(output+i, CMDLENGTH-i-delimLen, cmdf);
      |                                     ^~~~~~~~
      |                                     delim
dwmblocks.c:69:37: note: each undeclared identifier is reported only once for each function it appears in
dwmblocks.c: In function ‘main’:
dwmblocks.c:229:51: error: ‘delimLen’ undeclared (first use in this function); did you mean ‘delim’?
  229 |                         strncpy(delim, argv[++i], delimLen);
      |                                                   ^~~~~~~~
      |                                                   delim

I appreciate the help!

Dwmblocks doesn't display FontAwesome icons

I have a simple bash script which checks how many updates I have available and prints them with some icons, this is the code for it:

#!/bin/bash

while ! nc -zw1 google.com 443 >/dev/null 2>&1; do
  # holds the script until we have network
  sleep 2
done

# total_updates=$(yay -Qu | wc -l)
pacman_updates=$(checkupdates | wc -l)
aur_updates=$(yay -Qua | wc -l)

[[ "$aur_updates" -lt 0 ]] && aur_updates=0 # if its less than 0 we just set it to 0

# echo "Pacman: $pacman_updates"
# echo "AUR: $aur_updates"

red_bound=20

create_string () {
    count="$1"
    prefix="$2" # prefix is the letter before the symbol

    if [[ $count == 0 ]]; then
        echo "<span color='#0BDA51'>$prefix</span>"
    elif [[ $count -ge $red_bound ]]; then
        echo "<span color='red'>$prefix$count</span>"
    else
        echo "<span color='yellow'>$prefix$count</span>"
    fi
}

pacman_string=$(create_string $pacman_updates)
aur_string=$(create_string $aur_updates "Y")

package_list_path="$(chezmoi source-path)"
yay -Qe | cut -f 1 -d " " > $package_list_path/installed-packages-$HOSTNAME.txt

echo "$pacman_string $aur_string"

And when I use it with xsetroot everything works as expected, the Font Awesome characters get printed as expected. However when I call this script from dwmblocks nothing gets printed at all and the title of my current window gets printed instead:
image

Weird boxes appearing in bar.

I have fresh installed Arch Linux on my laptop yesterday and installed DWM for the WM. I also added some patches to it, which includes,

dwm-attachdirection-6.2.diff
dwm-cfacts-vanitygaps-6.2_combo.diff
dwm-movestack-6.1.diff
dwm-pertag-monitorrules-6.2.diff         
dwm-autostart-20210120-cb3f58a.diff
dwm-noborder-6.2.diff
dwm-status2d-20200508-60bb3df.diff                
dwm-bar-height-6.2.diff
dwm-hide_vacant_tags-6.2.diff
dwm-pertag-6.2.diff

and I have also installed the libxft-bgra patch from the AUR and set the font in config.h as,

static const char *fonts[]          = { "FiraMono-Regular:pixelsize=14:antialias=true:autohint=true",
                                        "Mononoki Nerd Font:size=14:antialias=true:autohint=true",
                                        "JoyPixels:size=14:antialias=true:autohint=true",
                                        "Noto Fonts Emoji=14:antialias=true:autohint=true" };

No idea what is causing this issue,
2021-04-04_17-47

No protocol specified Failed to open display

After updating from 904e407 to b7d1970 dwmblocks intermittently crashes with the following messages:

No protocol specified
Failed to open display

The only patch applied is to blocks.def.h:

--- dwmblocks/blocks.def.h      2020-06-22 12:22:39.663038013 +0200
+++ dwmblocks.new/blocks.def.h  2020-06-22 12:26:27.770563841 +0200
@@ -1,11 +1,21 @@
 //Modify this file to change what commands output to your statusbar, and recompile using the make command.
 static const Block blocks[] = {
-       /*Icon*/        /*Command*/             /*Update Interval*/     /*Update Signal*/
-       {"Mem:", "free -h | awk '/^Mem/ { print $3\"/\"$2 }' | sed s/i//g",     30,             0},
-
-       {"", "date '+%b %d (%a) %I:%M%p'",                                      5,              0},
+  /*Icon*/  /*Command*/                     /*Update Interval*/  /*Update Signal*/
+  {"",    "$HOME/bin/status/vpn.sh",        1,                   0},
+  {"",    "$HOME/bin/status/mail.sh",       10,                  0},
+  {"",    "$HOME/bin/status/wired.sh",      10,                  0},
+  {"",    "$HOME/bin/status/wifi.sh",       10,                  0},
+  {"",    "$HOME/bin/status/cpu_load.sh",   5,                   0},
+  {"",    "$HOME/bin/status/cpu_temp.sh",   5,                   0},
+  {"",    "$HOME/bin/status/used_ram.sh",   5,                   0},
+  {"",    "$HOME/bin/status/free_disk.sh",  10,                  0},
+  {"",    "$HOME/bin/status/bat.sh",        10,                  0},
+  {"",    "$HOME/bin/status/airpods.sh",    5,                   0},
+  {"",    "$HOME/bin/status/pacman.sh",     60,                  0},
+  {"",    "$HOME/bin/status/volume.sh",     1,                   0},
+  {"",    "$HOME/bin/status/clock.sh",      1,                   0},
 };

 //sets delimeter between status commands. NULL character ('\0') means no delimeter.
-static char delim[] = " | ";
+static char delim[] = "|";
 static unsigned int delimLen = 5;

Error while compiling "error: unknown type name ‘Block’"

When I want to compile it (in kubuntu 20.04) with this command: cc -lX11 blocks.h dwmblocks.c -o dwmblocks
it says:

cc -lX11 blocks.h dwmblocks.c -o dwmblocks 
blocks.h:2:14: error: unknown type name ‘Block’
    2 | static const Block blocks[] = {
      |              ^~~~~
blocks.h:4:2: warning: braces around scalar initializer
    4 |  {"Mem:", "free -h | awk '/^Mem/ { print $3\"/\"$2 }' | sed s/i//g", 30,  0},
      |  ^
blocks.h:4:2: note: (near initialization for ‘blocks[0]’)
blocks.h:4:3: warning: initialization of ‘int’ from ‘char *’ makes integer from pointer without a cast [-Wint-conversion]
    4 |  {"Mem:", "free -h | awk '/^Mem/ { print $3\"/\"$2 }' | sed s/i//g", 30,  0},
      |   ^~~~~~
blocks.h:4:3: note: (near initialization for ‘blocks[0]’)
blocks.h:4:3: error: initializer element is not computable at load time
blocks.h:4:3: note: (near initialization for ‘blocks[0]’)
blocks.h:4:11: warning: excess elements in scalar initializer
    4 |  {"Mem:", "free -h | awk '/^Mem/ { print $3\"/\"$2 }' | sed s/i//g", 30,  0},
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blocks.h:4:11: note: (near initialization for ‘blocks[0]’)
blocks.h:4:70: warning: excess elements in scalar initializer
    4 |  {"Mem:", "free -h | awk '/^Mem/ { print $3\"/\"$2 }' | sed s/i//g", 30,  0},
      |                                                                      ^~
blocks.h:4:70: note: (near initialization for ‘blocks[0]’)
blocks.h:4:75: warning: excess elements in scalar initializer
    4 |  {"Mem:", "free -h | awk '/^Mem/ { print $3\"/\"$2 }' | sed s/i//g", 30,  0},
      |                                                                           ^
blocks.h:4:75: note: (near initialization for ‘blocks[0]’)
blocks.h:6:2: warning: braces around scalar initializer
    6 |  {"", "date '+%b %d (%a) %I:%M%p'",     5,  0},
      |  ^
blocks.h:6:2: note: (near initialization for ‘blocks[1]’)
blocks.h:6:3: warning: initialization of ‘int’ from ‘char *’ makes integer from pointer without a cast [-Wint-conversion]
    6 |  {"", "date '+%b %d (%a) %I:%M%p'",     5,  0},
      |   ^~
blocks.h:6:3: note: (near initialization for ‘blocks[1]’)
blocks.h:6:3: error: initializer element is not computable at load time
blocks.h:6:3: note: (near initialization for ‘blocks[1]’)
blocks.h:6:7: warning: excess elements in scalar initializer
    6 |  {"", "date '+%b %d (%a) %I:%M%p'",     5,  0},
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
blocks.h:6:7: note: (near initialization for ‘blocks[1]’)
blocks.h:6:41: warning: excess elements in scalar initializer
    6 |  {"", "date '+%b %d (%a) %I:%M%p'",     5,  0},
      |                                         ^
blocks.h:6:41: note: (near initialization for ‘blocks[1]’)
blocks.h:6:45: warning: excess elements in scalar initializer
    6 |  {"", "date '+%b %d (%a) %I:%M%p'",     5,  0},
      |                                             ^
blocks.h:6:45: note: (near initialization for ‘blocks[1]’)

How can a dwmblock update its output based on $BUTTON?

Problem

I have a simple bash script myscript.sh:

#!/usr/bin/bash

clicked="none"

case $BUTTON in
    1) notify-send hello; clicked="left";;
    3) notify-send goodbye; clicked="right";;
esac

printf $clicked

and I have this in dwmblocks/blocks.h:

//Modify this file to change what commands output to your statusbar, and recompile using the make command.
static const Block blocks[] = {
	/*Icon*/	/*Command*/		/*Update Interval*/	/*Update Signal*/
    { "my script: ", "myscript.sh", 0, 12},
};

//sets delimeter between status commands. NULL character ('\0') means no delimeter.
static char delim[] = " | ";
static unsigned int delimLen = 5;

and this in dwm/config.h:

static const Button buttons[] = {
//  ...
	{ ClkStatusText,        0,              Button1,        sigdwmblocks,   {.i = 1} },
	{ ClkStatusText,        0,              Button2,        sigdwmblocks,   {.i = 2} },
	{ ClkStatusText,        0,              Button3,        sigdwmblocks,   {.i = 3} },
// ...

What I would like to happen is for the block to display "my script: none" at first, and every time I left-click it I would like it to display "my script: left", and "my script: right" every time I right-click it.

The current behavior is that when I left-click the block, notify-send works and I get a notification saying "hello", and when I right-click it I get a notification saying "goodbye", but the $clicked variable stays the same for some reason, it doesn't change even though I update it's value after calling notify-send.

What am I missing?

Patches

I applied this patch to dwm: https://dwm.suckless.org/patches/statuscmd/dwm-statuscmd-20210405-67d76bd.diff

and this one to dwmblocks: https://dwm.suckless.org/patches/statuscmd/dwmblocks-statuscmd-20210402-96cbb45.diff

Build failed on Debian Bullseye

Hi, i got this error when running make on debian bullseye(testing)

cc `pkg-config --cflags x11` `pkg-config --libs x11` dwmblocks.c -o dwmblocks
/usr/bin/ld: /tmp/cchx5S7i.o: in function `setroot':
dwmblocks.c:(.text+0x39e): undefined reference to `XOpenDisplay'
/usr/bin/ld: dwmblocks.c:(.text+0x410): undefined reference to `XStoreName'
/usr/bin/ld: dwmblocks.c:(.text+0x41f): undefined reference to `XCloseDisplay'
collect2: error: ld returned 1 exit status
make: *** [Makefile:4: output] Error 1

How can I run this on OpenBSD?

Hi, I was wondering if you could help me run this on OpenBSD. In Suckless programs, you can go into config.mk and uncomment the line that it tells you will make it build on OpenBSD. But I'm not sure about here.

Can you help?

Conditional icons

This would probably be considered more of a feature request than an "issue": I think having some way to implement "conditional" icons would be useful—for example, a different battery icon based on levels or different volume indicated based on muted/unmuted. I tried implementing this in the scripts I used themselves and tried to opt for no icon (""), and that seems to work fine, but implementing it directly into this program could be nice.

Volume display on OpenBSD

When I was using i3blocks, I was able to enter either while true; do [command]; sleep 0.1 to update a command every 0.1 seconds. Now I've read that you can use signals to tell it when to update since the program does not support floating numbers. What is the signal that I need to use for it to update? I think it was 10 when I used Linux but since I am on OpenBSD I think that it's different. However, the ones I have tried (23 and 32) do not seem to work.

Script not showing what it should

I have this script that shows the SSID and signal bars of the wifi network that I'm connect to.

#!/bin/sh
SSID=$(nmcli device wifi list | grep "*" | awk '{print $3}')
BARS=$(nmcli device wifi list | grep "*" | awk '{print $9}')

echo $SSID $BARS

When I run it in my terminal (st) it shows this
image

But this is what is shown in dwm bar
image

This is my blocks.def.h

//Modify this file to change what commands output to your statusbar, and recompile using the make command.
static const Block blocks[] = {
	/*Icon*/	/*Command*/		/*Update Interval*/	/*Update Signal*/
	{" ", "dwm-wifi",					20,		0},
	{"", "dwm-simple-battery",					60,		0},
	{" ", "dwmdate",					0,		0},
	{" ", "dwmclock",					1,		0},
};

//sets delimeter between status commands. NULL character ('\0') means no delimeter.
static char delim[] = " ";
static unsigned int delimLen = 5;

I've seen it display the files in my home directory too which is weird

dwmblocks not handling more than 5 blocks

Hello there

So I have been using dwmblocks for a while on my desktop (running void) and have had no problem with it. last night I tried my build on my laptop (running manjaro) and it was working fine until I added a battery block, at first i assumed it had to do with my battery scripts, but that was not the case, as if I disable any of the six blocks I have, dwmblocks works fine, If i re-enable the disabled one, I get the following message

fish: “dwmblocks” terminated by signal SIGSEGV (Address boundary error)

My blocks.h file

//Modify this file to change what commands output to your statusbar, and recompile using the make command.
static const Block blocks[] = {
	/*Icon*/	/*Command*/		/*Update Interval*/	/*Update Signal*/
	{"",      "kbdlayout",	  0,		 9},

	{"",      "brightness",	  0,		 11},

	{"",      "volume",				0,		 10},

	{"",      "clock",				60,		  0},

  {"",      "battery",			10,		  0},

	{"",     "internet",			60,		  0},
};

//sets delimeter between status commands. NULL character ('\0') means no delimeter.
static char delim = ' ';

please let me know if you need further details. thanks in advance.

clicks not working on certain modules

clicks are working on the first two leftmost modules but after that they are not working on next modules and there's more to it. when i click on any of those modules the command of left block is called. to help you visualize, let's say i have these modules on my bar:

tags________ window title______________________________diskspace | volume | memusage | cpuusage | cputemp | date.
image

now, only the diskspace and volume modules work when i click on them. when i click on say, memusage or anything to the right of it, the script of volume is run with the corresponding $BUTTON variable set.
is this an issue on your side? or? my dwm patch and dwmblocks patches are correct afaik and i've spent the past 6 hours trying to find what's causing the issue, but it's all in vain. if you doubt whether i did my patches correct you can check it out at my dwm repo or dwmblocks repo. thanks!

EDIT1: i even tried luke's dwm and dwmblocks build, it's still the same so i don't think it's an issue w my build

Fails to compile

When I run sudo make clean install I get this error:

rm -f *.o *.gch dwmblocks
cc `pkg-config --cflags x11` `pkg-config --libs x11` dwmblocks.c -o dwmblocks
/tmp/cct2d6ET.o: In function `setroot':
dwmblocks.c:(.text+0x3d9): undefined reference to `XOpenDisplay'
dwmblocks.c:(.text+0x44b): undefined reference to `XStoreName'
dwmblocks.c:(.text+0x45a): undefined reference to `XCloseDisplay'
collect2: error: ld returned 1 exit status
Makefile:4: recipe for target 'output' failed
make: *** [output] Error 1

I am running ubuntu 18.04 and have libx11-dev installed. Are there any other packages I need or is this broken?

patch for dwmblocks clickable modules

so since by your previous comment i realize you don't even realize how dwmblocks is actually popular, I wanted to share to you a patch made for your dwmblocks & statuscmd patch modified to be used with dwmblocks to have fully clickable modules in dwmblocks

dwmblocks + dmw statuscmd signal patch

this allows full clickability and compatibility with i3blocks modules ;)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.