sowm, use mixerctl instead of amixer on NetBSD

This commit is contained in:
pin 2020-04-10 06:27:29 +02:00
parent 35b733f319
commit 477393a699
3 changed files with 12 additions and 7 deletions

View File

@ -16,5 +16,10 @@ DEPENDS+= dmenu-[0-9]*:../../x11/dmenu
DEPENDS+= st-term-[0-9]*:../../x11/st-term
DEPENDS+= scrot-[0-9]*:../../graphics/scrot
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "Linux"
DEPENDS+= alsa-utils-[0-9]*:../../audio/alsa-utils
.endif
.include "../../x11/libX11/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View File

@ -4,4 +4,4 @@ SHA1 (sowm-1.6.tar.gz) = 87bd3f40ae70364c15f8e36c78c95e146d1423ac
RMD160 (sowm-1.6.tar.gz) = f1f5ec85623335214e9e89fc2ce2e48a74679415
SHA512 (sowm-1.6.tar.gz) = 36f0818d769c224c727713d862201dee7478a04e99c4b0ea0e48a1e1a12a033f704962351ec39df901c196a0ab75fd07b0551b6177f3bb51639dc1ea362b0c16
Size (sowm-1.6.tar.gz) = 5916 bytes
SHA1 (patch-config.def.h) = e9281c51708d4ff341fdb552c69ea29c718c5143
SHA1 (patch-config.def.h) = ecd075f42fccebf51231d0aebc6656cfe6b93851

View File

@ -1,6 +1,6 @@
$NetBSD$
Use amixer only on Linux
Use mixerctl instead of amixer on NetBSD
--- config.def.h.orig 2020-02-21 16:08:47.000000000 +0000
+++ config.def.h
@ -8,14 +8,14 @@ Use amixer only on Linux
const char* scrot[] = {"scr", 0};
const char* briup[] = {"bri", "10", "+", 0};
const char* bridown[] = {"bri", "10", "-", 0};
+#if defined(__Linux__)
+#if defined (__NetBSD__)
+const char* volup[] = {"mixerctl", "-w", "outputs.master+=5", 0};
+const char* voldown[] = {"mixerctl", "-w", "outputs.master-=5", 0};
+const char* volmute[] = {"mixerctl", "-w", "outputs.master=0", 0};
+#elif
const char* voldown[] = {"amixer", "sset", "Master", "5%-", 0};
const char* volup[] = {"amixer", "sset", "Master", "5%+", 0};
const char* volmute[] = {"amixer", "sset", "Master", "toggle", 0};
+#elif (__NetBSD__)
+const char* volup[] = {"mixerctl", "-w", "outputs.master+=5" };
+const char* voldown[] = {"mixerctl", "-w", "outputs.master-=5" };
+const char* volmute[] = {"mixerctl", "-w", "outputs.master=0" };
+#endif
const char* colors[] = {"bud", "/home/goldie/Pictures/Wallpapers", 0};