Re: [dev] [dwm] can't toggle tags with mouse

2010-05-27 Thread Anselm R Garbe
Hi Robert,

On Wed, May 26, 2010 at 09:32:21PM +0200, orsch...@googlemail.com wrote:
> I'm looking for a possibility to display the used layout (in my case
> either de or pl) via xsetroot in the statusbar of dwm.
> 
> Do you have any idea how to achieve that?

You could add a one-liner in setlayout() to output the layout character to
stdout and redirect that to some file that your status script is reading in.

However I can't see the point why you'd want that? Getting rid of the bar
altogether?

Cheers,
Anselm



Re: [dev] Fullscreen issue & EWMH

2010-05-27 Thread Anselm R Garbe
On Thu, May 27, 2010 at 07:21:39AM +0200, Sylvain Laurent wrote:
> I recently switched from Firefox to Chrome and surprisingly Chrome
> weren't able to switch to full screen because of the way GTK handles
> full screen.
> 
> So, here is a patch that can be integrated or provided as an auxiliary
> patch that makes dwm support the _NET_WM_STATE_FULLSCREEN atom.

I'll apply this to mainstream dwm since it fixes the flash fullscreen issue
apparently.

I went extremely busy for the past 2 months and didn't continue with my flash
fullscreen investigation a I started in April. I still think there must be a
non-EWMH solution to the problem and I will revise the current focus handling
very soon, 'cos my workload is back to normal now.

Cheers,
Anselm



Re: [dev] [dwm] System unusable after closing foobillard

2010-05-27 Thread pancake
Thats foobillard fault and x11.

I recoomend you to use xkill to close the window and dont play billard again.

- Original message -
> Hi,
>     I don't know if it's more a foobillard or a dwm problem but here on my
>     FreeBSD laptop, if I start foobillard (tiled) it runs fine but if I try
>     to close it the bar still has "foobillard" as the current window but the
>     window disappear and then the system is completely unusable.
>
>     In fact, I can move the mouse but it's so slow, I don't know if it's an
>     infinite loop I can't do anything ! Can't spawn term, can't go to the
>     ttys (that's weird a freeze like this).
>
>     I tried a sleep 20; pkill -9 foobillard in a other term after closing it
>     but it does not work neither.
>
>     The problem is that foobillard do not have WM_CLASS atom, so can't make
>     it start directly in floating mode.
>
>     Should I mail to the foobillard upstream too?
>
>     King regards.
> --
> Demelier David
>



Re: [dev] [dwm] can't toggle tags with mouse

2010-05-27 Thread orschiro
Oh dear how bad has my english to be since nobody is understanding me right. *g*

Well second approach. Currently I'm using the following code to
generate my statusbar:

#set statusbar
while true
do
   if acpi -a | grep off-line > /dev/null; then
   xsetroot -name "Bat. $( acpi -b | awk '{ print $4 " " $5 }' |
tr -d ',' ) | Vol. $(amixer get Master | tail -1 | awk '{ print $5}' |
tr -d '[]') | $(date +"%a, %b %d %R")"
   else
   xsetroot -name "Vol. $(amixer get Master | tail -1 | awk '{
print $5}' | tr -d '[]') | $(date +"%a, %b %d %R")"
   fi
   sleep 1s
done &

The point is now that I want to extend exactly this statusbar to
display the layout I'm using, so either 'de' or 'pl'.

So no, I don't want to get rid of it.

Please say you understand what I intend. :)

Regards

Robert

2010/5/27 Anselm R Garbe :
> Hi Robert,
>
> On Wed, May 26, 2010 at 09:32:21PM +0200, orsch...@googlemail.com wrote:
>> I'm looking for a possibility to display the used layout (in my case
>> either de or pl) via xsetroot in the statusbar of dwm.
>>
>> Do you have any idea how to achieve that?
>
> You could add a one-liner in setlayout() to output the layout character to
> stdout and redirect that to some file that your status script is reading in.
>
> However I can't see the point why you'd want that? Getting rid of the bar
> altogether?
>
> Cheers,
>        Anselm
>
>



Re: [dev] [dwm] can't toggle tags with mouse

2010-05-27 Thread Anselm R Garbe
On 27 May 2010 09:54,   wrote:
> Oh dear how bad has my english to be since nobody is understanding me right. 
> *g*
>
> Well second approach. Currently I'm using the following code to
> generate my statusbar:
>
> #set statusbar
> while true
> do
>   if acpi -a | grep off-line > /dev/null; then
>       xsetroot -name "Bat. $( acpi -b | awk '{ print $4 " " $5 }' |
> tr -d ',' ) | Vol. $(amixer get Master | tail -1 | awk '{ print $5}' |
> tr -d '[]') | $(date +"%a, %b %d %R")"
>   else
>       xsetroot -name "Vol. $(amixer get Master | tail -1 | awk '{
> print $5}' | tr -d '[]') | $(date +"%a, %b %d %R")"
>   fi
>   sleep 1s
> done &
>
> The point is now that I want to extend exactly this statusbar to
> display the layout I'm using, so either 'de' or 'pl'.
>
> So no, I don't want to get rid of it.
>
> Please say you understand what I intend. :)

Sorry I didn't read the full thread.

I guess

  setxkbmap -print

might provide you the info you need to grep to decide if its de or pl.

Cheers,
Anselm



Re: [dev] [dwm] can't toggle tags with mouse

2010-05-27 Thread Andreas Amann
> you may missunderstand my question.
> 
> I'm looking for a possibility to display the used layout (in my case
> either de or pl) via xsetroot in the statusbar of dwm.
> 
> Do you have any idea how to achieve that?
> 

I also do not know of a direct way to read out the current layout. But here
is an indirect one. If you use again something like 
setxkbmap -option "grp:alt_shift_toggle,grp_led:caps" "de,pl"

then you can do 
xset -q 
and you should see that "LED mask" changes (for me at least) from 
to 1001 as you change between de and pl layout. 
You can then use this fact to script up an appropriate line for xsetroot which
shows "de" or "pl" in your statusbar.


> By the way thanks for the improved version of your patch. I applied it
> and it's still working fine. :)

Nice to hear that it fixed your bug. Since nobody has reported it before, I
conclude that swapping keyboard layouts is uncommon among dwm users, and
probably it is not worth to propose this patch for mainline dwm?



Andreas



Re: [dev] [wmii] problem with wmiir xwrite /client/$client/ctl kill

2010-05-27 Thread Thomas Dean
I ran into the same problem today. The wmiirc script as well as all my
status bar scripts die frequently. All of them are run with dash.
Switching /bin/sh from dash to bash (and replacing dash with bash in
wmiirc) fixes the problem. It seems to be related to the latest update
of dash (0.5.5.1-5) in Debian.

One example is the attached script, which shows my mail count, and
shows ~/.fetchmaillog on a right click. Strangely, the script survives
multiple right clicks (the file is shown in multiple windows), but
dies as soon as one of those windows is closed, either via C-c, or via
Mod-Shift-c.

-

#!/bin/sh
# show email information in the status bar

# Configuration
delay=10
barname="8-mail"
maildir="$HOME/.Maildir"

# Functions
mailcount() {
echo -n `ls -l $@ | grep ^- | wc -l`
}

output() {
echo -n Mail `mailcount $maildir/new` `mailcount $maildir/.Lists*/new`
}

# Trigger event such that previous instances can quit
echo Start $barname | wmiir write /event

# Create bar with content
echo "$WMII_BARCOLORS" | wmiir create /rbar/$barname
wmiir xwrite /rbar/"$barname" `output`

# Event loop
{ wmiir read /event & childpid=$!
  while true; do
echo "$barname" `output` || { kill $childpid; exit; }
sleep $delay
  done &
} | while read event
do
set -f
set -- $event
set +f
type="$1"; shift
case "$type" in
# Exit if another instance starts up
Start)
if test "$1" = "$barname"; then
break
fi;;
# Write output to bar. If that fails, exit.
"$barname")
wmiir xwrite /rbar/$barname "$@" || exit;;
# React to clicks on our bar
RightBarClick)
if test "$2" = "$barname"; then
case "$1" in
1)
fetchmail &;;
3)
x-terminal-emulator -e tail -n 200 -f 
~/.fetchmaillog &;;
esac
fi;;
esac
done




Re: [dev] [surf] please recheck tip

2010-05-27 Thread Nibble
Hi,

I've been working a bit more on the patch and I think the new solution
is a quite better, now everything work as spected in the popup menu:
"save image as", "download linked file". And when you click a link if
it cannot be displayed in surf, a xterm with wget is launched.
Furthermore, this way we can remove all the AtomHiLight stuff. Also, it
saves 8 LOC :)

Kind regards,
-- nibble

On Wed, 26 May 2010 15:33:51 +0200
"Enno Boland (Gottox)"  wrote:

> The patch looks quite good. Applied. Thanks! :)
> 
> 2010/5/25 Nibble :
> > For the moment I've done a little patch (against tip) that fixes the
> > recently removed "wget download" feature, and also allows to
> > download files using the "Download linked file" entry in the popup
> > menu. It would be easy change the DOWNLOAD(p) macro to use another
> > download manager.
> >
> > Kind regards,
> > -- nibble
> >
> > On Tue, 25 May 2010 15:41:24 +0200
> > pancake  wrote:
> >
> >> On 05/25/10 15:24, Josh Rickmar wrote:
> >> > On Tue, May 25, 2010 at 11:36:28AM +0200, Claudio M. Alessi
> >> > wrote:
> >> >
> >> >> On Mon, May 24, 2010 at 04:06:00PM -0400, Josh Rickmar wrote:
> >> >>
> >> >>> Also, is there a better way of doing cookies then wget?  As an
> >> >>> (Open)BSD user, I'd like to use something in base (I did
> >> >>> install wget though to test to make sure that wasn't the
> >> >>> download problem above).
> >> >> IIRC you can use ftp(1) for HTTP requests.
> >> >>
> >> > Thanks, I knew about (and use) ftp(1), but didn't think it would
> >> > work with cookies.  However, after checking the manpage, I see
> >> > that it does support them with the -c flag.
> >> >
> >> >
> >> Why dont distribute a shellscript that gets URL+cookie as
> >> arguments, and let the users implement their own methods like
> >> using wget, ftp, curl, firefox* or whatever
> >>
> >> * = yeah, using surf for browsing and firefox for download is the
> >> most retarded idea i can think of xD.. but surely..opening xterm
> >> or having a way to display all wgets in a single xterm would be
> >> good (dvtm?)
> >>
> >> Having a suckless download manager can be good. just few locs in
> >> sh.
> >>
> >> --pancake
> >>
> >
> >
> 

diff -r 0d80b4349484 config.def.h
--- a/config.def.h	Wed May 26 15:34:09 2010 +0200
+++ b/config.def.h	Thu May 27 12:01:35 2010 +0200
@@ -12,15 +12,13 @@
 	"prop=\"`xprop -id $2 $0 | cut -d '\"' -f 2 | dmenu`\" &&" \
 	"xprop -id $2 -f $1 8s -set $1 \"$prop\"", \
 	p, q, winid, NULL } }
-#define DOWNLOAD(p)   { \
+#define DOWNLOAD(d) { \
 	.v = (char *[]){ "/bin/sh", "-c", \
-	"prop=\"`xprop -id $1 $0 | cut -d '\"' -f 2`\";" \
-	"xterm -e \"wget --load-cookies ~/.surf/cookies.txt $prop;\"", \
-	p, winid, NULL } }
+	"xterm -e \"wget --load-cookies ~/.surf/cookies.txt $0;\"", \
+	d, NULL } }
 #define MODKEY GDK_CONTROL_MASK
 static Key keys[] = {
 /* modifier	keyval  functionarg Focus */
-{ MODKEY,   GDK_s,  spawn,  DOWNLOAD("_SURF_HILIGHT") },
 { MODKEY|GDK_SHIFT_MASK,GDK_r,  reload, { .b = TRUE } },
 { MODKEY,   GDK_r,  reload, { .b = FALSE } },
 { MODKEY|GDK_SHIFT_MASK,GDK_p,  print,  { 0 } },
diff -r 0d80b4349484 surf.c
--- a/surf.c	Wed May 26 15:34:09 2010 +0200
+++ b/surf.c	Thu May 27 12:01:35 2010 +0200
@@ -23,7 +23,7 @@
 #define LENGTH(x)   (sizeof x / sizeof x[0])
 #define CLEANMASK(mask) (mask & ~(GDK_MOD2_MASK))
 
-enum { AtomFind, AtomGo, AtomUri, AtomHiLight, AtomLast };
+enum { AtomFind, AtomGo, AtomUri, AtomLast };
 
 typedef union Arg Arg;
 union Arg {
@@ -188,10 +188,7 @@
 gboolean
 decidedownload(WebKitWebView *v, WebKitWebFrame *f, WebKitNetworkRequest *r, gchar *m,  WebKitWebPolicyDecision *p, Client *c) {
 	if(!webkit_web_view_can_show_mime_type(v, m)) {
-		webkit_web_policy_decision_ignore(p);
-		webkit_web_view_load_html_string(c->view,
-"Can't display content.",
-webkit_network_request_get_uri(r));
+		webkit_web_policy_decision_download(p);
 		return TRUE;
 	}
 	return FALSE;
@@ -334,7 +331,7 @@
 	Arg arg;
 
 	updatewinid(c);
-	arg = (Arg)DOWNLOAD("_SURF_HILIGHT");
+	arg = (Arg)DOWNLOAD((char *)webkit_download_get_uri(o));
 	spawn(c, &arg);
 	return FALSE;
 }
@@ -507,7 +504,6 @@
 
 	setatom(c, AtomFind, "");
 	setatom(c, AtomUri, "about:blank");
-	setatom(c, AtomHiLight, "about:blank");
 	if(NOBACKGROUND)
 		webkit_web_view_set_transparent(c->view, TRUE);
 
@@ -688,7 +684,6 @@
 	atoms[AtomFind] = XInternAtom(dpy, "_SURF_FIND", False);
 	atoms[AtomGo] = XInternAtom(dpy, "_SURF_GO", False);
 	atoms[AtomUri] = XInternAtom(dpy, "_SURF_URI", False);
-	atoms[AtomHiLight] = XInternAtom(dpy, "_SURF_HILIGHT", False);
 
 	/* dirs and files */
 	cookiefile = buildpath(cookiefile);
@@ -763,7 +758,6 @@
 		t = g_strdup(c->linkhover);
 	else
 		t = g_strdup(c->title);
-	setatom(c, AtomHiLight, c->linkhover ? c->linkhover : geturi(c));
 	drawindicator(c);
 	gtk_window_set_title(GTK_WINDOW(c->win), t);
 	g_free(t);


Re: [dev] [dwm] can't toggle tags with mouse

2010-05-27 Thread Andreas Amann
On Thu, May 27, 2010 at 09:58:55AM +0100, Anselm R Garbe wrote:
> On 27 May 2010 09:54,   wrote:
> > Oh dear how bad has my english to be since nobody is understanding me 
> > right. *g*
> >
> > Well second approach. Currently I'm using the following code to
> > generate my statusbar:
> >
> > #set statusbar
> > while true
> > do
> >   if acpi -a | grep off-line > /dev/null; then
> >       xsetroot -name "Bat. $( acpi -b | awk '{ print $4 " " $5 }' |
> > tr -d ',' ) | Vol. $(amixer get Master | tail -1 | awk '{ print $5}' |
> > tr -d '[]') | $(date +"%a, %b %d %R")"
> >   else
> >       xsetroot -name "Vol. $(amixer get Master | tail -1 | awk '{
> > print $5}' | tr -d '[]') | $(date +"%a, %b %d %R")"
> >   fi
> >   sleep 1s
> > done &
> >
> > The point is now that I want to extend exactly this statusbar to
> > display the layout I'm using, so either 'de' or 'pl'.
> >
> > So no, I don't want to get rid of it.
> >
> > Please say you understand what I intend. :)
> 
> Sorry I didn't read the full thread.
> 
> I guess
> 
>   setxkbmap -print
> 
> might provide you the info you need to grep to decide if its de or pl.
> 

