Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Markus Teich
Ivan Tham wrote:
 I haven't tried dwm as it seems a bit hard to configure compared to i3 but i3
 seems to be easier to use (I don't think it it much faster) as it only uses
 split as horizontal or vertical.

Heyho Ivan,

just try the default config first. You can easily setup a Xephyr or Xnest to
test out both WMs (dwm of course is far superiour ;P) and quickly change dwm's
config.h, recompile and relaunch without having to restart your whole X session
where you probably want to have some webbrowser or manpages open with
documentation. Configuring your software through changing the config.h
headerfile and recompiling may seem strange in the beginning, but you will
quickly get used to it.

This also has a few benefits: The software does not need a config-file parser
and also the config is automatically syntax-checked while recompiling.

--Markus



Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Ivan Tham
I haven't tried dwm as it seems a bit hard to configure compared to i3
but i3 seems to be easier to use (I don't think it it much faster) as
it only uses split as horizontal or vertical.

On 3/15/15, Anselm R Garbe garb...@gmail.com wrote:
 On 15 March 2015 at 15:05, Ivan Tham ivanthamjun...@gmail.com wrote:
 Hi, I hope someone can add some comparison between dwm and other
 window manager such as i3 to dwm.suckless.org. Thanks.

 Why? Feel free to contribute this comparison.

 BR,
 Anselm





Re: [dev] [faq] How do I push to st repository?

2015-03-15 Thread Markus Teich
Ivan Tham wrote:
 I tried to push to st repository but it seems that I cannot push. What do I
 need to do? Thanks.

Heyho Ivan,

read http://git-scm.com/book/en/v2 at least until chapter 3.

--Markus



Re: [dev] [faq] How do I push to st repository?

2015-03-15 Thread Ivan Tham
Thanks, but it takes time reading it. For now, I just know how to push
code to github and do a pull request. Do you know what topic is
important in developing for suckless.org and I hope you can add this
to community to help some newbies in starting.

[Off topic] How to learn C language the fast way, without a 100+ pages
book (this will spoil my eyesight)?

On 3/15/15, Markus Teich markus.te...@stusta.mhn.de wrote:
 Ivan Tham wrote:
 I tried to push to st repository but it seems that I cannot push. What do
 I
 need to do? Thanks.

 Heyho Ivan,

 read http://git-scm.com/book/en/v2 at least until chapter 3.

 --Markus





Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Ivan Tham
Thanks, but I can't read french.

On 3/15/15, Sébastien Poher sb...@volted.net wrote:
 Le dimanche 15 mars 2015 à 10:55:11, Ivan Tham a écrit :
 I does not like to compile as when I run `make`:
 ```
 dwm build options:
 CFLAGS   = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os
 -I/usr/X11R6/include -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=6.1
 -DXINERAMA
 LDFLAGS  = -s -L/usr/X11R6/lib -lX11 -lXinerama
 CC   = cc
 creating config.h from config.def.h
 CC drw.c
 CC dwm.c
 dwm.c:40:37: fatal error: X11/extensions/Xinerama.h: No such file or
 directory
 compilation terminated.
 Makefile:18: recipe for target 'dwm.o' failed
 make: *** [dwm.o] Error 1
 ```

 And what does the Xlib header files means in the README?

 Hi,

 It means that you have to install the dev library (for example libx11-dev
 as
 named in debian).

 As for the difference between i3 and dwm, beside the compilation point,
 here
 are some that I have noticed (I have used both but prefered dwm):

 - dwm is faster and simpler to use (less functionnalities if you want to
   call it like that);
 - they use different paradigm : i3 creates workspace and associated tags
   when a client appears or is sent to the considered workspace // dwm has
 defined tags that you apply to clients;
 - both uses different layout: in i3 windows can be tiled, stacked or tabbed
   (or floating);
   in dwm you have tiling, floating and maximising layout

 For the rest, its more or less a question of taste.
 Try both and make you're choice.
 dwm is not difficult and there is documentation.
 Take a look at the i3 config file, the first time, you may find it hard as
 well.

 I've written tutorials for both (french):

 http://www.volted.net/tutos/dwm.html
 http://www.volted.net/tutos/i3.html

 Regards,
 --
 Sébastien Poher
 www.volted.net
 Aidez-nous à défendre la liberté du logiciel:
 http://www.fsf.org/register_form?referrer=11902




[dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Ivan Tham
Hi, I hope someone can add some comparison between dwm and other
window manager such as i3 to dwm.suckless.org. Thanks.



Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Anselm R Garbe
On 15 March 2015 at 15:05, Ivan Tham ivanthamjun...@gmail.com wrote:
 Hi, I hope someone can add some comparison between dwm and other
 window manager such as i3 to dwm.suckless.org. Thanks.

Why? Feel free to contribute this comparison.

BR,
Anselm



Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Markus Teich
Ivan Tham wrote:
 dwm.c:40:37: fatal error: X11/extensions/Xinerama.h: No such file or directory

Heyho Ivan,

you need the Xlib header files. On Debian based systems just install xlib-dev
and libxinerama-dev (the `-dev` packages contain the header files, if you
stumble upon this error anytime in the future again).

--Markus



[dev] [st] Problems when typing

2015-03-15 Thread Ivan Tham
When I typed `ls` in st, this show up:

$ lls

Does anyone know what is the problem, thanks.



Re: [dev] [faq] How do I push to st repository?

2015-03-15 Thread Markus Teich
Ivan Tham wrote:
 Thanks, but it takes time reading it. For now, I just know how to push code to
 github and do a pull request. Do you know what topic is important in
 developing for suckless.org and I hope you can add this to community to help
 some newbies in starting.

Heyho Ivan,

if you want to really use git, you should read the whole book. Developing for
suckless implies knowing haw git works, so just read it.

 [Off topic] How to learn C language the fast way, without a 100+ pages book
 (this will spoil my eyesight)?

You don't. Grab that book and work through it 5 times. There is no easy/fast way
to learn any programming language.

--Markus



Re: [dev] [surf][patch]history patch update

2015-03-15 Thread Markus Teich
Heyho Sébastien,

Sébastien Poher wrote:
 I've add cariage return so that visited URIs are not put one after one in
 history file but each one on a new line.

 + FILE *f;
 + f = fopen(historyfile, a+);
 + fprintf(f, \n%s, u);
 + fclose(f);

You should check if the file could be opened. Also you can replace the
suckless-less printf function with two calls to fputs, which don't have to parse
a formatstring:

if((f = fopen(historyfile, a+))) {
fputs(u, f);
fputs(\n, f);
fclose(f);
}

 Instead of using the original version, I've adapted the function in the same
 vein of the bookmarking patch so that one can browse its history from dmenu by
 hiting C+S+h keys.

I think having another shortcut to open a URL is superfluous. I changed ctrl-g
to also display the history (most recent entry topmost). Also I use a search
history and therefore split the SETPROP define into SETURI and SETSEARCH:

#define SETURI { \
.v = (char *[]){ /bin/sh, -c, \
prop=\`xprop -id $0 _SURF_URI \
 | cut -d '\' -f 2 \
 | tac - \${HOME}/.surf/history\ \
 | awk '!x[$0]++' \
 | dmenu -i -l 10`\ \
  xprop -id $0 -f _SURF_GO 8s -set _SURF_GO \$prop\, \
winid, NULL \
} \
}

#define SETSEARCH { \
.v = (char *[]){ /bin/sh, -c, \
prop=\`xprop -id $0 _SURF_FIND \
 | cut -d '\' -f 2 \
 | tac - \${HOME}/.surf/searches\ \
 | awk '!x[$0]++' \
 | xargs -0 printf %b \
 | dmenu -i -l 10`\ \
  xprop -id $0 -f _SURF_FIND 8s -set _SURF_FIND \$prop\ \
  echo \$prop\  \${HOME}/.surf/searches\, \
winid, NULL \
} \
}

In the SETURI call the `xargs` part is missing in the pipeline, since my history
is already 2MiB and after too many characters the commandline call generated by
xargs becomes too large for the shell to handle. Without the `xargs` all the
data is passed over stdin and stdout and the commandlines always stay in O(1)
and don't depend on the length of the history file. BEWARE: The person
introducing this `xargs` call is convinced it is necessary, however I did not
run into any case where it breaks when leaving it out.

I also have a script to deduplicate the history files, which I run regularly:

cd ~/.surf

du -h history
tac history | awk '!x[$0]++' | tac history.$$
cp history.$$ history
rm -f history.$$
du -h history

du -h searches
tac searches | awk '!x[$0]++' | tac history.$$
cp history.$$ searches
rm -f history.$$
du -h searches

I also changed tabbed's SETPROP, so it displays a list of all open tabs first,
followed by the history (most recent entry topmost) as above. Now with MODKEY+t
(tabbed) you can either switch to an already opened tab, open a new tab with a
URL already in the history or open a new tab with a changed URL from history or
a completely new URL all with the help of dmenu and it's awesome filtering.

#define SETPROP(p) { \
.v = (char *[]){ /bin/sh, -c, \
prop=\`xwininfo -children -id $1 | grep '^ 0x' \
 | sed -e's@^ *\\(0x[0-9a-f]*\\) \\\([^\]*\\)\.*@\\1 \\2@' \
 | tac - \${HOME}/.$2/history\ \
 | awk '!x[$0]++' \
 | xargs -0 printf %b | dmenu -l 10`\ \
  xprop -id $1 -f $0 8s -set $0 \$prop\, \
p, winid, clientbin, NULL \
} \
}

