Re: [dev] run a program and display on a specific tab

2011-06-06 Thread Erik Hahn
On Mon, Jun 06, 2011 at 11:20:29AM +0100, Piotr Zalewa wrote:
 Hi,
 
 I want to create a script which will load my default setup (quite a
 few programs).
 
 How to run a program so it will be displayed on a desired tab?
 (view, workspace - I always had a problem with that lingo)

In wmii, you can either use wihack or create some tag rules in wmiirc.



Re: [dev] [PATCH] [lsw] Create manpage directory if it's not there

2011-06-06 Thread Connor Lane Smith
Hey,

On 6 June 2011 09:35, Petr Sabata con...@redhat.com wrote:
 This is self-explanatory...

Applied, thanks.

Connor



Re: [dev] [PATCH] [lsw] Create manpage directory if it's not there

2011-06-06 Thread Petr Sabata
On Mon, Jun 06, 2011 at 12:52:32PM +0100, Connor Lane Smith wrote:
 Hey,
 
 On 6 June 2011 09:35, Petr Sabata con...@redhat.com wrote:
  This is self-explanatory...
 
 Applied, thanks.

Awesome.

While you're updating those small tools, any chance of getting this in?
http://lists.suckless.org/dev/1105/8047.html

Thanks.

-- 
# Petr Sabata


pgpEaYQ6stinM.pgp
Description: PGP signature


Re: [dev] run a program and display on a specific tab

2011-06-06 Thread Piotr Zalewa

On 06/06/11 11:40, ilf wrote:

On 06-06 11:20, Piotr Zalewa wrote:

I want to create a script which will load my default setup (quite a
few programs).


I use .xinitrc for this.


I don't want to do it every time


How to run a program so it will be displayed on a desired tab? (view,
workspace - I always had a problem with that lingo)


I assign programs to tags in config.h.


It's more complicated as xterms are on many tags



Re: [dev] [PATCH] [lsw] Create manpage directory if it's not there

2011-06-06 Thread Ethan Grammatikidis
On Mon,  6 Jun 2011 10:35:56 +0200
Petr Sabata con...@redhat.com wrote:

 + @mkdir -p ${DESTDIR}${MANPREFIX}/man1

This is the sort of thing which has people symlinking man - share/man or vice 
versa. 



Re: [dev] run a program and display on a specific tab

2011-06-06 Thread Alex Bradbury
2011/6/6 Piotr Zalewa zal...@gmail.com:
 Hi,

 I want to create a script which will load my default setup (quite a few
 programs).

 How to run a program so it will be displayed on a desired tab? (view,
 workspace - I always had a problem with that lingo)

I have used xdotool for this. I've been lazy and just put arbitrary
sleeps between launching programs though, when really I should be
waiting until a window with the appropriate name or class appears.

Alex



Re: [dev] run a program and display on a specific tab

2011-06-06 Thread Piotr Zalewa

On 06/06/11 15:41, Connor Lane Smith wrote:

Hey,

2011/6/6 Piotr Zalewazal...@gmail.com:

How to run a program so it will be displayed on a desired tab? (view,
workspace - I always had a problem with that lingo)


So are we talking about wmii or dwm or what?


wmii

zalun



Re: [dev] run a program and display on a specific tab

2011-06-06 Thread Kurt H Maier
On Mon, Jun 6, 2011 at 11:52 AM, Piotr Zalewa zal...@gmail.com wrote:
 wmii


The problem has become insoluble.  Even locating all possible
solutions is NP-hard.


-- 
# Kurt H Maier



Re: [dev] Suckless Smartphone?

2011-06-06 Thread Andrew Hills
On Mon, Jun 6, 2011 at 12:20 PM, Guilherme Lino guih.l...@gmail.com wrote:
 whene you dont have your pc, read a book.. i think thats the most suckless
 way

No, not really...

--Andrew Hills



Re: [dev] Suckless Smartphone?

2011-06-06 Thread Guilherme Lino
a book about plan9?

--
Guilherme Lino


On Mon, Jun 6, 2011 at 5:23 PM, Andrew Hills hills...@gmail.com wrote:

 On Mon, Jun 6, 2011 at 12:20 PM, Guilherme Lino guih.l...@gmail.com
 wrote:
  whene you dont have your pc, read a book.. i think thats the most
 suckless
  way

 No, not really...

 --Andrew Hills




