mirror of
https://github.com/davatorium/rofi.git
synced 2025-02-10 15:44:41 -05:00
Update default theme and converter.
This commit is contained in:
parent
a97831e297
commit
af369bd244
2 changed files with 61 additions and 69 deletions
|
@ -31,9 +31,10 @@
|
||||||
const char *default_theme =
|
const char *default_theme =
|
||||||
"* {"
|
"* {"
|
||||||
" spacing: 2;"
|
" spacing: 2;"
|
||||||
|
" background-color: transparent;"
|
||||||
" background: #FDF6E3FF;"
|
" background: #FDF6E3FF;"
|
||||||
" foreground: #002B36FF;"
|
" foreground: #002B36FF;"
|
||||||
" bordercolor: @foreground;"
|
" border-color: @foreground;"
|
||||||
" separatorcolor: @foreground;"
|
" separatorcolor: @foreground;"
|
||||||
" red: #DC322FFF;"
|
" red: #DC322FFF;"
|
||||||
" blue: #268BD2FF;"
|
" blue: #268BD2FF;"
|
||||||
|
@ -60,91 +61,83 @@ const char *default_theme =
|
||||||
"}"
|
"}"
|
||||||
"#window {"
|
"#window {"
|
||||||
" border: 1;"
|
" border: 1;"
|
||||||
" foreground: @foreground;"
|
|
||||||
" background: #00000000;"
|
|
||||||
" padding: 5;"
|
" padding: 5;"
|
||||||
|
" background-color: @background;"
|
||||||
"}"
|
"}"
|
||||||
"#window.box {"
|
"#mainbox {"
|
||||||
" background: @background;"
|
|
||||||
" foreground: @bordercolor;"
|
|
||||||
"}"
|
|
||||||
"#window.mainbox {"
|
|
||||||
" border: 0;"
|
" border: 0;"
|
||||||
" padding: 0;"
|
" padding: 0;"
|
||||||
"}"
|
"}"
|
||||||
"#window.mainbox.message.box {"
|
"#message {"
|
||||||
" border: 1px dash 0px 0px ;"
|
" border: 1px dash 0px 0px ;"
|
||||||
" padding: 2px 0px 0px ;"
|
" padding: 2px 0px 0px ;"
|
||||||
" foreground: @separatorcolor;"
|
" border-color: @separatorcolor;"
|
||||||
"}"
|
"}"
|
||||||
"#window.mainbox.message.normal {"
|
"#message normal {"
|
||||||
" foreground: @foreground;"
|
" text-color: @foreground;"
|
||||||
"}"
|
"}"
|
||||||
"#window.mainbox.listview.box {"
|
"#listview {"
|
||||||
" foreground: @separatorcolor;"
|
" border-color: @separatorcolor;"
|
||||||
"}"
|
"}"
|
||||||
"#window.mainbox.listview {"
|
"#listview {"
|
||||||
" fixed-height: 0;"
|
" fixed-height: 0;"
|
||||||
" border: 2px dash 0px 0px ;"
|
" border: 2px dash 0px 0px ;"
|
||||||
" padding: 2px 0px 0px ;"
|
" padding: 2px 0px 0px ;"
|
||||||
"}"
|
"}"
|
||||||
"#window.mainbox.listview.element {"
|
"#element {"
|
||||||
" border: 0;"
|
" border: 0;"
|
||||||
"}"
|
"}"
|
||||||
"#window.mainbox.listview.element.normal.normal {"
|
"#element normal.normal {"
|
||||||
" foreground: @normal-foreground;"
|
" text-color: @normal-foreground;"
|
||||||
" background: @normal-background;"
|
" background-color: @normal-background;"
|
||||||
"}"
|
"}"
|
||||||
"#window.mainbox.listview.element.normal.urgent {"
|
"#element normal.urgent {"
|
||||||
" foreground: @urgent-foreground;"
|
" text-color: @urgent-foreground;"
|
||||||
" background: @urgent-background;"
|
" background-color: @urgent-background;"
|
||||||
"}"
|
"}"
|
||||||
"#window.mainbox.listview.element.normal.active {"
|
"#element normal.active {"
|
||||||
" foreground: @active-foreground;"
|
" text-color: @active-foreground;"
|
||||||
" background: @active-background;"
|
" background-color: @active-background;"
|
||||||
"}"
|
"}"
|
||||||
"#window.mainbox.listview.element.selected.normal {"
|
"#element selected.normal {"
|
||||||
" foreground: @selected-normal-foreground;"
|
" text-color: @selected-normal-foreground;"
|
||||||
" background: @selected-normal-background;"
|
" background-color: @selected-normal-background;"
|
||||||
"}"
|
"}"
|
||||||
"#window.mainbox.listview.element.selected.urgent {"
|
"#element selected.urgent {"
|
||||||
" foreground: @selected-urgent-foreground;"
|
" text-color: @selected-urgent-foreground;"
|
||||||
" background: @selected-urgent-background;"
|
" background-color: @selected-urgent-background;"
|
||||||
"}"
|
"}"
|
||||||
"#window.mainbox.listview.element.selected.active {"
|
"#element selected.active {"
|
||||||
" foreground: @selected-active-foreground;"
|
" text-color: @selected-active-foreground;"
|
||||||
" background: @selected-active-background;"
|
" background-color: @selected-active-background;"
|
||||||
"}"
|
"}"
|
||||||
"#window.mainbox.listview.element.alternate.normal {"
|
"#element alternate.normal {"
|
||||||
" foreground: @alternate-normal-foreground;"
|
" text-color: @alternate-normal-foreground;"
|
||||||
" background: @alternate-normal-background;"
|
" background-color: @alternate-normal-background;"
|
||||||
"}"
|
"}"
|
||||||
"#window.mainbox.listview.element.alternate.urgent {"
|
"#element alternate.urgent {"
|
||||||
" foreground: @alternate-urgent-foreground;"
|
" text-color: @alternate-urgent-foreground;"
|
||||||
" background: @alternate-urgent-background;"
|
" background-color: @alternate-urgent-background;"
|
||||||
"}"
|
"}"
|
||||||
"#window.mainbox.listview.element.alternate.active {"
|
"#element alternate.active {"
|
||||||
" foreground: @alternate-active-foreground;"
|
" text-color: @alternate-active-foreground;"
|
||||||
" background: @alternate-active-background;"
|
" background-color: @alternate-active-background;"
|
||||||
"}"
|
"}"
|
||||||
"#window.mainbox.listview.scrollbar {"
|
"#window.mainbox.listview.scrollbar {"
|
||||||
" border: 0; width: 4px;"
|
" border: 0;"
|
||||||
|
" width: 4px;"
|
||||||
" padding: 0;"
|
" padding: 0;"
|
||||||
"}"
|
"}"
|
||||||
"#window.mainbox.sidebar.box {"
|
"#sidebar {"
|
||||||
" border: 2px dash 0px 0px ;"
|
" border: 2px dash 0px 0px ;"
|
||||||
" foreground: @separatorcolor;"
|
" border-color: @separatorcolor;"
|
||||||
"}"
|
"}"
|
||||||
"#window.mainbox.sidebar button selected {"
|
"#button selected {"
|
||||||
" background: @selected-normal-background;"
|
" background-color: @selected-normal-background;"
|
||||||
" foreground: @selected-normal-foreground;"
|
" text-color: @selected-normal-foreground;"
|
||||||
"}"
|
"}"
|
||||||
"#window.mainbox.inputbar {"
|
"#inputbar {"
|
||||||
" spacing: 0;"
|
" spacing: 0;"
|
||||||
" text: @normal-foreground;"
|
" text-color: @normal-foreground;"
|
||||||
"}"
|
|
||||||
"#window.mainbox.inputbar.box {"
|
|
||||||
" border: 0px 0px 0px 0px;"
|
|
||||||
" "
|
|
||||||
"}";
|
"}";
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -832,47 +832,46 @@ void rofi_theme_convert_old ( void )
|
||||||
|
|
||||||
if ( config.separator_style != NULL ) {
|
if ( config.separator_style != NULL ) {
|
||||||
if ( g_strcmp0 ( config.separator_style, "none" ) == 0 ) {
|
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 );
|
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 );
|
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 );
|
rofi_theme_parse_string ( str3 );
|
||||||
}
|
}
|
||||||
else if ( g_strcmp0 ( config.separator_style, "solid" ) == 0 ) {
|
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 );
|
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 );
|
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 );
|
rofi_theme_parse_string ( str3 );
|
||||||
} /* dash is default */
|
} /* dash is default */
|
||||||
}
|
}
|
||||||
/* Line Margin */
|
/* 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 );
|
rofi_theme_parse_string ( str );
|
||||||
g_free ( str );
|
g_free ( str );
|
||||||
}
|
}
|
||||||
/* Line Padding */
|
/* 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 );
|
rofi_theme_parse_string ( str );
|
||||||
g_free ( str );
|
g_free ( str );
|
||||||
// inputbar
|
// inputbar
|
||||||
str = g_strdup_printf ( "#window.mainbox.inputbar { padding: %dpx;}\n" \
|
str = g_strdup_printf ( "#inputbar { padding: %dpx;}", config.line_padding );
|
||||||
"#window.mainbox.inputbar.box { padding: 0px; }", config.line_padding );
|
|
||||||
rofi_theme_parse_string ( str );
|
rofi_theme_parse_string ( str );
|
||||||
g_free ( str );
|
g_free ( str );
|
||||||
}
|
}
|
||||||
if ( config.hide_scrollbar ) {
|
if ( config.hide_scrollbar ) {
|
||||||
const char *str = "#window.mainbox.listview.box { scrollbar: false; }";
|
const char *str = "#listview { scrollbar: false; }";
|
||||||
rofi_theme_parse_string ( str );
|
rofi_theme_parse_string ( str );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const char *str = "#window.mainbox.listview.box { scrollbar: true; }";
|
const char *str = "#listview { scrollbar: true; }";
|
||||||
rofi_theme_parse_string ( str );
|
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 );
|
rofi_theme_parse_string ( str2 );
|
||||||
g_free ( str2 );
|
g_free ( str2 );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue