[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
tiling WMs
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 9
Thread images: 1
File: dwm-20100318.png (189 KB, 1280x801) Image search: [Google]
dwm-20100318.png
189 KB, 1280x801
Tiling window managers.

How do you use them to make your life easier? What's your setup like? I've just used basic dwm features for years.
---
diff --git a/dwm.c b/dwm.c
index 1d78655..156ee60 100644
--- a/dwm.c
+++ b/dwm.c
@@ -20,6 +20,7 @@
*
* To understand everything else, start reading main().
*/
+#include <assert.h>
#include <errno.h>
#include <locale.h>
#include <stdarg.h>
@@ -28,6 +29,8 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <libgen.h>
+#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <X11/cursorfont.h>
@@ -1661,11 +1664,45 @@ sigchld(int unused) {
while(0 < waitpid(-1, NULL, WNOHANG));
}

+#define SPAWN_CWD_DELIM " []{}()<>\"':"
+
void
spawn(const Arg *arg) {
if(fork() == 0) {
if(dpy)
close(ConnectionNumber(dpy));
+ if(selmon->sel) {
+ const char* const home = getenv("HOME");
+ assert(home && strchr(home, '/'));
+ const size_t homelen = strlen(home);
+ char *cwd, *pathbuf = NULL;
+ struct stat statbuf;
+
+ cwd = strtok(selmon->sel->name, SPAWN_CWD_DELIM);
+ /* NOTE: strtok() alters selmon->sel->name in-place,
+ * but that does not matter because we are going to
+ * exec() below anyway; nothing else will use it */
+ while(cwd) {
+ if(*cwd == '~') { /* replace ~ with $HOME */
+ if(!(pathbuf = malloc(homelen + strlen(cwd)))) /* ~ counts for NULL term */
+ die("fatal: could not malloc() %u bytes\n", homelen + strlen(cwd));
+ strcpy(strcpy(pathbuf, home) + homelen, cwd + 1);
+ cwd = pathbuf;
+ }
+
+ if(strchr(cwd, '/') && !stat(cwd, &statbuf)) {
+ if(!S_ISDIR(statbuf.st_mode))
+ cwd = dirname(cwd);
+
+ if(!chdir(cwd))
+ break;
+ }
+
+ cwd = strtok(NULL, SPAWN_CWD_DELIM);
+ }
+
+ free(pathbuf);
+ }
setsid();
execvp(((char **)arg->v)[0], (char **)arg->v);
fprintf(stderr, "dwm: execvp %s", ((char **)arg->v)[0]);
>>
Accidentally included a dwm patch while trying to include that image.
>>
I use Fluxbox with a Ruby script I wrote to do tiling.

I don't need dynamic tiling, I have static tiling with Fluxbox's configuration and do some scripted tiling with the Ruby script.

Where scripted tiling means half screen and full screen respecting the setup from the static tiling.

I have a small terminal on the bottom, so the half screen starts from the top and fills the screen until the beginning of the bottom terminal.

Full screen starts from the top and stops at the end of the screen minus the height of one line in the bottom terminal, so the GNU screen hardstatus is still visible.

I use the GNU screen hardstatus for all kinds of information, from notifications to the typical system information I need to look for.

The GNU screen hardstatus is implemented with a daemon written in Ruby and a simple DSL to update the various elements in the hardstatus, then it responds to requests on a UNIX socket so the left or right side of the hardstatus can be fetched with the current contents.

Then a simple C program connects to the UNIX sockets, fetches the dynamic hardstatus content and prints it so screen can use it, since the C program takes 1ms to do its thing it doesn't make the whole thing lag like it would do if you used a dozen scripts in your hardstatus.

I am aware the way I set this up is absolutely convulted and retarded but it does exactly what I need and exactly how I want it.
>>
I use StumpWM because it's written in Lisp, can be hacked to my heart's content and never gets in my way.
>>
I3 is the Ubuntu of tiling wms
Easy to install
Has great docs and support
And good for beginners and veterans looking for a less complicated experience
>>
>>55417430
xmonad

https://github.com/haasn/gentoo-conf/blob/nanodesu/home/nand/.xmonad/xmonad.hs
>>
i use bspwm
i don't think i'm using it well though
i just tell it where to open the next window
>>
Never used a tiling window manager before. What is the pro-est of them all, /g/? Looking for something lightweight yet powerful.
>>
>>55418757
dwm is entirely written in C, fully extensible through patches, is no more than 2000 lines, and is human readable.
Thread replies: 9
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.