Re: [dev] Suckless Smartphone?

2011-06-06 Thread Dieter Plaetinck
non-electronic books suck because you can't easily search in, or
copypaste from them.

maybe you need a tablet or one of those ebook readers.

Dieter

On Mon, 6 Jun 2011 17:42:29 +0100
Guilherme Lino guih.l...@gmail.com wrote:

 a book about plan9?
 
 --
 Guilherme Lino
 
 
 On Mon, Jun 6, 2011 at 5:23 PM, Andrew Hills hills...@gmail.com
 wrote:
 
  On Mon, Jun 6, 2011 at 12:20 PM, Guilherme Lino
  guih.l...@gmail.com wrote:
   whene you dont have your pc, read a book.. i think thats the most
  suckless
   way
 
  No, not really...
 
  --Andrew Hills
 
 




Re: [dev] Suckless Smartphone?

2011-06-06 Thread Lorenzo Bolla
On Mon, Jun 6, 2011 at 5:20 PM, Guilherme Lino guih.l...@gmail.com wrote:

 i would recomend a cheap phone, that make calls and sends smSs..

 whene you dont have your pc, read a book.. i think thats the most suckless
 way


Amen.



 --
 Guilherme Lino







Re: [dev] [PATCH] [lsw] Create manpage directory if it's not there

2011-06-06 Thread Petr Sabata
On Mon, Jun 06, 2011 at 04:36:24PM +0100, Ethan Grammatikidis wrote:
 On Mon,  6 Jun 2011 10:35:56 +0200
 Petr Sabata con...@redhat.com wrote:
 
  +   @mkdir -p ${DESTDIR}${MANPREFIX}/man1
 
 This is the sort of thing which has people symlinking man - share/man or 
 vice versa. 
 

I really don't see how that could possibly apply to this situation.

-- 
# Petr Sabata


pgpxx4DszyoVO.pgp
Description: PGP signature


Re: [dev] Suckless Smartphone?

2011-06-06 Thread garbeam
On 6 June 2011 17:45, Dieter Plaetinck die...@plaetinck.be wrote:
 non-electronic books suck because you can't easily search in, or
 copypaste from them.

Let's talk again in 40 years if you can still read your ebooks by then :)
I stay loyal to real books.

--garbeam



[dev] Best way to serialize data

2011-06-06 Thread Džen

I was wondering about which way would be the easiest/simplest to
serialize data, f.e. being read via a file or stdin (data being a
table of x rows and y columns, each cell a string). I thought of
using NULL bytes as cell delimiters and newline characters as row
delimiters. This way it wouldn't be possible to use \0 nor \n
inside the cells, but I couldn't think of a simpler solution.

Something like:
a \0 b \0 c \n
d \0 e \0 f \n
...

What would you recommend? How'd you do it?

Reason why I'm asking is because I was wondering how a dmenu-alike
utility would read data, where each items has multiple values, not
just one. Kinda like a search utility for table-structured data.

--
Džen



Re: [dev] Suckless Smartphone?

2011-06-06 Thread pancake

I do, but only in phone, laptop/desktop/ebook screens sucks for reading.

On 06/06/11 19:24, Guilherme Lino wrote:

electronic books suck because you dont actually read them

--
Guilherme Lino


On Mon, Jun 6, 2011 at 5:45 PM, Dieter Plaetinck die...@plaetinck.be 
mailto:die...@plaetinck.be wrote:


non-electronic books suck because you can't easily search in, or
copypaste from them.






Re: [dev] Suckless Smartphone?

2011-06-06 Thread Dieter Plaetinck
that's only because i have no ebook reader yet.
because they all suck.


On Mon, 6 Jun 2011 18:24:16 +0100
Guilherme Lino guih.l...@gmail.com wrote:

 electronic books suck because you dont actually read them
 
 --
 Guilherme Lino
 
 
 On Mon, Jun 6, 2011 at 5:45 PM, Dieter Plaetinck
 die...@plaetinck.bewrote:
 
  non-electronic books suck because you can't easily search in, or
  copypaste from them.
 
 




Re: [dev] Best way to serialize data

