diff options
author | Joe Sapp <nixphoeni@gentoo.org> | 2009-06-01 12:03:14 +0000 |
---|---|---|
committer | Joe Sapp <nixphoeni@gentoo.org> | 2009-06-01 12:03:14 +0000 |
commit | 46b2aa4fc426a15cef0cc05652a0287c6c91f16e (patch) | |
tree | 763bbbe6c23e839fb8570c1b68b60d036efd38ea /gnome-extra/gdesklets-core/files | |
parent | arm/ia64/m68k/s390/sh/sparc stable wrt #248905 (diff) | |
download | gentoo-2-46b2aa4fc426a15cef0cc05652a0287c6c91f16e.tar.gz gentoo-2-46b2aa4fc426a15cef0cc05652a0287c6c91f16e.tar.bz2 gentoo-2-46b2aa4fc426a15cef0cc05652a0287c6c91f16e.zip |
Added bash completion and an autostart .desktop file from upstream's bzr repo
(Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'gnome-extra/gdesklets-core/files')
-rw-r--r-- | gnome-extra/gdesklets-core/files/gdesklets-core-0.36.1-bash-completion | 50 | ||||
-rw-r--r-- | gnome-extra/gdesklets-core/files/gdesklets.desktop | 12 |
2 files changed, 62 insertions, 0 deletions
diff --git a/gnome-extra/gdesklets-core/files/gdesklets-core-0.36.1-bash-completion b/gnome-extra/gdesklets-core/files/gdesklets-core-0.36.1-bash-completion new file mode 100644 index 000000000000..8f6e1a1b0bd7 --- /dev/null +++ b/gnome-extra/gdesklets-core/files/gdesklets-core-0.36.1-bash-completion @@ -0,0 +1,50 @@ +# $Id: gdesklets-core-0.36.1-bash-completion,v 1.1 2009/06/01 12:03:14 nixphoeni Exp $ +# See http://devmanual.gentoo.org/tasks-reference/completion/index.html +# Author: Joe Sapp + +_gdesklets() +{ + local cur prev opts + + COMPREPLY=() + + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + opts="open start stop list restart profile shell status about + version configure help check" + running_opts="slay" + not_running_opts="" + + # Do these take an additional paramater? + case "${prev}" in + open) + # First, look for .display files in the current directory + COMPREPLY=$(compgen -f -o filenames -X '!*.display' ${cur}) + + # If no filename completions are found, try for directory + # completions + # This, with the '-o filenames' argument on the 'complete' + # line below allows entering a directory name with the intent + # of finishing with a .display file + COMPREPLY=( ${COMPREPLY:-$(compgen -d ${cur})} ) + return 0 + ;; + profile) + local prof_output=$(gdesklets profile | grep "Available" | sed -e 's/.*: //' -e 's/,//') + COMPREPLY=( $(compgen -W "${prof_output}" -- ${cur}) ) + return 0 + ;; + esac + + if [[ ${COMP_CWORD} -eq 1 ]] ; then + local status="$(gdesklets status)" + if [[ "${status}" == *not* ]] ; then + opts="${opts} ${not_running_opts}" + else + opts="${opts} ${running_opts}" + fi + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + fi +} +complete -F _gdesklets -o filenames gdesklets diff --git a/gnome-extra/gdesklets-core/files/gdesklets.desktop b/gnome-extra/gdesklets-core/files/gdesklets.desktop new file mode 100644 index 000000000000..58458661c18e --- /dev/null +++ b/gnome-extra/gdesklets-core/files/gdesklets.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=gDesklets +Type=Application +Encoding=UTF-8 +Version=1.0 +Categories=Utility; +X-GNOME-Autostart-enabled=true +Exec=gdesklets start +Icon=gdesklets +GenericName=Desktop Widgets +Comment=Eye candy for your desktop +GenericName[es]=Widgets para Escritorio |