From b7e7ad522ffb09d8f92464cc02cb02c88d3e015f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 29 Dec 2018 22:15:29 +0100 Subject: [PATCH] remove module subfolders --- CMakeLists.txt | 16 ++++++++-------- config.c | 16 ++++++++-------- modules/{backlight => }/backlight.c | 4 ++-- modules/{backlight => }/backlight.h | 4 ++-- modules/{battery => }/battery.c | 4 ++-- modules/{battery => }/battery.h | 4 ++-- modules/{clock => }/clock.c | 2 +- modules/{clock => }/clock.h | 4 ++-- modules/{i3 => }/i3.c | 6 +++--- modules/{i3 => }/i3.h | 4 ++-- modules/{label => }/label.c | 0 modules/{label => }/label.h | 4 ++-- modules/{mpd => }/mpd.c | 4 ++-- modules/{mpd => }/mpd.h | 4 ++-- modules/{xkb => }/xkb.c | 6 +++--- modules/{xkb => }/xkb.h | 4 ++-- modules/{xwindow => }/xwindow.c | 6 +++--- modules/{xwindow => }/xwindow.h | 4 ++-- 18 files changed, 48 insertions(+), 48 deletions(-) rename modules/{backlight => }/backlight.c (99%) rename modules/{backlight => }/backlight.h (63%) rename modules/{battery => }/battery.c (99%) rename modules/{battery => }/battery.h (68%) rename modules/{clock => }/clock.c (98%) rename modules/{clock => }/clock.h (55%) rename modules/{i3 => }/i3.c (99%) rename modules/{i3 => }/i3.h (83%) rename modules/{label => }/label.c (100%) rename modules/{label => }/label.h (55%) rename modules/{mpd => }/mpd.c (99%) rename modules/{mpd => }/mpd.h (69%) rename modules/{xkb => }/xkb.c (99%) rename modules/{xkb => }/xkb.h (54%) rename modules/{xwindow => }/xwindow.c (99%) rename modules/{xwindow => }/xwindow.h (56%) diff --git a/CMakeLists.txt b/CMakeLists.txt index ad9c21d..50eec95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,14 +48,14 @@ add_executable(f00bar particles/ramp.c particles/ramp.h particles/string.c particles/string.h - modules/backlight/backlight.c modules/backlight/backlight.h - modules/battery/battery.c modules/battery/battery.h - modules/clock/clock.c modules/clock/clock.h - modules/i3/i3.c modules/i3/i3.h - modules/label/label.c modules/label/label.h - modules/mpd/mpd.c modules/mpd/mpd.h - modules/xkb/xkb.c modules/xkb/xkb.h - modules/xwindow/xwindow.c modules/xwindow/xwindow.h + modules/backlight.c modules/backlight.h + modules/battery.c modules/battery.h + modules/clock.c modules/clock.h + modules/i3.c modules/i3.h + modules/label.c modules/label.h + modules/mpd.c modules/mpd.h + modules/xkb.c modules/xkb.h + modules/xwindow.c modules/xwindow.h ) target_compile_definitions(f00bar PRIVATE _GNU_SOURCE) diff --git a/config.c b/config.c index abb7d30..4cb26e7 100644 --- a/config.c +++ b/config.c @@ -21,14 +21,14 @@ #include "particles/string.h" #include "module.h" -#include "modules/backlight/backlight.h" -#include "modules/battery/battery.h" -#include "modules/clock/clock.h" -#include "modules/i3/i3.h" -#include "modules/label/label.h" -#include "modules/mpd/mpd.h" -#include "modules/xkb/xkb.h" -#include "modules/xwindow/xwindow.h" +#include "modules/backlight.h" +#include "modules/battery.h" +#include "modules/clock.h" +#include "modules/i3.h" +#include "modules/label.h" +#include "modules/mpd.h" +#include "modules/xkb.h" +#include "modules/xwindow.h" static uint8_t hex_nibble(char hex) diff --git a/modules/backlight/backlight.c b/modules/backlight.c similarity index 99% rename from modules/backlight/backlight.c rename to modules/backlight.c index 6943b14..0b6c6ef 100644 --- a/modules/backlight/backlight.c +++ b/modules/backlight.c @@ -13,8 +13,8 @@ #include #define LOG_MODULE "battery" -#include "../../log.h" -#include "../../bar.h" +#include "../log.h" +#include "../bar.h" struct private { struct particle *label; diff --git a/modules/backlight/backlight.h b/modules/backlight.h similarity index 63% rename from modules/backlight/backlight.h rename to modules/backlight.h index ab0b9b3..f1e3a90 100644 --- a/modules/backlight/backlight.h +++ b/modules/backlight.h @@ -1,6 +1,6 @@ #pragma once -#include "../../module.h" -#include "../../particle.h" +#include "../module.h" +#include "../particle.h" struct module *module_backlight(const char *device, struct particle *label); diff --git a/modules/battery/battery.c b/modules/battery.c similarity index 99% rename from modules/battery/battery.c rename to modules/battery.c index 2c3ba4f..43c2bee 100644 --- a/modules/battery/battery.c +++ b/modules/battery.c @@ -14,8 +14,8 @@ #include #define LOG_MODULE "battery" -#include "../../log.h" -#include "../../bar.h" +#include "../log.h" +#include "../bar.h" enum state { STATE_FULL, STATE_CHARGING, STATE_DISCHARGING }; diff --git a/modules/battery/battery.h b/modules/battery.h similarity index 68% rename from modules/battery/battery.h rename to modules/battery.h index e025f3a..1d268ab 100644 --- a/modules/battery/battery.h +++ b/modules/battery.h @@ -1,7 +1,7 @@ #pragma once -#include "../../module.h" -#include "../../particle.h" +#include "../module.h" +#include "../particle.h" struct module *module_battery( const char *battery, struct particle *label, int poll_interval_secs); diff --git a/modules/clock/clock.c b/modules/clock.c similarity index 98% rename from modules/clock/clock.c rename to modules/clock.c index 4d4bf52..79e5b3a 100644 --- a/modules/clock/clock.c +++ b/modules/clock.c @@ -5,7 +5,7 @@ #include -#include "../../bar.h" +#include "../bar.h" struct private { struct particle *label; diff --git a/modules/clock/clock.h b/modules/clock.h similarity index 55% rename from modules/clock/clock.h rename to modules/clock.h index 57d6ad4..694ede4 100644 --- a/modules/clock/clock.h +++ b/modules/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/i3/i3.c b/modules/i3.c similarity index 99% rename from modules/i3/i3.c rename to modules/i3.c index f2fb0d1..63a6898 100644 --- a/modules/i3/i3.c +++ b/modules/i3.c @@ -18,10 +18,10 @@ #include #define LOG_MODULE "i3" -#include "../../log.h" -#include "../../bar.h" +#include "../log.h" +#include "../bar.h" -#include "../../particles/dynlist.h" +#include "../particles/dynlist.h" struct ws_content { char *name; diff --git a/modules/i3/i3.h b/modules/i3.h similarity index 83% rename from modules/i3/i3.h rename to modules/i3.h index 33b323b..d6be4e5 100644 --- a/modules/i3/i3.h +++ b/modules/i3.h @@ -1,7 +1,7 @@ #pragma once -#include "../../module.h" -#include "../../particle.h" +#include "../module.h" +#include "../particle.h" /* Maps workspace name to a content particle. */ struct i3_workspaces { diff --git a/modules/label/label.c b/modules/label.c similarity index 100% rename from modules/label/label.c rename to modules/label.c diff --git a/modules/label/label.h b/modules/label.h similarity index 55% rename from modules/label/label.h rename to modules/label.h index 07a875e..7f04a10 100644 --- a/modules/label/label.h +++ b/modules/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/mpd/mpd.c b/modules/mpd.c similarity index 99% rename from modules/mpd/mpd.c rename to modules/mpd.c index 54ed23a..cef26b7 100644 --- a/modules/mpd/mpd.c +++ b/modules/mpd.c @@ -16,8 +16,8 @@ #define LOG_MODULE "mpd" #define LOG_ENABLE_DBG 0 -#include "../../log.h" -#include "../../bar.h" +#include "../log.h" +#include "../bar.h" enum state { STATE_OFFLINE = 1000, diff --git a/modules/mpd/mpd.h b/modules/mpd.h similarity index 69% rename from modules/mpd/mpd.h rename to modules/mpd.h index e1c5183..3a69b7c 100644 --- a/modules/mpd/mpd.h +++ b/modules/mpd.h @@ -2,8 +2,8 @@ #include -#include "../../module.h" -#include "../../particle.h" +#include "../module.h" +#include "../particle.h" struct module *module_mpd( const char *host, uint16_t port, struct particle *label); diff --git a/modules/xkb/xkb.c b/modules/xkb.c similarity index 99% rename from modules/xkb/xkb.c rename to modules/xkb.c index ea35b9c..55ce5df 100644 --- a/modules/xkb/xkb.c +++ b/modules/xkb.c @@ -11,9 +11,9 @@ #include #define LOG_MODULE "xkb" -#include "../../log.h" -#include "../../bar.h" -#include "../../xcb.h" +#include "../log.h" +#include "../bar.h" +#include "../xcb.h" struct layout { char *name; diff --git a/modules/xkb/xkb.h b/modules/xkb.h similarity index 54% rename from modules/xkb/xkb.h rename to modules/xkb.h index c23129b..d8ec03d 100644 --- a/modules/xkb/xkb.h +++ b/modules/xkb.h @@ -1,5 +1,5 @@ #pragma once -#include "../../module.h" -#include "../../particle.h" +#include "../module.h" +#include "../particle.h" struct module *module_xkb(struct particle *label); diff --git a/modules/xwindow/xwindow.c b/modules/xwindow.c similarity index 99% rename from modules/xwindow/xwindow.c rename to modules/xwindow.c index 62707e8..a052a85 100644 --- a/modules/xwindow/xwindow.c +++ b/modules/xwindow.c @@ -15,9 +15,9 @@ #include #define LOG_MODULE "xkb" -#include "../../log.h" -#include "../../bar.h" -#include "../../xcb.h" +#include "../log.h" +#include "../bar.h" +#include "../xcb.h" struct private { /* Accessed from bar thread only */ diff --git a/modules/xwindow/xwindow.h b/modules/xwindow.h similarity index 56% rename from modules/xwindow/xwindow.h rename to modules/xwindow.h index cba35f2..e178ff8 100644 --- a/modules/xwindow/xwindow.h +++ b/modules/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);