diff options
author | Don Stewart <dons@cse.unsw.edu.au> | 2007-06-10 08:28:06 +0200 |
---|---|---|
committer | Don Stewart <dons@cse.unsw.edu.au> | 2007-06-10 08:28:06 +0200 |
commit | 09a6b64088c8742de61a1151120f7f077d332bdf (patch) | |
tree | d206a544c9f684c5eaed99696b14e0a01180c296 /scripts | |
parent | e0afe7f27200f1e5b2333bb99226e3345fdd63a4 (diff) | |
download | XMonadContrib-09a6b64088c8742de61a1151120f7f077d332bdf.tar.gz XMonadContrib-09a6b64088c8742de61a1151120f7f077d332bdf.tar.xz XMonadContrib-09a6b64088c8742de61a1151120f7f077d332bdf.zip |
no need for ./scripts/xmonad-status.c, update run-xmonad.sh
darcs-hash:20070610062806-9c5c1-01d224b8aece44100df09ce8294b0ee7c62eabe8.gz
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/run-xmonad.sh | 10 | ||||
-rw-r--r-- | scripts/xmonad-status.c | 57 |
2 files changed, 6 insertions, 61 deletions
diff --git a/scripts/run-xmonad.sh b/scripts/run-xmonad.sh index 006d2b5..d0f97ad 100755 --- a/scripts/run-xmonad.sh +++ b/scripts/run-xmonad.sh @@ -24,11 +24,13 @@ rm -f $PIPE [ -p $PIPE ] || exit # launch the external 60 second clock, and launch the workspace status bar -xmonad-clock | dzen2 -e '' -x 300 -w 768 -ta r -fg $FG -bg $BG -fn $FONT & -xmonad-status < $PIPE | dzen2 -e '' -w 300 -ta l -fg $FG -bg $BG -fn $FONT & +xmonad-clock | dzen2 -e '' -x 300 -w 768 -ta r -fg $FG -bg $BG -fn $FONT & -# now go for it -xmonad > $PIPE & +# and a workspace status bar (this `cat' shouldn't be needed!) +dzen2 -e '' -w 300 -ta l -fg $FG -bg $BG -fn $FONT < $PIPE & + +# go forit +xmonad > $PIPE & # wait for xmonad wait $! diff --git a/scripts/xmonad-status.c b/scripts/xmonad-status.c deleted file mode 100644 index 0aa45dd..0000000 --- a/scripts/xmonad-status.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - Module : xmonad-workspace.c - Copyright : (c) Don Stewart 2007 - License : BSD3-style (see LICENSE) - - Maintainer : dons@cse.unsw.edu.au - Stability : stable - Portability : portable - - C parser for new workspace format - -*/ - -#include <stdio.h> -#include <string.h> -#include <unistd.h> -#include <stdlib.h> -#include <signal.h> - -#define WORKSPACES 9 - -int main(void) { - - char buf[1024]; - char *s, current, *rest; - int i; - - signal(SIGPIPE, SIG_IGN); - - while (fgets(buf, sizeof(buf), stdin) != NULL) { - - i = strlen(buf); - buf[i-1] = '\0'; - s = buf; - - /* extract tag of current workspace */ - current = *(char *)strsep(&s,"|"); - rest = s; - - /* split up workspace list */ - /* extract just the tags of the workspace list */ - for (i = 0; i < WORKSPACES; i++) { - s = (char *)strsep(&rest, ","); - - if (*s == current) { - printf("[%c]", *s); - } else if (s[2] != ':') { /* filter empty workspaces */ - printf(" %c ", *s); - } - - } - - putchar('\n'); - fflush(stdout); - } - return EXIT_SUCCESS; -} |