You are not logged in.

#501 2012-03-26 11:53:04

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: monsterwm! ~ yet another tiny wm

Ypnose wrote:

I would really love to see a layout per tag saved into the config.h and reloaded automatically after every starts. It's the last thing I need before movin' to MonsterWM.
Nice work anyway.

The thing is, that if it's stored in config.h, it would need some parsing and monsterwm would need to be compiled again.
More better solution would be keeping a configuration file where the layouts are saved, but this goes against monsterwm design.

Last edited by Cloudef (2012-03-26 11:53:13)

Offline

#502 2012-03-26 12:01:21

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: monsterwm! ~ yet another tiny wm

yep, parsing is an issue, but you can go around that having something like:

/* config.h */
#define DESKTOPS 3
static const initlayouts[] = { TILE, GRID, MONOCLE, };

/* mosterwm.c @ setup */
for (int i = 0; i < DESKTOPS && i < LENGTH(initlayouts); i++) {
    select_desktop(i);
    mode = initlayouts[i];
}

which would work, but I don't know if I like it much

Last edited by c00kiemon5ter (2012-03-26 12:01:55)


.:[ git me! ] :.

Offline

#503 2012-03-26 12:13:18

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: monsterwm! ~ yet another tiny wm

check the initlayouts branch for the patch.


.:[ git me! ] :.

Offline

#504 2012-03-26 12:19:51

Ypnose
Member
From: Jailed in the shell
Registered: 2011-04-21
Posts: 353
Website

Re: monsterwm! ~ yet another tiny wm

Yes guys I meant Desktop. I said tag cause I use DWM right now smile


Github -- My terminal font Envypn

Offline

#505 2012-03-26 13:34:21

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: monsterwm! ~ yet another tiny wm

for tagging there is dwm? tongue
although having the ability of setting my "web" desktop to maximized automagically would be awesome.

Offline

#506 2012-03-26 13:42:03

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: monsterwm! ~ yet another tiny wm

try the initlayouts branch.
it's what Ypnose requested.


.:[ git me! ] :.

Offline

#507 2012-03-26 13:56:02

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: monsterwm! ~ yet another tiny wm

will do wink thanks

Offline

#508 2012-03-26 14:59:03

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: monsterwm! ~ yet another tiny wm

Hey c00kiemon5ter: did you see my  previous post regarding window titles? Would it better to put 'feature requests' like that on github?

Thanks!
Scott

Offline

#509 2012-03-26 16:34:05

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: monsterwm! ~ yet another tiny wm

hadn't seen that, done. check the window titles branch

also I updated the gist to include a new init script that will catch the window titles and show them centered on some_sorta_bar. diff is on lines 10,11,12 and 47

    if [[ $wmout =~ ^(([[:digit:]]+:)+[[:digit:]]+ ?)+.*$ ]]; then   # include the title '.*'
        read -ra desktops <<< "$wmout" && unset r t                  # title needs to be reset
        t="${desktops[@]:(-1)}"                                      # store title on var t
        ...
    xsetroot -name "&L $r $i &C$t &R $datetime"                      # center on some_sorta_bar

note that I haven't tested it much, it worked for a quick test.

Last edited by c00kiemon5ter (2012-03-26 16:39:56)


.:[ git me! ] :.

Offline

#510 2012-03-26 19:18:32

Ypnose
Member
From: Jailed in the shell
Registered: 2011-04-21
Posts: 353
Website

Re: monsterwm! ~ yet another tiny wm

c00kie: Just saw your branch with initlayouts. Dude, you're awesome (much better than the WM).

EDIT: I Forgot to ask it before, custom MASTER_SIZE per desk could be nice too.

Last edited by Ypnose (2012-03-26 20:57:38)


Github -- My terminal font Envypn

Offline

#511 2012-03-26 20:04:43

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: monsterwm! ~ yet another tiny wm

Awesome, thanks! I'll test it here in the next day or two.

Scott

Offline

#512 2012-03-27 02:46:16

Shinryuu
Member
From: /dev/urandom
Registered: 2010-02-27
Posts: 339

Re: monsterwm! ~ yet another tiny wm

