Re: [dwm] dmenu_run problem

2008-02-16 Thread Jukka Salmi
I notice that this has been reverted in the meantime, but just as a
comment:

Szabolcs Nagy -- dwm (2008-02-11 12:08:20 +0100):
 there was recently two dmenu problems on irc and both was due to
 'name=value' does not work in certain shells (csh, tcsh, ..)
 
 i'm not a shell expert and didn't check the standard, but this works fine:
 
 - exe=`dmenu_path | dmenu $*`  exec $exe
 + set exe=`dmenu_path | dmenu $*`  exec $exe

This does not do what you want for Bourne-compatible shells:
set exe=`cmd` sets the first positional parameter ($1) to
exe=cmd_output (where cmd_output is the output of the command cmd)
and does _not_ set $exe. Thus exec is executed without any arguments,
i.e. the program you selected using dmenu is not run.


Regards, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~



Re: [dwm] We need a different Xinerama implementation

2008-02-16 Thread hiro
On 2/15/08, Ralph E. Carter [EMAIL PROTECTED] wrote:

  I'm not sure about this idea. I don't like this idea so much
  because it would increase complexity and decrease
  predictability.
 
  Kind regards,
  --
   Anselm R. Garbe http://www.suckless.org/ GPG key: 0D73F361
 

 Yes.
 I vote for simplicity and predictability.
 Thanks.
 _
 Climb to the top of the charts! Play the word scramble challenge with star 
 power.
 http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_jan


Simplicity has become too much of a religion here. The differences are
quite small, and the only really simple solution is not changing
everything. You shouldn't just believe!
I vote for thoughtfulness.

-- 
hiro



Re: [dwm] dwm on openmoko

2008-02-16 Thread 陈研深
could a780 run currnt kernel?

2008/2/16, Enno Gottox Boland [EMAIL PROTECTED]:

 I also managed to get dwm run on Motorola a780.

 Here are my screenshots:

 http://s01.de/~gottox/files/img/a780.jpg
 http://s01.de/~gottox/files/img/a780_scrot.png


 2008/2/15, Engin Tola [EMAIL PROTECTED]:
  pancake [EMAIL PROTECTED] writes:
 
   I have recently adquired an OpenMoko device (neo1973) and managed to
 build dwm
   4.7 on it:
  
 http://news.nopcode.org/mokodwm.png
 http://news.nopcode.org/mokodwm2.png
  
   I find quite interesting the zoom feature which makes the interface
 quite
   interesting for finger use together with the mouse-on-title patch, but
 there are
   some problems, i'll think/try to fork dwm for finger use and use
 openmoko and
   n810 as testing environments.
  
   The most anoying problem is the miss of right and center buttons and
 some
   openmoko-related problems that I think are related to a self modified
 matchbox
   which sucks to me..
  
   I think is funny to test things like that, btw i think that current
 free
   environments for mobile gadgets are slow and bloated..android looks
 fast and
   stable, but i think that a minimalistic approach would be interesting
 for a
   phone interface.
  
   a problem i found with openmoko ...and probably for other environments
 is that
   the keyboard popups only when a entry widget is selected, the keyboard
 should
   not get focus and become a floating window, but dwm does not and the
 keyboard
   applications starts to start/stop all the time having to zoom single
 to return
   to a stable state. weird. Is any X11 event to avoid a window taking
 focus?
   should be this managed by dwm? I shoud have to get a look on the
 virtual
   keyboard code..
  
   Small devices claim small software :)
  
   my line to build dwm for openmoko was:
  
   $ make CC=$CC
   CFLAGS=-I.
 -I/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/include/
   -DVERSION=4.7 LDFLAGS=-L
   /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/lib -Wl,-R
   /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/lib -lX11
  
   after setuping the environment
  
   have fun!
 
  beautiful ;)
 
  
 --pancake
  
 
  --
  engin tola - http://cvlab.epfl.ch/~tola
  emacs  - http://www.gnu.org/software/emacs/tour
 
 


 --
 http://www.gnuffy.org - Real Community Distro
 http://www.gnuffy.org/index.php/GnuEm - Gnuffy on Ipaq (Codename Peggy)




