summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/default-theme.h105
-rw-r--r--source/theme.c25
2 files changed, 61 insertions, 69 deletions
diff --git a/include/default-theme.h b/include/default-theme.h
index c87edb6f..ef189778 100644
--- a/include/default-theme.h
+++ b/include/default-theme.h
@@ -31,9 +31,10 @@
const char *default_theme =
"* {"
" spacing: 2;"
+ " background-color: transparent;"
" background: #FDF6E3FF;"
" foreground: #002B36FF;"
- " bordercolor: @foreground;"
+ " border-color: @foreground;"
" separatorcolor: @foreground;"
" red: #DC322FFF;"
" blue: #268BD2FF;"
@@ -60,91 +61,83 @@ const char *default_theme =
"}"
"#window {"
" border: 1;"
- " foreground: @foreground;"
- " background: #00000000;"
" padding: 5;"
+ " background-color: @background;"
"}"
- "#window.box {"
- " background: @background;"
- " foreground: @bordercolor;"
- "}"
- "#window.mainbox {"
+ "#mainbox {"
" border: 0;"
" padding: 0;"
"}"
- "#window.mainbox.message.box {"
+ "#message {"
" border: 1px dash 0px 0px ;"
" padding: 2px 0px 0px ;"
- " foreground: @separatorcolor;"
+ " border-color: @separatorcolor;"
"}"
- "#window.mainbox.message.normal {"
- " foreground: @foreground;"
+ "#message normal {"
+ " text-color: @foreground;"
"}"
- "#window.mainbox.listview.box {"
- " foreground: @separatorcolor;"
+ "#listview {"
+ " border-color: @separatorcolor;"
"}"
- "#window.mainbox.listview {"
+ "#listview {"
" fixed-height: 0;"
" border: 2px dash 0px 0px ;"
" padding: 2px 0px 0px ;"
"}"
- "#window.mainbox.listview.element {"
+ "#element {"
" border: 0;"
"}"
- "#window.mainbox.listview.element.normal.normal {"
- " foreground: @normal-foreground;"
- " background: @normal-background;"
+ "#element normal.normal {"
+ " text-color: @normal-foreground;"
+ " background-color: @normal-background;"
"}"
- "#window.mainbox.listview.element.normal.urgent {"
- " foreground: @urgent-foreground;"
- " background: @urgent-background;"
+ "#element normal.urgent {"
+ " text-color: @urgent-foreground;"
+ " background-color: @urgent-background;"
"}"
- "#window.mainbox.listview.element.normal.active {"
- " foreground: @active-foreground;"
- " background: @active-background;"
+ "#element normal.active {"
+ " text-color: @active-foreground;"
+ " background-color: @active-background;"
"}"
- "#window.mainbox.listview.element.selected.normal {"
- " foreground: @selected-normal-foreground;"
- " background: @selected-normal-background;"
+ "#element selected.normal {"
+ " text-color: @selected-normal-foreground;"
+ " background-color: @selected-normal-background;"
"}"
- "#window.mainbox.listview.element.selected.urgent {"
- " foreground: @selected-urgent-foreground;"
- " background: @selected-urgent-background;"
+ "#element selected.urgent {"
+ " text-color: @selected-urgent-foreground;"
+ " background-color: @selected-urgent-background;"
"}"
- "#window.mainbox.listview.element.selected.active {"
- " foreground: @selected-active-foreground;"
- " background: @selected-active-background;"
+ "#element selected.active {"
+ " text-color: @selected-active-foreground;"
+ " background-color: @selected-active-background;"
"}"
- "#window.mainbox.listview.element.alternate.normal {"
- " foreground: @alternate-normal-foreground;"
- " background: @alternate-normal-background;"
+ "#element alternate.normal {"
+ " text-color: @alternate-normal-foreground;"
+ " background-color: @alternate-normal-background;"
"}"
- "#window.mainbox.listview.element.alternate.urgent {"
- " foreground: @alternate-urgent-foreground;"
- " background: @alternate-urgent-background;"
+ "#element alternate.urgent {"
+ " text-color: @alternate-urgent-foreground;"
+ " background-color: @alternate-urgent-background;"
"}"
- "#window.mainbox.listview.element.alternate.active {"
- " foreground: @alternate-active-foreground;"
- " background: @alternate-active-background;"
+ "#element alternate.active {"
+ " text-color: @alternate-active-foreground;"
+ " background-color: @alternate-active-background;"
"}"
"#window.mainbox.listview.scrollbar {"
- " border: 0; width: 4px;"
+ " border: 0;"
+ " width: 4px;"
" padding: 0;"
"}"
- "#window.mainbox.sidebar.box {"
- " border: 2px dash 0px 0px ;"
- " foreground: @separatorcolor;"
+ "#sidebar {"
+ " border: 2px dash 0px 0px ;"
+ " border-color: @separatorcolor;"
"}"
- "#window.mainbox.sidebar button selected {"
- " background: @selected-normal-background;"
- " foreground: @selected-normal-foreground;"
+ "#button selected {"
+ " background-color: @selected-normal-background;"
+ " text-color: @selected-normal-foreground;"
"}"
- "#window.mainbox.inputbar {"
+ "#inputbar {"
" spacing: 0;"
- " text: @normal-foreground;"
- "}"
- "#window.mainbox.inputbar.box {"
- " border: 0px 0px 0px 0px;"
- " "
+ " text-color: @normal-foreground;"
"}";
#endif
diff --git a/source/theme.c b/source/theme.c
index fdcde039..9081fcbd 100644
--- a/source/theme.c
+++ b/source/theme.c
@@ -832,47 +832,46 @@ void rofi_theme_convert_old ( void )
if ( config.separator_style != NULL ) {
if ( g_strcmp0 ( config.separator_style, "none" ) == 0 ) {
- const char *const str = "#window.mainbox.listview box { border: 0px; }";
+ const char *const str = "#listview { border: 0px; }";
rofi_theme_parse_string ( str );
- const char *const str2 = "#window.mainbox.sidebar box { border: 0px; }";
+ const char *const str2 = "#sidebar { border: 0px; }";
rofi_theme_parse_string ( str2 );
- const char *const str3 = "#window.mainbox.message box { border: 0px; }";
+ const char *const str3 = "#message { border: 0px; }";
rofi_theme_parse_string ( str3 );
}
else if ( g_strcmp0 ( config.separator_style, "solid" ) == 0 ) {
- const char *const str = "#window.mainbox.listview box { border: 2px solid 0px 0px 0px; }";
+ const char *const str = "#listview { border: 2px solid 0px 0px 0px; }";
rofi_theme_parse_string ( str );
- const char *const str2 = "#window.mainbox.sidebar box { border: 2px solid 0px 0px 0px; }";
+ const char *const str2 = "#sidebar { border: 2px solid 0px 0px 0px; }";
rofi_theme_parse_string ( str2 );
- const char *const str3 = "#window.mainbox.message box { border: 2px solid 0px 0px 0px; }";
+ const char *const str3 = "#message { border: 2px solid 0px 0px 0px; }";
rofi_theme_parse_string ( str3 );
} /* dash is default */
}
/* Line Margin */
{
- char *str = g_strdup_printf ( "#window.mainbox.listview box { spacing: %dpx;}", config.line_margin );
+ char *str = g_strdup_printf ( "#listview { spacing: %dpx;}", config.line_margin );
rofi_theme_parse_string ( str );
g_free ( str );
}
/* Line Padding */
{
- char *str = g_strdup_printf ( "#window.mainbox.listview.element { padding: %dpx;}", config.line_padding );
+ char *str = g_strdup_printf ( "#element { padding: %dpx;}", config.line_padding );
rofi_theme_parse_string ( str );
g_free ( str );
// inputbar
- str = g_strdup_printf ( "#window.mainbox.inputbar { padding: %dpx;}\n" \
- "#window.mainbox.inputbar.box { padding: 0px; }", config.line_padding );
+ str = g_strdup_printf ( "#inputbar { padding: %dpx;}", config.line_padding );
rofi_theme_parse_string ( str );
g_free ( str );
}
if ( config.hide_scrollbar ) {
- const char *str = "#window.mainbox.listview.box { scrollbar: false; }";
+ const char *str = "#listview { scrollbar: false; }";
rofi_theme_parse_string ( str );
}
else {
- const char *str = "#window.mainbox.listview.box { scrollbar: true; }";
+ const char *str = "#listview { scrollbar: true; }";
rofi_theme_parse_string ( str );
- char *str2 = g_strdup_printf ( "#window.mainbox.listview.scrollbar { handle-width: %dpx; }", config.scrollbar_width );
+ char *str2 = g_strdup_printf ( "#scrollbar { handle-width: %dpx; }", config.scrollbar_width );
rofi_theme_parse_string ( str2 );
g_free ( str2 );
}