You are not logged in.

#326 2011-09-24 16:29:24

Crunch
Member
From: -+-
Registered: 2011-02-17
Posts: 56

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

Ypnose wrote:

Don't know if it's the right place but what about dwm and dual-screens? Someone have feedback about it?

Works like a charm.

tYWlidA

Last edited by Crunch (2011-09-24 16:46:55)


Registered Linux user #536591.

Offline

#327 2011-09-24 17:38:06

ibrunton
Member
From: Canada
Registered: 2011-05-05
Posts: 270

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

Crunch wrote:

Works like a charm.

http://ompldr.org/tYWlidA

I like that font, DroidSans...Is that also what you're using in your terminals?

What's that minimal launcher-type thing with the shell prompt in the middle of the left screen?

Offline

#328 2011-09-24 17:54:50

Crunch
Member
From: -+-
Registered: 2011-02-17
Posts: 56

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

ibrunton wrote:
Crunch wrote:

Works like a charm.

http://ompldr.org/tYWlidA

I like that font, DroidSans...Is that also what you're using in your terminals?

What's that minimal launcher-type thing with the shell prompt in the middle of the left screen?

No my terminals are DejaVu Sans Mono, and the shell prompt is just that tongue. It's a urxvtd window I have set to launch there in that size with a keystroke.

Last edited by Crunch (2011-09-24 17:55:32)


Registered Linux user #536591.

Offline

#329 2011-09-24 23:13:12

Cloudef
Member
Registered: 2010-10-12
Posts: 636

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

tYWlxYg
Coded a OpenBox styled menu for dwm.

static const menuCtx gameMenu[] = {
   { "Touhou      >", &touhouMenu[0], NULL, {0} },
   { "-------------", NULL, NULL, {0} },
   { "Last Remnant ", NULL, spawn,
      pikakuvake("/home/jari/.wine/drive_c/Program Files/The Last Remnant/Binaries/TLR.exe") },
   MENUEND,
};

static const menuCtx rootMenu[] = {
   { "Internet    >", &internetMenu[0],   NULL, {0} },
   { "Games       >", &gameMenu[0],       NULL, {0} },
   MENUEND,
};

My dwm sources are in github, it should not take too much modifications to include it in vanilla dwm.

Last edited by Cloudef (2011-09-25 09:21:41)

Offline

#330 2011-10-02 02:40:12

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

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

@JokerBoy

I just wanted to say thank you very much for your nice work on the dwm patches, It's really very much appreciated!

Previously, I used simon's pertag2/nbstack.c, but I just now discovered that it also segfaults upon pressing Mod4+0!

Now that i've changed to instead using your pertag2 with included nbstack, then I can see that you've fixed that issue also!

Additionally, then with simon's, then when e.g. setting manually ntile to a master value of 2(with mod4+a), then the nbstack value of other tags also is forced to a nmaster value of 2, but again, not yours!

I'm also glad that you've changed nbstack.c to be greedy, so that it correlates to your ntile which also is made greedy by you along time ago, and finally that you've removed the hardcoded "nmaster showing" icon from the statusbar, so we can use e.g. "[T]" etc instead....

Anyway, I just was really impressed by this, and wanted to say thank you very much, mate!

CU, Martin.

Last edited by mhertz (2011-10-02 02:42:56)

Offline

#331 2011-10-02 07:39:58

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

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

Kudos to Simon, I just made that patch to fit my needs based on his work. tongue

I was using simply bstack until a few days ago, but nbstack seems to be very useful for me too.

Offline

#332 2011-10-02 13:33:45

inch
Member
Registered: 2010-12-21
Posts: 49

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

mhertz wrote:
inch wrote:

Hello, I'm in deep need of a grid mode patch for 5.9, is there something yet?

Even though it dosen't say for dwm-5.9, then check anyway as it still might work, and if it dosen't, then try to handpatch it, as it's maybe a pertag interference issue like with gaplessgrid(never had the need for using "gapped" grid myself, so dunno).

Patching is no problem, but it just doesn't work. And my C/dwm knowledge is not enough to fix the patch myself.

Offline

#333 2011-10-02 14:41:15

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

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

I was bored, so I did a little digging around for you, and by courtesy of qbbr (Sokolov Innokenty), or at least that's the github repo from where it's taken, then here's a modified version of the gridmode patch from suckless.org, and which i've just now tested to work with vanilla dwm-5.9 perfectly:

https://github.com/qbbr/dwm/raw/master/ … dmode.diff

