aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorgotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2007-12-22 14:35:58 +0000
committergotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2007-12-22 14:35:58 +0000
commit67ca34039c1c81c6e0102386c723fd09bbc040e2 (patch)
treeb0d6467742c4a95bfec35baa49792237b27df090 /main.c
parent8267971cf3e888709413ece5cfd1f73e360a7753 (diff)
downloaddzen-67ca34039c1c81c6e0102386c723fd09bbc040e2.tar.gz
dzen-67ca34039c1c81c6e0102386c723fd09bbc040e2.zip
added "-expand" option. automatically grows/srinks the window to fit the
input width git-svn-id: http://dzen.googlecode.com/svn/trunk@177 f2baff5b-bf2c-0410-a398-912abdc3d8b2
Diffstat (limited to 'main.c')
-rw-r--r--main.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/main.c b/main.c
index 46c40ce..3877243 100644
--- a/main.c
+++ b/main.c
@@ -722,6 +722,7 @@ main(int argc, char *argv[]) {
dzen.xinescreen = 0;
dzen.tsupdate = 0;
dzen.line_height = 0;
+ dzen.title_win.expand = noexpand;
/* cmdline args */
for(i = 1; i < argc; i++)
@@ -751,6 +752,23 @@ main(int argc, char *argv[]) {
else if(!strncmp(argv[i], "-u", 3)){
dzen.tsupdate = True;
}
+ else if(!strncmp(argv[i], "-expand", 8)){
+ if(++i < argc) {
+ switch(argv[i][0]){
+ case 'l':
+ dzen.title_win.expand = left;
+ break;
+ case 'c':
+ dzen.title_win.expand = both;
+ break;
+ case 'r':
+ dzen.title_win.expand = right;
+ break;
+ default:
+ dzen.title_win.expand = noexpand;
+ }
+ }
+ }
else if(!strncmp(argv[i], "-p", 3)) {
dzen.ispersistent = True;
if (i+1 < argc) {
@@ -871,7 +889,9 @@ main(int argc, char *argv[]) {
!dzen.slave_win.max_lines)
dzen.slave_win.max_lines = 1;
+
x_create_windows();
+ dzen.title_win.x_right_corner = dzen.title_win.x + dzen.title_win.width;
if(!dzen.slave_win.ishmenu)
x_map_window(dzen.title_win.win);