summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-03-29 20:18:41 +0200
committerDave Davenport <qball@gmpclient.org>2017-03-29 20:18:41 +0200
commiteeee200d8f5778cd65cd1f7cef985df3526772c4 (patch)
tree1eac7634b138b09e1033d671e92e0552dfef8c24
parent28f74e3a5aaacc896345236f8dfa2dfafa63a409 (diff)
Remove old theme support. (part 1)
-rw-r--r--Makefile.am1
-rw-r--r--config/config.c20
-rw-r--r--doc/test_xr.txt26
-rw-r--r--include/default-theme.h88
-rw-r--r--include/settings.h21
-rw-r--r--include/theme.h7
-rw-r--r--source/rofi.c9
-rw-r--r--source/theme.c301
-rw-r--r--source/view.c3
-rw-r--r--source/widgets/listview.c2
-rw-r--r--source/xrmoptions.c29
11 files changed, 98 insertions, 409 deletions
diff --git a/Makefile.am b/Makefile.am
index 5eb96e3f..467b6ebb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -82,6 +82,7 @@ SOURCES=\
include/timings.h\
include/history.h\
include/theme.h\
+ include/default-theme.h\
include/widgets/box.h\
include/widgets/container.h\
include/widgets/widget.h\
diff --git a/config/config.c b/config/config.c
index 3bec7dec..bd6df5cb 100644
--- a/config/config.c
+++ b/config/config.c
@@ -33,8 +33,6 @@ Settings config = {
/** List of enabled modi. */
/** -modi */
.modi = "window,run,ssh",
- /** Border width around the window. */
- .menu_bw = 1,
/** The width of the switcher. (0100 in % > 100 in pixels) */
.menu_width = 50,
/** Maximum number of options to show. */
@@ -45,12 +43,6 @@ Settings config = {
.menu_font = "mono 12",
/** Row colors */
- // Enable new color
- .color_normal = "#fdf6e3,#002b36,#eee8d5,#586e75,#eee8d5",
- .color_urgent = "#fdf6e3,#dc322f,#eee8d5,#dc322f,#fdf6e3",
- .color_active = "#fdf6e3,#268bd2,#eee8d5,#268bd2,#fdf6e3",
- .color_window = "#fdf6e3,#002b36",
-
/** Terminal to use. (for ssh and open in terminal) */
.terminal_emulator = "rofi-sensible-terminal",
.ssh_client = "ssh",
@@ -76,8 +68,6 @@ Settings config = {
*
*/
.location = WL_CENTER,
- /** Padding between elements */
- .padding = 5,
/** Y offset */
.y_offset = 0,
/** X offset */
@@ -111,22 +101,12 @@ Settings config = {
.matching_method = MM_NORMAL,
/** Monitor */
.monitor = "-5",
- /** set line margin */
- .line_margin = 2,
- .line_padding = 1,
/** Set filter */
.filter = NULL,
- /** Separator style: dash/solid */
- .separator_style = "dash",
- /** Hide scrollbar */
- .hide_scrollbar = FALSE,
.fullscreen = FALSE,
- .fake_transparency = FALSE,
.dpi = -1,
.threads = 0,
- .scrollbar_width = 8,
.scroll_method = 0,
- .fake_background = "screenshot",
.window_format = "{w} {c} {t}",
.click_to_exit = TRUE,
.show_match = TRUE,
diff --git a/doc/test_xr.txt b/doc/test_xr.txt
index 0bd737c3..150d59ad 100644
--- a/doc/test_xr.txt
+++ b/doc/test_xr.txt
@@ -8,20 +8,8 @@ rofi.lines: 8
rofi.columns: 1
! "Font to use" Set from: File
rofi.font: Source Code Pro Medium 10
-! "Color scheme for normal row" Set from: File
-rofi.color-normal: argb:0000000, #a2b5df, argb:3affffff, #a2b5df, #02143f
-! "Color scheme for urgent row" Set from: File
-rofi.color-urgent: argb:0000000, #ff817f, argb:3affffff, #ff817f, #02143f
-! "Color scheme for active row" Set from: File
-rofi.color-active: argb:0000000, #6aa4ff, argb:3affffff, #6aa4ff, #02143f
-! "Color scheme window" Set from: File
-rofi.color-window: argb:ee02143f, #a2b5df, #a2b5df
-! "Border width" Set from: File
-rofi.bw: 2
! "Location on screen" Set from: File
rofi.location: 2
-! "Padding" Set from: File
-rofi.padding: 2
! "Y-offset relative to location" Set from: File
rofi.yoffset: -2
! "X-offset relative to location" Set from: File
@@ -70,30 +58,16 @@ rofi.combi-modi: window,drun,run,ssh
rofi.tokenize: true
! "Monitor id to show on" Set from: File
rofi.m: -1
-! "Margin between rows" Set from: File
-rofi.line-margin: 3
-! "Padding within rows" Set from: Default
-! rofi.line-padding: 1
! "Pre-set filter" Set from: Default
! rofi.filter:
-! "Separator style (none, dash, solid)" Set from: File
-rofi.separator-style: solid
-! "Hide scroll-bar" Set from: File
-rofi.hide-scrollbar: false
! "Fullscreen" Set from: File
rofi.fullscreen: false
-! "Fake transparency" Set from: File
-rofi.fake-transparency: false
! "DPI" Set from: File
rofi.dpi: 101
! "Threads to use for string matching" Set from: File
rofi.threads: 8
-! "Scrollbar width" Set from: File
-rofi.scrollbar-width: 8
! "Scrolling method. (0: Page, 1: Centered)" Set from: File
rofi.scroll-method: 0
-! "Background to use for fake transparency. (background or screenshot)" Set from: File
-rofi.fake-background: screenshot
! "Window Format. w (desktop name), t (title), n (name), r (role), c (class)" Set from: File
rofi.window-format: w c t
! "Click outside the window to exit" Set from: Default
diff --git a/include/default-theme.h b/include/default-theme.h
new file mode 100644
index 00000000..dc8e7fa2
--- /dev/null
+++ b/include/default-theme.h
@@ -0,0 +1,88 @@
+#ifndef ROFI_DEFAULT_THEME
+#define ROFI_DEFAULT_THEME
+
+const char *default_theme =
+"* {"
+" spacing: 2;"
+" background: #00000000;"
+"}"
+"#window {"
+" border: 1;"
+" foreground: #FF002B36;"
+" padding: 5;"
+" background: #FFFDF6E3;"
+"}"
+"#window.mainbox {"
+" border: 0;"
+" padding: 0;"
+"}"
+"#window.mainbox.message.box {"
+" border: 1px dash 0px 0px ;"
+" padding: 2px 0px 0px ;"
+"}"
+"#window.mainbox.message.normal {"
+" foreground: #FF002B36;"
+" background: #FFFDF6E3;"
+"}"
+"#window.mainbox.listview {"
+" fixed-height: 0;"
+" border: 1px dash 0px 0px ;"
+" columns: 1;"
+" padding: 2px 0px 0px ;"
+"}"
+"#window.mainbox.listview.element {"
+" border: 0;"
+"}"
+"#window.mainbox.listview.element.normal.normal {"
+" foreground: #FF002B36;"
+" background: #FFFDF6E3;"
+"}"
+"#window.mainbox.listview.element.normal.urgent {"
+" foreground: #FFDC322F;"
+" background: #FFFDF6E3;"
+"}"
+"#window.mainbox.listview.element.normal.active {"
+" foreground: #FF268BD2;"
+" background: #FFFDF6E3;"
+"}"
+"#window.mainbox.listview.element.selected.normal {"
+" foreground: #FFEEE8D5;"
+" background: #FF586E75;"
+"}"
+"#window.mainbox.listview.element.selected.urgent {"
+" foreground: #FFFDF6E3;"
+" background: #FFDC322F;"
+"}"
+"#window.mainbox.listview.element.selected.active {"
+" foreground: #FFFDF6E3;"
+" background: #FF268BD2;"
+"}"
+"#window.mainbox.listview.element.alternate.normal {"
+" foreground: #FF002B36;"
+" background: #FFEEE8D5;"
+"}"
+"#window.mainbox.listview.element.alternate.urgent {"
+" foreground: #FFDC322F;"
+" background: #FFEEE8D5;"
+"}"
+"#window.mainbox.listview.element.alternate.active {"
+" foreground: #FF268BD2;"
+" background: #FFEEE8D5;"
+"}"
+"#window.mainbox.listview.scrollbar {"
+" border: 0;"
+" padding: 0;"
+"}"
+"#window.mainbox.sidebar.box {"
+" border: 1px dash 0px 0px ;"
+"}"
+"#window.mainbox.inputbar {"
+" spacing: 0;"
+"}"
+"#window.mainbox.inputbar.box {"
+"}"
+"#window.mainbox.inputbar.normal {"
+" foreground: #FF002B36;"
+" background: #FFFDF6E3;"
+"}";
+#endif
diff --git a/include/settings.h b/include/settings.h
index 90e0be08..e14ee48d 100644
--- a/include/settings.h
+++ b/include/settings.h
@@ -55,8 +55,6 @@ typedef struct
{
/** List of enabled modi */
char *modi;
- /** Border width */
- unsigned int menu_bw;
/** Width (0-100 in %, > 100 in pixels, < 0 in char width.) */
int menu_width;
/** # lines */
@@ -66,11 +64,6 @@ typedef struct
/** Font string (pango format) */
char * menu_font;
- /** New row colors */
- char * color_normal;
- char * color_active;
- char * color_urgent;
- char * color_window;
/** Terminal to use */
char * terminal_emulator;
/** SSH client to use */
@@ -88,8 +81,6 @@ typedef struct
/** Windows location/gravity */
WindowLocation location;
- /** Padding between elements */
- unsigned int padding;
/** Y offset */
int y_offset;
/** X offset */
@@ -125,27 +116,15 @@ typedef struct
unsigned int tokenize;
/** Monitors */
char *monitor;
- /** Line margin */
- unsigned int line_margin;
- unsigned int line_padding;
/** filter */
char *filter;
- /** style */
- char *separator_style;
- /** hide scrollbar */
- unsigned int hide_scrollbar;
/** fullscreen */
unsigned int fullscreen;
- /** bg image */
- unsigned int fake_transparency;
/** dpi */
int dpi;
/** Number threads (1 to disable) */
unsigned int threads;
- unsigned int scrollbar_width;
unsigned int scroll_method;
- /** Background type */
- char *fake_background;
char *window_format;
/** Click outside the window to exit */
diff --git a/include/theme.h b/include/theme.h
index aece11ae..938578a5 100644
--- a/include/theme.h
+++ b/include/theme.h
@@ -377,13 +377,6 @@ int distance_get_pixel ( Distance d, Orientation ori );
*/
void distance_get_linestyle ( Distance d, cairo_t *draw );
-#ifdef THEME_CONVERTER
-/**
- * Function to convert old theme into new theme format.
- */
-void rofi_theme_convert_old_theme ( void );
-#endif
-
/**
* Low-level functions.
* These can be used by non-widgets to obtain values.
diff --git a/source/rofi.c b/source/rofi.c
index f67b337f..df8bae5f 100644
--- a/source/rofi.c
+++ b/source/rofi.c
@@ -69,6 +69,8 @@
#include "timings.h"
+#include "default-theme.h"
+
// Plugin abi version.
// TODO: move this check to mode.c
#include "mode-private.h"
@@ -1083,7 +1085,12 @@ int main ( int argc, char *argv[] )
g_free ( theme_str );
}
if ( rofi_theme_is_empty ( ) ) {
- rofi_theme_convert_old_theme ( );
+ if ( rofi_theme_parse_string ( default_theme ) ){
+ fprintf(stderr, "Failed to parse default theme. Giving up..\n");
+ rofi_theme = NULL;
+ cleanup ();
+ return EXIT_FAILURE;
+ }
}
if ( find_arg ( "-dump-theme" ) >= 0 ) {
diff --git a/source/theme.c b/source/theme.c
index ab660315..d6ced01e 100644
--- a/source/theme.c
+++ b/source/theme.c
@@ -574,304 +574,3 @@ gboolean rofi_theme_is_empty ( void )
return FALSE;
}
-#ifdef THEME_CONVERTER
-
-static Property* rofi_theme_convert_get_color ( const char *color, const char *name )
-{
- Color c = color_get ( color );
- Property *p = rofi_theme_property_create ( P_COLOR );
- p->name = g_strdup ( name );
- p->value.color.alpha = c.alpha;
- p->value.color.red = c.red;
- p->value.color.green = c.green;
- p->value.color.blue = c.blue;
-
- return p;
-}
-static void rofi_theme_convert_create_property_ht ( ThemeWidget *widget )
-{
- if ( widget->properties == NULL ) {
- widget->properties = g_hash_table_new_full ( g_str_hash, g_str_equal, NULL, (GDestroyNotify) rofi_theme_property_free );
- }
-}
-
-void rofi_theme_convert_old_theme ( void )
-{
- if ( rofi_theme != NULL ) {
- rofi_theme_free ( rofi_theme );
- }
- rofi_theme = (ThemeWidget *) g_slice_new0 ( ThemeWidget );
- rofi_theme->name = g_strdup ( "Root" );
- rofi_theme_convert_create_property_ht ( rofi_theme );
- ThemeWidget *window_widget = rofi_theme_find_or_create_name ( rofi_theme, "window" );
- rofi_theme_convert_create_property_ht ( window_widget );
- ThemeWidget *mainbox_widget = rofi_theme_find_or_create_name ( window_widget, "mainbox" );
- rofi_theme_convert_create_property_ht ( mainbox_widget );
- ThemeWidget *message = rofi_theme_find_or_create_name ( mainbox_widget, "message" );
- ThemeWidget *message_box = rofi_theme_find_or_create_name ( message, "box" );
- rofi_theme_convert_create_property_ht ( message_box );
- ThemeWidget *listview_widget = rofi_theme_find_or_create_name ( mainbox_widget, "listview" );
- rofi_theme_convert_create_property_ht ( listview_widget );
- ThemeWidget *sidebar_widget = rofi_theme_find_or_create_name ( mainbox_widget, "sidebar" );
- ThemeWidget *sidebarbox_widget = rofi_theme_find_or_create_name ( sidebar_widget, "box" );
- rofi_theme_convert_create_property_ht ( sidebarbox_widget );
- {
- Property *p = rofi_theme_property_create ( P_INTEGER );
- p->name = g_strdup ( "border" );
- p->value.i = 0;
- g_hash_table_replace ( mainbox_widget->properties, p->name, p );
-
- p = rofi_theme_property_create ( P_INTEGER );
- p->name = g_strdup ( "padding" );
- p->value.i = config.padding;
- g_hash_table_replace ( window_widget->properties, p->name, p );
-
- p = rofi_theme_property_create ( P_INTEGER );
- p->name = g_strdup ( "padding" );
- p->value.i = 0;
- g_hash_table_replace ( mainbox_widget->properties, p->name, p );
- // Spacing
- p = rofi_theme_property_create ( P_INTEGER );
- p->name = g_strdup ( "spacing" );
- p->value.i = config.line_margin;
- g_hash_table_replace ( rofi_theme->properties, p->name, p );
- }
- {
- // Background
- Property *p = rofi_theme_property_create ( P_COLOR );
- p->name = g_strdup ( "background" );
- p->value.color.alpha = 0;
- p->value.color.red = 0;
- p->value.color.green = 0;
- p->value.color.blue = 0;
- g_hash_table_replace ( rofi_theme->properties, p->name, p );
-
- ThemeWidget *inputbar_widget = rofi_theme_find_or_create_name ( mainbox_widget, "inputbar" );
- rofi_theme_convert_create_property_ht ( inputbar_widget );
- p = rofi_theme_property_create ( P_INTEGER );
- p->name = g_strdup ( "spacing" );
- p->value.i = 0;
- g_hash_table_replace ( inputbar_widget->properties, p->name, p );
-
- LineStyle style = ( g_strcmp0 ( config.separator_style, "dash" ) == 0 ) ? DASH : SOLID;
- int place_end = ( config.location == WL_SOUTH_EAST || config.location == WL_SOUTH || config.location == WL_SOUTH_WEST );
- p = rofi_theme_property_create ( P_PADDING );
- p->name = g_strdup ( "border" );
- Distance d = (Distance){ config.menu_bw, PW_PX, style };
- if ( place_end ) {
- p->value.padding.bottom = d;
- }
- else {
- p->value.padding.top = d;
- }
- g_hash_table_replace ( listview_widget->properties, p->name, p );
-
- p = rofi_theme_property_create ( P_PADDING );
- p->name = g_strdup ( "border" );
- d = (Distance){ config.menu_bw, PW_PX, style };
- if ( place_end ) {
- p->value.padding.bottom = d;
- }
- else {
- p->value.padding.top = d;
- }
- g_hash_table_replace ( message_box->properties, p->name, p );
-
- /**
- * Sidebar top
- */
- p = rofi_theme_property_create ( P_PADDING );
- p->name = g_strdup ( "border" );
- d = (Distance){ config.menu_bw, PW_PX, style };
- p->value.padding.top = d;
- g_hash_table_replace ( sidebarbox_widget->properties, p->name, p );
-
- p = rofi_theme_property_create ( P_PADDING );
- p->name = g_strdup ( "padding" );
- d = (Distance){ config.line_margin, PW_PX, SOLID };
- if ( place_end ) {
- p->value.padding.bottom = d;
- }
- else {
- p->value.padding.top = d;
- }
- g_hash_table_replace ( listview_widget->properties, p->name, p );
-
- p = rofi_theme_property_create ( P_PADDING );
- p->name = g_strdup ( "padding" );
- d = (Distance){ config.line_margin, PW_PX, SOLID };
- if ( place_end ) {
- p->value.padding.bottom = d;
- }
- else {
- p->value.padding.top = d;
- }
- g_hash_table_replace ( message_box->properties, p->name, p );
- }
- {
- Property *p = rofi_theme_property_create ( P_INTEGER );
- p->name = g_strdup ( "columns" );
- p->value.i = config.menu_columns;
- g_hash_table_replace ( listview_widget->properties, p->name, p );
- p = rofi_theme_property_create ( P_INTEGER );
- p->name = g_strdup ( "fixed-height" );
- p->value.i = !( config.fixed_num_lines );
- g_hash_table_replace ( listview_widget->properties, p->name, p );
- }
- {
- // Border width.
- rofi_theme_convert_create_property_ht ( window_widget );
- // Padding
- Property *p = rofi_theme_property_create ( P_INTEGER );
- p->name = g_strdup ( "padding" );
- p->value.i = config.padding;
- g_hash_table_replace ( window_widget->properties, p->name, p );
-
- p = rofi_theme_property_create ( P_INTEGER );
- p->name = g_strdup ( "border" );
- p->value.i = config.menu_bw;
- g_hash_table_replace ( window_widget->properties, p->name, p );
- }
- {
- gchar **vals = g_strsplit ( config.color_window, ",", 3 );
- if ( vals != NULL ) {
- if ( vals[0] != NULL ) {
- Property *p = rofi_theme_convert_get_color ( vals[0], "background" );
- g_hash_table_replace ( window_widget->properties, p->name, p );
-
- if ( vals[1] != NULL ) {
- p = rofi_theme_convert_get_color ( vals[1], "foreground" );
- g_hash_table_replace ( window_widget->properties, p->name, p );
-
- ThemeWidget *inputbar = rofi_theme_find_or_create_name ( mainbox_widget, "inputbar" );
- ThemeWidget *widget = rofi_theme_find_or_create_name ( inputbar, "box" );
- rofi_theme_convert_create_property_ht ( widget );
- if ( vals[2] != NULL ) {
- p = rofi_theme_convert_get_color ( vals[2], "foreground" );
- g_hash_table_replace ( window_widget->properties, p->name, p );
- }
- else {
- p = rofi_theme_convert_get_color ( vals[1], "foreground" );
- g_hash_table_replace ( window_widget->properties, p->name, p );
- }
- }
- }
- }
- g_strfreev ( vals );
- {
- ThemeWidget *widget = rofi_theme_find_or_create_name ( listview_widget, "element" );
- ThemeWidget *scrollbar = rofi_theme_find_or_create_name ( listview_widget, "scrollbar" );
-
- ThemeWidget *wnormal = rofi_theme_find_or_create_name ( widget, "normal" );
- ThemeWidget *wselected = rofi_theme_find_or_create_name ( widget, "selected" );
- ThemeWidget *walternate = rofi_theme_find_or_create_name ( widget, "alternate" );
-
- rofi_theme_convert_create_property_ht ( widget );
- Property *p = rofi_theme_property_create ( P_INTEGER );
- p->name = g_strdup ( "border" );
- p->value.i = 0;
- g_hash_table_replace ( widget->properties, p->name, p );
-
- rofi_theme_convert_create_property_ht ( scrollbar );
- p = rofi_theme_property_create ( P_INTEGER );
- p->name = g_strdup ( "border" );
- p->value.i = 0;
- g_hash_table_replace ( scrollbar->properties, p->name, p );
- p = rofi_theme_property_create ( P_INTEGER );
- p->name = g_strdup ( "padding" );
- p->value.i = 0;
- g_hash_table_replace ( scrollbar->properties, p->name, p );
-
- gchar **vals = g_strsplit ( config.color_normal, ",", 5 );
- if ( g_strv_length ( vals ) == 5 ) {
- ThemeWidget *wnn = rofi_theme_find_or_create_name ( wnormal, "normal" );
- rofi_theme_convert_create_property_ht ( wnn );
- p = rofi_theme_convert_get_color ( vals[0], "background" );
- g_hash_table_replace ( wnn->properties, p->name, p );
- p = rofi_theme_convert_get_color ( vals[1], "foreground" );
- g_hash_table_replace ( wnn->properties, p->name, p );
-
- ThemeWidget *wsl = rofi_theme_find_or_create_name ( wselected, "normal" );
- rofi_theme_convert_create_property_ht ( wsl );
- p = rofi_theme_convert_get_color ( vals[3], "background" );
- g_hash_table_replace ( wsl->properties, p->name, p );
- p = rofi_theme_convert_get_color ( vals[4], "foreground" );
- g_hash_table_replace ( wsl->properties, p->name, p );
-
- ThemeWidget *wal = rofi_theme_find_or_create_name ( walternate, "normal" );
- rofi_theme_convert_create_property_ht ( wal );
- p = rofi_theme_convert_get_color ( vals[2], "background" );
- g_hash_table_replace ( wal->properties, p->name, p );
- p = rofi_theme_convert_get_color ( vals[1], "foreground" );
- g_hash_table_replace ( wal->properties, p->name, p );
-
- ThemeWidget *inputbar = rofi_theme_find_or_create_name ( mainbox_widget, "inputbar" );
- wnn = rofi_theme_find_or_create_name ( inputbar, "normal" );
- rofi_theme_convert_create_property_ht ( wnn );
- p = rofi_theme_convert_get_color ( vals[0], "background" );
- g_hash_table_replace ( wnn->properties, p->name, p );
- p = rofi_theme_convert_get_color ( vals[1], "foreground" );
- g_hash_table_replace ( wnn->properties, p->name, p );
-
- wnn = rofi_theme_find_or_create_name ( message, "normal" );
- rofi_theme_convert_create_property_ht ( wnn );
- p = rofi_theme_convert_get_color ( vals[0], "background" );
- g_hash_table_replace ( wnn->properties, p->name, p );
- p = rofi_theme_convert_get_color ( vals[1], "foreground" );
- g_hash_table_replace ( wnn->properties, p->name, p );
- }
- g_strfreev ( vals );
-
- vals = g_strsplit ( config.color_urgent, ",", 5 );
- if ( g_strv_length ( vals ) == 5 ) {
- ThemeWidget *wnn = rofi_theme_find_or_create_name ( wnormal, "urgent" );
- rofi_theme_convert_create_property_ht ( wnn );
- p = rofi_theme_convert_get_color ( vals[0], "background" );
- g_hash_table_replace ( wnn->properties, p->name, p );
- p = rofi_theme_convert_get_color ( vals[1], "foreground" );
- g_hash_table_replace ( wnn->properties, p->name, p );
-
- ThemeWidget *wsl = rofi_theme_find_or_create_name ( wselected, "urgent" );
- rofi_theme_convert_create_property_ht ( wsl );
- p = rofi_theme_convert_get_color ( vals[3], "background" );
- g_hash_table_replace ( wsl->properties, p->name, p );
- p = rofi_theme_convert_get_color ( vals[4], "foreground" );
- g_hash_table_replace ( wsl->properties, p->name, p );
-
- ThemeWidget *wal = rofi_theme_find_or_create_name ( walternate, "urgent" );
- rofi_theme_convert_create_property_ht ( wal );
- p = rofi_theme_convert_get_color ( vals[2], "background" );
- g_hash_table_replace ( wal->properties, p->name, p );
- p = rofi_theme_convert_get_color ( vals[1], "foreground" );
- g_hash_table_replace ( wal->properties, p->name, p );
- }
- g_strfreev ( vals );
-
- vals = g_strsplit ( config.color_active, ",", 5 );
- if ( g_strv_length ( vals ) == 5 ) {
- ThemeWidget *wnn = rofi_theme_find_or_create_name ( wnormal, "active" );
- rofi_theme_convert_create_property_ht ( wnn );
- p = rofi_theme_convert_get_color ( vals[0], "background" );
- g_hash_table_replace ( wnn->properties, p->name, p );
- p = rofi_theme_convert_get_color ( vals[1], "foreground" );
- g_hash_table_replace ( wnn->properties, p->name, p );
-
- ThemeWidget *wsl = rofi_theme_find_or_create_name ( wselected, "active" );
- rofi_theme_convert_create_property_ht ( wsl );
- p = rofi_theme_convert_get_color ( vals[3], "background" );
- g_hash_table_replace ( wsl->properties, p->name, p );
- p = rofi_theme_convert_get_color ( vals[4], "foreground" );
- g_hash_table_replace ( wsl->properties, p->name, p );
-
- ThemeWidget *wal = rofi_theme_find_or_create_name ( walternate, "active" );
- rofi_theme_convert_create_property_ht ( wal );
- p = rofi_theme_convert_get_color ( vals[2], "background" );
- g_hash_table_replace ( wal->properties, p->name, p );
- p = rofi_theme_convert_get_color ( vals[1], "foreground" );
- g_hash_table_replace ( wal->properties, p->name, p );
- }
- g_strfreev ( vals );
- }
- }
-}
-#endif
diff --git a/source/view.c b/source/view.c
index 5ea660e3..bb801e6c 100644
--- a/source/view.c
+++ b/source/view.c
@@ -759,9 +759,6 @@ void __create_window ( MenuFlags menu_flags )
TICK_N ( "setup window name and class" );
char *transparency = rofi_theme_get_string ( WIDGET ( win ), "transparency", NULL );
- if ( transparency == NULL && config.fake_transparency ) {
- transparency = config.fake_background;
- }
if ( transparency ) {
rofi_view_setup_fake_transparency ( transparency );
}
diff --git a/source/widgets/listview.c b/source/widgets/listview.c
index b9815290..6dc092a8 100644
--- a/source/widgets/listview.c
+++ b/source/widgets/listview.c
@@ -394,7 +394,7 @@ listview *listview_create ( const char *name, listview_update_callback cb, void
lv->fixed_num_lines = rofi_theme_get_boolean ( WIDGET ( lv ), "fixed-height", config.fixed_num_lines );
lv->dynamic = rofi_theme_get_boolean ( WIDGET ( lv ), "dynamic", TRUE );
lv->reverse = rofi_theme_get_boolean ( WIDGET ( lv ), "reverse", reverse );
- listview_set_show_scrollbar ( lv, rofi_theme_get_boolean ( WIDGET ( lv ), "scrollbar", !config.hide_scrollbar ) );
+ listview_set_show_scrollbar ( lv, rofi_theme_get_boolean ( WIDGET ( lv ), "scrollbar", FALSE ) );
lv->cycle = rofi_theme_get_boolean ( WIDGET ( lv ), "cycle", config.cycle );
return lv;
diff --git a/source/xrmoptions.c b/source/xrmoptions.c
index 04126acd..0512ec41 100644
--- a/source/xrmoptions.c
+++ b/source/xrmoptions.c
@@ -96,25 +96,10 @@ static XrmOption xrmOptions[] = {
{ xrm_String, "font", { .str = &config.menu_font }, NULL,
"Font to use", CONFIG_DEFAULT },
- { xrm_String, "color-normal", { .str = &config.color_normal }, NULL,
- "Color scheme for normal row", CONFIG_DEFAULT },
- { xrm_String, "color-urgent", { .str = &config.color_urgent }, NULL,
- "Color scheme for urgent row", CONFIG_DEFAULT },
- { xrm_String, "color-active", { .str = &config.color_active }, NULL,
- "Color scheme for active row", CONFIG_DEFAULT },
- { xrm_String, "color-window", { .str = &config.color_window }, NULL,
- "Color scheme window", CONFIG_DEFAULT },
-
- { xrm_Number, "borderwidth", { .num = &config.menu_bw }, NULL,
- "", CONFIG_DEFAULT },
- { xrm_Number, "bw", { .num = &config.menu_bw }, NULL,
- "Border width", CONFIG_DEFAULT },
{ xrm_Number, "location", { .num = &config.location }, NULL,
"Location on screen", CONFIG_DEFAULT },
- { xrm_Number, "padding", { .num = &config.padding }, NULL,
- "Padding", CONFIG_DEFAULT },
{ xrm_SNumber, "yoffset", { .snum = &config.y_offset }, NULL,
"Y-offset relative to location", CONFIG_DEFAULT },
{ xrm_SNumber, "xoffset", { .snum = &config.x_offset }, NULL,
@@ -168,30 +153,16 @@ static XrmOption xrmOptions[] = {
/* Alias for dmenu compatibility. */
{ xrm_String, "m", { .str = &config.monitor }, NULL,
"Monitor id to show on", CONFIG_DEFAULT },
- { xrm_Number, "line-margin", { .num = &config.line_margin }, NULL,
- "Margin between rows", CONFIG_DEFAULT },
- { xrm_Number, "line-padding", { .num = &config.line_padding }, NULL,
- "Padding within rows", CONFIG_DEFAULT },
{ xrm_String, "filter", { .str = &config.filter }, NULL,
"Pre-set filter", CONFIG_DEFAULT },
- { xrm_String, "separator-style", { .str = &config.separator_style }, NULL,
- "Separator style (none, dash, solid)", CONFIG_DEFAULT },
- { xrm_Boolean, "hide-scrollbar", { .num = &config.hide_scrollbar }, NULL,
- "Hide scroll-bar", CONFIG_DEFAULT },
{ xrm_Boolean, "fullscreen", { .num = &config.fullscreen }, NULL,
"Fullscreen", CONFIG_DEFAULT },
- { xrm_Boolean, "fake-transparency", { .num = &config.fake_transparency }, NULL,
- "Fake transparency", CONFIG_DEFAULT },
{ xrm_SNumber, "dpi", { .snum = &config.dpi }, NULL,
"DPI", CONFIG_DEFAULT },
{ xrm_Number, "threads", { .num = &config.threads }, NULL,
"Threads to use for string matching", CONFIG_DEFAULT },
- { xrm_Number, "scrollbar-width", { .num = &config.scrollbar_width }, NULL,
- "Scrollbar width", CONFIG_DEFAULT },
{ xrm_Number, "scroll-method", { .num = &config.scroll_method }, NULL,
"Scrolling method. (0: Page, 1: Centered)", CONFIG_DEFAULT },
- { xrm_String, "fake-background", { .str = &config.fake_background }, NULL,
- "Background to use for fake transparency. (background or screenshot)", CONFIG_DEFAULT },
{ xrm_String, "window-format", { .str = &config.window_format }, NULL,
"Window Format. w (desktop name), t (title), n (name), r (role), c (class)", CONFIG_DEFAULT },
{ xrm_Boolean, "click-to-exit", { .snum = &config.click_to_exit }, NULL,