Skip to content

Commit 19865c0

Browse files
zappolowskifwsmit
authored andcommitted
Add fish completion for dunstify
1 parent 5a40b10 commit 19865c0

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

contrib/dunstify.fishcomp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
if command -q jq
2+
function __fish_dunstify_history
3+
dunstctl history | jq -r '.data[][] | "\(.id.data)\t\(.appname.data)"'
4+
end
5+
else
6+
function __fish_dunstify_history
7+
dunstctl history | awk '/"id" :/ {getline; getline; print $3}'
8+
end
9+
end
10+
11+
complete -c dunstify -s '?' -l help -d 'Show help options'
12+
complete -c dunstify -s a -l appname -r -d 'Name of your application'
13+
complete -c dunstify -s u -l urgency -x -a 'low normal critical' -d 'The urgency of this notification'
14+
complete -c dunstify -s h -l hints -x -d 'User specified hints'
15+
complete -c dunstify -s A -l action -x -d 'Actions the user can invoke'
16+
complete -c dunstify -s t -l timeout -x -d 'The time in milliseconds until the notification expires'
17+
complete -c dunstify -s i -l icon -x -d 'An Icon that should be displayed with the notification'
18+
complete -c dunstify -s I -l raw_icon -r -d 'Path to the icon to be sent as raw image data'
19+
complete -c dunstify -s c -l capabilities -d 'Print the server capabilities and exit'
20+
complete -c dunstify -s s -l serverinfo -d 'Print server information and exit'
21+
complete -c dunstify -s p -l printid -d 'Print id, which can be used to update/replace this notification'
22+
complete -c dunstify -s r -l replace -x -a '(__fish_dunstify_history)' -d 'Set id of this notification.'
23+
complete -c dunstify -s C -l close -x -a '(__fish_dunstify_history)' -d 'Close the notification with the specified ID'
24+
complete -c dunstify -s b -l block -d 'Block until notification is closed and print close reason'
25+
26+
# ex: filetype=fish

0 commit comments

Comments
 (0)