Just to clarify, Robert uses a setup equivalent to
  setxkbmap -option "grp:alt_shift_toggle" "de,pl"

This means that he toggles between de and pl layout by pressing alt+shift
simultaneously. In this case 
  setxkbmap -print 
gives the same output

xkb_keymap {
xkb_keycodes  { include "evdev+aliases(qwertz)" };
xkb_types { include "complete"  };
xkb_compat{ include "complete"  };
xkb_symbols   { include
"pc+de+pl:2+inet(evdev)+group(alt_shift_toggle)"};
xkb_geometry  { include "pc(pc104)" };
};

independent of which layout is active. 

Btw, the thread started with a valid bug report for dwm in this setup, which
could be fixed via 
diff --git a/dwm.c b/dwm.c
--- a/dwm.c
+++ b/dwm.c
@@ -43,7 +43,7 @@
 /* macros */
 #define D   if(1)
 #define BUTTONMASK  (ButtonPressMask|ButtonReleaseMask)
-#define CLEANMASK(mask) (mask & ~(numlockmask|LockMask))
+#define CLEANMASK(mask) (mask & 
(ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask))
 #define INRECT(X,Y,RX,RY,RW,RH) ((X) >= (RX) && (X) < (RX) + (RW) && (Y) >= 
(RY) && (Y) < (RY) + (RH))
 #define ISVISIBLE(C)((C->tags & C->mon->tagset[C->mon->seltags]))
 #define LENGTH(X)   (sizeof X / sizeof X[0])

not sure if you want to apply this to mainline dwm? 


Andreas




[dev] [wmii]wmii-hg2647 won't start

2010-05-27 Thread pascal
Hi

I updated this morning to the latest hg tip and I now get this error 
startx
wmii: fatal error: Xrequest code=1, Xerror code=8
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  1 (X_CreateWindow)
  Serial number of failed request:  114
  Current serial number in output stream:  115

This happens on archlinux with Xorg server 1.7.6.
Is there any other information I should provide?




Re: [dev] [dwm] can't toggle tags with mouse

2010-05-27 Thread orschiro
Thanks for the hint Andreas. xset -q shows a difference between both
values. I tried to implement it into my statusbar but as I'm not
familiar with bash scripting it doesn't work. This is my trial:

#set statusbar
while true
do
#define keyboard layout
if [ "$(xset -q | grep "LED mask:" | awk '{ print $10 }')" ==
"" ] ; then
kb = "de"
else
kb = "pl"
fi
if acpi -a | grep off-line > /dev/null; then
xsetroot -name "Bat. $( acpi -b | awk '{ print $4 " " $5 }' |
tr -d ',' ) | Vol. $(amixer get Master | tail -1 | awk '{ print $5}' |
tr -d '[]') | $kb | $(date +"%a, %b %d %R")"
else
xsetroot -name "Vol. $(amixer get Master | tail -1 | awk '{
print $5}' | tr -d '[]') | $kb | $(date +"%a, %b %d %R")"
fi
sleep 1s
done &

Could you help me out please?

Robert

2010/5/27 Andreas Amann :
> On Thu, May 27, 2010 at 09:58:55AM +0100, Anselm R Garbe wrote:
>> On 27 May 2010 09:54,   wrote:
>> > Oh dear how bad has my english to be since nobody is understanding me 
>> > right. *g*
>> >
>> > Well second approach. Currently I'm using the following code to
>> > generate my statusbar:
>> >
>> > #set statusbar
>> > while true
>> > do
>> >   if acpi -a | grep off-line > /dev/null; then
>> >       xsetroot -name "Bat. $( acpi -b | awk '{ print $4 " " $5 }' |
>> > tr -d ',' ) | Vol. $(amixer get Master | tail -1 | awk '{ print $5}' |
>> > tr -d '[]') | $(date +"%a, %b %d %R")"
>> >   else
>> >       xsetroot -name "Vol. $(amixer get Master | tail -1 | awk '{
>> > print $5}' | tr -d '[]') | $(date +"%a, %b %d %R")"
>> >   fi
>> >   sleep 1s
>> > done &
>> >
>> > The point is now that I want to extend exactly this statusbar to
>> > display the layout I'm using, so either 'de' or 'pl'.
>> >
>> > So no, I don't want to get rid of it.
>> >
>> > Please say you understand what I intend. :)
>>
>> Sorry I didn't read the full thread.
>>
>> I guess
>>
>>   setxkbmap -print
>>
>> might provide you the info you need to grep to decide if its de or pl.
>>
>
> Just to clarify, Robert uses a setup equivalent to
>  setxkbmap -option "grp:alt_shift_toggle" "de,pl"
>
> This means that he toggles between de and pl layout by pressing alt+shift
> simultaneously. In this case
>  setxkbmap -print
> gives the same output
>
> xkb_keymap {
>        xkb_keycodes  { include "evdev+aliases(qwertz)" };
>        xkb_types     { include "complete"      };
>        xkb_compat    { include "complete"      };
>        xkb_symbols   { include
>        "pc+de+pl:2+inet(evdev)+group(alt_shift_toggle)"        };
>        xkb_geometry  { include "pc(pc104)"     };
> };
>
> independent of which layout is active.
>
> Btw, the thread started with a valid bug report for dwm in this setup, which
> could be fixed via
> diff --git a/dwm.c b/dwm.c
> --- a/dwm.c
> +++ b/dwm.c
> @@ -43,7 +43,7 @@
>  /* macros */
>  #define D                       if(1)
>  #define BUTTONMASK              (ButtonPressMask|ButtonReleaseMask)
> -#define CLEANMASK(mask)         (mask & ~(numlockmask|LockMask))
> +#define CLEANMASK(mask)         (mask & 
> (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask))
>  #define INRECT(X,Y,RX,RY,RW,RH) ((X) >= (RX) && (X) < (RX) + (RW) && (Y) >= 
> (RY) && (Y) < (RY) + (RH))
>  #define ISVISIBLE(C)            ((C->tags & C->mon->tagset[C->mon->seltags]))
>  #define LENGTH(X)               (sizeof X / sizeof X[0])
>
> not sure if you want to apply this to mainline dwm?
>
>
> Andreas
>
>
>



