Refactor and add message command

This commit is contained in:
Tobias Reisinger 2023-11-26 22:30:59 +01:00
parent e87bed00a2
commit fa959136be
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
8 changed files with 370 additions and 263 deletions

View file

@ -9,7 +9,7 @@ back"
action=$(echo "$actions" | $DMENU)
ts_control_move_self() {
_ts_control_move_self() {
channel=$(teamspeak-query-lib channels | $DMENU)
if [ -z "$channel" ]; then
return 1
@ -18,7 +18,7 @@ ts_control_move_self() {
return 0
}
ts_control_fetch() {
_ts_control_fetch() {
target=$(teamspeak-query-lib "$1s" | $DMENU)
if [ -z "$target" ]; then
exit 1
@ -28,13 +28,13 @@ ts_control_fetch() {
case $action in
"move")
ts_control_move_self
_ts_control_move_self
;;
"fetch-client")
ts_control_fetch client
_ts_control_fetch client
;;
"fetch-channel")
ts_control_fetch channel
_ts_control_fetch channel
;;
"not away")
teamspeak-query-lib move "Not Away From Keyboard"