diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2014-01-06 11:24:29 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2014-01-06 11:24:29 +0000 |
commit | 5f98516271eec6ecad12df88e157cdc6000aa322 (patch) | |
tree | 5135fe53150a86cf626a02006627bd67f22c0da0 /x11 | |
parent | 42117228e22093e36d7259b4e6fd03c6c43e3fec (diff) | |
download | ports-5f98516271eec6ecad12df88e157cdc6000aa322.tar.gz ports-5f98516271eec6ecad12df88e157cdc6000aa322.zip |
Notes
Diffstat (limited to 'x11')
-rw-r--r-- | x11/i3status/Makefile | 4 | ||||
-rw-r--r-- | x11/i3status/distinfo | 4 | ||||
-rw-r--r-- | x11/i3status/files/patch-src__print_battery_info.c | 18 | ||||
-rw-r--r-- | x11/i3status/files/patch-src__print_cpu_temperature.c | 27 | ||||
-rw-r--r-- | x11/i3status/files/patch-src__print_volume.c | 36 |
5 files changed, 4 insertions, 85 deletions
diff --git a/x11/i3status/Makefile b/x11/i3status/Makefile index 8e6a70f94d83..c2dbe8db4196 100644 --- a/x11/i3status/Makefile +++ b/x11/i3status/Makefile @@ -1,14 +1,14 @@ # $FreeBSD$ PORTNAME= i3status -PORTVERSION= 2.7 +PORTVERSION= 2.8 CATEGORIES= x11 MASTER_SITES= http://i3wm.org/i3status/ MAINTAINER= bapt@FreeBSD.org COMMENT= Small program for generating a status bar -LICENSE= BSD +LICENSE= BSD3CLAUSE LIB_DEPENDS= libconfuse.so:${PORTSDIR}/devel/libconfuse \ libyajl.so:${PORTSDIR}/devel/yajl diff --git a/x11/i3status/distinfo b/x11/i3status/distinfo index 07b32b98abb5..d7ac47684f31 100644 --- a/x11/i3status/distinfo +++ b/x11/i3status/distinfo @@ -1,2 +1,2 @@ -SHA256 (i3status-2.7.tar.bz2) = 073f4e5de3bc5afc1f23c52ea52e2aa4b90ca8a012f28ba2c5fac3c33474a632 -SIZE (i3status-2.7.tar.bz2) = 37594 +SHA256 (i3status-2.8.tar.bz2) = ab06c5dd454354e6fc64354082616115082b70dc3906361bce5a02beb0f807fe +SIZE (i3status-2.8.tar.bz2) = 40422 diff --git a/x11/i3status/files/patch-src__print_battery_info.c b/x11/i3status/files/patch-src__print_battery_info.c deleted file mode 100644 index 81761e35328a..000000000000 --- a/x11/i3status/files/patch-src__print_battery_info.c +++ /dev/null @@ -1,18 +0,0 @@ ---- ./src/print_battery_info.c.orig 2013-03-19 21:06:48.190385644 +0100 -+++ ./src/print_battery_info.c 2013-03-19 21:06:52.551387042 +0100 -@@ -234,6 +234,15 @@ - minutes -= (hours * 60); - (void)snprintf(remainingbuf, sizeof(remainingbuf), "%02dh%02d", - max(hours, 0), max(minutes, 0)); -+ if (strncmp(threshold_type, "percentage", strlen(threshold_type)) == 0 -+ && present_rate < low_threshold) { -+ START_COLOR("color_bad"); -+ colorful_output = true; -+ } else if (strncmp(threshold_type, "time", strlen(threshold_type)) == 0 -+ && remaining < (u_int) low_threshold) { -+ START_COLOR("color_bad"); -+ colorful_output = true; -+ } - } - #elif defined(__OpenBSD__) - /* diff --git a/x11/i3status/files/patch-src__print_cpu_temperature.c b/x11/i3status/files/patch-src__print_cpu_temperature.c deleted file mode 100644 index 21a57a932a8a..000000000000 --- a/x11/i3status/files/patch-src__print_cpu_temperature.c +++ /dev/null @@ -1,27 +0,0 @@ ---- ./src/print_cpu_temperature.c.orig 2013-03-19 21:07:05.089386424 +0100 -+++ ./src/print_cpu_temperature.c 2013-03-19 21:07:14.249384762 +0100 -@@ -14,6 +14,7 @@ - #include <sys/sysctl.h> - #define TZ_ZEROC 2732 - #define TZ_KELVTOC(x) (((x) - TZ_ZEROC) / 10), abs(((x) - TZ_ZEROC) % 10) -+#define TZ_AVG(x) ((x) - TZ_ZEROC) / 10 - #endif - - #if defined(__OpenBSD__) -@@ -80,7 +81,16 @@ - if (sysctlbyname(path, &sysctl_rslt, &sysctl_size, NULL, 0)) - goto error; - -+ if (TZ_AVG(sysctl_rslt) >= max_threshold) { -+ START_COLOR("color_bad"); -+ colorful_output = true; -+ } - outwalk += sprintf(outwalk, "%d.%d", TZ_KELVTOC(sysctl_rslt)); -+ if (colorful_output) { -+ END_COLOR; -+ colorful_output = false; -+ } -+ - #elif defined(__OpenBSD__) - struct sensordev sensordev; - struct sensor sensor; diff --git a/x11/i3status/files/patch-src__print_volume.c b/x11/i3status/files/patch-src__print_volume.c deleted file mode 100644 index 34c0a22651da..000000000000 --- a/x11/i3status/files/patch-src__print_volume.c +++ /dev/null @@ -1,36 +0,0 @@ ---- ./src/print_volume.c.orig 2013-03-19 21:06:34.895386349 +0100 -+++ ./src/print_volume.c 2013-03-19 21:06:39.429385083 +0100 -@@ -175,16 +175,32 @@ - } - #endif - #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) -- char mixerpath[] = "/dev/mixer"; -+ char *mixerpath; -+ char defaultmixer[] = "/dev/mixer"; - int mixfd, vol, devmask = 0; -+ pbval = 1; -+ -+ if (mixer_idx >= 0) -+ asprintf(&mixerpath, "/dev/mixer%d", mixer_idx); -+ else -+ mixerpath = defaultmixer; - - if ((mixfd = open(mixerpath, O_RDWR)) < 0) - return; -+ -+ if (mixer_idx >= 0) -+ free(mixerpath); -+ - if (ioctl(mixfd, SOUND_MIXER_READ_DEVMASK, &devmask) == -1) - return; - if (ioctl(mixfd, MIXER_READ(0),&vol) == -1) - return; - -+ if (((vol & 0x7f) == 0) && (((vol >> 8) & 0x7f) == 0)) { -+ START_COLOR("color_degraded"); -+ pbval = 0; -+ } -+ - const char *walk = fmt; - for (; *walk != '\0'; walk++) { - if (*walk != '%') { |