1
0
Fork 0
mirror of https://github.com/Raymo111/i3lock-color.git synced 2024-10-27 05:23:10 -04:00
i3lock-color/i3lock-bash
Jezer Mejía 995f58dc73
Tab completion (#204) (#230)
* Tab completion

* Added --special-passthrough flag

* Integration with autotools

* Fixed build test

* Update completions

* Indent

Co-authored-by: Raymond Li <hi@raymond.li>
2021-09-19 00:44:07 -04:00

113 lines
2.4 KiB
Bash

#!/usr/bin/env bash
# bash completion for i3lock-color
_i3lock() {
local cur="${COMP_WORDS[COMP_CWORD]}"
local last="${COMP_WORDS[COMP_CWORD - 1]}"
local -a options=(
"--version -v"
"--nofork -n"
"--beep -b"
"--no-unlock-indicator -u"
"--image -i"
"--raw"
"--color -c"
"--tiling -t"
"--centered -C"
"--fill -F"
"--max -M"
"--scale -L"
"--pointer -p"
"--ignore-empty-password -e"
"--show-failed-attempts"
"--debug"
# i3lock-color OPTIONS
"--screen -S"
"--blur -B"
"--clock --force-clocl -k"
"--indicator"
"--radius"
"--ring-width"
# Colors
"--inside-color"
"--ring-color"
"--insidever-color"
"--ringver-color"
"--insidewrong-color"
"--ringwrong-color"
"--line-color"
"--line-uses-inside"
"--line-uses-ring"
"--keyhl-color"
"--bshl-color"
"--separator-color"
"--verif-color"
"--wrong-color"
"--modif-color"
"--layout-color"
"--time-color"
"--date-color"
"--greeter-color"
# Text
"--time-str"
"--date-str"
"--verif-text"
"--wrong-text"
"--keylayout"
"--noinput-text"
"--lock-text"
"--lockfailed-text"
"--greeter-text"
"--no-modkey-text"
# Align
"--time-align --date-align --layout-align --verif-align --wrong-algin --modif-align --greeter-align"
# Outline
"--timeoutlinecolor --dateoutlinecolor --layoutoutlinecolor --verifoutlinecolor --wrongoutlinecolor --modifoutline-color --greeteroutlinecolor"
# Fonts
"--time-font --date-font --layout-font --verif-font --wrong-font --greeter-font"
# Size
"--timesize --datesize --layoutsize --verifsize --wrongsize --greetersize"
# Outline width
"--timeoutlinewidth --dateoutlinewidth --layoutoutlinewidth --verifoutlinewidth --wrongoutlinewidth --modifieroutline-width --greeteroutlinewidth"
# Position
"--ind-pos"
"--time-pos"
"--date-pos"
"--greeter-pos"
# Media keys
"--pass-media-keys"
"--pass-screen-keys"
"--pass-power-keys"
"--pass-volume-keys"
"--special-passthrough"
# Bar mode
"--bar-indicator"
"--bar-direction"
"--bar-orientation"
"--bar-step"
"--bar-max-height"
"--bar-base-width"
"--bar-color"
"--bar-periodic-step"
"--bar-pos"
"--bar-count"
"--bar-total-width"
# Extra configs
"--redraw-thread"
"--refresh-rate"
"--composite"
"--no-verify"
"--slideshow-interval"
"--slideshow-random-selection"
)
local args=""
for i in "${options[@]}"; do
args+="$i "
done
COMPREPLY=( $(compgen -W "${args}" -- ${cur}) )
}
complete -F _i3lock i3lock