Fix small issues

This commit is contained in:
Tobias Reisinger 2025-07-10 19:33:21 +02:00
parent 411149023c
commit 28f479a622
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
4 changed files with 7 additions and 7 deletions

View file

@ -9,12 +9,12 @@ export PATH := target/debug:$(PATH)
build:
@cargo build
run: build
./ts-control
./ts-control: .FORCE
bashly generate
run: build ./ts-control
./ts-control
install: ./ts-control
mkdir -p "$(INSTALL_DIR)"
cargo build --release

View file

@ -1,4 +1,4 @@
message=$(_ts_control_get_message "${args[channel]}")
message=$(_ts_control_get_message "${args[message]}")
teamspeak-query-lib move "Away From Keyboard"
teamspeak-query-lib update --away "$message"
teamspeak-query-lib update --microphone=false --speakers=false --away "$message"

View file

@ -11,7 +11,7 @@ _ts_control_get_message() {
then
message="$1"
else
message=$(printf "\n" | $DMENU -p "message")
message=$(printf "\n" | $DMENU -p "message" || true)
fi
if [ -z "$message" ]; then
@ -41,6 +41,6 @@ _ts_control_single_or_dmenu() {
if [ "$count" -eq 1 ]; then
echo "$options"
else
echo "$1" | $DMENU
echo "$1" | $DMENU || true
fi
}

View file

@ -1,4 +1,4 @@
target=$(_ts_control_get_entity "channel" "$1")
target=$(_ts_control_get_entity "channel" "${args[channel]}")
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"