Re: [dev] [wmii] problem with wmiir xwrite /client/$client/ctl kill

2010-05-27 Thread Thomas Dean
On Thu, May 27, 2010 at 11:22:25 +0200, Thomas Dean wrote:
> I ran into the same problem today. The wmiirc script as well as all my
> status bar scripts die frequently. All of them are run with dash.
> Switching /bin/sh from dash to bash (and replacing dash with bash in
> wmiirc) fixes the problem. It seems to be related to the latest update
> of dash (0.5.5.1-5) in Debian.

The problem could also be in the previous version. I run Debian
testing and updated 0.5.5.1-3 to 0.5.5.1-5 recently.

Thomas



Re: [dev] [dwm] can't toggle tags with mouse

2010-05-27 Thread Andreas Amann
On Thu, May 27, 2010 at 12:49:59PM +0200, orsch...@googlemail.com wrote:
> Thanks for the hint Andreas. xset -q shows a difference between both
> values. I tried to implement it into my statusbar but as I'm not
> familiar with bash scripting it doesn't work. This is my trial:
> 
> #set statusbar
> while true
> do
> #define keyboard layout
> if [ "$(xset -q | grep "LED mask:" | awk '{ print $10 }')" ==
> "" ] ; then
>   kb = "de"
> else
>   kb = "pl"
> fi
> if acpi -a | grep off-line > /dev/null; then
> xsetroot -name "Bat. $( acpi -b | awk '{ print $4 " " $5 }' |
> tr -d ',' ) | Vol. $(amixer get Master | tail -1 | awk '{ print $5}' |
> tr -d '[]') | $kb | $(date +"%a, %b %d %R")"
> else
> xsetroot -name "Vol. $(amixer get Master | tail -1 | awk '{
> print $5}' | tr -d '[]') | $kb | $(date +"%a, %b %d %R")"
> fi
> sleep 1s
> done &
> 
> Could you help me out please?

The following works for me:
while xsetroot -name "$(xset -q|sed  -ne "2 s/^.*/uk/ p; 2
s/^*/de/ p") | $(date +"%a, %b %d %Y | %H:%M")"
do
sleep 2s
done &

Andreas



Re: [dev] [dwm] can't toggle tags with mouse

2010-05-27 Thread orschiro
Hello Andreas,

your solution is almost working. The only thing that doesn't fit is
the length of the output. de/pl should only by two letters but in the
output there are a plenty of blanks before. I assume this happens
because the eight digits were substituted by only two letters?

Better understanding:

xxde where 'x' stands for a blank

Could that be corrected to use not so much space in the bar?

2010/5/27 Andreas Amann :
> On Thu, May 27, 2010 at 12:49:59PM +0200, orsch...@googlemail.com wrote:
>> Thanks for the hint Andreas. xset -q shows a difference between both
>> values. I tried to implement it into my statusbar but as I'm not
>> familiar with bash scripting it doesn't work. This is my trial:
>>
>> #set statusbar
>> while true
>> do
>>     #define keyboard layout
>>     if [ "$(xset -q | grep "LED mask:" | awk '{ print $10 }')" ==
>> "" ] ; then
>>           kb = "de"
>>     else
>>           kb = "pl"
>>     fi
>>     if acpi -a | grep off-line > /dev/null; then
>>         xsetroot -name "Bat. $( acpi -b | awk '{ print $4 " " $5 }' |
>> tr -d ',' ) | Vol. $(amixer get Master | tail -1 | awk '{ print $5}' |
>> tr -d '[]') | $kb | $(date +"%a, %b %d %R")"
>>     else
>>         xsetroot -name "Vol. $(amixer get Master | tail -1 | awk '{
>> print $5}' | tr -d '[]') | $kb | $(date +"%a, %b %d %R")"
>>     fi
>>     sleep 1s
>> done &
>>
>> Could you help me out please?
>
> The following works for me:
> while xsetroot -name "$(xset -q|sed  -ne "2 s/^.*/uk/ p; 2
> s/^*/de/ p") | $(date +"%a, %b %d %Y | %H:%M")"
> do
>    sleep 2s
> done &
>
> Andreas
>
>



[dev] Re: [dwm] can't toggle tags with mouse

2010-05-27 Thread pascal
Le Thu, 27 May 2010 15:25:32 +0200
orsch...@googlemail.com a écrit:

> Hello Andreas,
> 
> your solution is almost working. The only thing that doesn't fit is
> the length of the output. de/pl should only by two letters but in the
> output there are a plenty of blanks before. I assume this happens
> because the eight digits were substituted by only two letters?
> 
> Better understanding:
> 
> xxde where 'x' stands for a blank
> 
> Could that be corrected to use not so much space in the bar?
> 
> 2010/5/27 Andreas Amann :
> > On Thu, May 27, 2010 at 12:49:59PM +0200, orsch...@googlemail.com wrote:
> >> Thanks for the hint Andreas. xset -q shows a difference between both
> >> values. I tried to implement it into my statusbar but as I'm not
> >> familiar with bash scripting it doesn't work. This is my trial:
> >>
> >> #set statusbar
> >> while true
> >> do
> >>     #define keyboard layout
> >>     if [ "$(xset -q | grep "LED mask:" | awk '{ print $10 }')" ==
> >> "" ] ; then
> >>           kb = "de"
> >>     else
> >>           kb = "pl"
> >>     fi
> >>     if acpi -a | grep off-line > /dev/null; then
> >>         xsetroot -name "Bat. $( acpi -b | awk '{ print $4 " " $5 }' |
> >> tr -d ',' ) | Vol. $(amixer get Master | tail -1 | awk '{ print $5}' |
> >> tr -d '[]') | $kb | $(date +"%a, %b %d %R")"
> >>     else
> >>         xsetroot -name "Vol. $(amixer get Master | tail -1 | awk '{
> >> print $5}' | tr -d '[]') | $kb | $(date +"%a, %b %d %R")"
> >>     fi
> >>     sleep 1s
> >> done &
> >>
> >> Could you help me out please?
> >
> > The following works for me:
> > while xsetroot -name "$(xset -q|sed  -ne "2 s/^.*/uk/ p; 2
> > s/^*/de/ p") | $(date +"%a, %b %d %Y | %H:%M")"
> > do
> >    sleep 2s
> > done &
> >
> > Andreas
> >
> >
> 
> 

You can use this :
while xsetroot -name "$(setxkbmap -print | grep xkb_symbols | awk
'{print $4}' | awk -F"+" '{print $2}') | $(date +"%a, %b %d %Y | %H:%M")"
do sleep 2s
done &






Re: [dev] Re: [dwm] can't toggle tags with mouse

2010-05-27 Thread orschiro
I tried your code but this always just displays 'de'. There is no
change while toggling between the layouts.

