From 081bccf06db34c62dfab68c502c160cc3c97a413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 17 Nov 2018 23:15:32 +0100 Subject: [PATCH] modules: put all modules in separate sub directories --- CMakeLists.txt | 6 +++--- config.c | 6 +++--- modules/{ => clock}/clock.c | 2 +- modules/{ => clock}/clock.h | 4 ++-- modules/{ => label}/label.c | 0 modules/{ => label}/label.h | 4 ++-- modules/{ => xwindow}/xwindow.c | 4 ++-- modules/{ => xwindow}/xwindow.h | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) rename modules/{ => clock}/clock.c (98%) rename modules/{ => clock}/clock.h (55%) rename modules/{ => label}/label.c (100%) rename modules/{ => label}/label.h (55%) rename modules/{ => xwindow}/xwindow.c (99%) rename modules/{ => xwindow}/xwindow.h (56%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 17e28ce..5e1d639 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,9 +28,9 @@ add_executable(foobar particles/string.c particles/string.h particles/list.c particles/list.h - modules/label.c modules/label.h - modules/clock.c modules/clock.h - modules/xwindow.c modules/xwindow.h + modules/label/label.c modules/label/label.h + modules/clock/clock.c modules/clock/clock.h + modules/xwindow/xwindow.c modules/xwindow/xwindow.h ) target_compile_definitions(foobar PRIVATE _GNU_SOURCE) diff --git a/config.c b/config.c index 795bf72..11a6879 100644 --- a/config.c +++ b/config.c @@ -12,9 +12,9 @@ #include "particles/list.h" #include "module.h" -#include "modules/label.h" -#include "modules/clock.h" -#include "modules/xwindow.h" +#include "modules/label/label.h" +#include "modules/clock/clock.h" +#include "modules/xwindow/xwindow.h" static uint8_t hex_nibble(char hex) diff --git a/modules/clock.c b/modules/clock/clock.c similarity index 98% rename from modules/clock.c rename to modules/clock/clock.c index bf3cfce..a325e28 100644 --- a/modules/clock.c +++ b/modules/clock/clock.c @@ -5,7 +5,7 @@ #include -#include "../bar.h" +#include "../../bar.h" struct private { struct particle *label; diff --git a/modules/clock.h b/modules/clock/clock.h similarity index 55% rename from modules/clock.h rename to modules/clock/clock.h index 694ede4..57d6ad4 100644 --- a/modules/clock.h +++ b/modules/clock/clock.h @@ -1,6 +1,6 @@ #pragma once -#include "../module.h" -#include "../particle.h" +#include "../../module.h" +#include "../../particle.h" struct module *module_clock(struct particle *label); diff --git a/modules/label.c b/modules/label/label.c similarity index 100% rename from modules/label.c rename to modules/label/label.c diff --git a/modules/label.h b/modules/label/label.h similarity index 55% rename from modules/label.h rename to modules/label/label.h index 7f04a10..07a875e 100644 --- a/modules/label.h +++ b/modules/label/label.h @@ -1,6 +1,6 @@ #pragma once -#include "../module.h" -#include "../particle.h" +#include "../../module.h" +#include "../../particle.h" struct module *module_label(struct particle *label); diff --git a/modules/xwindow.c b/modules/xwindow/xwindow.c similarity index 99% rename from modules/xwindow.c rename to modules/xwindow/xwindow.c index c156fe3..c92221f 100644 --- a/modules/xwindow.c +++ b/modules/xwindow/xwindow.c @@ -14,8 +14,8 @@ #include #include -#include "../bar.h" -#include "../xcb.h" +#include "../../bar.h" +#include "../../xcb.h" struct private { /* Accessed from bar thread only */ diff --git a/modules/xwindow.h b/modules/xwindow/xwindow.h similarity index 56% rename from modules/xwindow.h rename to modules/xwindow/xwindow.h index e178ff8..cba35f2 100644 --- a/modules/xwindow.h +++ b/modules/xwindow/xwindow.h @@ -1,6 +1,6 @@ #pragma once -#include "../module.h" -#include "../particle.h" +#include "../../module.h" +#include "../../particle.h" struct module *module_xwindow(struct particle *label);