-- 
/* 来自深的问候 */


[dwm] [dvtm] CO_BEL patch for madtty.c

2008-02-16 Thread Leonardo Taccari
Hello Marc and all dvtm lovers (and users),
with dvtm I wasn't able to listen the '\a' so I saw that it was a feature,
not a bug.
I saw that madtty.c need ncurses.h, so we can use the beep()[0][1]
X/Open Curses function for this stuff.

I simply added the beep() invocation on the madtty_process_nonprinting()
routine (case CO_BEL).


I also hope to commit wip/dvtm on pkgsrc[2] this weekend (pkgsrc is the
NetBSD packages system, but it is very very very portable so it runs on
a lot other OSes as well). My local package works well, but I should add
options.mk for selecting ncurses or ncursesw.


HTH.


[0] NetBSD Curses library: curses_tty(3)
[1] ncurses library: curs_beep(3X)
[2] http://www.pkgsrc.org/


Ciao, Leonardo
-- 
 Leonardo Taccari (leot) | http://leot.netsons.org/
--- madtty.c.orig   2008-02-14 16:55:42.0 +0100
+++ madtty.c2008-02-14 17:04:12.0 +0100
@@ -663,9 +663,13 @@
 new_escape_sequence(t);
 break;
 
-  case C0_BEL:
-/* do nothing for now... maybe a visual bell would be nice? */
-break;
+  case C0_BEL: /* bell */
+ /* 
+   * If possible play our dear speaker or flash the screen
+   * (otherwise do nothing).
+   */
+ (void)beep();
+ break;
 
   case C0_BS:
 if (t-curs_col  0)


pgpPDqAfeVE00.pgp
Description: PGP signature


Re: [dwm] [dvtm] CO_BEL patch for madtty.c

2008-02-16 Thread Szabolcs Nagy
On 2/16/08, Leonardo Taccari [EMAIL PROTECTED] wrote:
 NetBSD packages system, but it is very very very portable so it runs on

very portable.. except it doesn't conform to the fhs (uses /usr/pkg)

(: sorry i couldn't resist to make a naughty comment..



Re: [dwm] [dvtm] CO_BEL patch for madtty.c

2008-02-16 Thread Leonardo Taccari
Hello Szabolcs,

On Sat, Feb 16, 2008 at 07:30:02PM +0100, Szabolcs Nagy wrote:
 very portable.. except it doesn't conform to the fhs (uses /usr/pkg)
This isn't true (AFAIK). Please read the fine pkgsrc documentation[0].
You can set ${LOCALBASE}[1] to /usr/local and in this way is
FHS-compliant[2].


 (: sorry i couldn't resist to make a naughty comment..
Eheh, don't worry. ;-)


[0]: http://www.netbsd.org/docs/pkgsrc/
[1]: http://www.netbsd.org/docs/pkgsrc/configuring.html#general-configuration
[2]: http://www.pathname.com/fhs/pub/fhs-2.3.html#USRLOCALLOCALHIERARCHY


Ciao, Leonardo
-- 
 Leonardo Taccari (leot) | http://leot.netsons.org/


pgpHz7x0FrKAo.pgp
Description: PGP signature


[dwm] [dvtm-patch]: Mouse support optional

2008-02-16 Thread Claudio M. Alessi
Hi,
  i started to read the dvtm source code only few days ago
in the hope to be able to contribute with the project soon
which, to me, is one of the best tool we could have today.
Yes, i'm serious.

Since i don't need the mouse support at all i made such
support optional with few lines of preprocessor code.
This allow to toggle the support by adding/removing the
relative comment into the config.mk file.

Feel free to include this little patch into the main code
or discard it at all if you think it's not much usefull
(in which case i'll have to remove the mouse code by hand
before compile any new release of dvtm).

I also disabled the debug informations which may be easily
toggled in a similar way to the mouse support in config.mk

Hope this helps and thanks to providing us a great tool as
dvtm!


-- 
Claudio M.

-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCS/MU d-@ s: a-- C++(+++) UB++$ P+ !L E--- W++(+++)
N+@ o-- K? w+@ O-@ M- V? PS+@ PE+@ Y+ PGP t(-)@ 5?
X+ R? tv-- b+ DI-- D? G e+@ h--@ r y*
--END GEEK CODE BLOCK--

--- ../dvtm-0.4.orig/dvtm.c	2008-02-16 12:09:13.191369197 +0100
+++ dvtm.c	2008-02-16 12:13:44.352315696 +0100
@@ -71,10 +71,12 @@
 	Action action;
 } Key;
 
+#if defined(HANDLE_MOUSE)
 typedef struct {
 	mmask_t mask;
 	Action action;
 } Button;
+#endif /* HANDLE_MOUSE */
 
 enum { BarTop, BarBot, BarOff };
 
@@ -106,11 +108,14 @@
 void setlayout(const char *args[]);
 void redraw(const char *args[]);
 void zoom(const char *args[]);
+
+#if defined(HANDLE_MOUSE)
 /* special mouse related commands */
 void mouse_focus(const char *args[]);
 void mouse_fullscreen(const char *args[]);
 void mouse_minimize(const char *args[]);
 void mouse_zoom(const char *args[]);
+#endif /* HANDLE_MOUSE */
 
 void clear_workspace();
 void draw_all(bool border);
@@ -669,6 +674,7 @@
 	return NULL;
 }
 
