aboutsummaryrefslogtreecommitdiff
path: root/util/fbcompose/fbcompose-list_plugins
diff options
context:
space:
mode:
Diffstat (limited to 'util/fbcompose/fbcompose-list_plugins')
-rw-r--r--util/fbcompose/fbcompose-list_plugins48
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.
4declare -a OPENGL_PLUGIN_DIRS
5OPENGL_PLUGIN_DIRS[0]="$FBCOMPOSE_PATH/plugins/opengl"
6OPENGL_PLUGIN_DIRS[1]="~/.fluxbox/fbcompose/plugins/opengl"
7
8OPENGL_PLUGINS=""
9for 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
13done
14OPENGL_PLUGINS=`echo $OPENGL_PLUGINS | sed -e "s/\.so\b//g" -e "s/ */\n/g" | sort | uniq`
15
16# Find all XRender plugins.
17declare -a XRENDER_PLUGIN_DIRS
18XRENDER_PLUGIN_DIRS[0]="$FBCOMPOSE_PATH/plugins/xrender"
19XRENDER_PLUGIN_DIRS[1]="~/.fluxbox/fbcompose/plugins/xrender"
20
21XRENDER_PLUGINS=""
22for 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
26done
27XRENDER_PLUGINS=`echo $XRENDER_PLUGINS | sed -e "s/\.so\b//g" -e "s/ */\n/g" | sort | uniq`
28
29# Print findings.
30echo "Available fbcompose plugins:"
31
32echo "OpenGL:"
33if [ "x$OPENGL_PLUGINS" == "x" ]; then
34 echo " No plugins found."
35else
36 for name in $OPENGL_PLUGINS; do
37 echo " $name"
38 done
39fi
40
41echo "XRender:"
42if [ "x$XRENDER_PLUGINS" == "x" ]; then
43 echo " No plugins found."
44else
45 for name in $XRENDER_PLUGINS; do
46 echo " $name"
47 done
48fi