Re: [dev] [dwm] adding WM_WINDOW_ROLE rule

2010-08-08 Thread David DEMELIER
2010/7/27 Anselm R Garbe :
> Hi David,
>
> On 26 July 2010 22:32, David DEMELIER  wrote:
>> There is something that make me sad with dwm, there is a lack of role
>> rules for clients. I explain : clients have instance and name using
>> WM_CLASS, but there is also WM_WINDOW_ROLE which is really important
>> and useful.
>>
>> Example : you want your firefox window tiled but not the download
>> manager or not the preference client you could make a rule that catch
>> the WM_WINDOW_ROLE
>>
>> -> xprop WM_WINDOW_ROLE on the firefox windows and sub-windows
>> --> xprop WM_WINDOW_ROLE
>> --> WM_WINDOW_ROLE(STRING) = "Preferences" # this is preferences
>> --> xprop WM_WINDOW_ROLE
>> --> WM_WINDOW_ROLE(STRING) = "browser" # the main window
>> --> xprop WM_WINDOW_ROLE
>> --> WM_WINDOW_ROLE(STRING) = "Manager" # the download window
>>
>> Why is this so important? Because you can make more rules to specifig
>> windows, I personally like to have the main browser window tiled but
>> not the download window. This is also the same thing with pidgin,
>> pidgin has a conversation window and a buddy list that have differents
>> WM_WINDOW_ROLE.
>>
>> Of coure we could use the `title' rules but it's different on each
>> locale you are using so it sucks as well.
>>
>> I would like to write a patch but for the moment I don't find the good
>> function that handle WM_WINDOW_ROLE.
>
> I think the right thing to do would be to extend Rule and applyrules()
> with support for WM_WINDOW_ROLE. However I doubt that many client make
> actually use of WM_WINDOW_ROLE in a consistent way, which is why I
> believe there is no great benefit in doing so -- or in other words,
> yet another proof how hideous X has become ;)
>
> Cheers,
> Anselm
>

It's so sad to see that suckless developers don't want to add 10 lines
to the code to improve it just because *the developers* think it's
useless.

Maybe for people it's useless, but for others it can be useful. Sad.

Kind regards.

-- 
Demelier David



Re: [dev] [dwm] adding WM_WINDOW_ROLE rule

2010-08-08 Thread Martin Kopta
Refuse to add code is sad but allright. Refuse to remove code would be real
problem.

Dne 8.8.2010 9:36 "David DEMELIER"  napsal/a:

2010/7/27 Anselm R Garbe :

> Hi David,
>
> On 26 July 2010 22:32, David DEMELIER  wrote:
>> There is ...
It's so sad to see that suckless developers don't want to add 10 lines
to the code to improve it just because *the developers* think it's
useless.

Maybe for people it's useless, but for others it can be useful. Sad.

Kind regards.

--
Demelier David


Re: [dev] [patch] add Control-G and Control-D to dmenu

2010-08-08 Thread Uriel
On Fri, Aug 6, 2010 at 3:18 PM, Connor Lane Smith  wrote:
> Hey,
>
> On 06/08/2010, Daniel Clemente  wrote:
>> This adds C-d (delete next char) and C-g (abort) to dmenu. These keys are
>> also used in programs like bash or Emacs.
>
> I've added C-d but not C-g, since it seems like an emacsism.

Both are emacsisms as far as I can tell, and of little use (specialy
given ^C already aborts).

For the 'canonical' list of Unix keybindings see: http://unix-kb.cat-v.org

uriel
> Thanks,
> cls
>
>



Re: [dev] [dwm] adding WM_WINDOW_ROLE rule

2010-08-08 Thread Kris Maglione

On Sun, Aug 08, 2010 at 09:36:24AM +0200, David DEMELIER wrote:

It's so sad to see that suckless developers don't want to add 10 lines
to the code to improve it just because *the developers* think it's
useless.

Maybe for people it's useless, but for others it can be useful. Sad.


Don't get pissy. 10 lines here and there adds up. So does a 
feature here and there, especially when it would likely be used 
by so few. If you want it and you can't convince the developers 
that it's worthwhile, maintain a patch. That's how it works 
here. If you don't like it, you're welcome to go somewhere else.


--
Kris Maglione

The tragedy of modern war is not so much that young men die but that
they die fighting each other, instead of their real enemies back home
in the capitals.
--Edward Abbey




Re: [dev] [patch] add Control-G and Control-D to dmenu

2010-08-08 Thread Kris Maglione

On Sun, Aug 08, 2010 at 10:22:05AM +0200, Uriel wrote:

On Fri, Aug 6, 2010 at 3:18 PM, Connor Lane Smith  wrote:

Hey,

On 06/08/2010, Daniel Clemente  wrote:

This adds C-d (delete next char) and C-g (abort) to dmenu. These keys are
also used in programs like bash or Emacs.


I've added C-d but not C-g, since it seems like an emacsism.


Both are emacsisms as far as I can tell, and of little use (specialy
given ^C already aborts).


So do Escape and ^[. C-g, unfortunately, is also used by mutt, 
which doesn't recognize  at all. C-d means EOF. It's always 
meant EOF and I've never known it to mean delete-char, although 
I'm aware that in emacs it does.



For the 'canonical' list of Unix keybindings see: http://unix-kb.cat-v.org


Whose canon?

--
Kris Maglione

If you think your management doesn't know what it's doing or that your
organisation turns out low-quality software crap that embarrasses you,
then leave.
--Edward Yourdon




Re: [dev] [dwm] spawn a floating window

2010-08-08 Thread Sean Whitton
Hi,

On Sat, Aug 07, 2010 at 10:01:47PM +0200, Pascal Wittmann wrote:
> I tried to write a function that spawns a window/client and makes it
> floating, but with no success. I looked a the spawn function, but I
> have no idea how to get/alter the isfloating value of the new client.
> Simply taking the selected one won't  work.
> 
> Example of use: You are reading a something in fullscreen and want to
> try some code snippet or do some computations, I find it useful to
> have a terminal (or someting else) floating around.
> 
> I could gain the same effect by switching the the layout to floating
> and open the application then, but I wonder if its possible (without
> big effort) to write such a function?

You could set a rule to match terminals based on title and mark them as 
floating, then use urxvt -T floatingwin or something to launch the term.  
I use the title matching trick a lot.

S

-- 
Sean Whitton / 
OpenPGP KeyID: 0x3B6D411B
http://seanwhitton.com/



pgpmQKVlmcbiA.pgp
Description: PGP signature


Re: [dev] [patch] add Control-G and Control-D to dmenu

2010-08-08 Thread Uriel
On Sun, Aug 8, 2010 at 10:39 AM, Kris Maglione  wrote:
> On Sun, Aug 08, 2010 at 10:22:05AM +0200, Uriel wrote:
>>
>> On Fri, Aug 6, 2010 at 3:18 PM, Connor Lane Smith  wrote:
>>>
>>> Hey,
>>>
>>> On 06/08/2010, Daniel Clemente  wrote:

 This adds C-d (delete next char) and C-g (abort) to dmenu. These keys
 are
 also used in programs like bash or Emacs.
>>>
>>> I've added C-d but not C-g, since it seems like an emacsism.
>>
>> Both are emacsisms as far as I can tell, and of little use (specialy
>> given ^C already aborts).
>
> So do Escape and ^[. C-g, unfortunately, is also used by mutt, which doesn't
> recognize  at all. C-d means EOF. It's always meant EOF and I've never
> known it to mean delete-char, although I'm aware that in emacs it does.

Indeed, ^D meaning anything other than EOF is an abomination.

>
>> For the 'canonical' list of Unix keybindings see: http://unix-kb.cat-v.org
>
> Whose canon?

My canon ;P

uriel

> --
> Kris Maglione
>
> If you think your management doesn't know what it's doing or that your
> organisation turns out low-quality software crap that embarrasses you,
> then leave.
>        --Edward Yourdon
>
>
>



Re: [dev] [patch] xmms like pattern matching for dmenu (update to hg tip)

2010-08-08 Thread Dieter Plaetinck
On Sat, 7 Aug 2010 22:27:31 +0100
StephenB  wrote:

> On 7 August 2010 20:36, Robert Ransom  wrote:
> 
> > On Sat, 7 Aug 2010 17:23:13 +0100
> > StephenB  wrote:
> >
> > > Just to make clear, this patch is an updated version of the one
> > > here:
> > > http://tools.suckless.org/dmenu/patches/xmms-like_pattern_matching
> >
> > http://suckless.org/wiki/
> >
> >
> > Robert Ransom
> >
> 
> Thanks, I've added my patch to the wiki and updated the page.
> 
> StephenB

this pattern matching style is pretty cool.  Is there no interest in
merging this in the mainline?

Dieter



Re: [dev] wrap: minimalist archiving tool

2010-08-08 Thread Szabolcs Nagy
* Connor Lane Smith  [2010-08-06 15:10:29 +0100]:

> Interestingly during testing the best compression results came from
> our very own sflate.

there was a bug in the encoder, it could corrupt your data
(i noticed it after rewriting a few things, but forgot to backport the fix to 
the repo on suckless.org)

i've just committed a fix, but be careful with sflate there might be other 
issues



[dev] [wmii] Wmii breaks block selection in kicad

2010-08-08 Thread Daniel
Hi,

I use wmii excusively as my WM, but I encountered strange problem:
block selection (left mouse click+drag) does not work in kicad under wnii.

kicad is EDA software: http://iut-tice.ujf-grenoble.fr/kicad/
Im using version BZR R2356  (stable, 5.05.2010)
with libmspack 0.2alpha and wxWidgets 2.8.11 (unicode version)

My distro: Slackware 13.1 (updated to current)

Steps to reproduce:
(I checked this on 2 machines)

1) launch kicad under wmii
2) launch eeschema (schematic editor), or pcbnew (pcb editor)

block selection is broken in both eeschema and pcbnew (You can click and
drag and nothing happens)

Problem is gone after switching to dwm, fluxbox or xfce (I did not test
other WMs)

I switched to dwm so far, but I would like to continue using wmii as my WM.

I will be gone for 20 days from tomorrow (vacation, no internet access),
so You won't get any replies from me until I'm back :)

Daniel Kowalski




signature.asc
Description: OpenPGP digital signature


Re: [dev] wrap: minimalist archiving tool

2010-08-08 Thread Szabolcs Nagy
* Connor Lane Smith  [2010-08-06 15:10:29 +0100]:

> I've written a tiny archiver, which I've called "wrap" for lack of a

looks nice (nicer than tar, cpio or gnu ar)

> I'm not quite sure of the use case for this, but I don't know, someone

i'm not sure either

but it'd be unixy to do
find dir | xargs | wrap c | sflate -c >dir.a



Re: [dev] wrap: minimalist archiving tool

2010-08-08 Thread Anders Andersson
On Sun, Aug 8, 2010 at 8:26 PM, Szabolcs Nagy  wrote:
> * Connor Lane Smith  [2010-08-06 15:10:29 +0100]:
>
>> I've written a tiny archiver, which I've called "wrap" for lack of a
>
> looks nice (nicer than tar, cpio or gnu ar)
>
>> I'm not quite sure of the use case for this, but I don't know, someone
>
> i'm not sure either
>
> but it'd be unixy to do
> find dir | xargs | wrap c | sflate -c >dir.a

A reminder here: The common use case for an archiver is to archive
quite a lot of files, so reading a list of files from stdin is
probably necessary for practical use unless you assume that you can
pass thousands of files as arguments.

I like the idea, tar is bulky and outdated, cpio is difficult to use
and suffer from a lot of the same problems as tar (designed at a time
archiving meant streaming raw bytes to tape).

After reading the source it seems a little less general purpose than I
had hoped for though, but I can see the use of this anyway, for
archiving things where you don't need to store ownership information,
permission flags, named pipes, devices etc. More of a source-code
archiver than a backup archiver.



Re: [dev] wrap: minimalist archiving tool

2010-08-08 Thread David Tweed
On Fri, Aug 6, 2010 at 3:10 PM, Connor Lane Smith  wrote:
> I've written a tiny archiver, which I've called "wrap" for lack of a
> better name. It is 120 lines of C, and yields far smaller archives
> than tar while overcoming the various crippling limitations of ar. It
> does, however, only store files - subdirectories are implicit.
> Interestingly during testing the best compression results came from
> our very own sflate.

The one thing that leaps out at me is that there's no checksumming of
either the individual files or the whole the archive file performed,
so if you give it a damaged archive you won't be able to tell or
isolate the damaged files. To be fair, whilst tar appears to only
checksum the file headers, so it you go and "damage" a tar archive
outside of that range it doesn't detect it, but then being better than
tar is, as you noticed, quite a low hurdle :-)

-- 
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