I hope this is useful to you.

--Markus



Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Henrique Lengler
On Sun, Mar 15, 2015 at 10:35:50PM +0800, Ivan Tham wrote:
 I haven't tried dwm as it seems a bit hard to configure compared to i3
 but i3 seems to be easier to use (I don't think it it much faster) as
 it only uses split as horizontal or vertical.

dwm is not difficult, it is just different.
Start with a default configuration and you are good to go.
there is a tutorial: http://dwm.suckless.org/tutorial
-- 
Regards

Henrique Lengler 



[dev] [faq] How do I push to st repository?

2015-03-15 Thread Ivan Tham
Hi,

I tried to push to st repository but it seems that I cannot push. What
do I need to do? Thanks.



Re: [dev] [faq] How do I push to st repository?

2015-03-15 Thread Ivan Tham
Ok, I will but it may take months. Thanks.

On 3/15/15, Markus Teich markus.te...@stusta.mhn.de wrote:
 Ivan Tham wrote:
 Thanks, but it takes time reading it. For now, I just know how to push
 code to
 github and do a pull request. Do you know what topic is important in
 developing for suckless.org and I hope you can add this to community to
 help
 some newbies in starting.

 Heyho Ivan,

 if you want to really use git, you should read the whole book. Developing
 for
 suckless implies knowing haw git works, so just read it.

 [Off topic] How to learn C language the fast way, without a 100+ pages
 book
 (this will spoil my eyesight)?

 You don't. Grab that book and work through it 5 times. There is no easy/fast
 way
 to learn any programming language.

 --Markus





Re: [dev] [faq] How do I push to st repository?

2015-03-15 Thread Sébastien Poher
Le dimanche 15 mars 2015 à 11:10:54, Ivan Tham a écrit :
 Thanks, but it takes time reading it. 

Hi,
I don't think that you'll get further help if you start an email with this
kind of sentence.
I consider myself as a beginner too, so if I can give you a newbie to
newbie advice:

- follow the given advices.

Cheers,
-- 
Sébastien Poher
www.volted.net
Aidez-nous à défendre la liberté du logiciel: 
http://www.fsf.org/register_form?referrer=11902



Re: [dev] [dwm] [patch] Fix freetype include on config.mk, imitating st file.

2015-03-15 Thread Henrique Lengler
On Sun, Mar 15, 2015 at 12:15:04PM +0100, Anselm R Garbe wrote:
 I dislike depending on pkg-config. Can you supply the results instead
 and change the fix in a way that OpenBSD owners can amend their
 config.mk without touching the Linux versions?

I agree, and I solved in a better way, using the X11INC variable.
This is the patch:

diff --git a/config.mk b/config.mk
index cf95913..a15f677 100644
--- a/config.mk
+++ b/config.mk
@@ -15,7 +15,7 @@ XINERAMALIBS  = -lXinerama
 XINERAMAFLAGS = -DXINERAMA

 # includes and libs
-INCS = -I${X11INC} -I/usr/include/freetype2
+INCS = -I${X11INC} -I${X11INC}/freetype2
 LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} -lfontconfig -lXft

 # flags