2010/5/27 pascal :
> Le Thu, 27 May 2010 15:25:32 +0200
> orsch...@googlemail.com a écrit:
>
>> Hello Andreas,
>>
>> your solution is almost working. The only thing that doesn't fit is
>> the length of the output. de/pl should only by two letters but in the
>> output there are a plenty of blanks before. I assume this happens
>> because the eight digits were substituted by only two letters?
>>
>> Better understanding:
>>
>> xxde where 'x' stands for a blank
>>
>> Could that be corrected to use not so much space in the bar?
>>
>> 2010/5/27 Andreas Amann :
>> > On Thu, May 27, 2010 at 12:49:59PM +0200, orsch...@googlemail.com wrote:
>> >> Thanks for the hint Andreas. xset -q shows a difference between both
>> >> values. I tried to implement it into my statusbar but as I'm not
>> >> familiar with bash scripting it doesn't work. This is my trial:
>> >>
>> >> #set statusbar
>> >> while true
>> >> do
>> >>     #define keyboard layout
>> >>     if [ "$(xset -q | grep "LED mask:" | awk '{ print $10 }')" ==
>> >> "" ] ; then
>> >>           kb = "de"
>> >>     else
>> >>           kb = "pl"
>> >>     fi
>> >>     if acpi -a | grep off-line > /dev/null; then
>> >>         xsetroot -name "Bat. $( acpi -b | awk '{ print $4 " " $5 }' |
>> >> tr -d ',' ) | Vol. $(amixer get Master | tail -1 | awk '{ print $5}' |
>> >> tr -d '[]') | $kb | $(date +"%a, %b %d %R")"
>> >>     else
>> >>         xsetroot -name "Vol. $(amixer get Master | tail -1 | awk '{
>> >> print $5}' | tr -d '[]') | $kb | $(date +"%a, %b %d %R")"
>> >>     fi
>> >>     sleep 1s
>> >> done &
>> >>
>> >> Could you help me out please?
>> >
>> > The following works for me:
>> > while xsetroot -name "$(xset -q|sed  -ne "2 s/^.*/uk/ p; 2
>> > s/^*/de/ p") | $(date +"%a, %b %d %Y | %H:%M")"
>> > do
>> >    sleep 2s
>> > done &
>> >
>> > Andreas
>> >
>> >
>>
>>
>
> You can use this :
> while xsetroot -name "$(setxkbmap -print | grep xkb_symbols | awk
> '{print $4}' | awk -F"+" '{print $2}') | $(date +"%a, %b %d %Y | %H:%M")"
> do sleep 2s
> done &
>
>
>
>
>



Re: [dev] Re: [dwm] can't toggle tags with mouse

2010-05-27 Thread orschiro
I just discovered that this only happens when I change the layout via evdev.

When changing manually via setxkbmap de or pl the xkb_symbols line
changes and your code would work.

2010/5/27  :
> I tried your code but this always just displays 'de'. There is no
> change while toggling between the layouts.
>
> 2010/5/27 pascal :
>> Le Thu, 27 May 2010 15:25:32 +0200
>> orsch...@googlemail.com a écrit:
>>
>>> Hello Andreas,
>>>
>>> your solution is almost working. The only thing that doesn't fit is
>>> the length of the output. de/pl should only by two letters but in the
>>> output there are a plenty of blanks before. I assume this happens
>>> because the eight digits were substituted by only two letters?
>>>
>>> Better understanding:
>>>
>>> xxde where 'x' stands for a blank
>>>
>>> Could that be corrected to use not so much space in the bar?
>>>
>>> 2010/5/27 Andreas Amann :
>>> > On Thu, May 27, 2010 at 12:49:59PM +0200, orsch...@googlemail.com wrote:
>>> >> Thanks for the hint Andreas. xset -q shows a difference between both
>>> >> values. I tried to implement it into my statusbar but as I'm not
>>> >> familiar with bash scripting it doesn't work. This is my trial:
>>> >>
>>> >> #set statusbar
>>> >> while true
>>> >> do
>>> >>     #define keyboard layout
>>> >>     if [ "$(xset -q | grep "LED mask:" | awk '{ print $10 }')" ==
>>> >> "" ] ; then
>>> >>           kb = "de"
>>> >>     else
>>> >>           kb = "pl"
>>> >>     fi
>>> >>     if acpi -a | grep off-line > /dev/null; then
>>> >>         xsetroot -name "Bat. $( acpi -b | awk '{ print $4 " " $5 }' |
>>> >> tr -d ',' ) | Vol. $(amixer get Master | tail -1 | awk '{ print $5}' |
>>> >> tr -d '[]') | $kb | $(date +"%a, %b %d %R")"
>>> >>     else
>>> >>         xsetroot -name "Vol. $(amixer get Master | tail -1 | awk '{
>>> >> print $5}' | tr -d '[]') | $kb | $(date +"%a, %b %d %R")"
>>> >>     fi
>>> >>     sleep 1s
>>> >> done &
>>> >>
>>> >> Could you help me out please?
>>> >
>>> > The following works for me:
>>> > while xsetroot -name "$(xset -q|sed  -ne "2 s/^.*/uk/ p; 2
>>> > s/^*/de/ p") | $(date +"%a, %b %d %Y | %H:%M")"
>>> > do
>>> >    sleep 2s
>>> > done &
>>> >
>>> > Andreas
>>> >
>>> >
>>>
>>>
>>
>> You can use this :
>> while xsetroot -name "$(setxkbmap -print | grep xkb_symbols | awk
>> '{print $4}' | awk -F"+" '{print $2}') | $(date +"%a, %b %d %Y | %H:%M")"
>> do sleep 2s
>> done &
>>
>>
>>
>>
>>
>



Re: [dev] Re: [dwm] can't toggle tags with mouse

2010-05-27 Thread Steven Blatchford
while xsetroot -name "$(setxkbmap -print | awk -F"+" '/xkb_symbols/ {print $2}' 
| $(date +"%a, %b %d %Y | %H:%M")"; do
sleep 2s
done


-steve

