You are not logged in.

#501 2012-01-01 11:50:18

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: DWM Hackers Unite! Share (or request) dwm patches.

Does one of you guys know, how to make dwm use no borders, if there's only one window per tag (in any layout)? A border isn't needed at all in this case, would be nice imho.

Thanks!

Offline

#502 2012-01-01 12:04:17

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: DWM Hackers Unite! Share (or request) dwm patches.

+1 wink

Offline

#503 2012-01-01 13:16:30

OK100
Member
From: [U==]
Registered: 2010-04-26
Posts: 455

Re: DWM Hackers Unite! Share (or request) dwm patches.

+1 tongue

Offline

#504 2012-01-01 13:42:41

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: DWM Hackers Unite! Share (or request) dwm patches.

I've only seen this referenced ones, in a 2 year old post from the dwm mailing-list.

I don't know if it will still work, and also the author states that it needs pertag and only hides the border when the bar is hidden, so it's not optimal yet, imho, but maybe someone could use it as a beginning and adapt it to work without pertag and without needing to hiding the bar?

Attached is a patch that causes dwm to remove a window's border when the 
bar is hidden, and the window is the only one visible - that is, when it 
is the only client on the tag, or the tag is in monocle mode. It's 
dependent on pertag, which I use, but it could easily be hacked to 
remove this dependency. 
[...]

http://lists.suckless.org/dev/1003/3617.html

Last edited by mhertz (2012-01-01 13:58:10)

Offline

#505 2012-01-02 14:25:27

nns
Member
Registered: 2011-12-28
Posts: 3

Re: DWM Hackers Unite! Share (or request) dwm patches.

i have no idea how to fix this nor i dont know if i can escape some characters to make it  works, i dont know if the cmd works either
because idk how C and its syntax works......i tried.

i wanted to invoke scrot cmd when "mod + printscreen" is pressed

diff -r 5d8855720b8d config.def.h
--- a/config.def.h	Fri Dec 30 20:22:03 2011 +0800
+++ b/config.def.h	Mon Jan 02 22:14:11 2012 +0800
@@ -51,11 +51,16 @@
 /* commands */
 static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
 static const char *termcmd[]  = { "x-terminal-emulator", NULL };
