From dec5c103dcce62c4c923cf3a42ef7e71565b5dc2 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Tue, 24 Aug 2021 17:16:36 +0200 Subject: [PATCH] [Theme] Ship default theme separately. --- Makefile.am | 4 +- doc/default_theme.rasi | 169 ---------------------------------------- meson.build | 1 + resources/resources.xml | 2 +- source/rofi.c | 2 +- 5 files changed, 5 insertions(+), 173 deletions(-) delete mode 100644 doc/default_theme.rasi diff --git a/Makefile.am b/Makefile.am index 49c8bc9c..2561c829 100644 --- a/Makefile.am +++ b/Makefile.am @@ -238,7 +238,8 @@ theme_DATA=\ themes/solarized_alternate.rasi\ themes/fancy.rasi\ themes/iggy.rasi\ - themes/iggy.jpg + themes/iggy.jpg\ + themes/default.rasi ## # Extra DIST @@ -255,7 +256,6 @@ EXTRA_DIST+=\ doc/rofi.doxy.in\ script/get_git_rev.sh\ $(theme_DATA)\ - doc/default_theme.rasi\ doc/default_configuration.rasi\ Changelog ## diff --git a/doc/default_theme.rasi b/doc/default_theme.rasi deleted file mode 100644 index e2ffd351..00000000 --- a/doc/default_theme.rasi +++ /dev/null @@ -1,169 +0,0 @@ -/** - * rofi -dump-theme output. - **/ -* { - red: rgba ( 220, 50, 47, 100 % ); - selected-active-foreground: var(background); - lightfg: rgba ( 88, 104, 117, 100 % ); - separatorcolor: var(foreground); - urgent-foreground: var(red); - alternate-urgent-background: var(lightbg); - lightbg: rgba ( 238, 232, 213, 100 % ); - spacing: 2; - border-color: var(foreground); - normal-background: var(background); - background-color: rgba ( 0, 0, 0, 0 % ); - alternate-active-background: var(lightbg); - active-foreground: var(blue); - blue: rgba ( 38, 139, 210, 100 % ); - urgent-background: var(background); - alternate-normal-foreground: var(foreground); - selected-active-background: var(blue); - background: rgba ( 253, 246, 227, 100 % ); - selected-normal-foreground: var(lightbg); - active-background: var(background); - alternate-active-foreground: var(blue); - alternate-normal-background: var(lightbg); - foreground: rgba ( 0, 43, 54, 100 % ); - selected-urgent-background: var(red); - selected-urgent-foreground: var(background); - normal-foreground: var(foreground); - alternate-urgent-foreground: var(red); - selected-normal-background: var(lightfg); -} -element { - padding: 1px ; - spacing: 5px ; - border: 0; - cursor: pointer; -} -element normal.normal { - background-color: var(normal-background); - text-color: var(normal-foreground); -} -element normal.urgent { - background-color: var(urgent-background); - text-color: var(urgent-foreground); -} -element normal.active { - background-color: var(active-background); - text-color: var(active-foreground); -} -element selected.normal { - background-color: var(selected-normal-background); - text-color: var(selected-normal-foreground); -} -element selected.urgent { - background-color: var(selected-urgent-background); - text-color: var(selected-urgent-foreground); -} -element selected.active { - background-color: var(selected-active-background); - text-color: var(selected-active-foreground); -} -element alternate.normal { - background-color: var(alternate-normal-background); - text-color: var(alternate-normal-foreground); -} -element alternate.urgent { - background-color: var(alternate-urgent-background); - text-color: var(alternate-urgent-foreground); -} -element alternate.active { - background-color: var(alternate-active-background); - text-color: var(alternate-active-foreground); -} -element-text { - background-color: rgba ( 0, 0, 0, 0 % ); - text-color: inherit; - highlight: inherit; - cursor: inherit; -} -element-icon { - background-color: rgba ( 0, 0, 0, 0 % ); - size: 1.0000em ; - text-color: inherit; - cursor: inherit; -} -window { - padding: 5; - background-color: var(background); - border: 1; -} -mainbox { - padding: 0; - border: 0; -} -message { - padding: 1px ; - border-color: var(separatorcolor); - border: 2px dash 0px 0px ; -} -textbox { - text-color: var(foreground); -} -listview { - padding: 2px 0px 0px ; - scrollbar: true; - border-color: var(separatorcolor); - spacing: 2px ; - fixed-height: 0; - border: 2px dash 0px 0px ; -} -scrollbar { - width: 4px ; - padding: 0; - handle-width: 8px ; - border: 0; - handle-color: var(normal-foreground); -} -sidebar { - border-color: var(separatorcolor); - border: 2px dash 0px 0px ; -} -button { - spacing: 0; - text-color: var(normal-foreground); - cursor: pointer; -} -button selected { - background-color: var(selected-normal-background); - text-color: var(selected-normal-foreground); -} - -num-filtered-rows, num-rows { - text-color: grey; - expand: false; -} -textbox-num-sep { - text-color: grey; - expand: false; - str: "/"; -} -inputbar { - padding: 1px ; - spacing: 0px ; - text-color: var(normal-foreground); - children: [ prompt,textbox-prompt-colon,entry, num-filtered-rows, textbox-num-sep, num-rows, case-indicator ]; -} -case-indicator { - spacing: 0; - text-color: var(normal-foreground); -} -entry { - spacing: 0; - text-color: var(normal-foreground); - placeholder-color: grey; - placeholder: "Type to filter"; - cursor: text; -} -prompt { - spacing: 0; - text-color: var(normal-foreground); -} -textbox-prompt-colon { - margin: 0px 0.3000em 0.0000em 0.0000em ; - expand: false; - str: ":"; - text-color: inherit; -} diff --git a/meson.build b/meson.build index c21e8872..a882a16c 100644 --- a/meson.build +++ b/meson.build @@ -266,6 +266,7 @@ install_data( 'themes/fancy.rasi', 'themes/iggy.rasi', 'themes/iggy.jpg', + 'themes/default.rasi', install_dir: themedir ) diff --git a/resources/resources.xml b/resources/resources.xml index f9c2f422..968a75d5 100644 --- a/resources/resources.xml +++ b/resources/resources.xml @@ -1,7 +1,7 @@ - doc/default_theme.rasi + themes/default.rasi doc/default_configuration.rasi diff --git a/source/rofi.c b/source/rofi.c index 2bf17cb0..86de4787 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -991,7 +991,7 @@ int main(int argc, char *argv[]) { // loaded. if (config.theme == NULL && rofi_theme_is_empty()) { GBytes *theme_data = g_resource_lookup_data( - resources_get_resource(), "/org/qtools/rofi/default_theme.rasi", + resources_get_resource(), "/org/qtools/rofi/default.rasi", G_RESOURCE_LOOKUP_FLAGS_NONE, NULL); if (theme_data) { const char *theme = g_bytes_get_data(theme_data, NULL);