Re: [dev] uriel is gone

2012-10-16 Thread Ruben Gonzalez Arnau

Thanks for all your contribution!

Descansa en paz/pau/peace/frid Uriel

R.I.P

--
r...@sdf.lonestar.org




Re: [dev] about patch xft on FreeBSD

2012-05-03 Thread Ruben Gonzalez Arnau

Hi,

Try to change this on config.mk

INCS = -I. -I/usr/include -I${X11INC}

to

INCS = -I. -I/usr/include -I${X11INC} -I/usr/local/include/freetype2

Hope it helps.

On 05/03/2012 15:34, alphachi wrote:

Hello!

I'm using dwm 6.0 on FreeBSD 9.0 Release amd64. I need font antialias 
and CJK supports for statusbar. When I patch 
http://dwm.suckless.org/patches/dwm-6.0-xft.diff, some errors show:


# cd /usr/ports/x11-wm/dwm/work/dwm-6.0/
# patch -p1 < ~/dwm-6.0-xft.diff
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--
|--- src/dwm-6.0/dwm.c  2011-12-19 10:02:46.0 -0500
|+++ src/dwm-6.0-xft/dwm.c  2012-03-30 10:29:25.156110278 -0400
--
File to patch: dwm.c
Patching file dwm.c using Plan A...
Hunk #1 succeeded at 39.
Hunk #2 succeeded at 109.
Hunk #3 succeeded at 486.
Hunk #4 succeeded at 790.
Hunk #5 succeeded at 819.
Hunk #6 succeeded at 1070.
Hunk #7 succeeded at 1634.
Hunk #8 succeeded at 1704.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--
|--- src/dwm-6.0/config.def.h   2011-12-19 10:02:46.0 -0500
|+++ src/dwm-6.0-xft/config.def.h   2012-03-30 10:22:26.048380780 
-0400

--
File to patch: config.def.h
Patching file config.def.h using Plan A...
Hunk #1 succeeded at 1.
Hunk #2 succeeded at 18.
Hunk #3 succeeded at 28.
Hunk #4 succeeded at 46.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--
|--- src/dwm-6.0/config.mk   2011-12-19 
10:02:46.0 -0500
|+++ src/dwm-6.0-xft/config.mk   2012-03-30 
11:32:31.768929769 -0400

--
File to patch: config.mk 
Patching file config.mk  using Plan A...
Hunk #1 succeeded at 14 with fuzz 1.
done
# cd /usr/ports/x11-wm/dwm/
# make install clean
===>  Installing for dwm-6.0
===>   dwm-6.0 depends on file: /usr/local/libdata/pkgconfig/x11.pc - 
found
===>   dwm-6.0 depends on file: 
/usr/local/libdata/pkgconfig/xinerama.pc - found

===>   Generating temporary packing list
===>  Checking if x11-wm/dwm already installed
dwm build options:
CFLAGS   = -O2 -pipe -fno-strict-aliasing  -std=c99 -I. -I/usr/include 
-I/usr/local/include  -DVERSION="6.0" -DXINERAMA
LDFLAGS  =  -L/usr/lib -lc -L/usr/local/lib -lX11 -L/usr/local/lib 
-lXinerama -D_THREAD_SAFE -I/usr/local/include 
-I/usr/local/include/freetype2  -L/usr/local/lib -lXft -lXrender 
-lfontconfig -lfreetype -lX11

CC   = cc
CC dwm.c
In file included from /usr/local/include/X11/Xft/Xft.h:39,
 from dwm.c:42:
/usr/local/include/ft2build.h:56:38: error: 
freetype/config/ftheader.h: No such file or directory

In file included from dwm.c:42:
/usr/local/include/X11/Xft/Xft.h:40:10: error: #include expects 
"FILENAME" or 

