diff --git a/config/config.c b/config/config.c index 77707e9e..424fec9e 100644 --- a/config/config.c +++ b/config/config.c @@ -59,9 +59,6 @@ Settings config = { .window_key = "F12", .run_key = "mod1+F2", .ssh_key = "mod1+F3", -#ifdef I3 - .mark_key = "mod1+F5", -#endif // Location of the window. CENTER, NORTH_WEST, NORTH,NORTH_EAST, etc. .location = CENTER, // Mode of window, list (Vertical) or dmenu like (Horizontal) diff --git a/include/simpleswitcher.h b/include/simpleswitcher.h index d091c49e..1750657e 100644 --- a/include/simpleswitcher.h +++ b/include/simpleswitcher.h @@ -98,9 +98,6 @@ typedef struct _Settings { WindowLocation location; WindowMode wmode; unsigned int padding; -#ifdef I3 - char * mark_key; -#endif } Settings; extern Settings config; diff --git a/source/dmenu-dialog.c b/source/dmenu-dialog.c index fdf4d35d..401f8c27 100644 --- a/source/dmenu-dialog.c +++ b/source/dmenu-dialog.c @@ -82,6 +82,7 @@ SwitcherMode dmenu_switcher_dialog ( char **input ) } if ( list != NULL ) free( list ); + return retv; } diff --git a/source/run-dialog.c b/source/run-dialog.c index 8ffbe0e2..db8667f3 100644 --- a/source/run-dialog.c +++ b/source/run-dialog.c @@ -309,7 +309,7 @@ SwitcherMode run_switcher_dialog ( char **input ) free( cmd_list[i] ); } - if (cmd_list != NULL) free( cmd_list ); + if ( cmd_list != NULL ) free( cmd_list ); return retv; } diff --git a/source/simpleswitcher.c b/source/simpleswitcher.c index 98d9f388..f08c994b 100644 --- a/source/simpleswitcher.c +++ b/source/simpleswitcher.c @@ -74,6 +74,9 @@ #define OPAQUE 0xffffffff #define OPACITY "_NET_WM_WINDOW_OPACITY" #define I3_SOCKET_PATH_PROP "I3_SOCKET_PATH" +#define FORK 1 +#define NOFORK 2 + xdgHandle xdg_handle; const char *cache_dir = NULL; @@ -202,7 +205,7 @@ static void focus_window_i3( const char *socket_path, int id ) } -// Formulate command + // Formulate command snprintf( command, 128, "[id=\"%d\"] focus", id ); // Prepare header. memcpy( head.magic, I3_IPC_MAGIC, 6 ); @@ -1131,9 +1134,6 @@ MenuReturn menu( char **lines, char **input, char *prompt, Time *time, int *shif return retv; } -#define FORK 1 -#define NOFORK 2 - @@ -1455,32 +1455,28 @@ int main( int argc, char *argv[] ) parse_xresource_options( display ); - find_arg_str( argc, argv, "-font", &( config.menu_font ) ); - find_arg_str( argc, argv, "-fg", &( config.menu_fg ) ); - find_arg_str( argc, argv, "-bg", &( config.menu_bg ) ); - find_arg_str( argc, argv, "-hlfg", &( config.menu_hlfg ) ); - find_arg_str( argc, argv, "-hlbg", &( config.menu_hlbg ) ); - find_arg_str( argc, argv, "-bc", &( config.menu_bc ) ); - - find_arg_str( argc, argv, "-term", &( config.terminal_emulator ) ); + find_arg_str( argc, argv, "-font", &( config.menu_font ) ); + find_arg_str( argc, argv, "-fg", &( config.menu_fg ) ); + find_arg_str( argc, argv, "-bg", &( config.menu_bg ) ); + find_arg_str( argc, argv, "-hlfg", &( config.menu_hlfg ) ); + find_arg_str( argc, argv, "-hlbg", &( config.menu_hlbg ) ); + find_arg_str( argc, argv, "-bc", &( config.menu_bc ) ); + find_arg_str( argc, argv, "-term", &( config.terminal_emulator ) ); + find_arg_int( argc, argv, "-bw", &( config.menu_bw ) ); + find_arg_int( argc, argv, "-o", &( config.window_opacity ) ); + find_arg_int( argc, argv, "-width", &( config.menu_width ) ); + find_arg_int( argc, argv, "-lines", &( config.menu_lines ) ); + find_arg_int( argc, argv, "-loc", &( config.location ) ); + find_arg_int( argc, argv, "-padding", &( config.padding ) ); if ( find_arg ( argc, argv, "-zeltak" ) >= 0 ) { config.zeltak_mode = 1; } - - find_arg_int( argc, argv, "-bw", &( config.menu_bw ) ); - find_arg_int( argc, argv, "-o", &( config.window_opacity ) ); - find_arg_int( argc, argv, "-width",&( config.menu_width ) ); - find_arg_int( argc, argv, "-lines",&( config.menu_lines ) ); - - find_arg_int( argc, argv, "-loc", &( config.location ) ); - if ( find_arg( argc, argv, "-hmode" ) >= 0 ) { config.wmode = HORIZONTAL; } - find_arg_int( argc, argv, "-padding", &( config.padding ) ); #ifdef I3 // Check for i3 diff --git a/source/ssh-dialog.c b/source/ssh-dialog.c index 8ba87d95..b19b3bdb 100644 --- a/source/ssh-dialog.c +++ b/source/ssh-dialog.c @@ -310,7 +310,7 @@ SwitcherMode ssh_switcher_dialog ( char **input ) free( cmd_list[i] ); } - if(cmd_list != NULL) free( cmd_list ); + if ( cmd_list != NULL ) free( cmd_list ); return retv; }