41 Commits (5d6415608b37ebed185e00eae01eb743edb555e5)

Author SHA1 Message Date
Laslo Hunhold cd884c2f0a Fix object order and stop using a GNU make idiom 8 years ago
Laslo Hunhold 0efd64ffaa Explicitly list component-objects in the Makefile
There was a long tinkering process at farbfeld about this, but the sad
truth is that it's the only way to make the Makefile truly portable.
Listing it just as

   $(COM:=.o): config.mk $(REQ:=.h)

omits the dependency on the c-file itself, which incurs that strictly
speaking the object file is not depending on the source file, which is
nonsense.

You don't see strictly Posix compliant Makefiles around very often and
most use nasty GNU-extensions everywhere. It is a good idea to go ahead
as a fitting example and show how to write them portably.
8 years ago
Aaron Marcher c28643ce5b Revert "Add basic backlight percentage support"
On OpenBSD the backlight percentage cannot be retrieved in a simple way.
The only two solutions we are aware of for now are:

 - reading from /dev/ttyC0: which isn't possible without changing
 permissions or running slstatus as root
 - linking against xcb-xrandr: which is bloat and does not work in every
 case appearently

This reverts commit 37724ac2c3 for now.
8 years ago
Michael Buch 943b42de05 Add keymap component
Adding a new keymap component that will
indicate the current keyboard layout (language)
and variant if any was set. I use the
standard X11 XKB APIs to retrieve and parse
the xkb_symbols set with setxkbmap.
8 years ago
David Demelier 37724ac2c3 Add basic backlight percentage support
At the moment linux only, but will add support for OpenBSD as well.
8 years ago
Aaron Marcher 0d05b3d13d Add network speed functions 8 years ago
Laslo Hunhold 24b663d657 Tweak build system a little bit
Be consistent with brackets and add a comment for OpenBSD to make it
clearer what the actual intent of the uncommented line is.

In the Makefile, add a dependency of slstatus.o from config.mk.
8 years ago
Laslo Hunhold 42edfea89a Revert component-split
this reverts the commits from 92ab9ef52e up to
d42870d6ca.

After heavy consideration, the component split has more disadvantages
than advantages, especially given there will be utility-functions
sharing quite a lot of code that would then need to be duplicated, as it
does not fit into the util.c due to its speciality.

One big advantage of the component-wise build is readability, and
without doubt, this was achieved here. This point will be addressed
with a different approach that will be visible in the upcoming commits.

One big disadvantage of the component build is the fact that it
introduces state to the build process which is not necessary. Before its
introduction, the only influencing factors where the system-defines
__linux__ and __OpenBSD__. With the components, we are also relying on
the output of uname(1).
Additionally, if the os.mk is not present, make gives the output

     $ make
     Makefile:5: os.mk: No such file or directory
     make: *** No rule to make target 'os.mk'.  Stop.

This could easily be fixed by providing some sort of meta-rule for this
file, however, it indicates the problem we have here, and this entire
statefulness will heavily complicate packaging of this tool and makes
the build process much more complex than it actually has to be.
8 years ago
Quentin Rameau d42870d6ca Makefile: add distclean target 8 years ago
Quentin Rameau 2ea3d46f13 Makefile: move OS-specific libs to configure script 8 years ago
Quentin Rameau 95665e437b Makefile: separate default flags from user flags 8 years ago
Quentin Rameau 97ff66522c wifi: OS split 8 years ago
Quentin Rameau 19f3c8f545 uptime: OS split 8 years ago
Quentin Rameau 71eb1d321d temperature: OS split 8 years ago
Quentin Rameau 72f5a0d69a swap: OS split 8 years ago
Quentin Rameau 259e106b4f ram: OS split 8 years ago
Quentin Rameau 3cc649e34c entropy: OS split 8 years ago
Quentin Rameau f088dbfea0 cpu: OS split 8 years ago
Quentin Rameau 720569bd56 battery: OS split 8 years ago
Quentin Rameau 92ab9ef52e Makefile: detect running OS 8 years ago
Laslo Hunhold 7246dc4381
Move components into dedicated subdirectory
This brings us a lot more tidiness.
8 years ago
Laslo Hunhold 61e44e8948
Get rid of HDR variable
The HDR variable is used for general purpose headers, which are not
given in this project. arg.h and config.h are only needed for
slstatus.c, not every component $(COM:=.c).

This also fixes a problem introduced in
e04a385364, where config.h is pulled into
the tarball.
9 years ago
Laslo Hunhold f56e50a269
Simplify Makefile 9 years ago
Quentin Rameau e04a385364
Fix missing config.h in Makefile 9 years ago
Laslo Hunhold eea99fc0ac
Rewrite Makefile to accomodate file split 9 years ago
Aaron Marcher aa17443013
Added Makefile target for distribution tarballs. 9 years ago
Laslo Hunhold 8dad4910bf
Refactor build system 9 years ago
Aaron Marcher 3f976aabc0
Makefile fix and vol_perc fix for mute 9 years ago
Aaron Marcher a3cb24c438
simplified Makefile 9 years ago
Aaron Marcher 09c3ffe33b
small Makefile tweak 9 years ago
Aaron Marcher bb87736518
Makefile: Added back config.h handling in Makefile 9 years ago
Aaron Marcher 98d655c8d0
Makefile: Fixes #35 9 years ago
Aaron Marcher d1915f0d4d
saner makefile: cleaner, simpler, suckless 9 years ago
Aaron Marcher 8fa6229759
why releases for such a small project? useless and overhead! 9 years ago
Aaron Marcher 4a7aba5151 added man page 10 years ago
Aaron Marcher 6edc959933 do not overwrite config.h if config.def.h changes 10 years ago
Ali H. Fardan 720328cef9 what kind of weed is that? 10 years ago
Ali H. Fardan 9fa858daea added a tool for resetting the status bar && worked around some issues && removed the makefile (we need a better one) 10 years ago
Daniel Walter 410ba38a01 make config.h target depending on config.def.h 10 years ago
Aaron Marcher 864f2246b5 added config.def.h handling and fixed typo 10 years ago
Aaron Marcher 94ea78f0fe initial commit 10 years ago