调整配置结构并添加 client 规则配置

This commit is contained in:
2025-08-13 21:26:40 +08:00
parent 72151c1458
commit e78c847125
6 changed files with 85 additions and 61 deletions

View File

@@ -1,28 +0,0 @@
#pragma once
#include <stdint.h>
/* 壁纸列表,支持通配符和 shell 环境变量拼接,最后以 NULL 结尾 */
extern const char *wallpager_list[];
/* 壁纸切换间隔单位0 表示不切换 */
extern const uint32_t wallpaper_interval;
/**
* @brief 屏幕 tags 设置
* @description 每个屏幕的 tags 配置为字符串数组,以 NULL 结束,如
* {"1", "2", "3", "4", "5", "6", NULL}
*
* 每一项配置里面的数组个数表示对应的屏幕个数,并最后以 NULL 结束,
*
* 如一个屏幕应该配置为 {{"1", "2", "3", "4", NULL}, NULL}
* 两个屏幕应该配置为 {{"1", "2", "3", NULL}, {"1", "2", NULL}, NULL},以此类推
*/
extern const char *const *const *const monitor_tags[];
/**
* @brief 默认屏幕 tags 设置
* @description 若屏幕个数与 monitor_tags 中设置的所有配置项都不符,
* 则所有屏幕的 tags 都使用这个默认配置
*
* 格式为字符串数组,以 NULL 标志结束,如 {"1", "2", "3", NULL}
*/
extern const char *const default_monitor_tags[];

View File

@@ -56,3 +56,20 @@ typedef struct wallpaper_config_t {
uint32_t count;
char **path_list;
} wallpaper_config_t;
typedef struct rule_t {
const char *class;
const char *instance;
const char *title;
/* 规则适用的屏幕总数,若设置为 0 ,则此条规则适用于任意屏幕数 */
const uint32_t monitor_amount;
uint32_t tags;
uint32_t monitor_index;
bool switch_to_tag;
bool fullscreen;
bool maximize;
bool floating;
} rule_t;