But I don't know if this is good to Linux.
If this not work, I only think about create a commented line to OpenBSD
-- 
Regards

Henrique Lengler 



Re: [dev] [surf][patch]history patch update

2015-03-15 Thread Sébastien Poher
Hi Markus,

First of all, I have to confess (*glups*) that I am not a programmer, just a
beginner enjoying quality software and trying to learn from that.
For that, suckless tools and software help a lot due to the clarity of the
code.

Le dimanche 15 mars 2015 à 01:12:19, Markus Teich a écrit :
 Sébastien Poher wrote:
  I've add cariage return so that visited URIs are not put one after one in
  history file but each one on a new line.
 
  +   FILE *f;
  +   f = fopen(historyfile, a+);
  +   fprintf(f, \n%s, u);
  +   fclose(f);
 
 You should check if the file could be opened. Also you can replace the
 suckless-less printf function with two calls to fputs, which don't have to 
 parse
 a formatstring:
 
 if((f = fopen(historyfile, a+))) {
 fputs(u, f);
 fputs(\n, f);
 fclose(f);
 }

As I mentionned above, I am not, at the moment at least, able to understand
the inherent differences between those two functions, so I'll rely on your code.

  Instead of using the original version, I've adapted the function in the same
  vein of the bookmarking patch so that one can browse its history from dmenu 
  by
  hiting C+S+h keys.
 
 I think having another shortcut to open a URL is superfluous. I changed ctrl-g
 to also display the history (most recent entry topmost). Also I use a search
 history and therefore split the SETPROP define into SETURI and SETSEARCH:
 
 #define SETURI { \
 .v = (char *[]){ /bin/sh, -c, \
 prop=\`xprop -id $0 _SURF_URI \
  | cut -d '\' -f 2 \
  | tac - \${HOME}/.surf/history\ \
  | awk '!x[$0]++' \
  | dmenu -i -l 10`\ \
   xprop -id $0 -f _SURF_GO 8s -set _SURF_GO \$prop\, \
 winid, NULL \
 } \
 }
 
 #define SETSEARCH { \
 .v = (char *[]){ /bin/sh, -c, \
 prop=\`xprop -id $0 _SURF_FIND \
  | cut -d '\' -f 2 \
  | tac - \${HOME}/.surf/searches\ \
  | awk '!x[$0]++' \
  | xargs -0 printf %b \
  | dmenu -i -l 10`\ \
   xprop -id $0 -f _SURF_FIND 8s -set _SURF_FIND \$prop\ \
   echo \$prop\  \${HOME}/.surf/searches\, \
 winid, NULL \
 } \
 }
 
 In the SETURI call the `xargs` part is missing in the pipeline, since my 
 history
 is already 2MiB and after too many characters the commandline call generated 
 by
 xargs becomes too large for the shell to handle. Without the `xargs` all the
 data is passed over stdin and stdout and the commandlines always stay in O(1)
 and don't depend on the length of the history file. BEWARE: The person
 introducing this `xargs` call is convinced it is necessary, however I did not
 run into any case where it breaks when leaving it out.

