Re: [dev] wmii - key events are not read unless they are repeated

2011-05-07 Thread Suraj N. Kurapati
On Sun 08 May 2011 03:54:33 PM PDT, Ben Smith wrote:
> the programs list does not appear until its pressed a few times,
> or another action if called.

That's because your program list is being re-computed every time you
press Mod4-p.  To fix this, compute the program list once and cache
it in memory (or on disk) and then re-use it in your Mod4-p handler.

Something like the following (untested):

> proglist() {
> IFS=: set -- $1
> find -L $@ -maxdepth 1 -perm /111 | sed '1d; s,.*/,,' | sort |
> uniq unset IFS
> }

proglist_cache=$(proglist $PATH)

>
> # Run program
> Mod4-p)
> eval exec wmiir setsid "$(proglist $PATH | wimenu -s 0)" &
> ;;

Mod4-p)
eval exec wmiir setsid "$(echo proglist_cache | wimenu -s 0)" &

--
Beware of Programmers who carry screwdrivers.
-- Leonard Brandwein



[dev] wmii - key events are not read unless they are repeated

2011-05-07 Thread Ben Smith
Hi,

I'm starting to get into scripting wmii and am having a little trouble
reading key events, e.g. the programs list does not appear until its pressed
a few times, or another action if called.

This is also my first adventure into scripting.

I'm on arch linux with the wmii installed from community which is version
3.9.2-1 and I'm following the customizing section of the users guide.

Below is my wmiirc script that I'm using by calling "exec wmii -r ~/wmiirc"
in my .xinitrc file, any advice would be greatly appreciated.

I'm not sure if it's best practice to post large scripts here, so please let
me know for the future.
#!/bin/sh

up=k
down=j
left=h
right=l

focuscolors='#00 #cd6d37 #00'
normcolors='#00 #848484 #00'

font="xft:Sans-9"

wallpaper="/home/ben/pictures/wallpaper.png"
feh --bg-tile $wallpaper &

proglist() {
IFS=: set -- $1
find -L $@ -maxdepth 1 -perm /111 | sed '1d; s,.*/,,' | sort | uniq
unset IFS
}

wmiir write /ctl <
echo $normcolors $1 | wmiir create /lbar/$1
;;
DestroyTag)# DestroyTag 
wmiir rm /lbar/$1
;;
FocusTag)# FocusTag 
wmiir xwrite /lbar/$1 $focuscolors $1
;;
UnfocusTag)# UnfocusTag 
wmiir xwrite /lbar/$1 $normalcolors $1
;;

UrgentTag)# UrgentTag <'Client' or 'Manager'> 
wmiir xwrite /lbar$2 $2
;;
NotUrgentTag)#NotUrgentTag <'Client' or 'Manager'> 
wmiir xwrite /lbar/$2 $2
;;

# Key Events
Key)# Key 
case $1 in
# Motion keys
Mod4-h) wmiir xwrite /tag/sel/ctl select left
;;

# Run program
Mod4-p)
eval exec wmiir setsid "$(proglist $PATH | wimenu -s 0)" &
;;

Mod4-[0-9])
wmiir xwrite /ctl view ${1##*-}
;;
esac
;;

# Tag menu events
LeftBarMouseDown)# LeftBarMouseDown  
[ $1 = 3 ] && clickmenu \
"Delete:delete_view $2"
esac
done


-- 
Regards,

Ben Smith


[dev] [9base] add rm and ssam from plan9port

2011-05-07 Thread Stanley Lieber
http://openbsd.stanleylieber.com:7734/9base/add_rm_ssam.diff

-sl



Re: [dev] dwm

2011-05-07 Thread Suraj N. Kurapati
On Sat 07 May 2011 08:53:40 PM PDT, m1...@web.de wrote:
> >Not having the time, energy, or motivation to hack on wmii is
> >reasonable
> wrong, i wrote: time, the other stuff is invented by your
> imagination..

True, I projected my feelings into your statement whilst empathizing.

> *imaginationlaaand* ^^

Hey, isn't that where the suckless community van is going anyway? ;)

--
Logic doesn't apply to the real world.
-- Marvin Minsky



Re: [dev] dwm

2011-05-07 Thread Andrew Hills
On Sat, May 7, 2011 at 9:19 PM, Wolf Tivy  wrote:
> It would be nice to be able to tag a window (or a tag) as
> needing lots of space, and letting dwm accomodate (go into
> monocle or whatever) automatically, but maybe the problem
> is that 1024x768 just isn't enough.

Use the tag mask to automatically put your browser in one tag, and set
that tag to use the monocle layout. Then just don't combine that tag
with others.

--Andrew Hills



RE: [dev] dwm

