aboutsummaryrefslogtreecommitdiff
path: root/util/fbrun/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'util/fbrun/main.cc')
-rw-r--r--util/fbrun/main.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/fbrun/main.cc b/util/fbrun/main.cc
index 16ca923..c47788a 100644
--- a/util/fbrun/main.cc
+++ b/util/fbrun/main.cc
@@ -65,6 +65,7 @@ void showUsage(const char *progname) {
65 " -bg [color name] Background color"<<endl<< 65 " -bg [color name] Background color"<<endl<<
66 " -na Disable antialias"<<endl<< 66 " -na Disable antialias"<<endl<<
67 " -hf [history file] History file to load (default ~/.fluxbox/fbrun_history)"<<endl<< 67 " -hf [history file] History file to load (default ~/.fluxbox/fbrun_history)"<<endl<<
68 " -preselect Select preset text"<<endl<<
68 " -help Show this help"<<endl<<endl<< 69 " -help Show this help"<<endl<<endl<<
69 "Example: fbrun -fg black -bg white -text xterm -title \"run xterm\""<<endl; 70 "Example: fbrun -fg black -bg white -text xterm -title \"run xterm\""<<endl;
70} 71}
@@ -76,6 +77,7 @@ int main(int argc, char **argv) {
76 bool set_pos = false; // set position 77 bool set_pos = false; // set position
77 bool near_mouse = false; // popup near mouse 78 bool near_mouse = false; // popup near mouse
78 bool print = false; 79 bool print = false;
80 bool preselect = false;
79 string fontname; // font name 81 string fontname; // font name
80 string title("Run program"); // default title 82 string title("Run program"); // default title
81 string text; // default input text 83 string text; // default input text
@@ -115,6 +117,8 @@ int main(int argc, char **argv) {
115 background = argv[++i]; 117 background = argv[++i];
116 } else if (strcmp(argv[i], "-hf") == 0 && i+1 < argc) { 118 } else if (strcmp(argv[i], "-hf") == 0 && i+1 < argc) {
117 history_file = argv[++i]; 119 history_file = argv[++i];
120 } else if (strcmp(argv[i], "-preselect") == 0) {
121 preselect = true;
118 } else if (arg == "-h" || arg == "-help" || arg == "--help") { 122 } else if (arg == "-h" || arg == "-help" || arg == "--help") {
119 showUsage(argv[0]); 123 showUsage(argv[0]);
120 exit(0); 124 exit(0);
@@ -159,6 +163,8 @@ int main(int argc, char **argv) {
159 163
160 fbrun.setTitle(title); 164 fbrun.setTitle(title);
161 fbrun.setText(text); 165 fbrun.setText(text);
166 if (preselect)
167 fbrun.selectAll();
162 168
163 if (near_mouse) { 169 if (near_mouse) {
164 170