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 0e52b19..65b8564 100644
--- a/util/fbrun/main.cc
+++ b/util/fbrun/main.cc
@@ -58,6 +58,7 @@ void showUsage(const char *progname) {
58 " -print Print result to stdout"<<endl<< 58 " -print Print result to stdout"<<endl<<
59 " -w [width] Window width in pixels"<<endl<< 59 " -w [width] Window width in pixels"<<endl<<
60 " -h [height] Window height in pixels"<<endl<< 60 " -h [height] Window height in pixels"<<endl<<
61 " -pad [size] Padding size in pixels"<<endl<<
61 " -display [display string] Display name"<<endl<< 62 " -display [display string] Display name"<<endl<<
62 " -pos [x] [y] Window position in pixels"<<endl<< 63 " -pos [x] [y] Window position in pixels"<<endl<<
63 " -nearmouse Window position near mouse"<<endl<< 64 " -nearmouse Window position near mouse"<<endl<<
@@ -76,6 +77,7 @@ int main(int argc, char **argv) {
76 int x = 0, y = 0; // default pos of window 77 int x = 0, y = 0; // default pos of window
77 size_t width = 200, height = 32; // default size of window 78 size_t width = 200, height = 32; // default size of window
78 bool set_height = false, set_width=false; // use height/width of font by default 79 bool set_height = false, set_width=false; // use height/width of font by default
80 int padding = 0; // default horizontal padding for text
79 bool set_pos = false; // set position 81 bool set_pos = false; // set position
80 bool near_mouse = false; // popup near mouse 82 bool near_mouse = false; // popup near mouse
81 bool center = false; 83 bool center = false;
@@ -107,6 +109,8 @@ int main(int argc, char **argv) {
107 } else if (arg == "-h" && i+1 < argc) { 109 } else if (arg == "-h" && i+1 < argc) {
108 height = atoi(argv[++i]); 110 height = atoi(argv[++i]);
109 set_height = true; // mark true else the height of font will be used 111 set_height = true; // mark true else the height of font will be used
112 } else if (arg == "-pad" && i+1 < argc) {
113 padding = atoi(argv[++i]);
110 } else if ((arg == "-display" || arg == "--display") && i+1 < argc) { 114 } else if ((arg == "-display" || arg == "--display") && i+1 < argc) {
111 display_name = argv[++i]; 115 display_name = argv[++i];
112 } else if ((arg == "-pos" || arg == "--pos") && i+2 < argc) { 116 } else if ((arg == "-pos" || arg == "--pos") && i+2 < argc) {
@@ -180,8 +184,10 @@ int main(int argc, char **argv) {
180 cerr<<"FbRun Warning: Failed to load completion file: "<<expanded_filename<<endl; 184 cerr<<"FbRun Warning: Failed to load completion file: "<<expanded_filename<<endl;
181 } 185 }
182 186
187 fbrun.setPadding(padding);
183 fbrun.setTitle(title); 188 fbrun.setTitle(title);
184 fbrun.setText(text); 189 fbrun.setText(text);
190
185 if (preselect) 191 if (preselect)
186 fbrun.selectAll(); 192 fbrun.selectAll();
187 193