Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-updates-src > by-pkgid > 7bc29f68cd75c0be8a2f7ca3e326d60e > files > 2

lxde-common-0.99.0-9.3.mga5.src.rpm

#!/bin/sh

if [ -e "$XDG_CONFIG_HOME/user-dirs.dirs" ]; then
	. "$XDG_CONFIG_HOME/user-dirs.dirs"
else
	XDG_DESKTOP_DIR="$HOME/Desktop"
fi
if [ "`basename $0`" == "hide-desktop-file.sh" ]; then
	for i in `dir "$XDG_DESKTOP_DIR" | grep .desktop`; do
		j="$XDG_DESKTOP_DIR/$i"
		if [ -n "`grep OnlyShowIn "$j" | grep -v LXDE`" -o -n "`grep NotShowIn "$j" | grep LXDE`" ]; then
			desktop-file-edit --set-key=Hidden --set-value=true "$j"
		fi
	done
else
	for i in `dir "$XDG_DESKTOP_DIR" | grep .desktop`; do
		j="$XDG_DESKTOP_DIR/$i"
		if [ -n "`grep OnlyShowIn "$j" | grep -v LXDE`" -o -n "`grep NotShowIn "$j" | grep LXDE`" ]; then
			desktop-file-edit --remove-key=Hidden "$j"
			chmod a+x "$j"
		fi
	done
fi