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.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/util/fbrun/main.cc b/util/fbrun/main.cc
index c47788a..0bc02c6 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 " -autocomplete Complete on typing"<<endl<<
68 " -preselect Select preset text"<<endl<< 69 " -preselect Select preset text"<<endl<<
69 " -help Show this help"<<endl<<endl<< 70 " -help Show this help"<<endl<<endl<<
70 "Example: fbrun -fg black -bg white -text xterm -title \"run xterm\""<<endl; 71 "Example: fbrun -fg black -bg white -text xterm -title \"run xterm\""<<endl;
@@ -78,6 +79,7 @@ int main(int argc, char **argv) {
78 bool near_mouse = false; // popup near mouse 79 bool near_mouse = false; // popup near mouse
79 bool print = false; 80 bool print = false;
80 bool preselect = false; 81 bool preselect = false;
82 bool autocomplete = getenv("FBRUN_AUTOCOMPLETE");
81 string fontname; // font name 83 string fontname; // font name
82 string title("Run program"); // default title 84 string title("Run program"); // default title
83 string text; // default input text 85 string text; // default input text
@@ -119,6 +121,8 @@ int main(int argc, char **argv) {
119 history_file = argv[++i]; 121 history_file = argv[++i];
120 } else if (strcmp(argv[i], "-preselect") == 0) { 122 } else if (strcmp(argv[i], "-preselect") == 0) {
121 preselect = true; 123 preselect = true;
124 } else if (strcmp(argv[i], "-autocomplete") == 0) {
125 autocomplete = true;
122 } else if (arg == "-h" || arg == "-help" || arg == "--help") { 126 } else if (arg == "-h" || arg == "-help" || arg == "--help") {
123 showUsage(argv[0]); 127 showUsage(argv[0]);
124 exit(0); 128 exit(0);
@@ -136,6 +140,7 @@ int main(int argc, char **argv) {
136 FbRun fbrun; 140 FbRun fbrun;
137 141
138 fbrun.setPrint(print); 142 fbrun.setPrint(print);
143 fbrun.setAutocomplete(autocomplete);
139 144
140 if (fontname.size() != 0) { 145 if (fontname.size() != 0) {
141 if (!fbrun.loadFont(fontname.c_str())) { 146 if (!fbrun.loadFont(fontname.c_str())) {