diff options
Diffstat (limited to 'util/fbcompose/fbcompose-list_plugins')
-rw-r--r-- | util/fbcompose/fbcompose-list_plugins | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/util/fbcompose/fbcompose-list_plugins b/util/fbcompose/fbcompose-list_plugins new file mode 100644 index 0000000..6e9e771 --- /dev/null +++ b/util/fbcompose/fbcompose-list_plugins | |||
@@ -0,0 +1,48 @@ | |||
1 | #! /bin/sh | ||
2 | |||
3 | # Find all OpenGL plugins. | ||
4 | declare -a OPENGL_PLUGIN_DIRS | ||
5 | OPENGL_PLUGIN_DIRS[0]="$FBCOMPOSE_PATH/plugins/opengl" | ||
6 | OPENGL_PLUGIN_DIRS[1]="~/.fluxbox/fbcompose/plugins/opengl" | ||
7 | |||
8 | OPENGL_PLUGINS="" | ||
9 | for dir in ${OPENGL_PLUGIN_DIRS[@]}; do | ||
10 | if [ -d $dir ]; then | ||
11 | OPENGL_PLUGINS="${OPENGL_PLUGINS} `find $dir -type f -name \*.so -print0 | xargs -n 1 -0 basename`" | ||
12 | fi | ||
13 | done | ||
14 | OPENGL_PLUGINS=`echo $OPENGL_PLUGINS | sed -e "s/\.so\b//g" -e "s/ */\n/g" | sort | uniq` | ||
15 | |||
16 | # Find all XRender plugins. | ||
17 | declare -a XRENDER_PLUGIN_DIRS | ||
18 | XRENDER_PLUGIN_DIRS[0]="$FBCOMPOSE_PATH/plugins/xrender" | ||
19 | XRENDER_PLUGIN_DIRS[1]="~/.fluxbox/fbcompose/plugins/xrender" | ||
20 | |||
21 | XRENDER_PLUGINS="" | ||
22 | for dir in ${XRENDER_PLUGIN_DIRS[@]}; do | ||
23 | if [ -d $dir ]; then | ||
24 | XRENDER_PLUGINS="${XRENDER_PLUGINS} `find $dir -type f -name \*.so -print0 | xargs -n 1 -0 basename`" | ||
25 | fi | ||
26 | done | ||
27 | XRENDER_PLUGINS=`echo $XRENDER_PLUGINS | sed -e "s/\.so\b//g" -e "s/ */\n/g" | sort | uniq` | ||
28 | |||
29 | # Print findings. | ||
30 | echo "Available fbcompose plugins:" | ||
31 | |||
32 | echo "OpenGL:" | ||
33 | if [ "x$OPENGL_PLUGINS" == "x" ]; then | ||
34 | echo " No plugins found." | ||
35 | else | ||
36 | for name in $OPENGL_PLUGINS; do | ||
37 | echo " $name" | ||
38 | done | ||
39 | fi | ||
40 | |||
41 | echo "XRender:" | ||
42 | if [ "x$XRENDER_PLUGINS" == "x" ]; then | ||
43 | echo " No plugins found." | ||
44 | else | ||
45 | for name in $XRENDER_PLUGINS; do | ||
46 | echo " $name" | ||
47 | done | ||
48 | fi | ||