about summary refs log tree commit diff
path: root/Completion/User/_xsetroot
blob: adce06d08f1bd1d5dd0150f4bb45a902e3e3c300 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#compdef xsetroot

local expl

case "$words[CURRENT-1]" in
-cursor_name) _cursors; return;;
-([fb]g|solid)) _colors; return;;
-cursor) _description expl 'cursor file'
         _files "$expl[@]" -/g '*.(#i)(xbm|curs(|or))'; return;;
-bitmap) _description expl 'bitmap file'
         _files "$expl[@]" -/g '*.(#i)xbm'; return;;
esac

if [[ CURRENT -gt 2 && "$words[CURRENT-2]" = -cursor ]]; then
  _description expl 'cursor mask file'
  _files "$expl[@]" -/g '*.(#i)(xbm|curs(|or)|mask)'
else
  _description expl option
  compadd "$expl[@]" -M 'm:-=_ r:|_=*' - \
          -help -def -cursor -cursor_name -bitmap -mod -gray -grey \
          -fg -bg -rv -solid -name
fi