On 15:42 Thu 27 May, pascal wrote:
>Le Thu, 27 May 2010 15:25:32 +0200
>orsch...@googlemail.com a écrit:
>
>> Hello Andreas,
>>
>> your solution is almost working. The only thing that doesn't fit is
>> the length of the output. de/pl should only by two letters but in the
>> output there are a plenty of blanks before. I assume this happens
>> because the eight digits were substituted by only two letters?
>>
>> Better understanding:
>>
>> xxde where 'x' stands for a blank
>>
>> Could that be corrected to use not so much space in the bar?
>>
>> 2010/5/27 Andreas Amann :
>> > On Thu, May 27, 2010 at 12:49:59PM +0200, orsch...@googlemail.com wrote:
>> >> Thanks for the hint Andreas. xset -q shows a difference between both
>> >> values. I tried to implement it into my statusbar but as I'm not
>> >> familiar with bash scripting it doesn't work. This is my trial:
>> >>
>> >> #set statusbar
>> >> while true
>> >> do
>> >>     #define keyboard layout
>> >>     if [ "$(xset -q | grep "LED mask:" | awk '{ print $10 }')" ==
>> >> "" ] ; then
>> >>           kb = "de"
>> >>     else
>> >>           kb = "pl"
>> >>     fi
>> >>     if acpi -a | grep off-line > /dev/null; then
>> >>         xsetroot -name "Bat. $( acpi -b | awk '{ print $4 " " $5 }' |
>> >> tr -d ',' ) | Vol. $(amixer get Master | tail -1 | awk '{ print $5}' |
>> >> tr -d '[]') | $kb | $(date +"%a, %b %d %R")"
>> >>     else
>> >>         xsetroot -name "Vol. $(amixer get Master | tail -1 | awk '{
>> >> print $5}' | tr -d '[]') | $kb | $(date +"%a, %b %d %R")"
>> >>     fi
>> >>     sleep 1s
>> >> done &
>> >>
>> >> Could you help me out please?
>> >
>> > The following works for me:
>> > while xsetroot -name "$(xset -q|sed  -ne "2 s/^.*/uk/ p; 2
>> > s/^*/de/ p") | $(date +"%a, %b %d %Y | %H:%M")"
>> > do
>> >    sleep 2s
>> > done &
>> >
>> > Andreas
>> >
>> >
>>
>>
>
>You can use this :
>while xsetroot -name "$(setxkbmap -print | grep xkb_symbols | awk
>'{print $4}' | awk -F"+" '{print $2}') | $(date +"%a, %b %d %Y | %H:%M")"
>do sleep 2s
>done &
>
>
>
>



Re: [dev] [dwm] can't toggle tags with mouse

2010-05-27 Thread Andreas Amann
On Thu, May 27, 2010 at 03:25:32PM +0200, orsch...@googlemail.com wrote:
> Hello Andreas,
> 
> your solution is almost working. The only thing that doesn't fit is
> the length of the output. de/pl should only by two letters but in the
> output there are a plenty of blanks before. I assume this happens
> because the eight digits were substituted by only two letters?
> 
> Better understanding:
> 
> xxde where 'x' stands for a blank
> 
> Could that be corrected to use not so much space in the bar?

strange. What is the output of 
  xset -q|sed -ne "2 s/^.*/uk/ p; 2 s/^*/de/ p"
on command line? What is the output of 
  xset -q|head -2
for each layout? 



Re: [dev] [surf] please recheck tip

2010-05-27 Thread Nibble
This patch fix a minor bug with download addresses containing special
characters like '&'. Sorry for the noise.

On Thu, 27 May 2010 12:09:12 +0200
Nibble  wrote:

> Hi,
> 
> I've been working a bit more on the patch and I think the new solution
> is a quite better, now everything work as spected in the popup menu:
> "save image as", "download linked file". And when you click a link if
> it cannot be displayed in surf, a xterm with wget is launched.
> Furthermore, this way we can remove all the AtomHiLight stuff. Also,
> it saves 8 LOC :)
> 
> Kind regards,
> -- nibblediff -r 0d80b4349484 config.def.h
--- a/config.def.h	Wed May 26 15:34:09 2010 +0200
+++ b/config.def.h	Thu May 27 16:25:50 2010 +0200
@@ -12,15 +12,13 @@
 	"prop=\"`xprop -id $2 $0 | cut -d '\"' -f 2 | dmenu`\" &&" \
 	"xprop -id $2 -f $1 8s -set $1 \"$prop\"", \
 	p, q, winid, NULL } }
