[wiki] [sites] remove old status implementation || Andrew Milkovich

From: <git_AT_suckless.org>
Date: Sun, 16 Feb 2014 07:47:28 +0100

commit 73e56fc2a3a148d8d1760bc201feac4a928ea89a
Author: Andrew Milkovich <amilkovich_AT_gmail.com>
Date: Sat Feb 15 22:47:05 2014 -0800

    remove old status implementation

diff --git a/dwm.suckless.org/dwmstatus/index.md b/dwm.suckless.org/dwmstatus/index.md
index 5335a22..1a2771c 100644
--- a/dwm.suckless.org/dwmstatus/index.md
+++ b/dwm.suckless.org/dwmstatus/index.md
_AT_@ -21,7 +21,6 @@ Please add your own version of dwmstatus here.
 
 * [dwmsd](https://github.com/johnko/dwmsd) - a daemon that listens on localhost tcp (may be useful as a base for asynchronous updates)
 * [profil-dwmstatus-1.0.c](profil-dwmstatus-1.0.c) - cpufreq, battery percent and date/time
-* [p1c0-dwmstatus-volume.c](p1c0-dwmstatus-volume.c) - volume percentage & bar display
 * [suspend-statusbar.c](suspend-statusbar.c) - loadavg, wifi, battery and date. If battery goes below threshold - run suspend command
 
 
diff --git a/dwm.suckless.org/dwmstatus/p1c0-dwmstatus-volume.c b/dwm.suckless.org/dwmstatus/p1c0-dwmstatus-volume.c
deleted file mode 100644
index f5b134d..0000000
--- a/dwm.suckless.org/dwmstatus/p1c0-dwmstatus-volume.c
+++ /dev/null
_AT_@ -1,232 +0,0 @@
-/* made by p1c0 2013-1-23.
-**
-** Compile with:
-** gcc -Wall -pedantic -std=c99 status.c -lX11
-**
-** Notes:
-** bind volume keys in dwm config.h
-**
-** static const char *volup[] = { "dwmstatus", "volume", "up", NULL};
-** static const char *voldown[] = { "dwmstatus", "volume", "down", NULL};
-**
-** static Key keys[] = {
-** { 0, XF86XK_AudioRaiseVolume, spawn, {.v = volup } },
-** { 0, XF86XK_AudioLowerVolume, spawn, {.v = voldown } },
-** //{ MODKEY, XK_F11, spawn, {.v = voldown } },
-** //{ MODKEY, XK_F12, spawn, {.v = volup } },
-** };
-*/
-
-#define _BSD_SOURCE
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <strings.h>
-#include <sys/time.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-
-#include <X11/Xlib.h>
-
-char *tzargentina = "America/Buenos_Aires";
-char *tzutc = "UTC";
-char *tzberlin = "Europe/Berlin";
-char *tzla = "America/Los_Angeles";
-
-static Display *dpy;
-
-char *
-smprintf(char *fmt, ...)
-{
- va_list fmtargs;
- char *ret;
- int len;
-
- va_start(fmtargs, fmt);
- len = vsnprintf(NULL, 0, fmt, fmtargs);
- va_end(fmtargs);
-
- ret = malloc(++len);
- if (ret == NULL) {
- perror("malloc");
- exit(1);
- }
-
- va_start(fmtargs, fmt);
- vsnprintf(ret, len, fmt, fmtargs);
- va_end(fmtargs);
-
- return ret;
-}
-
-void
-settz(char *tzname)
-{
- setenv("TZ", tzname, 1);
-}
-
-char *
-mktimes(char *fmt, char *tzname)
-{
- char buf[129];
- time_t tim;
- struct tm *timtm;
-
- memset(buf, 0, sizeof(buf));
- settz(tzname);
- tim = time(NULL);
- timtm = localtime(&tim);
- if (timtm == NULL) {
- perror("localtime");
- exit(1);
- }
-
- if (!strftime(buf, sizeof(buf)-1, fmt, timtm)) {
- fprintf(stderr, "strftime == 0
");
- exit(1);
- }
-
- return smprintf("%s", buf);
-}
-
-void
-setstatus(char *str)
-{
- XStoreName(dpy, DefaultRootWindow(dpy), str);
- XSync(dpy, False);
-}
-
-char *
-loadavg(void)
-{
- double avgs[3];
-
- if (getloadavg(avgs, 3) < 0) {
- perror("getloadavg");
- exit(1);
- }
-
- return smprintf("%.2f %.2f %.2f", avgs[0], avgs[1], avgs[2]);
-}
-
-char*
-runcmd(char* cmd) {
- FILE* fp = popen(cmd, "r");
- if (fp == NULL) return NULL;
- char ln[30];
- fgets(ln, sizeof(ln)-1, fp);
- pclose(fp);
- ln[strlen(ln)-1]='
Received on Sun Feb 16 2014 - 07:47:28 CET

This archive was generated by hypermail 2.3.0 : Thu Jun 18 2015 - 17:38:18 CEST