[dev] Perl/Linux

2012-08-16 Thread Lorenzo Bolla
Now, this is what we all need and love!
http://perllinux.sourceforge.net/

-- 
Lorenzo Bolla
http://lbolla.info



[dev] floating windows on background in tiled/monocle mode

2012-03-15 Thread Lorenzo Bolla
Hi all,

if on Tiled or Monocle mode, if I choose a window and put it in Floating
mode (with Mod1+Shift+Space, for example, or by resizing it), the windows
goes in the background and it's covered by the other Tiled windows.
Floating windows used to sit above any other Tiled/Monocled windows: has
this behavior changed or am I misconfigured somehow?

Thanks,
L.


Re: [dev] Suckless Smartphone?

2011-06-07 Thread Lorenzo Bolla
On Tue, Jun 7, 2011 at 3:25 PM, Ethan Grammatikidis wrote:

> On Tue, 7 Jun 2011 12:45:10 +0100
> Nick  wrote:
>
> > On Tue, Jun 07, 2011 at 12:39:53PM +0100, Guilherme Lino wrote:
> > > never tried it, but i would like to. And i really support the idea
> because
> > > there more trees falling in a day than growing in a year..
> >
> > I'm pretty sure if you make a case for ebook readers on
> > environmental grounds you will fail. They use a lot of
> > energy and resources (human and material) to produce.
>
> I wonder if it would stack up any differently if ebook readers were built
> to last (and their owners bought them with that in mind). I'm not sure.. I
> think even the cheapest books will outlast the best batteries... I dunno.
> All I know for sure is I have some very cheap paperbacks which are at least
> 20 years old, and my ~5 year old Zaurus is also fine, apart from the iffy
> charging cable. I've read loads of ebooks on that Zaurus, all plain-text,
> fmt(1) used to fit them to 63 columns, a fixed-pitch bitmap font called neon
> of all things, and at 230dpi it didn't even need anti-aliasing. Mostly I
> read them at night, but the screen was fine anywhere indoors.
>
>
What I'll never get about eBooks is that they can store ~3000 books and
surely more in the future.
3000 books / (1 book/week) = 57 years.
Most of us will already be dead by then... or the eReader itself will be...


Re: [dev] Suckless Smartphone?

2011-06-06 Thread Lorenzo Bolla
On Mon, Jun 6, 2011 at 5:20 PM, Guilherme Lino  wrote:

> i would recomend a cheap phone, that make calls and sends smSs..
>
> whene you dont have your pc, read a book.. i think thats the most suckless
> way
>
>
Amen.



> --
> Guilherme Lino
>
>
>
>>
>


Re: [dev] [surf] browser identification

2011-03-25 Thread Lorenzo Bolla
I believe you simply need to set a SURF_USERAGENT env variable?
L.


On Fri, Mar 25, 2011 at 3:15 PM, Swiatoslaw Gal  wrote:

> Hi,
>
> imbeciles coding sucking webpages check how the browser identifies itself.
> And if it is not sucking browser instead of desired content I get some
> ad about downloading sucking software.
>
> All I can check is for example aruljohn.com which tells me Your browser is
> Unknown Browser.  At the same time luakit results with Mozilla 5.0 while
> jumanji with Safari 5.0.  But I am too blind to find anything relevant in
> their codes.
>
> How can I patch surf to identify as one of those?
>
> Thanks,
> s.
>
>


[dev] Re: [dev] Man coloring. [was: Usage, -h, --help, hel p, synopsis, …]

2010-08-18 Thread Lorenzo Bolla
On Wed, Aug 18, 2010 at 7:27 AM, Antoni Grzymala wrote:

> Suraj Kurapati dixit (2010-08-17, 20:49):
>
> > > As for bold, fortunately my terminal has it disabled,
> >
> > I set up nice colors for bold and underline so things are easy to read
> > (see the attached screenshot).  If anyone is interested, my Xdefaults
> > file is here:
> >
> >   http://github.com/sunaku/home/blob/master/.Xdefaults
>
> Strange thing is that my man doesn't get colorized (only bolded via
> brightening up) in X terminal emulators. In the linux console I get
> proper colors. Any hints how to enable coloring in X terminals?
>
> --
> [a]
>
>
I believe the options to colorize man are
Rxvt.colorBD: #8ac6f2
Rxvt.colorUL: #95e454

