Remove leading # from dump theme and add mesg about rofi dumping it

This commit is contained in:
Dave Davenport 2017-10-31 19:29:27 +01:00
parent 316de7ebeb
commit ba0acd625f
5 changed files with 58 additions and 52 deletions

View File

@ -1,3 +1,6 @@
/**
* rofi -dump-theme output.
**/
* {
selected-normal-foreground: @lightbg;
foreground: rgba ( 0, 43, 54, 100 % );
@ -28,24 +31,24 @@
active-background: @background;
selected-active-background: @blue;
}
#window {
window {
background-color: @background;
border: 1;
padding: 5;
}
#mainbox {
mainbox {
border: 0;
padding: 0;
}
#message {
message {
border: 2px dash 0px 0px ;
border-color: @separatorcolor;
padding: 1px ;
}
#textbox {
textbox {
text-color: @foreground;
}
#listview {
listview {
fixed-height: 0;
border: 2px dash 0px 0px ;
border-color: @separatorcolor;
@ -53,79 +56,79 @@
scrollbar: true;
padding: 2px 0px 0px ;
}
#element {
element {
border: 0;
padding: 1px ;
}
#element.normal.normal {
element normal.normal {
background-color: @normal-background;
text-color: @normal-foreground;
}
#element.normal.urgent {
element normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
#element.normal.active {
element normal.active {
background-color: @active-background;
text-color: @active-foreground;
}
#element.selected.normal {
element selected.normal {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
#element.selected.urgent {
element selected.urgent {
background-color: @selected-urgent-background;
text-color: @selected-urgent-foreground;
}
#element.selected.active {
element selected.active {
background-color: @selected-active-background;
text-color: @selected-active-foreground;
}
#element.alternate.normal {
element alternate.normal {
background-color: @alternate-normal-background;
text-color: @alternate-normal-foreground;
}
#element.alternate.urgent {
element alternate.urgent {
background-color: @alternate-urgent-background;
text-color: @alternate-urgent-foreground;
}
#element.alternate.active {
element alternate.active {
background-color: @alternate-active-background;
text-color: @alternate-active-foreground;
}
#scrollbar {
scrollbar {
width: 4px ;
border: 0;
handle-color: @normal-foreground;
handle-width: 8px ;
padding: 0;
}
#sidebar {
sidebar {
border: 2px dash 0px 0px ;
border-color: @separatorcolor;
}
#button {
button {
spacing: 0;
text-color: @normal-foreground;
}
#button.selected {
button selected {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
#inputbar {
inputbar {
spacing: 3px ;
text-color: @normal-foreground;
padding: 1px ;
}
#case-indicator {
case-indicator {
spacing: 0;
text-color: @normal-foreground;
}
#entry {
entry {
spacing: 0;
text-color: @normal-foreground;
}
#prompt {
prompt {
spacing: 0;
text-color: @normal-foreground;
}

View File

@ -1,3 +1,6 @@
/**
* rofi -dump-theme output.
**/
* {
selected-normal-foreground: rgba ( 2, 20, 63, 100 % );
foreground: rgba ( 219, 223, 188, 100 % );
@ -28,24 +31,24 @@
active-background: rgba ( 0, 0, 0, 0 % );
selected-active-background: rgba ( 138, 196, 255, 100 % );
}
#window {
window {
background-color: @background;
border: 1;
padding: 5;
}
#mainbox {
mainbox {
border: 0;
padding: 0;
}
#message {
message {
border: 2px 0px 0px ;
border-color: @separatorcolor;
padding: 1px ;
}
#textbox {
textbox {
text-color: @foreground;
}
#listview {
listview {
fixed-height: 0;
border: 2px 0px 0px ;
border-color: @separatorcolor;
@ -53,79 +56,79 @@
scrollbar: true;
padding: 2px 0px 0px ;
}
#element {
element {
border: 0;
padding: 1px ;
}
#element.normal.normal {
element normal.normal {
background-color: @normal-background;
text-color: @normal-foreground;
}
#element.normal.urgent {
element normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
#element.normal.active {
element normal.active {
background-color: @active-background;
text-color: @active-foreground;
}
#element.selected.normal {
element selected.normal {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
#element.selected.urgent {
element selected.urgent {
background-color: @selected-urgent-background;
text-color: @selected-urgent-foreground;
}
#element.selected.active {
element selected.active {
background-color: @selected-active-background;
text-color: @selected-active-foreground;
}
#element.alternate.normal {
element alternate.normal {
background-color: @alternate-normal-background;
text-color: @alternate-normal-foreground;
}
#element.alternate.urgent {
element alternate.urgent {
background-color: @alternate-urgent-background;
text-color: @alternate-urgent-foreground;
}
#element.alternate.active {
element alternate.active {
background-color: @alternate-active-background;
text-color: @alternate-active-foreground;
}
#scrollbar {
scrollbar {
width: 4px ;
border: 0;
handle-color: @normal-foreground;
handle-width: 8px ;
padding: 0;
}
#sidebar {
sidebar {
border: 2px 0px 0px ;
border-color: @separatorcolor;
}
#button {
button {
spacing: 0;
text-color: @normal-foreground;
}
#button.selected {
button selected {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
#inputbar {
inputbar {
spacing: 3px ;
text-color: @normal-foreground;
padding: 1px ;
}
#case-indicator {
case-indicator {
spacing: 0;
text-color: @normal-foreground;
}
#entry {
entry {
spacing: 0;
text-color: @normal-foreground;
}
#prompt {
prompt {
spacing: 0;
text-color: @normal-foreground;
}

View File

@ -286,11 +286,10 @@ static void rofi_theme_print_index ( ThemeWidget *widget )
index = 4;
for ( GList *iter = g_list_first ( list ); iter != NULL; iter = g_list_next ( iter ) ) {
char *name = (char *) iter->data;
if ( iter->prev == NULL ) {
putchar ( '#' );
}
fputs ( name, stdout );
if ( iter->next ) {
if ( iter->prev == NULL && iter->next ) {
putchar ( ' ' );
} else if ( iter->next ) {
putchar ( '.' );
}
}
@ -321,6 +320,7 @@ static void rofi_theme_print_index ( ThemeWidget *widget )
void rofi_theme_print ( ThemeWidget *widget )
{
if ( widget != NULL ) {
printf("/**\n * rofi -dump-theme output.\n * Rofi version: %s\n **/\n", VERSION);
rofi_theme_print_index ( widget );
}
}

View File

@ -3,7 +3,7 @@
TOP_DIR=$1
xrdb -retain -load ${TOP_DIR}/doc/old-theme-convert-input.theme
rofi -config ${TOP_DIR}/doc/old-theme-convert-input.theme -dump-theme > temp.txt
rofi -config ${TOP_DIR}/doc/old-theme-convert-input.theme -dump-theme | grep -v "Rofi version" > temp.txt
if ! diff temp.txt ${TOP_DIR}/doc/old-theme-convert-output.rasi > /dev/null
then

View File

@ -2,7 +2,7 @@
TOP_DIR=$1
rofi -no-config -dump-theme > temp.txt
rofi -no-config -dump-theme | grep -v "Rofi version" > temp.txt
if ! diff temp.txt ${TOP_DIR}/doc/default_theme.rasi > /dev/null
then