2011-06-06 Thread Dieter Plaetinck
On Mon, 06 Jun 2011 19:19:56 +0200
Džen yvl...@gmail.com wrote:

 I was wondering about which way would be the easiest/simplest to
 serialize data, f.e. being read via a file or stdin (data being a
 table of x rows and y columns, each cell a string). I thought of
 using NULL bytes as cell delimiters and newline characters as row
 delimiters. This way it wouldn't be possible to use \0 nor \n
 inside the cells, but I couldn't think of a simpler solution.
 
 Something like:
 a \0 b \0 c \n
 d \0 e \0 f \n
 ...
 
 What would you recommend? How'd you do it?
 
 Reason why I'm asking is because I was wondering how a dmenu-alike
 utility would read data, where each items has multiple values, not
 just one. Kinda like a search utility for table-structured data.
 

the alternative is using implicit boundaries (i.e. hardcoding field
lengths). you gain simplicity for the expense of space consumption.

you could look how databases like mysql, berkelydb or sqlite store
their tables on disk.  these things are quite well thought-through.

Dieter 



Re: [dev] Suckless Smartphone?

2011-06-06 Thread Dieter Plaetinck
I agree with that. phone screens are the least sucky to read ebooks on.

Dieter

On Mon, 06 Jun 2011 19:34:20 +0200
pancake panc...@youterm.com wrote:

 I do, but only in phone, laptop/desktop/ebook screens sucks for
 reading.
 
 On 06/06/11 19:24, Guilherme Lino wrote:
  electronic books suck because you dont actually read them
 
  --
  Guilherme Lino
 
 
  On Mon, Jun 6, 2011 at 5:45 PM, Dieter Plaetinck
  die...@plaetinck.be mailto:die...@plaetinck.be wrote:
 
  non-electronic books suck because you can't easily search in, or
  copypaste from them.
 
 
 




Re: [dev] Best way to serialize data

2011-06-06 Thread Douglas S. Bregolin
In the ASCII table there's a record separator character (0x1E). At
least I think is better than using '\0'.

On Mon, Jun 6, 2011 at 2:19 PM, Džen yvl...@gmail.com wrote:
 I was wondering about which way would be the easiest/simplest to
 serialize data, f.e. being read via a file or stdin (data being a
 table of x rows and y columns, each cell a string). I thought of
 using NULL bytes as cell delimiters and newline characters as row
 delimiters. This way it wouldn't be possible to use \0 nor \n
 inside the cells, but I couldn't think of a simpler solution.

 Something like:
 a \0 b \0 c \n
 d \0 e \0 f \n
 ...

 What would you recommend? How'd you do it?

 Reason why I'm asking is because I was wondering how a dmenu-alike
 utility would read data, where each items has multiple values, not
 just one. Kinda like a search utility for table-structured data.

 --
 Džen





Re: [dev] Suckless Smartphone?

2011-06-06 Thread pancake
i mostly do this when i'm at bed (before waking up and when going to 
sleep), the phone/pda/itt/...
screen size is the best one for this situation, and it's usually more 
comfortable than any other
gadget, it brights on the dark, it's small and you can manage it with 
just one finger without pain.


ebooks are fine for long travels because you dont have to care about the 
battery.. but for most
of common travels I prefer to use a laptop to code stuff. else i find 
myself inproductive.


When I bought an ebook 3 years ago it was great.(sony prs505).. but i 
got tired of it because
most reads i do are slides (which display slow and wrong there) and 
short papers, which I can
read in my laptop or phone in a much easier way than having to transfer 
it to the ebook via usb.


Now it's just another abandoned gadget in my drawer. Together with an 
OpenMoko phone, an n900,
a Dingoo and other stuff I just enjoyed for a short time till I realized 
they sucked... well.. Dingoo is

probably the best buy I did in my life.. but that's another story..

On 06/06/11 19:34, Dieter Plaetinck wrote:

I agree with that. phone screens are the least sucky to read ebooks on.

Dieter

On Mon, 06 Jun 2011 19:34:20 +0200
pancakepanc...@youterm.com  wrote:


I do, but only in phone, laptop/desktop/ebook screens sucks for
reading.

On 06/06/11 19:24, Guilherme Lino wrote:

electronic books suck because you dont actually read them

--
Guilherme Lino