Thanks for that, that's a clean way to handle both history and searches and
it works well. The only problem I have is that it messes with the bookmarks
patch that uses SETPROP, so I was thinking about something like:

#define SETURI { \
.v = (char *[]){ /bin/sh, -c, \
prop=\`xprop -id $0 _SURF_URI \
 | cut -d '\' -f 2 \
 | tac - \${HOME}/.surf/bookmarks\ \${HOME}/.surf/history\ \
 | awk '!x[$0]++' \
 | dmenu -i -l 10`\ \
  xprop -id $0 -f _SURF_GO 8s -set _SURF_GO \$prop\, \
winid, NULL \
} \
}

So that one can have access to its bookmarks at the top of the dmenu list as
well as its history whithout the need of a superfluous shortcut.

 I also have a script to deduplicate the history files, which I run regularly:
 
 cd ~/.surf
 
 du -h history
 tac history | awk '!x[$0]++' | tac history.$$
 cp history.$$ history
 rm -f history.$$
 du -h history
 
 du -h searches
 tac searches | awk '!x[$0]++' | tac history.$$
 cp history.$$ searches
 rm -f history.$$
 du -h searches
 
 I also changed tabbed's SETPROP, so it displays a list of all open tabs first,
 followed by the history (most recent entry topmost) as above. Now with 
 MODKEY+t
 (tabbed) you can either switch to an already opened tab, open a new tab with a
 URL already in the history or open a new tab with a changed URL from history 
 or
 a completely new URL all with the help of dmenu and it's awesome filtering.
 
 #define SETPROP(p) { \
 .v = (char *[]){ /bin/sh, -c, \
 prop=\`xwininfo -children -id $1 | grep '^ 0x' \
  | sed -e's@^ *\\(0x[0-9a-f]*\\) \\\([^\]*\\)\.*@\\1 \\2@' \
  | tac - \${HOME}/.$2/history\ \
  | awk '!x[$0]++' \
  | xargs -0 printf %b | dmenu -l 10`\ \
   xprop -id $1 -f $0 8s -set $0 \$prop\, \
 p, winid, clientbin, NULL \
 } \
 }
 
 I hope this is useful to you.

It is indeed, I'll will try that.
Thanks a lot.
I'va attached the patch that sums up all your comments.

Sincerely, 

-- 
Sébastien Poher
www.volted.net
Aidez-nous à défendre la liberté du logiciel: 
http://www.fsf.org/register_form?referrer=11902
diff --git a/config.def.h b/config.def.h
index a1ab211..9f1de5f 100644
--- a/config.def.h
+++ b/config.def.h
@@ -16,6 +16,7 @@ static gfloat 

Re: [dev] [surf][patch]history patch update

2015-03-15 Thread Markus Teich
Sébastien Poher wrote:
 Thanks for that, that's a clean way to handle both history and searches and
 it works well. The only problem I have is that it messes with the bookmarks
 patch that uses SETPROP, so I was thinking about something like:
 
 #define SETURI { \
 .v = (char *[]){ /bin/sh, -c, \
 prop=\`xprop -id $0 _SURF_URI \
  | cut -d '\' -f 2 \
  | tac - \${HOME}/.surf/bookmarks\ \${HOME}/.surf/history\ \
  | awk '!x[$0]++' \
  | dmenu -i -l 10`\ \
   xprop -id $0 -f _SURF_GO 8s -set _SURF_GO \$prop\, \
 winid, NULL \
 } \
 }
 
 So that one can have access to its bookmarks at the top of the dmenu list as
 well as its history whithout the need of a superfluous shortcut.

