Re: [dwm] xgamma notify

2009-03-05 Thread Engin Tola

i use xterm+screen. no problem here. works like a charm.

Alan Busby thebu...@thebusby.com writes:

 urxvt seems to ignore xgamma. So although it's a great idea, it isn't much 
 help if you only have some terminals open.

 On Fri, Mar 6, 2009 at 9:05 AM, pancake 
 panc...@youterm.commailto:panc...@youterm.com wrote:
 Samuel Baldwin wrote:
 2009/3/6 pancake panc...@youterm.commailto:panc...@youterm.com:

 I have been playing a bit with xgamma and I think it can be useful as a
 graphical
 notification for important alerts like low battery or so.

 The usage is quite simple. and we can 'flash' the screen in red for a
 fraction of a second with:


 What happens if you're not looking at the screen?

 The screen explodes.



-- 
engin tola - http://cvlab.epfl.ch/~tola



Re: [dwm] xgamma notify

2009-03-05 Thread Engin Tola

nice!

pancake panc...@youterm.com writes:

 I have been playing a bit with xgamma and I think it can be useful as a
 graphical
 notification for important alerts like low battery or so.

 The usage is quite simple. and we can 'flash' the screen in red for a
 fraction of a second with:

 $ cat flash.sh
 for a in $(seq 1 $1); do
   xgamma -ggamma 0.3 -bgamma 0.3
   sleep 0.1
   xgamma -gamma 1
   sleep 2
 done

 $ sh flash.sh 10

 --pancake



-- 
engin tola - http://cvlab.epfl.ch/~tola



Re: [dwm] Asustek EEE PC 1000 Atom 1GB 40G SSD Linux Black

2008-09-05 Thread Engin Tola

I was also thinking about buying one and would be very interested in a
programmers point of view. There are reviews around but I'll be using it
daily to code and therefore want to hear a programmers opinion.

Anselm R Garbe [EMAIL PROTECTED] writes:

 What do people think about such an EEE PC as low budget option to run
 dwm on? Any experiences already if the screen is big enough for daily
 work? I had an opportunity yesterday to try one, and I must admit I'm
 keen to order one. The keyboard and keys have surprisingly proper
 size.

 Kind regards,
 --Anselm



-- 
engin tola - http://cvlab.epfl.ch/~tola



Re: [dwm] New website launch

2008-07-16 Thread Engin Tola

looks quite professional to me. congrats.

Anselm R Garbe [EMAIL PROTECTED] writes:

 Hi there,

 yesterday I updated the new website:

   http://www.suckless.org

 I thank especially anydot who contributed quite a lot of time into
 supporting this move, especially regarding all the
 {code,lists}.suckless.org administration.

 There is also a page which describes how the wiki works.

 Kind regards,
 --Anselm



-- 
engin tola - http://cvlab.epfl.ch/~tola



Re: [dwm] Compiling dwm

2008-04-29 Thread Engin Tola

for ubuntu the package is libx11-dev

David J. Neu [EMAIL PROTECTED] writes:

 All,

 I'm sure this has been addressed elsewhere, but I'm not finding the
 answer.

 I'm a long time dwm user on FreeBSD, but now have two Linux distros in
 my world.  It looks like the required header and/or lib files as
 referenced in config.mk aren't installed.

 Could someone tell me the packages to install on Ubuntu and on an OLPC
 XO laptop?

 Many thanks!

 Cheers,
 David



-- 
engin tola - http://cvlab.epfl.ch/~tola
emacs  - http://www.gnu.org/software/emacs/tour



Re: [dwm] st progress?

2008-03-27 Thread Engin Tola
Anselm R. Garbe [EMAIL PROTECTED] writes:

 On Wed, Mar 26, 2008 at 11:08:03PM -0700, Scytrin dai Kinthra wrote:
 for myself, i am only awaiting some type of interaction with the
 selection buffer. while there are plenty of programs to get the
 contents onto the command line, i need to be able to copy out things
 from the terminal. i could always pipe if needed but it looked like
 there was debug code already present.

 That are important features to think about.

 out of curiosity, will a transparent background be a feature?

 Definately not. The background of a terminal window should
 always be solid. This is serious software ;)

I'm quite happy with this :)


 Kind regards,
 --
  Anselm R. Garbe  http://www.suckless.org/  GPG key: 0D73F361


-- 
engin tola - http://cvlab.epfl.ch/~tola
emacs  - http://www.gnu.org/software/emacs/tour



Re: [dwm] new feature proposal: cycle through specific windows

