2016-06-15 03:32:35 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "common.hpp"
|
|
|
|
#include "components/x11/color.hpp"
|
|
|
|
#include "components/x11/randr.hpp"
|
|
|
|
|
|
|
|
LEMONBUDDY_NS
|
|
|
|
|
|
|
|
enum class border { NONE = 0, TOP, BOTTOM, LEFT, RIGHT, ALL };
|
|
|
|
enum class alignment { NONE = 0, LEFT, CENTER, RIGHT };
|
|
|
|
enum class syntaxtag { NONE = 0, A, B, F, T, U, O, R, o, u };
|
|
|
|
enum class attribute { NONE = 0, o = 2, u = 4 };
|
|
|
|
enum class mousebtn { NONE = 0, LEFT, MIDDLE, RIGHT, SCROLL_UP, SCROLL_DOWN };
|
|
|
|
enum class gc { NONE = 0, BG, FG, OL, UL, BT, BB, BL, BR };
|
|
|
|
|
|
|
|
struct bar_settings {
|
|
|
|
bar_settings() = default;
|
|
|
|
|
2016-10-12 14:48:14 +00:00
|
|
|
string locale;
|
|
|
|
|
2016-06-15 03:32:35 +00:00
|
|
|
int16_t x{0};
|
|
|
|
int16_t y{0};
|
|
|
|
uint16_t width{0};
|
|
|
|
uint16_t height{0};
|
|
|
|
|
|
|
|
int16_t offset_y{0};
|
|
|
|
int16_t offset_x{0};
|
|
|
|
|
|
|
|
uint16_t padding_left{0};
|
|
|
|
uint16_t padding_right{0};
|
|
|
|
|
2016-10-11 06:18:25 +00:00
|
|
|
int16_t module_margin_left{0};
|
|
|
|
int16_t module_margin_right{2};
|
2016-06-15 03:32:35 +00:00
|
|
|
|
|
|
|
int16_t lineheight{0};
|
|
|
|
int16_t spacing{1};
|
|
|
|
string separator;
|
|
|
|
|
|
|
|
color background{g_colorwhite};
|
|
|
|
color foreground{g_colorblack};
|
|
|
|
color linecolor{g_colorblack};
|
|
|
|
|
|
|
|
alignment align{alignment::RIGHT};
|
|
|
|
|
|
|
|
bool bottom{false};
|
2016-10-12 03:19:29 +00:00
|
|
|
bool dock{false};
|
2016-06-15 03:32:35 +00:00
|
|
|
|
2016-10-11 10:38:15 +00:00
|
|
|
monitor_t monitor;
|
2016-06-15 03:32:35 +00:00
|
|
|
string wmname;
|
|
|
|
|
|
|
|
int16_t vertical_mid{0};
|
|
|
|
|
|
|
|
string geom() {
|
|
|
|
char buffer[32]{
|
|
|
|
'\0',
|
|
|
|
};
|
|
|
|
snprintf(buffer, sizeof(buffer), "%dx%d+%d+%d", width, height, x, y);
|
|
|
|
return string{*buffer};
|
2016-10-25 18:14:44 +00:00
|
|
|
}
|
2016-06-15 03:32:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct tray_settings {
|
|
|
|
tray_settings() = default;
|
|
|
|
|
|
|
|
tray_settings& operator=(tray_settings& o) {
|
|
|
|
background = o.background;
|
|
|
|
align = o.align;
|
|
|
|
orig_x = o.orig_x;
|
|
|
|
orig_y = o.orig_y;
|
|
|
|
width = o.width;
|
|
|
|
height = o.height;
|
|
|
|
spacing = o.spacing;
|
|
|
|
slots = o.slots;
|
2016-10-15 11:59:16 +00:00
|
|
|
sibling = o.sibling;
|
2016-06-15 03:32:35 +00:00
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t background;
|
|
|
|
alignment align{alignment::NONE};
|
|
|
|
int16_t orig_x{0};
|
|
|
|
int16_t orig_y{0};
|
|
|
|
uint16_t width{0};
|
|
|
|
uint16_t height{0};
|
|
|
|
uint16_t spacing{0};
|
|
|
|
uint16_t slots{0};
|
2016-10-15 11:59:16 +00:00
|
|
|
uint32_t sibling;
|
2016-06-15 03:32:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct border_settings {
|
|
|
|
border_settings() = default;
|
|
|
|
lemonbuddy::color color{g_colorblack};
|
|
|
|
uint16_t size{0};
|
|
|
|
};
|
|
|
|
|
|
|
|
struct action_block {
|
|
|
|
action_block() = default;
|
2016-10-11 10:38:15 +00:00
|
|
|
mousebtn button{mousebtn::NONE};
|
2016-06-15 03:32:35 +00:00
|
|
|
string command;
|
|
|
|
int16_t start_x{0};
|
|
|
|
int16_t end_x{0};
|
|
|
|
alignment align;
|
|
|
|
bool active{true};
|
2016-10-11 01:01:12 +00:00
|
|
|
#if DEBUG and DRAW_CLICKABLE_AREA_HINTS
|
|
|
|
xcb_window_t clickable_area;
|
|
|
|
#endif
|
2016-06-15 03:32:35 +00:00
|
|
|
};
|
|
|
|
|
2016-10-25 18:14:44 +00:00
|
|
|
struct wmsettings_bspwm {};
|
2016-10-18 23:26:17 +00:00
|
|
|
|
2016-06-15 03:32:35 +00:00
|
|
|
LEMONBUDDY_NS_END
|