Heyho Sébastien,

well I don't use bookmarks (yet?), but that seems to be the canonical solution.

--Markus



Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Ivan Tham
I does not like to compile as when I run `make`:
```
dwm build options:
CFLAGS   = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os
-I/usr/X11R6/include -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=6.1
-DXINERAMA
LDFLAGS  = -s -L/usr/X11R6/lib -lX11 -lXinerama
CC   = cc
creating config.h from config.def.h
CC drw.c
CC dwm.c
dwm.c:40:37: fatal error: X11/extensions/Xinerama.h: No such file or directory
compilation terminated.
Makefile:18: recipe for target 'dwm.o' failed
make: *** [dwm.o] Error 1
```

And what does the Xlib header files means in the README?



Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Ivan Tham
Thanks, but how do I know about the -dev, but how do I know libxinerama-dev?

Thanks, I had successfully compiled it, trying now.

On 3/15/15, Markus Teich markus.te...@stusta.mhn.de wrote:
 Ivan Tham wrote:
 dwm.c:40:37: fatal error: X11/extensions/Xinerama.h: No such file or
 directory

 Heyho Ivan,

 you need the Xlib header files. On Debian based systems just install
 xlib-dev
 and libxinerama-dev (the `-dev` packages contain the header files, if you
 stumble upon this error anytime in the future again).

 --Markus





Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Sébastien Poher
Le dimanche 15 mars 2015 à 10:55:11, Ivan Tham a écrit :
 I does not like to compile as when I run `make`:
 ```
 dwm build options:
 CFLAGS   = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os
 -I/usr/X11R6/include -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=6.1
 -DXINERAMA
 LDFLAGS  = -s -L/usr/X11R6/lib -lX11 -lXinerama
 CC   = cc
 creating config.h from config.def.h
 CC drw.c
 CC dwm.c
 dwm.c:40:37: fatal error: X11/extensions/Xinerama.h: No such file or directory
 compilation terminated.
 Makefile:18: recipe for target 'dwm.o' failed
 make: *** [dwm.o] Error 1
 ```
 
 And what does the Xlib header files means in the README?

Hi,

It means that you have to install the dev library (for example libx11-dev as
named in debian).

As for the difference between i3 and dwm, beside the compilation point, here
are some that I have noticed (I have used both but prefered dwm):

- dwm is faster and simpler to use (less functionnalities if you want to
  call it like that);
- they use different paradigm : i3 creates workspace and associated tags
  when a client appears or is sent to the considered workspace // dwm has
defined tags that you apply to clients;
- both uses different layout: in i3 windows can be tiled, stacked or tabbed
  (or floating);
  in dwm you have tiling, floating and maximising layout

For the rest, its more or less a question of taste.
Try both and make you're choice.
dwm is not difficult and there is documentation.
Take a look at the i3 config file, the first time, you may find it hard as
well.

I've written tutorials for both (french):

http://www.volted.net/tutos/dwm.html
http://www.volted.net/tutos/i3.html

Regards,
-- 
Sébastien Poher
www.volted.net
Aidez-nous à défendre la liberté du logiciel: 
http://www.fsf.org/register_form?referrer=11902


signature.asc
Description: Digital signature


Re: [dev] Re: [dwm] [libsl] Xft and fallback fonts support

2015-03-15 Thread Eric Pruitt
On Sun, Mar 15, 2015 at 01:41:11PM +0300, Yury Shvedov wrote:
 Please don't be hurry. I got close to the last systray's problem
 solution. I hope I will fix it today.

Alright. On a related note, it turns out my fix for the missing icons
doesn't actually work. I'm not sure why I kept seeing (c-win == 0)
especially since I have compiler optimizations disabled. After looking
into the issue some more, I did discover that the size properties of the
invisible icons are unusually large. For example, using gdb to inspect
wa.width and wa.height on the phantom icons yields that the icon is
200x200 pixels. Interestingly enough, the phantom icon problem never
happens on my work machine which runs a variant of Ubuntu whereas I use
Debian stable on my home PC, so I can't help but wonder if the phantom
icon problem is a library issue that's been solved in a newer release of
X11.

Eric



Re: [dev] Re: [dwm] [libsl] Xft and fallback fonts support

2015-03-15 Thread Yury Shvedov

Hi, Eric.

Please don't be hurry. I got close to the last systray's problem 
solution. I hope I will fix it today.


On 03/14/2015 06:54 AM, Eric Pruitt wrote:

On Thu, Mar 12, 2015 at 08:01:37AM +0100, Anselm R Garbe wrote:

Yes.

Best regards,
Anselm

Thanks for applying the patch and using git-am this time. This makes
maintaining my personal copy of dwm a and its patches a lot easier.

If anyone is currently using the systray patch and would like to update
their copy of dwm, I will be submitting an updated version of the patch
to the wiki this weekend.

Eric