On Mon, Jun 6, 2011 at 5:45 PM, Dieter Plaetinck
die...@plaetinck.bemailto:die...@plaetinck.be  wrote:

 non-electronic books suck because you can't easily search in, or
 copypaste from them.










Re: [dev] Best way to serialize data

2011-06-06 Thread Džen

On 06/06/2011 19:36, Douglas S. Bregolin wrote:

In the ASCII table there's a record separator character (0x1E). At
least I think is better than using '\0'.


On 06/06/2011 19:42, Christoph Lohmann wrote:

then why wasn't \x1C-\x1F used before for a data exchange format?


To be honest, I've never really cared to look up the use of these
characters, although knowing they were there. It seems to be what
I've been looking for.


I don't think we are the first to discover them in the ASCII
table. It would be quiet neat for a simpler XML replacement.


I guess that control characters in general are disliked, because
people seem to overlook these bytes when using crippled text editors.

--
Džen



Re: [dev] Best way to serialize data

2011-06-06 Thread Connor Lane Smith
Hey,

On 6 June 2011 18:19, Džen yvl...@gmail.com wrote:
 I was wondering about which way would be the easiest/simplest to
 serialize data, f.e. being read via a file or stdin (data being a
 table of x rows and y columns, each cell a string). I thought of
 using NULL bytes as cell delimiters and newline characters as row
 delimiters. This way it wouldn't be possible to use \0 nor \n
 inside the cells, but I couldn't think of a simpler solution.

It ultimately depends on the use case. If you don't need \0 or \n in
cells, your format is fine. If not, there are two approaches:

As Dieter suggested, you can use fixed length fields. This is great if
you have a maximum cell width, especially if this length is small or
most fields use most of the space. This approach is used in, for
example, tarballs' filename fields.

However, if the cells dramatically vary in length, and the maximum is
rather large, a better alternative is to use length-prefixing, using a
number of bytes according to how large you expect your rows and cells
to be:

0x000d 0x0006 hello\0 0x0007 world!\0

That is, 2-byte row length followed by two cells each with a 2-byte
cell length (and I've null-terminated the strings in the example). You
may need 4 or 8 bytes if your data is very long. The benefit of this
is that you can check the row length and jump straight to the next
row, or carry on into the row and iterate its cells. It is also
completely independent of content: you can store anything.

The problem with using ASCII values is you can't store binary data,
and you have to check each cell's content and everything. It's a
hassle; using length-prefixing is way easier.

(This approach is very often used in binary protocols, such as 9P and Sam.)

Thanks,
cls



Re: [dev] Best way to serialize data

2011-06-06 Thread Connor Lane Smith
On 6 June 2011 19:22, Connor Lane Smith c...@lubutu.com wrote:
 0x000d 0x0006 hello\0 0x0007 world!\0

I made a mistake here, I meant to say...

0x0011 0x0006 hello\0 0x0007 world!\0

... including two 2-byte cell widths in the row width.



Re: [dev] run a program and display on a specific tab

2011-06-06 Thread Benoit T
hello,

if you were referring to dwm rather than wmii...

On Mon, Jun 06, 2011 at 02:49:57PM +0100, Piotr Zalewa wrote:
 I want to create a script which will load my default setup (quite a
 few programs).
 
 I use .xinitrc for this.

... or .xsession

 I don't want to do it every time

then create a script that launches your programs and launch that script
from an xterm, dmenu or a shortcut in your dwm.h

 How to run a program so it will be displayed on a desired tab? (view,
 workspace - I always had a problem with that lingo)
 
 I assign programs to tags in config.h.
 
 It's more complicated as xterms are on many tags

it is still the right way to do what you ask for with dwm and anyway
it's the only way at least with a stock dwm.

as others suggested, you can match on several properties in rules[] in
config.h and they are not difficult to set from the command line for
your xterms.

one annoyance with the whole dwm concept is that you have to restart dwm
to try new rules, since you need to recompile.

with attached respawn.patch patch, you won't need to exit your X
session, rather dwm will respawn over itself - but with the new version
of itself as found on disk. of course if the new version crashes your X
session will terminate and if it does not work somehow, you may have to
forcibly terminate it, but if your changes are sane, you will be fine,
and anyway, hey, you have to try out the new build at some point (one
alternative being to try the new build in a nested X server such as
xephyr+xoo).

if you are interested in the respawn patch, then you will find that when
dwm starts in lieu of any other WM, including itself, all clients for
which there is no rule move to the 1st tag.

attached remember_tags.patch will solve that problem by recording tags
in an xprop for each X client, which is remembered through dwm restarts.

note: these are patches from a mercurial queue over my dwm repo, not
revisions against the dwm repo itself. apply them as unversioned diffs
or import them into your own mercurial queue and then hg qpush them.

most likely you found out that you don't want to install to /usr/bin/dwm
nor /usr/local/bin/dwm everytime you edit your config.h so you probably
have your own makefile variant that will install to ~/bin or something.
if you don't, well, i have a patch for that but it's a bit convoluted
due to supporting install over the same home directory for multiple
machines with different architectures, so i am not providing _that_ part
of my patch queue at this time.

cheers

-- 
Benoit Triquet benoit.triquet at gmail.com
 .''`.
: :' :  We are debian.org. Lower your prices, surrender your code.
`. `'   We will add your hardware and software distinctiveness to
  `-our own. Resistance is futile.
diff -r c19e2f20ca69 config.def.h
--- a/config.def.h	Thu Oct 29 15:39:12 2009 +0100
+++ b/config.def.h	Thu Oct 29 15:43:42 2009 +0100
@@ -80,7 +80,8 @@
 	TAGKEYS(XK_7,  6)
 	TAGKEYS(XK_8,  7)
 	TAGKEYS(XK_9,  8)
-	{ MODKEY|ShiftMask, XK_q,  quit,   {0} },
+	{ MODKEY|ShiftMask|ControlMask, XK_q,  quit,   {.i = 0 } },
+	{ MODKEY|ShiftMask, XK_q,  quit,   {.i = 1 } },
 };
 
 /* button definitions */
