forked from entailz/toes
tabs and tab overview
This commit is contained in:
commit
d07c2a5cc9
244 changed files with 72046 additions and 0 deletions
90
completions/bash/foot
Normal file
90
completions/bash/foot
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
# Bash completion script for foot
|
||||
_foot()
|
||||
{
|
||||
COMPREPLY=()
|
||||
|
||||
local cur prev flags word commands match previous_words i offset
|
||||
flags=(
|
||||
"--app-id"
|
||||
"--toplevel-tag"
|
||||
"--check-config"
|
||||
"--config"
|
||||
"--font"
|
||||
"--fullscreen"
|
||||
"--help"
|
||||
"--hold"
|
||||
"--log-colorize"
|
||||
"--log-level"
|
||||
"--log-no-syslog"
|
||||
"--login-shell"
|
||||
"--maximized"
|
||||
"--override"
|
||||
"--print-pid"
|
||||
"--pty"
|
||||
"--server"
|
||||
"--term"
|
||||
"--title"
|
||||
"--version"
|
||||
"--window-size-pixels"
|
||||
"--window-size-chars"
|
||||
"--working-directory"
|
||||
)
|
||||
flags="${flags[@]}"
|
||||
cur=${COMP_WORDS[COMP_CWORD]}
|
||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
|
||||
# Check if positional argument is completed
|
||||
previous_words=( "${COMP_WORDS[@]}" )
|
||||
unset previous_words[-1]
|
||||
commands=$(compgen -c | grep -vFx "$(compgen -k)" | grep -vE '^([.:[]|foot)$' | sort -u)
|
||||
i=0
|
||||
for word in "${previous_words[@]}" ; do
|
||||
match=$(printf "$commands" | grep -Fx "$word" 2>/dev/null)
|
||||
if [[ ! -z "$match" ]] ; then
|
||||
if [[ ${COMP_WORDS[i-1]} =~ ^(--app-id|--toplevel-tag|--config|--font|--log-level|--pty|--term|--title|--window-size-pixels|--window-size-chars|--working-directory)$ ]] ; then
|
||||
(( i++ ))
|
||||
continue
|
||||
fi
|
||||
# Positional argument found
|
||||
offset=$i
|
||||
fi
|
||||
(( i++ ))
|
||||
done
|
||||
|
||||
if [[ ! -z "$offset" ]] ; then
|
||||
# Depends on bash_completion being available
|
||||
declare -F _command_offset >/dev/null || return 1
|
||||
_command_offset $offset
|
||||
return 0
|
||||
elif [[ ${cur} == --* ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${flags}" -- ${cur}) )
|
||||
return 0
|
||||
fi
|
||||
|
||||
case "$prev" in
|
||||
--config|--print-pid|--server|-[cps])
|
||||
compopt -o default ;;
|
||||
--working-directory|-D)
|
||||
compopt -o dirnames ;;
|
||||
--term|-t)
|
||||
command -v toe > /dev/null || return 1
|
||||
COMPREPLY=( $(compgen -W "$(toe -a | awk '$1 !~ /[+]/ {print $1}')" -- ${cur}) ) ;;
|
||||
--font|-f)
|
||||
command -v fc-list > /dev/null || return 1
|
||||
COMPREPLY=( $(compgen -W "$(fc-list : family | sed 's/,/\n/g' | uniq | tr -d ' ')" -- ${cur}) ) ;;
|
||||
--log-level|-d)
|
||||
COMPREPLY=( $(compgen -W "none error warning info" -- ${cur}) ) ;;
|
||||
--log-colorize|-l)
|
||||
COMPREPLY=( $(compgen -W "never always auto" -- ${cur}) ) ;;
|
||||
--app-id|--toplevel-tag|--help|--override|--pty|--title|--version|--window-size-chars|--window-size-pixels|--check-config|-[ahoTvWwC])
|
||||
# Don't autocomplete for these flags
|
||||
: ;;
|
||||
*)
|
||||
# Complete commands from $PATH
|
||||
COMPREPLY=( $(compgen -c -- ${cur}) ) ;;
|
||||
esac
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
complete -F _foot foot
|
||||
82
completions/bash/footclient
Normal file
82
completions/bash/footclient
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
# Bash completion script for footclient
|
||||
_footclient()
|
||||
{
|
||||
COMPREPLY=()
|
||||
|
||||
local cur prev flags word commands match previous_words i offset
|
||||
flags=(
|
||||
"--app-id"
|
||||
"--toplevel-tag"
|
||||
"--fullscreen"
|
||||
"--help"
|
||||
"--hold"
|
||||
"--login-shell"
|
||||
"--log-level"
|
||||
"--log-colorize"
|
||||
"--maximized"
|
||||
"--override"
|
||||
"--client-environment"
|
||||
"--server-socket"
|
||||
"--term"
|
||||
"--title"
|
||||
"--version"
|
||||
"--window-size-pixels"
|
||||
"--window-size-chars"
|
||||
"--working-directory"
|
||||
)
|
||||
flags="${flags[@]}"
|
||||
cur=${COMP_WORDS[COMP_CWORD]}
|
||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
|
||||
# Check if positional argument is completed
|
||||
previous_words=( "${COMP_WORDS[@]}" )
|
||||
unset previous_words[-1]
|
||||
commands=$(compgen -c | grep -vFx "$(compgen -k)" | grep -vE '^([.:[]|footclient)$' | sort -u)
|
||||
i=0
|
||||
for word in "${previous_words[@]}" ; do
|
||||
match=$(printf "$commands" | grep -Fx "$word" 2>/dev/null)
|
||||
if [[ ! -z "$match" ]] ; then
|
||||
if [[ ${COMP_WORDS[i-1]} =~ ^(--app-id|--toplevel-tag|--log-level|--server-socket|--term|--title|--window-size-pixels|--window-size-chars|--working-directory)$ ]] ; then
|
||||
(( i++ ))
|
||||
continue
|
||||
fi
|
||||
# Positional argument found
|
||||
offset=$i
|
||||
fi
|
||||
(( i++ ))
|
||||
done
|
||||
|
||||
if [[ ! -z "$offset" ]] ; then
|
||||
# Depends on bash_completion being available
|
||||
declare -F _command_offset >/dev/null || return 1
|
||||
_command_offset $offset
|
||||
return 0
|
||||
elif [[ ${cur} == --* ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${flags}" -- ${cur}) )
|
||||
return 0
|
||||
fi
|
||||
|
||||
case "$prev" in
|
||||
--server-socket|-s)
|
||||
compopt -o default ;;
|
||||
--working-directory|-D)
|
||||
compopt -o dirnames ;;
|
||||
--term|-t)
|
||||
command -v toe > /dev/null || return 1
|
||||
COMPREPLY=( $(compgen -W "$(toe -a | awk '$1 ~ /[+]/ {next}; {print $1}')" -- ${cur}) ) ;;
|
||||
--log-level|-d)
|
||||
COMPREPLY=( $(compgen -W "none error warning info" -- ${cur}) ) ;;
|
||||
--log-colorize|-l)
|
||||
COMPREPLY=( $(compgen -W "never always auto" -- ${cur}) ) ;;
|
||||
--app-id|--toplevel-tag|--help|--override|--title|--version|--window-size-chars|--window-size-pixels|-[ahoTvWw])
|
||||
# Don't autocomplete for these flags
|
||||
: ;;
|
||||
*)
|
||||
# Complete commands from $PATH
|
||||
COMPREPLY=( $(compgen -c -- ${cur}) ) ;;
|
||||
esac
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
complete -F _footclient footclient
|
||||
24
completions/fish/foot.fish
Normal file
24
completions/fish/foot.fish
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
complete -c foot -x -a "(__fish_complete_subcommand)"
|
||||
complete -c foot -r -s c -l config -d "path to configuration file (XDG_CONFIG_HOME/foot/foot.ini)"
|
||||
complete -c foot -s C -l check-config -d "verify configuration and exit with 0 if ok, otherwise exit with 1"
|
||||
complete -c foot -x -s o -l override -d "configuration option to override, in form SECTION.KEY=VALUE"
|
||||
complete -c foot -x -s f -l font -a "(fc-list : family | sed 's/,/\n/g' | sort | uniq)" -d "font name and style in fontconfig format (monospace)"
|
||||
complete -c foot -x -s t -l term -a '(find /usr/share/terminfo -type f -printf "%f\n")' -d "value to set the environment variable TERM to (foot)"
|
||||
complete -c foot -x -s T -l title -d "initial window title"
|
||||
complete -c foot -x -s a -l app-id -d "value to set the app-id property on the Wayland window to (foot)"
|
||||
complete -c foot -x -l toplevel-tag -d "value to set the toplevel-tag property on the Wayland window to"
|
||||
complete -c foot -s m -l maximized -d "start in maximized mode"
|
||||
complete -c foot -s F -l fullscreen -d "start in fullscreen mode"
|
||||
complete -c foot -s L -l login-shell -d "start shell as a login shell"
|
||||
complete -c foot -F -s D -l working-directory -d "initial working directory for the client application (CWD)"
|
||||
complete -c foot -x -s w -l window-size-pixels -d "window WIDTHxHEIGHT, in pixels (700x500)"
|
||||
complete -c foot -x -s W -l window-size-chars -d "window WIDTHxHEIGHT, in characters (not set)"
|
||||
complete -c foot -F -s s -l server -d "run as server; open terminals by running footclient"
|
||||
complete -c foot -s H -l hold -d "remain open after child process exits"
|
||||
complete -c foot -r -s p -l print-pid -d "print PID to this file or FD when up and running (server mode only)"
|
||||
complete -c foot -x -s d -l log-level -a "info warning error none" -d "log-level (warning)"
|
||||
complete -c foot -x -s l -l log-colorize -a "always never auto" -d "enable or disable colorization of log output on stderr"
|
||||
complete -c foot -s S -l log-no-syslog -d "disable syslog logging (server mode only)"
|
||||
complete -c foot -r -l pty -d "display an existing pty instead of creating one"
|
||||
complete -c foot -s v -l version -d "show the version number and quit"
|
||||
complete -c foot -s h -l help -d "show help message and quit"
|
||||
20
completions/fish/footclient.fish
Normal file
20
completions/fish/footclient.fish
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
complete -c footclient -x -a "(__fish_complete_subcommand)"
|
||||
complete -c footclient -x -s t -l term -a '(find /usr/share/terminfo -type f -printf "%f\n")' -d "value to set the environment variable TERM to (foot)"
|
||||
complete -c footclient -x -s T -l title -d "initial window title"
|
||||
complete -c footclient -x -s a -l app-id -d "value to set the app-id property on the Wayland window to (foot)"
|
||||
complete -c footclient -x -l toplevel-tag -d "value to set the toplevel-tag property on the Wayland window to"
|
||||
complete -c footclient -s m -l maximized -d "start in maximized mode"
|
||||
complete -c footclient -s F -l fullscreen -d "start in fullscreen mode"
|
||||
complete -c footclient -s L -l login-shell -d "start shell as a login shell"
|
||||
complete -c footclient -F -s D -l working-directory -d "initial working directory for the client application (CWD)"
|
||||
complete -c footclient -x -s w -l window-size-pixels -d "window WIDTHxHEIGHT, in pixels (700x500)"
|
||||
complete -c footclient -x -s W -l window-size-chars -d "window WIDTHxHEIGHT, in characters (not set)"
|
||||
complete -c footclient -F -s s -l server-socket -d "override the default path to the foot server socket ($XDG_RUNTIME_DIR/foot-$WAYLAND_DISPLAY.sock)"
|
||||
complete -c footclient -s H -l hold -d "remain open after child process exits"
|
||||
complete -c footclient -s N -l no-wait -d "detach the client process from the running terminal, exiting immediately"
|
||||
complete -c footclient -x -s o -l override -d "configuration option to override, in form SECTION.KEY=VALUE"
|
||||
complete -c footclient -s E -l client-environment -d "child process inherits footclient's environment, instead of the server's"
|
||||
complete -c footclient -x -s d -l log-level -a "info warning error none" -d "log-level (info)"
|
||||
complete -c footclient -x -s l -l log-colorize -a "always never auto" -d "enable or disable colorization of log output on stderr"
|
||||
complete -c footclient -s v -l version -d "show the version number and quit"
|
||||
complete -c footclient -s h -l help -d "show help message and quit"
|
||||
9
completions/meson.build
Normal file
9
completions/meson.build
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
zsh_install_dir = join_paths(get_option('datadir'), 'zsh', 'site-functions')
|
||||
fish_install_dir = join_paths(get_option('datadir'), 'fish', 'vendor_completions.d')
|
||||
bash_install_dir = join_paths(get_option('datadir'), 'bash-completion', 'completions')
|
||||
install_data('zsh/_foot', install_dir: zsh_install_dir)
|
||||
install_data('zsh/_footclient', install_dir: zsh_install_dir)
|
||||
install_data('fish/foot.fish', install_dir: fish_install_dir)
|
||||
install_data('fish/footclient.fish', install_dir: fish_install_dir)
|
||||
install_data('bash/foot', install_dir: bash_install_dir)
|
||||
install_data('bash/footclient', install_dir: bash_install_dir)
|
||||
41
completions/zsh/_foot
Normal file
41
completions/zsh/_foot
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#compdef foot
|
||||
|
||||
_arguments \
|
||||
-s -S -C \
|
||||
'(-c --config)'{-c,--config}'[path to configuration file (XDG_CONFIG_HOME/foot/foot.ini)]:config:_files' \
|
||||
'(-C --check-config)'{-C,--check-config}'[verify configuration and exit with 0 if ok, otherwise exit with 1]' \
|
||||
'(-o --override)'{-o,--override}'[configuration option to override, in form SECTION.KEY=VALUE]:()' \
|
||||
'(-f --font)'{-f,--font}'[font name and style in fontconfig format (monospace)]:font:->fonts' \
|
||||
'(-t --term)'{-t,--term}'[value to set the environment variable TERM to (foot)]:term:->terms' \
|
||||
'(-T --title)'{-T,--title}'[initial window title]:()' \
|
||||
'(-a --app-id)'{-a,--app-id}'[value to set the app-id property on the Wayland window to (foot)]:()' \
|
||||
'--toplevel-tag=[value to set the toplevel-tag property on the Wayland window to]:()' \
|
||||
'(-m --maximized)'{-m,--maximized}'[start in maximized mode]' \
|
||||
'(-F --fullscreen)'{-F,--fullscreen}'[start in fullscreen mode]' \
|
||||
'(-L --login-shell)'{-L,--login-shell}'[start shell as a login shell]' \
|
||||
'(-D --working-directory)'{-D,--working-directory}'[initial working directory for the client application (CWD)]:working_directory:_files' \
|
||||
'(-w --window-size-pixels)'{-w,--window-size-pixels}'[window WIDTHxHEIGHT, in pixels (700x500)]:size_pixels:()' \
|
||||
'(-W --window-size-chars)'{-W,--window-size-chars}'[window WIDTHxHEIGHT, in characters (not set)]:size_chars:()' \
|
||||
'(-s --server)'{-s,--server}'[run as server; open terminals by running footclient]:server:_files' \
|
||||
'(-H --hold)'{-H,--hold}'[remain open after child process exits]' \
|
||||
'(-p --print-pid)'{-p,--print-pid}'[print PID to this file or FD when up and running (server mode only)]:pidfile:_files' \
|
||||
'--pty=[display an existing pty instead of creating one]:pty:_files' \
|
||||
'(-d --log-level)'{-d,--log-level}'[log level (warning)]:loglevel:(info warning error none)' \
|
||||
'(-l --log-colorize)'{-l,--log-colorize}'[enable or disable colorization of log output on stderr]:logcolor:(never always auto)' \
|
||||
'(-S --log-no-syslog)'{-s,--log-no-syslog}'[disable syslog logging (server mode only)]' \
|
||||
'(-v --version)'{-v,--version}'[show the version number and quit]' \
|
||||
'(-h --help)'{-h,--help}'[show help message and quit]' \
|
||||
':command: _command_names -e' \
|
||||
'*::command arguments: _dispatch ${words[1]} ${words[1]}'
|
||||
|
||||
case ${state} in
|
||||
fonts)
|
||||
IFS=$'\n'
|
||||
_values -s , 'font families' $(fc-list : family | sed 's/,/\n/g' | sort | uniq)
|
||||
unset IFS
|
||||
;;
|
||||
|
||||
terms)
|
||||
_values 'terminal definitions' /usr/share/terminfo/**/*(.:t)
|
||||
;;
|
||||
esac
|
||||
31
completions/zsh/_footclient
Normal file
31
completions/zsh/_footclient
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#compdef footclient
|
||||
|
||||
_arguments \
|
||||
-s -S -C \
|
||||
'(-t --term)'{-t,--term}'[value to set the environment variable TERM to (foot)]:term:->terms' \
|
||||
'(-T --title)'{-T,--title}'[initial window title]:()' \
|
||||
'(-a --app-id)'{-a,--app-id}'[value to set the app-id property on the Wayland window to (foot)]:()' \
|
||||
'--toplevel-tag=[value to set the toplevel-tag property on the Wayland window to]:()' \
|
||||
'(-m --maximized)'{-m,--maximized}'[start in maximized mode]' \
|
||||
'(-F --fullscreen)'{-F,--fullscreen}'[start in fullscreen mode]' \
|
||||
'(-L --login-shell)'{-L,--login-shell}'[start shell as a login shell]' \
|
||||
'(-D --working-directory)'{-D,--working-directory}'[initial working directory for the client application (CWD)]:working_directory:_files' \
|
||||
'(-w --window-size-pixels)'{-w,--window-size-pixels}'[window WIDTHxHEIGHT, in pixels (700x500)]:size_pixels:()' \
|
||||
'(-W --window-size-chars)'{-W,--window-size-chars}'[window WIDTHxHEIGHT, in characters (not set)]:size_chars:()' \
|
||||
'(-s --server-socket)'{-s,--server-socket}'[override the default path to the foot server socket ($XDG_RUNTIME_DIR/foot-$WAYLAND_DISPLAY.sock)]:server:_files' \
|
||||
'(-H --hold)'{-H,--hold}'[remain open after child process exits]' \
|
||||
'(-N --no-wait)'{-N,--no-wait}'[detach the client process from the running terminal, exiting immediately]' \
|
||||
'(-o --override)'{-o,--override}'[configuration option to override, in form SECTION.KEY=VALUE]:()' \
|
||||
'(-E --client-environment)'{-E,--client-environment}"[child process inherits footclient's environment, instead of the server's]" \
|
||||
'(-d --log-level)'{-d,--log-level}'[log level (warning)]:loglevel:(info warning error none)' \
|
||||
'(-l --log-colorize)'{-l,--log-colorize}'[enable or disable colorization of log output on stderr]:logcolor:(never always auto)' \
|
||||
'(-v --version)'{-v,--version}'[show the version number and quit]' \
|
||||
'(-h --help)'{-h,--help}'[show help message and quit]' \
|
||||
':command: _command_names -e' \
|
||||
'*::command arguments: _dispatch ${words[1]} ${words[1]}'
|
||||
|
||||
case ${state} in
|
||||
terms)
|
||||
_values 'terminal definitions' /usr/share/terminfo/**/*(.:t)
|
||||
;;
|
||||
esac
|
||||
Loading…
Add table
Add a link
Reference in a new issue