L.


Re: [dev] How to copy URL from surf?

2010-06-28 Thread Lorenzo Bolla
from `man surf`:
Ctrl-y Copies current URI to primary selection.
(i.e. in the clipboard)

On Mon, Jun 28, 2010 at 8:48 AM, Martin Kopta  wrote:
> Is in surf any equivalent to copying URL from address bar? Sometimes I found
> interesting site and I want to copy the URL (paste it in terminal, ..), but I 
> do
> not know how. For example, wikipedia articles. When I read something, how do I
> get URL of the article easily? Thanks..
>
>



[dev] gridmode for dwm-5.8.2

2010-06-02 Thread Lorenzo Bolla
As a simple exercise, I've adapted the "historical" gridmode to dwm-5.8.2
L.
diff -r 62791cc97f88 config.def.h
--- a/config.def.h	Tue Jun 01 17:39:26 2010 +0100
+++ b/config.def.h	Wed Jun 02 13:42:49 2010 +0100
@@ -26,11 +26,13 @@
 static const float mfact  = 0.55; /* factor of master area size [0.05..0.95] */
 static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
 
+#include "grid.c"
 static const Layout layouts[] = {
 	/* symbol arrange function */
 	{ "[]=",  tile },/* first entry is default */
 	{ "><>",  NULL },/* no layout function means floating behavior */
 	{ "[M]",  monocle },
+	{ "+++",  grid },
 };
 
 /* key definitions */
diff -r 62791cc97f88 grid.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +
+++ b/grid.c	Wed Jun 02 13:42:49 2010 +0100
@@ -0,0 +1,28 @@
+void
+grid(Monitor *m) {
+	unsigned int i, n, cx, cy, cw, ch, aw, ah, cols, rows;
+	Client *c;
+
+	for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next))
+		n++;
+
+	/* grid dimensions */
+	for(rows = 0; rows <= n/2; rows++)
+		if(rows*rows >= n)
+			break;
+	cols = (rows && (rows - 1) * rows >= n) ? rows - 1 : rows;
+
+	/* window geoms (cell height/width) */
+	ch = m->wh / (rows ? rows : 1);
+	cw = m->ww / (cols ? cols : 1);
+	for(i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next)) {
+		cx = m->wx + (i / rows) * cw;
+		cy = m->wy + (i % rows) * ch;
+		/* adjust height/width of last row/column's windows */
+		ah = ((i + 1) % rows == 0) ? m->wh - ch * rows : 0;
+		aw = (i >= rows * (cols - 1)) ? m->ww - cw * cols : 0;
+		resize(c, cx, cy, cw - 2 * c->bw + aw, ch - 2 * c->bw + ah, False);
+		i++;
+	}
+}
+


Re: [dev][surf]

2010-04-12 Thread Lorenzo Bolla
On Mon, Apr 12, 2010 at 4:31 PM, Bjartur Thorlacius wrote:

> On 4/8/10, Jacob Todd  wrote:
> > On Wed, Apr 07, 2010 at 06:22:49PM +, Bjartur Thorlacius wrote:
> >> ...
> >> P.S. I'm new here. Why's XML so evil? If you don't have to test for
> >> well-formed and validness, that is.
> > http://harmful.cat-v.org/software/xml/
> We can all agree that XML is insane as a interchange format between
> databases. But for basic markup, when markdown/(re)StructuredText
> sn't a fit, it allows one to use a (hopefully simple) generic parser.
> Sexp(r)s are bloated with type info, and have a name which can get
> them confused with structured-expressions. XML is (ugh)
> SGML-compatible and quite readable if used sparsily, and only used to
> add semantic info to content in another language such as English or
> SPARC-assembly. Some Tcl-based syntax would maybe suck less, but is it
> worth it to get rid of XML-style closing tags?
>
> title lolcats
> author Thorlacius Bjartur
> author Friend Imaginary
> para {
>This is a slightly better alternative to XML.
>}
> para "XML at least doesn't require quotes:
>  [ http://w3.org/TR/xml ]"
> para [ /bin/games/fortune ]
> # URIs enclosed in []s get replaced by the resource.
>
>
S-expr (http://en.wikipedia.org/wiki/S-expression) would be even better. But
this has been said sooo many times...


Re: [dev] terminal that accepts any size

2010-03-23 Thread Lorenzo Bolla
On Tue, Mar 23, 2010 at 1:16 PM, anonymous  wrote:

> You can use gvim if you really need vim.
>

True, but I edit on remote machines which might not have X.



> Instead of screen you can use your tiling window manager.
>

Screen is something more than a "textual" window manager, and surely not the
reason why I use it.

L.


Re: [dev] terminal that accepts any size

2010-03-23 Thread Lorenzo Bolla
To be honest, I did indeed try sam and acme, but I went back to vim.

I don't want to start another boring flame war: vim is just more convenient
for me and it comes to a set of pre-implemented features that I like (and
don't want to implement myself for sam or acme).

As the saying about "democracy" in politics, "vim is not perfect, but I
haven't found anything better, yet".

"Screen" is another utility I wasn't able to use with 9term, maybe more
useful than vim ;-)

L.

On Tue, Mar 23, 2010 at 9:55 AM, hiro <23h...@googlemail.com> wrote:

> Sorry, it's a different and incompatible concept.
> There is no need for less any more (Toggle scrolling with middle-click
> scroll).
> If you need vi it's the wrong way. But since you got that far you
> could also try acme and sam as an alternative :P
>
> On 3/23/10, Lorenzo Bolla  wrote:
> > I gave 9term a quick try, but I couldn't get neither vim nor less work
> > properly with it (they both complain about 9term being an "unknown"
> > terminal).
> >
> > Is any of you guys using 9term with either vim or less?
> >
> > Thanks!
> > L.
> >
> >
> > On Mon, Mar 22, 2010 at 6:21 PM, Jonas Bernoulli 
> wrote:
> >
> >> On Mon, Mar 22, 2010 at 19:19, Connor Lane Smith 
> wrote:
> >> > On 22 March 2010 18:13, Jonas Bernoulli  wrote:
> >> >> On Sat, Mar 20, 2010 at 21:40, hiro <23h...@googlemail.com> wrote:
> >> >> > 9term
> >> >>
> >> >> I couldn't download it from http://www.cs.usyd.edu.au/~matty/9term/.
> >> >> Where else should I get it?
> >> >
> >> > It's distributed with Plan 9 Port: http://swtch.com/plan9port/
> >>
> >> Thanks. It's really about time that I try that out.
> >>
> >>
> >
>
>


Re: [dev] terminal that accepts any size

2010-03-23 Thread Lorenzo Bolla
I gave 9term a quick try, but I couldn't get neither vim nor less work
properly with it (they both complain about 9term being an "unknown"
terminal).

Is any of you guys using 9term with either vim or less?

Thanks!
L.


On Mon, Mar 22, 2010 at 6:21 PM, Jonas Bernoulli  wrote:

> On Mon, Mar 22, 2010 at 19:19, Connor Lane Smith  wrote:
> > On 22 March 2010 18:13, Jonas Bernoulli  wrote:
> >> On Sat, Mar 20, 2010 at 21:40, hiro <23h...@googlemail.com> wrote:
> >> > 9term
> >>
> >> I couldn't download it from http://www.cs.usyd.edu.au/~matty/9term/.
> >> Where else should I get it?
> >
> > It's distributed with Plan 9 Port: http://swtch.com/plan9port/
>
> Thanks. It's really about time that I try that out.
>
>


Re: [dev] Non-tiling WM that can do tags?

2010-01-31 Thread Lorenzo Bolla
http://dwm.suckless.org/
using Monocle or Floating layout.
L.

On Sun, Jan 31, 2010 at 8:47 PM, Nathan Neff  wrote:

> Does anyone know of a non-tiling window manager that allows you to tag
> windows like wmii does?
>
> Perhaps a plugin for Openbox where I can do wmii-like tag switching, and
> tag a client with multiple tags so that's it's visible on multiple
> desktops/tags?
>
> Thanks,
> --Nate
>


Re: [dev][dwm] window tagging

2010-01-12 Thread Lorenzo Bolla
open your browser to youtube; then use xprop to get WM_CLASS and WM_NAME for
that window:
$> xprop | grep -e "WM_CLASS(STRING)" -e "WM_NAME(STRING)"

in config.h put:
{ ,  NULL,  ,   0,  True,  -1 },

hth,
L.


On Tue, Jan 12, 2010 at 7:04 AM, Deepanjan Kesh  wrote:

> Hi!
>
> I am new to dwm and maybe this question already has a wiki page, but
> since I didn't find anything, I would like the help of the community.
>
> I want to do the following - I want to open my uzbl or iceweasel
> browser in non-floating mode, but if I am visiting youtube.com, it
> should become floating. So, I tried the following in the rules section
> in config.h -
>
> { "Uzbl-core",  NULL,   "YouTube",  0,   True,   -1 },
> { "Iceweasel",  NULL,   "YouTube",  0,   True,   -1 }
>
> but it does not seem to work. Can anyone point out the problem?
>
> - Deepanjan
>
>


[dev] [surf] segmentation fault

2009-10-31 Thread Lorenzo Bolla
Hi all,

I've tried to compile the latest surf version with libwebkit-1.1.15.3-1 and
gtk-1.2.10-9.
Compilation went fine, but running surf from the command line gets me a
"Segmentation fault".
Any hints?
I'm running Arch Linux 2.6.31-ARCH

Thanks,
L.


Re: [dev] [surf] gtk hints patch

2009-10-21 Thread Lorenzo Bolla
sorry, I was too quick to type diffthanks,
L.

On Wed, Oct 21, 2009 at 11:42 AM, pancake  wrote:

> This is a reversed patch. Next time use unified diff format please. (diff
> -u)
>
> Or just 'hg diff'.
>
> This is not a hard patch..but next time try to send the patch in a correct
> way.
>
>
> Lorenzo Bolla wrote:
>
>> on dwm's tiled layout, surf window's dimensions do not obey dwm rules,
>> because gtk hints are missing.
>> here is patch to add them.
>> L.
>>
>
>
>


[dev] [surf] gtk hints patch

2009-10-21 Thread Lorenzo Bolla
on dwm's tiled layout, surf window's dimensions do not obey dwm rules,
because gtk hints are missing.here is patch to add them.
L.


hints-patch.diff
Description: Binary data


Re: [dev] [surf] Scrolling bug

2009-09-20 Thread Lorenzo Bolla
A patch was posted on hackers ml.
http://lists.suckless.org/hackers/0909/2178.html

L.


On Fri, Sep 18, 2009 at 5:20 PM, joshua shaw  wrote:

> On 9/18/09, Claudio M. Alessi  wrote:
> > On Thu, Sep 17, 2009 at 11:27:41PM +0200, pancake wrote:
> >> Flash sucks
> > Yeah. It may be the problem. If not, no matter: flash sucks anyway :-)
> >
> >
> > Regards,
> > Claudio M. Alessi
> >
> > --
> > JID: smoppy AT gmail.com
> > WWW: http://cma.teroristi.org
> >
> >
>
> I was experiencing the same bug and at first I thought it was flash.
> That's why I worked on that no flash patch.  However, while working on
> the patch I ran across another, unrelated, patch that fixed the
> problem.
>
> http://lists.suckless.org/dev/0908/0905.html
>
>


Re: [dev][surf] browser identification changed?

2009-09-11 Thread Lorenzo Bolla
Alright, I'll answer myself.
surf.c sets "user-agent" to "surf" that is evidently not recognized by those
websites.

I wonder why those websites use these dirty tricks...
L.

On Fri, Sep 11, 2009 at 10:02 AM, Lorenzo Bolla  wrote:

> with the latest pull, surf is identified as the awfully old:Netscape
> Navigator
> with 40-bit encryption (International)
> whereas, before it, it was identified as:
> Apple Safari (531.2+)
> with 128-bit encryption (International)
> For this reason, webapp like GMail complain...
> Why did it change?
>


[dev][surf] browser identification changed?

2009-09-11 Thread Lorenzo Bolla
with the latest pull, surf is identified as the awfully old:Netscape
Navigator
with 40-bit encryption (International)
whereas, before it, it was identified as:
Apple Safari (531.2+)
with 128-bit encryption (International)
For this reason, webapp like GMail complain...
Why did it change?


[dev] X Hints for surf -- patch

2009-08-24 Thread Lorenzo Bolla
I've noticed that surf does not seem to set X Hints, therefore surf windows
does not behave with dwm.
This patch should fix the problem.

Regards,
Lorenzo





$ diff -c surf.c.orig surf.c
*** surf.c.orig 2009-08-24 12:21:03.0 +0100
--- surf.c 2009-08-24 16:35:02.0 +0100
***
*** 372,377 
--- 372,381 
   gtk_container_add(GTK_CONTAINER(c->vbox), c->searchbar);
   gtk_container_add(GTK_CONTAINER(c->vbox), c->urlbar);

+ /* Hints */
+ GdkGeometry hints = { 1, 1 };
+ gtk_window_set_geometry_hints(GTK_WINDOW(c->win), NULL, &hints,
GDK_HINT_MIN_SIZE);
+
   /* Setup */
   gtk_box_set_child_packing(GTK_BOX(c->vbox), c->urlbar, FALSE, FALSE, 0,
GTK_PACK_START);
   gtk_box_set_child_packing(GTK_BOX(c->vbox), c->searchbar, FALSE, FALSE,
0, GTK_PACK_START);


Re: [dev] [st] goals / non-goals for st?

2009-08-24 Thread Lorenzo Bolla
what's wrong with CTRL-a[   ?you can use regex bw/fw search too with '/' and
'?' (like vi).


On Mon, Aug 24, 2009 at 9:13 AM, Mate Nagy  wrote:

>
> On Mon, Aug 24, 2009 at 02:17:15AM +0200, Valentin wrote:
> > Isn't that what screen's there for? :P
>  if only screen's interface for scrolling back wasn't ridiculously
> uncomfortable. IMHO shift+pgup/pgdn, and horribile dictu mousewheel
> scrolling are essential. On the other hand, regex search forward
> backward etc would be convenient, also keyboard-based text selection
> (connected to the X clipboard, which again screen cannot do).
>
> Regards,
>  Mate
>
>


[dev] surf and dwm's tiled layout

2009-08-24 Thread Lorenzo Bolla
Hi all,
when using surf with dwm's tiled layout, if surf is in the client's stack it
overlaps all the clients below it (i.e. if it is the first client it
overlaps all the clients in the stack, if it the second it leaves the first
visible but overlaps the others and so on).
is there a way to fix it?

thanks,
Lorenzo.


[dev] surf dependencies

2009-08-23 Thread Lorenzo Bolla
Hi all,
what version of libwebkit does surf depend on?
I've installed ubuntu jaunty's libwebkit-dev package (v1.0.1, I think) and
surf's compilation fails with this error:
surf.c:26: error: expected specifier-qualifier-list before ‘WebKitDownload’

Thanks,
Lorenzo


Re: [dev] dmenu : auto confirm when only one item remains

2009-08-13 Thread Lorenzo Bolla
On Thu, Aug 13, 2009 at 10:11 AM, Anselm R Garbe  wrote:

> What about
>
> echo 'rm -rf /' | dmenu?


I bet someone's gonna try it...