diff -r c19e2f20ca69 dwm.c
--- a/dwm.c	Thu Oct 29 15:39:12 2009 +0100
+++ b/dwm.c	Thu Oct 29 15:43:42 2009 +0100
@@ -270,6 +270,7 @@
 static Monitor *mons = NULL, *selmon = NULL;
 static Window root;
+static char **args;
 
 /* configuration, allows nested code to access above variables */
 #include config.h
 
@@ -1292,6 +1293,8 @@
 
 void
 quit(const Arg *arg) {
+	if(arg-i)	/* restart dwm, if fails just fall through and exit */
+		execv(args[0], args);
 	running = False;
 }
 
@@ -2008,6 +2011,7 @@
 		fputs(warning: no locale support\n, stderr);
 	if(!(dpy = XOpenDisplay(NULL)))
 		die(dwm: cannot open display\n);
+	args = argv;
 	checkotherwm();
 	setup();
 	scan();
# HG changeset patch
# Parent 3b5f9910413a84c53905b237e5fbf0728bb1081c

diff -r 3b5f9910413a dwm.c
--- a/dwm.c	Wed Oct 27 15:43:16 2010 +0200
+++ b/dwm.c	Wed Oct 27 15:46:10 2010 +0200
@@ -275,6 +275,7 @@
 static Monitor *mons = NULL, *selmon = NULL;
 static Window root;
 static char **args;
+static Atom dwmatom_tags;
 
 /* configuration, allows nested code to access above variables */
 #include config.h
@@ -1104,8 +1105,15 @@
 		c-tags = t-tags;
 	}
 	else {
+		Atom atom; int format; unsigned long n, extra; unsigned int *ptags;
 		c-mon = selmon;
-		applyrules(c);
+		if(XGetWindowProperty(dpy, w, dwmatom_tags, 0L, 1L, False, XA_CARDINAL,
+		  atom, format, n, extra, (unsigned char **)ptags)==Success  n==1  *ptags!=0)
+			c-tags = *ptags; /* override rule tags with memorized tags */
+		else {
+			applyrules(c);
+			XChangeProperty(dpy, w, dwmatom_tags, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)c-tags, 1);
+		}
 	}
 	/* geometry */
 	c-x 

Re: [dev] Suckless Smartphone?

2011-06-06 Thread Connor Lane Smith
Hey,

