summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaslo Hunhold <dev@frign.de>2017-09-24 15:33:01 +0200
committerAaron Marcher <me@drkhsh.at>2017-09-24 17:20:27 +0200
commit7246dc4381c6c95454672a5c1aff65a02d6d3747 (patch)
tree2264b09abf2e57daee396b632573f4b81e47aa59
parent61e44e894890c1521a01148fbf969cbd4dbb4cae (diff)
Move components into dedicated subdirectory
This brings us a lot more tidiness.
-rw-r--r--Makefile42
-rw-r--r--components/battery.c (renamed from battery.c)2
-rw-r--r--components/cpu.c (renamed from cpu.c)2
-rw-r--r--components/datetime.c (renamed from datetime.c)2
-rw-r--r--components/disk.c (renamed from disk.c)2
-rw-r--r--components/entropy.c (renamed from entropy.c)2
-rw-r--r--components/hostname.c (renamed from hostname.c)2
-rw-r--r--components/ip.c (renamed from ip.c)2
-rw-r--r--components/kernel_release.c (renamed from kernel_release.c)2
-rw-r--r--components/keyboard_indicators.c (renamed from keyboard_indicators.c)2
-rw-r--r--components/load_avg.c (renamed from load_avg.c)2
-rw-r--r--components/num_files.c (renamed from num_files.c)2
-rw-r--r--components/ram.c (renamed from ram.c)2
-rw-r--r--components/run_command.c (renamed from run_command.c)2
-rw-r--r--components/swap.c (renamed from swap.c)2
-rw-r--r--components/temperature.c (renamed from temperature.c)2
-rw-r--r--components/uptime.c (renamed from uptime.c)2
-rw-r--r--components/user.c (renamed from user.c)2
-rw-r--r--components/volume.c (renamed from volume.c)2
-rw-r--r--components/wifi.c (renamed from wifi.c)2
20 files changed, 40 insertions, 40 deletions
diff --git a/Makefile b/Makefile
index 1a90431..00c35c4 100644
--- a/Makefile
+++ b/Makefile
@@ -6,25 +6,25 @@ include config.mk
REQ = util
COM =\
- battery\
- cpu\
- datetime\
- disk\
- entropy\
- hostname\
- ip\
- kernel_release\
- keyboard_indicators\
- load_avg\
- num_files\
- ram\
- run_command\
- swap\
- temperature\
- uptime\
- user\
- volume\
- wifi
+ components/battery\
+ components/cpu\
+ components/datetime\
+ components/disk\
+ components/entropy\
+ components/hostname\
+ components/ip\
+ components/kernel_release\
+ components/keyboard_indicators\
+ components/load_avg\
+ components/num_files\
+ components/ram\
+ components/run_command\
+ components/swap\
+ components/temperature\
+ components/uptime\
+ components/user\
+ components/volume\
+ components/wifi
all: slstatus
@@ -39,14 +39,14 @@ config.h:
$(CC) -o $@ $(LDFLAGS) $< $(COM:=.o) $(REQ:=.o) $(LDLIBS)
.c.o:
- $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
+ $(CC) -o $@ -c $(CPPFLAGS) $(CFLAGS) $<
clean:
rm -f slstatus slstatus.o $(COM:=.o) $(REQ:=.o)
dist:
rm -rf "slstatus-$(VERSION)"
- mkdir -p "slstatus-$(VERSION)"
+ mkdir -p "slstatus-$(VERSION)/components"
cp -R LICENSE Makefile README config.mk config.def.h \
arg.h slstatus.c $(COM:=.c) $(REQ:=.c) $(REQ:=.h) \
slstatus.1 "slstatus-$(VERSION)"
diff --git a/battery.c b/components/battery.c
index 0cea55c..f384aab 100644
--- a/battery.c
+++ b/components/battery.c
@@ -3,7 +3,7 @@
#include <stdio.h>
#include <string.h>
-#include "util.h"
+#include "../util.h"
const char *
battery_perc(const char *bat)
diff --git a/cpu.c b/components/cpu.c
index b4b7ef1..4a4a80b 100644
--- a/cpu.c
+++ b/components/cpu.c
@@ -2,7 +2,7 @@
#include <stdio.h>
#include <string.h>
-#include "util.h"
+#include "../util.h"
const char *
cpu_freq(void)
diff --git a/datetime.c b/components/datetime.c
index 98510e3..0816923 100644
--- a/datetime.c
+++ b/components/datetime.c
@@ -1,7 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <time.h>
-#include "util.h"
+#include "../util.h"
const char *
datetime(const char *fmt)
diff --git a/disk.c b/components/disk.c
index 51cdaaa..90a8e0b 100644
--- a/disk.c
+++ b/components/disk.c
@@ -3,7 +3,7 @@
#include <stdio.h>
#include <sys/statvfs.h>
-#include "util.h"
+#include "../util.h"
const char *
disk_free(const char *mnt)
diff --git a/entropy.c b/components/entropy.c
index 211022a..0d3564e 100644
--- a/entropy.c
+++ b/components/entropy.c
@@ -1,7 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
-#include "util.h"
+#include "../util.h"
const char *
entropy(void)
diff --git a/hostname.c b/components/hostname.c
index 0ad1f3b..aed77a6 100644
--- a/hostname.c
+++ b/components/hostname.c
@@ -2,7 +2,7 @@
#include <err.h>
#include <unistd.h>
-#include "util.h"
+#include "../util.h"
const char *
hostname(void)
diff --git a/ip.c b/components/ip.c
index a042c79..f98b2ed 100644
--- a/ip.c
+++ b/components/ip.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <string.h>
-#include "util.h"
+#include "../util.h"
const char *
ipv4(const char *iface)
diff --git a/kernel_release.c b/components/kernel_release.c
index abe0acd..f539b6a 100644
--- a/kernel_release.c
+++ b/components/kernel_release.c
@@ -2,7 +2,7 @@
#include <sys/utsname.h>
#include <stdio.h>
-#include "util.h"
+#include "../util.h"
const char *
kernel_release(void)
diff --git a/keyboard_indicators.c b/components/keyboard_indicators.c
index 13e8648..b7713b6 100644
--- a/keyboard_indicators.c
+++ b/components/keyboard_indicators.c
@@ -2,7 +2,7 @@
#include <err.h>
#include <X11/Xlib.h>
-#include "util.h"
+#include "../util.h"
const char *
keyboard_indicators(void)
diff --git a/load_avg.c b/components/load_avg.c
index ad22ae4..d6f6bd4 100644
--- a/load_avg.c
+++ b/components/load_avg.c
@@ -2,7 +2,7 @@
#include <err.h>
#include <stdlib.h>
-#include "util.h"
+#include "../util.h"
const char *
load_avg(const char *fmt)
diff --git a/num_files.c b/components/num_files.c
index 778b8b9..a8a3894 100644
--- a/num_files.c
+++ b/components/num_files.c
@@ -4,7 +4,7 @@
#include <stdio.h>
#include <string.h>
-#include "util.h"
+#include "../util.h"
const char *
num_files(const char *dir)
diff --git a/ram.c b/components/ram.c
index def27aa..f696039 100644
--- a/ram.c
+++ b/components/ram.c
@@ -1,7 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
-#include "util.h"
+#include "../util.h"
const char *
ram_free(void)
diff --git a/run_command.c b/components/run_command.c
index 7aa6c4f..99f54ea 100644
--- a/run_command.c
+++ b/components/run_command.c
@@ -3,7 +3,7 @@
#include <stdio.h>
#include <string.h>
-#include "util.h"
+#include "../util.h"
const char *
run_command(const char *cmd)
diff --git a/swap.c b/components/swap.c
index 93111c5..e4eec64 100644
--- a/swap.c
+++ b/components/swap.c
@@ -3,7 +3,7 @@
#include <stdio.h>
#include <string.h>
-#include "util.h"
+#include "../util.h"
const char *
swap_free(void)
diff --git a/temperature.c b/components/temperature.c
index 2c78ced..bbd4daf 100644
--- a/temperature.c
+++ b/components/temperature.c
@@ -1,7 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
-#include "util.h"
+#include "../util.h"
const char *
temp(const char *file)
diff --git a/uptime.c b/components/uptime.c
index 827381b..b455182 100644
--- a/uptime.c
+++ b/components/uptime.c
@@ -1,7 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <sys/sysinfo.h>
-#include "util.h"
+#include "../util.h"
const char *
uptime(void)
diff --git a/user.c b/components/user.c
index 851acb4..8dcb86a 100644
--- a/user.c
+++ b/components/user.c
@@ -4,7 +4,7 @@
#include <sys/types.h>
#include <unistd.h>
-#include "util.h"
+#include "../util.h"
const char *
gid(void)
diff --git a/volume.c b/components/volume.c
index 0074754..f5aa18d 100644
--- a/volume.c
+++ b/components/volume.c
@@ -7,7 +7,7 @@
#include <string.h>
#include <unistd.h>
-#include "util.h"
+#include "../util.h"
const char *
vol_perc(const char *card)
diff --git a/wifi.c b/components/wifi.c
index 41ae4c6..30b57ab 100644
--- a/wifi.c
+++ b/components/wifi.c
@@ -9,7 +9,7 @@
#include <sys/ioctl.h>
#include <unistd.h>
-#include "util.h"
+#include "../util.h"
const char *
wifi_perc(const char *iface)