update to i3status-2.13

This commit is contained in:
jasper 2019-07-06 20:20:27 +00:00
parent d1695f9ba8
commit 6fadd0fd51
7 changed files with 64 additions and 51 deletions

View File

@ -1,24 +1,23 @@
# $OpenBSD: Makefile,v 1.54 2019/02/18 19:50:32 jasper Exp $
# $OpenBSD: Makefile,v 1.55 2019/07/06 20:20:27 jasper Exp $
ONLY_FOR_ARCHS= ${APM_ARCHS}
COMMENT= generate a statusbar for use with i3/xmobar/dzen2
DISTNAME= i3status-2.12
DISTNAME= i3status-2.13
CATEGORIES= x11 sysutils
REVISION= 4
HOMEPAGE= https://i3wm.org/i3status/
MAINTAINER= Jasper Lievisse Adriaanse <jasper@openbsd.org>
# BSD
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE = Yes
MASTER_SITES= ${HOMEPAGE}
EXTRACT_SUFX= .tar.bz2
WANTLIB += c confuse m pthread yajl
WANTLIB += c confuse m pthread yajl iconv intl
USE_GMAKE= Yes
@ -26,18 +25,9 @@ BUILD_DEPENDS= textproc/asciidoc>=8.6.8
LIB_DEPENDS= devel/libconfuse \
devel/libyajl
NO_TEST= Yes
CONFIGURE_STYLE = gnu
SEPARATE_BUILD = Yes
MAKE_ENV+= V=1 SYSCONFDIR=${PREFIX}/share/examples/i3status/
pre-configure:
${SUBST_CMD} ${WRKSRC}/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/i3status ${PREFIX}/bin/
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/i3status
${INSTALL_DATA} ${WRKSRC}/i3status.conf \
${PREFIX}/share/examples/i3status/
${INSTALL_MAN} ${WRKSRC}/man/i3status.1 ${PREFIX}/man/man1/
FAKE_FLAGS += sysconfdir=${PREFIX}/share/examples/i3status/
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (i3status-2.12.tar.bz2) = b8aIFTYEM5GrS+02nZVvmdEIiWXYvOvtGNGTLeO6eRo=
SIZE (i3status-2.12.tar.bz2) = 57162
SHA256 (i3status-2.13.tar.bz2) = zonJ/4Vl9i6IKZ8aYRIpr9/DVrTpc2il+MTwatL6FGY=
SIZE (i3status-2.13.tar.bz2) = 201409

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-Makefile_in,v 1.1 2019/07/06 20:20:27 jasper Exp $
The CODE_COVERAGE_RULES fragment contains an unmatched "if" clause.
Index: Makefile.in
--- Makefile.in.orig
+++ Makefile.in
@@ -1851,7 +1851,6 @@ uninstall-man: uninstall-man1
.PRECIOUS: Makefile
-@CODE_COVERAGE_RULES@
echo-version:
@echo "@I3STATUS_VERSION@"

View File