--
Kind regards
Yury Shvedov




Re: [dev] [dwm] [patch] Fix freetype include on config.mk, imitating st file.

2015-03-15 Thread Anselm R Garbe
Hi Henrique,

On 14 March 2015 at 03:59, Henrique Lengler henriquel...@opmbx.org wrote:
 This patch solved me a build problem when tring to build dwm with the new 
 freetype support on
 Openbsd.
 I changed config.mk to act as st config.mk, using pkg-config to find
 includes.
 Patch attached.

I dislike depending on pkg-config. Can you supply the results instead
and change the fix in a way that OpenBSD owners can amend their
config.mk without touching the Linux versions?

Thanks,
Anselm



[dev] [surf][patch]history patch update

2015-03-15 Thread Sébastien Poher
Hi,

When trying to apply and use [1] I found it a bit outdated so here's a
proposal of update.

I've add cariage return so that visited URIs are not put one after one in
history file but each one on a new line.
Instead of using the original version, I've adapted the function in the same
vein of the bookmarking patch so that one can browse its history 
from dmenu by hiting C+S+h keys.

Regards,

[1] http://surf.suckless.org/patches/history
-- 
Sébastien Poher
www.volted.net
Aidez-nous à défendre la liberté du logiciel: 
http://www.fsf.org/register_form?referrer=11902
diff --git a/config.def.h b/config.def.h
index a1ab211..058f2e2 100644
--- a/config.def.h
+++ b/config.def.h
@@ -16,6 +16,7 @@ static gfloat zoomlevel = 1.0;   /* Default zoom level */
 
 /* Soup default features */
 static char *cookiefile = ~/.surf/cookies.txt;
+static char *historyfile= ~/.surf/history.txt;
 static char *cookiepolicies = Aa@; /* A: accept all; a: accept nothing,
 @: accept no third party */
 static char *cafile = /etc/ssl/certs/ca-certificates.crt;
@@ -63,6 +64,17 @@ static Bool allowgeolocation  = TRUE;
 	} \
 }
 
+/* HIST */
+#define HISTORY(p, q) { \
+.v = (char *[]){ /bin/sh, -c, \
+prop=\`(xprop -id $2 $0 \
+ | cut -d '\' -f 2 | xargs -0 printf %b  \
+cat ~/.surf/history) | dmenu -l 10 -i -p history`\  \
+xprop -id $2 -f $1 8s -set $1 \$prop\, \
+p, q, winid, NULL \
+} \
+}
+
 /* styles */
 /*
  * The iteration will stop at the first match, beginning at the beginning of
@@ -113,6 +125,7 @@ static Key keys[] = {
 { MODKEY,   GDK_g,  spawn,  SETPROP(_SURF_URI, _SURF_GO) },
 { MODKEY,   GDK_f,  spawn,  SETPROP(_SURF_FIND, _SURF_FIND) },
 { MODKEY,   GDK_slash,  spawn,  SETPROP(_SURF_FIND, _SURF_FIND) },
+{ MODKEY|GDK_SHIFT_MASK,GDK_h,  spawn,  HISTORY(_SURF_URI, _SURF_GO) },
 
 { MODKEY,   GDK_n,  find,   { .b = TRUE } },
 { MODKEY|GDK_SHIFT_MASK,GDK_n,  find,   { .b = FALSE } },
diff --git a/surf.c b/surf.c
index 87c10ef..118627e 100644
--- a/surf.c
+++ b/surf.c
@@ -319,6 +319,7 @@ cleanup(void) {
 	while(clients)
 		destroyclient(clients);
 	g_free(cookiefile);
+	g_free(historyfile);
 	g_free(scriptfile);
 	g_free(stylefile);
 }
@@ -772,6 +773,10 @@ loaduri(Client *c, const Arg *arg) {
 		reload(c, a);
 	} else {
 		webkit_web_view_load_uri(c-view, u);
+		FILE *f;
+		f = fopen(historyfile, a+);
+		fprintf(f, \n%s, u);
+		fclose(f);
 		c-progress = 0;
 		c-title = copystr(c-title, u);
 		updatetitle(c);
@@ -1222,6 +1227,7 @@ setup(void) {
 
 	/* dirs and files */
 	cookiefile = buildpath(cookiefile);
+	historyfile = buildpath(historyfile);
 	scriptfile = buildpath(scriptfile);
 	cachefolder = buildpath(cachefolder);
 	styledir = buildpath(styledir);


signature.asc
Description: Digital signature


Re: [dev] [st][PATCH] Support XA_STRING in notify request

2015-03-15 Thread Christoph Lohmann
Greetings.

On Sun, 15 Mar 2015 19:31:22 +0100 Roberto E. Vargas Caballero 
k...@shike2.com wrote:
 Some programs can only deal with XA_STRING, and it makes impossible st
 be able of copying to them. This patch makes st answer also to XA_STRING,
 althought it sends utf8 strings. It is not a problem because moderm
 applications must support utf8.

