changeset 14:4c66316076df

bg: use filter to match images only
author David Demelier <markand@malikania.fr>
date Wed, 08 Nov 2017 10:12:37 +0100
parents f73e67cd0b71
children 35f5b4a9ba80
files bin/dmenu_bg
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/bin/dmenu_bg	Wed Nov 08 10:12:22 2017 +0100
+++ b/bin/dmenu_bg	Wed Nov 08 10:12:37 2017 +0100
@@ -54,10 +54,10 @@
 # Optional lines.
 lines=${bg_lines:-16}
 
-file=$(${TOP}/dmenu_filesel -l ${lines} ${directory})
+file=$(${TOP}/dmenu_filesel -t f -l ${lines} -p "(jpe?g|png|gif)" ${directory})
 
 if [ -n "${file}" ]; then
-    ${bg_cmd} ${file}
+    ${bg_cmd} "${file}"
 fi
 
 # vim: syntax=sh: