i3 - improved tiling WM


If setcap fails during install, try again with sudo.

Patch status: rejected

Patch by Kevin Pulo

Long description:

This lets "make install PREFIX=$HOME" work, going to root only for the setcap
command, without adversely affecting "sudo make install".

To apply this patch, use:
curl http://cr.i3wm.org/patch/416/raw.patch | git am

b/Makefile

15
@@ -96,7 +96,7 @@ install:
16
 	install -m 755 -d $(DESTDIR)$(PREFIX)/share/man/man1
17
 	install -m 755 i3status $(DESTDIR)$(PREFIX)/bin/i3status
18
 	# Allow network configuration for getting the link speed
19
-	(which setcap && setcap cap_net_admin=ep $(DESTDIR)$(PREFIX)/bin/i3status) || true
20
+	( which setcap && ( setcap cap_net_admin=ep $(DESTDIR)$(PREFIX)/bin/i3status || sudo setcap cap_net_admin=ep $(DESTDIR)$(PREFIX)/bin/i3status ) ) || true
21
 	install -m 644 i3status.conf $(DESTDIR)$(SYSCONFDIR)/i3status.conf
22
 	install -m 644 man/i3status.1 $(DESTDIR)$(PREFIX)/share/man/man1
23