File: check-notification

package info (click to toggle)
phosh 0.53.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 9,868 kB
  • sloc: ansic: 83,377; xml: 3,981; python: 717; sh: 449; makefile: 34; lisp: 22; javascript: 6
file content (57 lines) | stat: -rwxr-xr-x 2,188 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/sh

set -e

notify_no_actions() {
    gdbus call --session --dest org.freedesktop.Notifications \
        --object-path=/org/freedesktop/Notifications \
        --method=org.freedesktop.Notifications.Notify \
        "Application" 0 "" "No Actions" "This notification has no actions." \
        '[]' '{}' 4000
}

notify_multiple_actions_with_default() {
    gdbus call --session --dest org.freedesktop.Notifications \
        --object-path=/org/freedesktop/Notifications \
        --method=org.freedesktop.Notifications.Notify \
        "Application" 0 "" "Multiple Actions" "This notification with multiple actions has a default action." \
        '["default", "Action 1", "action2", "Action 2"]' \
        '{}' 4000
}

notify_multiple_actions_without_default() {
    gdbus call --session --dest org.freedesktop.Notifications \
        --object-path=/org/freedesktop/Notifications \
        --method=org.freedesktop.Notifications.Notify \
        "Application" 0 "" "Multiple Actions" "This notification with multiple actions doesn't have a default action." \
        '["action1", "Action 1", "action2", "Action 2"]' \
        '{}' 4000
}

notify_only_default_action() {
    gdbus call --session --dest org.freedesktop.Notifications \
        --object-path=/org/freedesktop/Notifications \
        --method=org.freedesktop.Notifications.Notify \
        "Application" 0 "" "Default Action" "This notification has a default action." \
        '["default", "Default Action"]' \
        '{}' 4000
}

notify_actions_and_hints() {
    gdbus call --session --dest org.freedesktop.Notifications \
        --object-path=/org/freedesktop/Notifications \
        --method=org.freedesktop.Notifications.Notify \
        "Application" 0 "" Subject Body \
        '["org.sigxcpu.test1", "Left", "org.sigxcpu.test2", "Right"]' \
        '{"desktop-entry": <"org.gnome.KrbAuthDialog">,
          "urgency": <1>, "image-path": <"krb-valid-ticket">,
          "category": <"im.received">,
          "x-phosh-fb-profile": <"quiet">
        }' 4000
}

notify_no_actions
notify_multiple_actions_with_default
notify_multiple_actions_without_default
notify_only_default_action
notify_actions_and_hints