summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Collister <hnefatl@users.noreply.github.com>2019-08-04 20:04:26 +0100
committerDave Davenport <DaveDavenport@users.noreply.github.com>2019-08-04 21:04:26 +0200
commitd9eb9f25a16b3e95cfc32c3c1076caae58c0ceb1 (patch)
treecd4e23c46bd32aa04c74d4861ae0efaf8653bc4b
parenteece00bad67ad64ee33f8490fd56adc585dc484b (diff)
Added 'rofi/themes' to paths checked for theme files (#1001)
-rw-r--r--source/helper.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/helper.c b/source/helper.c
index 783dc2cf..2085d7e1 100644
--- a/source/helper.c
+++ b/source/helper.c
@@ -1035,9 +1035,19 @@ char *helper_get_theme_path ( const char *file )
else {
filename = g_strconcat ( file, ".rasi", NULL );
}
- // Check config directory.
+ // Check config's themes directory.
const char *cpath = g_get_user_config_dir ();
if ( cpath ) {
+ char *themep = g_build_filename ( cpath, "rofi", "themes", filename, NULL );
+ g_debug ( "Opening theme, testing: %s\n", themep );
+ if ( themep && g_file_test ( themep, G_FILE_TEST_EXISTS ) ) {
+ g_free ( filename );
+ return themep;
+ }
+ g_free ( themep );
+ }
+ // Check config directory.
+ if ( cpath ) {
char *themep = g_build_filename ( cpath, "rofi", filename, NULL );
g_debug ( "Opening theme, testing: %s\n", themep );
if ( g_file_test ( themep, G_FILE_TEST_EXISTS ) ) {