Re: [dev] How to monitor battery status

2011-06-20 Thread Bartosz Nitkiewicz
Thx to all for hints. I put acpi -b |tr -d ','|awk '{print $4}' onto my old
script and everythig works fine.
Maby i'll be usefull for somebody

git://github.com/dziq/configs.git

2011/6/20 Kurt Van Dijck 

> On Mon, Jun 20, 2011 at 01:59:57PM +0200, ilf wrote:
> > On 06-20 13:25, Kurt Van Dijck wrote:
> > >This program allows me to put 'whatever I can create on stdout' to the
> statusbar
> >
> > Euh yeah, that's what we use xsetroot(1) for.
>
> I missed (and still do not see)
> how to make xsetroot(1) read from stdin, line by line.
> That's why (I thought) that scripts spawn xsetroot(1) each time.
> >
>
>


-- 
Bartosz Nitkiewicz


[dev] How to monitor battery status

2011-06-19 Thread Bartosz Nitkiewicz
Hello,
I'm looking for a best way to monitor battery status in dwm. Any hints?

-- 
Bartosz Nitkiewicz


Re: [dev] Fullscreen troubles.

2010-03-28 Thread Bartosz Nitkiewicz
On 09 Mar 10 at 12:58 +0100, Jakub Lach wrote:
> > Hi,
> > 
> > I use dwm for longtime now, it's the only one tiling wm which does
> > everything by almost default. Like manage fixed sixe windows (zsnes,
> > games,..) perfectly and has a full xinerama support whereas ratpoison
> > does not have free layout or the possibility to manage free windows,
> > same for i3, it does not support everything well.
> > 
> > I was used to mplayer for watching some videos, and fullscreen mode
> > works pretty well. But the last time I wanted to start zsnes,
> > foobillard as fullscreen it just does not anything. Your screen is
> > resized and you can see the bar with the window getting mangled.
> > 
> > Try that with zsnes, foobillard and maybe wesnoth ? (not tested the
> last).
> > 
> >
> 
> It's apparently SDL problem which I reported earlier. 
> 
> http://forums.libsdl.org/viewtopic.php?t=6013
> 
> Still no reply form SDL devs.
> 
> best regards, 
> -Jakub Lach
>  
> 
I confirm that it is SDL problem. With previous version of libsdl-1.2.13-r1
(mark as stable in gentoo) I hadn't no such described issues. And the newest
one libsdl-1.2.14-r1 has a bug.


pgpkvXqNctf0V.pgp
Description: PGP signature


Re: [dev] [dmenu] xft patch

2010-01-28 Thread Bartosz Nitkiewicz
Hi, 
If you are archlinux user check it
32bit:
http://archrepo.spof.pl/i686/terminus-font-4.28-3-i686.pkg.tar.gz
64bit
http://www.dziq.pl/uploads/terminus-font-4.28-3-x86_64.pkg.tar.gz
It's patched version of terminus font. IMO looks very good.

On 28 Jan 10 at 00:02 -0600, Nathan Neff wrote:
> 
> 
> On Wed, Jan 27, 2010 at 11:18 PM, Justin Jackson  
> wrote:
> 
> Have you tried Terminus? That's my favorite
> constant-width/shell/programming font. Setting up a regular X font is
> a little bit painful, but this one is worth the trouble.
> 
> 
> 
> I've tried Terminus -- I see it all over the Arch boards.
> 
> Personally, I think it's much too thin of a font.  I don't know
> what all the fuss is about -- I see screenshots all over the place, and I 
> can't
> read it very well.
> 
> Thanks though!
> --Nate
>  
> 
> Terminus homepage:
> http://www.is-vn.bg/hamster/
> 
> 
> On Wed, Jan 27, 2010 at 11:10 PM, Thayer Williams 
> wrote:
> > On Wed, Jan 27, 2010 at 5:36 PM, Nathan Neff 
> wrote:
> >> I had to find a way to burn my other planned 50 minutes, so I wrote 
> this
> >> e-mail.
> >
> > Hehe now if only antialiased fonts didn't look so bad =)
> >
> >
> 
> 
> 


pgp6vMC7Q8quQ.pgp
Description: PGP signature


Re: [dev] pertag + galpessgrid patch together

