snobb / dwm-statusbar Goto Github PK
View Code? Open in Web Editor NEWSuper simple status-bar for dwm
License: MIT License
Super simple status-bar for dwm
License: MIT License
Whenever I run statusbar it suffers a segmentation fault and ends abruptely. Everything is using the default configuration except the wireless interface name (set to wlp1s0), the compiler (set to cc) and the installation path (set to /usr/bin).
the "build_host.h" file generates the following:
#define BUILD_HOST "arch" #define BUILD_OS "Linux" #define BUILD_PLATFORM "x86_64" #define BUILD_KERNEL "4.15.15-1-ARCH" #define BUILD_VERSION "37.a855ee7" #define BAT_NOW "/charge_now" #define BAT_FULL "/charge_full" #define BAT_STAT "/status" #define LNK_PATH "/sys/class/net/wlp1s0/operstate"
It seems like the LFLAGS isn't quite in the correct spot for newer gcc?
gcc -Wall -std=c99 -pedantic -O3 -c statusbar.c
gcc -lX11 -o statusbar statusbar.o
statusbar.o: In function `set_status':
statusbar.c:(.text+0x25): undefined reference to `XStoreName'
statusbar.o: In function `close_display':
statusbar.c:(.text+0x4c): undefined reference to `XCloseDisplay'
statusbar.o: In function `set_status':
statusbar.c:(.text+0x37): undefined reference to `XSync'
statusbar.o: In function `main':
statusbar.c:(.text.startup+0x92): undefined reference to `XOpenDisplay'
statusbar.c:(.text.startup+0x3be): undefined reference to `XStoreName'
statusbar.c:(.text.startup+0x3cc): undefined reference to `XSync'
collect2: error: ld returned 1 exit status
Makefile:62: recipe for target 'statusbar' failed
make: *** [statusbar] Error 1
This seems to fix the issue:
diff --git a/Makefile b/Makefile
index 08945c8..7354c99 100644
--- a/Makefile
+++ b/Makefile
@@ -59,7 +59,7 @@ install: release
@echo "DONE"
${TARGET}: build_host.h ${OBJ}
- ${CC} ${LFLAGS} -o $@ ${OBJ}
+ ${CC} -o $@ ${OBJ} ${LFLAGS}
%.o: %.c
${CC} ${CFLAGS} -c $?
Can you kindly add a license to the repository?
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.