On 6 June 2011 19:25, David Tweed david.tw...@gmail.com wrote:
 (In general, I'm always a bit surprised how it seems to be perceived
 to be suckless to proscribe the user-level tasks that are allowed. How
 those are implemented yes, but saying that classes of activity are not
 acceptable?)

Only trolls; I hope.

In terms of phones, I'm waiting for the death of SMS and cellular
voice chat. I'd rather SIP, or something similar. Cells should be just
a gateway to the Internet.

Smartphones are invaluable for quick information retrieval from the
web web web, mail, and so on. I occasionally use mine for SSH, but it
is not optimal.

(I would love a hacked Kindle able to act as an e-paper tty.)

In terms of books... I can't stand anything but good old dead tree
format. I spend enough of my day staring into a screen, I'd like some
time along with the printed page.

Thanks,
cls



Re: [dev] Best way to serialize data

2011-06-06 Thread Džen

Pretty much answers my question. In my use case it'd be easier to use
delimiters like \0 or \n, due to the data not being binary. However now
I wonder, which method would need more cpu time? I suppose that when
using delimiters there isn't a easier way than using fgetc(), reading
through the whole data stream. Hard-coded field lengths would be faster
if the fields contain a lot of characters I guess.

On 06/06/2011 20:22, Connor Lane Smith wrote:

It ultimately depends on the use case. If you don't need \0 or \n in
cells, your format is fine. If not, there are two approaches:

As Dieter suggested, you can use fixed length fields. This is great if
you have a maximum cell width, especially if this length is small or
most fields use most of the space. This approach is used in, for
example, tarballs' filename fields.

However, if the cells dramatically vary in length, and the maximum is
rather large, a better alternative is to use length-prefixing, using a
number of bytes according to how large you expect your rows and cells
to be:

0x000d 0x0006 hello\0 0x0007 world!\0