-#define DOWNLOAD(p)   { \
+#define DOWNLOAD(d) { \
 	.v = (char *[]){ "/bin/sh", "-c", \
-	"prop=\"`xprop -id $1 $0 | cut -d '\"' -f 2`\";" \
-	"xterm -e \"wget --load-cookies ~/.surf/cookies.txt $prop;\"", \
-	p, winid, NULL } }
+	"xterm -e \"wget --load-cookies ~/.surf/cookies.txt '$0';\"", \
+	d, NULL } }
 #define MODKEY GDK_CONTROL_MASK
 static Key keys[] = {
 /* modifier	keyval  functionarg Focus */
-{ MODKEY,   GDK_s,  spawn,  DOWNLOAD("_SURF_HILIGHT") },
 { MODKEY|GDK_SHIFT_MASK,GDK_r,  reload, { .b = TRUE } },
 { MODKEY,   GDK_r,  reload, { .b = FALSE } },
 { MODKEY|GDK_SHIFT_MASK,GDK_p,  print,  { 0 } },
diff -r 0d80b4349484 surf.c
--- a/surf.c	Wed May 26 15:34:09 2010 +0200
+++ b/surf.c	Thu May 27 16:25:50 2010 +0200
@@ -23,7 +23,7 @@
 #define LENGTH(x)   (sizeof x / sizeof x[0])
 #define CLEANMASK(mask) (mask & ~(GDK_MOD2_MASK))
 
-enum { AtomFind, AtomGo, AtomUri, AtomHiLight, AtomLast };
+enum { AtomFind, AtomGo, AtomUri, AtomLast };
 
 typedef union Arg Arg;
 union Arg {
@@ -188,10 +188,7 @@
 gboolean
 decidedownload(WebKitWebView *v, WebKitWebFrame *f, WebKitNetworkRequest *r, gchar *m,  WebKitWebPolicyDecision *p, Client *c) {
 	if(!webkit_web_view_can_show_mime_type(v, m)) {
-		webkit_web_policy_decision_ignore(p);
-		webkit_web_view_load_html_string(c->view,
-"Can't display content.",
-webkit_network_request_get_uri(r));
+		webkit_web_policy_decision_download(p);
 		return TRUE;
 	}
 	return FALSE;
@@ -334,7 +331,7 @@
 	Arg arg;
 
 	updatewinid(c);
-	arg = (Arg)DOWNLOAD("_SURF_HILIGHT");
+	arg = (Arg)DOWNLOAD((char *)webkit_download_get_uri(o));
 	spawn(c, &arg);
 	return FALSE;
 }
@@ -507,7 +504,6 @@
 
 	setatom(c, AtomFind, "");
 	setatom(c, AtomUri, "about:blank");
-	setatom(c, AtomHiLight, "about:blank");
 	if(NOBACKGROUND)
 		webkit_web_view_set_transparent(c->view, TRUE);
 
@@ -688,7 +684,6 @@
 	atoms[AtomFind] = XInternAtom(dpy, "_SURF_FIND", False);
 	atoms[AtomGo] = XInternAtom(dpy, "_SURF_GO", False);
 	atoms[AtomUri] = XInternAtom(dpy, "_SURF_URI", False);
-	atoms[AtomHiLight] = XInternAtom(dpy, "_SURF_HILIGHT", False);
 
 	/* dirs and files */
 	cookiefile = buildpath(cookiefile);
@@ -763,7 +758,6 @@
 		t = g_strdup(c->linkhover);
 	else
 		t = g_strdup(c->title);
-	setatom(c, AtomHiLight, c->linkhover ? c->linkhover : geturi(c));
 	drawindicator(c);
 	gtk_window_set_title(GTK_WINDOW(c->win), t);
 	g_free(t);


Re: [dev] [dwm] can't toggle tags with mouse

2010-05-27 Thread orschiro
Ah sorry my fault, accidentally I broke the line down with \.

Nice your solution is working. :)

But do you have any idea why toggling via evdev doesn't affect the
xkb_symbols line?

2010/5/27 Andreas Amann :
> On Thu, May 27, 2010 at 03:25:32PM +0200, orsch...@googlemail.com wrote:
>> Hello Andreas,
>>
>> your solution is almost working. The only thing that doesn't fit is
>> the length of the output. de/pl should only by two letters but in the
>> output there are a plenty of blanks before. I assume this happens
>> because the eight digits were substituted by only two letters?
>>
>> Better understanding:
>>
>> xxde where 'x' stands for a blank
>>
>> Could that be corrected to use not so much space in the bar?
>
> strange. What is the output of
>  xset -q|sed -ne "2 s/^.*/uk/ p; 2 s/^*/de/ p"
> on command line? What is the output of
>  xset -q|head -2
> for each layout?
>
>



Re: [dev] [wmii] problem with wmiir xwrite /client/$client/ctl kill

2010-05-27 Thread Kris Maglione
On Thu, 27 May 2010 11:22:25 +0200
Thomas Dean <78...@web.de> wrote:

> I ran into the same problem today. The wmiirc script as well as all my
> status bar scripts die frequently. All of them are run with dash.
> Switching /bin/sh from dash to bash (and replacing dash with bash in
> wmiirc) fixes the problem. It seems to be related to the latest update
> of dash (0.5.5.1-5) in Debian.
> 
> One example is the attached script, which shows my mail count, and
> shows ~/.fetchmaillog on a right click. Strangely, the script survives
> multiple right clicks (the file is shown in multiple windows), but
> dies as soon as one of those windows is closed, either via C-c, or via
> Mod-Shift-c.

Ok, so that suggests that dash has a problem when its backgrounded
children die. Can you try running them with ‘wmiir setsid’ and see if
it helps?

Thanks,
-- 
Kris Maglione

UNIX was not designed to stop its users from doing stupid things, as
that would also stop them from doing clever things.
--Doug Gwyn




Re: [dev] [wmii]wmii-hg2647 won't start

2010-05-27 Thread Kris Maglione
On Thu, 27 May 2010 12:23:51 +0200
pascal  wrote:

> Hi
> 
> I updated this morning to the latest hg tip and I now get this error 
> startx
> wmii: fatal error: Xrequest code=1, Xerror code=8
> X Error of failed request:  BadMatch (invalid parameter attributes)
>   Major opcode of failed request:  1 (X_CreateWindow)
>   Serial number of failed request:  114
>   Current serial number in output stream:  115
> 
> This happens on archlinux with Xorg server 1.7.6.
> Is there any other information I should provide?

Yes, uname -a would help, along with any custom build flags.

-- 
Kris Maglione

"That girl is one of the least unintelligent organic lifeforms it has
ever been my profound lack of pleasure to have been unable to have
avoided meeting"
--Marvin




Re: [dev] [wmii] problem with wmiir xwrite /client/$client/ctl kill

2010-05-27 Thread Thomas Dean
On Thu, May 27, 2010 at 11:32:06 -0400, Kris Maglione wrote:
> Ok, so that suggests that dash has a problem when its backgrounded
> children die. Can you try running them with ‘wmiir setsid’ and see if
> it helps?

Hmm, I'm not sure what I should do. Should I place "wmiir setsid" as a
command somewhere in the beginning of the script? Sorry, I am not
so familiar with this kind of things. If that's what you meant, it
does not help, the scripts still die. I would be happy to investigate
the issue further, but I might need more detailed instructions...

Thanks and best,
Thomas



Re: [dev] [wmii] problem with wmiir xwrite /client/$client/ctl kill

2010-05-27 Thread Kris Maglione
On Thu, 27 May 2010 17:47:53 +0200
Thomas Dean <78...@web.de> wrote:

> On Thu, May 27, 2010 at 11:32:06 -0400, Kris Maglione wrote:
> > Ok, so that suggests that dash has a problem when its backgrounded
> > children die. Can you try running them with ‘wmiir setsid’ and see
> > if it helps?
> 
> Hmm, I'm not sure what I should do. Should I place "wmiir setsid" as a
> command somewhere in the beginning of the script? Sorry, I am not
> so familiar with this kind of things. If that's what you meant, it
> does not help, the scripts still die. I would be happy to investigate
> the issue further, but I might need more detailed instructions...
> 
> Thanks and best,
> Thomas
> 

Oh, sorry, I thought it was in the man page. Just add ‘wmiir setsid’ to
the front of the lines that start fetchmail and x-terminal-emulator.


--- fetchmail.sh2010-05-27 11:53:38.0 -0400
+++ -   2010-05-27 11:55:29.370951834 -0400
@@ -49,7 +49,7 @@
case "$1" in
1)
-   fetchmail &;;
+   wmiir setsid fetchmail &;;
3)
-   x-terminal-emulator -e tail -n 200 -f
~/.fetchmaillog &;;
+   wmiir setsid x-terminal-emulator -e
tail -n 200 -f ~/.fetchmaillog &;; esac
fi;;

-- 
Kris Maglione

When in doubt, use brute force.
--Ken Thompson




Re: [dev] [wmii] problem with wmiir xwrite /client/$client/ctl kill

2010-05-27 Thread Thomas Dean
On Thu, May 27, 2010 at 11:55:38 -0400, Kris Maglione wrote:
> Oh, sorry, I thought it was in the man page. Just add ‘wmiir setsid’ to
> the front of the lines that start fetchmail and x-terminal-emulator.

Ok, I just did that, but it did not change anything. Nor is there any
further output when the script dies. Should there? I don't know what
"wmiir setsid" does...
Anything else I can do?



[dev] Re: [wmii]wmii-hg2647 won't start

2010-05-27 Thread pascal
Le Thu, 27 May 2010 11:35:31 -0400
Kris Maglione  a écrit:

> 
> Yes, uname -a would help, along with any custom build flags.
> 
uname -a:
Linux shanti 2.6.34-ARCH #1 SMP PREEMPT Mon May 17 08:36:58 UTC 2010 i686
Intel(R) Pentium(R) M processor 1.73GHz GenuineIntel GNU/Linux

I don't use any custom build flags.





Re: [dev] [wmii] problem with wmiir xwrite /client/$client/ctl kill

2010-05-27 Thread Kris Maglione
On Thu, 27 May 2010 18:12:57 +0200
Thomas Dean <78...@web.de> wrote:

> On Thu, May 27, 2010 at 11:55:38 -0400, Kris Maglione wrote:
> > Oh, sorry, I thought it was in the man page. Just add ‘wmiir
> > setsid’ to the front of the lines that start fetchmail and
> > x-terminal-emulator.
> 
> Ok, I just did that, but it did not change anything. Nor is there any
> further output when the script dies. Should there? I don't know what
> "wmiir setsid" does...
> Anything else I can do?

It's not supposed to have any output. It just basically disassociates a
process from its parent. You should generally use it when launching
programs from wmiirc so they don't catch any signals if you kill wmiirc.
This would be easier if I could duplicate this. I think your best bet is
some hack like this:


--- fetchmail.sh2010-05-27 12:30:39.0 -0400
+++ -   2010-05-27 12:30:48.882841963 -0400
@@ -49,7 +49,7 @@
case "$1" in
1)
-   fetchmail &;;
+   ( fetchmail & ) &;;
3)
-   x-terminal-emulator -e tail -n 200 -f 
~/.fetchmaillog &;;
+   ( wmiir setsid x-terminal-emulator -e tail -n 
200 -f ~/.fetchmaillog & )&;;
esac
fi;;


