| 1 | function complete_outputs |
| 2 | if string length -q "$SWAYSOCK"; and command -sq jq |
| 3 | swaymsg -t get_outputs | jq -r '.[] | select(.active) | "\(.name)\t\(.make) \(.model)"' |
| 4 | else |
| 5 | return 1 |
| 6 | end |
| 7 | end |
| 8 | |
| 9 | complete -c mako -s h -l help -d 'Show help and exit' |
| 10 | complete -c mako -s c -l config -d 'Path to config file' -r |
| 11 | complete -c mako -l font -d 'Font family and size' -x |
| 12 | complete -c mako -l background-color -d 'Background color in #RRGGBB[AA]' -x |
| 13 | complete -c mako -l text-color -d 'Text color in #RRGGBB[AA]' -x |
| 14 | complete -c mako -l width -d 'Notification width in px' -x |
| 15 | complete -c mako -l height -d 'Max notification height in px' -x |
| 16 | complete -c mako -l margin -d 'Margin values in px, comma separated' -x |
| 17 | complete -c mako -l padding -d 'Padding values in px, comma separated' -x |
| 18 | complete -c mako -l border-size -d 'Border size in px' -x |
| 19 | complete -c mako -l border-color -d 'Border color in #RRGGBB[AA]' -x |
| 20 | complete -c mako -l border-radius -d 'Border radius values in px,comma separated' -x |
| 21 | complete -c mako -l progress-color -d 'Progress color indicator' -x |
| 22 | complete -c mako -l icons -d 'Show icons or not' -xa "1 0" |
| 23 | complete -c mako -l icon-path -d 'Icon search path, colon delimited' -r |
| 24 | complete -c mako -l max-icon-size -d 'Max icon size in px' -x |
| 25 | complete -c mako -l icon-border-radius -d 'Icon border radius value in px' -x |
| 26 | complete -c mako -l markup -d 'Enable markup or not' -xa "1 0" |
| 27 | complete -c mako -l actions -d 'Enable actions or not' -xa "1 0" |
| 28 | complete -c mako -l format -d 'Format string' -x |
| 29 | complete -c mako -l hidden-format -d 'Hidden format string' -x |
| 30 | complete -c mako -l max-visible -d 'Max visible notifications' -x |
| 31 | complete -c mako -l max-history -d 'Max size of history buffer' -x |
| 32 | complete -c mako -l history -d 'Add expired notifications to history' -xa "1 0" |
| 33 | complete -c mako -l sort -d 'Set notification sorting method' -x |
| 34 | complete -c mako -l default-timeout -d 'Notification timeout in ms' -x |
| 35 | complete -c mako -l ignore-timeout -d 'Enable notification timeout or not' -xa "1 0" |
| 36 | complete -c mako -l output -d 'Show notifications on this output' -xa '(complete_outputs)' |
| 37 | complete -c mako -l layer -d 'Show notifications on this layer' -x |
| 38 | complete -c mako -l anchor -d 'Position on output to put notifications' -x |
| 39 |