Skip to content

Instantly share code, notes, and snippets.

@esmaeelE
Last active October 3, 2019 13:52
Show Gist options
  • Save esmaeelE/0af4a46e0c8536a729f2416ef0000614 to your computer and use it in GitHub Desktop.
Save esmaeelE/0af4a46e0c8536a729f2416ef0000614 to your computer and use it in GitHub Desktop.
Run bash script to switch between show/hide desktop icons
#!/bin/bash
OUTPUT="$(xfconf-query -c xfce4-desktop -p '/desktop-icons/style' -a)"
if [ "$OUTPUT" -eq "0" ]; then
echo "Show Desktop icons"
xfconf-query -c xfce4-desktop -np '/desktop-icons/style' -t 'int' -s '2'
elif [ "$OUTPUT" -eq "2" ];
then
echo "Hide Desktop icons"
xfconf-query -c xfce4-desktop -np '/desktop-icons/style' -t 'int' -s '0'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment