From 0696635bcbad06770cce7d5a4c9e8e4d76868307 Mon Sep 17 00:00:00 2001 From: drkhsh Date: Thu, 27 Oct 2022 23:18:30 +0200 Subject: [PATCH] radical re-formatting 0/3: Alphabetic headers Except stated otherwise in comment. Fixes coding style. Formatting commits suck, incoherent coding style sucks more. https://suckless.org/coding_style/ --- components/battery.c | 2 +- components/cpu.c | 4 ++-- components/datetime.c | 2 +- components/disk.c | 2 +- components/hostname.c | 2 +- components/ip.c | 4 ++-- components/kernel_release.c | 4 ++-- components/keyboard_indicators.c | 2 +- components/keymap.c | 2 +- components/load_avg.c | 2 +- components/netspeeds.c | 8 ++++---- components/num_files.c | 2 +- components/ram.c | 2 +- components/run_command.c | 2 +- components/swap.c | 6 +++--- components/temperature.c | 2 +- components/uptime.c | 2 +- components/user.c | 2 +- components/volume.c | 4 ++-- components/wifi.c | 2 +- 20 files changed, 29 insertions(+), 29 deletions(-) diff --git a/components/battery.c b/components/battery.c index ee2fe71..3746095 100644 --- a/components/battery.c +++ b/components/battery.c @@ -2,8 +2,8 @@ #include #include -#include "../util.h" #include "../slstatus.h" +#include "../util.h" #if defined(__linux__) #include diff --git a/components/cpu.c b/components/cpu.c index 28e9a45..20354c0 100644 --- a/components/cpu.c +++ b/components/cpu.c @@ -3,8 +3,8 @@ #include #include -#include "../util.h" #include "../slstatus.h" +#include "../util.h" #if defined(__linux__) #define CPU_FREQ "/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq" @@ -110,9 +110,9 @@ b[CP_INTR])) / sum); } #elif defined(__FreeBSD__) + #include #include #include - #include const char * cpu_freq(const char *unused) diff --git a/components/datetime.c b/components/datetime.c index cf9fbba..5b10daf 100644 --- a/components/datetime.c +++ b/components/datetime.c @@ -2,8 +2,8 @@ #include #include -#include "../util.h" #include "../slstatus.h" +#include "../util.h" const char * datetime(const char *fmt) diff --git a/components/disk.c b/components/disk.c index 64e2105..0d1c13e 100644 --- a/components/disk.c +++ b/components/disk.c @@ -2,8 +2,8 @@ #include #include -#include "../util.h" #include "../slstatus.h" +#include "../util.h" const char * disk_free(const char *path) diff --git a/components/hostname.c b/components/hostname.c index f04a913..dab8b63 100644 --- a/components/hostname.c +++ b/components/hostname.c @@ -2,8 +2,8 @@ #include #include -#include "../util.h" #include "../slstatus.h" +#include "../util.h" const char * hostname(const char *unused) diff --git a/components/ip.c b/components/ip.c index 6d1da68..a954ae1 100644 --- a/components/ip.c +++ b/components/ip.c @@ -4,15 +4,15 @@ #include #include #if defined(__OpenBSD__) - #include #include + #include #elif defined(__FreeBSD__) #include #include #endif -#include "../util.h" #include "../slstatus.h" +#include "../util.h" static const char * ip(const char *interface, unsigned short sa_family) diff --git a/components/kernel_release.c b/components/kernel_release.c index e21fefe..36a6a44 100644 --- a/components/kernel_release.c +++ b/components/kernel_release.c @@ -1,9 +1,9 @@ /* See LICENSE file for copyright and license details. */ -#include #include +#include -#include "../util.h" #include "../slstatus.h" +#include "../util.h" const char * kernel_release(const char *unused) diff --git a/components/keyboard_indicators.c b/components/keyboard_indicators.c index 5f482e8..4a81539 100644 --- a/components/keyboard_indicators.c +++ b/components/keyboard_indicators.c @@ -4,8 +4,8 @@ #include #include -#include "../util.h" #include "../slstatus.h" +#include "../util.h" /* * fmt consists of uppercase or lowercase 'c' for caps lock and/or 'n' for num diff --git a/components/keymap.c b/components/keymap.c index 2a99474..e2dbc6f 100644 --- a/components/keymap.c +++ b/components/keymap.c @@ -5,8 +5,8 @@ #include #include -#include "../util.h" #include "../slstatus.h" +#include "../util.h" static int valid_layout_or_variant(char *sym) diff --git a/components/load_avg.c b/components/load_avg.c index ab33fa3..f278a40 100644 --- a/components/load_avg.c +++ b/components/load_avg.c @@ -2,8 +2,8 @@ #include #include -#include "../util.h" #include "../slstatus.h" +#include "../util.h" const char * load_avg(const char *unused) diff --git a/components/netspeeds.c b/components/netspeeds.c index 3a1817b..18aa097 100644 --- a/components/netspeeds.c +++ b/components/netspeeds.c @@ -1,9 +1,9 @@ /* See LICENSE file for copyright and license details. */ -#include #include +#include -#include "../util.h" #include "../slstatus.h" +#include "../util.h" #if defined(__linux__) #include @@ -57,11 +57,11 @@ 1024); } #elif defined(__OpenBSD__) | defined(__FreeBSD__) - #include #include + #include + #include #include #include - #include const char * netspeed_rx(const char *interface) diff --git a/components/num_files.c b/components/num_files.c index 3911da7..8205562 100644 --- a/components/num_files.c +++ b/components/num_files.c @@ -3,8 +3,8 @@ #include #include -#include "../util.h" #include "../slstatus.h" +#include "../util.h" const char * num_files(const char *path) diff --git a/components/ram.c b/components/ram.c index 0cec4b9..518c18c 100644 --- a/components/ram.c +++ b/components/ram.c @@ -1,8 +1,8 @@ /* See LICENSE file for copyright and license details. */ #include -#include "../util.h" #include "../slstatus.h" +#include "../util.h" #if defined(__linux__) #include diff --git a/components/run_command.c b/components/run_command.c index be7d9e2..942f3c4 100644 --- a/components/run_command.c +++ b/components/run_command.c @@ -2,8 +2,8 @@ #include #include -#include "../util.h" #include "../slstatus.h" +#include "../util.h" const char * run_command(const char *cmd) diff --git a/components/swap.c b/components/swap.c index 2e8a6fb..49ba3cb 100644 --- a/components/swap.c +++ b/components/swap.c @@ -4,8 +4,8 @@ #include #include -#include "../util.h" #include "../slstatus.h" +#include "../util.h" #if defined(__linux__) static int @@ -199,11 +199,11 @@ return fmt_human(used * 1024, 1024); } #elif defined(__FreeBSD__) + #include + #include #include #include - #include #include - #include static int getswapinfo(struct kvm_swap *swap_info, size_t size) { diff --git a/components/temperature.c b/components/temperature.c index 01d21b9..c61a574 100644 --- a/components/temperature.c +++ b/components/temperature.c @@ -1,8 +1,8 @@ /* See LICENSE file for copyright and license details. */ #include -#include "../util.h" #include "../slstatus.h" +#include "../util.h" #if defined(__linux__) diff --git a/components/uptime.c b/components/uptime.c index 99d1eda..d97e5e8 100644 --- a/components/uptime.c +++ b/components/uptime.c @@ -3,8 +3,8 @@ #include #include -#include "../util.h" #include "../slstatus.h" +#include "../util.h" #if defined(CLOCK_BOOTTIME) #define UPTIME_FLAG CLOCK_BOOTTIME diff --git a/components/user.c b/components/user.c index 770f5af..3517495 100644 --- a/components/user.c +++ b/components/user.c @@ -4,8 +4,8 @@ #include #include -#include "../util.h" #include "../slstatus.h" +#include "../util.h" const char * gid(const char *unused) diff --git a/components/volume.c b/components/volume.c index 5c85011..6cec556 100644 --- a/components/volume.c +++ b/components/volume.c @@ -5,14 +5,14 @@ #include #include -#include "../util.h" #include "../slstatus.h" +#include "../util.h" #if defined(__OpenBSD__) | defined(__FreeBSD__) - #include #include #include #include + #include struct control { LIST_ENTRY(control) next; diff --git a/components/wifi.c b/components/wifi.c index d097368..d75a613 100644 --- a/components/wifi.c +++ b/components/wifi.c @@ -6,8 +6,8 @@ #include #include -#include "../util.h" #include "../slstatus.h" +#include "../util.h" #define RSSI_TO_PERC(rssi) \ rssi >= -50 ? 100 : \