Long live UTF-8!

You can apply the patch.


Sincerely,

Christoph Lohmann




Re: [dev] [faq] How do I push to st repository?

2015-03-15 Thread Christoph Lohmann
Greetings.

On Sun, 15 Mar 2015 19:42:03 +0100 Ivan Tham ivanthamjun...@gmail.com wrote:
 Hi,
 
 I tried to push to st repository but it seems that I cannot push. What
 do I need to do? Thanks.

First  earn the respect to be allowed to do that. Then you automatically
know how to do it.


Sincerely,

Christoph Lohmann




Re: [dev] Re: [dwm] [libsl] Xft and fallback fonts support

2015-03-15 Thread Yury Shvedov
No, unfortunately I'm failed. There is something strange with the one 
one first icon. It simply maps only first time. After that it don't want 
to redraw. The code, which makes it to do so works on time 
(XMapSubwindows), but cant make this icon to map correctly. I will try 
later.


On 03/15/2015 06:28 PM, Eric Pruitt wrote:

On Sun, Mar 15, 2015 at 01:41:11PM +0300, Yury Shvedov wrote:

Please don't be hurry. I got close to the last systray's problem
solution. I hope I will fix it today.

Alright. On a related note, it turns out my fix for the missing icons
doesn't actually work. I'm not sure why I kept seeing (c-win == 0)
especially since I have compiler optimizations disabled. After looking
into the issue some more, I did discover that the size properties of the
invisible icons are unusually large. For example, using gdb to inspect
wa.width and wa.height on the phantom icons yields that the icon is
200x200 pixels. Interestingly enough, the phantom icon problem never
happens on my work machine which runs a variant of Ubuntu whereas I use
Debian stable on my home PC, so I can't help but wonder if the phantom
icon problem is a library issue that's been solved in a newer release of
X11.

Eric



--
Kind regards
Yury Shvedov




[dev] [st][PATCH] Support XA_STRING in notify request

2015-03-15 Thread Roberto E. Vargas Caballero
Some programs can only deal with XA_STRING, and it makes impossible st
be able of copying to them. This patch makes st answer also to XA_STRING,
althought it sends utf8 strings. It is not a problem because moderm
applications must support utf8.
---
 st.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/st.c b/st.c