+#if defined(HANDLE_MOUSE)
 void
 mouse_focus(const char *args[]){
 	focus(msel);
@@ -727,6 +733,7 @@
 			buttons[i].action.cmd(buttons[i].action.args);
 	msel = NULL;
 }
+#endif /* HANDLE_MOUSE */
 
 Client*
 get_client_by_pid(pid_t pid){
@@ -802,10 +809,14 @@
 	start_color();
 	noecho();
	keypad(stdscr, TRUE);
+
+#if defined(HANDLE_MOUSE)
 	for(i = 0, mask = 0; i  countof(buttons); i++)
 		mask |= buttons[i].mask;
 	if(mask)
 		mousemask(mask, NULL);
+#endif /* HANDLE_MOUSE */
+
 	raw();
 	madtty_init_colors();
 	madtty_init_vt100_graphics();
@@ -931,9 +942,12 @@
 			int code = getch();
 			Key *key;
 			if(code = 0){
+#if defined(HANDLE_MOUSE)
 if(code == KEY_MOUSE){
 	handle_mouse();
-} else if(is_modifier(code)){
+} else
+#endif /* HANDLE_MOUSE */
+if(is_modifier(code)){
 	int mod = code;
 	code = getch();
 	if(code = 0){
--- ../dvtm-0.4.orig/config.h	2008-02-16 12:09:13.191369197 +0100
+++ config.h	2008-02-16 12:13:45.072360697 +0100
@@ -116,12 +116,14 @@
  * REPORT_MOUSE_POSITIONreport mouse movement
  */
 
+#if defined(HANDLE_MOUSE)
 Button buttons[] = {
 	{ BUTTON1_CLICKED,{ mouse_focus,  { NULL  } } },
 	{ BUTTON1_DOUBLE_CLICKED, { mouse_fullscreen, { [ ] } } },
 	{ BUTTON2_CLICKED,{ mouse_zoom,   { NULL  } } },
 	{ BUTTON3_CLICKED,{ mouse_minimize,   { NULL  } } },
 };
+#endif /* HANDLE_MOUSE */
 
 /* gets executed when dvtm is started */
 Action actions[] = {
--- ../dvtm-0.4.orig/config.mk	2008-02-16 12:09:13.191369197 +0100
+++ config.mk	2008-02-16 12:13:52.912850695 +0100
@@ -13,6 +13,12 @@
 CFLAGS = -std=c99 -Os ${INCS} -DVERSION=\${VERSION}\ -DNDEBUG
 LDFLAGS = -L/usr/lib -L/usr/local/lib ${LIBS}
 
+# Debug informations
+#CFLAGS += -DNDEBUG
+
+# Mouse handling
+#CFLAGS += -DHANDLE_MOUSE
+
 DEBUG_CFLAGS = -std=c99 -O0 -g -ggdb ${INCS} -Wall -DVERSION=\${VERSION}\
 
 CC = cc