Fix some issues
This commit is contained in:
parent
b827471e6d
commit
fb1e41ddc4
4 changed files with 10 additions and 15 deletions
|
@ -16,17 +16,9 @@ jobs:
|
|||
source "$HOME/.cargo/env"
|
||||
cargo build --release
|
||||
shell: bash
|
||||
- uses: https://code.forgejo.org/actions/upload-artifact@v3
|
||||
with:
|
||||
name: teamspeak-query-lib
|
||||
path: ${{ github.workspace }}/target/release/teamspeak-query-lib
|
||||
- uses: https://code.forgejo.org/actions/download-artifact@v3
|
||||
with:
|
||||
name: teamspeak-query-lib
|
||||
path: /tmp/artifacts
|
||||
shell: bash
|
||||
- id: copy-ts-control-artificat
|
||||
run: |
|
||||
cp ${{ github.workspace }}/target/release/teamspeak-query-lib /tmp/artifacts
|
||||
cp ${{ github.workspace }}/ts-control /tmp/artifacts
|
||||
shell: bash
|
||||
- uses: https://code.forgejo.org/actions/forgejo-release@v1
|
||||
|
|
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -182,7 +182,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "teamspeak-query-lib"
|
||||
version = "0.1.5"
|
||||
version = "0.1.6"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"serde",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "teamspeak-query-lib"
|
||||
version = "0.1.5"
|
||||
version = "0.1.6"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
|
11
ts-control
11
ts-control
|
@ -46,12 +46,16 @@ _ts_control_fetch() {
|
|||
}
|
||||
|
||||
_ts_control_single_or_dmenu() {
|
||||
options=$(echo "$1" | grep "$2")
|
||||
filter="$2"
|
||||
if [ "$filter" == "^$" ]; then
|
||||
filter=""
|
||||
fi
|
||||
options=$(echo "$1" | grep "$filter")
|
||||
count=$(echo "$options" | wc -l)
|
||||
if [ "$count" -eq 1 ]; then
|
||||
echo "$options"
|
||||
else
|
||||
echo "$options" | $DMENU
|
||||
echo "$1" | $DMENU
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -90,8 +94,7 @@ handle_ntfy_events() {
|
|||
done
|
||||
}
|
||||
|
||||
# Add '$' to $1 to add 'End of line' to the regex for grep
|
||||
action=$(_ts_control_single_or_dmenu "$actions" "$1$")
|
||||
action=$(_ts_control_single_or_dmenu "$actions" "^$1$")
|
||||
|
||||
case $action in
|
||||
"quick")
|
||||
|
|
Loading…
Reference in a new issue