[dwm] regression in 5.0.1

2008-09-05 Thread bill lam
I compiled from dwm source 5.2, and it works quite smoothly except
feh raised an X error. I googled and found a Japanese gentleman
also experienced this bug and proposed it should to be reverted. I
tried his suggestion and fixed the issue.  

reference link: http://ta012ko.blog113.fc2.com/blog-entry-55.html
Comments in Japanese but program code in English.
"<--- ココ"means   "<--- here"

Is there any specific reason for that change? FWIW I used nvidia and ubuntu. 

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



Re: [dwm] regression in 5.0.1

2008-09-06 Thread bill lam
On Sat, 06 Sep 2008, Anselm R Garbe wrote:
> composition of all P* constants. Since PSize is never used in dwm's
> updatesize() algorithm this change doesn't fix or change anything in
> my opinion. If anyone sees an explanation why this change regarding
> the blog entry could fix something, please let me know.

I might test but please show me additional lines that can print value
of size.flags to a log file.

BTW I'm not proficient in C, is that || conidtion short-circuited?

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



Re: [dwm] regression in 5.0.1

2008-09-06 Thread bill lam
On Sat, 06 Sep 2008, Anselm R Garbe wrote:

> 2008/9/6 bill lam <[EMAIL PROTECTED]>:
> > On Sat, 06 Sep 2008, Anselm R Garbe wrote:
> >> composition of all P* constants. Since PSize is never used in dwm's
> >> updatesize() algorithm this change doesn't fix or change anything in
> >> my opinion. If anyone sees an explanation why this change regarding
> >> the blog entry could fix something, please let me know.
> >
> > I might test but please show me additional lines that can print value
> > of size.flags to a log file.
> 
> fprintf(stderr, "size.flags = %ul\n", size.flags);
> 
> However, as I told, that won't give you more info, since PSize is the
> 4rth bit, and it is never checked and not included in any other
> P-definition we use such as PMinSize, PMaxSize, PAspect etc. I don't
> see why this could change anything...
> 

I added that but have no idea where the error log resided.
Nevertheless, I simplified that line to 

if(!XGetWMNormalHints(dpy, c->win, &size, &msize))return;

and the issue is also fxied. My theory is that if XGetWMNormalHints
fails then information returned in size is rubbish, and set that flag to
PSize can help to prevent incorrectly change anything.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



[dwm] autostart

2008-09-08 Thread bill lam
I use slim to start dwm or other wm. I want to know to autostart a
particular script for dwn only.

Thanks in advance.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



Re: [dwm] autostart

2008-09-08 Thread bill lam
On Mon, 08 Sep 2008, =?ISO-8859-1?Q?Richard_P=F6ttler_ wrote:

> On Mon, Sep 8, 2008 at 11:30 AM, bill lam <[EMAIL PROTECTED]> wrote:
> > On Mon, 08 Sep 2008, =?ISO-8859-1?Q?Richard_P=F6ttler_ wrote:
> >
> >> On Mon, Sep 8, 2008 at 10:44 AM, bill lam <[EMAIL PROTECTED]> wrote:
> >> > I use slim to start dwm or other wm. I want to know to autostart a
> >> > particular script for dwn only.
> >> >
> >> > Thanks in advance.
> >>
> >> Just place the command in front of the dwm command in the dwm branch
> >> of your case block in the .xinitrc.
> >>
> >> You also want to have a look at:
> >> http://www.google.at/search?q=.xinitrc+dwm+slim&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:de:official&client=firefox-a
> >>
> >
> > Did you use slim login manager?
> 
> Yes, I do.
> 
> > 1. slim does not need ~/.xinitrc
> 
> I am not sure, whether it doesn't need one. Maybe you have altered
> your login_cmd variable in your slim.conf.
> 
> > 2. how to ensure the script is only run for dwn session but not other
> > wm?
> 
> You could do it like it is written in the Arch linux wiki. Or put
> something like:
> 
> case $1 in
> dwm)
>   <1337 command here>
>   dwm
>   ;;
> )
>   
>   ;;
> ...
> esac
> 
> into your .xinitrc (I haven't tried it out, because i am on a windows
> maching and not able to access my computer at home)
> you could also search http://www.dotfiles.org for examples.
> 
> > Put it in the other way, does dwm have any autostart script?
> 
> Pure dwm does not.
> 

Thank for confirmation. I use slim as provided by ubuntu which fixed
some bugs in original slim. eg, default session not working, default
locale not sourced, file for pam not created (this neeed to be added
manually)

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



Re: [dwm] (solved) autostart

2008-09-08 Thread bill lam
On Mon, 08 Sep 2008, Giorgio Lando wrote:

> On lun 08/09/08, 17:30, bill lam wrote:
> > Did you use slim login manager?
> > 1. slim does not need ~/.xinitrc
> > 2. how to ensure the script is only run for dwn session but not other
> > wm?
> > 
> > Put it in the other way, does dwm have any autostart script?
> 
> Create a script which does what you want and finally execute dwm. Then
> use a slim session which executes that script instead of plain dwm.
> Giorgio Lando
> 

Thanks! This works for me.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



Re: [dwm] autostart

2008-09-08 Thread bill lam
On Mon, 08 Sep 2008, =?ISO-8859-1?Q?Richard_P=F6ttler_ wrote:

> On Mon, Sep 8, 2008 at 10:44 AM, bill lam <[EMAIL PROTECTED]> wrote:
> > I use slim to start dwm or other wm. I want to know to autostart a
> > particular script for dwn only.
> >
> > Thanks in advance.
> 
> Just place the command in front of the dwm command in the dwm branch
> of your case block in the .xinitrc.
> 
> You also want to have a look at:
> http://www.google.at/search?q=.xinitrc+dwm+slim&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:de:official&client=firefox-a
> 

Did you use slim login manager?
1. slim does not need ~/.xinitrc
2. how to ensure the script is only run for dwn session but not other
wm?

Put it in the other way, does dwm have any autostart script?

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



[dwm] keyboard input focus

2008-09-08 Thread bill lam
I found that mouse click can switch current client (as shown in the
top statusbar), but the keyboard input focus does not get switched. Is
this bug?

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



[dwm] Re: keyboard input focus

2008-09-08 Thread bill lam
On Tue, 09 Sep 2008, bill lam wrote:

> I found that mouse click can switch current client (as shown in the
> top statusbar), but the keyboard input focus does not get switched. Is
> this bug?

To be concise, the behaviour is random, sometimes it works. 

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



Re: [dwm] Re: keyboard input focus

2008-09-09 Thread bill lam
On Tue, 09 Sep 2008, Antoni Grzymala wrote:

> [EMAIL PROTECTED] dixit (2008-09-09, 09:31):
> 
> > what is client switching for you? Which keys are you using? If youre
> > talking about the default zoom and alt,tab keys. In dwm theres no
> > random functionailty,but you can make a patch if you want :P. Check
> > your conf and feed us with more concise information. But i think youre
> > missing something
> 
> On a side note, there *is* a similar random problem with terminal
> windows, not exactly that they are not getting focus when they should,
> but that they're losing the focus indicator (ie the cursor box is an
> empty outline).
> 
> This is quite annoying. And it has happened with vanilla dwm for many
> versions now. Maybe this is the original poster's problem.

Mouse click on a window should bring the window to the front (z-order)
and the keyboard focus (the caret) should also transfer to a child of
that window. But this is not always happens, to make it worse the
problem does not show up when I try to reproduce it. 

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



Re: [dwm] Re: keyboard input focus

2008-09-09 Thread bill lam
On Tue, 09 Sep 2008, Anselm R Garbe wrote:
> Which terminal are you using?
> I remember that I noticed such behavior back in the times when I used
> urxvt, however I switched to uxterm long ago which seems to work
> properly. And since st will be the official terminal for dwm in the
> future, I hope that it won't show such behavior as well...

I use xterm on ubuntu, which is already unicode enabled. It is
annoying but I can live with it.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



[dwm] newbie question: floating vs tiled layout

2008-09-09 Thread bill lam
What is the significance of tiled vs floating as that shown in the
icon on the statusbar for []=  ><> ?  
I'm puzzled because 
1. each tag can have different layout yet the icon is common
to all tags.  
2. take firefox as an example, the window can be dragged
or resized (turned in floating) but the layout icon does not change

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



Re: [dwm] newbie question: floating vs tiled layout

2008-09-09 Thread bill lam
On Tue, 09 Sep 2008, Anselm R Garbe wrote:
> 
> The data model of dwm looks like this:

Hi Anselm,
Thank you very much for detail explanation. Tiled vs floating layout
is a new concept to me. I will study your explanation.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



[dwm] xterm -e [dmenu]

2008-09-10 Thread bill lam
Hi All,
I want to exec some console program, so instead of exec directly the
output from dmenu, I change it to something like,
   xterm -e "outuot from dmenu"
I modified config.h and dwm.c as follows. However I noticed that it
spawn a xterm before dmenu has started. Is there any way to suppress
xterm before dmenu get finished?  Any comments to improve the code
are welcome. Or if anyone has already written such patch, I would like
to copy. :-)


/*** config.hc ***/
static Key keys[] = {
/* modifier keyfunctionargument */
{ MODKEY|ShiftMask, XK_p,  termspawn,  {.v = 
dmenucmd } },


/*** dwm.c ***/

static void termspawn(const Arg *arg);

void
termspawn(const Arg *arg) {
/* The double-fork construct avoids zombie processes and keeps the code
 * clean from stupid signal handlers. */
  char  *argv[3];  /* the command line argument  */
  argv[0] = (char*)termcmd[0];
  argv[1] = "-e";
  argv[2] = ((char **)arg->v)[0];
if(fork() == 0) {
if(fork() == 0) {
if(dpy)
close(ConnectionNumber(dpy));
setsid();
execvp(*argv, argv);
fprintf(stderr, "dwm: execvp %s", ((char **)arg->v)[0]);
perror(" failed");
}
exit(0);
}
wait(0);
}


-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



Re: [dwm] xterm -e [dmenu]

2008-09-10 Thread bill lam
On Wed, 10 Sep 2008, Anselm R Garbe wrote:
> No need to that natively. Have a look into dmenu_run which should give
> you an idea how to write dmenu_termrun ;)
> 
Thank you very much for advice! Yes, that should be *the* way to do it.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



Re: [dwm] dwm + xft

2008-09-11 Thread bill lam
On Thu, 11 Sep 2008, Donald Chai wrote:
> I tried adding pango+xft support because bitmap CJK fonts suck, and also 

Sorry for my ignorance. The chinese font on my FF3 now looks ugly
while it previously looks quite good using ukai under gnome. Does
this patch fix all related font issue for programs run under dwm, or
this patch only fix the font issue that appeared in the top statusbar?

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



Re: [dwm] dwm + xft

2008-09-11 Thread bill lam
On Thu, 11 Sep 2008, Donald Chai wrote:
> bug. By "looks ugly" do you mean it's rendered with a different font, or 
> that the font is improperly rendered?

look like 15x16 character printed on an old dot-matrix printer.

> I've checked with rxvt-unicode and FF2 (Iceweasel), and everything looks 
> fine. If I go to http://zh.wikipedia.org/wiki/孙燕姿, the statusbar and 
> the FF2 text look fine.
Not yet applied your patch, dwm display this on the statusbar
Ko1m;Q - N,4pI42J!$<+3E*I42JA4Ji

I use en_HK.UTF8, I tried use some X11 chinese font but it still
display rubbish on the statusbar for chinese title. Is there
any method to display cjk font on the statusbar just using the X11
fonts?

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



Re: [dwm] dwm + xft

2008-09-12 Thread bill lam
On Thu, 11 Sep 2008, Donald Chai wrote:
> Just specify multiple font patterns in config.h, separated by commas:
>
>   static const char font[] = "-*-fixed-medium-r-normal-*-12-*-*-*-*-*- 
> *-*,-*-ukai-*-r-normal--*-*-*-*-*-*" ;

Thanks. It works now. Incidentally the original terminus font does not
work with ukai font.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



[dwm] modkey as dead key

2008-09-16 Thread bill lam
Hello,
How to set modkey (I use mod4key) to work as a dead key for dwm?
Repeated pressing key chord already causes RSI to my wrist.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



[dwm] classname of java

2008-09-23 Thread bill lam
Hello,
I want to set java programs to float in config.h, Does anyone know
what the classname of sun java/openjdk java as that reported by
XGetClassHint?

TIA
-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



Re: [dwm] classname of java

2008-09-23 Thread bill lam
On Tue, 23 Sep 2008, Donald Chai wrote:
> You can get classnames (and other useful information) using the 'xprop' 
> program.
Thank you Donald! 

BTW, I solved the firefox ukai font problem by disable
hinting/autohint for chinese fonts in ~/.fonts.conf.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



Re: [dwm] move/resize keyboard control

2008-09-28 Thread bill lam
On Sat, 27 Sep 2008, Donald Chai wrote:

> On Sep 27, 2008, at 5:26 AM, Tinou wrote:
>>> awesomewm (and my dwm) move windows within the clients list instead 
>>> of
>>> turning on 'floating', and I very much prefer it that way.
>>
>> Interesting feature, could you send a patch ?
>
> This patch is against dwm-5.2.
>
Excuse me, I'm not quite understand what patch will do. Does it
related to keyboard control of window? Would anyone give more detail?

TIA
- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



Re: [dwm] move/resize keyboard control

2008-09-28 Thread bill lam
On Sun, 28 Sep 2008, Donald Chai wrote:
> I find it strange how many people use dwm mostly for monocle-mode.  I
> used Ratpoison for years because I assumed that any alternative would
> require that I install gkrellm, turn on fake transparency in my