2011-05-07 Thread Wolf Tivy
> As for tags, I think joining two tags in the current view was one of
> the early aha moments I had when implementing dwm.
> 
> Not using this feature frequently is fine though. But you will develop
> new working styles when joining tags that you haven't previously
> considered possible.
> 
> Cheers,
> Anselm

What resolution is your screen? I love the tagging concept
but I find that websites almost always need to be displayed
monocle or they get horribly jumbled and unusable.
Actually that goes for pretty much every app except terminals.

It would be nice to be able to tag a window (or a tag) as
needing lots of space, and letting dwm accomodate (go into
monocle or whatever) automatically, but maybe the problem
is that 1024x768 just isn't enough.

/wolf






Re: [dev] Sup and dmc

2011-05-07 Thread hiro
> complicated? is the most simple implementation for storing data. why non
> transparent?

I'm not sure I understood the whole concept yet, will have to do some
more reading.
I guess I'm making it more difficult than it is...



Re: [dev] [ANN] sabotage 2011-04-30, a musl+busybox based distribution

2011-05-07 Thread hiro
I don't use acme and abaco a lot because I don't like window managers
inside window managers...
I sometimes dream about a real acmewm



Re: [dev] dwm

2011-05-07 Thread hiro
Multiple tags seem cleaner to me than switching the current tag in
wmii sending a client to the old tag and switching back to it again.
But for this you need all your tags to be pretty organized, and more
or less empty. I see the point though, but to switch would be
difficult for me.



Re: [dev] [ANN] sabotage 2011-04-30, a musl+busybox based distribution

2011-05-07 Thread Ruben Mikkonen
That would be cool in my opinion, since I'm attraced to the concep of Abaco
(and Acme). The only reason I don't regularly use Abaco is that it renders
pages so poorly that it's much saner to use e.g. Surf.
On Sat, May 7, 2011 at 8:11 AM, Jens Staal  wrote:

> > For a web browser I would recommend NetSurf, not to be confused with
> > surf (which is a shameful disgrace for the suckless project).
> >
>
>
> Not to re-ignite the (very) volatile feelings on this list lately, but
> I just happened to stumble on a *nix port of abaco
> (http://lab-fgb.com/abaco/). Considering the history of some other
> Suckless projects (correct me if I am wrong), like wmii that evolved
> from Rio, and which subsequently spawned dwm, perhaps a similar
> evolution starting from abaco would be possible?
>
> On the other hand - why discuss choice of a browser for an
> experimental base system? As far as I see it, the browser is not part
> of the base system and should be optional (as long as there is some
> way, package manager or other solution) to to get it and to build it
> from the base.
>
>


Re: [dev] dwm

2011-05-07 Thread Anselm R Garbe
On 7 May 2011 20:43, Jakub Lach  wrote:
> 7 May 2011 20:26 Anselm R Garbe  wrote:
>
>> That doesn't sound you are using dwm as it is supposed to be used.
>
> Oh, snap! I'm always using tag 1 in static style (top, syslogd etc)..
>
> Am I not worthy? Should I be anticipating van arrival?

Look in front of your house ;)

Honestly, I think using the tile() layout in a way that certain
clients take a specific stack position does sound rather static to me.
The point of the tile() layout is that the client that takes focus is
in the master area and that the other clients in the stack take the
order of last used clients in ascending order.

As for tags, I think joining two tags in the current view was one of
the early aha moments I had when implementing dwm.

Not using this feature frequently is fine though. But you will develop
new working styles when joining tags that you haven't previously
considered possible.

Cheers,
Anselm



Re: [dev] dwm

2011-05-07 Thread markus schnalke
[2011-05-07 20:39] m1...@web.de
> @Anselm
> i get tired from this..i just switched my wm..have fun with dwm ;)

You did right. Use the window manager that matches your needs best.


meillo



Re: [dev] dwm

2011-05-07 Thread M1kes
@Suraj
>Finally, we arrive at the truth. Not having the time, energy, or
>motivation
wrong, i wrote: time, the other stuff is invented by your imagination..
*imaginationlaaand* ^^
> to hack on wmii is reasonable; accusing wmii of being
>undocumented (there is a manpage, user guide, and website) is not.
there a others how share my opinion. luke, read the source!
small hint for u my friend: http://i3wm.org/
___
Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://produkte.web.de/go/toolbar



Re: [dev] dwm

2011-05-07 Thread Suraj Kurapati
On Sat, May 7, 2011 at 11:21 AM,   wrote:
>> fix wmii. don't try to turn dwm into it.
> this wuld be a solution if wmii would be documented..which is not
> really the case..sorry but there is nearly no documentation in it

Really?  wmii has a manpage, user guide, and wiki of documentation.

> i dont have time to re-engineer it. Switching my wm seems a better
> sollution.

