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

2008-12-29 Thread Jack Woehr

bill lam wrote:
I'm happy to report that fm can now display japanese and chinese for 
locale utf-8.
And I'm happy to report that the OpenBSD crew informed me I can include 
SIGWINCH
(which has a bad aroma in OpenBSD due to linked list fu) by adding the 
switch

-D_BSD_SOURCE to the Makefile. Up and running, thanks. Nice work.

--
Jack J. Woehr# I run for public office from time to time. It's like
http://www.well.com/~jax # working out at the gym, you sweat a lot, don't get
http://www.softwoehr.com # anywhere, and you fall asleep easily afterwards.




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

2008-12-28 Thread Christian Garbs
On Sat, Dec 27, 2008 at 12:31:27PM -0700, Jack Woehr wrote:

 In the mainframe world, there's a development env / filer called
 ISPF http://en.wikipedia.org/wiki/ISPF. It's old-style terminal
 oriented, so it's all nested number menus. You can nest down easy in
 one entry, e.g., entering 1.7.2.5.6 gets you to feature 6 of feature
 5 of feature 2, etc ...
 
 All the ISPF hacks know the whole tree, and can tell you, Oh, you
 want to do so-and-so? That's just 2.9.4.5 and then when you're done,
 a 1.4.4.4.1 ...

Back in the old days (before my encounters with ISPF - I'm still
thinking about writing a clone of the fine TSO file editor) I had the
entries of my Windows start menu renamed with a number prefix so I
could start programs directly by typing a sequence of numbers (using
nested subfolders of course).

Regards
Christian
-- 
Christian.Garbs.http://www.cgarbs.de

If only woman came with pull-down menus  online help.




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

2008-12-27 Thread Richard Pöttler
On Sat, Dec 27, 2008 at 12:51 AM, Ricardo Catalinas Jiménez
jimenezr...@gmail.com wrote:
 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/)

