198 lines
5.8 KiB
C
198 lines
5.8 KiB
C
#pragma once
|
|
|
|
#include <X11/XF86keysym.h>
|
|
#include <X11/keysym.h>
|
|
#include <stdint.h>
|
|
|
|
#include "action.h"
|
|
#include "config.h"
|
|
#include "layout.h"
|
|
#include "renderer.h"
|
|
#include "status.h"
|
|
#include "types.h"
|
|
|
|
static const char *const font_family = "monospace";
|
|
static const int font_size = 10;
|
|
static const int default_dpi = 144;
|
|
|
|
static const char *const tags[] = {
|
|
"1", "2", "3", "4", "5", "6", "7", "8", "9", nullptr,
|
|
};
|
|
static const uint16_t border_width = 1;
|
|
static const uint16_t bar_y_padding = 1;
|
|
static const uint16_t tag_x_padding = 10;
|
|
|
|
static const char *const bar_bg = "#222222";
|
|
static const char *const tag_bg = "#222222";
|
|
static const char *const active_tag_bg = "#005577";
|
|
static const char *const tag_color = "#bbbbbb";
|
|
static const char *const active_tag_color = "#eeeeee";
|
|
static const char *const border_color = "#444444";
|
|
static const char *const active_border_color = "#005577";
|
|
|
|
static const config_status_item_t status_list[] = {
|
|
{
|
|
.type = status_net_down,
|
|
.icon_type = icon_type_image,
|
|
.icon = "/home/zedhugh/develop/zswm/src/resources/icons/"
|
|
"corner-left-down-line.png",
|
|
.color = "#87af5f",
|
|
},
|
|
{
|
|
.type = status_net_up,
|
|
.icon_type = icon_type_image,
|
|
.icon =
|
|
"/home/zedhugh/develop/zswm/src/resources/icons/corner-right-up-line.png",
|
|
.color = "#e54c62",
|
|
},
|
|
{
|
|
.type = status_audio,
|
|
.icon_type = icon_type_image,
|
|
.icon = "/home/zedhugh/develop/zswm/src/resources/icons/volume-up-fill.png",
|
|
.color = "#7493d2",
|
|
},
|
|
{
|
|
.type = status_memory,
|
|
.icon_type = icon_type_image,
|
|
.icon = "/home/zedhugh/develop/zswm/src/resources/icons/ram-line.png",
|
|
.color = "#e0da37",
|
|
},
|
|
{
|
|
.type = status_cpu,
|
|
.icon_type = icon_type_image,
|
|
.icon = "/home/zedhugh/develop/zswm/src/resources/icons/cpu-line.png",
|
|
.color = "#e33a6e",
|
|
},
|
|
{
|
|
.type = status_time,
|
|
.icon_type = icon_type_image,
|
|
.icon = "/home/zedhugh/develop/zswm/src/resources/icons/time-line.png",
|
|
.color = "#7788af",
|
|
},
|
|
};
|
|
static const config_status_t status_config = {
|
|
.status_gap = 10,
|
|
.status_item_gap = 5,
|
|
};
|
|
|
|
static const config_t config = {
|
|
.status = (config_status_t *)&status_config,
|
|
};
|
|
|
|
static const button_t button_list[] = {
|
|
{click_tag, modifier_none, button_left, select_tag_of_current_monitor, {0}},
|
|
{
|
|
click_client_name,
|
|
modifier_none,
|
|
button_left,
|
|
change_client_state_dwim,
|
|
{0},
|
|
},
|
|
};
|
|
|
|
#define TAGKEYS(KEY, TAG) \
|
|
{modifier_super, KEY, select_tag_of_current_monitor, {.ui = TAG}}, { \
|
|
modifier_super | modifier_shift, KEY, send_client_to_tag, {.ui = TAG}, \
|
|
}
|
|
|
|
static const char launcher[] =
|
|
"rofi -show combi -modes combi -combi-modes window,drun,run,ssh,windowcd";
|
|
static const char terminal[] = "xterm";
|
|
static const char terminal_class[] = "XTerm";
|
|
static const char editor[] = "emacsclient -a '' -r -n";
|
|
static const char editor_class[] = "Emacs";
|
|
static const char browser[] = "firefox-bin";
|
|
static const char browser_class[] = "firefox";
|
|
static const char chrome[] = "google-chrome-stable";
|
|
static const char chrome_class[] = "Google-chrome";
|
|
static const keyboard_t key_list[] = {
|
|
{modifier_super, XK_r, spawn, {.ptr = launcher}},
|
|
{modifier_super, XK_Return, spawn, {.ptr = terminal}},
|
|
{
|
|
modifier_control | modifier_alt,
|
|
XK_r,
|
|
raise_or_run,
|
|
{.ptr = (const char *[]){terminal_class, terminal}},
|
|
},
|
|
{
|
|
modifier_super,
|
|
XK_e,
|
|
raise_or_run,
|
|
{.ptr = (const char *[]){editor_class, editor}},
|
|
},
|
|
{
|
|
modifier_super,
|
|
XK_q,
|
|
raise_or_run,
|
|
{.ptr = (const char *[]){browser_class, browser}},
|
|
},
|
|
{
|
|
modifier_super,
|
|
XK_a,
|
|
raise_or_run,
|
|
{.ptr = (const char *[]){chrome_class, chrome}},
|
|
},
|
|
{modifier_super | modifier_shift, XK_q, quit, {.b = false}},
|
|
{modifier_super | modifier_control, XK_r, quit, {.b = true}},
|
|
{modifier_super | modifier_shift,
|
|
XK_j,
|
|
focus_client_in_same_tag,
|
|
{.b = true}},
|
|
{modifier_super | modifier_shift,
|
|
XK_k,
|
|
focus_client_in_same_tag,
|
|
{.b = false}},
|
|
|
|
TAGKEYS(XK_1, 1 << 0),
|
|
TAGKEYS(XK_2, 1 << 1),
|
|
TAGKEYS(XK_3, 1 << 2),
|
|
TAGKEYS(XK_4, 1 << 3),
|
|
TAGKEYS(XK_5, 1 << 4),
|
|
TAGKEYS(XK_6, 1 << 5),
|
|
TAGKEYS(XK_7, 1 << 6),
|
|
TAGKEYS(XK_8, 1 << 7),
|
|
TAGKEYS(XK_9, 1 << 8),
|
|
|
|
{modifier_super, XK_o, send_client_to_next_monitor, {0}},
|
|
|
|
{modifier_super | modifier_control, XK_j, focus_next_monitor, {0}},
|
|
{modifier_super | modifier_control, XK_space, toggle_client_floating, {0}},
|
|
{modifier_super, XK_f, toggle_client_fullscreen, {0}},
|
|
{modifier_super, XK_m, toggle_client_maximize, {0}},
|
|
{modifier_super | modifier_shift, XK_c, kill_client, {0}},
|
|
|
|
{modifier_super, XK_Up, change_volume, {.i = 1}},
|
|
{modifier_super, XK_Down, change_volume, {.i = -1}},
|
|
{modifier_super | modifier_shift, XK_m, toggle_mute, {0}},
|
|
{modifier_none, XF86XK_AudioRaiseVolume, change_volume, {.i = 1}},
|
|
{modifier_none, XF86XK_AudioLowerVolume, change_volume, {.i = -1}},
|
|
{modifier_none, XF86XK_AudioMute, toggle_mute, {0}},
|
|
|
|
};
|
|
|
|
static const layout_t layout_list[] = {
|
|
{.symbol = "[]=", .arrange = tile},
|
|
{.symbol = "[M]", .arrange = monocle},
|
|
{.symbol = "><=", .arrange = nullptr},
|
|
};
|
|
|
|
static const char *const autostart_list[] = {
|
|
"gentoo-pipewire-launcher restart",
|
|
"picom -b --backend xrender",
|
|
"fcitx5 -d",
|
|
nullptr,
|
|
};
|
|
|
|
static const rule_t rules[] = {
|
|
{.role = "dialog", .tag_index = -1, .floating = true},
|
|
{.class = "firefox", .role = "About", .tag_index = 1, .floating = true},
|
|
{.class = "firefox", .role = "browser", .tag_index = 1, .maximize = true},
|
|
{.class = "Google-chrome", .tag_index = 1, .maximize = true},
|
|
{.class = "mpv", .tag_index = 11, .switch_to_tag = true, .fullscreen = true},
|
|
{.class = "Emacs", .tag_index = 10, .switch_to_tag = true, .maximize = true},
|
|
};
|
|
|
|
static const char *const wallpapers[] = {"~/bg/*", "~/Downloads/bg/*"};
|
|
/* static const char *const wallpapers[] = {}; */
|
|
static const uint32_t wallpaper_interval = 0;
|