Move components into dedicated subdirectory
This brings us a lot more tidiness.
This commit is contained in:
parent
61e44e8948
commit
7246dc4381
42
Makefile
42
Makefile
|
@ -6,25 +6,25 @@ include config.mk
|
||||||
|
|
||||||
REQ = util
|
REQ = util
|
||||||
COM =\
|
COM =\
|
||||||
battery\
|
components/battery\
|
||||||
cpu\
|
components/cpu\
|
||||||
datetime\
|
components/datetime\
|
||||||
disk\
|
components/disk\
|
||||||
entropy\
|
components/entropy\
|
||||||
hostname\
|
components/hostname\
|
||||||
ip\
|
components/ip\
|
||||||
kernel_release\
|
components/kernel_release\
|
||||||
keyboard_indicators\
|
components/keyboard_indicators\
|
||||||
load_avg\
|
components/load_avg\
|
||||||
num_files\
|
components/num_files\
|
||||||
ram\
|
components/ram\
|
||||||
run_command\
|
components/run_command\
|
||||||
swap\
|
components/swap\
|
||||||
temperature\
|
components/temperature\
|
||||||
uptime\
|
components/uptime\
|
||||||
user\
|
components/user\
|
||||||
volume\
|
components/volume\
|
||||||
wifi
|
components/wifi
|
||||||
|
|
||||||
all: slstatus
|
all: slstatus
|
||||||
|
|
||||||
|
@ -39,14 +39,14 @@ config.h:
|
||||||
$(CC) -o $@ $(LDFLAGS) $< $(COM:=.o) $(REQ:=.o) $(LDLIBS)
|
$(CC) -o $@ $(LDFLAGS) $< $(COM:=.o) $(REQ:=.o) $(LDLIBS)
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
$(CC) -o $@ -c $(CPPFLAGS) $(CFLAGS) $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f slstatus slstatus.o $(COM:=.o) $(REQ:=.o)
|
rm -f slstatus slstatus.o $(COM:=.o) $(REQ:=.o)
|
||||||
|
|
||||||
dist:
|
dist:
|
||||||
rm -rf "slstatus-$(VERSION)"
|
rm -rf "slstatus-$(VERSION)"
|
||||||
mkdir -p "slstatus-$(VERSION)"
|
mkdir -p "slstatus-$(VERSION)/components"
|
||||||
cp -R LICENSE Makefile README config.mk config.def.h \
|
cp -R LICENSE Makefile README config.mk config.def.h \
|
||||||
arg.h slstatus.c $(COM:=.c) $(REQ:=.c) $(REQ:=.h) \
|
arg.h slstatus.c $(COM:=.c) $(REQ:=.c) $(REQ:=.h) \
|
||||||
slstatus.1 "slstatus-$(VERSION)"
|
slstatus.1 "slstatus-$(VERSION)"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
battery_perc(const char *bat)
|
battery_perc(const char *bat)
|
|
@ -2,7 +2,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
cpu_freq(void)
|
cpu_freq(void)
|
|
@ -1,7 +1,7 @@
|
||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
datetime(const char *fmt)
|
datetime(const char *fmt)
|
|
@ -3,7 +3,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/statvfs.h>
|
#include <sys/statvfs.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
disk_free(const char *mnt)
|
disk_free(const char *mnt)
|
|
@ -1,7 +1,7 @@
|
||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
entropy(void)
|
entropy(void)
|
|
@ -2,7 +2,7 @@
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
hostname(void)
|
hostname(void)
|
|
@ -5,7 +5,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
ipv4(const char *iface)
|
ipv4(const char *iface)
|
|
@ -2,7 +2,7 @@
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
kernel_release(void)
|
kernel_release(void)
|
|
@ -2,7 +2,7 @@
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
keyboard_indicators(void)
|
keyboard_indicators(void)
|
|
@ -2,7 +2,7 @@
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
load_avg(const char *fmt)
|
load_avg(const char *fmt)
|
|
@ -4,7 +4,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
num_files(const char *dir)
|
num_files(const char *dir)
|
|
@ -1,7 +1,7 @@
|
||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
ram_free(void)
|
ram_free(void)
|
|
@ -3,7 +3,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
run_command(const char *cmd)
|
run_command(const char *cmd)
|
|
@ -3,7 +3,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
swap_free(void)
|
swap_free(void)
|
|
@ -1,7 +1,7 @@
|
||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
temp(const char *file)
|
temp(const char *file)
|
|
@ -1,7 +1,7 @@
|
||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
#include <sys/sysinfo.h>
|
#include <sys/sysinfo.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
uptime(void)
|
uptime(void)
|
|
@ -4,7 +4,7 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
gid(void)
|
gid(void)
|
|
@ -7,7 +7,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
vol_perc(const char *card)
|
vol_perc(const char *card)
|
|
@ -9,7 +9,7 @@
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
wifi_perc(const char *iface)
|
wifi_perc(const char *iface)
|
Loading…
Reference in New Issue