+static const char *scrotselcmd[]  = { "scrot", "-sq", "1", "'%F_$wx$h_scrot.png'", "-e", "'mv $f ~/image/'", NULL };
+static const char *scrotcmd[]  = { "scrot", "-q", "1", "'%F_$wx$h_scrot.png'", "-e", "'mv $f ~/image/'", NULL };
 
 static Key keys[] = {
 	/* modifier                     key        function        argument */
 	{ MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
 	{ MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },
+	{ MODKEY                        XK_Print,  spawn,          {.v = scrotcmd } },
+	{ MODKEY|ShiftMask,             XK_Print,  spawn,          {.v = scrotselcmd } },
 	{ MODKEY,                       XK_b,      togglebar,      {0} },
CC dwm.c
In file included from dwm.c:294:0:
config.h:62:34: error: expected ‘}’ before numeric constant
config.h:55:20: warning: ‘scrotcmd’ defined but not used [-Wunused-variable]
make: *** [dwm.o] Error 1

EDIT: OMG thx bohoomil, i spent like hrs wondering which part of the lengthy cmd (static const char *scrotcmd[] = ...) is wrong....you save my life!!!

Last edited by nns (2012-01-02 14:43:33)

Offline

#506 2012-01-02 14:30:17

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

I believe there's a comma missing after MODKEY:

+    { MODKEY                        XK_Print,  spawn,          {.v = scrotcmd } },


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#507 2012-01-02 14:57:37

steve___
Member
Registered: 2008-02-24
Posts: 452

Re: DWM Hackers Unite! Share (or request) dwm patches.

FWIW, I remember from the dwm mailing list or irc channel there was a 'gotacha' when scrot is bound to a MODKEY.  I think it was with 'scrot -s'.  The consensus was to use the command 'import' from the imagemagick package.

Offline

#508 2012-01-04 10:17:20

Ypnose
Member
From: Jailed in the shell
Registered: 2011-04-21
Posts: 353
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

Jokerboy, I can't see your patches on Bitbucket.
I wanted ask you something about statuscolors patch and cycle.

Anyway, happy new year to all of you.


Github -- My terminal font Envypn

Offline

#509 2012-01-04 14:15:30

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

Re: DWM Hackers Unite! Share (or request) dwm patches.

Well, just ask. And the missing space is caused by TEXTW <> textnw.

You can try replacing

dc.w = blw = TEXTW(m->ltsymbol);

with

dc.w = blw = textnw(m->ltsymbol, strlen(m->ltsymbol));

and so on.

Last edited by JokerBoy (2012-01-04 14:15:50)

Offline

#510 2012-01-04 14:41:53

ivoarch
Member
Registered: 2011-03-31
Posts: 436

Re: DWM Hackers Unite! Share (or request) dwm patches.

@Ypnose

I use this cycle.patch  https://gist.github.com/1335118
and cyclelayouts https://gist.github.com/1335120

Works in dwm-6.0


I love GnuEmacs, GnuScreen, ratpoison, and conkeror.
Github )||( Weblog

Offline

#511 2012-01-04 18:07:22

Ypnose
Member
From: Jailed in the shell
Registered: 2011-04-21
Posts: 353
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

Here my question smile
I decided to use your tweaked statuscolors but only one hunk is failing. The related lines are (in 18-dwm-6.0-statuscolors.diff):

@@ -792,29 +792,29 @@ drawbar(Monitor *m) {
 			s= a;
 		snprintf(posbuf, LENGTH(posbuf), "[%d/%d]", s, a);
 		dc.w= TEXTW(posbuf);
-		drawtext(posbuf, dc.norm, False);
+		drawtext(posbuf, dc.colors[0], False);
 		x= dc.x + dc.w;
 	}

I'm not a coder. Dont know what to do. Forgive me if it's boring but I really need this.

Last edited by Ypnose (2012-01-04 18:08:26)


Github -- My terminal font Envypn

Offline

#512 2012-01-04 18:14:35

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

Re: DWM Hackers Unite! Share (or request) dwm patches.

That line depends on 06-dwm-6.0-monocle_count.diff, so if you don't use monocle count you can delete that part..

Last edited by JokerBoy (2012-01-04 19:55:02)

Offline

#513 2012-01-04 20:46:28

Ypnose
Member
From: Jailed in the shell
Registered: 2011-04-21
Posts: 353
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

JokerBoy wrote:

Well, just ask. And the missing space is caused by TEXTW <> textnw.

You can try replacing

dc.w = blw = TEXTW(m->ltsymbol);

with

dc.w = blw = textnw(m->ltsymbol, strlen(m->ltsymbol));

and so on.

Thanks a lot, this solved the problem.
But why this line is not added by default on statuscolors patches from Jasonwryan or yours, because it's unsightly?


Github -- My terminal font Envypn

Offline

#514 2012-01-04 21:04:59

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

Re: DWM Hackers Unite! Share (or request) dwm patches.

Edit later: 'cause ATM I'm fine with that gap.. I'll test this and maybe I'll update the patch from my repo...

Last edited by JokerBoy (2012-01-05 09:13:57)

Offline

#515 2012-01-09 07:31:22

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

Request for a patch, or some advice on how to achieve the same...

Mod-Control-[1..n] will  add/remove clients on tag to/from the current view - so, if I am on tag 1 and I want to view the contents of tag 3, I Mod-Ctrl-3

Is there any way to customize that key action, so, eg., my tag 3 is mail I could use Mod-Ctrl-m to achieve the same effect?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#516 2012-01-09 09:35:17

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: DWM Hackers Unite! Share (or request) dwm patches.

TAGKEYS(                 XK_m,                       2)

doesn't work?

edit: Sorry, misread your post.

Last edited by Army (2012-01-09 09:35:56)

Offline

#517 2012-01-09 14:52:35

steve___
Member
Registered: 2008-02-24
Posts: 452

Re: DWM Hackers Unite! Share (or request) dwm patches.

@jasonwryan - This was possible in 5.2 as I used it for a couple of years.  It involed making changes to config.h only.  I'm not sure if it works in 6.0.  The original post was by 'yy' on 28Aug08 21:40 -0500

#define WORKSPACEKEYS(KEY,TAGS, LAYOUT, FACT) \
        { MODKEY,                       KEY,      view,           {.ui = TAGS} }, \
        { MODKEY,                       KEY,      setlayout,      {.v =&layouts[LAYOUT]} }, \
        { MODKEY,                       KEY,      setmfact,       {.f = 1.FACT} },

And later:

        WORKSPACEKEYS(                  XK_q,                      1 << 0 | 1 << 1 | 1 << 2, 0, 55)
        WORKSPACEKEYS(                  XK_w,                      1 << 2 | 1 << 3, 1, 70)
        ...

Last edited by steve___ (2012-01-09 14:54:16)

Offline

#518 2012-01-09 15:18:45

Reki
Member
Registered: 2011-10-27
Posts: 59

Re: DWM Hackers Unite! Share (or request) dwm patches.

Anyone have a working pango patch for dwm-6.0? I tried manually patching, like I always do. I'm using the 5.9 pango patch, however I get errors though, so I'm just unsure if I need to include something in my config.h, however the errors spit out dwm.c errors though.

EDIT: I'm using this patch: https://gist.github.com/1377652

Last edited by Reki (2012-01-09 15:23:27)

Offline

#519 2012-01-09 17:46:29

ivoarch
Member
Registered: 2011-03-31
Posts: 436

Re: DWM Hackers Unite! Share (or request) dwm patches.

@Reki
try this http://ompldr.org/vYXkzOA

config.h

-static const char font[]            = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*";
+static const char font[]            = "Sans 8"; 

config.mk

-INCS = -I. -I/usr/include -I${X11INC}
-LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS}
+INCS = -I. -I/usr/include -I${X11INC} `pkg-config --cflags xft pango pangoxft`
+LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS} `pkg-config --libs xft pango pangoxft`

