You are not logged in.
I'm not putting anything in the systray. I'm not starting anything other than dwm.
Offline
When you say "almost" vanilla without any patches, what exactly did you change from the code (from when you downloaded the code and unarchived the source)? The problem must be coming from whatever you changed.
Offline
Hello folks, since the title suggests that we can "request" patches, can someone point me to patch that can cycle the layouts.
I have seen cycletags patch, but i don't want that. The default dwm behaviour is to toggle between 2 layouts ctrl + space. But, i want behaviour similar to that of xmonad.
Can someone please help me out.
Last edited by x33a (2011-01-14 07:51:51)
Offline
Someone already has:
Offline
thanks jason, i'll try that.
Offline
Part 2/2
Anyway, this is simply to provide systray to DWM without using external programs such as trayer or stalonetray. The problem with using external programs is that the status text doesn't automatically position as the systray grows/shrinks. This is a little bit more complicated than the previous hack I posted (launcher), but hopefully this will make sense... If not, I'll try to learn to make a diff patch :-)
Woooh, great, thanks!
Saved my day, i was trying to rip the systray from awesome, but it did not go well. Now im free
I could provide a patch against vanilla dwm, if interested.
Ceterum autem censeo Systemdinem esse delendam
Offline
I could provide a patch against vanilla dwm, if interested.
Thanks. Please see Post 118 in this thread. I've posted a link (github) to the systray patch that works on vanilla dwm.
Offline
0mark wrote:I could provide a patch against vanilla dwm, if interested.
Thanks. Please see Post 118 in this thread. I've posted a link (github) to the systray patch that works on vanilla dwm.
Oh. I did not read further, i was to excitet about the patch
Ceterum autem censeo Systemdinem esse delendam
Offline
When you say "almost" vanilla without any patches, what exactly did you change from the code (from when you downloaded the code and unarchived the source)? The problem must be coming from whatever you changed.
Sorry for not being clear. The only difference between my current dwm and vanilla dwm is your systray patch. My config.h, just because it could help:
/* See LICENSE file for copyright and license details. */
/* appearance */
static const char font[] = "fixed"; //"-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*";
static const char normbordercolor[] = "#cccccc";
static const char normbgcolor[] = "#cccccc";
static const char normfgcolor[] = "#000000";
static const char selbordercolor[] = "#0066ff";
static const char selbgcolor[] = "#0066ff";
static const char selfgcolor[] = "#ffffff";
static const unsigned int borderpx = 2; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const Bool showbar = True; /* False means no bar */
static const Bool topbar = True; /* False means bottom bar */
static const Bool systray_enable = False;
static const int systray_spacing = 1;
/* tagging */
static const char *tags[] = { "web", "term", "ntfctn", "misc", "stat" };
static const Rule rules[] = {
/* class instance title tags mask isfloating monitor */
{ "Chromium", NULL, NULL, 1, False, -1 },
{ "Eog", NULL, NULL, 0, True, -1 },
{ "Firefox", NULL, NULL, 1, False, -1 },
{ "Gimp", NULL, NULL, 0, True, -1 },
{ "Gnome-panel", NULL, NULL, 1 << 2, True, -1 },
{ "Gnome-mplayer", NULL, NULL, 0, True, -1 },
{ "trayer", NULL, NULL, 1 << 2, True, -1 },
};
/* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
static const Layout layouts[] = {
/* symbol arrange function */
{ "[T]", tile }, /* first entry is default */
{ "[F]", NULL }, /* no layout function means floating behavior */
{ "[M]", monocle },
};
/* key definitions */
#define MODKEY Mod1Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
static const char *termcmd[] = { "gnome-terminal", NULL };
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
TAGKEYS( XK_6, 5)
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
};
/* button definitions */
/* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
{ ClkWinTitle, 0, Button2, zoom, {0} },
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
};
Offline
Sorry for not being clear. The only difference between my current dwm and vanilla dwm is your systray patch. My config.h, just because it could help:
static const Bool systray_enable = False; static const int systray_spacing = 1;
Sorry it took me so long to get back. I noticed you have systray disabled (systray_enable = False). I have actually never tried disabling it, so maybe the error is there. Does everything work if you set systray_enable = True ?
Offline
Sorry it took me so long to get back. I noticed you have systray disabled (systray_enable = False). I have actually never tried disabling it, so maybe the error is there. Does everything work if you set systray_enable = True ?
Sorry for once again being unclear. If systray_enabled == False, it works as if the patch was not applied. If systray_enabled == True, it doesn't work.
Offline
There was someone on #archlinux who asked for a patch, that only shows active tags. I don't know, if there is already such a patch so i created one:
diff -u dwm-5.8.2.orig//dwm.c dwm-5.8.2/dwm.c
--- dwm-5.8.2.orig//dwm.c 2011-01-22 16:26:44.000000000 +0100
+++ dwm-5.8.2/dwm.c 2011-01-22 16:29:04.000000000 +0100
@@ -695,12 +695,14 @@
}
dc.x = 0;
for(i = 0; i < LENGTH(tags); i++) {
- dc.w = TEXTW(tags[i]);
- col = m->tagset[m->seltags] & 1 << i ? dc.sel : dc.norm;
- drawtext(tags[i], col, urg & 1 << i);
- drawsquare(m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
+ if (occ & 1 << i || m->tagset[m->seltags] & 1 << i) {
+ dc.w = TEXTW(tags[i]);
+ col = m->tagset[m->seltags] & 1 << i ? dc.sel : dc.norm;
+ drawtext(tags[i], col, urg & 1 << i);
+ drawsquare(m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
occ & 1 << i, urg & 1 << i, col);
- dc.x += dc.w;
+ dc.x += dc.w;
+ }
}
dc.w = blw = TEXTW(m->ltsymbol);
drawtext(m->ltsymbol, dc.norm, False);
Last edited by portix (2011-01-22 15:51:18)
Offline
There was someone on #archlinux who asked for a patch, that only shows active tags. I don't know, if there is already such a patch so i created one
That was me and boy does the patch work well. Thanks a lot for the patch.
I have a 15" lcd and i wanted more space for the status bar scripts.
Thanks again.
Last edited by x33a (2011-01-23 06:58:22)
Offline
https://github.com/akozadaev/pertag_addons
Remember layout (tile, float, monocle), mfact (modkey+h,l) for each tag. There is also another one for switching between tags using arrow keys.
I see that similar patches have been already published here, though
Offline
cycle.c: In function 'shifttag':
cycle.c:8:19: error: dereferencing pointer to incomplete type
cycle.c:8:34: error: dereferencing pointer to incomplete type
That's what I get when I try to use cycle.c with pertag.
I know very basic C++ and not too much about pointers and OOP, so I'm not 100% sure what that error means to attempt to fix it.
Offline
That's what I get when I try to use cycle.c with pertag.
How are you attempting to apply the patch?
Offline
That's not going to work: pertag shifts the code around (see the first couple of pages of this thread), you need to hand patch the cycle.c code into dwm.c. It is straightforward enough.
Offline
That's not going to work: pertag shifts the code around (see the first couple of pages of this thread), you need to hand patch the cycle.c code into dwm.c. It is straightforward enough.
edit:
When I tried that before, it didn't work, but it did this time. Thanks!
and yeah the error I was getting before was because it was lacking definitions that were located in dwm.c, but not included in the cycle.c file.
Last edited by Jimi (2011-01-24 06:57:38)
Offline
Well, not just someplace
Make sure you declare the respective functions (the static int shifttag(int dist), for example) and it will work fine. Just follow the patterns you see in dwm.c
Offline
Hello,
I would like to request a tiling mode that uses containers and tables, and with keybinds the users can assign where you want the client/container to be placed. If you've used i3, you'd know what I mean. You can read a little bit about it here:
http://i3.zekjur.net/docs/hacking-howto … yout_table
Alternatively, I would be happy with a manual tiling mode like ratpoison or musca, where the user splits the screen into containers then place a client in these containers.
It seems doable, but one may need to seriously hack away at the dwm code. Unless if there are easier/better way?
Offline
It seems doable, but one may need to seriously hack away at the dwm code. Unless if there are easier/better way?
Use another WM.
Last edited by karol (2011-01-26 06:06:14)
Offline
Use another WM.
I like the dwm's bar, but I don't really like the master/stack concept. I like how i3 manages clients, but it's very hard to hack and fine-tune the code to my liking. I just wish there was a happy median.
Offline