-
Notifications
You must be signed in to change notification settings - Fork 1
/
gtk3-examples
executable file
·26 lines (21 loc) · 952 Bytes
/
gtk3-examples
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash
# Copyright (C) 2021 Rodrigo Silva (MestreLion) <[email protected]>
# License: GPLv3 or later. See <http://www.gnu.org/licenses/gpl.html>
# -----------------------------------------------------------------------------
DESCRIPTION='GTK3 Examples, notably Icon Browser and Widget Factory'
ARGS=''
setuplib=${SETUP_LIB_PATH:-"$(dirname "$(readlink -f "$0")")"/../setuplib}
# shellcheck source=../setuplib
if [[ -r "$setuplib" ]]; then source "$setuplib"; else
echo "Setup library not found: $setuplib" >&2; exit 1;
fi
# -----------------------------------------------------------------------------
install_package gtk-3-examples
app_dir=${DATA_HOME}/applications
mkdir -p -- "$app_dir"
for example in /usr/share/applications/gtk3-*.desktop; do
dest=$app_dir/${example##*/}
if [[ -f "$dest" ]] || ! [[ -f "$example" ]]; then continue; fi
grep -vx 'NoDisplay=true' -- "$example" > "$dest"
done
xdg-desktop-menu forceupdate