A view days ago I discovered clex (http://www.clex.sk/). Maybe you
want to give it a shot.

bye
richi


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

2008-12-27 Thread Ricardo Catalinas Jiménez
 I use vifm, what bugs did you encounter?

I liked vifm but it gave me some random segmentation fault, mostly
when the window was resized, also sometimes the screen was badly
redrawn. At least that happend to me with my Ubuntu 8.04 on amd64.

 Even compiling with ncursew, fm does not display utf8 properly, is it
 a known issue?

I'm gonna look that, maybe I should change a few ncurses calls to
support wide characters.

-- 
Ricardo



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

2008-12-27 Thread Ricardo Catalinas Jiménez
 A view days ago I discovered clex (http://www.clex.sk/). Maybe you
 want to give it a shot.

I tried it after vifm but what I really wanted was a very minimal
filesystem viewer with vim-like commands, that's why I wrote fm.

-- 
Ricardo



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

2008-12-27 Thread Jack Woehr

Ricardo Catalinas Jiménez wrote:

I tried it after vifm but what I really wanted was a very minimal
filesystem viewer with vim-like commands, that's why I wrote fm.
  


Cute, from screenshot and description, fm reminds me of FULIST on z/VM.

But it doesn't build on OpenBSD:

   $ gmake CC=gcc
   ctags fm.c fs.c ui.c cmd.c fm.h
   gcc -g -Wall -pedantic -ansi $(pkg-config --cflags glib-2.0)   -c -o
   fm.o fm.c
   fm.c: In function `set_sighandlers':
   fm.c:60: error: `SIGWINCH' undeclared (first use in this function)
   fm.c:60: error: (Each undeclared identifier is reported only once
   fm.c:60: error: for each function it appears in.)
   fm.c: In function `unset_sighandlers':
   fm.c:73: error: `SIGWINCH' undeclared (first use in this function)
   gmake: *** [fm.o] Error 1

which is kind of weird because even if I specifically #include 
sys/signal.h

in which `SIGWINCH' is declared it doesn't find it. Haven't had time yet
to dig in deep.

--
Jack J. Woehr# I run for public office from time to time. It's like
http://www.well.com/~jax # working out at the gym, you sweat a lot, don't get
http://www.softwoehr.com # anywhere, and you fall asleep easily afterwards.




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

2008-12-27 Thread Ian Daniher
Hey All,
What's wrong with midnight commander? It's an oldy but a goody. Two pane
file interface, has a boatload of features. Is it the bloat of these other
features that you're trying to avoid?

Personally, I don't use a file manager. A straight bash prompt with cd, ls,
tree etc is fine for day to day use.
Instead of the binary tree program, I found this bash-oneliner replacement:
find . -print | sed -e 's;[^/]*/;|;g;s;|; |;g'
It's about the same speed as the regular program and more suckless then a
dedicated binary.(IMO)
--
Ian Daniher

On Sat, Dec 27, 2008 at 10:54 AM, Jack Woehr j...@well.com wrote:

 Ricardo Catalinas Jiménez wrote:

 I tried it after vifm but what I really wanted was a very minimal
 filesystem viewer with vim-like commands, that's why I wrote fm.



 Cute, from screenshot and description, fm reminds me of FULIST on z/VM.

 But it doesn't build on OpenBSD:

   $ gmake CC=gcc
   ctags fm.c fs.c ui.c cmd.c fm.h
   gcc -g -Wall -pedantic -ansi $(pkg-config --cflags glib-2.0)   -c -o
   fm.o fm.c
   fm.c: In function `set_sighandlers':
   fm.c:60: error: `SIGWINCH' undeclared (first use in this function)
   fm.c:60: error: (Each undeclared identifier is reported only once
   fm.c:60: error: for each function it appears in.)
   fm.c: In function `unset_sighandlers':
   fm.c:73: error: `SIGWINCH' undeclared (first use in this function)
   gmake: *** [fm.o] Error 1

 which is kind of weird because even if I specifically #include
 sys/signal.h
 in which `SIGWINCH' is declared it doesn't find it. Haven't had time yet
 to dig in deep.

 --
 Jack J. Woehr# I run for public office from time to time. It's
 like
 http://www.well.com/~jax http://www.well.com/%7Ejax # working out at the
 gym, you sweat a lot, don't get
 http://www.softwoehr.com # anywhere, and you fall asleep easily
 afterwards.



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

2008-12-27 Thread Jack Woehr

Ian Daniher wrote:
What's wrong with midnight commander? It's an oldy but a goody. 


Using it for at least 15 years (and Norton Commander on MS-DOS before
that). I use mc every day. It's my most important file tool. I even keep 
older
(and simpler) revs of MC around so I can compile it on weird  operating 
systems.


Midnight Commander forever!!

--
Jack J. Woehr# I run for public office from time to time. It's like
http://www.well.com/~jax # working out at the gym, you sweat a lot, don't get
http://www.softwoehr.com # anywhere, and you fall asleep easily afterwards.




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

2008-12-27 Thread markus schnalke
[2008-12-27 11:48] Ian Daniher it.dani...@gmail.com
 
 What's wrong with midnight commander? It's an oldy but a goody. Two pane
 file interface, has a boatload of features. Is it the bloat of these other
 features that you're trying to avoid?

This too, but worst is its usability. The keystrokes are a real mess.


 Instead of the binary tree program, I found this bash-oneliner replacement:
 find . -print | sed -e 's;[^/]*/;|;g;s;|; |;g'
 It's about the same speed as the regular program and more suckless then a
 dedicated binary.(IMO)

but it's less flexible than `tree'[0] for example, which can print
sizes, ownership, or permissions with specifying one parameter.


meillo


[0] http://mama.indstate.edu/users/ice/tree/


signature.asc
Description: Digital signature


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

2008-12-27 Thread Jack Woehr

markus schnalke wrote:

[2008-12-27 11:48] Ian Daniher it.dani...@gmail.com
  
What's wrong with midnight commander? It's an oldy but a goody. 



This too, but worst is its usability. The keystrokes are a real mess.
  

Unless you know them all from doing them over and over again :)

My IDE for Java web app development is:

   OpenBSD:dwm:mxt:mc:jedit

Of course I've written a lot of scripts and mc F2 menu entries
and even an m4 mode for jedit.

In the mainframe world, there's a development env / filer called
ISPF http://en.wikipedia.org/wiki/ISPF. It's old-style terminal 
oriented, so it's all nested number

menus. You can nest down easy in one entry, e.g., entering
1.7.2.5.6 gets you to feature 6 of feature 5 of feature 2, etc ...

All the ISPF hacks know the whole tree, and can tell you,
Oh, you want to do so-and-so? That's just 2.9.4.5 and then when
you're done, a 1.4.4.4.1 ...

So I get where 'fm' is coming from, because I've been there!

PS The 'suckless' philosophy is my favorite programmer's riff
in the last ten years. Keep up the good work. Living in dwm
on OpenBSD, programming is fun again.

--
Jack J. Woehr# I run for public office from time to time. It's like
http://www.well.com/~jax # working out at the gym, you sweat a lot, don't get
http://www.softwoehr.com # anywhere, and you fall asleep easily afterwards.




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

2008-12-27 Thread Ricardo Catalinas Jiménez

On Sat, 27 Dec 2008 16:54:53 +0100, Jack Woehr j...@well.com wrote:

But it doesn't build on OpenBSD:

$ gmake CC=gcc
ctags fm.c fs.c ui.c cmd.c fm.h
gcc -g -Wall -pedantic -ansi $(pkg-config --cflags glib-2.0)   -c -o
fm.o fm.c
fm.c: In function `set_sighandlers':
fm.c:60: error: `SIGWINCH' undeclared (first use in this function)
fm.c:60: error: (Each undeclared identifier is reported only once
fm.c:60: error: for each function it appears in.)
fm.c: In function `unset_sighandlers':
fm.c:73: error: `SIGWINCH' undeclared (first use in this function)
gmake: *** [fm.o] Error 1

which is kind of weird because even if I specifically #include  
sys/signal.h

in which `SIGWINCH' is declared it doesn't find it. Haven't had time yet
to dig in deep.


At this moment I don't have OpenBSD installed to try it. But I removed
the -ansi and -pedantic flags from the published code because they are
too strict for the casual user and they can cause too much trouble.

CFLAGS = -O2 -Wall $$(pkg-config --cflags glib-2.0)
LDFLAGS = -s -lncurses $$(pkg-config --libs glib-2.0)

--
Ricardo



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

2008-12-27 Thread Ricardo Catalinas Jiménez


On Sat, 27 Dec 2008 08:44:14 +0100, bill lam cbill@gmail.com 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.

--
Ricardo



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

2008-12-27 Thread Jack Woehr

Ricardo Catalinas Jiménez wrote:

At this moment I don't have OpenBSD installed to try it. But I removed
the -ansi and -pedantic flags from the published code because they are
too strict for the casual user and they can cause too much trouble.

CFLAGS = -O2 -Wall $$(pkg-config --cflags glib-2.0)
LDFLAGS = -s -lncurses $$(pkg-config --libs glib-2.0)

Same problem even with. This is something easy, I'm sure. I just haven't
put more than a few minutes into it yet. When I get some time I'll look
into it.

--
Jack J. Woehr# I run for public office from time to time. It's like
http://www.well.com/~jax # working out at the gym, you sweat a lot, don't get
http://www.softwoehr.com # anywhere, and you fall asleep easily afterwards.




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 cbill@gmail.com 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] [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 李商隱  落花
高閣客竟去  小園花亂飛  參差連曲陌  迢遞送斜暉
腸斷未忍掃  眼穿仍欲歸  芳心向春盡  所得是沾衣