|
@@ -11,14 +11,16 @@ slop::Options::Options() {
|
11
|
11
|
m_green = 0;
|
12
|
12
|
m_blue = 0;
|
13
|
13
|
m_gracetime = 0.1;
|
|
14
|
+ m_keyboard = true;
|
14
|
15
|
}
|
15
|
16
|
|
16
|
17
|
void slop::Options::printHelp() {
|
17
|
18
|
printf( "Usage: slop [options]\n" );
|
18
|
|
- printf( "Print user selected region to stdout.\n" );
|
|
19
|
+ printf( "Print user selected region to stdout. Pressing keys or right-clicking cancels selection.\n" );
|
19
|
20
|
printf( "\n" );
|
20
|
21
|
printf( "options\n" );
|
21
|
22
|
printf( " -h, --help show this message.\n" );
|
|
23
|
+ printf( " -nk, --nokeyboard don't try to grab the keyboard. This may fix problems with certain window managers.\n" );
|
22
|
24
|
printf( " -b=INT, --bordersize=INT set selection rectangle border size.\n" );
|
23
|
25
|
printf( " -p=INT, --m_padding=INT set m_padding size for selection.\n" );
|
24
|
26
|
printf( " -t=INT, --tolerance=INT if you have a shaky mouse, increasing this value will make slop detect single clicks better. Rather than interpreting your shaky clicks as region selections.\n" );
|
|
@@ -73,7 +75,9 @@ int slop::Options::parseOptions( int argc, char** argv ) {
|
73
|
75
|
if ( err ) {
|
74
|
76
|
return 1;
|
75
|
77
|
}
|
76
|
|
- } else if ( arg == "-h" || arg == "--help" ) {
|
|
78
|
+ } else if ( matches( arg, "-nk", "--nokeyboard" ) ) {
|
|
79
|
+ m_keyboard = false;
|
|
80
|
+ } else if ( matches( arg, "-h", "--help" ) ) {
|
77
|
81
|
printHelp();
|
78
|
82
|
return 2;
|
79
|
83
|
} else {
|