I use a 15" LCD, tile is not practical and I use conky with dwm.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



Re: [dwm] Notifications

2008-09-30 Thread bill lam
On Mon, 29 Sep 2008, Carlos Pita wrote:

> > How about using dzen[1]?
> 
> I didn't know about it, thanks for the advice.
> 
> I've wrote a simple bash script that takes care of wrapping long lines
> and dynamically adjust the notification window width according to the
> longest line and the current font (using the provided textwidth
> utility). Maybe someone else will find it useful.

Thank you for sharing.

OT, is Carlos your family name?  I'm not quite sure the order of
family name and given name, some great soccer players also called
Carlos.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3



Re: [dwm] [Offtopic] minimalistic filesystem ncurses viewer

2008-12-26 Thread bill lam
On Sat, 27 Dec 2008, Ricardo Catalinas Jiménez wrote:
> Merry Christmas for everyone.
>
> I just wanted to say I've been using dwm for a while and I like the  
> suckless philosophy, so I wrote a simple filesystem viewer for myself to  
> complement my desktop. I tried before vifm and others but they were too  
> buggy and too big to be fixed. In case of interest, take a look:
>
>   http://server01.i.info/fm.html  
> (http://freshmeat.net/projects/fm-viewer/)
>

I use vifm, what bugs did you encounter?
Even compiling with ncursew, fm does not display utf8 properly, is it
a known issue?

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩158 李商隱  落花
高閣客竟去  小園花亂飛  參差連曲陌  迢遞送斜暉
腸斷未忍掃  眼穿仍欲歸  芳心向春盡  所得是沾衣



Re: [dwm] [Offtopic] minimalistic filesystem ncurses viewer

2008-12-27 Thread bill lam
On Sat, 27 Dec 2008, Ricardo Catalinas Jiménez wrote:
>
> On Sat, 27 Dec 2008 08:44:14 +0100, bill lam  wrote:
>> Even compiling with ncursew, fm does not display utf8 properly, is it
>> a known issue?
>
> I missed completely the call to `setlocale' at the beginning of the  
> program.
> Now fm is linked with ncursesw by default. That should give better results
> with utf-8, but my understanding of utf-8 and ncursesw is not very deep at
> this momment.

I'm happy to report that fm can now display japanese and chinese for
locale utf-8.

feature request (some already in vifm)
1. delete/copy/move
2. tag multiple item for delete/copy/move
3. use mime/mailcap to associate action

I can see that fm is quite remarkable as minimalist in that its number
of source code line is only one tenth of that for mc or vifm.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩209 李商隱  錦瑟
錦瑟無端五十絃  一絃一柱思華年  莊生曉夢迷蝴蝶  望帝春心託杜鵑
滄海月明珠有淚  藍田日暖玉生煙  此情可待成追憶  只是當時已惘然



Re: [dwm] [dclip] dmenu-based clipboard manager

2008-12-29 Thread bill lam
Hi, I tried and it worked very well except that it cannot handle utf8
wide characters. When text was copied, it became garbage characters as
content peeked from dclip_cache.  Even I manually put some valid utf8
text into that file. On m-c-v, garbage appeared on the menu bar, or
inserted with shift-insert.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩262 張旭  桃花谿
隱隱飛橋隔野煙  石磯西畔問漁船  桃花盡日隨流水  洞在清谿何處邊



Re: [dwm] [dclip] dmenu-based clipboard manager

2008-12-29 Thread bill lam
On Mon, 29 Dec 2008, bill lam wrote:
>   Even I manually put some valid utf8
> text into that file. On m-c-v, garbage appeared on the menu bar, or
> inserted with shift-insert.

Ah, sorry! It should be, in this case, utf8 can displayed on menu bar
when m-c-v, but garbage was inserted by shift-insert.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩092 王勃  送杜少府之任蜀州
城闕輔三秦  風煙望五津  與君離別意  同是宦遊人
海內存知己  天涯若比鄰  無為在歧路  兒女共沾巾



Re: [dwm] [dclip] dmenu-based clipboard manager

2008-12-29 Thread bill lam
On Mon, 29 Dec 2008, Delta wrote:
> I usually use ISO-8859-15 character encoding on my system. I have tried with 
> UTF-8 and also there was no problem, so let me try to delimit the problem:
> Can you see your selection OK in the ~/.dclip_cache file after the M+C+c?

No. it became ?

> Do you see weird characters only on shift+ins?

all: dclip_cache, dmenu bar, shift+ins 

> Does this garbage appear anywhere you paste the clipboard content?

vim, screen, xterm

1. dclip use latin-1 encoding, even I converted it to utf8, the
   problem persisted.
2. my signature contains chinese characters in utf8, can use see them
   or just some garbage (??).  You may try it as sample text.
3. the dmenu should use fonts that display unicode, I put this into
   config.h

static const char font[] = 
"-*-fixed-medium-r-normal-*-14-*-*-*-*-*-*-*,-*-ukai-*-r-normal--*-*-*-*-*-*";

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩110 杜甫  天末懷李白
涼風起天末  君子意如何  鴻雁幾時到  江湖秋水多
文章憎命達  魑魅喜人過  應共冤魂語  投詩贈汨羅



Re: [dwm] [dclip] dmenu-based clipboard manager

2008-12-30 Thread bill lam
On further testing, it appeared that the xclip itself cannot handle
utf8. On replacing xclip with xsel, it now works without problem. What
problem did you encounter in using xsel? 

I prefer \034 to \266 as delimiter, since the later is a 2 byte
sequence in utf8 encoding.  I'm not sure if tr can handle that. Why
choose \034?  Because awk uses it.

on ubuntu, sh is not bash; it is the old sh.


#! /bin/bash

# dclip-1.0 || Delta 30dic08

file=$HOME/.dclip_cache
size=10

if [ "$1" == "copy" ]; then
sel_clip=$(xsel -o)
sel_file=$(echo -n "$sel_clip"|tr '\n' '\034')
fi
touch $file
if [ "$1" == "paste" ]; then
shift
sel_file=$(cat $file | dmenu ${1+"$@"})
sel_clip=$(echo -n "$sel_file"|tr '\034' '\n')
fi
[ "$sel_clip" == "" ] && exit 1

sed "/^$sel_file$/d" -i $file
cut=$(head -n $(($size-1)) $file)
echo "$sel_file" > $file
echo -n "$cut" >> $file

echo -n "$sel_clip" | xsel -p -i
echo -n "$sel_clip" | xsel -b -i

exit 0


-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩232 孟浩然  春曉
春眠不覺曉  處處聞啼鳥  夜來風雨聲  花落知多少



Re: [dwm] last.fm + youtube downloader scripts

2009-01-05 Thread bill lam
On Mon, 05 Jan 2009, Ian Daniher wrote:
> music. youtubedl I am currently working on binding to a hotkey in w3m
> to allow near-seamless viewing of youtube videos from a command line
> browser.

I also use w3m and interested in how to do download and view youtube.

As pointed out, there are only symlink in the attachments. 

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩288 朱慶餘  近試上張水部
洞房昨夜停紅燭  待曉堂前拜舅姑  妝罷低聲問夫婿  畫眉深淺入時無



Re: [dwm] last.fm + youtube downloader scripts

2009-01-05 Thread bill lam
How to configure w3m to use this youtube-dl ? That is not mentioned in
README.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩253 崔顥  長干行二首之一
君家何處住  妾住在橫塘  停船暫借問  或恐是同鄉



Re: [dwm] last.fm + youtube downloader scripts

2009-01-06 Thread bill lam
On Tue, 06 Jan 2009, Ian Daniher wrote:
> As for setting up a hotkey in w3m, I got distracted from
> the manpage by my bugfix but I'll post to the mailing
> list as soon as I have it figured out.

Thanks. I can view youtube from w3m with a simple script to call mplayer
and your revised scripts. I use 2M (external browser) hotkey.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩180 王維  積雨輞川莊作
積雨空林煙火遲  蒸藜炊黍餉東菑  漠漠水田飛白鷺  陰陰夏木囀黃鸝
山中習靜觀朝槿  松下清齋折露葵  野老與人爭席罷  海鷗何事更相疑



[dwm] how to float all gui programs

2009-01-09 Thread bill lam
At present I float common gui programs that I used into config.h like

static Rule rules[] = {
/* class  instancetitle   tags mask isfloating */
{ "Abiword", NULL,   NULL,   0,True },
{ "Acroread", NULL,   NULL,   0,True },
{ "Gnumeric", NULL,   NULL,   0,True },

I need to compile each time I add anthor gui program.  Is there any
way to automatically float all gui program?

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩197 劉長卿  自夏口至鸚洲夕望岳陽寄源中丞
汀洲無浪復無煙  楚客相思益渺然  漢口夕陽斜渡鳥  洞庭秋水遠連天
孤城背嶺寒吹角  獨戍臨江夜泊船  賈誼上書憂漢室  長沙謫去古今憐



Re: [dwm] how to float all gui programs

2009-01-09 Thread bill lam
On Fri, 09 Jan 2009, markus schnalke wrote:
> [2009-01-09 22:35] bill lam 
> > 
> > I need to compile each time I add anthor gui program.  Is there any
> > way to automatically float all gui program?
> 
> Make floating the default and add rules for your terminal emulators.
> 
> ... however, pancake hit the point :-)

Thank markus, I patched dwm as per your suggestion and it now works
very well for me.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩280 劉禹錫  烏衣巷
朱雀橋邊野草花  烏衣巷口夕陽斜  舊時王謝堂前燕  飛入尋常百姓家



Re: [dwm] dmenu filename tab-completion patch

2009-01-27 Thread bill lam
It is very useful!
Can it be extended to handle  ?

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩196 劉長卿  長沙過賈誼宅
三年謫宦此棲遲  萬古惟留楚客悲  秋草獨尋人去後  寒林空見日斜時
漢文有道恩猶薄  湘水無情弔豈知  寂寂江山搖落處  憐君何事到天涯



Re: [dwm] dmenu filename tab-completion patch

2009-01-28 Thread bill lam
On Wed, 28 Jan 2009, Jeremy Jay wrote:
> request granted =)  first tab will do longest
> completion, subsequent tabs will cycle through
> all choices.

Thank you for prompt action! 

If you could consider another request.  bash completion will list all
available choices for  in one step.  Will it be possible to
do the same for dmenu.  There is another project dzen2 which can
display message text as dropdown from the status bar, it may be usable
for this tab completion.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩289 杜牧  將赴吳興登樂遊原
清時有味是無能  閒愛孤雲靜愛僧  欲把一麾江海去  樂遊原上望昭陵



Re: [dwm] [ANNOUNCE] dvtm-0.5

2009-01-29 Thread bill lam
In commit sha1 a107d3 it added a call to an undeclared set_escdelay,
and it fails to compile.  Is that a known issue?

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩311 無名氏  雜詩
盡寒食雨草萋萋  著麥苗風柳映堤  等是有家歸未得  杜鵑休向耳邊啼



Re: [dwm] [ANNOUNCE] dvtm-0.5

2009-01-29 Thread bill lam
On Thu, 29 Jan 2009, Donald Chai wrote:
> You can replace that line with:
>   ESCDELAY = esc_delay;

Thanks!

I found 2 further issues
1. on my ubuntu, $TERM is xterm  (actually it is 256 color), but dvtm
   cannot detect it and makes it a 8 (or 16?) color rxvt.
2. if start dvtm from dmenu typing "xterm -e dvtm" there is always an
   extra ^Z placed in ttyin so that when I start to type any
   character, the ^Z appear and I have to delete it,
   However if I start dvtm from xterm, it is OK.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩200 韓翃  同題仙游觀
仙臺初見五城樓  風物淒淒宿雨收  山色遙連秦樹晚  砧聲近報漢宮秋
疏松影落空壇靜  細草香閑小洞幽  何用別尋方外去  人間亦自有丹丘



Re: [dwm] [ANNOUNCE] dvtm-0.5

2009-01-30 Thread bill lam
On Fri, 30 Jan 2009, Donald Chai wrote:
>
> On Jan 29, 2009, at 8:54 PM, bill lam wrote:
>
>> On Thu, 29 Jan 2009, Donald Chai wrote:
>>> You can replace that line with:
>>> ESCDELAY = esc_delay;
>>
>> Thanks!
>>
>> I found 2 further issues
>> 1. on my ubuntu, $TERM is xterm  (actually it is 256 color), but dvtm
>>   cannot detect it and makes it a 8 (or 16?) color rxvt.
>
> You probably need to set TERM to xterm-256color.  If 'infocmp xterm'  
> says you have 8 colors, ncurses and dvtm will think your terminal only  
> supports 8 colors.  If you don't have the proper terminfo files, then be 
> prepared for some fun with 'infocmp' and 'tic'.
>

After install terminfo for xterm-256color, 
echo $TERM inside xterm now gives xterm-256color, but after enter dvtm, 
echo $TERM now gives rxvt-256color, why not xterm-256color?. 
Moreover colors are displayed incorrectly. This is worse than using
the previous xterm setting.

>> 2. if start dvtm from dmenu typing "xterm -e dvtm" there is always an
>>   extra ^Z placed in ttyin so that when I start to type any
>>   character, the ^Z appear and I have to delete it,
>>   However if I start dvtm from xterm, it is OK.
>
> Change config.mk to use ncursesw (LIBS_UTF8).
>

I already built with unicode
$ldd dvtm
linux-vdso.so.1 =>  (0x7fffa7ffe000)
libc.so.6 => /lib/libc.so.6 (0x7f869f99c000)
libutil.so.1 => /lib/libutil.so.1 (0x7f869f799000)
libncursesw.so.5 => /lib/libncursesw.so.5 (0x7f869f552000)
/lib64/ld-linux-x86-64.so.2 (0x7f869fd0e000)
libdl.so.2 => /lib/libdl.so.2 (0x7f869f34e000)


-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩303 李商隱  嫦娥
雲母屏風燭影深  長河漸落曉星沈  嫦娥應悔偷靈藥  碧海青天夜夜心



Re: [dwm] [ANNOUNCE] dvtm-0.5

2009-01-30 Thread bill lam
The color test is ok. I found that it was vim that misinterpret the
color, By coerce &term to xterm, it's ok now.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩217 李商隱  無題二首之一
鳳尾香羅薄幾重  碧文圓頂夜深縫  扇裁月魄羞難掩  車走雷聲語未通
曾是寂寥金燼暗  斷無消息石榴紅  斑騅只繫垂楊岸  何處西南任好風



Re: [dwm] dvtm 0.5 compile failed on ubuntu 8.10 amd64

2009-02-03 Thread bill lam
On Thu, 29 Jan 2009, Donald Chai wrote:
>
> On Jan 29, 2009, at 12:49 AM, bill lam wrote:
>
>> In commit sha1 a107d3 it added a call to an undeclared set_escdelay,
>> and it fails to compile.  Is that a known issue?
>
> You can replace that line with:
>   ESCDELAY = esc_delay;
>
> By default, ncurses waits a long time to interpret escape sequences,  
> which causes problems if you use vi and type faster than a snail, so  
> this call reduces this delay.
>
> A more portable fix is to simply use the ESCDELAY environment variable  
> when running dvtm:
>   $ ESCDELAY=1 ./dvtm

HTH

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩251 金昌緒  春怨
打起黃鶯兒  莫教枝上啼  啼時驚妾夢  不得到遼西



Re: [dwm] [ANNOUNCE] dvtm-0.5

2009-02-03 Thread bill lam
On Tue, 03 Feb 2009, Marc Andre Tanner wrote:
> This should now be fixed in current git HEAD. I will probably release
> dvtm-0.5.1 next weekend. Thanks for the report.

I you have time, will you also test the screen redraw problem.  When I
use vim to edit two files and scroll up and down, it did not redraw
properly.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩188 杜甫  宿府
清秋幕府井梧寒  獨宿江城蠟炬殘  永夜角聲悲自語  中天月色好誰看
風塵荏苒音書絕  關塞蕭條行陸難  已忍伶俜十年事  強移棲息一枝安



Re: [dwm] [ANNOUNCE] dvtm-0.5

2009-02-06 Thread bill lam
On Fri, 06 Feb 2009, Marc Andre Tanner wrote:
> Thanks for the additional information. Unfortunately i am still unable to
> reproduce the problem. Does this happen for you with every file or only
> with some specific ones? Does anybody else see something similar?
> 

I compiled and tested again and the problem was gone. How ever the
initial extra ^Z  persisted.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩299 李商隱  寄令狐郎中
嵩雲秦樹久離居  雙鯉迢迢一紙筆  休問梁園舊賓客  茂陵秋雨病相如



Re: [dwm] [ANNOUNCE] dvtm-0.5

2009-02-08 Thread bill lam
On Mon, 26 Jan 2009, Marc Andre Tanner wrote:
>  * Scrollback support
> 
>By default 500 lines scrollback history is preserved, this can
>be changed in config.h or overridden by the -h command line option
>at runtime.
> 
>Scrolling is done with Mod+PageUp and Mod+PageDown.

I would like to use shift+pageup/down provided by xterm, is there any
option to use that function directly, instead of dvtm's mod+pageup
(rather inconvenient when scrollback continuously)

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩100 李白  贈孟浩然
吾愛孟夫子  風流天下聞  紅顏棄軒冕  白首臥松雲
醉月頻中聖  迷花不事君  高山安可仰  徒此挹清芬



[dwm] displaydate patch for dwm 5.4

2009-02-08 Thread bill lam
The original displaydate patch no longers work for dwm 5.4.  I hacked
it and create a new displaydate patch. Please comment if there is any
issue.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩104 李白  夜泊牛渚懷古
牛渚西江夜  青天無片雲  登舟望秋月  空憶謝將軍
余亦能高詠  斯人不可聞  明朝挂帆席  楓葉落紛紛
--- dwm2/dwm.c  2009-02-09 11:53:19.0 +0800
+++ dwm/dwm.c   2009-02-09 11:56:07.0 +0800
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1204,6 +1205,16 @@
/* main event loop */
XSync(dpy, False);
while(running && !XNextEvent(dpy, &ev)) {
+   {
+   time_t  t;
+ 
+   t = time(NULL);
+   strftime(stext, sizeof stext - 1, "%a %e %b, %I:%M%p", 
localtime(&t));
+ /* Depending on the implementation of strftime, stext might
+  * not be null terminated. */
+ stext[sizeof stext - 1] = '\0';
+   drawbar();
+   }
if(handler[ev.type])
(handler[ev.type])(&ev); /* call handler */
}


[dwm] Re: displaydate patch for dwm 5.4

2009-02-09 Thread bill lam
On Mon, 09 Feb 2009, bill lam wrote:
>   while(running && !XNextEvent(dpy, &ev)) {
> + {
> + time_t  t;
> + 
> + t = time(NULL);
> + strftime(stext, sizeof stext - 1, "%a %e %b, %I:%M%p", 
> localtime(&t));
> + /* Depending on the implementation of strftime, stext might
> +  * not be null terminated. */
> + stext[sizeof stext - 1] = '\0';
> + drawbar();
> + }
>   if(handler[ev.type])
>   (handler[ev.type])(&ev); /* call handler */
>   }

On further testing, this eats up a lot of cpu time, the following
should be better,

while(running && !XNextEvent(dpy, &ev)) {
if(handler[ev.type])
{
{
time_t  t;

t = time(NULL);
strftime(stext, sizeof stext - 1, "%a %e %b, %I:%M%p", 
localtime(&t));
/* Depending on the implementation of strftime, stext might
 * not be null terminated. */
stext[sizeof stext - 1] = '\0';
drawbar();
}
(handler[ev.type])(&ev); /* call handler */
}
}

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩150 劉禹錫  蜀先主廟
天地英雄氣  千秋尚凜然  勢分三足鼎  業復五銖錢
得相能開國  生兒不象賢  淒涼蜀故妓  來舞魏宮前



Re: [dwm] Making it a million and one

2009-02-16 Thread bill lam
On Mon, 16 Feb 2009, I. Khider wrote:
> Learning about the 'float' feature more would also be nice. 

There is another patch that you may interest. It set all client
windows to float except console programs (assumed started by xterm)


diff -r -u dwm/config.def.h dwm-bill/config.def.h
--- dwm/config.def.h2009-02-08 23:53:19.0 +0800
+++ dwm-bill/config.def.h   2009-02-08 23:47:00.0 +0800
@@ -21,7 +21,7 @@
 
 static Rule rules[] = {
/* class  instancetitle   tags mask isfloating */
-   { "Gimp", NULL,   NULL,   0,True },
+   { "XTerm",NULL,   NULL,   0,False },
{ "Firefox",  NULL,   NULL,   1 << 8,   True },
 };

diff -r -u dwm/dwm.c dwm-bill/dwm.c
--- dwm/dwm.c   2009-02-08 23:53:19.0 +0800
+++ dwm-bill/dwm.c  2009-02-08 23:51:20.0 +0800
@@ -866,6 +866,7 @@
die("fatal: could not malloc() %u bytes\n", sizeof(Client));
*c = cz;
        c->win = w;
+   c->isfloating = True;/* bill lam: change default to float */
 
/* geometry */
c->x = wa->x;
 

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩203 柳宗元  登柳州城樓寄漳汀封連四州刺史
城上高樓接大荒  海天愁思正茫茫  驚風亂颭芙蓉水  密雨斜侵薜荔牆
嶺樹重遮千里目  江流曲似九迴腸  共來百越文身地  猶自音書滯一鄉



Re: [dwm] Suckess Code Management

2009-03-12 Thread bill lam
User-Agent: Mutt/1.5.18 (2008-05-17)
[...]
Sent from my Nokia mobile phone

What mua did you use?

FWIW, I use mutt.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩218 李商隱  無題二首之二
重帷深下莫愁堂  臥後清宵細細長  神女生涯原是夢  小姑居處本無郎
風波不信菱枝弱  月露誰教桂葉香  直道相思了無益  未妨惆悵是清狂



Re: OT: Re: [dwm] Suckess Code Management

2009-03-12 Thread bill lam
On Thu, 12 Mar 2009, Jimmy Tang wrote:
> really its just mutt, i just changed my sig. to say what it says now, so
> i can get away with writing short and terse emails to people (sucks to
> waste time on writing long detailed emails) its a trick i picked up from
> kevin rose of digg.com fame.
> -- 
> Sent from my Nokia mobile phone

Nice trick.  I saw someone else use "Sent from my iMutt".

BTW, I use
cal: wryd (a frontend to remind)
rss: rss2email
fm:  vifm 

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩038 李白  關山月
明月出天山  蒼茫雲海間  長風幾萬里  吹度玉門關  漢下白登道  胡窺青海灣
由來征戰地  不見有人還  戍客望邊色  思歸多苦顏  高樓當此夜  歎息未應閑



[dwm] what is mwm hint?

2009-03-15 Thread bill lam
When I try turn on full screen in feh (an image viewer). It said

feh WARNING: Window Manager does not support MWM hints. 
To get a borderless window I have to bypass your wm.

What is mwm hint? Is that important?

dwm-5.5

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩245 元稹  行宮
寥落古行宮  宮花寂寞紅  白頭宮女在  閒坐說玄宗



[dwm] splash screen

2009-03-16 Thread bill lam
If I open xls files with command 
$gnumeric some-large-file.xls
gnumeric will load a splash screen (looks like fixed size). Then
splash screen disappeared and the main window loaded.  Apparent dwm
thought that the main screen was also a dialog and make it float.  Is
that the intended behavior?

PS. no mwm hint error message when I tested again just now.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩125 孟浩然  與諸子登峴山
人事有代謝  往來成古今  江山留勝跡  我輩復登臨
水落魚梁淺  天寒夢澤深  羊公碑字在  讀罷淚沾襟



Re: [dwm] splash screen

2009-03-16 Thread bill lam
On Mon, 16 Mar 2009, mi...@milesgroman.com wrote:
> Can you reply with your rule for gnumeric?  I occasionally use
> gnumeric, though I do not recall a splash, it does tile as expected.

static Rule rules[] = {
/* class  instancetitle   tags mask isfloating */
{ "UXTerm",NULL,   NULL,   0,False },
{ "XTerm",NULL,   NULL,   0,False },
{ "Iceweasel",  NULL,   NULL,   1 << 8,   True },
{ "Firefox",  NULL,   NULL,   1 << 8,   True },
};

No special treatment for gnumeric. It tiles correctly if starts with
no worksheet or with a small worksheet because gnumeric will only
shows a splash screen when it needs a longer time to load, about 5 to
10 seconds. I do not know the exact timing but that should be the 
intended behavior of gnumeric

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩184 杜甫  野望
西山白雪三城戍  南浦清江萬里橋  海內風塵諸弟隔  天涯涕淚一身遙
唯將遲暮供多病  未有涓埃答聖朝  跨馬出郊時極目  不堪人事日蕭條



Re: [dwm] autoconf

2009-03-19 Thread bill lam
> - die("dwm-"VERSION", © 2006-2009 dwm engineers, see LICENSE for 
> details\n");

Not related to autoconfm but I notice the copyright sign is in utf-8.
If dwm is compiled in other locale, will it display properly when
run on that locale?

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩223 沈佺期  古意呈補闕喬知之
盧家少婦鬱金香  海燕雙棲玳瑁梁  九月寒砧催木葉  十年征戍憶遼陽
白狼河北音書斷  丹鳳城南秋夜長  誰為含愁獨不見  更教明月照流黃



Re: [dwm] autoconf

2009-03-19 Thread bill lam
On Thu, 19 Mar 2009, Szabolcs Nagy wrote:
> hm probably "(c)" would be better there (and in the license)

(c) is not legalese, but spelling the whole word "copyright" and that
"c inside circle" symbol are.


ianal

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩094 杜審言  和晉陵路丞早春遊望
獨有宦遊人  偏驚物候新  雲霞出海曙  梅柳渡江春
淑氣催黃鳥  晴光轉綠蘋  忽聞歌古調  歸思欲霑巾



Re: [dwm] File browser window pop-up in web browser

2009-03-26 Thread bill lam
On Fri, 27 Mar 2009, Jeremy Cartel wrote:
> I'm currently using the latest stable version of Mozilla Firefox. However,
> whenever I click on a button that requires browsing files, such as uploading
> photos from my computer on an image hosting site, or in the Firefox
> Preferences of where I choose to save my downloads, I have to click on
> 'Browse' but the current window I have to click 'Browse' on just freezes and
> no other windows come up. I can still move the window, but I can't click on
> anything on it. I can still use the main Firefox window, though (the one
> that's up before I go into the Preferences) or any other Firefox window
> that's open. The only way to make the "frozen" window go away is to kill the
> Firefox process. I'm using dwm 4.7-3 and GTK 2.12.11-4 (this is what Debian
> reports as the versions I'm using. I obtained using apt-get install)

I suspect that the popup window is placed behind the main window.  Try
repeated modkey+k to bring that window to the front. The firefox in
debian was re-branded to iceweasel (classname 'Iceweasel'), so it may
need to change config.h and recompile dwm again to make firefox
floating.

HTH

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩249 賈島  尋隱者不遇
松下問童子  言師採藥去  只在此山中  雲深不知處



Re: [dwm] Gvim size problem

2009-04-15 Thread bill lam
Similar experience in the past but seem fixed now.  I guess it should
be a gvim problem.  You may test by comparing with other gtk based
text editors such as geany or gedit.

It should be `lines' not set correctly. try
:set lines?

for gvim, lines depends on both gfn and window height.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩226 王維  送別
山中相送罷  日暮掩柴扉  春草明年綠  王孫歸不歸



Re: [SOLVED] [dwm] Gvim size problem

2009-04-16 Thread bill lam
On Thu, 16 Apr 2009, Dusan wrote:
> On Thu, 16 Apr 2009 13:54:45 +0200 (CEST)
> "Preben Randhol"  wrote:
> 
> Does not help :(

may try adding:

set lines=200

> 
> > > Similar experience in the past but seem fixed now.  I guess it
> > > should be a gvim problem.  You may test by comparing with other gtk
> > > based text editors such as geany or gedit.
> > >
> > > It should be `lines' not set correctly. try
> > > :set lines?
> > >
> > > for gvim, lines depends on both gfn and window height.
> > 
> > I see. "set lines" report 34 when Gvim is opened and when it is
> > refreshed (by using one of the workarounds mentioned here) "set
> > lines" report 37.
> > 
> > So I search around in the vim help files and found out in the end
> > that the 'guiheadroom' is set to 50 by default. This is subtracted
> > from window height.
> > 
> > But by adding:
> > 
> > set ghr=0
> > 
> > to .gvimrc, gvim will use the whole height and the problem goes away!
> > 
> > So not a dwm problem after all... Hope it works for others too.
> > I use vim 7.2.79
> > 
> > HTH
> > 
> > Preben
> > 
> > 
> > 
> > 
> > 
> 
> 
> 

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩275 劉方平  月夜
更深月色半人家  北斗闌干南斗斜  今夜偏知春氣暖  蟲聲新透綠窗沙



Re: [SOLVED] [dwm] Gvim size problem

2009-04-17 Thread bill lam
On Fri, 17 Apr 2009, Dusan wrote:
> Thanks, tried this too. Does not work either. Can you attach
> your .vimrc / .gvimrc please?

I do not use .gvimrc, relevant portion of .vimrc

if has("gui_running")
" this line must after gfn and inside gui_running
   set lines=200 columns=124
  " right and bottom srollbars
  set guioptions+=rb
  " tab interface
  set guioptions+=em
  " disable popup dialog
  set guioptions+=c
endif


What exactly is your problem, can you post a screenshot?

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩119 王維  酬張少府
晚年惟好靜  萬事不關心  自顧無長策  空知返舊林
松風吹解帶  山月照彈琴  君問窮通理  漁歌入浦深



Re: [SOLVED] [dwm] Gvim size problem

2009-04-17 Thread bill lam
On Fri, 17 Apr 2009, Dusan wrote:
> On Fri, 17 Apr 2009 12:57:53 +0200 (CEST)
> "Preben Randhol"  wrote:
> 
> > > Here it is. Gvim is on the left -- there is huge vertical stripe on
> > > the right part of it. When I do float-unfloat gvim takes whole area
> > > and works well after that. I use 50:50 split.
> > 
> > What happens if you run: gvim -U NONE -u NONE
> > 
> > This starts gvim without loading any setup you have.
> > 
> > It is not ghr nor lines that will fix your problem, they are for the
> > vertical space and not horizontal as seem to be your problem.
> > 
> > type ":set columns"
> > in vim before and after you float unfloat the gvim to see if this
> > changes.
> > 
> > HTH
> > 
> > Preben
> > 
> > 
> 
> 104 first time, 119 after gvim gets real dimensions.
> 
> -u NONE works so I tested what makes problem in my .vimrc. It was font
> definition :(
> 
> set guifont was the problem. I don't get it but Envy Code font makes
> this problem.

You may try adding 

set lines=200 columns=200

after the line that set gfn.  It doesn't matter these values are
larger than your screem since it will resize itself to the maximum
allowable lines and columns.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩291 杜牧  泊秦淮
煙籠寒水月籠沙  夜泊秦淮近酒家  商女不知亡國恨  隔江猶唱後庭花



Re: [dwm] dwm's future

2009-04-25 Thread bill lam
On Sat, 25 Apr 2009, Christian Garbs wrote:
> On Sat, Apr 25, 2009 at 09:37:56PM +0200, yy wrote:
> 
> > I don't think nobody needs unicode glyphs in their tag names or tile
> > symbols, you wouldn't need cairo in dwm
> 
> I'm still using dwm-4.7 (because I did not yet have time to port all
> patches to the current version), but Unicode glyphs in status bar
> work, even without pango or cairo.  I have German umlauts as well as
> Japanese characters (eg. web page titles from Firefox).

I can display unicode chinese in dwm 5.xx using x11 unicode font (not
xft) without patch.  It doesn't matter if those fonts are a little
ugly compared to xft fonts.  So I don't think cairo is needed.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩146 李益  喜見外弟又言別
十年離亂後  長大一相逢  問姓驚初見  稱名憶舊容
別來滄海事  語罷暮天鐘  明日巴陵道  秋山又幾重



Re: [dwm] dwm's future

2009-04-26 Thread bill lam
On Sun, 26 Apr 2009, Haomin Wen wrote:
> Hello,
> 
> I am sorry but I really hope dwm can switch to using pango.
> 
> X fonts are broken and not well supported, at least in Ubuntu. I have six
> Chinese fonts shown in xlsfonts, but only two of them can be displayed. Two
> of them only support 16 pixel and 24 pixel size. They are too large, given
> that my dpi is as low as 75. The other font is arphic ukai, but it is not
> bitmap font, and therefore broken. WenQuanYi Bitmap Song is a nice bitmap
> font and covers many encodings, but I can use it for no obvious reason.
> 
> It seems to me that pango's powerfulness comes with almost no cost.
> 
> For programmers, there is little difference, or at least it generally will
> not increase SLOC.
> 
> For users, they just need to set the font to something like "Sans-10" or
> "Monosapce-10". It is much simpler than setting X fonts. Besides, fontconfig
> is powerful. User can set spacing, priority, antialias, hinting, and a lot
> more properties of fonts, which is necessary for certain fonts.

Can you give examples, eg url where its title failed to displayed
properly using firefox?  I use debian and previosly ubuntu and found
no problems.  Not sure why correlate  bitmap font to broken or not?
What do you mean by broken?  Can you give some screen shoot.  Does
that really matter to have antialias or hinting in the single line
bar?

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩150 劉禹錫  蜀先主廟
天地英雄氣  千秋尚凜然  勢分三足鼎  業復五銖錢
得相能開國  生兒不象賢  淒涼蜀故妓  來舞魏宮前



Re: [dwm] dwm's future

2009-04-26 Thread bill lam
On Sun, 26 Apr 2009, Haomin Wen wrote:
> I do not care antialias or hinting if there are bitmap fonts, but they
> are necessary when using some truetype fonts. I use dmenu to show how
> fonts are broken.
> 
> https://www.getdropbox.com/gallery/957017/1/dwm?h=fb5e6b

Thanks, I follow you example by echo "nei hou" but the "nei" always
become "Dc", not sure if this a problem in dmenu or not.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩013 王維  送別
下馬飲君酒  問君何所之  君言不得意  歸臥南山陲  但去莫復聞  白雲無盡時



Re: [dwm] skvm - suckless lightweight volume manager

2009-05-03 Thread bill lam
On Sun, 03 May 2009, Leandro Chescotta wrote:
> yes, i dont know how to mount as user instead of root with skvm too, i
> think a sudo umount /dev/sdX[n] with be ok, but i really like the
> devices to be mounted as my user

I only use one dvd drive and use one usb at a time.  I use pmount but I
think that you still have to add yourself to a particular group before
you can use pmount.

extract of my config.h

static const char *mountcdrom[]  = { "pmount", "/dev/cdrom", NULL };
static const char *umountcdrom[]  = { "pumount", "/dev/cdrom", NULL };
static const char *mountusb[]  = { "pmount", "/dev/sda1", NULL };
static const char *umountusb[]  = { "pumount", "/dev/sda1", NULL };
.
static Key keys[] = {
..
{ MODKEY,   XK_F1, spawn,  {.v = 
mountcdrom } },
{ MODKEY|ShiftMask, XK_F1, spawn,  {.v = 
umountcdrom } },
{ MODKEY,   XK_F2, spawn,  {.v = 
mountusb } },
{ MODKEY|ShiftMask, XK_F2, spawn,  {.v = 
umountusb } },


Mount points will be created and removed automatically under /media
of my debian.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩191 杜甫  詠懷古跡五首之二
搖落深知宋玉悲  風流儒雅亦吾師  悵望千秋一灑淚  蕭條異代不同時
江山故宅空文藻  雲雨荒臺豈夢思  最是楚宮俱泯滅  舟人指點到今疑



Re: [dwm] skvm - suckless lightweight volume manager

2009-05-04 Thread bill lam
On Sun, 03 May 2009, Leandro Chescotta wrote:
> http://github.com/dimigon/skvm/tree/master
> 
> Well, by far im lovin' it, I started the daemon and pluged in a usb
> drive and i now have the drive mounted in /media with the name gived
> by /dev/sdX[n] device name, the thing is that i dont know how to
> umount a drive, or just plugin the usb drive off is sufficient?
> without umounting? because it's not mentioned in the readme.

I don't know bcz I've never used it.  However I know it is possible to
mount usb with sync option so that the write cache is always flushed
and the daemon umount the usb /after/ it received the signal that the
usb has been unplugged.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩149 司空曙  賊平後送人北歸
世亂同南去  時清獨北還  他鄉生白髮  舊國見青山
曉月過殘壘  繁星宿故關  寒禽與衰草  處處伴愁顏



[dwm] [OT] frequency scaling and power consumption

2009-05-08 Thread bill lam
BIOS support choosing a smaller multipliers to reduce cpu frequency.
linux also supports frequency scaling such powernowd.  Some google
page said cpu throttling can not reduce power consumption.  My
experience is that it seems to lower temperature. If it can also
reduce power consumption, I'm willing to save money by running cpu at
half of its current frequency.  Any idea.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩094 杜審言  和晉陵路丞早春遊望
獨有宦遊人  偏驚物候新  雲霞出海曙  梅柳渡江春
淑氣催黃鳥  晴光轉綠蘋  忽聞歌古調  歸思欲霑巾



Re: [dwm] [OT] frequency scaling and power consumption

2009-05-08 Thread bill lam
> Personally I have noticed that locking my laptops scaling CPU to the
> lowest frequency does give quite a noticeable improvement to the battery
> life, around an extra hour on top of the usual 4~ hours and reduces the
> temperature enough to make the fan shut off . Just enabling on-demand
> scaling didn't help much as it would scale up to full frequency far to
> often. Even with the CPU locked in lo frequency mode it almost never lags.
> 
> 

Thanks all for confirmation.  Since I only have a desktop, no
notebook/netbook ;-( it is somehow difficult to verify the
improvement.  I now lock the cpu frequency to 1.1GHZ (half of the
original 2.1G).

Less heat means less power consumption, I guess someone suggested,
(I'm not sure that's why I asked for advise), that it takes more time
to complete the job at lower frequency so that actual power
consumption will in some case increase.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩187 杜甫  登樓
花近高樓傷客心  萬方多難此登臨  錦江春色來天地  玉壘浮雲變古今
北極朝庭終不改  西山寇盜莫相侵  可憐後主還祠廟  日暮聊為梁父吟



Re: [dwm] dwm and dzen2

2009-05-13 Thread bill lam
I use it to display (non-intrusively) every 30 minutes a reminder to
take a recess.  ;-)

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩090 唐玄宗  經鄒魯祭孔子而歎之
夫子何為者  栖栖一代中  地猶鄹氏邑  宅即魯王宮
歎鳳嗟身否  傷麟怨道窮  今看兩楹奠  當與夢時同



Re: [dwm] [OT] frequency scaling and power consumption

2009-05-13 Thread bill lam
On Sat, 09 May 2009, Preben Randhol wrote:
> On Sat, 9 May 2009 13:56:09 +0800
> bill lam  wrote:
> 
> > Thanks all for confirmation.  Since I only have a desktop, no
> > notebook/netbook ;-( it is somehow difficult to verify the
> > improvement.  I now lock the cpu frequency to 1.1GHZ (half of the
> > original 2.1G).
> 
> Why on earth do you want to do this to a desktop computer? It will have
> next to no effect on your power consumption. I mean you whole system
> will draw the main part of the power. Anyway, put the power saving so
> that the CPU scales with load. This makes more sense. And turn down
> the brightness on your monitor, that saves power too.

I got a wattage/current electricity meter to measure the actual power
consumption.  

assuming power factor=1, unit in watts

BIOS LOCKED AT
... 1.1GHZ ...2.2GHZ
loading ~3%   5355
mplayer/avi ~16%  6670 
./configure && make ~50%  6983
full load   >90%  7593

It appears the saving is only a few watts for light to normal loading.

I use reverse video (white on black), the lcd use about 10 watts.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩013 王維  送別
下馬飲君酒  問君何所之  君言不得意  歸臥南山陲  但去莫復聞  白雲無盡時