]> Skullheadx's Git Forge - slstatus.git/commitdiff
Move components into dedicated subdirectory
authorLaslo Hunhold <dev@frign.de>
Sun, 24 Sep 2017 13:33:01 +0000 (15:33 +0200)
committerAaron Marcher <me@drkhsh.at>
Sun, 24 Sep 2017 15:20:27 +0000 (17:20 +0200)
This brings us a lot more tidiness.

20 files changed:
Makefile
components/battery.c [moved from battery.c with 98% similarity]
components/cpu.c [moved from cpu.c with 98% similarity]
components/datetime.c [moved from datetime.c with 91% similarity]
components/disk.c [moved from disk.c with 98% similarity]
components/entropy.c [moved from entropy.c with 91% similarity]
components/hostname.c [moved from hostname.c with 91% similarity]
components/ip.c [moved from ip.c with 98% similarity]
components/kernel_release.c [moved from kernel_release.c with 92% similarity]
components/keyboard_indicators.c [moved from keyboard_indicators.c with 95% similarity]
components/load_avg.c [moved from load_avg.c with 93% similarity]
components/num_files.c [moved from num_files.c with 96% similarity]
components/ram.c [moved from ram.c with 98% similarity]
components/run_command.c [moved from run_command.c with 95% similarity]
components/swap.c [moved from swap.c with 99% similarity]
components/temperature.c [moved from temperature.c with 91% similarity]
components/uptime.c [moved from uptime.c with 92% similarity]
components/user.c [moved from user.c with 95% similarity]
components/volume.c [moved from volume.c with 97% similarity]
components/wifi.c [moved from wifi.c with 98% similarity]

index 1a90431001ab7e2cb33d7292eca749ebd13e7b97..00c35c4d61bb1ebcfa591d81b2aac1c2ce8868e9 100644 (file)
--- 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)"
similarity index 98%
rename from battery.c
rename to components/battery.c
index 0cea55c8fb5cb6ca8223b37218d75b3b1af5b341..f384aab11b864b345b64120f4547eb6c6d787d32 100644 (file)
--- a/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)
similarity index 98%
rename from cpu.c
rename to components/cpu.c
index b4b7ef1c64d22ff0ef5ec4d768417ff1d9edfaee..4a4a80bb98a83b7f64bfa4d8536deae422a9e6ac 100644 (file)
--- a/cpu.c
@@ -2,7 +2,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 cpu_freq(void)
similarity index 91%
rename from datetime.c
rename to components/datetime.c
index 98510e3d8c4d9d1f412a795328edcce5523e9f6f..08169234671316b5ad4258a0c77b23fa005b7691 100644 (file)
@@ -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)
similarity index 98%
rename from disk.c
rename to components/disk.c
index 51cdaaa9619c7643248c6cc74d8826cedbd9a5a6..90a8e0bcc850a7b446a5e6d6d780245b512d9811 100644 (file)
--- a/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)
similarity index 91%
rename from entropy.c
rename to components/entropy.c
index 211022ae84cf8014c9a5fcee2979a922e6cca5f5..0d3564ea1de68d7a5f346b36051fa36d4307a5bb 100644 (file)
--- a/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)
similarity index 91%
rename from hostname.c
rename to components/hostname.c
index 0ad1f3b691a570aeb2b5034bf03df00a1df268f0..aed77a61c34a88230efd1810f6b8cf7b3ccb7674 100644 (file)
@@ -2,7 +2,7 @@
 #include <err.h>
 #include <unistd.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 hostname(void)
similarity index 98%
rename from ip.c
rename to components/ip.c
index a042c79686563443324d6acf7647042670e220ae..f98b2edb50fb23b75bd50906fd7765b2836be208 100644 (file)
--- a/ip.c
@@ -5,7 +5,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 ipv4(const char *iface)
similarity index 92%
rename from kernel_release.c
rename to components/kernel_release.c
index abe0acd16299a7a0153889d98ce83fc8f6d30ac5..f539b6a2e6b7bd34224b4ef6794fb84ec06bee19 100644 (file)
@@ -2,7 +2,7 @@
 #include <sys/utsname.h>
 #include <stdio.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 kernel_release(void)
similarity index 95%
rename from keyboard_indicators.c
rename to components/keyboard_indicators.c
index 13e8648ae8624e28a3066fd65af3ca58496f0eda..b7713b628279ad30bb49afd018c136f9d1c0c6c7 100644 (file)
@@ -2,7 +2,7 @@
 #include <err.h>
 #include <X11/Xlib.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 keyboard_indicators(void)
similarity index 93%
rename from load_avg.c
rename to components/load_avg.c
index ad22ae4b838553c2fbd4b1e0b26d050eb9ab2193..d6f6bd4bfa04b85cc0687334a55be2d58c08ba8c 100644 (file)
@@ -2,7 +2,7 @@
 #include <err.h>
 #include <stdlib.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 load_avg(const char *fmt)
similarity index 96%
rename from num_files.c
rename to components/num_files.c
index 778b8b99e6f8c76874af1bd6cbf9171fe48b13ff..a8a389451b9cef5c3ecbccf815738c1e4ecf2395 100644 (file)
@@ -4,7 +4,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 num_files(const char *dir)
similarity index 98%
rename from ram.c
rename to components/ram.c
index def27aa2f68cd2292754d6b1595b66ccc60287a7..f696039d3206be430248f140d6e8d666bdcf0d97 100644 (file)
--- a/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)
similarity index 95%
rename from run_command.c
rename to components/run_command.c
index 7aa6c4f89c2350aa27ae1ea208eb7b14d5f70cb1..99f54ea7b850021d515c7776457b5fb35ae5897e 100644 (file)
@@ -3,7 +3,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 run_command(const char *cmd)
similarity index 99%
rename from swap.c
rename to components/swap.c
index 93111c55425a3f80cf0eac28c4366254c0d880a5..e4eec64c3fdf76ba2d7580126ce69a5e845546a2 100644 (file)
--- a/swap.c
@@ -3,7 +3,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 swap_free(void)
similarity index 91%
rename from temperature.c
rename to components/temperature.c
index 2c78ceddeb18d5fdfe69dabaff565b94d67ed650..bbd4daf0ed9f54304e0b9573c605d03084b06322 100644 (file)
@@ -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)
similarity index 92%
rename from uptime.c
rename to components/uptime.c
index 827381bbadcdd40a0c0ccadb0fdc3ec4279f2b46..b45518289be3b56358eeadfd58fc983d96f03679 100644 (file)
--- a/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)
similarity index 95%
rename from user.c
rename to components/user.c
index 851acb401ab54b0101b308bf056d0a715822fcbd..8dcb86a3f8f91c409a2d30be367ea265bafdd52b 100644 (file)
--- a/user.c
@@ -4,7 +4,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 gid(void)
similarity index 97%
rename from volume.c
rename to components/volume.c
index 0074754fece818ca1684d71a8c10ec3bbbf896bd..f5aa18d332a41283d75e45ec9b6d1317c4b290f5 100644 (file)
--- a/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)
similarity index 98%
rename from wifi.c
rename to components/wifi.c
index 41ae4c613a38317d19e552e5558c8edeae097dea..30b57ab190f64b1600a6bfd84af971fd49c5cfed 100644 (file)
--- a/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)