@ -1,9 +1,10 @@
$OpenBSD: patch-i3status_conf,v 1.16 2017/01/31 18:47:56 jasper Exp $
$OpenBSD: patch-i3status_conf,v 1.17 2019/07/06 20:20:27 jasper Exp $
Adjust config file to be reasonably useful on OpenBSD out of the box.
--- i3status.conf.orig Tue Jan 31 19:44:46 2017
+++ i3status.conf Tue Jan 31 19:46:10 2017
Index: i3status.conf
--- i3status.conf.orig
+++ i3status.conf
@@ -7,6 +7,7 @@
# If the above line is not correctly displayed, fix your editor first!
@ -12,41 +13,28 @@ Adjust config file to be reasonably useful on OpenBSD out of the box.
colors = true
interval = 5
}
@@ -18,20 +19,31 @@ order += "ethernet _first_"
order += "battery all"
@@ -19,7 +20,20 @@ order += "disk /"
order += "load"
order += "memory"
order += "tztime local"
+order += "cpu_temperature cpu0"
+order += "cpu_temperature acpitz0"
+order += "volume master"
+
+cpu_temperature cpu0 {
+ format = "C: %degrees C"
+ path = "cpu0"
+}
+
+cpu_temperature acpitz0 {
+ format = "TZ: %degrees C"
+}
+
+
wireless _first_ {
format_up = "W: (%quality at %essid) %ip"
format_down = "W: down"
}
ethernet _first_ {
- # if you use %speed, i3status requires root privileges
format_up = "E: %ip (%speed)"
format_down = "E: down"
}
battery all {
- format = "%status %percentage %remaining"
+ format = "%status %percentage \% %remaining"
}
tztime local {
@@ -44,4 +56,8 @@ load {
@@ -36,6 +50,10 @@ battery all {
disk "/" {
format = "%avail"
@ -55,3 +43,5 @@ Adjust config file to be reasonably useful on OpenBSD out of the box.
+volume master {
+ format = "vol: %volume"
}
load {

View File

@ -1,17 +1,17 @@
$OpenBSD: patch-src_print_battery_info_c,v 1.16 2018/09/05 01:49:21 jcs Exp $
$OpenBSD: patch-src_print_battery_info_c,v 1.17 2019/07/06 20:20:27 jasper Exp $
Index: src/print_battery_info.c
--- src/print_battery_info.c.orig
+++ src/print_battery_info.c
@@ -25,6 +25,8 @@
#include <sys/types.h>
#include <sys/ioctl.h>
@@ -31,6 +31,8 @@
#include <sys/fcntl.h>
#include <sys/ioctl.h>
#include <sys/types.h>
+#include <sys/sysctl.h>
+#include <sys/sensors.h>
#include <machine/apmvar.h>
#endif
@@ -221,11 +223,16 @@ static bool slurp_battery_info(struct battery_info *ba
#if defined(__NetBSD__)
@@ -269,11 +271,16 @@ static bool slurp_battery_info(struct battery_info *ba
#elif defined(__OpenBSD__)
/*
* We're using apm(4) here, which is the interface to acpi(4) on amd64/i386 and
@ -30,7 +30,7 @@ Index: src/print_battery_info.c
apm_fd = open("/dev/apm", O_RDONLY);
if (apm_fd < 0) {
@@ -262,6 +269,41 @@ static bool slurp_battery_info(struct battery_info *ba
@@ -310,6 +317,41 @@ static bool slurp_battery_info(struct battery_info *ba
/* Can't give a meaningful value for remaining minutes if we're charging. */
if (batt_info->status != CS_CHARGING) {
batt_info->seconds_remaining = apm_info.minutes_left * 60;

View File

@ -1,14 +1,15 @@
$OpenBSD: patch-src_print_wireless_info_c,v 1.13 2018/05/12 14:03:46 jasper Exp $
$OpenBSD: patch-src_print_wireless_info_c,v 1.14 2019/07/06 20:20:27 jasper Exp $
warning: implicit declaration of function 'free' is invalid in C99
Index: src/print_wireless_info.c
--- src/print_wireless_info.c.orig
+++ src/print_wireless_info.c
@@ -1,5 +1,6 @@
@@ -1,6 +1,7 @@
// vim:ts=4:sw=4:expandtab
#include <config.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
#include <yajl/yajl_gen.h>
#include <yajl/yajl_version.h>

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-src_pulse_c,v 1.1 2019/07/06 20:20:27 jasper Exp $
Neuter pulseaudio bits
Index: src/pulse.c
--- src/pulse.c.orig
+++ src/pulse.c
@@ -1,3 +1,4 @@
+#ifndef __OpenBSD__
// vim:ts=4:sw=4:expandtab
#include <config.h>
#include <string.h>
@@ -337,3 +338,4 @@ bool pulse_initialize(void) {
}
return true;
}
+#endif /* !__OpenBSD__ */