Finally, we arrive at the truth.  Not having the time, energy, or
motivation to hack on wmii is reasonable; accusing wmii of being
undocumented (there is a manpage, user guide, and website) is not.



Re: [dev] dwm

2011-05-07 Thread David Neu
On Fri, May 6, 2011 at 10:17 AM, Kurt H Maier  wrote:
> On Fri, May 6, 2011 at 9:26 AM,  wrote:
>>
>> hm well that should be main-features of a dynamic-window-manager and
>> not just available pver a "patch"..these were some of the main reasons I
>> liked wmii..
>
> Incorrect.  Your desires are based on a misunderstanding of dwm.  You
> have a 'layout' (this is floating, tiled, monocle, etc) and then you
> have 'tags'.  Tags are used to determine which set of clients to
> display.  Layouts are used to determine how displayed clients are
> arranged.  Reordering windows within a layout is pointless, because
> when you are displaying two tags, and then toggle a third, what
> determines in which order the newly-displayed clients are arranged?
> If you only display one tag at a time, you're not using dwm properly.
> If you want wmii, you know where to find it.  dwm's current interface
> is basically sound, and while people temporarily patch it up to make
> it act like a regular 'workspaces' window manager, most people I know
> eventually stop doing that as they realize how superior dwm's
> interface is.  There isn't really another program out there that has
> this functionality in such a clean implementation -- dwm is the
> standard dynamic window manager.
>
> --
> # Kurt H Maier
>
>

Hi Kurt,

> If you only display one tag at a time, you're not using dwm properly.

I've been using dwm for years, it sounds like I haven't been *fully*
using it, i.e. I haven't been making use of the ability to assign
multiple tags to a single client.  Can you give me an example how you
use this?

Many thanks!

Cheers,
David



Re: [dev] dwm

2011-05-07 Thread Jakub Lach
7 May 2011 20:26 Anselm R Garbe  wrote:

> That doesn't sound you are using dwm as it is supposed to be used.

Oh, snap! I'm always using tag 1 in static style (top, syslogd etc)..

Am I not worthy? Should I be anticipating van arrival?



Re: [dev] dwm

2011-05-07 Thread M1kes
@Anselm
i get tired from this..i just switched my wm..have fun with dwm ;)

___
Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://produkte.web.de/go/toolbar



Re: [dev] dwm

2011-05-07 Thread Anselm R Garbe
On 7 May 2011 20:21,   wrote:
> @Connor
>> Sorry, I don't understand -- why is Alt-Return insufficient?
> yes ok, this is a solution. but if i switch back via via Alt-Return
> the main-window gets ordered at first windows on the right side..
> so if i want it to be the bottom window on the right side (like it
> was before)...its like this old puzzle-game where you have to
> shuffle those stones until u have the pattern u have to build.
> but perhaps i find a patch for that :)

That doesn't sound you are using dwm as it is supposed to be used.
Having specific windows at certain positions in the stack sounds like
static window management to me.

BR,
Anselm



Re: [dev] dwm

2011-05-07 Thread M1kes
@kurt
> and I'm not trying to define 'dynamic window manager' in the general
> case. I'm explaining to you why your workflow is incompatible with
> dwm.
nope, if, at all, dwm is incompatible with my workflow ;)
> I can't make any of this make sense. If you want to reorder windows,
> there's mod1+return. If you want a different layout, you can patch
> that in. I suspect you're using five tags total and not
> simultaneously... in which case you're misusing dwm.
yes, yes, no
> this is not a problem. fix wmii. don't try to turn dwm into it.
yeah this would be a solution if wmii would be documented..which
is not really the case..sorry but there is nearly no documentation in it ;)
and i dont have time to re-engineer it. Switching my wm seems a
better sollution.


@Connor
> Sorry, I don't understand -- why is Alt-Return insufficient?
yes ok, this is a solution. but if i switch back via via Alt-Return
the main-window gets ordered at first windows on the right side..
so if i want it to be the bottom window on the right side (like it
was before)...its like this old puzzle-game where you have to
shuffle those stones until u have the pattern u have to build.
but perhaps i find a patch for that :)
___
Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://produkte.web.de/go/toolbar



Re: [dev] dwm

2011-05-07 Thread Suraj Kurapati
On Sat, May 7, 2011 at 7:43 AM,   wrote:
> i like wmii :)  but it seems to become more and more unmaintained

Kris is still around, but very busy it seems.  I would guess that he
will have enough free time & motivation to work on wmii this summer.

> and there are some minor issues which are bothersome

Please report these minor issues on the issue tracker:
http://code.google.com/p/wmii/issues/list

> it seems there are more suitable wm out there which are like wmii.

ArchLinux maintains a comparison table of tiling WMs here:
https://wiki.archlinux.org/index.php/Comparison_of_Tiling_Window_Managers