-- 
Kris Maglione

Doing linear scans over an associative array is like trying to club
someone to death with a loaded Uzi.
--Larry Wall




Re: [dev] [wmii] problem with wmiir xwrite /client/$client/ctl kill

2010-05-27 Thread Thomas Dean
On Thu, May 27, 2010 at 12:31:42 -0400, Kris Maglione wrote:
> It's not supposed to have any output. It just basically disassociates a
> process from its parent. You should generally use it when launching
> programs from wmiirc so they don't catch any signals if you kill wmiirc.
> This would be easier if I could duplicate this. I think your best bet is
> some hack like this:
> 
> --- fetchmail.sh  2010-05-27 12:30:39.0 -0400
> +++ - 2010-05-27 12:30:48.882841963 -0400
> @@ -49,7 +49,7 @@
>   3)
> - x-terminal-emulator -e tail -n 200 -f 
> ~/.fetchmaillog &;;
> + ( wmiir setsid x-terminal-emulator -e tail -n 
> 200 -f ~/.fetchmaillog & )&;;
>   esac

With that the script already dies as soon as the fetchmaillog window
opens :-) Given that this seems to be a problem of dash, maybe I
should file a Debian bug report...



Re: [dev] [dwm] can't toggle tags with mouse

2010-05-27 Thread Andreas Amann
On Thu, May 27, 2010 at 04:35:29PM +0200, orsch...@googlemail.com wrote:
> Ah sorry my fault, accidentally I broke the line down with \.
> 
> Nice your solution is working. :)
> 
> But do you have any idea why toggling via evdev doesn't affect the
> xkb_symbols line?

simply because "xkb_symbols" does not change when you toggle your keyboard
layout dynamically via Alt-shift.  Before and after toggling it contains the
string "+pc+de+pl" which simply says that you can toggle between de and
pl layout, but does not tell you which one is currently active.  Obviously
if you toggle your keyboard using "setxkbmap" directly, then xkb_symbols
changes from "+pc+de" to "+pc+pl".

>From "man setxkbmap" you can see that "setxkbmap -print" is actually
intended to be piped into xkbcomp and not for determining the current state
of the keyboard.




Re: [dev] [wmii] problem with wmiir xwrite /client/$client/ctl kill

2010-05-27 Thread Kris Maglione
On Thu, 27 May 2010 19:18:40 +0200
Thomas Dean <78...@web.de> wrote:

> On Thu, May 27, 2010 at 12:31:42 -0400, Kris Maglione wrote:
> > It's not supposed to have any output. It just basically
> > disassociates a process from its parent. You should generally use
> > it when launching programs from wmiirc so they don't catch any
> > signals if you kill wmiirc. This would be easier if I could
> > duplicate this. I think your best bet is some hack like this:
> > 
> > --- fetchmail.sh2010-05-27 12:30:39.0 -0400
> > +++ -   2010-05-27 12:30:48.882841963 -0400
> > @@ -49,7 +49,7 @@
> > 3)
> > -   x-terminal-emulator -e tail -n 200
> > -f ~/.fetchmaillog &;;
> > +   ( wmiir setsid x-terminal-emulator
> > -e tail -n 200 -f ~/.fetchmaillog & )&;; esac
> 
> With that the script already dies as soon as the fetchmaillog window
> opens :-) Given that this seems to be a problem of dash, maybe I
> should file a Debian bug report...

That would probably be a good idea, if you can come up with a good
test case.

-- 
Kris Maglione

Understand this, I mean to arrive at the truth.  The truth, however
ugly in itself, is always curious and beautiful to seekers after it.
--Agatha Christie




Re: [dev] [wmii] problem with wmiir xwrite /client/$client/ctl kill

2010-05-27 Thread Thomas Dean
On Thu, May 27, 2010 at 14:22:27 -0400, Kris Maglione wrote:
> > With that the script already dies as soon as the fetchmaillog window
> > opens :-) Given that this seems to be a problem of dash, maybe I
> > should file a Debian bug report...
> 
> That would probably be a good idea, if you can come up with a good
> test case.

The simplest idea,

dash -c 'while true; do xterm & sleep 10; done'

unfortunately does not die when I kill the xterm. But I will look into
it, reducing the script I have as much as possible.



Re: [dev] [wmii] problem with wmiir xwrite /client/$client/ctl kill

2010-05-27 Thread Kris Maglione
On Thu, 27 May 2010 20:33:42 +0200
Thomas Dean <78...@web.de> wrote:

> On Thu, May 27, 2010 at 14:22:27 -0400, Kris Maglione wrote:
> > > With that the script already dies as soon as the fetchmaillog
> > > window opens :-) Given that this seems to be a problem of dash,
> > > maybe I should file a Debian bug report...
> > 
> > That would probably be a good idea, if you can come up with a good
> > test case.
> 
> The simplest idea,
> 
> dash -c 'while true; do xterm & sleep 10; done'
> 
> unfortunately does not die when I kill the xterm. But I will look into
> it, reducing the script I have as much as possible.

Does dash dump a core, by chance?

-- 
Kris Maglione

Perhaps when a man has special knowledge and special powers like my
own, it rather encourages him to seek a complex explanation when a
simpler one is at hand.
--"Sherlock Holmes"




Re: [dev] [wmii] problem with wmiir xwrite /client/$client/ctl kill

2010-05-27 Thread Robert Ransom
On Thu, 27 May 2010 19:18:40 +0200
Thomas Dean <78...@web.de> wrote:

> With that the script already dies as soon as the fetchmaillog window
> opens :-) Given that this seems to be a problem of dash, maybe I
> should file a Debian bug report...

The Arch developers just pushed out an update of dash to version 0.5.6
today.  Test your script with that version first.

Robert Ransom



Re: [dev] [wmii] problem with wmiir xwrite /client/$client/ctl kill

2010-05-27 Thread Kris Maglione
On Thu, 27 May 2010 20:33:42 +0200
Thomas Dean <78...@web.de> wrote:

> On Thu, May 27, 2010 at 14:22:27 -0400, Kris Maglione wrote:
> > > With that the script already dies as soon as the fetchmaillog
> > > window opens :-) Given that this seems to be a problem of dash,
> > > maybe I should file a Debian bug report...
> > 
> > That would probably be a good idea, if you can come up with a good
> > test case.
> 
> The simplest idea,
> 
> dash -c 'while true; do xterm & sleep 10; done'
> 
> unfortunately does not die when I kill the xterm. But I will look into
> it, reducing the script I have as much as possible.
> 

For what it's worth, I've sent a report to the dash mailing list. The
offending revision is 3800d4934391b144:[JOBS] Fix dowait signal race

This means that the bug was introduced just after 0.5.5.1 and first
showed up in 0.5.6, so if you can revert to some prior version, you
should be golden.

The test case is:
#!/bin/dash
{
echo foo
sleep 1
echo foo
echo done>/dev/tty
} | while read p; do
( echo good & ) &
done
echo done



-- 
Kris Maglione

Please don't fall into the trap of believing that I am terribly
dogmatical about [the goto statement].  I have the uncomfortable
feeling that others are making a religion out of it, as if the
conceptual problems of programming could be solved by a single trick,
by a simple form of coding discipline!
--Edsger W. Dijkstra