#pragma once #include #include #include #include #include "action.h" #include "layout.h" #include "types.h" /* 壁纸列表,支持通配符和 shell 环境变量拼接 */ const char *wallpapers[] = {}; /* 壁纸切换间隔(单位:秒),0 表示不切换 */ const uint32_t wallpaper_interval = 0; /** * @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},以此类推 */ const char *const *const *const monitor_tags[] = { (const char *const *const[]){ (const char *const[]){"1", "2", "3", "4", "5", "6", NULL}, NULL, }, (const char *const *const[]){ (const char *const[]){"1", "2", "3", NULL}, (const char *const[]){"1", "2", "3", "4", "5", NULL}, NULL, }, }; /** * @brief 默认屏幕 tags 设置 * @description 若屏幕个数与 monitor_tags 中设置的所有配置项都不符, * 则所有屏幕的 tags 都使用这个默认配置 * * 格式为字符串数组,以 NULL 标志结束,如 {"1", "2", "3", NULL} */ const char *const default_monitor_tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", NULL, }; const layout_t layouts[] = { {"[]=", tile}, {"[M]", monocle}, {"><>", NULL}, }; /* 默认 tags 规则 */ const rule_tag_t browser_tag[] = { {.monitor_index = 0, .tags = 1 << 1}, {0}, }; const rule_tag_t mpv_tag[] = { {.monitor_amount = 1, .monitor_index = 0, .tags = 1 << 3}, {.monitor_amount = 2, .monitor_index = 1, .tags = 1 << 2}, {0}, }; const rule_tag_t emacs_tag[] = { {.monitor_amount = 1, .monitor_index = 0, .tags = 1 << 2}, {.monitor_amount = 2, .monitor_index = 1, .tags = 1 << 1}, {0}, }; /* 新建窗口规则 */ const rule_t rules[] = { {.class = "firefox", .action = {.maximize = true}, .tag = browser_tag}, {.class = "Google-chrome", .action = {.maximize = true}, .tag = browser_tag}, {.class = "mpv", .action = {.fullscreen = true}, .tag = mpv_tag}, { .class = "Emacs", .action = {.switch_to_tag = true, .maximize = true}, .tag = emacs_tag, }, }; #define SUPER XCB_MOD_MASK_4 #define ALT XCB_MOD_MASK_1 #define CTRL XCB_MOD_MASK_CONTROL #define SHIFT XCB_MOD_MASK_SHIFT const char launcher[] = "rofi -show combi -modes window,drun,run,ssh,combi,windowcd"; const keybinding_t keys[] = { {SUPER, XK_p, spawn, {.ptr = launcher}}, {SUPER | SHIFT, XK_q, quit, {.b = false}}, {SUPER | CTRL, XK_r, quit, {.b = true}}, {SUPER, XK_1, select_tag, {.ui = 0}}, {SUPER, XK_2, select_tag, {.ui = 1}}, {SUPER, XK_3, select_tag, {.ui = 2}}, {SUPER, XK_4, select_tag, {.ui = 3}}, {SUPER, XK_5, select_tag, {.ui = 4}}, {SUPER, XK_6, select_tag, {.ui = 5}}, {SUPER, XK_7, select_tag, {.ui = 6}}, {SUPER, XK_8, select_tag, {.ui = 7}}, {SUPER, XK_9, select_tag, {.ui = 8}}, }; const char *const bar_bg = "#222222"; const char *const tag_bg = "#222222"; const char *const active_tag_bg = "#005577"; const char *const tag_color = "#bbbbbb"; const char *const active_tag_color = "#eeeeee"; const char *const layout_color = "#bbbbbb"; const char *const client_name_color = "#bbbbbb"; const char *const active_client_name_color = "#005577"; const char *const status_color = "#bbbbbb"; const char *const border_color = "#444444"; const char *const active_border_color = "#005577"; const char *const default_font_family = "sans-serif, monospace"; const uint32_t default_font_size = 10; const uint32_t dpi_fallback = 96; const uint32_t bar_y_padding = 1; const uint32_t tag_x_padding = 10; const uint32_t border_width = 1;