Add "migrate" command
This commit is contained in:
parent
3463907670
commit
21c1e3fbb3
3 changed files with 32 additions and 0 deletions
11
ts-control
11
ts-control
|
@ -4,6 +4,7 @@ actions="quick
|
|||
move
|
||||
fetch-client
|
||||
fetch-channel
|
||||
migrate
|
||||
away
|
||||
not away
|
||||
back
|
||||
|
@ -45,6 +46,13 @@ _ts_control_fetch() {
|
|||
teamspeak-query-lib fetch "--strict-$1" "--$1" "$target"
|
||||
}
|
||||
|
||||
_ts_control_migrate() {
|
||||
target=$(_ts_control_get_entity "channel" "$2")
|
||||
current_channel=$(teamspeak-query-lib info | grep "Channel: " | sed 's/Channel: //')
|
||||
_ts_control_move_self "$target"
|
||||
teamspeak-query-lib fetch "--strict-channel" "--channel" "$current_channel"
|
||||
}
|
||||
|
||||
_ts_control_single_or_dmenu() {
|
||||
filter="$2"
|
||||
if [ "$filter" == "^$" ]; then
|
||||
|
@ -128,6 +136,9 @@ case $action in
|
|||
"fetch-channel")
|
||||
_ts_control_fetch channel "$2"
|
||||
;;
|
||||
"migrate")
|
||||
_ts_control_migrate "$2"
|
||||
;;
|
||||
"not away")
|
||||
teamspeak-query-lib move "Not Away From Keyboard"
|
||||
teamspeak-query-lib update --microphone=false --speakers=false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue