]> git.mdlowis.com Git - proto/labwc.git/commitdiff
Add list-themes.sh
authorJohan Malm <jgm323@gmail.com>
Tue, 14 Jul 2020 20:16:27 +0000 (21:16 +0100)
committerJohan Malm <jgm323@gmail.com>
Tue, 14 Jul 2020 20:16:27 +0000 (21:16 +0100)
tools/theme/list-themes.sh [new file with mode: 0755]

diff --git a/tools/theme/list-themes.sh b/tools/theme/list-themes.sh
new file mode 100755 (executable)
index 0000000..4f4b46b
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# List available openbox themes
+#
+
+printf '%b\n' "#icons\ttheme name"
+printf '%b\n' "-------------------"
+
+for d in $HOME/.themes/* /usr/share/themes/*; do
+       if [ -d "$d/openbox-3" ]; then
+               icon_count=0
+               for f in $d/openbox-3/*; do
+                       case $f in
+                               *xbm) : $(( icon_count++ )) ;;
+                       esac
+               done
+               printf '%b\n' "$icon_count\t$(basename $d)"
+       fi
+done