Re: [dev] synthesizing X click events?

2016-06-14 Thread Stephen Paul Weber
> I'm wondering if there's a way to easily synthesize an X click event and 
> others?

Maybe look into how xdotool does it?‎



[dev] Patches to fix . for insert and change commands

2014-11-18 Thread Stephen Paul Weber
I've written up patches to make it so that I, a, A, s, ce, etc can be 
repeated properly with .  -- not sure if I'm doing this the Right Way, but 
it seems to work in my tests.  Feedback appreciated.  Patches attached.


--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph
From 06e04fa98dda188c440604d457c6497e78873d00 Mon Sep 17 00:00:00 2001
From: Stephen Paul Weber singpol...@singpolyma.net
Date: Tue, 18 Nov 2014 17:56:19 -0500
Subject: [PATCH 1/2] Allow repeatable insert-after-move

Previously we forgot what move was made when repeating an insert.
No more!
---
 config.def.h |  5 +
 vis.c| 20 +---
 2 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/config.def.h b/config.def.h
index f41dd81..160edfc 100644
--- a/config.def.h
+++ b/config.def.h
@@ -390,7 +390,7 @@ static KeyBinding vis_mode_normal[] = {
 	{ { NONE('J')   }, join,   { .i = MOVE_SCREEN_LINE_DOWN} },
 	{ { NONE('x')   }, delete, { .i = MOVE_CHAR_NEXT   } },
 	{ { NONE('r')   }, replace,{ NULL  } },
-	{ { NONE('i')   }, switchmode, { .i = VIS_MODE_INSERT  } },
+	{ { NONE('i')   }, insertmode, { .i = MOVE_NO_MOVE } },
 	{ { NONE('v')   }, switchmode, { .i = VIS_MODE_VISUAL  } },
 	{ { NONE('V')   }, switchmode, { .i = VIS_MODE_VISUAL_LINE } },
 	{ { NONE('R')   }, switchmode, { .i = VIS_MODE_REPLACE } },
@@ -561,9 +561,6 @@ static void vis_mode_insert_idle(void) {
 
 static void vis_mode_insert_input(const char *str, size_t len) {
 	editor_insert_key(vis, str, len);
-	/* make sure we can repeat the last insert */
-	action_reset(action_prev);
-	action_prev.op = ops[OP_REPEAT_INSERT];
 }
 
 static KeyBinding vis_mode_replace[] = {
diff --git a/vis.c b/vis.c
index 696d0f2..66d4b5a 100644
--- a/vis.c
+++ b/vis.c
@@ -193,6 +193,7 @@ static Operator ops[] = {
 
 /* these can be passed as int argument to movement((const Arg){ .i = MOVE_* }) */
 enum {
+	MOVE_NO_MOVE,
 	MOVE_SCREEN_LINE_UP,
 	MOVE_SCREEN_LINE_DOWN,
 	MOVE_SCREEN_LINE_BEGIN,
@@ -272,6 +273,7 @@ static size_t window_lines_middle(const Arg *arg);
 static size_t window_lines_bottom(const Arg *arg);
 
 static Movement moves[] = {
+	[MOVE_NO_MOVE] = { },
 	[MOVE_SCREEN_LINE_UP]  = { .win = window_line_up   },
 	[MOVE_SCREEN_LINE_DOWN]= { .win = window_line_down },
 	[MOVE_SCREEN_LINE_BEGIN]   = { .win = window_line_begin,.type = CHARWISE   },
@@ -635,8 +637,10 @@ static void op_case_change(OperatorContext *c) {
 static void op_repeat_insert(OperatorContext *c) {
 	const char *content;
 	size_t len = text_last_insertion(vis-win-text, content);
-	editor_insert(vis, c-pos, content, len);
-	window_cursor_to(vis-win-win, c-pos + len);
+	size_t pos = c-pos == c-range.start ? c-range.end : c-range.start;
+
+	editor_insert(vis, pos, content, len);
+	window_cursor_to(vis-win-win, pos + len);
 }
 
 static void op_join(OperatorContext *c) {
@@ -909,8 +913,18 @@ static void zero(const Arg *arg) {
 }
 
 static void insertmode(const Arg *arg) {
+	bool old_linewise = action.linewise;
+
 	movement(arg);
 	switchmode((const Arg){ .i = VIS_MODE_INSERT });
+
+	/* So we can repeat the insert with movement */
+	action_reset(action_prev);
+	action_prev.op = ops[OP_REPEAT_INSERT];
+	if (old_linewise  arg-i  LENGTH(moves_linewise))
+		action_prev.textobj = moves_linewise[arg-i];
+	else
+		action_prev.movement = moves[arg-i];
 }
 
 static void change(const Arg *arg) {
@@ -1090,7 +1104,7 @@ static void action_do(Action *a) {
 pos = a-movement-txt(txt, pos);
 			else if (a-movement-win)
 pos = a-movement-win(win);
-			else
+			else if (a-movement-cmd)
 pos = a-movement-cmd(a-arg);
 			if (pos == EPOS || a-movement-type  IDEMPOTENT)
 break;
-- 
1.9.1

From 1e5c8f49d3eafcb3a31e68ad83310546141bd697 Mon Sep 17 00:00:00 2001
From: Stephen Paul Weber singpol...@singpolyma.net
Date: Tue, 18 Nov 2014 17:57:02 -0500
Subject: [PATCH 2/2] Allow repeatable change operations

Previously we only repeated the insert.  Then we only repeated the
delete.
This change repeats both the delete and the insert.
---
 vis.c | 13 +
 1 file changed, 13 insertions(+)

diff --git a/vis.c b/vis.c
index 66d4b5a..0282678 100644
--- a/vis.c
+++ b/vis.c
@@ -161,6 +161,7 @@ static void op_shift_right(OperatorContext *c);
 static void op_shift_left(OperatorContext *c);
 static void op_case_change(OperatorContext *c);
 static void op_repeat_insert(OperatorContext *c);
+static void op_repeat_change(OperatorContext *c);
 static void op_join(OperatorContext *c);
 
 /* these can be passed as int argument to operator((const Arg){ .i = OP_*}) */
@@ -173,6 +174,7 @@ enum

[dev] [dwm] Starting new windows in the CWD of the selected window

2014-10-07 Thread Stephen Paul Weber
I realise this might not be possible in general.  Really I'm mostly 
interested in starting new st processes in the CWD of a currently-selected 
st.


I think my approach should be something like:

Read _NET_WM_PID for selmon-sel-win (this is giving me some trouble, 
actually, but I can probably figure it out)

Walk the process tree down from that PID to the most recent leaf child
Get the CWD of that child

The process tree walking is because in a terminal the shell changing 
directory does not change the CWD of the terminal itself.


Has anyone else done work on this kind of functionality?  Any tips?  Am 
I going about this all wrong?


--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


Re: [dev] Introducing the imagefile-format

2014-07-29 Thread Stephen Paul Weber

The selection of bzip as the compression algorithm seems like a
compromise.


It seems to me part of the whole point is to *not* select a compression 
algorithm, but allow that to be handled by the apropriate tools (probably 
xz, in my case).




Re: [dev] video player and torrent client that don't suck

2013-06-29 Thread Stephen Paul Weber

Somebody claiming to be oneofthem wrote:

You're really saying that cryptography hasn't changed since 2007?


The algorithms that library implements certainly have not.

--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


Re: [dev] upload via html?

2013-05-27 Thread Stephen Paul Weber

Somebody signing messages as Nicolas Braud-Santoni wrote:

Well, SFTP requires you to create a user account. (I'm aware that it may
not be one with which you can SSH in).


The OpenSSH implementation more-or-less requires that (though it's really 
not a big deal), but the protocol does not require it.


--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


Re: [dev] snotes v0.9 - a simple notes system

2013-02-04 Thread Stephen Paul Weber

Somebody claiming to be Daniel Bryan wrote:

On Mon, Feb 04, 2013 at 10:47:34AM +0100, Petr Šabata wrote:
+1, though in case you hadn't noticed, you can set SNOTES_EDITOR in
~/.snotes/config.


Why not just use $VISUAL or $EDITOR ?  Why would someone want to use 
a different editor than their default editor?


--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


Re: [dev] [suckless] Migration to git

2012-11-26 Thread Stephen Paul Weber

Somebody claiming to be Kurt H Maier wrote:

It's like c++: everyone agrees it's safe to use, but nobody agrees on
which 10% is the safe part.


I think we call that part of C++ C89.

(Roughly, modulo valid C89 that C++ makes invalid.)

--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


Re: [dev] [st] line drawing?

2012-11-07 Thread Stephen Paul Weber

Somebody claiming to be Roberto E. Vargas Caballero wrote:

It is a problem related to the switch to Xft. It impossible a font
has all the unicode glyphs, so if the font fails in a glyph you have a
problem. It is not clear for us how other terminals fix this problem, but
maybe we should add this issue to the TODO list.


Unicode characters that my font (Terminus) supports just fine (tested in 
gedit and other programs by setting the font there) such as … and ™ do not 
render correctly (and many also did not on the pre-Xft version), so maybe 
there is a problem with Unicode handling in general?


--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


Re: [dev] [utmp] announcement

2012-10-31 Thread Stephen Paul Weber

Somebody claiming to be Christoph Lohmann wrote:

There  is  a new project on suckless.org, which is utmp(1)[0]. This is a
simple application which was created by Roberto E. Vargas  Caballero  in
conjunction to be used with st(1) to have utmp handling.


This seems nifty, but when I run it I get

add utmp entry: Permission denied

Is this meant to be suid or something?

--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


smime.p7s
Description: S/MIME cryptographic signature


Re: [dev] [utmp] announcement

2012-10-31 Thread Stephen Paul Weber

Somebody claiming to be Christoph Lohmann wrote:

There  is  a new project on suckless.org, which is utmp(1)[0]. This is a
simple application which was created by Roberto E. Vargas  Caballero  in
conjunction to be used with st(1) to have utmp handling.


On inspection of the Makefile, I found that my `make install` had not ended 
up with the g+s permission set on the binary, even though the command is 
there.  Maybe because the group is changed after that?  I set that and now 
it works.


--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


smime.p7s
Description: S/MIME cryptographic signature


Re: [dev] [st] toggle font

2012-10-11 Thread Stephen Paul Weber

Somebody claiming to be sta...@cs.tu-berlin.de wrote:

This patch (against tip) introduces an array of font names in the config
instead FONT and allows to cycle through them with Ctrl-PgUp at runtime.


I also need multiple fonts, but I find keeping several builds of st around 
works fine for me.


--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


Re: [dev] libixp questions

2012-09-20 Thread Stephen Paul Weber

Somebody claiming to be Sanel Zukan wrote:

I'm searching alternative to DBus, as the project itself became quite
polarized and because DBus can't be compiled on platforms without
pthread support, except win32.


Have you considered FIFOs and/or sockets?

Oh, you want win32... INET sockets as a fallback?

--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


Re: [dev] [ANN] CGD - Ultra-minimalist HTTP and FastCGI wrapper for CGI programs.

2012-09-19 Thread Stephen Paul Weber

Somebody claiming to be Uriel wrote:

CGD runs as a FastCGI wrapper (to be used with nginx or similar web
server) or as a standalone HTTP server, handing over all requests to a
given CGI script.


Is this just a wrapper for compatability (which seems odd, since most 
servers also speak CGI), or does it do prefork stuff to improve performance?


--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


Re: [dev] [ANN] CGD - Ultra-minimalist HTTP and FastCGI wrapper for CGI programs.

2012-09-19 Thread Stephen Paul Weber

Somebody claiming to be Uriel wrote:

Sadly not all servers speak CGI this days, most notably nginx, and
others often have broken CGI support.


Oh?  I guess I just never tried CGI with nginx.


the called CGI script can't be 'preforked' because
before you fork a CGI script you have to set the relevant environment
variables for the request.


Hmm, I suppose that's true.


Still, forking is never the bottleneck


Never?  Isn't forking-as-bottleneck most of the reason alternatives to CGI 
exist?


--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


Re: [dev] st utf8 printing

2012-04-13 Thread Stephen Paul Weber

Somebody signing messages as Petr Šabata wrote:

I'm quite happy with -misc-fixed-*.


Huh, for somereason I thought it didn't get that big, but I see that it will 
go to almost the size I run my terminal at.  I tried this with xterm:


-misc-fixed-medium-r-*-*-*-200-*-*-*-*-*-*

and it worked and was the right size.  I then tried it in st, and the size 
is still fine, but the spacing is all messed up and every time I type it 
shows duplicates of the character.  Some sort of really weird paiting bug.


--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


Re: [dev] st utf8 printing

2012-04-13 Thread Stephen Paul Weber

Somebody claiming to be Andrew Hills wrote:

On Fri, Apr 13, 2012 at 2:32 AM, Eckehard Berns ecki-suckl...@ecki.to wrote:

Vim draws placeholder chars for anything it can't display. But nobody
uses the pure X11 GUI of Vim anyway. You either use Vim in a terminal
or the GTK+ GUI (which - as far as I can tell - uses Pango to draw
text).


You couldn't pay me to use the GTK+ GUI. I use the pure X11 GUI. So
does everyone else here at work.


People use vim from a GUI?
/me confused

--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


Re: [dev] [dwm] drop the bars (was: systray in upstream dwm?)

2012-04-07 Thread Stephen Paul Weber

Somebody claiming to be Luis Anaya wrote:
I see the case for a need of a systray, but there are tiling window 
managers that provide this facility.


Also, nice programs like stalonetray which one can run if one needs a 
systray.


--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


Re: [dev] stest review

2012-02-10 Thread Stephen Paul Weber

Somebody claiming to be Anselm R Garbe wrote:

I heavily dislike the fact that dmenu now contains a reference to
getopt(). Not exactly dmenu, but stest.

Can we please remove the getopt() dependency?


What does the community have against getopt() ?  It certainly beats the 
pants off of writing your own options parser (which almost everyone gets 
wrong) and allows your tool to behave however the local system expects (more 
or less).


Not trying to start a flame war, just curious.

--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


Re: [dev] interested in issue tracker dev

2012-01-15 Thread Stephen Paul Weber

Somebody claiming to be Anselm R Garbe wrote:

On 12 January 2012 19:06, Anselm R Garbe garb...@gmail.com wrote:
The reason I suggest to base the bug tracker view on a mail
archiving tool is simply because this problem hasn't been solved in an
acceptable way either (and we'd need a better system anyways).


Yes, this is a good problem to solve for many reasons.


The logic aspect of the bug tracker should be controlled by mail
addresses only (I don't like the mail header approach, just make it
absolutely simple and work on mail addresses)


While I agree that adding custom headers is likely to be a pain and make 
users come up with hacks, some headers are very well standardized.  Most 
notably In-Reply-To and Message-ID.  IMHO, and id for the bug should be 
the Message-ID of the original email, and any comments should be 
In-Reply-To said email.  That way you can just reply to a bug from your 
email client and it works.  Just like a mailing list :)


--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph



Re: [dev] wmii falling out of favor

2011-12-22 Thread Stephen Paul Weber

Somebody claiming to be dtk wrote:

This is why dwm has tags: just don't view the tags you aren't using.
Like you say, tag clients according to their role, and then by
definition those which are not being used needn't be seen. However,
you may be interested in flextile [1].


wouldn't be used to layout clients within tags, but several tags across
one screen. According to my feeling, that needlessly shoves everything
one level up in the structuring hierarchy, leaving me wanting for one
more level to group all tags that belong to one activity (e.g. project
A). Why not have clever layouts? I think that is the great power of the
stacked layout. I can have clients grouped within one tag, but I don't
need to watch them all of the time.



I think so. No way to have one client 'maximised'?


I think we call this monacle mode

--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


Re: [dev] Re: dmenu's lsx binary naming conflicts with lrzsz!

2011-11-29 Thread Stephen Paul Weber

Somebody claiming to be Christian Neukirchen wrote:

Connor Lane Smith c...@lubutu.com writes:


On 28 November 2011 13:35, Christian Neukirchen chneukirc...@gmail.com wrote:

Any reason we don't replace lsx with this?

 find -L . -maxdepth 1 -type f -perm -111


POSIX compatibility.


You're ok with using a util you built, but not a util someone else built?  
(I'm not defending GNU find, I'm just saying, stest is no more POSIX :) )



All supported except for -maxdepth, but you can use:

find -L . -type d \! -name . -prune -o -type f -perm -111 -print


Hmm... interesting.  I'm going to have to look into exactly what this does.

--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


Re: [dev] [dwm] [PATCH] spawn_cwd - spawn from current client's cwd

2011-11-24 Thread Stephen Paul Weber

Somebody signing messages as Suraj N. Kurapati wrote:

one of the things I missed from my previous WMII configuration was the
ability to open new programs in the currently focused client's workdir.

So I ported this feature to DWM using just 27 SLOC in this[2] patch,

[2]: https://github.com/sunaku/.dwm/compare/tip...spawn_cwd


Does this patch just work on xterm/rxvt windows that happen to have their 
CWD path in the title?


--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


[dev] STDIN patch

2011-11-13 Thread Stephen Paul Weber
I just upgraded to the new DWM and had to apply the stdin patch to keep 
the behaviour I'm used to :)  It didn't quite apply against tip, so attached 
are my changes to make it apply, if anyone's interested.


--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph
commit 53d83190f95cbce4fa949328d82796ee97ec9761
Author: Stephen Paul Weber singpol...@singpolyma.net
Date:   Sat Nov 12 23:58:27 2011 -0500

Added http://dwm.suckless.org/patches/stdin

diff --git a/config.def.h b/config.def.h
index 77ff358..2c02160 100644
--- a/config.def.h
+++ b/config.def.h
@@ -12,6 +12,7 @@ static const unsigned int borderpx  = 1;/* border pixel of windows */
 static const unsigned int snap  = 32;   /* snap pixel */
 static const Bool showbar   = True; /* False means no bar */
 static const Bool topbar= True; /* False means bottom bar */
+static Bool readin  = True; /* False means do not read stdin */
 
 /* tagging */
 static const char *tags[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
diff --git a/dwm.c b/dwm.c
index fd6f04d..aa748f4 100644
--- a/dwm.c
+++ b/dwm.c
@@ -28,6 +28,7 @@
 #include stdlib.h
 #include string.h
 #include unistd.h
+#include sys/select.h
 #include sys/types.h
 #include sys/wait.h
 #include X11/cursorfont.h
@@ -239,7 +240,6 @@ static void updatebarpos(Monitor *m);
 static void updatebars(void);
 static void updatenumlockmask(void);
 static void updatesizehints(Client *c);
-static void updatestatus(void);
 static void updatewindowtype(Client *c);
 static void updatetitle(Client *c);
 static void updatewmhints(Client *c);
@@ -1276,9 +1276,7 @@ propertynotify(XEvent *e) {
 	Window trans;
 	XPropertyEvent *ev = e-xproperty;
 
-	if((ev-window == root)  (ev-atom == XA_WM_NAME))
-		updatestatus();
-	else if(ev-state == PropertyDelete)
+	if(ev-state == PropertyDelete)
 		return; /* ignore */
 	else if((c = wintoclient(ev-window))) {
 		switch(ev-atom) {
@@ -1420,12 +1418,61 @@ restack(Monitor *m) {
 
 void
 run(void) {
+	char *p;
+	char sbuf[sizeof stext];
+	fd_set rd;
+	int r, xfd;
+	unsigned int len, offset;
 	XEvent ev;
-	/* main event loop */
+
+	/* main event loop, also reads status text from stdin */
 	XSync(dpy, False);
-	while(running  !XNextEvent(dpy, ev))
-		if(handler[ev.type])
-			handler[ev.type](ev); /* call handler */
+	xfd = ConnectionNumber(dpy);
+	offset = 0;
+	len = sizeof stext - 1;
+	sbuf[len] = stext[len] = '



[dev] Start dwm on different tag selection

2011-11-13 Thread Stephen Paul Weber
I used to be able to start dwm on a different tag selection than the default 
(which is only select tag 1).  Is there still a way to do this?


--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


Re: [dev] Start dwm on different tag selection

2011-11-13 Thread Stephen Paul Weber

Somebody claiming to be Anselm R Garbe wrote:

On 13 November 2011 19:22, Stephen Paul Weber singpol...@singpolyma.net wrote:

I used to be able to start dwm on a different tag selection than the default
(which is only select tag 1).  Is there still a way to do this?


Watch out for createmon() in the code and amend the line

m-tagset[0] = m-tagset[1] = 1;


Thanks!

--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


Re: [dev] [dwm] nicer web (was: 2000 SLOC)

2011-11-03 Thread Stephen Paul Weber

Somebody claiming to be Kai Hendry wrote:

As someone who has been a bit of WHATWG/HTML5 fan boy over the years,
I find the latest round of dev list Web moaning a little naive to say
the least. Unless you guys are trying to be funny or sarcastic (aka
lowest form of wit). Sometimes it's hard to tell. :)


I think maybe you're the one that's naive. 90% of the HTML/CSS specs is 
awesome, but that doesn't prevent people from doing terrible things with 
them, and it never will.  You cannot design an environment where morons 
won't try to deliver you broken content to try to maximize what they want at 
your expense.


Perhaps you love the WHATWG enough to miss the point: we keep hiring 
magazine-trained designers to build websites.  Standards can't fix that.


--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph



Re: [dev] [dwm] 2000 SLOC

2011-11-02 Thread Stephen Paul Weber

Somebody claiming to be Kurt H Maier wrote:

web idiots have been spouting such bullshit since the 'graceful
degradation' days of html4.  it's never come true, and it never will,
because the standards put forth are anything but.  what you are
talking about is the web version of the check is in the mail and
it's not what it looks like


While there is great reason to be pessemistic, in the end the situation is 
no different than in any other maker/coder/creator field: the tools to make 
the web really quite good have been there for years, but most people writing 
the pages are not motivated to make them suck less than the average, and so 
keep producing terrible div nests, etc, making all the nice stuff we're 
supposed to have a lot less useful.


--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


Re: [dev] Anti-GPL hipsters

2011-10-24 Thread Stephen Paul Weber

Somebody claiming to be mikshaw wrote:

From: Kurt H Maier karmaf...@gmail.com

  only an idiot compares a software license to slavery.
As far as the cc-nd license RMS apparently prefers for his own audio, I 
fully agree this is hypocritical and wrong.


Not to wade into a flametroll war, but for the record (in case there are 
people who actually don't know) RMS believes in ND licenses for speech so 
that he has a legal tool against people who take such speech out of context 
or misquote it in other ways.


--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph


signature.asc
Description: Digital signature


Re: [dev] Some questions about st and a patch

2011-10-20 Thread Stephen Paul Weber

Somebody claiming to be Mount Peaks wrote:

1) May I bug the mail-list with a simple question, is there a scrollbar in
st?


No, because there is no scrollback mechanism, so nothing to scroll through.

--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph



[dev] Re: dvtm keybindings

2011-10-19 Thread Stephen Paul Weber
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Me again :)

I've been trying to use dvtm under st, with some strange results.  It seems 
that dvtm tries to emulate rxvt, whereas st has it's own way of doing things 
(but is closer to xterm than to rxvt).  If I run dvtm normally, keys seem to 
mostly work, but notably colour does not.  If I change TERM to st-256color 
then colour works, but some keys (notably ones where rxvt is different from 
st, such as pgup/home/end) stop working.

Though, curiously, irssi basically works in st under dvtm with 
TERM=st-256color... maybe if it gets codes it doesn't understand it falls 
back to xterm?

- -- 
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJOn0vYAAoJENEcKRHOUZzeRqQP/2+eJ01IK0/NpwedF1C+VxXy
vcR7IZ3zxw/I2akfIF3tZ2u31f09wnAbMKAcxhemJqNRc2efoLNbdr2LfgQCJUNt
pHFcuk4tJQOrZ1YGtanIqihAjXZ9vspnkK1d56GtoDy9vtsW+OLJxDSXLubqqR5Z
Q4MdgBnpw8NY5ICc3VHezJ4e1lYpVNB74IAlu5cevx+S7418i/5uzQECfDRNYaah
HlOJkACLDJE9brdxBC1JZ7DmADLrLK0N9xj1/gl/cuSxH0ydcg9QxNVxhg9BGYF2
CrjWcJSTzvbNpMPHm35k4I0kdcRasMq9bm554aCwR8S+M5EilO9kBqa8Ngqma58o
gOoDMeB1TDkzUcUKIT0p9BjD52EKc4WawGJNzocE8vETCsVpYVxaVXEVTPp+JS29
jy6eMvVKXRecIFLWeANHPCMc8Pl/7hHqa/qhC7O7VmTNM/plIYp8zPmayQyHbYQv
fP31gJXJjdvU0r2/H9e4g0UBqI2/Gieht+UMY0ny4fVY231lCVXhETKyp/YrMq2s
n32Q/YKiUJJfi/HmoJU5lIquyHIJT8itxHyFDGnbxwgfMn+C0L2yND4WCofGOkoO
OMp+0RMA5XOnmzJS0J9hXCvacOjeAIQQFA87Q58b4ht6c8MS3NYli5cZUmZxWelJ
JQhH9Gi2WiRSd7sk+EzR
=2eOC
-END PGP SIGNATURE-



Re: [dev] Some questions about st and a patch

2011-10-19 Thread Stephen Paul Weber
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Somebody claiming to be Aurélien Aptel wrote:
Attached wrong patch; use this one, sorry.

I can confirm that this patch works for me in irssi :D

- -- 
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJOn06ZAAoJENEcKRHOUZzeQQYP/36YhuMtSU0O1r1QZNGahAJh
wxgT0B1+aXCCQV960UCtSQeCbcEHAvL+7jkJeOLsko8LdYaCqiouQQgUIEBqO6Y9
jQSgYN0OF1Sc8EwdifzxpaiRP1tg2X/9ybor+EUQNNj9iagECqYtw4rQoCM68R9B
LutPGzqjZtkjAByOwn2cM3ft7D0IgzRCbP0lNGWFJOVICi4vmlbDX0x96bgQ/vQi
yfOcl6RaCm8IP048WbOjWMBA2RWwm2mmtxOV2gJtzx55c8zNzixyuaIxKnjh6uNr
IeGZ1sf57Edw+PrQsb+PCjaH6ebiyH5l0QKi6Xki5j5FWI8mDg2pp40oYH71Zjbt
w0YQWlFhwvH+4JCfzbDljtzWBPUi3piUweX6/GJJ8E2qmBow6wARIrouEHMA4zGt
0sygFQMzwGbMPV62qcOW2RyzmWSr6+L6vuyP51NQAQp0xIBGvdUo8Qj8KJyuJxm4
rxX3MnhFxsYChMgyHOb9tCRh8sEKx/SRTzE7r0j2iiqu9Y1hri7bR54kZkMbJFKo
XvRNwphqX/AT6q4koy0bdOOe6jmzVuizG92oZ90WnjtGluS8OKSGHd8CU3zcNw7s
1gVEq43z1FFUtxAyVKXBQvSAbyCkiK07ibIuV16Czowry9lef/sSgC40JdBmlTzP
cnGUTHipHam3/GnX+Ywy
=xakF
-END PGP SIGNATURE-



Re: [dev] Some questions about st and a patch

2011-10-19 Thread Stephen Paul Weber

Somebody claiming to be Kurt H Maier wrote:

Thanks for sending out a kilobyte of text with an eleven-word reply
buried in the middle, Stephen Paul Weber.


Sorry, most mailing lists hate MIME, so I send inline.

Or are you complaining about filesize? Are you on dialup?

--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph



Re: [dev] Some questions about st and a patch

2011-10-19 Thread Stephen Paul Weber

Somebody claiming to be Andrew Hills wrote:

On Wed, Oct 19, 2011 at 9:20 PM, Stephen Paul Weber
singpol...@singpolyma.net wrote:

Or are you complaining about filesize? Are you on dialup?


No, just complaining that it's hard to find the content in your
message when the majority of my mail reader's window is full of PGP
signature instead of words.


Right, that's what I thought.  Does this list support MIME?

--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph



Re: [dev] [dwm] adding docking support

2011-10-17 Thread Stephen Paul Weber

Somebody claiming to be Peter John Hartman wrote:

I'm really not convinced a generic status bar would work better than
dwm's does now.


Not that I care about statusbars and dockbars--I just want dwm to play nice
with onscreen keyboards---I think, that said, that his point is that there's
no conceptual tension between dwm and a statusbar *since dwm has a statusbar*.


Isn't docking really just another layout?  One where most windows tile 
below a window kept at the top/side?


--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph



[dev] Some questions about st and a patch

2011-10-17 Thread Stephen Paul Weber

I've started using st and have some questions/issues:

1) To get the foreground colour I want, I changed index 7 of colorname[] to 
	grey -- will this have any strange site effects?
2) The foreground colour brightblack in mutt (which shows as a grey in 
	xterm/rxvt) shows as straight black, which is not nice against my black 
background.
3) How do I scroll up the scrollbuffer?  The Shift+PageUp I'm used to does 
	not seem to work.
4) alt+leftarrow and alt+rightarrow, which I use in irssi to swich chats, do 
	not seem to work.  Looking at st.c, it seems that kpress handles the 
arrow keys specially, which may be breaking this?


I've also created a small patch, attached, which allows one to paste the 
contents of CLIPBOARD with alt+shift+insert.


--
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph
diff --git a/st.c b/st.c
index 72e57c8..ccdbc42 100644
--- a/st.c
+++ b/st.c
@@ -237,6 +237,7 @@ static void selinit(void);
 static inline int selected(int, int);
 static void selcopy(void);
 static void selpaste();
+static void clipboardpaste();
 static void selscroll(int, int);
 
 static int utf8decode(char *, long *);
@@ -520,6 +521,12 @@ selpaste() {
 }
 
 void
+clipboardpaste() {
+	Atom clipboard = XInternAtom(xw.dpy, CLIPBOARD, 0);
+	XConvertSelection(xw.dpy, clipboard, sel.xtarget, XA_PRIMARY, xw.win, CurrentTime);
+}
+
+void
 selrequest(XEvent *e) {
 	XSelectionRequestEvent *xsre;
 	XSelectionEvent xev;
@@ -1911,8 +1918,12 @@ kpress(XEvent *ev) {
 			ttywrite(buf, 3);
 			break;
 		case XK_Insert:
-			if(shift)
-selpaste();
+			if(shift) {
+if(meta)
+	clipboardpaste();
+else
+	selpaste();
+			}
 			break;
 		case XK_Return:
 			if(IS_SET(MODE_CRLF))


signature.asc
Description: Digital signature


Re: [dev] Some questions about st and a patch

2011-10-17 Thread Stephen Paul Weber
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Somebody claiming to be Connor Lane Smith wrote:
On 17/10/2011, Stephen Paul Weber singpol...@singpolyma.net wrote:
 4) alt+leftarrow and alt+rightarrow, which I use in irssi to swich chats, do
not seem to work.  Looking at st.c, it seems that kpress handles the
arrow keys specially, which may be breaking this?

Currently st handles an arrow key by printing, eg, . With
shift it is , with alt , and so on. So it needs
to detect bucky bits and react accordingly.

Excellent!  I shoved this in st.c for now:

- -   sprintf(buf, %c%c, IS_SET(MODE_APPKEYPAD) ?  'O' : 
'[', (shift ? dacb:DACB)[ksym - XK_Left]);
- -   ttywrite(buf, 3);
+   if(meta) {
+   sprintf(buf, %c1;3%c, IS_SET(MODE_APPKEYPAD) 
? 'O' : '[', (shift ? dacb:DACB)[ksym - XK_Left]);
+   ttywrite(buf, 6);
+   } else {
+   sprintf(buf, %c%c, IS_SET(MODE_APPKEYPAD) ? 
'O' : '[', (shift ? dacb:DACB)[ksym - XK_Left]);
+   ttywrite(buf, 3);
+   }

And it works! :D

- -- 
Stephen Paul Weber, @singpolyma
See http://singpolyma.net for how I prefer to be contacted
edition right joseph
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJOnEfGAAoJENEcKRHOUZzefCIP/1ITB2ZE4uc2tJgsXulvSThw
oU2SJKCi1/8jLZiQaZW6m76wEtDLrXAhbekoNtPyOuKP32MaZLmPBuG8Vcqm2ofS
d+tfyclVA+vJ6+KoRxlUBpXQ1z632QpEG7kSP/9/txkQ2SDB4qISuCJfs5YfcSZQ
Tst4QAN0i9DNQru4Wu1nrPhoyhetijAwxtG8qZbngfOm6OukbepuGKIzjn8pqPyk
U+lQQIm+AMkul2ExBRFuMr4R4IxRCsBjrw/Andv4CzSznxywQSUR02Z+tc3y7VsQ
31X9/5MAeZyyjm3oA+kLnHFOtsdCNq1VnqrU/9tedT1Qi+cZQG7Q3GzDnNom73Li
gOOQtB1hicG1azwaB3uulnYd4trA9W6hmRv+68LItbsSOPO9qKLVVr/h6iy74h5l
Hy2HfwLguer34HPYcGU+mpCC5UrZHxndCRJaNuh1AhWt/Ltp9irb7FGMf97F0grm
3AJYorpS8QS5pHQj5MFqIbqG5VaEDTMzGbKjqK6RE0gi/jsVZnPCv1cJiRJ/UxAf
gSYjtDn7st8DbMuBOES5mO5Q1kDDgK8ZBel/03jQQlhr71MkQEn4oRmFHerh1JQT
fbVYap0DUPgOkqFlNQQKzNpObfGm49lHVlGAxTP3VRhg0suyCAIg9tT7gr7LdoTc
o6/lW6ID1jEvgG/89yOB
=45vD
-END PGP SIGNATURE-



[dev] tabbed patch to accept client as argument

2010-11-04 Thread Stephen Paul Weber
I really wanted to use tabbed as a generic tool for tabbing any XNest-aware
client, but the current code would require I have a seperately compiled
version for each client (tabbed-surf, tabbed-xterm, etc)  The attached patch
is my solution.  It allows an invocation like:

./tabbed xterm -into

or 

./tabbed surf -e

-- 
Stephen Paul Weber, @singpolyma
Please see http://singpolyma.net for how I prefer to be contacted.
edition right joseph
diff -r f8f6841b3c1c config.def.h
--- a/config.def.h	Mon Aug 09 11:59:13 2010 +0100
+++ b/config.def.h	Thu Nov 04 11:52:46 2010 -0400
@@ -12,7 +12,7 @@
 static Key keys[] = { \
 	/* modifier keyfunctionargument */
 	{ MODKEY|ShiftMask, XK_Return, focusonce,  { 0 } },
-	{ MODKEY|ShiftMask, XK_Return, spawn,  { .v = (char*[]){ surf, -e, winid, NULL} } },
+	{ MODKEY|ShiftMask, XK_Return, spawn,  { .v = NULL } },
 	{ MODKEY|ShiftMask, XK_l,  rotate, { .i = +1 } },
 	{ MODKEY|ShiftMask, XK_h,  rotate, { .i = -1 } },
 	{ MODKEY,   XK_Tab,rotate, { .i = 0 } },
@@ -28,3 +28,8 @@
 	{ MODKEY,   XK_0,  move,   { .i = 9 } },
 	{ MODKEY,   XK_q,  killclient, { 0 } },
 };
+
+void
+setup_config(void) {
+	keys[1].arg.v = cmd;
+}
diff -r f8f6841b3c1c tabbed.c
--- a/tabbed.c	Mon Aug 09 11:59:13 2010 +0100
+++ b/tabbed.c	Thu Nov 04 11:52:46 2010 -0400
@@ -48,14 +48,14 @@
 
 typedef union {
 	int i;
-	const void *v;
+	void *v;
 } Arg;
 
 typedef struct {
 	unsigned int mod;
 	KeySym keysym;
 	void (*func)(const Arg *);
-	const Arg arg;
+	Arg arg;
 } Key;
 
 typedef struct {
@@ -150,6 +150,7 @@
 static Client *clients = NULL, *sel = NULL, *lastsel = NULL;
 static int (*xerrorxlib)(Display *, XErrorEvent *);
 static char winid[64];
+static char **cmd = NULL;
 /* configuration, allows nested code to access above variables */
 #include config.h
 
@@ -189,8 +190,8 @@
 	Client *c, *n;
 
 	for(c = clients; c; c = n) {
+		focus(c);
 		killclient(NULL);
-		focus(c);
 		XReparentWindow(dpy, c-win, root, 0, 0);
 		n = c-next;
 		unmanage(c);
@@ -203,6 +204,7 @@
 	XFreeGC(dpy, dc.gc);
 	XDestroyWindow(dpy, win);
 	XSync(dpy, False);
+	free(cmd);
 }
 
 void
@@ -743,6 +745,7 @@
 	snprintf(winid, LENGTH(winid), %u, (int)win);
 	nextfocus = foreground;
 	focus(clients);
+	setup_config();
 }
 
 void
@@ -842,16 +845,33 @@
 	return xerrorxlib(dpy, ee); /* may call exit */
 }
 
+void
+set_cmd(int argc, char **argv) {
+	int i;
+	if(!(cmd = malloc((argc+2) * sizeof(*cmd {
+		die(Error allocating memory.);
+	}
+	for(i = 0; i  argc; i++) {
+		cmd[i] = argv[i];
+	}
+	cmd[argc] = winid;
+	cmd[argc+1] = NULL;
+}
+
 int
 main(int argc, char *argv[]) {
 	int detach = 0;
 
-	if(argc == 2  !strcmp(-v, argv[1]))
+	if(argc  1  !strcmp(-v, argv[1])) {
 		die(tabbed-VERSION, © 2009-2010 tabbed engineers, see LICENSE for details\n);
-	else if(argc == 2  strcmp(-d, argv[1]) == 0)
+	} else if(argc  1  !strcmp(-d, argv[1])) {
 		detach = 1;
-	else if(argc != 1)
-		die(usage: tabbed [-d] [-v]\n);
+		if(argc  2) set_cmd(argc-2, argv+2);
+	} else if(argc  1) {
+		set_cmd(argc-1, argv+1);
+	}
+	if(!cmd)
+		die(usage: tabbed [-d] [-v] command\n);
 	if(!setlocale(LC_CTYPE, ) || !XSupportsLocale())
 		fprintf(stderr, warning: no locale support\n);
 	if(!(dpy = XOpenDisplay(NULL)))


signature.asc
Description: Digital signature