2009-11-08 Thread Bartosz Nitkiewicz
So, the solution is not to use pertag with other patches becouse one excludes 
the other.
On 08 Nov 09 at 11:35 +, Aled Gest wrote:
> It seems the issue is caused by the fact that the pertag patch moves
> the definition of the 'Monitor' struct to after config.h is included.
> 
> The pertag patch modifies the 'Monitor' struct in a way that depends
> on 'tags' being already defined and thus has to defined after config.h
> is included. This creates an obvious conflict with the method of
> including extra functions in config.h when those functions make use of
> the 'Monitor' struct.
> 
> 2009/11/8 Aled Gest :
> > 2009/11/8 Szabolcs Nagy :
> >> don't do that
> >> include the .c files in the appropriate place in config.h instead (eg
> >> right before layouts)
> >
> > That's what he's doing, that's where the problem is...
> >
> > There seems to be a bug when some patches are applied that prevents
> > functions included from within config.h from compiling.
> >
> > I made that suggestion as a quick fix in case he just wanted to get it
> > working. It's a perfectly valid solution, and since he would be
> > modifying his own copy of dwm and not submitting code to the vanilla
> > distribution it's not going to harm anybody.
> >
> 


pgppl5JNkYTNW.pgp
Description: PGP signature


[dev] pertag + galpessgrid patch together

2009-11-07 Thread Bartosz Nitkiewicz
I wonder how to applay pertag patch and gaplessgrid together. When I apply 
pertag on clean hg sources it works fine, but
if I try to apply gaplessgrid or some other layout patch (bstack. nmaster) I 
have this error:

dwm build options:
CFLAGS   = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/include/X11 
-DVERSION="5.8" -DXINERAMA
CC dwm.c
LDFLAGS  = -s -L/usr/lib -lc -L/usr/lib/X11 -lX11 -L/usr/lib/X11 -lXinerama
CC   = cc
In file included from config.h:36,
 from dwm.c:255:
 gaplessgrid.c: In function ‘gaplessgrid’:
 gaplessgrid.c:6: error: dereferencing pointer to incomplete 
type
 gaplessgrid.c:20: error: dereferencing pointer to incomplete 
type
 gaplessgrid.c:20: error: dereferencing pointer to incomplete 
type
 gaplessgrid.c:23: error: dereferencing pointer to incomplete 
type
 gaplessgrid.c:26: error: dereferencing pointer to incomplete 
type
 gaplessgrid.c:26: error: dereferencing pointer to incomplete 
type
 gaplessgrid.c:27: error: dereferencing pointer to incomplete 
type
 gaplessgrid.c:28: error: dereferencing pointer to incomplete 
type
 make: *** [dwm.o] Błąd 1

Could you please help me to find solution
Regards,
dziq


pgpENxk1NWZR9.pgp
Description: PGP signature


Re: [dev] DWM 5.6.1 and pertag patch

2009-08-31 Thread Bartosz Nitkiewicz
Dnia poniedziałek 31 sierpień 2009 o 14:45:54 Ray Kohler napisał(a):
> On Mon, Aug 31, 2009 at 8:41 AM, Bartosz
>
> Nitkiewicz wrote:
> > Hello everyone.
> > I have problem with pertag patch on DWM 5.6.1. I try to patch 
source but
> > with no result. Patch was found on ML (attached). I also attached
> > dwm.c.rej file. Could somebody help me to solve this problem 
becouse
> > patch is very usefull. P.S. Sorry for mu ang.
>
> Try this one.
Works fine. Thanks.
I have another question. Is there possibility to use nmaster patch and 
pertag in same time. 


signature.asc
Description: This is a digitally signed message part.


[dev] DWM 5.6.1 and pertag patch

2009-08-31 Thread Bartosz Nitkiewicz
Hello everyone.
I have problem with pertag patch on DWM 5.6.1. I try to patch source but with 
no result. Patch was found on ML (attached). I also attached dwm.c.rej file. 
Could somebody help me to solve this problem becouse patch is very usefull.
P.S. Sorry for mu ang.

***
*** 1596,1607 
  void
  toggletag(const Arg *arg) {
unsigned int mask;
  
if(!selmon->sel)
return;
mask = selmon->sel->tags ^ (arg->ui & TAGMASK);
if(mask) {
-   selmon->sel->tags = mask;
arrange();
}
  }
--- 1622,1647 
  void
  toggletag(const Arg *arg) {
unsigned int mask;
+   unsigned int i;
  
if(!selmon->sel)
return;
mask = selmon->sel->tags ^ (arg->ui & TAGMASK);
if(mask) {
+   if(mask == ~0) {
+   selmon->prevtag = selmon->curtag;
+   selmon->curtag = 0;
+ }
+ if(!(mask & 1 << (selmon->curtag - 1))) {
+   selmon->prevtag = selmon->curtag;
+   for (i=0; !(mask & 1 << i); i++);
+   selmon->curtag = i + 1;
+ }
+ selmon->sel->tags = mask;
+ selmon->lt[selmon->sellt] = selmon->lts[selmon->curtag];
+ selmon->mfact = selmon->mfacts[selmon->curtag];
+ if (selmon->showbar != selmon->showbars[selmon->curtag])
+   togglebar(NULL);
arrange();
}
  }
