summaryrefslogtreecommitdiffstats
path: root/modules.d/slx-splash/scripts/splashtool
diff options
context:
space:
mode:
Diffstat (limited to 'modules.d/slx-splash/scripts/splashtool')
-rwxr-xr-xmodules.d/slx-splash/scripts/splashtool6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules.d/slx-splash/scripts/splashtool b/modules.d/slx-splash/scripts/splashtool
index fa348372..69a76a40 100755
--- a/modules.d/slx-splash/scripts/splashtool
+++ b/modules.d/slx-splash/scripts/splashtool
@@ -14,8 +14,6 @@
# specific icon in its active state. Will assume the
# screen stays intact between calls.
-grep -wqE 'splash' /proc/cmdline || exit 0
-
ICON_SIZE=64
unset mode ppm base index
@@ -133,9 +131,9 @@ else
ppm="${ppm}.gz"
fi
if [ "${ppm%.gz}" != "${ppm}" ]; then
- ppm_size="$(zcat "$ppm" | sed -n 2p)"
+ ppm_size="$( < "$ppm" zcat | head -n 5 | grep -v '^#' | sed -n 2p )"
else
- ppm_size="$(sed -n 2p "$ppm")"
+ ppm_size="$( < "$ppm" head -n 5 | grep -v '^#' | sed -n 2p )"
fi
if [ -z "$ppm_size" ]; then
echo "Invalid ppm? Could not extract dimensions" >&2