mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-21 01:45:40 +02:00
Put each module in its own subdirectory
This commit is contained in:
parent
75bdd2ad3c
commit
8809cbb481
24 changed files with 73 additions and 71 deletions
|
@ -7,9 +7,9 @@
|
|||
|
||||
#define LOG_MODULE "alsa"
|
||||
#define LOG_ENABLE_DBG 0
|
||||
#include "../log.h"
|
||||
#include "../bar.h"
|
||||
#include "../tllist.h"
|
||||
#include "../../log.h"
|
||||
#include "../../bar.h"
|
||||
#include "../../tllist.h"
|
||||
|
||||
struct private {
|
||||
char *card;
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "../module.h"
|
||||
#include "../particle.h"
|
||||
#include "../../module.h"
|
||||
#include "../../particle.h"
|
||||
|
||||
struct module *module_alsa(
|
||||
const char *card, const char *mixer, struct particle *label);
|
|
@ -13,8 +13,8 @@
|
|||
#include <libudev.h>
|
||||
|
||||
#define LOG_MODULE "battery"
|
||||
#include "../log.h"
|
||||
#include "../bar.h"
|
||||
#include "../../log.h"
|
||||
#include "../../bar.h"
|
||||
|
||||
struct private {
|
||||
struct particle *label;
|
|
@ -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);
|
|
@ -14,8 +14,8 @@
|
|||
#include <libudev.h>
|
||||
|
||||
#define LOG_MODULE "battery"
|
||||
#include "../log.h"
|
||||
#include "../bar.h"
|
||||
#include "../../log.h"
|
||||
#include "../../bar.h"
|
||||
|
||||
enum state { STATE_FULL, STATE_CHARGING, STATE_DISCHARGING };
|
||||
|
|
@ -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);
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include <poll.h>
|
||||
|
||||
#include "../bar.h"
|
||||
#include "../../bar.h"
|
||||
|
||||
struct private {
|
||||
struct particle *label;
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "../module.h"
|
||||
#include "../particle.h"
|
||||
#include "../../module.h"
|
||||
#include "../../particle.h"
|
||||
|
||||
struct module *module_clock(
|
||||
struct particle *label, const char *date_format, const char *time_format);
|
|
@ -19,10 +19,10 @@
|
|||
|
||||
#define LOG_MODULE "i3"
|
||||
#define LOG_ENABLE_DBG 0
|
||||
#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;
|
|
@ -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 {
|
|
@ -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);
|
|
@ -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,
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#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);
|
|
@ -16,10 +16,10 @@
|
|||
|
||||
#define LOG_MODULE "network"
|
||||
#define LOG_ENABLE_DBG 0
|
||||
#include "../log.h"
|
||||
#include "../module.h"
|
||||
#include "../bar.h"
|
||||
#include "../tllist.h"
|
||||
#include "../../log.h"
|
||||
#include "../../module.h"
|
||||
#include "../../bar.h"
|
||||
#include "../../tllist.h"
|
||||
|
||||
struct af_addr {
|
||||
int family;
|
||||
|
@ -141,6 +141,8 @@ netlink_connect(void)
|
|||
.nl_groups = RTMGRP_LINK | RTMGRP_IPV4_IFADDR | RTMGRP_IPV6_IFADDR,
|
||||
};
|
||||
|
||||
LOG_WARN("nl_pid_value = 0x%08x", addr.nl_pid);
|
||||
|
||||
if (bind(sock, (const struct sockaddr *)&addr, sizeof(addr)) == -1) {
|
||||
LOG_ERRNO("failed to bind netlink socket");
|
||||
close(sock);
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "../module.h"
|
||||
#include "../particle.h"
|
||||
#include "../../module.h"
|
||||
#include "../../particle.h"
|
||||
|
||||
struct module *module_network(const char *iface, struct particle *label);
|
|
@ -16,10 +16,10 @@
|
|||
|
||||
#define LOG_MODULE "removables"
|
||||
#define LOG_ENABLE_DBG 0
|
||||
#include "../log.h"
|
||||
#include "../bar.h"
|
||||
#include "../tllist.h"
|
||||
#include "../particles/dynlist.h"
|
||||
#include "../../log.h"
|
||||
#include "../../bar.h"
|
||||
#include "../../tllist.h"
|
||||
#include "../../particles/dynlist.h"
|
||||
|
||||
typedef tll(char *) mount_point_list_t;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "../module.h"
|
||||
#include "../particle.h"
|
||||
#include "../../module.h"
|
||||
#include "../../particle.h"
|
||||
|
||||
struct module *module_removables(
|
||||
struct particle *label, int left_spacing, int right_spacing);
|
|
@ -11,9 +11,9 @@
|
|||
#include <xcb/xkb.h>
|
||||
|
||||
#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;
|
|
@ -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);
|
|
@ -15,9 +15,9 @@
|
|||
#include <xcb/xcb_event.h>
|
||||
|
||||
#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 */
|
|
@ -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);
|
Loading…
Add table
Add a link
Reference in a new issue