commit dd00cef

ohmu  ·  2026-07-17 11:00:15 +0300 MSK
parent 9f6b0e2
added cols count and open dir on start configuration
4 files changed,  +16, -10
+12, -10
 1@@ -264,16 +264,18 @@ threadmain(int argc, char *argv[])
 2 				error("initializing columns");
 3 		}
 4 		c = row.col[row.ncol-1];
 5-		if(argc == 0)
 6-			readfile(c, wdir);
 7-		else
 8-			for(i=0; i<argc; i++){
 9-				p = utfrrune(argv[i], '/');
10-				if((p!=nil && strcmp(p, "/guide")==0) || i/WPERCOL>=row.ncol)
11-					readfile(c, argv[i]);
12-				else
13-					readfile(row.col[i/WPERCOL], argv[i]);
14-			}
15+        if (opendir) {
16+    		if(argc == 0)
17+                readfile(c, wdir);
18+		    else
19+			    for(i=0; i<argc; i++){
20+				    p = utfrrune(argv[i], '/');
21+				    if((p!=nil && strcmp(p, "/guide")==0) || i/WPERCOL>=row.ncol)
22+					    readfile(c, argv[i]);
23+				    else
24+					    readfile(row.col[i/WPERCOL], argv[i]);
25+			    }
26+       }
27 	}
28 	flushimage(display, 1);
29 
+1, -0
1@@ -9,6 +9,7 @@ autoindent     1
2 swpscrllbtns   0
3 clicktofocus   0
4 colcount       1
5+opendir        0
6 
7 " theming
8 
+1, -0
1@@ -108,6 +108,7 @@ init_config(void)
2     swapscrollbuttons = get_int_value(f, "swpscrllbtns", 0);
3     bartflag = get_int_value(f, "clicktofocus", 1);
4     ncol = get_int_value(f, "colcount", 2);
5+    opendir = get_int_value(f, "opendir", 1);
6 
7 	fclose(f);
8 }
+2, -0
1@@ -34,3 +34,5 @@ int globalautoindent;
2 int bartflag;
3 int swapscrollbuttons;
4 int ncol;
5+int opendir;
6+