In file included from dwm.c:42:
/usr/local/include/X11/Xft/Xft.h:60: error: expected '=', ',', ';', 
'asm' or '__attribute__' before '_XftFTlibrary'
/usr/local/include/X11/Xft/Xft.h:94: error: expected 
specifier-qualifier-list before 'FT_UInt'
/usr/local/include/X11/Xft/Xft.h:101: error: expected 
specifier-qualifier-list before 'FT_UInt'
/usr/local/include/X11/Xft/Xft.h:188: warning: type defaults to 'int' 
in declaration of 'FT_UInt'
/usr/local/include/X11/Xft/Xft.h:188: error: expected ';', ',' or ')' 
before '*' token
/usr/local/include/X11/Xft/Xft.h:293: warning: type defaults to 'int' 
in declaration of 'FT_UInt'
/usr/local/include/X11/Xft/Xft.h:293: error: expected ';', ',' or ')' 
before '*' token
/usr/local/include/X11/Xft/Xft.h:352: error: expected '=', ',', ';', 
'asm' or '__attribute__' before 'XftLockFace'
/usr/local/include/X11/Xft/Xft.h:391: warning: type defaults to 'int' 
in declaration of 'FT_UInt'
/usr/local/include/X11/Xft/Xft.h:391: error: expected ';', ',' or ')' 
before '*' token
/usr/local/include/X11/Xft/Xft.h:397: warning: type defaults to 'int' 
in declaration of 'FT_UInt'
/usr/local/include/X11/Xft/Xft.h:397: error: expected ';', ',' or ')' 
before '*' token
/usr/local/include/X11/Xft/Xft.h:406: error: expected declaration 
specifiers or '...' before 'FT_UInt'
/usr/local/include/X11/Xft/Xft.h:407: error: expected declaration 
specifiers or '...' before 'FT_UInt'
/usr/local/include/X11/Xft/Xft.h:416: error: expected '=', ',', ';', 
'asm' or '__attribute__' before 'XftCharIndex'
/usr/local/include/X11/Xft/Xft.h:449: warning: type defaults to 'int' 
in declaration of 'FT_UInt'
/usr/local/include/X11/Xft/Xft.h:449: error: expected ';', ',' or ')' 
before '*' token

*** Error code 1

Stop in /usr/ports/x11-wm/dwm/work/dwm-6.0.
*** Error code 1

Stop in /usr/ports/x11-wm/dwm.
*** Error code 1

Stop in /usr/ports/x11-wm/dwm.

What shall I do? Thanks!



--
r...@sdf.lonestar.org



Re: [dev] Environment variables

2012-02-12 Thread Ruben Gonzalez Arnau

On 02/12/2012 13:09, Christoph Lohmann wrote:

Greetings comrades.

Some of you might be more experienced in the old Unix ways and
might know how in the good old days all the environment variables
were standardized. What I am up to: There are these new stylish
ways of running applications based on their file extensions or
mime types, which is annoying and leads to many symlinks. Instead
some environment variables do exist. But maybe history has evolved
some other substandards than I know?

Variables:
$PAGER → pager (used by man)
$EDITOR → editor


$SOCKS_SERVER, $NO_PROXY, $AUTO_PROXY, $HTTP_PROXY,
$HTTPS_PROXY, $FTP_PROXY, $ALL_PROXY
→ proxies and exceptions (used by chromium)

Variables my environment has:
$BROWSER → web browser
$XTERM → X terminal emulator
$MEDIAPLAYER → used for playing any media file
$DOWNLOADER → (wget)
$DOWNLOADDIR → where to download files to

I know of the LSB `getconf -a`, but this only yields rather
commercially intended configurations.

What do the suckless people use in their environment?


Sincerely,

Christoph Lohmann


$PROMPT_COMMAND
$DISPLAY
$PRINTER
$TZ
$LESS
$GREP_OPTIONS
$GREP_COLOR
$LSCOLORS
$LS_COLORS


And others like ($PS1, $LANG, $LC_ALL, $MM_CHARSET, $REMOTEHOST, 
$OSTYPE, $HOST, $HOSTNAME, $CLICOLOR, $MANCOLOR etc)


Regards

--
r...@sdf.lonestar.org




Re: [dev] [dwm] auto switch to the app's tag

2011-12-14 Thread Ruben Gonzalez Arnau

On 13/12/11 18:14, nxt7 wrote:

Hello!

Is it possible to make dwm to switch to the tag where application is 
started according to the "Rules" section of config file? viewontag 
patch works only with already started applications and does not suit 
for applications started through command line or file type 
associations from file managers. On this[1] forum I was told that such 
functionality is already present in dwm but I tried both vanilla dwm 
5.8 and dwm-hg (without any patches) and found nothing similar to 
desired behavior. Can somebody explain the situation?


---
[1]https://bbs.archlinux.org/viewtopic.php?pid=1025878#p1025878


Maybe using xdotool can help in that situation.

For example, if Firefox is started on tag 3 via config rules, then you 
can spawn it with something like this:


SHCMD("xdotool key Super_L+3 && firefox")

xdotool emulate keyboard press for you.

--
r...@sdf.lonestar.org




Re: [dev] [dwm] Fullscreen Layout

2011-08-17 Thread Ruben Gonzalez Arnau

On 14/08/11 22:03, Bastien Dejean wrote:

Hi,

Any idea on how to implement a fullscreen layout?

Cheers,



From  dwm-hiltjo version:


http://www.codemadness.nl/downloads/projects/dwm/