Just finished with this panel modification.. took a couple of hours from me because I have no experience about coding in any language. Now I'm officially a copycat, it seems everything's working well without any breakages. Wait what it seems it's morning already.
tZDV4OQ

Offline

#513 2012-03-29 19:12:17

kuraku
Member
From: planet Earth
Registered: 2012-01-03
Posts: 202

Re: monsterwm! ~ yet another tiny wm

I was thinking about something: how would monsterwm operate with dual monitor env? Would it show one desktop on 2 (or more) screens or it will use just one screen?


@c00kiemon5ter
When you applied this patch, did you changed also part for "resize_stack"? It seems that it is working the same way as "resize_master" (it is saving it's geometry after changing modes) but it seems that step for changing stack is way smaller than step for master. By "step" i mean px or % of screen changed with every usage of that shortcut (in this case, alt+j|k for master and alt+o|p for stack). Is there a way to make them grow/shring equally?

Last edited by kuraku (2012-03-30 00:08:09)

Offline

#514 2012-03-30 11:13:09

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: monsterwm! ~ yet another tiny wm

tZDc2cg
Toggleable system tray patch, has handheld and desktop mode. That's the screenshot of "handheld mode" basically it's just bigger.
Needs key controls still.

Anyways, guess I need to merge latest updates to -xcb.

Last edited by Cloudef (2012-03-30 11:13:45)

Offline

#515 2012-03-30 18:02:57

EasySly
Member
Registered: 2012-03-25
Posts: 35

Re: monsterwm! ~ yet another tiny wm

stlarch wrote:

Thanks dude. I was going to try that. I swear.

edit: Here's my current setup. I'm really liking it!

http://ompldr.org/tYnY5OQ

Nice, which font you are using?

Offline

#516 2012-03-30 18:24:22

Shinryuu
Member
From: /dev/urandom
Registered: 2010-02-27
Posts: 339

Re: monsterwm! ~ yet another tiny wm

EasySly wrote:
stlarch wrote:

Thanks dude. I was going to try that. I swear.

edit: Here's my current setup. I'm really liking it!

http://ompldr.org/tYnY5OQ

Nice, which font you are using?

Looks like a ohsnap font, grab it from here

Offline

#517 2012-04-07 05:15:53

cirnOS
Member
Registered: 2010-03-01
Posts: 107

Re: monsterwm! ~ yet another tiny wm

Shinryuu wrote:

Just finished with this panel modification.. took a couple of hours from me because I have no experience about coding in any language. Now I'm officially a copycat, it seems everything's working well without any breakages. Wait what it seems it's morning already.
http://ompldr.org/tZDV4OQ

Shinryuu an I have that wallpaper? Also I launched monsterwm for the first time and there was no bar showing me my tags/window spaces. Can anyone guide me? I don't see how to customize them in config.h

Offline

#518 2012-04-07 07:44:02

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: monsterwm! ~ yet another tiny wm

@cirnOS
Monsterwm doesn't have a physical bar. You'll need a extrenal application such as dzen.
See examples here: https://gist.github.com/1905427

I found shell script piping to dzen quite heavy under embedded device as such scripts keep spawning extrenal processes under constant while loop.
Here as example is fast C code for tag bar handler that you can pipe to dzen2.

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <sys/stat.h>

/* either color code or empty for default fg */
#define URGENT       "#FF0000"
#define CURRENT      "#D11783"
#define DEFAULT      "#5E7175"
#define LAYOUT       "#FEA63C"
#define SEPERATOR    "::"
#define SEPERATOR_FG ""
#define WINDOWS      LAYOUT
#define VIMODE       CURRENT

#define eol()        printf("\n");
#define whitespace() printf(" ");

typedef struct desktop_t
{
   const char *n, *c;
   int current, urgent, windows;
} desktop_t;

typedef struct layout_t
{
   const char *n, *c;
} layout_t;

static desktop_t desktop[] = {
   { .n = "に", .c = DEFAULT },
   { .n = "せ", .c = DEFAULT },
   { .n = "も", .c = DEFAULT },
   { .n = "の", .c = DEFAULT },
   { .n = NULL }
};

static layout_t layout[]  = {
   { .n = "[T]", .c = LAYOUT },
   { .n = "[M]", .c = LAYOUT },
   { .n = "[b]", .c = LAYOUT },
   { .n = "[G]", .c = LAYOUT },
   { .n =  NULL }
};

static void die(const char *errstr, ...) {
   va_list ap;
   va_start(ap, errstr); vfprintf(stderr, errstr, ap); va_end(ap);
   exit(EXIT_FAILURE);
}

static int strsplit(char ***dst, char *str, char *token) {
   char *saveptr, *ptr, *start;
   int32_t t_len, i;

   if (!(saveptr=strdup(str)))
      return 0;

   *dst=NULL;
   t_len=strlen(token);
   i=0;

   for (start=saveptr,ptr=start;;ptr++) {
      if (!strncmp(ptr,token,t_len) || !*ptr) {
         while (!strncmp(ptr,token,t_len)) {
            *ptr=0;
            ptr+=t_len;
         }

         if (!((*dst)=realloc(*dst,(i+2)*sizeof(char*))))
            return 0;
         (*dst)[i]=start;
         (*dst)[i+1]=NULL;
         i++;

         if (!*ptr)
            break;
         start=ptr;
      }
   }
   return i;
}

static void strsplit_clear(char ***dst) {
   if ((*dst)[0])
      free((*dst)[0]);
   free((*dst));
}

static void printdata(int m, int v)
{
   int i;
   char *color;

   /* print desktops */
   for (i = 0; desktop[i].n; ++i) {
      color = (char*)desktop[i].c;
      if (desktop[i].current)       color = CURRENT;
      else if (desktop[i].urgent)   color = URGENT;
      printf("^fg(%s)%s%s%.0d%s%s^fg()",
            color, desktop[i].n, desktop[i].windows?" ^fg("WINDOWS")[":"", desktop[i].windows, desktop[i].windows?"]":"",
            desktop[i+1].n?"^fg("SEPERATOR_FG") "SEPERATOR" ":" ");
   }
   printf("^fg(%s)%s^fg() ", LAYOUT, layout[m].n);
   printf("%s", v?"^fg("VIMODE")[V]":"[s]");
   eol();
   fflush(stdout);
}

int main(int argc, char **argv)
{
   FILE *f;
   size_t bytes;
   int fd, tags = 0, i = 0, co = 0;
   int d = 0, w = 0, m = 0, c = 0, u = 0, v = 0;
   int desks = 0, layouts = 0, mode = 0;
   char buffer[256], **data = NULL;

   /* check args */
   if (argc < 2)
      die("usage: %s [fifo]\n", argv[0]);

   /* remove if old fifo */
   if ((f = fopen(argv[1], "r"))) {
      fclose(f);
      unlink(argv[1]);
   }

   /* make fifo */
   if (mkfifo(argv[1], 0600) == -1)
      die("could not create fifo\n");

   /* open fifo */
   if ((fd = open(argv[1], O_RDONLY)) == -1)
      die("could not open fifo\n");

   /* count layouts && desks */
   for (desks   = 0; desktop[desks].n;  ++desks) {
      desktop[desks].current = 0;
      desktop[desks].urgent  = 0;
      desktop[desks].windows = 0;
   }
   for (layouts = 0; layout[layouts].n; ++layouts);
   memset(buffer, 0, sizeof(buffer));

   /* tagbar itself (pipe to dzen) */
   while ((bytes = read(fd, buffer, sizeof(buffer))) >= 0)
   {
      /* check if eof */
      if (!bytes) {
         close(fd);
         if ((fd = open(argv[1], O_RDONLY)) == -1)
            die("could not reopen fifo\n");
         continue;
      }

      /* not right kind of data */
      if (buffer[1] != ':' || buffer[3] != ':' ||
          buffer[5] != ':' || buffer[7] != ':') {
         memset(buffer, 0, bytes);
         printdata(mode<layouts?mode:0, v);
         continue;
      }

      /* strsplit */
      tags = strsplit(&data, buffer, " ");
      whitespace();
      for(i = 0; i != tags; ++i) {
         /* sscanf data */
         co = sscanf(data[i], "%d:%d:%d:%d:%d:%d",
               &d, &w, &m, &c, &u, &v);
         if (co < 6)      break;
         if (d  >= desks) break;

         /* desktop flags */
         if (u) desktop[d].urgent = 1;
         else   desktop[d].urgent = 0;
         if (c) {
            desktop[d].current = 1;
            mode = m;
         } else   desktop[d].current = 0;
         desktop[d].windows = w;
      }

      /* failed sscanf? */
      if (co < 6) {
         printf("ERROR");
         eol();
         fflush(stdout);
      }
      else
         printdata(mode<layouts?mode:0, v);

      strsplit_clear(&data);
      memset(buffer, 0, bytes);
   }

   /* close */
   close(fd);
   unlink(argv[1]);
   return EXIT_SUCCESS;
}

Last edited by Cloudef (2012-04-07 07:47:01)

Offline

#519 2012-04-07 07:55:11

cirnOS
Member
Registered: 2010-03-01
Posts: 107

Re: monsterwm! ~ yet another tiny wm

Thanks clouded, my fault for not reading. I'll take a look at those next time I get a chance.

Offline

#520 2012-04-07 08:50:13

Shinryuu
Member
From: /dev/urandom
Registered: 2010-02-27
Posts: 339

Re: monsterwm! ~ yet another tiny wm

cirnOS wrote:
Shinryuu wrote:

Just finished with this panel modification.. took a couple of hours from me because I have no experience about coding in any language. Now I'm officially a copycat, it seems everything's working well without any breakages. Wait what it seems it's morning already.
http://ompldr.org/tZDV4OQ

Shinryuu an I have that wallpaper? Also I launched monsterwm for the first time and there was no bar showing me my tags/window spaces. Can anyone guide me? I don't see how to customize them in config.h

Yo! Here's the wallpaper, http://ompldr.org/vZGFkdg/27169.png

Offline

#521 2012-04-07 22:32:16

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: monsterwm! ~ yet another tiny wm

I can't use it cloudef :S ./bar tells me "permission denied". I did "gcc -o bar bar.c"
Your option seems much better than a regular script

Offline

#522 2012-04-08 01:48:31

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: monsterwm! ~ yet another tiny wm

kuraku wrote:

I was thinking about something: how would monsterwm operate with dual monitor env? Would it show one desktop on 2 (or more) screens or it will use just one screen?


@c00kiemon5ter
When you applied this patch, did you changed also part for "resize_stack"? It seems that it is working the same way as "resize_master" (it is saving it's geometry after changing modes) but it seems that step for changing stack is way smaller than step for master. By "step" i mean px or % of screen changed with every usage of that shortcut (in this case, alt+j|k for master and alt+o|p for stack). Is there a way to make them grow/shring equally?

hey wink

I think I can do that, I'll probably revert to use an "amount of pixel" step, it's more accurate, I guess. I'll into it tomorrow.

for the dual monitor, multimonitor support means that you can load a single instance of the wm, and have both screen working, and clients communicating (ie you can copy from one window on monitor 1 and paste on another window on monitor 2, or move windows between clients etc). This would work, much like dwm works.
Now, afaik, depending on your graphics card you can use the monitors as one big screen (tweenview) or as mirrors or as I don't know what, which the wm can't control, it's vga specific. I never had a second screen, so I haven't dig that much and can't be sure.
So if your vga isn't in some "special" mode, the way monsterwm is now, would probably load on one screen.
Anyways, I think multimonitor support isn't that hard, and I would implement it in a separate branch, if I could test it.


.:[ git me! ] :.

Offline

#523 2012-04-08 02:47:17

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: monsterwm! ~ yet another tiny wm

c00kiemon5ter wrote:
kuraku wrote:

it seems that step for changing stack is way smaller than step for master. By "step" i mean px or % of screen changed with every usage of that shortcut (in this case, alt+j|k for master and alt+o|p for stack). Is there a way to make them grow/shring equally?

I think I can do that, I'll probably revert to use an "amount of pixel" step, it's more accurate, I guess. I'll into it tomorrow.

alright, pushed, back to using pixel size values. should be equal now wink

on other news, refering mostly to non-linux users
I now use <err.h> and handle arguments (-h -v and invalids) a bit differently.
it should be fine on both Linux and BSD, so nothing much to worry about,
but in case of errors on compilation keep it in mind. about err.h portability:

CONFORMING TO
       These functions are nonstandard BSD extensions.

Last edited by c00kiemon5ter (2012-04-08 02:50:22)


.:[ git me! ] :.

Offline

#524 2012-04-08 09:50:54

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: monsterwm! ~ yet another tiny wm

el mariachi wrote:

I can't use it cloudef :S ./bar tells me "permission denied". I did "gcc -o bar bar.c"
Your option seems much better than a regular script

Try chmod +x bar, though it's weird if gcc din't do this already.
Also you can't really use the code as it is. Needs little modification since the monsterwm on my Pandora outputs some extra information.

This should work with vanilla:

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <sys/stat.h>

/* either color code or empty for default fg */
#define URGENT       "#FF0000"
#define CURRENT      "#D11783"
#define DEFAULT      "#5E7175"
#define LAYOUT       "#FEA63C"
#define SEPERATOR    "::"
#define SEPERATOR_FG ""
#define WINDOWS      LAYOUT

#define eol()        printf("\n");
#define whitespace() printf(" ");

typedef struct desktop_t
{
   const char *n, *c;
   int current, urgent, windows;
} desktop_t;

typedef struct layout_t
{
   const char *n, *c;
} layout_t;

static desktop_t desktop[] = {
   { .n = "に", .c = DEFAULT },
   { .n = "せ", .c = DEFAULT },
   { .n = "も", .c = DEFAULT },
   { .n = "の", .c = DEFAULT },
   { .n = NULL }
};

static layout_t layout[]  = {
   { .n = "[T]", .c = LAYOUT },
   { .n = "[M]", .c = LAYOUT },
   { .n = "[b]", .c = LAYOUT },
   { .n = "[G]", .c = LAYOUT },
   { .n =  NULL }
};

static void die(const char *errstr, ...) {
   va_list ap;
   va_start(ap, errstr); vfprintf(stderr, errstr, ap); va_end(ap);
   exit(EXIT_FAILURE);
}

static int strsplit(char ***dst, char *str, char *token) {
   char *saveptr, *ptr, *start;
   int32_t t_len, i;

   if (!(saveptr=strdup(str)))
      return 0;

   *dst=NULL;
   t_len=strlen(token);
   i=0;

   for (start=saveptr,ptr=start;;ptr++) {
      if (!strncmp(ptr,token,t_len) || !*ptr) {
         while (!strncmp(ptr,token,t_len)) {
            *ptr=0;
            ptr+=t_len;
         }

         if (!((*dst)=realloc(*dst,(i+2)*sizeof(char*))))
            return 0;
         (*dst)[i]=start;
         (*dst)[i+1]=NULL;
         i++;

         if (!*ptr)
            break;
         start=ptr;
      }
   }
   return i;
}

static void strsplit_clear(char ***dst) {
   if ((*dst)[0])
      free((*dst)[0]);
   free((*dst));
}

static void printdata(int m)
{
   int i;
   char *color;

   /* print desktops */
   for (i = 0; desktop[i].n; ++i) {
      color = (char*)desktop[i].c;
      if (desktop[i].current)       color = CURRENT;
      else if (desktop[i].urgent)   color = URGENT;
      printf("^fg(%s)%s%s%.0d%s%s^fg()",
            color, desktop[i].n, desktop[i].windows?" ^fg("WINDOWS")[":"", desktop[i].windows, desktop[i].windows?"]":"",
            desktop[i+1].n?"^fg("SEPERATOR_FG") "SEPERATOR" ":" ");
   }
   printf("^fg(%s)%s^fg() ", LAYOUT, layout[m].n);
   eol();
   fflush(stdout);
}

int main(int argc, char **argv)
{
   FILE *f;
   size_t bytes;
   int fd, tags = 0, i = 0, co = 0;
   int d = 0, w = 0, m = 0, c = 0, u = 0;
   int desks = 0, layouts = 0, mode = 0;
   char buffer[256], **data = NULL;

   /* check args */
   if (argc < 2)
      die("usage: %s [fifo]\n", argv[0]);

   /* remove if old fifo */
   if ((f = fopen(argv[1], "r"))) {
      fclose(f);
      unlink(argv[1]);
   }

   /* make fifo */
   if (mkfifo(argv[1], 0600) == -1)
      die("could not create fifo\n");

   /* open fifo */
   if ((fd = open(argv[1], O_RDONLY)) == -1)
      die("could not open fifo\n");

   /* count layouts && desks */
   for (desks   = 0; desktop[desks].n;  ++desks) {
      desktop[desks].current = 0;
      desktop[desks].urgent  = 0;
      desktop[desks].windows = 0;
   }
   for (layouts = 0; layout[layouts].n; ++layouts);
   memset(buffer, 0, sizeof(buffer));

   /* tagbar itself (pipe to dzen) */
   while ((bytes = read(fd, buffer, sizeof(buffer))) >= 0)
   {
      /* check if eof */
      if (!bytes) {
         close(fd);
         if ((fd = open(argv[1], O_RDONLY)) == -1)
            die("could not reopen fifo\n");
         continue;
      }

      /* not right kind of data */
      if (buffer[1] != ':' || buffer[3] != ':' ||
          buffer[5] != ':' || buffer[7] != ':') {
         memset(buffer, 0, bytes);
         printdata(mode<layouts?mode:0);
         continue;
      }

      /* strsplit */
      tags = strsplit(&data, buffer, " ");
      whitespace();
      for(i = 0; i != tags; ++i) {
         /* sscanf data */
         co = sscanf(data[i], "%d:%d:%d:%d:%d",
               &d, &w, &m, &c, &u);
         if (co < 5)       break;
         if (d  >= desks) break;

         /* desktop flags */
         if (u) desktop[d].urgent = 1;
         else   desktop[d].urgent = 0;
         if (c) {
            desktop[d].current = 1;
            mode = m;
         } else   desktop[d].current = 0;
         desktop[d].windows = w;
      }

      /* failed sscanf? */
      if (co < 5) {
         printf("ERROR");
         eol();
         fflush(stdout);
      } else
         printdata(mode<layouts?mode:0);

      strsplit_clear(&data);
      memset(buffer, 0, bytes);
   }

   /* close */
   close(fd);
   unlink(argv[1]);
   return EXIT_SUCCESS;
}

This is my startup script on pandora (monstertag is the above C program):

#!/usr/bin/env bash

# autostart here
autostart() {
   # wicd
   pidof wicd-gtk   || wicd-gtk -t &> /dev/null &

   # volumeicon
   pidof volumeicon || volumeicon &> /dev/null &
}

# check old fifo
ff="/tmp/monsterwm.fifo"
[[ -p "$ff" ]] && rm "$ff"

# start monsterwm with status bars
monstertag "$ff" | dzen2 -h 18 -w 320 -ta l -e -p &
monsterbar       | dzen2 -h 18 -x 320 -w $((800-320)) -ta r -e -p &

# wait monstertag to create fifo
while [[ ! -p "$ff" ]]; do sleep 1; done
while [ 1 ]; do
   autostart
   monsterwm | tee -a "$ff"
   [[ ${PIPESTATUS[0]} -eq 2 ]] && break
   pidof X || break
done

# remove fifo
[[ -p "$ff" ]] && rm "$ff"

Last edited by Cloudef (2012-04-08 09:52:20)

Offline

#525 2012-04-08 12:04:14

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: monsterwm! ~ yet another tiny wm

I couldn't previously understand why the tag/state part of some_sorta_bar wasen't instantaneously updating and had a 2 sec delay, whereas dzen was instantaneously updating, and I had configured some_sorta_bar to update whenever the fifo changed, and not with a reguar timeout...

Now I then found out that it was obviously because that with dzen, I had two dzen instances, one for left and one for right, and in the right statusbar I had e.g. acpi running to display battery state, and which took about 2 secs, but it didn't interfere with the left bar which showed tag/state info, but on my some_sorta_bar setup, I had the acpi part in the main loop(in the $datetime var) which also showed tag/state info...

I just used the example for some_sorta_bar from c00kie's gist-page, and then just added extra commands to the $datetime var, like e.g. the acpi command...

So, I was thinking if someone could kindly help me out about how I could make some_sorta_bar show tag/state info instantaneous, and still having e.g. the acpi command etc. on the right?

Sorry for nobish question in advance, but im not very advanced in scripting, and i've allready tried a lot of ways which didn't work right...

Thanks!

Offline

Board footer

Powered by FluxBB