*<theme><name>*
The name of the Openbox theme to use. Default is Clearlooks-3.4
+*<theme><cornerRadius>*
+ The radius of server side decoration top corners. Default is 8.
+
*<theme><font place="">*
The font to use for a specific element of a window, menu or OSD.
Place can be any of:
*<keyboard><keybind key=""><action name="">*
Keybind action. See labwc-action(5)
-Default if no rc.xml is found:
+Default key-binds if no rc.xml is found:
```
<keyboard>
struct rcxml {
bool xdg_shell_server_side_deco;
char *theme_name;
+ int corner_radius;
char *font_name_activewindow;
int font_size_activewindow;
struct wl_list keybinds;
rc.xdg_shell_server_side_deco = get_bool(content);
} else if (!strcmp(nodename, "name.theme")) {
rc.theme_name = strdup(content);
+ } else if (!strcmp(nodename, "cornerradius.theme")) {
+ rc.corner_radius = atoi(content);
} else if (!strcmp(nodename, "name.font.theme")) {
fill_font(nodename, content, font_place);
} else if (!strcmp(nodename, "size.font.theme")) {
xmlCleanupParser();
}
-static void
-pre_processing(void)
-{
- rc.xdg_shell_server_side_deco = true;
- rc.font_size_activewindow = 10;
-}
-
static void
rcxml_init()
{
has_run = true;
LIBXML_TEST_VERSION
wl_list_init(&rc.keybinds);
- pre_processing();
+ rc.xdg_shell_server_side_deco = true;
+ rc.corner_radius = 8;
+ rc.font_size_activewindow = 10;
}
static void
rc.font_name_activewindow = strdup("sans");
}
set_title_height();
+ if (rc.corner_radius >= rc.title_height) {
+ rc.corner_radius = rc.title_height - 1;
+ }
}
static void
part->box = ssd_box(view, part->type);
struct rounded_corner_ctx ctx = {
.box = &part->box,
- .radius = 7.0, /* TODO: get from config */
+ .radius = rc.corner_radius,
.line_width = theme->border_width,
.fill_color = theme->window_active_title_bg_color,
.border_color = theme->window_active_handle_bg_color,