/* Same as monocle, just never draw borders. */
void
fullscreen(Monitor *m) {
Client *c;

for(c = nexttiled(m->clients); c; c = nexttiled(c->next)) {
/* Don't draw borders. */
c->bw = 0;
resize(c, m->wx, m->wy, m->ww, m->wh, False);
/* Restore borders. */
c->bw = borderpx;
}
}

You can also automatically hide bar (MOKEY + b), using something like this:

/* hide bar */
if (selmon->showbar)
togglebar(NULL);

Hope it helps.

--
r...@sdf.lonestar.org




Re: [dev] [dwm] visible only if needed [patch]

2011-07-07 Thread Ruben Gonzalez Arnau

On 07/07/11 15:29, Rob wrote:

On 7 July 2011 14:18, Ruben Gonzalez Arnau  wrote:

Talking about remember applications when restarting, it's possible to
remember "terminals" too? When I restart dwm everything is okey with my
config.h rules and each app goes to its tag, except all xterms go to tag 1,
I think that is the normal  behavior now, not sure if exist an easy
solution. any idea?

You need to give your xterms different class names, otherwise dwm can't
distinguish between them

e.g.
xterm -class XTerm7

and

{ "XTerm7", NULL, NULL, 1<<  6, ... }

in dwm's config.h




Thank you

It will be very useful to do something xterm --class "dwm current tag" 
on the fly, it's easy to do it using wmii, but I think that in dwm is 
not possible doing this way now.


--
r...@sdf.lonestar.org




Re: [dev] [dwm] visible only if needed [patch]

2011-07-07 Thread Ruben Gonzalez Arnau

On 07/07/11 13:48, Hiltjo Posthuma wrote:

On Thu, Jul 7, 2011 at 11:24 AM, Thomas Dean<78...@web.de>  wrote:

On Mon, Jul 04, 2011 at 11:37:15 +0200, julien steinhauser wrote:

I like the idea of having only used tags visible. One problem with this
patch though is that dwm loses all tags when restarting. Before, the
tagging survived restarting, which is very nice when playing with config.h.
I don't understand the mechanisms behind it, thus I am unfortunately not
able to fix this myself.


I don't think vanilla dwm remembers tags when restarting so it's not
that the patch removes that behaviour. You can specify rules in your
config.h which tags to apply to each application.

---
Kind regards,
Hiltjo


Talking about remember applications when restarting, it's possible to 
remember "terminals" too? When I restart dwm everything is okey with my 
config.h rules and each app goes to its tag, except all xterms go to tag 
1, I think that is the normal  behavior now, not sure if exist an easy 
solution. any idea?


Thank you

--
r...@sdf.lonestar.org




Re: [dev] [dwm] sloppy focus

2011-07-04 Thread Ruben Gonzalez Arnau


2. having some kind of indication that you've been addressed (urgent 
hints or whatever).


In other wm's, #2 is often handled by having a little flashing systray 
icon.  So, broadening: what (if anything) do dwm users use for 
"notifications" or indicating urgency?




Hello,

