From a0f2b6173400f002fa7e8884352f4077978070d4 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Fri, 16 Feb 2024 15:55:56 +0100 Subject: [PATCH] Add parameters to ts-control (only some actions) --- ts-control | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ts-control b/ts-control index 3c28369..faf5766 100755 --- a/ts-control +++ b/ts-control @@ -9,7 +9,13 @@ not away back message message-user" -action=$(echo "$actions" | $DMENU) + +action="$1" +if [ -n "$1" ]; then + shift +else + action=$(echo "$actions" | $DMENU) +fi _ts_control_get_entity() { entity=$(teamspeak-query-lib "$1s" | $DMENU) @@ -66,7 +72,11 @@ case $action in ;; "back") teamspeak-query-lib update --back - _ts_control_move_self + if [ -n "$1" ]; then + teamspeak-query-lib move "$1" + else + _ts_control_move_self "$1" + fi teamspeak-query-lib update --microphone=true --speakers=true ;; "message")