Re: [dev] [dvtm] Fibonacci layout patch

2010-06-01 Thread crap
 I've been using dvtm at work a lot recently so I figured I'd port the
 Fibonacci spiral/dwindle layouts to dvtm.  This patch is for 0.5.2.  I find
 it's not as useful as the Fibonacci layouts in dwm but I figure why not
 release it anyway.
 
 -Niki Yoshiuchi

Do these layouts provide any benefits? I found them rather useless actually,
even in dwm... What do you use them for, and in what way do you use them if
you don't mind sharing your experience?



Re: [dev] [dvtm] Fibonacci layout patch

2010-06-01 Thread Mate Nagy
On Tue, Jun 01, 2010 at 01:27:07PM +0200, Mate Nagy wrote:
 Using the vim splits may be cheating, but it sure is convenient.
sorry for self-reply: I thought that maybe for maximum punishment, the
fibonacci layout could support nmaster. (Also note that this is a
2560x1600 setup, that's why so much division (and nmaster) makes sense.)

Mate



Re: [dev] [dvtm] Fibonacci layout patch

2010-06-01 Thread markus schnalke
[2010-06-01 13:34] Mate Nagy mn...@port70.net
 On Tue, Jun 01, 2010 at 01:27:07PM +0200, Mate Nagy wrote:
  Using the vim splits may be cheating, but it sure is convenient.
 sorry for self-reply: I thought that maybe for maximum punishment, the
 fibonacci layout could support nmaster. (Also note that this is a
 2560x1600 setup, that's why so much division (and nmaster) makes sense.)

Thanks for your self-reply, I just wanted to ask what screen
resolution you have.


meillo



Re: [dev] Tiling windowmanager workflow (Was: [dvtm] Fibonacci layout patch)

2010-06-01 Thread Martin Kopta
On Tue, Jun 01, 2010 at 01:56:28PM +0200, Moritz Wilhelmy wrote:
 Actually tiling doesn't even make much sense on it, when I went with monocle 
 on
 the netbook I grew used to it and use it everywhere now.
 Anyone else interested in sharing their way how they use their System? It 
 seems
 like an interesting topic.
 

I use mainly monocle mode also. I have 12 tags (1..12, mapped to F{1..12}) and I
hardly ever run more than 12 apps at once. I am hardcore minimalist and I tend
to throw away everything what is not needed. Also, since I understood suckless
motion, I replace many apps for less-sucking alternatives. Like Geeqie-qiv,
Thunar-xterm, openoffice-google docs, and so on.. Few months ago I set my
$HOME as read only and removed dotfiles and dotdirs what I didn't create myself
or explicitly want. Many apps showed their true nature.

Summary: Since I accepted suckless approach, my zen level has increased.



Re: [dev] Tiling windowmanager workflow (Was: [dvtm] Fibonacci layout patch)

2010-06-01 Thread Ethan Grammatikidis


On 1 Jun 2010, at 12:56, Moritz Wilhelmy wrote:


On Tue, Jun 01, 2010 at 01:27:07PM +0200, Mate Nagy wrote:

Using the vim splits may be cheating, but it sure is convenient.
sorry for self-reply: I thought that maybe for maximum punishment,  
the

fibonacci layout could support nmaster. (Also note that this is a
2560x1600 setup, that's why so much division (and nmaster) makes  
sense.)


Ah, guess it's just my 1280x1024 screen then :)
Actually tiling doesn't even make much sense on it, when I went with  
monocle on

the netbook I grew used to it and use it everywhere now.
Anyone else interested in sharing their way how they use their  
System? It seems

like an interesting topic.



I've been fighting with window managers all my computing life, not  
counting the 8-bit machines. I've tried a variety of semi-fixed  
layouts in FVWM, but really, whether you like tiled or floating or  
some strange hybrid, multi-window systems only work if you have a big  
enough screen. At one point I was using WindowMaker  while I liked  
the dock  clip, I set it to automatically full-screen-maximise every  
(non-transient) window. I eventually got a 1600x1200 monitor and said  
to myself (out loud, I think) Oh THAT'S how window systems are  
supposed to work!


My Windows-using nephews maximise everything, or if they're using  
something which doesn't belong maximised and they have to look at it  
for more than a few seconds they minimise everything else. Basically  
they get a monocle view too. They have 1280x1024 screens, one per  
computer.


Apple OS X is curious. Maximisation is poor, but applications are  
meant to have small windows which the window system neatly cascades.  
There is a hide function which is kinda half-useful; it hides all the  
windows of an application but it would be better if windows could be  
grouped by project and hidden that way. I still somehow prefer it to  
virtual desktops...


TL;DR
Summarising years of experience^Wfrustration:
* Window systems are pointless without very large screens.
* OS X (really NextStep) tries hard to work with smaller screens but  
is still clunky.


--
Do not specify what the computer should do for you, ask what the  
computer can do for you.





Re: [dev] Tiling windowmanager workflow (Was: [dvtm] Fibonacci layout patch)

2010-06-01 Thread David Tweed
On Tue, Jun 1, 2010 at 12:56 PM, Moritz Wilhelmy c...@wzff.de wrote:
 On Tue, Jun 01, 2010 at 01:27:07PM +0200, Mate Nagy wrote:
  Using the vim splits may be cheating, but it sure is convenient.
 sorry for self-reply: I thought that maybe for maximum punishment, the
 fibonacci layout could support nmaster. (Also note that this is a
 2560x1600 setup, that's why so much division (and nmaster) makes sense.)

 Ah, guess it's just my 1280x1024 screen then :)
 Actually tiling doesn't even make much sense on it, when I went with monocle 
 on
 the netbook I grew used to it and use it everywhere now.
 Anyone else interested in sharing their way how they use their System? It 
 seems
 like an interesting topic.



The typical usage where I have more than one window is that I have
maybe 2 windows providing a view on an editor open (eg, for showing a
.h and .cpp file, or two .cpp files when I'm trying to track down an
inconsistency in usage), an xterm for running the program being
developed and one xterm holding gnuplot and one gnuplot window (or
looking at accuracy plots (I tend to work on machine learning stuff
where you do that a lot). So it's all associated with one human
level task, but it's using multiple computer applications.

Likewise there are other situations, but they all tend to fall into
that category: I don't tend to have separate human tasks on screen
at the same time very much.

-- 
cheers, dave tweed__
computer vision reasearcher: david.tw...@gmail.com
while having code so boring anyone can maintain it, use Python. --
attempted insult seen on slashdot



Re: [dev] [dvtm] Fibonacci layout patch

2010-06-01 Thread Niki Yoshiuchi
The biggest benefit I've found has simply been that the second client
remains the same size regardless of how many clients you have open.  That
said, I am generally using dwm on a netbook so I rarely have more than 2 or
3 clients open on a single tag.

On Tue, Jun 1, 2010 at 7:18 AM, c...@wzff.de wrote:

  I've been using dvtm at work a lot recently so I figured I'd port the
  Fibonacci spiral/dwindle layouts to dvtm.  This patch is for 0.5.2.  I
 find
  it's not as useful as the Fibonacci layouts in dwm but I figure why not
  release it anyway.
 
  -Niki Yoshiuchi

 Do these layouts provide any benefits? I found them rather useless
 actually,
 even in dwm... What do you use them for, and in what way do you use them if
 you don't mind sharing your experience?




Re: [dev] Tiling windowmanager workflow (Was: [dvtm] Fibonacci layout patch)

2010-06-01 Thread Ethan Grammatikidis


On 1 Jun 2010, at 14:01, Martin Kopta wrote:


Few months ago I set my
$HOME as read only and removed dotfiles and dotdirs what I didn't  
create myself

or explicitly want.


Oh! This is something I should have done many years ago. I wish  
I'd thought of it. I've lost good data because there were too  
many .dirs to sort through.


--
Do not specify what the computer should do for you, ask what the  
computer can do for you.





Re: [dev] Tiling windowmanager workflow (Was: [dvtm] Fibonacci layout patch)

2010-06-01 Thread Steven Blatchford
On 13:56 Tue 01 Jun, Moritz Wilhelmy wrote:
 On Tue, Jun 01, 2010 at 01:27:07PM +0200, Mate Nagy wrote:
  Using the vim splits may be cheating, but it sure is convenient.
 sorry for self-reply: I thought that maybe for maximum punishment, the
 fibonacci layout could support nmaster. (Also note that this is a
 2560x1600 setup, that's why so much division (and nmaster) makes sense.)

Ah, guess it's just my 1280x1024 screen then :)
Actually tiling doesn't even make much sense on it, when I went with monocle on
the netbook I grew used to it and use it everywhere now.
Anyone else interested in sharing their way how they use their System? It seems
like an interesting topic.

I use a laptop (1200x800) at home and my work computer (1920x1200).  I
use dwm-5.2 with the gridmode patch.  The gridmode patch allows me to
use equal sized windows.

I use five tags.  On my work computer:
main - two terms named term1
term - two terms named term2
www - two browsers
ooo - one term named term4 and gnumeric
mail - two terms named mail (mutt and weechat)

On my laptop:
main - one term named term1
term - one term named term2
www - one browser
ooo - nothing.  I only use gnumeric for work
mail - one term

On my work computer I use tag main and pull in what is needed.  I found
pressing mod4+1, mod4+ctrl+2 to be annoying.  I first used xmodmap to
switch mod4 and mod1.  This allows me to press the keys on either side
of the spacebar with my thumb.  Second, I used yiyus suggestion from
awhile back[1] on how to pull in two tags with one key (ie mod4+q could
switch to tag1 and tag2).  Here is his code from my config.h:

#define WORKSPACE(KEY,TAG) \
{ MODKEY,   KEY,  view, {.ui = TAG} },
.
.
.
WORKSPACE(  XK_q,   1  0 | 1  1)
WORKSPACE(  XK_w,   1  0 | 1  2)
WORKSPACE(  XK_e,   1  1 | 1  2)

I use q,w,e,r,t to combine main+term, main+www, term+www, ooo+www and
main+mail.

On my laptop I have the option of using mod4+q,w,e,r,t or
mod4+,1,2,3,4,5.

-steve


[1] http://lists.suckless.org/dwm/0808/6573.html



Re: [dev] Tiling windowmanager workflow (Was: [dvtm] Fibonacci layout patch)

2010-06-01 Thread Rob
While we're on macros, I use the following macro for each tag,
so I can spawn an xterm wherever I want, in what mode I want,
just by setting its class, e.g.
$ xterm -class XTerm4f
spawns a floating xterm on tag 4 (1-based indexing)

#define TAG(i)  (1  (i-1))
#define XTERM(n) \
{ XTerm#n   , NULL,   NULL,  TAG(n),  False,   -1 }, \
{ XTerm#nf   , NULL,   NULL,  TAG(n),  True, -1 }

/* meanwhile, in tag rules...  */
  XTERM(1),
  XTERM(2),
  ...

It's been really useful for things like surf, where I can easily spawn
all the download-handling xterms on an unused tag and deal with
them later without having to recompile dwm with a new tag entry.

Course I have to bodge my .Xdefaults a bit to keep them obeying
whatever rules I want. I don't know whether it's valid or not,
but just having all lowercase xterm works:
xterm*background: black

s/xterm/urxvt too

Cheers, Rob



[dev] Re: [wmii]clarifications on python script usage

2010-06-01 Thread pascal
Hi Kris

Thanks for the wmiirc_local.py example. I used it as a base for mine.
I'm having some troubles to figure out the mixer plugin. I thought I would try
to write an equivalent myself before asking, but I can't, I'm getting headaches.
Would you mind posting yours? 

Pascal






Re: [dev] Re: [wmii]clarifications on python script usage

2010-06-01 Thread Kris Maglione

On Tue, Jun 01, 2010 at 10:11:59PM +0200, pascal wrote:
Thanks for the wmiirc_local.py example. I used it as a base for 
mine.  I'm having some troubles to figure out the mixer 
plugin. I thought I would try to write an equivalent myself 
before asking, but I can't, I'm getting headaches.  Would you 
mind posting yours? 


Sure, if you really want it. The alsamixer module isn't mine, 
though, and it'd buggy. The only reason I use it is that some 
programs change the PCM mixer value and you can't access it via 
OSD.


The Linux version is attached.

--
Kris Maglione

I'm confident that tomorrow's Unix will look like today's Unix, only
cruftier.
--Russ Cox

import fcntl

from pyxp.fields import Int

SOUND_MIXER_READ_DEVMASK = 0x80044DFE
MIXER_READ  = 0x80044D00
MIXER_WRITE = 0xC0044D00

mod = 0

mixers = ('vol', 'bass', 'treble', 'synth', 'pcm', 'speaker',
  'line', 'mic', 'cd', 'mix', 'pcm2', 'rec', 'igain',
  'ogain', 'line1', 'line2', 'line3', 'dig1', 'dig2',
  'dig3', 'phin', 'phout', 'video', 'radio', 'monitor')
mixerfd = open('/dev/mixer')
res = fcntl.ioctl(mixerfd, SOUND_MIXER_READ_DEVMASK, '')
mask = Int(4).decode(res, 0)

def findmixer(name):
for i, mixer in enumerate(mixers):
if (1  i)  mask and mixer == name:
return i

def getlevel(name):
mixer = findmixer(name);
res = fcntl.ioctl(mixerfd, MIXER_READ + mixer, '  ')
return (ord(res[0]) + ord(res[1])) / 2

def setlevel(name, level):
mixer = findmixer(name);
fcntl.ioctl(mixerfd, MIXER_WRITE + mixer,
chr(level  0x7f) * 2 + '\0\0')

# vim:se sts=4 sw=4 et:


Re: [dev] surf 0.4 tries to free an invalid pointer

2010-06-01 Thread Troels Henriksen
Pierre Chapuis catw...@archlinux.us writes:

 I installed surf 0.4 on Arch Linux and it crashed when I tried to click
 on a link to a binary file (actually to its own archive on suckless'
 website). Downloading with the right click menu works fine.

 I have copied its output below. The crash looks linked to Java.

Most likely, the Java plugin cannot unload properly.  I have registered
several similar crashes with the Flash plugin (in fact, there are many
serious problems with surf not shutting things down properly, but I'm
not sure how they could be fixed).

-- 
\  Troels
/\ Henriksen



Re: [dev] surf 0.4 tries to free an invalid pointer

2010-06-01 Thread Kris Maglione

On Tue, Jun 01, 2010 at 10:56:34PM +0200, Pierre Chapuis wrote:

I installed surf 0.4 on Arch Linux and it crashed when I tried to click
on a link to a binary file (actually to its own archive on suckless'
website). Downloading with the right click menu works fine.

I have copied its output below. The crash looks linked to Java.


Try running it under valgrind.

--
Kris Maglione

An organisation that treats its programmers as morons will soon have
programmers that are willing and able to act like morons only.
--Bjarne Stroustrup