I love GnuEmacs, GnuScreen, ratpoison, and conkeror.
Github )||( Weblog

Offline

#520 2012-01-09 19:13:03

Raziel23
Member
Registered: 2010-03-30
Posts: 15

Re: DWM Hackers Unite! Share (or request) dwm patches.

jasonwryan wrote:

Request for a patch, or some advice on how to achieve the same...

Mod-Control-[1..n] will  add/remove clients on tag to/from the current view - so, if I am on tag 1 and I want to view the contents of tag 3, I Mod-Ctrl-3

Is there any way to customize that key action, so, eg., my tag 3 is mail I could use Mod-Ctrl-m to achieve the same effect?

I think the simplest solution is to use the toggleview function like that:

{ MODKEY|ControlMask,           XK_m,      toggleview,     {.ui = 1 << 2 } },

where statement 1 << 2 denote the third tag.

Offline

#521 2012-01-09 20:55:23

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

Raziel23 wrote:

I think the simplest solution is to use the toggleview function like that:

{ MODKEY|ControlMask,           XK_m,      toggleview,     {.ui = 1 << 2 } },

where statement 1 << 2 denote the third tag.

Superb! Thanks for the pointer.


After reading and mulling over this clear explanation of why tags ≠ workspaces, and trying to minimize the invasive patching of dwm (cough, pertag) I was keen to start using dwm as it was intended/to it's full potential. This keybinding means that I can fit it into the rest of my mnemonic command binds.

@steve__ thanks for the recommendation: I didn't get to actually try it as this was good to go out of the box, as it were smile


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#522 2012-01-09 22:18:04

Reki
Member
Registered: 2011-10-27
Posts: 59

Re: DWM Hackers Unite! Share (or request) dwm patches.

ivoarch wrote:

@Reki
try this http://ompldr.org/vYXkzOA

config.h

-static const char font[]            = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*";
+static const char font[]            = "Sans 8"; 

config.mk

-INCS = -I. -I/usr/include -I${X11INC}
-LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS}
+INCS = -I. -I/usr/include -I${X11INC} `pkg-config --cflags xft pango pangoxft`
+LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS} `pkg-config --libs xft pango pangoxft`

Thanks, will try it later, since I'm in a hurry right now. I'll update this post after seeing how it goes.

EDIT: Thanks for the patch, that worked with the Kochi Gothic font. cool

Last edited by Reki (2012-01-10 12:54:46)

Offline

#523 2012-01-10 01:14:31

kuraku
Member
Registered: 2012-01-03
Posts: 202

Re: DWM Hackers Unite! Share (or request) dwm patches.

I'm not sure if this is the right place but i will try my luck:
is there any way to make selected window "master" comparing to next? In monsterwm i'm able to open next window after selected one (usualy selected one is master).

By default in dwm, selected master is being pushed outised master area and that is not so practical hmm

Offline

#524 2012-01-10 01:17:18

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

Do you mean attachaside?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#525 2012-01-10 01:33:17

kuraku
Member
Registered: 2012-01-03
Posts: 202

Re: DWM Hackers Unite! Share (or request) dwm patches.

jasonwryan wrote:

Do you mean attachaside?

Yes, that is what i need. Thank you very much.

One quick question: this will work for any tiling mode (like bstack, bhorizontal, tile, grid...) right?

Offline

Board footer

Powered by FluxBB