--- a/dwm.c 2009-07-14 20:07:55.0 +0200
+++ b/dwm.c 2009-07-15 15:32:33.0 +0200
@@ -120,25 +120,6 @@
void (*arrange)(Monitor *);
 } Layout;
 
-struct Monitor {
-   float mfact;
-   int num;
-   int by;   /* bar geometry */
-   int mx, my, mw, mh;   /* screen size */
-   int wx, wy, ww, wh;   /* window area  */
-   unsigned int seltags;
-   unsigned int sellt;
-   unsigned int tagset[2];
-   Bool showbar;
-   Bool topbar;
-   Client *clients;
-   Client *sel;
-   Client *stack;
-   Monitor *next;
-   Window barwin;
-   const Layout *lt[2];
-};
-
 typedef struct {
const char *class;
const char *instance;
@@ -270,6 +251,30 @@
 /* configuration, allows nested code to access above variables */
 #include "config.h"
 
+struct Monitor {
+  float mfact;
+  int num;
+  int by;   /* bar geometry */
+  int mx, my, mw, mh;   /* screen size */
+  int wx, wy, ww, wh;   /* window area  */
+  unsigned int seltags;
+  unsigned int sellt;
+  unsigned int tagset[2];
+  Bool showbar;
+  Bool topbar;
+  Client *clients;
+  Client *sel;
+  Client *stack;
+  Monitor *next;
+  Window barwin;
+  const Layout *lt[2];
+  int curtag;
+  int prevtag;
+  Layout *lts[LENGTH(tags) + 1];
+  double mfacts[LENGTH(tags) + 1];
+  Bool showbars[LENGTH(tags) + 1];
+};
+
 /* compile-time check if all tags fit into an unsigned int bit array. */
 struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
 
@@ -1401,7 +1406,7 @@
if(!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])
selmon->sellt ^= 1;
if(arg && arg->v)
-   selmon->lt[selmon->sellt] = (Layout *)arg->v;
+   selmon->lt[selmon->sellt] = selmon->lts[selmon->curtag] = 
(Layout *)arg->v;
if(selmon->sel)
arrange();
else
@@ -1418,7 +1423,7 @@
f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0;
if(f < 0.1 || f > 0.9)
return;
-   selmon->mfact = f;
+   selmon->mfact = selmon->mfacts[selmon->curtag] = f;
arrange();
 }
 
@@ -1427,6 +1432,7 @@
unsigned int i;
int w;
XSetWindowAttributes wa;
+   Monitor *m;
 
/* init screen */
screen = DefaultScreen(dpy);
@@ -1458,11 +1464,31 @@
XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter);
if(!dc.font.set)
XSetFont(dpy, dc.gc, dc.font.xfont->fid);
+   /* init tags */
+  for(m = mons; m; m = m->next)
+m->curtag = m->prevtag = 1;
+  /* init mfacts */
+  for(m = mons; m; m = m->next) {
+   for(i=0; i < LENGTH(tags) + 1 ; i++) {
+   m->mfacts[i] = m->mfact;
+   }
+   }
+  /* init layouts */
+   for(m = mons; m; m = m->next) {
+   for(i=0; i < LENGTH(tags) + 1; i++) {
+   m->lts[i] = &layouts[0];
+   }
+   }
/* init bars */
for(blw = i = 0; LENGTH(layouts) > 1 && i < LENGTH(layouts); i++) {
w = TEXTW(layouts[i].symbol);
blw = MAX(blw, w);
}
+   for(m = mons; m; m = m->next) {
+   for(i=0; i < LENGTH(tags) + 1; i++) {
+   m->showbars[i] = m->showbar;
+   }
+   }
updatebars();
updatestatus();
/* EWMH support per view */
@@ -1572,7 +1598,7 @@
 
 void
 togglebar(const Arg *arg) {
-   selmon->showbar = !selmon->showbar;
+   selmon->showbar = selmon->showbars[selmon->curtag] = !selmon->showbar;
 

Re: [dev] [OT] Suckless Distro

2009-07-24 Thread Bartosz Nitkiewicz
I also use Archlinux x86_64 on my desktop with Gnome ;] and second one
laptop with dwm-hg also on Archlinux but i688.
I think it's the best distro ever.
Regards
dziq