Again, JokerBoy has a 5.9 compatible gaplessgrid on his hg repo, which imho would be much more usefull(I don't get why anyone would want "empty gaps in their grids" ?), but oh well, to each his own ofcourse smile

Last edited by mhertz (2011-10-02 14:46:27)

Offline

#334 2011-10-03 16:15:18

inch
Member
Registered: 2010-12-21
Posts: 49

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

Thank you, I just forgot to add a Keyboardshortcut to the gridmode, the suckless patch also works fine. But either pertag and/or bstack kill grid.

I added some symbols to the Font from Lokaltog (more batteryicons, one more soundicon): https://github.com/thetrus/dwm/blob/mas … ymbols.bdf

However, I am not able to copy symbols from gbdfed into the config.h (I want to change the layout symbols) via vim, what am I doing wrong? The font is properly installed, font cache rehashed and X restarted.

Last edited by inch (2011-10-03 18:54:57)

Offline

#335 2011-10-03 16:21:04

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

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

type :digraphs in vim.

Offline

#336 2011-10-03 17:33:16

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

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

inch please resize your image and use a thumb, as per https://wiki.archlinux.org/index.php/Fo … s_and_Code


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#337 2011-10-03 19:00:34

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

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

Meyithi wrote:

I'm starting to use dwm more and more with the statusbar hidden, however I occasionally have to toggle it on for tag to tag stuff, to see where I am etc.  What would be perfect is if that whenever I press the mod key, the bar appears and then disappears upon mod key release, this way I'll only see the bar on client manipulation when it's info is the most useful.

Is this possible? If not anybody know a dwm like wm where it may be possible?

http://lists.suckless.org/dev/1008/5681.html

Offline

#338 2011-10-04 00:28:59

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

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

inch wrote:

Thank you, I just forgot to add a Keyboardshortcut to the gridmode, the suckless patch also works fine. But either pertag and/or bstack kill grid.

Huh? after you initially asked for help on this, then I tested the gridmode patch from suckless.org, and it dosen't work with vanilla dwm-5.9, as it complains during building it... If you diff the version I just linked to you, with the one from suckless, then you'll also see that there's many changes made, even though the filenames are the same...

Offline

#339 2011-10-04 06:00:36

w0ng
Member
From: Australia
Registered: 2009-06-04
Posts: 88
Website

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

inch wrote:

Thank you, I just forgot to add a Keyboardshortcut to the gridmode, the suckless patch also works fine. But either pertag and/or bstack kill grid.

some patches change dwm.c a lot so the diffs for won't work out of the box. you have to apply them manually. pertag first, then get the bstack-pertag version from suckless, then apply bstack manually.

Offline

#340 2011-10-05 10:27:03

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

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

Jokerboy: Found your patch called centred-floating. Great idea. Very useful especially with feh in floating mode.


Github -- My terminal font Envypn

Offline

#341 2011-10-05 16:48:49

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

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

I wanted that feature for mplayer,  with vdpau you don't need that patch but with another video output driver you do..

Btw, there is trayer-dwm in AUR with a small patch which doesn't require patching dwm to skip "panel".. smile

Offline

#342 2011-10-08 20:08:56

inch
Member
Registered: 2010-12-21
Posts: 49

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

mhertz wrote:

Huh? after you initially asked for help on this, then I tested the gridmode patch from suckless.org, and it dosen't work with vanilla dwm-5.9, as it complains during building it... If you diff the version I just linked to you, with the one from suckless, then you'll also see that there's many changes made, even though the filenames are the same...

However, they really are exactly the same tongue

w0ng wrote:
inch wrote:

Thank you, I just forgot to add a Keyboardshortcut to the gridmode, the suckless patch also works fine. But either pertag and/or bstack kill grid.

some patches change dwm.c a lot so the diffs for won't work out of the box. you have to apply them manually. pertag first, then get the bstack-pertag version from suckless, then apply bstack manually.

Appreciate both of your help, I patched everything by hand it it works, thank you.

I don't know if this thread is the right place for my questions (I hope so):

I settled for the gaplessgrid patch (mhertz suggested it) but I'm having gaps between urxvt windows, is this urxvts fault or a minor bug in the gaplessgrid?

Also I'm running pango and statuscolors (among others patches) and they don't seem to like each other. When I use colors in my statusbar the backgroundcolor changes accordingly to my the color I wrote into the config.h but the font color stays the same. Is anyone running these patches together and managed to change the font color?

My last question isn't exactly a dwm question, I want to add some symbols from a bitmap font (.bdf) into a ttf/otf font, could someone recommend a programm for this? I wasn't able to do this with fontforge.

Offline

#343 2011-10-08 21:39:09

Cloudef
Member
Registered: 2010-10-12
Posts: 636

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

inch wrote:

I settled for the gaplessgrid patch (mhertz suggested it) but I'm having gaps between urxvt windows, is this urxvts fault or a minor bug in the gaplessgrid?

Also I'm running pango and statuscolors (among others patches) and they don't seem to like each other. When I use colors in my statusbar the backgroundcolor changes accordingly to my the color I wrote into the config.h but the font color stays the same. Is anyone running these patches together and managed to change the font color?

My last question isn't exactly a dwm question, I want to add some symbols from a bitmap font (.bdf) into a ttf/otf font, could someone recommend a programm for this? I wasn't able to do this with fontforge.

1. Grab a resize hints patch for urxvt ( forcing resizehints false in dwm causes side-effects which are documented at FAQ )
2. You need to edit whole color system if you use XFT, I also suggest to replace color struct definition in functions with color index instead.

Compare the drawtext, etc functions which use colors with my dwm.c here.
https://github.com/Cloudef/dwm-fork/blob/master/dwm.c

Last edited by Cloudef (2011-10-08 22:40:38)

Offline

#344 2011-10-08 22:15:55

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

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

inch wrote:

However, they really are exactly the same tongue

Doh! - I sincerly apologise for my ignorance! I just diffed them and you are of course absolutelly right, so sorry about that again, mate! I must have by mistake taken a gridmode patch from suckless.org's historical section when I initially compared them...

I settled for the gaplessgrid patch (mhertz suggested it) but I'm having gaps between urxvt windows, is this urxvts fault or a minor bug in the gaplessgrid?

Cool, I also use gaplessgrid myself, and I don't see that here, so i'm guessing you haven't disabled resizehints in config.h wink (set resizehints = False to fix)

Edit: Hmm, I actually first gotten to look at your screenshot now, and it kinda looks like you have uselessgaps applied or something like that ?

Last edited by mhertz (2011-10-08 22:21:59)

Offline

#345 2011-10-09 08:27:49

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

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

inch wrote:

I settled for the gaplessgrid patch (mhertz suggested it) but I'm having gaps between urxvt windows, is this urxvts fault or a minor bug in the gaplessgrid?

You don't need another urxvt, the one from the repos is fine. Look into your config.h and set

static const unsigned int gappx     = 0;

To ignore the resize hints, set

static const Bool resizehints = False;

=> perfect smile

Offline

#346 2011-10-09 12:37:49

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

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

..And if you don't want gaps anyways, then instead of setting gapx to zero, then simply ditch entirelly the useless gaps patch...

( Personally, then i've never understood why anyone would use such things that wastes screen real-estate for no apparent reason other than some ppl obviously thinks that it's astetically pleasant or whatever, but of course to each their own! smile )

Offline

#347 2011-10-13 10:36:04

vanvalium
Member
From: Austria
Registered: 2010-10-09
Posts: 86

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

Is anyone using dwmstatus and mpd?
Dwmstatus is very resource-friendly and it shouldn't be too hard to get mpd stats with in.

Offline

#348 2011-10-14 18:09:24

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

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

I have been patching and doing my PKGBUILD in a sort of roundabout (probably not correct) way so far but I was trying to put everything together into a proper PKGBUILD with bstack and statuscolors patches. This is what I have so far. The build is failing though. What am I doing wrong?

# $Id: PKGBUILD 54496 2011-08-19 09:22:43Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Dag Odenhall <dag.odenhall@gmail.com>
# Contributor: Grigorios Bouzakis <grbzks@gmail.com>

pkgname=dwm
pkgver=5.9
pkgrel=2
pkgdesc="A dynamic window manager for X"
url="http://dwm.suckless.org"
arch=('i686' 'x86_64')
license=('MIT')
options=(zipman)
depends=('libx11' 'libxinerama')
install=dwm.install
source=(http://dl.suckless.org/dwm/dwm-$pkgver.tar.gz
        config.h
        dwm.desktop
        http://dwm.suckless.org/patches/dwm-$pkgver-bstack.diff
        http://dwm.suckless.org/patches/dwm-$pkgver-statuscolors.diff)

build() {
  cd $srcdir/$pkgname-$pkgver
  patch -Np1 -i ../dwm-$pkgver-bstack.diff
  patch -Np1 -i ../dwm-$pkgver-statuscolors.diff
  cp $srcdir/config.h config.h
  sed -i 's/CPPFLAGS =/CPPFLAGS +=/g' config.mk
  sed -i 's/^CFLAGS = -g/#CFLAGS += -g/g' config.mk
  sed -i 's/^#CFLAGS = -std/CFLAGS += -std/g' config.mk
  sed -i 's/^LDFLAGS = -g/#LDFLAGS += -g/g' config.mk
  sed -i 's/^#LDFLAGS = -s/LDFLAGS += -s/g' config.mk
  make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
}

package() {
  cd $srcdir/$pkgname-$pkgver
  make PREFIX=/usr DESTDIR=$pkgdir install
  install -m644 -D LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
  install -m644 -D README $pkgdir/usr/share/doc/$pkgname/README
  install -m644 -D $srcdir/dwm.desktop $pkgdir/usr/share/xsessions/dwm.desktop
}

edit: It works if I replace the config.h with my existing one but not with the vanilla config.h

Last edited by stlarch (2011-10-15 07:32:09)

Offline

#349 2011-10-15 04:48:09

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

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

I think I figured it out. Forgive my ignorance here. I changed

cp $srcdir/config.h config.h

to

cp $srcdir/config.h config.def.h

and put that line above the patch lines and it seems to work with the vanilla config.h. The PKGBUILD looks like

# $Id: PKGBUILD 54496 2011-08-19 09:22:43Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Dag Odenhall <dag.odenhall@gmail.com>
# Contributor: Grigorios Bouzakis <grbzks@gmail.com>

pkgname=dwm
pkgver=5.9
pkgrel=2
pkgdesc="A dynamic window manager for X"
url="http://dwm.suckless.org"
arch=('i686' 'x86_64')
license=('MIT')
options=(zipman)
depends=('libx11' 'libxinerama')
install=dwm.install
source=(http://dl.suckless.org/dwm/dwm-$pkgver.tar.gz
        config.h
        dwm.desktop
        http://dwm.suckless.org/patches/dwm-$pkgver-bstack.diff
        http://dwm.suckless.org/patches/dwm-$pkgver-statuscolors.diff)

build() {
  cd $srcdir/$pkgname-$pkgver
  cp $srcdir/config.h config.def.h
  patch -Np1 -i ../dwm-$pkgver-bstack.diff
  patch -Np1 -i ../dwm-$pkgver-statuscolors.diff
  sed -i 's/CPPFLAGS =/CPPFLAGS +=/g' config.mk
  sed -i 's/^CFLAGS = -g/#CFLAGS += -g/g' config.mk
  sed -i 's/^#CFLAGS = -std/CFLAGS += -std/g' config.mk
  sed -i 's/^LDFLAGS = -g/#LDFLAGS += -g/g' config.mk
  sed -i 's/^#LDFLAGS = -s/LDFLAGS += -s/g' config.mk
  make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
}

package() {
  cd $srcdir/$pkgname-$pkgver
  make PREFIX=/usr DESTDIR=$pkgdir install
  install -m644 -D LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
  install -m644 -D README $pkgdir/usr/share/doc/$pkgname/README
  install -m644 -D $srcdir/dwm.desktop $pkgdir/usr/share/xsessions/dwm.desktop
}
md5sums=('2799f885c05817ca112d521bb247f797'
         'f0ba59bf77a53e3a2fc8596740ee5cb8'
         '939f403a71b6e85261d09fc3412269ee'
         '58cb00cb3117025af64f065fddb2359e'
         '03663b3ae5ca6a90e76bb173380296fa')

I guess this would be a good template to start from and then add changes to the config.h

Last edited by stlarch (2011-10-15 07:41:34)

Offline

#350 2011-10-15 17:07:48

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

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

The bstack patch, adds important declarations to config.def.h during patching, and you also need to add some keys yourself and such. I dunno about the statuscolor one, as I don't use it...

So, if you have allready a predefined config.h, with those declarations/keys etc. set, then you can just copy it over without renaming it, and it dosen't matter if it's before or after the patching...

The fact that you need to add it before patching and as renamed into config.def.h, means that you're missing some definitions allready...

I don't bother installing dwm,  myself...

I just go to ~/.builds/dwm where I have the dwm tarball, patches, config.h and a setup-script which builds dwm and copy the binary over to ~/.bin.

Then to make changes, I just edit config.h and/or comment-out or un-comment the list of patches to apply in the setup script, and then I run the srcipt to reinstall...

Offline

Board footer

Powered by FluxBB