[dev] [PATCH] failcolor, updated for slock-1.2

2015-01-18 Thread Kylie McClain
original patch by Michael Stummvoll 
---
 config.def.h |  1 +
 slock.c  | 10 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/config.def.h b/config.def.h
index 89e5977..7f55466 100644
--- a/config.def.h
+++ b/config.def.h
@@ -1,2 +1,3 @@
 #define COLOR1 "black"
 #define COLOR2 "#005577"
+#define COLOR3 "#55"
diff --git a/slock.c b/slock.c
index face75e..8519ce2 100644
--- a/slock.c
+++ b/slock.c
@@ -29,12 +29,13 @@ typedef struct {
int screen;
Window root, win;
Pixmap pmap;
-   unsigned long colors[2];
+   unsigned long colors[3];
 } Lock;
 
 static Lock **locks;
 static int nscreens;
 static Bool running = True;
+static Bool tried = False;
 
 static void
 die(const char *errstr, ...) {
@@ -135,6 +136,7 @@ readpw(Display *dpy, const char *pws)
 #ifdef HAVE_BSD_AUTH
running = !auth_userokay(getlogin(), NULL, 
"auth-xlock", passwd);
 #else
+   tried=True;
running = !!strcmp(crypt(passwd, pws), pws);
 #endif
if(running)
@@ -162,7 +164,7 @@ readpw(Display *dpy, const char *pws)
}
} else if(llen != 0 && len == 0) {
for(screen = 0; screen < nscreens; screen++) {
-   XSetWindowBackground(dpy, 
locks[screen]->win, locks[screen]->colors[0]);
+   XSetWindowBackground(dpy, 
locks[screen]->win, locks[screen]->colors[tried ? 2 : 0]);
XClearWindow(dpy, locks[screen]->win);
}
}
@@ -179,7 +181,7 @@ unlockscreen(Display *dpy, Lock *lock) {
return;
 
XUngrabPointer(dpy, CurrentTime);
-   XFreeColors(dpy, DefaultColormap(dpy, lock->screen), lock->colors, 2, 
0);
+   XFreeColors(dpy, DefaultColormap(dpy, lock->screen), lock->colors, 3, 
0);
XFreePixmap(dpy, lock->pmap);
XDestroyWindow(dpy, lock->win);
 
@@ -212,6 +214,8 @@ lockscreen(Display *dpy, int screen) {
lock->win = XCreateWindow(dpy, lock->root, 0, 0, DisplayWidth(dpy, 
lock->screen), DisplayHeight(dpy, lock->screen),
0, DefaultDepth(dpy, lock->screen), CopyFromParent,
DefaultVisual(dpy, lock->screen), CWOverrideRedirect | 
CWBackPixel, &wa);
+   XAllocNamedColor(dpy, DefaultColormap(dpy, lock->screen), COLOR3, 
&color, &dummy);
+   lock->colors[2] = color.pixel;
XAllocNamedColor(dpy, DefaultColormap(dpy, lock->screen), COLOR2, 
&color, &dummy);
lock->colors[1] = color.pixel;
XAllocNamedColor(dpy, DefaultColormap(dpy, lock->screen), COLOR1, 
&color, &dummy);
-- 
2.2.1




[dev] Re: [dwm] Most fonts do not work

2015-01-18 Thread Joshua Krämer
On 2015-01-18, 18:35, Markus Teich wrote:

> Could you check your fontpath directly before starting dwm? If it's
> different than during your session, add the missing entries with xset
> before starting dwm.

Thanks for the hint.  I have added a check to my .xsession script, and
the fontpath is not different from the fontpath during the session.

$ xset q 
/usr/local/share/fonts/,/usr/share/fonts/misc:unscaled,/usr/share/fonts/75dpi:unscaled,/usr/share/fonts/ghostscript/,/usr/share/fonts/truetype/,built-ins

The fonts in question (Lucida, Helvetica etc.) reside
in /usr/share/fonts/75dpi/

Kind regards,
Joshua





Re: [dev] [dwm] Most fonts do not work

2015-01-18 Thread Markus Teich
Joshua Krämer wrote:
> Does somebody have an idea what is going on here?

Could you check your fontpath directly before starting dwm? If it's different
than during your session, add the missing entries with xset before starting dwm.

--Markus



[dev] [dwm] Most fonts do not work

2015-01-18 Thread Joshua Krämer
Hi all,

I have a problem with dwm (current git without patches):  I cannot use
most of the fonts I have tried.  For example, Misc Fixed works, Lucida
shows only weird glyphs, Helvetica is distorted.

Misc Fixed works using this line:
static const char font[] =
"-misc-fixed-medium-r-*-*-15-*-*-*-*-*-iso10646-1";

Lucida does not work using this line:
static const char font[] =
"-*-lucida-medium-r-*-*-14-*-*-*-*-*-iso10646-1";

Helvetica does not work using this line:
static const char font[] =
"-*-helvetica-medium-r-*-*-14-*-*-*-*-*-iso10646-1";

Here is how my screen looks using those fonts:
http://666kb.com/i/cv7yqta59l6lrkznn.png

The font strings are copied from xfontsel.  All those fonts work fine
in other applications (for example in xterm and textadept).  Only in
dwm they do not work.

My system locale is de_DE.UTF-8.

Does somebody have an idea what is going on here?

Thanks and kind regards,
Joshua





Re: [dev] [ii] Patch to use ii with UCSPI backend

2015-01-18 Thread Nico Golde
Hi,
* younix  [2015-01-15 22:41]:
> this diff changes the network connection of ii to the UCSPI[1] protocol.
> This makes ii much more flexible.  With the UCSPI protocol you could use
> features like IPv6[2], SOCKSv5[3] or even TLS[3].  This diff extracts
> the socket handling infrastructure to an external program like
> tcpclient.  So it shrinks the codebase and complexity.
> 
> What is your opinion about this diff?  At least it would be great to put
> this patch at the ii suckless webpage.  So I could made an OpenBSD port
> (flavor) of it.

I would rather not want to include it upstream due to the additional 
dependency. However, I really like the idea and think there is definitely a 
value having that as an option. I see two possibilities and I have no 
preference in either direction, either we put this as a diff on the website or 
alternatively we maintain this in git as a branch. The website has the 
advantage that it would allow you to easily maintain that patch and put up new 
revision on your own. What do you think?

Thanks this patch, I like the idea!

Cheers
Nico
-- 
Nico Golde - XMPP: n...@jabber.ccc.de - GPG: 0xA0A0


pgpnEzUK7SHI_.pgp
Description: PGP signature


Re: [dev] surf trivial bugs patch

2015-01-18 Thread Christoph Lohmann
Greetings.

On Sun, 18 Jan 2015 11:45:17 +0100 Carlos Torres  wrote:
> Hello,
> 
> On Sat, Jan 17, 2015 at 1:23 AM, Christoph Lohmann <2...@r-36.net> wrote:
> > Thanks, the patch has been applied.
> >
> 
> cmd[] still appears to be 1 short

Thanks, it has been fixed.


Sincerely,

Christoph Lohmann