Add patches for i3wm and i3status
This commit is contained in:
50
i3status/uptime.patch
Normal file
50
i3status/uptime.patch
Normal file
@@ -0,0 +1,50 @@
|
||||
--- a/configure.ac 2019-10-26 01:41:51.956255868 +0200
|
||||
+++ b/configure.ac 2019-10-26 01:44:46.098279175 +0200
|
||||
@@ -79,6 +79,7 @@
|
||||
|
||||
PKG_CHECK_MODULES([CONFUSE], [libconfuse])
|
||||
PKG_CHECK_MODULES([YAJL], [yajl])
|
||||
+PKG_CHECK_MODULES([PROC], [libprocps])
|
||||
|
||||
case $host_os in
|
||||
linux*)
|
||||
--- a/i3status.c 2019-10-26 01:41:51.956255868 +0200
|
||||
+++ b/i3status.c 2019-10-26 01:44:46.098279175 +0200
|
||||
@@ -35,6 +35,8 @@
|
||||
|
||||
#include "i3status.h"
|
||||
|
||||
+#include "proc/whattime.h"
|
||||
+
|
||||
#define exit_if_null(pointer, ...) \
|
||||
{ \
|
||||
if (pointer == NULL) \
|
||||
@@ -698,6 +700,10 @@
|
||||
|
||||
const char *current = cfg_getnstr(cfg, "order", j);
|
||||
|
||||
+ if (strcasecmp(current, "uptime") == 0) {
|
||||
+ printf("UP: %s", sprint_uptime(1));
|
||||
+ }
|
||||
+
|
||||
CASE_SEC("ipv6") {
|
||||
SEC_OPEN_MAP("ipv6");
|
||||
print_ipv6_info(json_gen, buffer, cfg_getstr(sec, "format_up"), cfg_getstr(sec, "format_down"));
|
||||
--- a/Makefile.am 2019-10-26 01:41:51.956255868 +0200
|
||||
+++ b/Makefile.am 2019-10-26 01:44:46.098279175 +0200
|
||||
@@ -26,6 +26,7 @@
|
||||
i3status_CFLAGS = \
|
||||
$(AM_CFLAGS) \
|
||||
$(CONFUSE_CFLAGS) \
|
||||
+ $(PROC_CFLAGS) \
|
||||
$(YAJL_CFLAGS) \
|
||||
$(PULSE_CFLAGS) \
|
||||
$(NLGENL_CFLAGS) \
|
||||
@@ -38,6 +39,7 @@
|
||||
|
||||
i3status_LDADD = \
|
||||
$(CONFUSE_LIBS) \
|
||||
+ $(PROC_LIBS) \
|
||||
$(YAJL_LIBS) \
|
||||
$(PULSE_LIBS) \
|
||||
$(NLGENL_LIBS) \
|
||||
Reference in New Issue
Block a user