2007-12-19 Thread Engin Tola
Ritesh Kumar [EMAIL PROTECTED] writes:

 On Dec 19, 2007 2:29 AM, Anselm R. Garbe [EMAIL PROTECTED] wrote:

 On Wed, Dec 19, 2007 at 12:15:19AM +0100, Engin Tola wrote:
 
  I was thinking of a new feature to dwm where one can cycle through a
  specific kind of window; like within open terminals only or like within
  open emacs windows..
 
  I generally want to switch between xterms or open emacs windows without
  cycling through all the different open windows.
 
  does anybody else think this as a useful feature ?

 See how tagging is intended to be used. To me it sounds exactly
 like what you propose as a feature.

 Regards,


 I think Engin is asking about cycling between windows tagged with the same
 tag when viewing a number of tags together... i.e. without changing which
 tags are currently being viewed.

exactly.


 Ritesh

-- 
engin tola - http://cvlab.epfl.ch/~tola



Re: [dwm] dwm new message notification

2007-12-11 Thread Engin Tola

I just check the size of the mail file to see if it is non-zero. And
then I print an 'M' to my status bar like this: 

mail_file=/var/mail/tola
if [ -s $mail_file ]
then
mail=M
else
mail=''
fi


Martin Sander [EMAIL PROTECTED] writes:

 On Mon, Dec 10, 2007 at 03:32:14PM -0500, Jeremy O'Brien wrote:
 Is there a way to get new mail notifications from IMAP that would be
 suitable for the bar?  Thank you!

 I don't know what you are thinking of exactly, but I used to use

   fetchmail -c | sed -e 's/[^0-9 (]//g' -e 's/(/-/'|bc`  ~/.mailcheck

 in a cronjob (shows the number of new messages). Then I switched to
 offlineimap to sync the mail to my computer, you can then count the new
 messages in your Maildir or sed the output of offlineimap.

 Greets

 Martin


-- 
engin tola - http://cvlab.epfl.ch/~tola
emacs  - http://www.gnu.org/software/emacs/tour



[dwm] cycling through clients

2007-12-08 Thread Engin Tola

Hi everyone,

I'm quite used to alt-tab like cycling through open program windows and
I was missing that in dwm. 

I wrote one for the current version where 

next_client() moves the next visible client to the master area and moves
the old one to the *end* of the stack ( counter clockwise movement ) 

and

prev_client() pulls the last visible client to the master area and moves
the current one to the top ( clock-wise )

just add this file to your config.h and make your bindings...

comments are welcome.

Client *next_visible();
Client *prev_visible(Client *c);
Client *last_client();
void attach_to_end(Client *c);
void next_client(const char *arg);
void prev_client(const char *arg);

void
attach_to_end(Client *c) {
   Client *last = last_client();
   if( last == NULL )
   {
  attach(c);
  return;
   }
   last-next = c;
   c-prev = last;
   c-next = NULL;
}

Client*
prev_visible(Client *c)
{
   Client* dum = c;
   while( dum   !isvisible(dum) )
  dum = dum-prev;
   return dum;
}

Client* 
next_visible()
{
   Client *c=clients;
   while( c  !isvisible(c))
   {
  c = c-next;
   }
   return c;
}

void
next_client(const char *arg)
{
   Client *c = next_visible();
   if( !c ) return;
   detach(c);
   attach_to_end(c);

   Client *nc = next_visible();
   focus(nc);
   arrange();
}

void
prev_client(const char *arg)
{
   sel = last_client();
   if(!sel) return;

   while( !isvisible(sel) )
  sel = prev_visible(sel);
   if(!sel) return;
   zoom(NULL);
}

Client* last_client() {
   Client* dum = clients;
   if( !dum ) return NULL;

   while( dum-next )
  dum=dum-next;
   return dum;
}

-- 
engin tola - http://cvlab.epfl.ch/~tola


Re: [dwm] opera overlapping the dwm status bar

2007-11-20 Thread Engin Tola

I have

Opera 9.24 . Build 671 for Linux. Qt library 3.3.7

and 

dwm 4.2 

I don't have this problem. Opera respects boundaries.

Anselm R. Garbe [EMAIL PROTECTED] writes:

 On Tue, Nov 20, 2007 at 08:25:36PM +0800, Fernan Bolando wrote:
 I dont think this is a dwm bug, because I seem to remember having
 this same problem sometime ago.

 I have used 9.23, 9.24, and 9.50b they all behave the same way.
 When you luanch it. it will cover the entire screen. covering the
 dwm bar. If move it it will respectfully align, just fine.

 Fernan, if that's the case I believe opera requests exactly
 screen size, hence dwm accepts it being a full-screen window.

 Regards,
 --
  Anselm R. Garbe  http://www.suckless.org/  GPG key: 0D73F361


-- 
engin tola - http://cvlab.epfl.ch/~tola
emacs  - http://www.gnu.org/software/emacs/tour



Re: [dwm] Triple Screen xorg.conf ?

2007-10-15 Thread Engin Tola
A A [EMAIL PROTECTED] writes:

 Anyone out there have a triple screen xorg.conf (individual screens) running
 DWM that you would be willing to share with me?  I can't seem to get DWM to
 treat each screen as a single desktop for some reason.

 Thanks!

I got a 2 display configuration without using awesome if you're
interested. (It basically launches 2 dwm in different displays and you
cannot move windows around but I also got a small code I use to move
between displays for keyboard-based switching so moving is not awkward )

I guess you can modify this to three displays...

-- 
engin tola - http://cvlab.epfl.ch/~tola
emacs  - http://www.gnu.org/software/emacs/tour



Re: [dwm] CPU comsumption

2007-06-25 Thread Engin Tola

Michel Verdier [EMAIL PROTECTED] writes:

 Hi,

 When testing dwm (and wmii) I got a problem for 2 applications xemacs and
 firefox.

 When starting xemacs tiled it starts using CPU. Right and bottom borders
 are flickering. When starting or switching to float all is ok. The same
 problem occurs with wmii. A long time ago I have had this bug with another
 wm, I can't remember which one. So I suppose it's xemacs which behave
 badly.

 With firefox the same appears when reducing width of its windows down to
 ~150px.

 I have a 4.2 compiled. I can test patches.

 Thanks

I haven't used xemacs but with emacs I don't have this problem. 

I'm also using firefox and I don't have this problem. Do you have
flickering with firefox as well ? or just the cpu ?

I also have 4.2. 

Maybe its related with your graphics card ?

-- 
engin tola - http://cvlab.epfl.ch/~tola/
emacs  - http://www.gnu.org/software/emacs/tour/



Re: [dwm] Feature request for changing master window's height.

2007-06-15 Thread Engin Tola

Can you tell at which places it fail ? 
I just recently *manually* patched it. Maybe I can assist.


James Turner [EMAIL PROTECTED] writes:

 Does anybody know if there is an updated patch for bottomstack?  It
 fails it two places while patching.  Thanks.

 --
 James Turner
 BSD Group Consulting
 http://www.bsdgroup.org


-- 
engin tola - http://cvlab.epfl.ch/~tola/
emacs  - http://www.gnu.org/software/emacs/tour/



Re: [dwm] Feature request for changing master window's height.

2007-06-15 Thread Engin Tola
James Turner [EMAIL PROTECTED] writes:

 On Sat, Jun 16, 2007 at 04:06:44AM +0200, Engin Tola wrote:

 Can you tell at which places it fail ?
 I just recently *manually* patched it. Maybe I can assist.

  Does anybody know if there is an updated patch for bottomstack?  It
  fails it two places while patching.  Thanks.
 
 Sure, below is the output of running patch -p1 inside my dwm-4.2 dir.

 Hmm...  Looks like a unified diff to me...
 The text leading up to this was:
 --
 |--- /usr/local/src/dwm/dwm-4.1-virgin/layout.c 2007-05-21
 20:59:45.0 -0400
 |+++ layout.c   2007-05-22 16:06:19.0 -0400
 --
 Patching file layout.c using Plan A...
 Hunk #1 failed at 14.
 Hunk #2 failed at 38.
 Hunk #3 succeeded at 81 (offset 12 lines).
 Hunk #4 succeeded at 194 (offset -4 lines).
 Hunk #5 succeeded at 232 (offset 12 lines).
 Hunk #6 failed at 341.
 3 out of 6 hunks failed--saving rejects to layout.c.rej
 Hmm...  The next patch looks like a unified diff to me...
 The text leading up to this was:
 --
 |--- /usr/local/src/dwm/dwm-4.1-virgin/config.default.h 2007-05-21
 20:59:45.0 -0400
 |+++ config.default.h   2007-05-21 21:33:42.0 -0400
 --
 Patching file config.default.h using Plan A...
 Hunk #1 succeeded at 29 (offset -2 lines).
 done

this is pretty much illegible with only line numbers. I suggest you to
open the diff file and layout.c. It is pretty much easy to follow the
diff file and make the necessary changes. I also attach my own layout.c 
so that you can adapt yours appropriately. (if you haven't edited your
layout file before, then you should have this layout in the end actually.)

/* See LICENSE file for copyright and license details. */
#include dwm.h
#include stdlib.h

unsigned int blw = 0;
Layout *lt = NULL;

/* static */

static unsigned int nlayouts = 0;
static unsigned int masterw = MASTERWIDTH;
static unsigned int nmaster = NMASTER;

static void
ban(Client *c) {
	if (c-isbanned)
		return;
	XMoveWindow(dpy, c-win, c-x + 2 * sw, c-y);
	c-isbanned = True;
}

static void
unban(Client *c) {
	if (!c-isbanned)
		return;
	XMoveWindow(dpy, c-win, c-x, c-y);
	c-isbanned = False;
}

static void
_tile(const Bool right) {
	unsigned int i, n, nx, ny, nw, nh, mw, mh, tw, th;
	Client *c;

	for(n = 0, c = nexttiled(clients); c; c = nexttiled(c-next))
		n++;
	/* window geoms */
	mh = (n  nmaster) ? wah / nmaster : wah / (n  0 ? n : 1);
	mw = (n  nmaster) ? (waw * masterw) / 1000 : waw;
	th = (n  nmaster) ? wah / (n - nmaster) : 0;
	tw = waw - mw;

	for(i = 0, c = clients; c; c = c-next)
		if(isvisible(c)) {
			unban(c);
			if(c-isfloating)
continue;
			c-ismax = False;
			nx = wax;
			ny = way;
			if(i  nmaster) {
   if( !right )
  nx+= tw;
   ny += i * mh;
   nw = mw - 2 * c-border;
   nh = mh;
   if(i + 1 == (n  nmaster ? n : nmaster)) /* remainder */
  nh = wah - mh * i;
   nh -= 2 * c-border;
			}
			else {  /* tile window */
nx += mw;
nw = tw - 2 * c-border;
if(th  2 * c-border) {
	ny += (i - nmaster) * th;
	nh = th;
	if(i + 1 == n) /* remainder */
		nh = wah - th * (i - nmaster);
	nh -= 2 * c-border;
}
else /* fallback if th = 2 * c-border */
	nh = wah - 2 * c-border;
			}
			resize(c, nx, ny, nw, nh, False);
			i++;
		}
		else
			ban(c);
	focus(NULL);
	restack();
}

static void
_bstack(const Bool portrait) {
	unsigned int i, n, nx, ny, nw, nh, mw, mh, tw, th;
	Client *c;

	for(n = 0, c = nexttiled(clients); c; c = nexttiled(c-next))
		n++;
	/* window geoms */
	mh = (n  nmaster) ? ((wah * masterw) / 1000) / nmaster : wah / (n  0 ? n : 1);
	mw = waw;
	th = (n  nmaster) ? ((wah * (1000 - masterw)) / 1000) / (portrait ? 1 : n - nmaster) : 0;
	tw = (n  nmaster) ? waw / (portrait ? n - nmaster : 1) : 0;

	for(i = 0, c = clients; c; c = c-next)
		if(isvisible(c)) {
			if(c-isbanned)
XMoveWindow(dpy, c-win, c-x, c-y);
			c-isbanned = False;
			if(c-isfloating)
continue;
			c-ismax = False;
			nx = wax;
			ny = way;
			if(i  nmaster) {
ny += i * mh;
nw = mw - 2 * c-border;
nh = mh - 2 * c-border;
			}
			else if(portrait) { /* portrait bstack tiles */
nx += (i - nmaster) * tw;
ny += wah - th;
nw = tw - 2 * c-border;
nh = th - 2 * c-border;
			} else { /* landscape bstack tiles */
ny += mh * nmaster;
nw = tw - 2 * c-border;
if(th  2 * c-border) {
	ny += (i - nmaster) * th;
	nh = th - 2 * c-border;
	if (i == n - 1)
		nh += (n  nmaster) ? wah - mh - th * (n - nmaster) : 0;
}
else /* fallback if th = 2 * c-border */
	nh = wah - 2 * c-border;
			}
			resize(c, nx, ny, nw, nh, False);
			i++;
		}
		else {
			c-isbanned = True;
			XMoveWindow(dpy, c-win, c-x + 2 * sw, c-y

Re: [dwm] A clock on the status bar

2007-06-10 Thread Engin Tola

Hi everybody, 

I have a kubuntu box and I'm trying to get rid of kde too. When I close
off the kdm from the rc2.d and added .xinitrc this 'exec dwm' command,
it didn't start up.

I get errors like cannot find display.

my DISPLAY is DISPLAY=:0.0

Can you tell me how did you get kde stopped and dwm started.

thanks,

Petar Petrov [EMAIL PROTECTED] writes:

 thank you for the great job and nice ideas in dwm.

 I'll finally get rid of KDE.


-- 
engin tola - http://cvlab.epfl.ch/~tola/
emacs  - http://www.gnu.org/software/emacs/tour/