index 4b98b27..aa4185c 100644
--- a/st.c
+++ b/st.c
@@ -1089,7 +1089,11 @@ selrequest(XEvent *e) {
XA_ATOM, 32, PropModeReplace,
(uchar *) string, 1);
xev.property = xsre-property;
-   } else if(xsre-target == sel.xtarget) {
+   } else if(xsre-target == sel.xtarget || xsre-target == XA_STRING) {
+   /*
+* xith XA_STRING non ascii characters may be incorrect in the
+* requestor. It is not our problem, use utf8.
+*/
clipboard = XInternAtom(xw.dpy, CLIPBOARD, 0);
if(xsre-selection == XA_PRIMARY) {
seltext = sel.primary;
-- 
2.2.1




Re: [dev] [st] Problems when typing

2015-03-15 Thread Christoph Lohmann
Greetings.

On Sun, 15 Mar 2015 19:42:44 +0100 Ivan Tham ivanthamjun...@gmail.com wrote:
 When I typed `ls` in st, this show up:
 
 $ lls
 
 Does anyone know what is the problem, thanks.

No.  You  first  need to learn how to do a proper bug report. First look
into the sourcecode, find the problem and attach a patch. While  follow‐
ing this long path your problem will most likely resolve without wasting
many support resources.


Sincerely,

Christoph Lohmann




Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Eric Pruitt
On Sun, Mar 15, 2015 at 11:07:26PM +0800, Ivan Tham wrote:
 Thanks, but how do I know about the -dev, but how do I know libxinerama-dev?

Experience and / or guess-work. Compiler complaining about $HEADER.h?
Try installing lib$HEADER-dev (Debian) or $HEADER-devel (RHEL). Failing
that, just Google it. If you search debian xinerama.h, the first
result is Debian -- File list of package libxinerama-dev/wheezy/s*
Even better, the 5th result is [SOLVED] Cannot compile dwm window
manager - Ubu... (http://ubuntuforums.org/showthread.php?t=1843661).
There are also things like apt-file or yum whatprovides which can aid
in offline searching.

* This is assuming Google isn't doing personalized search result
  munging.

Eric



Re: [dev] [st] Problems when typing

2015-03-15 Thread Ivan Tham
Thanks, I think you mean to paste the patch here.

On 3/16/15, Christoph Lohmann 2...@r-36.net wrote:
 Greetings.

 On Sun, 15 Mar 2015 19:42:44 +0100 Ivan Tham ivanthamjun...@gmail.com
 wrote:
 When I typed `ls` in st, this show up:

 $ lls

 Does anyone know what is the problem, thanks.

 No.  You  first  need to learn how to do a proper bug report. First look
 into the sourcecode, find the problem and attach a patch. While  follow‐
 ing this long path your problem will most likely resolve without wasting
 many support resources.


 Sincerely,

 Christoph Lohmann






Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Ivan Tham
I want to learn C, so now I am waiting for c.learncodethehardway.org
to release as other book may seem a bit too long for me.

On 3/16/15, Eric Pruitt eric.pru...@gmail.com wrote:
 On Mon, Mar 16, 2015 at 12:32:44PM +0800, Ivan Tham wrote:
 Thanks, I think I get the concept of what an -dev is.

 But what is a header file?

 Short, very simplified answer: header files generally contain
 information needed to use an API, in this case X11 and Xinerama. For the
 long answer, you should probably learn C or C++.

 Eric





Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Eric Pruitt
On Mon, Mar 16, 2015 at 12:32:44PM +0800, Ivan Tham wrote:
 Thanks, I think I get the concept of what an -dev is.

 But what is a header file?

Short, very simplified answer: header files generally contain
information needed to use an API, in this case X11 and Xinerama. For the
long answer, you should probably learn C or C++.

Eric



Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Ivan Tham
Thanks, I think I get the concept of what an -dev is.

But what is a header file?

On 3/16/15, Eric Pruitt eric.pru...@gmail.com wrote:
 On Sun, Mar 15, 2015 at 11:07:26PM +0800, Ivan Tham wrote:
 Thanks, but how do I know about the -dev, but how do I know
 libxinerama-dev?

 Experience and / or guess-work. Compiler complaining about $HEADER.h?
 Try installing lib$HEADER-dev (Debian) or $HEADER-devel (RHEL). Failing
 that, just Google it. If you search debian xinerama.h, the first
 result is Debian -- File list of package libxinerama-dev/wheezy/s*
 Even better, the 5th result is [SOLVED] Cannot compile dwm window
 manager - Ubu... (http://ubuntuforums.org/showthread.php?t=1843661).
 There are also things like apt-file or yum whatprovides which can aid
 in offline searching.

 * This is assuming Google isn't doing personalized search result
   munging.

 Eric





Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Roberto E. Vargas Caballero
 On Sun, Mar 15, 2015 at 11:07:26PM +0800, Ivan Tham wrote:
 Thanks, but how do I know about the -dev, but how do I know libxinerama-dev?
 
 Experience and / or guess-work. Compiler complaining about $HEADER.h?
 Try installing lib$HEADER-dev (Debian) or $HEADER-devel (RHEL). Failing

If you are using debian based distro you can install apt-file:

apt-file update (first time to build the database)
apt-file search file (it will say you which package has the file).

Regards,




Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Ivan Tham
How useful is that apt-file? I had installed it, but I don't know what
are the uses for it.

On 3/16/15, Roberto E. Vargas Caballero k...@shike2.com wrote:
 On Sun, Mar 15, 2015 at 11:07:26PM +0800, Ivan Tham wrote:
 Thanks, but how do I know about the -dev, but how do I know
 libxinerama-dev?

 Experience and / or guess-work. Compiler complaining about $HEADER.h?
 Try installing lib$HEADER-dev (Debian) or $HEADER-devel (RHEL). Failing

 If you are using debian based distro you can install apt-file:

   apt-file update (first time to build the database)
   apt-file search file (it will say you which package has the file).

 Regards,






Re: [dev] [st] Problems when typing

2015-03-15 Thread Christoph Lohmann
Greetings.

On Mon, 16 Mar 2015 06:36:24 +0100 Ivan Tham ivanthamjun...@gmail.com wrote:
 Thanks, I think you mean to paste the patch here.

Please  don’t  spam this mailinglist with twitter‐size requests. You can
type long e‐mails and discuss in them. It’s not just that some bots  an‐
swer  your  short questions because you are too lazy to inform yourself.
If you expect answers from me in the future you will have to send  me  a
formal  proof that you have read [0], wrote at least a project of a size
of 500 lines of source code and published it somewhere using git.

Please comrades stop  answering  him. He has said that he’s unwilling to
read a C book and tries to use this mailinglist  as  is  personal  glory
hole for programming questions. He’s clearly a pure customer.


Sincerely,

Christoph Lohmann

[0] https://en.wikipedia.org/wiki/The_C_Programming_Language_(book)




Re: [dev] [st] Problems when typing

2015-03-15 Thread Alexander S.
2015-03-16 8:36 GMT+03:00 Christoph Lohmann 2...@r-36.net:
 Sincerely,

 Christoph Lohmann
Wow, didn't ever seen ye that full of yerself, 20h. Making up
challenges for random people at the same time you tell them to never
come back, eh? Must make a ton of sense to you.