add scripts to conveniently change some variables on the fly - iomenu - interactive terminal-based selection menu
(HTM) git clone git://bitreich.org/iomenu git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/iomenu
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) README
(DIR) LICENSE
---
(DIR) commit b4479156636ca8b94374fe4d0864368dbec021fd
(DIR) parent dd61b7694b37cbd012413d7903a9daa1247d242c
(HTM) Author: Josuah Demangeon <me@josuah.net>
Date: Fri, 16 Jul 2021 00:04:01 +0200
add scripts to conveniently change some variables on the fly
Diffstat:
M Makefile | 2 +-
A bin/iomenu-mixerctl | 11 +++++++++++
A bin/iomenu-sysctl | 11 +++++++++++
A bin/iomenu-wsconsctl | 11 +++++++++++
4 files changed, 34 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/Makefile b/Makefile
@@ -32,5 +32,5 @@ install:
dist: clean
mkdir -p ${NAME}-${VERSION}
- cp -r README Makefile ${MAN1} ${SRC} ${NAME}-${VERSION}
+ cp -r README Makefile bin ${MAN1} ${SRC} ${NAME}-${VERSION}
tar -cf - ${NAME}-${VERSION} | gzip -c >${NAME}-${VERSION}.tar.gz
(DIR) diff --git a/bin/iomenu-mixerctl b/bin/iomenu-mixerctl
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+# set a mixerctl key to chosen value
+
+ctl=$(mixerctl -a | iomenu | sed 's/=.*//')
+test -n "$ctl"
+
+printf 'Set value of %s to: ' "$ctl" >&2
+read -r value
+
+set -x
+exec mixerctl "$ctl=$value"
(DIR) diff --git a/bin/iomenu-sysctl b/bin/iomenu-sysctl
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+# set a sysctl key to chosen value
+
+ctl=$(sysctl -a | iomenu | sed 's/=.*//')
+test -n "$ctl"
+
+printf 'Set value of %s to: ' "$ctl" >&2
+read -r value
+
+set -x
+exec sysctl "$ctl=$value"
(DIR) diff --git a/bin/iomenu-wsconsctl b/bin/iomenu-wsconsctl
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+# set a wsconsctl key to chosen value
+
+ctl=$(wsconsctl -a | iomenu | sed 's/=.*//')
+test -n "$ctl"
+
+printf 'Set value of %s to: ' "$ctl" >&2
+read -r value
+
+set -x
+wsconsctl "$ctl=$value"