I use seturgent tool from Evil_Bob (#suckleess), works very well for me.

http://www.codemadness.nl/downloads/projects/seturgent

For example, to get thunderbird window id:

Window id can be decimal or hex.

$ xwininfo -root -tree | awk '/Inbox.*Mozilla Thunderbird/'
0x271

(dwm will show tag as urgent)

$ seturgent 0x271

Using an addon for thunderbird like email alerter, shows a urgent tag 
when a new mail arrived.


You can also use latest version of suckless lsw to get windows id. It's 
very handy for scripting etc.


--
r...@sdf.lonestar.org



Re: [dev] [dwm] sloppy focus

2011-07-04 Thread Ruben Gonzalez Arnau

On 04/07/11 17:14, Connor Lane Smith wrote:

Interesting, those on IRC were very 'for' this idea. Different
demographics? Oh you silly ML people!

On 4 July 2011 06:51, garbeam  wrote:

No I totally disagree. Click to focus makes the life uneccessary harder.
Doing this just for the rare corner case of touching your pointing device by
accident doesn't sound like a very sound reason for it.

Well, the thing is, I don't ever use the mouse for window management,
but I sometimes move the mouse out of the way and in doing so
accidentally focus a completely different window. I personally would
rather dwm had no mouse support at all, but clearly that would be
controversial... Still, at least with click-to-focus the mouse is
completely dormant until you intentionally click something.

But apparently opinions are split on this topic!

cls

Well, disabling completely touchpad (Linux) using synclient 
'TouchpadOff=0' via shortkeys or using a tool like syndaemon, can helps 
in that situations to avoid touching mistakes.


See you.

--
r...@sdf.lonestar.org




Re: [dev] wmii

2011-06-25 Thread Ruben Gonzalez Arnau

On 25/06/11 13:02, Ruben Gonzalez Arnau wrote:

On 25/06/11 11:38, Thomas Dahms wrote:

2011/6/25 hiro<23h...@googlemail.com>:

Wrong permissions perhaps?
Other than that I have no idea.

Removing the whole ~/.wmii directory should work at least, using the
system-wide configuration. That will trigger an xmessage asking you
what Modkey you want to use. Answer Mod1 and you should be happy.

Well, you only need to have .~/wmii/wmiirc_local file instead of 
~/wmii/wmiirc, since you can override it using wmiirc_local file instead.


~/.wmii/wmiirc_local:
export MODKEY=Mod4
export ALTKEY=Mod1
etc
...

Sorry, this is for the Thomas that has started the initial question. 
Thomas Dahms solutions should work.


--
r...@sdf.lonestar.org




Re: [dev] wmii

2011-06-25 Thread Ruben Gonzalez Arnau

On 25/06/11 11:38, Thomas Dahms wrote:

2011/6/25 hiro<23h...@googlemail.com>:

Wrong permissions perhaps?
Other than that I have no idea.

Removing the whole ~/.wmii directory should work at least, using the
system-wide configuration. That will trigger an xmessage asking you
what Modkey you want to use. Answer Mod1 and you should be happy.

Well, you only need to have .~/wmii/wmiirc_local file instead of 
~/wmii/wmiirc, since you can override it using wmiirc_local file instead.


~/.wmii/wmiirc_local:
export MODKEY=Mod4
export ALTKEY=Mod1
etc
...

--
r...@sdf.lonestar.org




Re: [dev] run a program and display on a specific tab

2011-06-06 Thread Ruben Gonzalez Arnau

On 06/06/11 12:20, Piotr Zalewa wrote:

Hi,

I want to create a script which will load my default setup (quite a few
programs).

How to run a program so it will be displayed on a desired tab? (view,
workspace - I always had a problem with that lingo)

thanks,
zalun



Assuming you are using sh version of wmii. (<= 3.9.2)

${HOME}/.wmii/wmiirc_local

wmiir write /tagrules < tag
/XTerm/ -> sel
/Firefox/  -> 9
/Xmms/ -> music
etc
!

sel is current tag
you can use letters "www" or numbers "1" for your custom apps tags.

Hope it helps.

--
r...@sdf.lonestar.org



Re: [dev] run a program and display on a specific tab

2011-06-06 Thread Ruben Gonzalez Arnau

On 06/06/11 12:20, Piotr Zalewa wrote:

Hi,

I want to create a script which will load my default setup (quite a few
programs).

How to run a program so it will be displayed on a desired tab? (view,
workspace - I always had a problem with that lingo)

thanks,
zalun



Assuming you are using sh version of wmii.

${HOME}/.wmii/wmiirc_local

wmiir write /tagrules < tag
/XTerm/ -> sel
/Firefox/  -> 9
/Xmms/ -> music
etc
!

sel is current tag
you can use letters "www" or numbers "1" for your custom apps tags.

Hope it helps.



[dev] [wmii] Add/Remove all windows with n tag to/from the current view [code snippet plan9]

2010-12-06 Thread Ruben Gonzalez Arnau


Hello,

A simple task to view all windows from ntag to current view. If it's 
useful for someone, I will try to put on wiki.



Ex: $MODKEY-Control-[1-9] adds ntga windows, if pressed again, removes 
ntag windows.


Any help is appreciated :)


Thank you!


fn getcurtag {
wmiir read /tag/sel/ctl | sed 1q
}

fn getclientsntag {
wmiir read /tag/$1/index | awk '/0x[a-fA-F0-9]/ { print $2 }'
}

fn viewntag {
ntag = $1
curtag = `{getcurtag}
cmatch = 0

if(! ~ $ntag $curtag && ! ~ $#ntag 0) {
for(c in `{getclientsntag $ntag}) {
for(cc in `{getclientsntag $curtag}) {
if(~ $c $cc)
cmatch = 1
}
if(test $cmatch -eq 1)
wmiir xwrite /client/$c/tags $ntag-$curtag
if not
wmiir xwrite /client/$c/tags $ntag+$curtag
}
}
}

# Switch to named view by number
fn keynum {
echo `{echo $1 | sed 's/.*-//'}
}
fn tagnum {
echo `{wi_tags | sed -n $1^p}
}

# Add/Remove all windows with ntag to/from the view
for(i in `{seq 1 9}) {
fn Key-$MODKEY-Control-$i {
viewntag `{tagnum `{keynum $1}}
}
}