diff options
author | Qball Cow <qball@gmpclient.org> | 2014-05-20 09:43:45 +0200 |
---|---|---|
committer | Qball Cow <qball@gmpclient.org> | 2014-05-20 09:43:45 +0200 |
commit | 85172743eec65e83f98ccd079bb9f0876678080e (patch) | |
tree | 6ad2fafcfd3ca2e506c36bad6608437b4a82c871 /config/config.c | |
parent | 3157358c630150a1a786950a1a75e47620883ea6 (diff) |
Keys via xresources, dump config.
Diffstat (limited to 'config/config.c')
-rw-r--r-- | config/config.c | 50 |
1 files changed, 49 insertions, 1 deletions
diff --git a/config/config.c b/config/config.c index f5872e1c..8519112b 100644 --- a/config/config.c +++ b/config/config.c @@ -99,7 +99,7 @@ void config_sanity_check( void ) exit(1); } - if ( !( config.location >= WL_CENTER && config.location <= WL_WEST ) ) + if ( !( config.location >= WL_CENTER && config.location <= WL_WEST ) ) { fprintf(stderr, "config.location is invalid. ( %d >= %d >= %d) does not hold.\n", WL_WEST, config.location, WL_CENTER); @@ -112,3 +112,51 @@ void config_sanity_check( void ) exit(1); } } + +/** + * Print out the current configuration. + */ +void config_print( void ) +{ + printf("Windows opacity: %3d%%\n", config.window_opacity); + printf("Border width: %3d\n", config.menu_bw); + printf("Padding: %3d\n", config.padding); + printf("Width: %4d%s\n", config.menu_width, + config.menu_width > 100? "px":"%"); + printf("offset (x,y): (%2d,%2d)px\n", config.x_offset, config.y_offset); + printf("Location: "); + switch(config.location) + { + case WL_CENTER: printf(" Center\n"); break; + case WL_NORTH_WEST: printf("North West\n"); break; + case WL_NORTH: printf(" North\n"); break; + case WL_NORTH_EAST: printf("North East\n"); break; + case WL_EAST: printf(" East\n"); break; + case WL_EAST_SOUTH: printf("East South\n"); break; + case WL_SOUTH: printf(" South\n"); break; + case WL_SOUTH_WEST: printf("South West\n"); break; + case WL_WEST: printf(" West\n"); break; + default: printf(" Invalid\n"); break; + } + printf("# Lines: %3d\n", config.menu_lines); + printf("# Columns: %3d\n", config.menu_columns); + printf("Fixed number of lines: %5s\n", config.fixed_num_lines?"true":"false"); + printf("Drawing mode: %10s\n", + config.hmode == VERTICAL?"Vertical":"Horizontal"); + + + printf("Font: %35s\n", config.menu_font); + /* Colors */ + printf("FG Color: %7s\n", config.menu_fg); + printf("BG Color: %7s\n", config.menu_bg); + printf("Highlight FG Color: %7s\n", config.menu_hlfg); + printf("Highlight BG Color: %7s\n", config.menu_hlbg); + printf("Border color: %7s\n", config.menu_bc); + + /* Terminal */ + printf("Terminal emulator: %22s\n", config.terminal_emulator); + /* Keybindings. */ + printf("Window switcher key: %7s\n", config.window_key); + printf("Run dialog key: %7s\n", config.run_key); + printf("SSH dialog key: %7s\n", config.ssh_key); +} |