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

tiling WMs

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 9
Thread images: 1

File: dwm-20100318.png (189KB, 1280x801px) Image search: [Google]
dwm-20100318.png
189KB, 1280x801px
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 posts: 9
Thread images: 1


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.