That is, 2-byte row length followed by two cells each with a 2-byte
cell length (and I've null-terminated the strings in the example). You
may need 4 or 8 bytes if your data is very long. The benefit of this
is that you can check the row length and jump straight to the next
row, or carry on into the row and iterate its cells. It is also
completely independent of content: you can store anything.

The problem with using ASCII values is you can't store binary data,
and you have to check each cell's content and everything. It's a
hassle; using length-prefixing is way easier.

(This approach is very often used in binary protocols, such as 9P and Sam.)


--
Džen



Re: [dev] Best way to serialize data

2011-06-06 Thread Connor Lane Smith
On 6 June 2011 20:07, Džen yvl...@gmail.com wrote:
 I wonder, which method would need more cpu time? I suppose that when
 using delimiters there isn't a easier way than using fgetc(), reading
 through the whole data stream. Hard-coded field lengths would be faster
 if the fields contain a lot of characters I guess.

Again, it's about the use case. For small fields you probably don't
have to worry about reading inefficiencies, so use delimiters. For
large fields use fixed-length or length-prefixed, for the reasons I
mentioned. These two approaches are both easy to write, one is just
faster to seek to the nth item, and the other is more compact,
respectively.

cls



Re: [dev] Patch for dmenu_path - pass -maxdepth 1 to find(1)

2011-06-06 Thread Connor Lane Smith
Hey,

On 6 June 2011 22:10, Troels Henriksen at...@sigkill.dk wrote:
 If . is part of your PATH (leaving aside questions of whether this is a
 good idea), dmenu_path can be very slow, as it searches the entire tree
 from the working directory for binaries, despite the fact that only
 those immediately in the directory matter.  The following patch passes
 -maxdepth 1 to the find(1) invocations, such that the search is no
 deeper than actually needed to reflect the state of the PATH.

Unfortunately the -maxdepth is unportable, so it isn't a possible
solution for mainline. It is a problem though, although . in $PATH
*is* completely broken. A solution, I suppose, could be to bundle
lsx(1) and patch dmenu_path accordingly... Not sure how I feel about
that. But does lsx even have a repo of its own?

Thanks,
cls



Re: [dev] [PATCH] [lsw] Create manpage directory if it's not there

2011-06-06 Thread Connor Lane Smith
On 6 June 2011 14:05, Petr Sabata con...@redhat.com wrote:
 While you're updating those small tools, any chance of getting this in?
 http://lists.suckless.org/dev/1105/8047.html

As I just discovered, lsx doesn't appear to have its own repo. I'm
unsure why. But no, I apparently can't. ;)

cls



Re: [dev] run a program and display on a specific tab

2011-06-06 Thread Ruben Gonzalez Arnau

On 06/06/11 12:20, Piotr Zalewa wrote:

Hi,

I want to create a script which will load my default setup (quite a few
programs).

How to run a program so it will be displayed on a desired tab? (view,
workspace - I always had a problem with that lingo)

thanks,
zalun



Assuming you are using sh version of wmii. (= 3.9.2)

${HOME}/.wmii/wmiirc_local

wmiir write /tagrules !
/regex app/  - tag
/XTerm/ - sel
/Firefox/  - 9
/Xmms/ - music
etc
!

sel is current tag
you can use letters www or numbers 1 for your custom apps tags.

Hope it helps.

--
r...@sdf.lonestar.org



Re: [dev] PATCH for/back navigation with xprop

2011-06-06 Thread Ethan Grammatikidis
On Fri, 3 Jun 2011 23:16:49 +
Bjartur Thorlacius svartma...@gmail.com wrote:

 It's just that I believe spawning processes and creating windows
 should be dirt cheap operations. Optimally, almost nothing should be
 done in those functions.

With Gtk+ 2.OMGWANTMOARBLOAT invading computers everywhere, your belief is most 
understandable! Seriously though, adding a single extra string match isn't 
going to make much difference, nothing like whatever Gtk+ 2 does. I wouldn't be 
surprised if the entire window-matching list of a large FVWM config fit in 1 
page of virtual memory, and the window manager as a whole was designed to use 
little memory. For a long time it used much less than TWM. As I said it ran 
smoothly on an 8MB 486.

I'm a little bit.. scared of perfectly decent things being cut out in the name 
of sucklessness to be honest. Years ago I had the most terribly fancy themes 
for Gtk+ 1.x on a 333MHz AMD K6/2. Scaled textures absolutely everywhere on a 
crap CPU with unaccelerated graphics came at a barely noticeable cost in 
startup time; nothing I could detect without a back-to-back comparison. What 
I'm trying to say is you can do extremely crazy stuff without adding a 
noticeable delay to creating a window. 

I don't know what Gtk+ 2 does to make my netbook swap for 3 full seconds before 
opening a menu. Whatever it does must stem from some seriously diseased design.



Re: [dev] Suckless Smartphone?

2011-06-06 Thread Suraj N. Kurapati
On Mon 06 Jun 2011 06:16:22 PM PDT, garbeam wrote:
 On 6 June 2011 17:45, Dieter Plaetinck wrote:
  non-electronic books suck because you can't easily search in, or
  copypaste from them.

 Let's talk again in 40 years if you can still read your ebooks by
 then :) I stay loyal to real books.

+1  I underline, write notes, and mark-up passages, and attach
little sticky flags as bookmarks in my books.  That wouldn't be
easy to do in a portable and suckless fashion in electronic books.

-- 
Another megabytes the dust.


signature.asc
Description: PGP signature


Re: [dev] [PATCH] [lsw] Create manpage directory if it's not there

2011-06-06 Thread Ethan Grammatikidis
On Mon, 6 Jun 2011 18:42:20 +0200
Petr Sabata con...@redhat.com wrote:

 On Mon, Jun 06, 2011 at 04:36:24PM +0100, Ethan Grammatikidis wrote:
  On Mon,  6 Jun 2011 10:35:56 +0200
  Petr Sabata con...@redhat.com wrote:
  
   + @mkdir -p ${DESTDIR}${MANPREFIX}/man1
  
  This is the sort of thing which has people symlinking man - share/man or 
  vice versa. 
  
 
 I really don't see how that could possibly apply to this situation.

the -p option creates leading dirs. meh.



Re: [dev] Best way to serialize data

2011-06-06 Thread hiro
 Reason why I'm asking is because I was wondering how a dmenu-alike
 utility would read data, where each items has multiple values, not
 just one. Kinda like a search utility for table-structured data.

Interesting, you seem to be on the right track.



Re: [dev] run a program and display on a specific tab

2011-06-06 Thread hiro
 The problem has become insoluble.  Even locating all possible
 solutions is NP-hard.

I don't get it.