1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2025-04-14 17:43:01 -04:00

Add -display flag.

This commit is contained in:
Qball Cow 2014-01-14 10:06:13 +01:00
parent 8d0bf427e0
commit c9513afaad

View file

@ -1293,12 +1293,13 @@ int main( int argc, char *argv[] )
if ( find_arg( argc, argv, "-help" ) >= 0
|| find_arg( argc, argv, "--help" ) >= 0
|| find_arg( argc, argv, "-h" ) >= 0 ) {
fprintf( stderr, "See the man page or visit http://github.com/DaveDavenport/simpleswitcher\n" );
fprintf( stderr, "See the man (man 1 simpleswitcher) page or visit http://github.com/DaveDavenport/simpleswitcher\n" );
fprintf( stderr, "Original code can be found: http://github.com/seanpringle/simpleswitcher\n" );
return EXIT_FAILURE;
}
if ( !( display = XOpenDisplay( 0 ) ) ) {
const char *display_str= find_arg_str(argc, argv, "-display", getenv("DISPLAY"));
if ( !( display = XOpenDisplay( display_str ) ) ) {
fprintf( stderr, "cannot open display!\n" );
return EXIT_FAILURE;
}