Merge pull request #45 from Grafcube/fix-transient

Fix transient argument
This commit is contained in:
Michael Aquilina 2023-05-11 15:24:59 +01:00 committed by GitHub
commit dad1e61c71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -6,7 +6,7 @@ test: &test
- checkout - checkout
- run: - run:
name: Install Dependencies name: Install Dependencies
command: apt-get update && apt-get install -y curl git ncurses-bin command: apt-get update && apt-get install -y curl git ncurses-bin libnotify-bin
- run: - run:
name: Download requirements name: Download requirements
command: | command: |
@ -25,7 +25,7 @@ test: &test
jobs: jobs:
lint: lint:
docker: docker:
- image: "python:3.7-stretch" - image: "python:3.11"
steps: steps:
- checkout - checkout
- run: - run:

View file

@ -56,7 +56,7 @@ function _auto_notify_message() {
urgency="critical" urgency="critical"
transient="" transient=""
fi fi
notify-send "$title" "$body" --app-name=zsh "$transient" "--urgency=$urgency" "--expire-time=$AUTO_NOTIFY_EXPIRE_TIME" notify-send "$title" "$body" --app-name=zsh $transient "--urgency=$urgency" "--expire-time=$AUTO_NOTIFY_EXPIRE_TIME"
elif [[ "$platform" == "Darwin" ]]; then elif [[ "$platform" == "Darwin" ]]; then
osascript \ osascript \
-e 'on run argv' \ -e 'on run argv' \

View file

@ -89,7 +89,7 @@
assert "$lines[1]" same_as 'Notification Title: "f bar -r" Completed' assert "$lines[1]" same_as 'Notification Title: "f bar -r" Completed'
assert "$lines[2]" same_as "Notification Body: Total time: 20 seconds" assert "$lines[2]" same_as "Notification Body: Total time: 20 seconds"
assert "$lines[3]" same_as "Exit code: 0" assert "$lines[3]" same_as "Exit code: 0"
assert "$lines[4]" same_as "--app-name=zsh --urgency=normal --expire-time=15000" assert "$lines[4]" same_as "--app-name=zsh --transient --urgency=normal --expire-time=15000"
} }
@test 'auto-notify-send sends notification on macOS' { @test 'auto-notify-send sends notification on macOS' {