Ignore:
Timestamp:
Nov 19, 2009, 2:53:09 PM (12 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Added --lock-after (-l) command line option (locks after N seconds), fixed indentation glitch
File:
1 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/main.c

    r3942 r3959  
    7373    printf("\t\t\t-R [session]\t\treattach if possible, otherwise start a new session\n");
    7474    printf("\t\t\t-S <name>\t\tname this session <name> instead of <pid>\n");
     75    printf("\t--lock-after\t-l [n]\t\t\tlock screen after n seconds\n");
    7576    printf("\t--version\t-v \t\t\tdisplay version and exit\n");
    7677    printf("\t--help\t\t-h \t\t\tthis help\n");
     
    349350                { "pid",         0, NULL, 'P' },
    350351#endif
     352                { "lock-after",  1, NULL, 'l' },
    351353                { "help",        0, NULL, 'h' },
    352354                { "version",     0, NULL, 'v' },
     
    354356            };
    355357#if defined USE_GRAB
    356         int c = mygetopt(argc, argv, "c:S:R::r::P::hv", long_options, &option_index);
     358        int c = mygetopt(argc, argv, "c:S:R::l::r::P::hv", long_options, &option_index);
    357359#else
    358         int c = mygetopt(argc, argv, "c:S:R::r::hv", long_options, &option_index);
     360        int c = mygetopt(argc, argv, "c:S:R::l::r::hv", long_options, &option_index);
    359361#endif
    360362        if(c == -1)
     
    407409            s+=2;
    408410            break;
     411        case 'l':
     412            screen_list->autolock_timeout = atoi(myoptarg) * 1000000;
     413                debug("Command line autolock : %d\n", screen_list->autolock_timeout);
     414            break;
    409415        case 'r':
    410416            screen_list->forceattach = 1;
Note: See TracChangeset for help on using the changeset viewer.