1#!/bin/sh -e
2#
3#    trash: show icon (and optionally count) if entries in trash.
4#
5#    Copyright (C) 2011 Canonical Ltd.
6#    Copyright (C) 2011-2014 Dustin Kirkland
7#
8#    Authors: James Hunt <james.hunt@canonical.com>
9#             Dustin Kirkland <kirkland@byobu.org>
10#
11#    This program is free software: you can redistribute it and/or modify
12#    it under the terms of the GNU General Public License as published by
13#    the Free Software Foundation, version 3 of the License.
14#
15#    This program is distributed in the hope that it will be useful,
16#    but WITHOUT ANY WARRANTY; without even the implied warranty of
17#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18#    GNU General Public License for more details.
19#
20#    You should have received a copy of the GNU General Public License
21#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
23TRASH_DIR="$HOME/.local/share/Trash/files"
24
25__trash_detail() {
26	find "$TRASH_DIR"
27}
28
29__trash() {
30	local count
31	[ -d "$TRASH_DIR" ] || return
32	count=$(ls $dir|wc -l)
33	[ "$count" = "0" ] && return
34	printf "%s[%s]" "$ICON_TRASH" "$count"
35}
36
37# vi: syntax=sh ts=4 noexpandtab