Re: [dev] dwm

2011-05-07 Thread Kurt H Maier
On Sat, May 7, 2011 at 10:43 AM,   wrote:
> well..incorrect :) there is no public definition of a dyn. wm which
> says this features shouldn't be present..so if i'm saying "this
> feature should be present" to make it a usable dyn. this is my
> opinion :)

and I'm not trying to define 'dynamic window manager' in the general
case.  I'm explaining to you why your workflow is incompatible with
dwm.

> i'm not just using 1 tab, in average i'm using 5 tabs
> and there are situations where i want a 3rd smaller terminal
> in a tag displayed in the bigger column constantly and not just
> by maximising it (where i cant see the other 2 windows) or
> setting it to a different tag. in dwm i have would have to think
> about "which terminal to use for which purpose and how much
> space do i need" because there is no way to change de ordering
> of terminals in a tag an easy way or just maximise a window by
> "stacking".

I can't make any of this make sense.  If you want to reorder windows,
there's mod1+return.  If you want a different layout, you can patch
that in.  I suspect you're using five tags total and not
simultaneously... in which case you're misusing dwm.

>
> @Anders
> the problem is i like wmii :)

this is not a problem.  fix wmii.  don't try to turn dwm into it.

-- 
# Kurt H Maier



Re: [dev] dwm

2011-05-07 Thread Connor Lane Smith
Hey,

On 7 May 2011 15:43,   wrote:
> in dwm i have would have to think
> about "which terminal to use for which purpose and how much
> space do i need" because there is no way to change de ordering
> of terminals in a tag an easy way or just maximise a window by
> "stacking".

Sorry, I don't understand -- why is Alt-Return insufficient?

cls



Re: [dev] dwm

2011-05-07 Thread M1kes
@Kurt
well..incorrect :) there is no public definition of a dyn. wm which
says this features shouldn't be present..so if i'm saying "this
feature should be present" to make it a usable dyn. this is my
opinion :) i'm not just using 1 tab, in average i'm using 5 tabs
and there are situations where i want a 3rd smaller terminal
in a tag displayed in the bigger column constantly and not just
by maximising it (where i cant see the other 2 windows) or
setting it to a different tag. in dwm i have would have to think
about "which terminal to use for which purpose and how much
space do i need" because there is no way to change de ordering
of terminals in a tag an easy way or just maximise a window by
"stacking".

@Anders
the problem is i like wmii :)  but it seems to become more and
more unmaintained and there are some minor issues which are
bothersome..so i need an replacement. (on gentoo there
isn't a stable "unkeyworded" version for years now.) One of the
most similar wm to wmii is dwm, but it seems there are more
suitable wm out there which are like wmii.
Sorry for the ads..i cant remove them..i'm just looking for a new
freemail-provider :)

>On Fri, May 6, 2011 at 2:50 PM,  wrote:
>> hi!
>>
>> there are a lot of important things from wmii which cant be found in dwm 
>> anymore..
>> for example the stacked/maximised-mode or the ability to change the 
>> positions of
>> frames in a tag via Alt+Shift+[h/j/k/l]. I was thinking about to change to 
>> dwm but
>> without this main-features the dayly use of a wm is much more tedious.
>> ___
>> Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
>> Toolbar eingebaut! http://produkte.web.de/go/toolbar
>
>So keep using wmii, what's wrong with it? Why change if you expect the
>new software to be the same as the old?
>
>And what's with the german ads?
>
___
Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://produkte.web.de/go/toolbar



Re: [dev] [ANN] sabotage 2011-04-30, a musl+busybox based distribution

2011-05-07 Thread Abner
> I would love to see a simple and fast image uncompressing library with a
> standard API for all them. if we just add support for compressing we can
> write simple tools to convert between file formats and change background
> images or write a nicer slock.
>
> and im sure jpg+png+gif can fit in less than 2000 LOC.

stb_image is a public domain image decompressor that can read jpeg and
png (and others) without zlib dependency, but it's 3800 LOC:

http://mollyrocket.com/forums/viewtopic.php?t=315&postdays=0&postorder=asc&start=0&sid=fdc9000f19f612ac5d8ae66e939c0390



Re: [dev] dwm

2011-05-07 Thread v4hn
On Fri, May 06, 2011 at 03:33:51PM +0200, Petr Sabata wrote:
> On Fri, May 06, 2011 at 03:26:11PM +0200, m1...@web.de wrote:
> > [huge pile of crap]
> 
> Oh that hurts...

You did _not_ try to read this, did ya?

Anselm wrote:
> I'm looking into mlmmj to let html mails bounce.

Would be great to see this working, thanks!


v4hn


pgpYWrPMT4Gr7.pgp
Description: PGP signature