showHideDesktopIcons.sh 547 B

12345678910111213141516171819
  1. #!/bin/bash
  2. # Shows/Hides xfce4 Desktop icons and turns on/off conky at the same time.
  3. isIconsShown=$(xfconf-query -c xfce4-desktop -l -v | grep '/desktop-icons/style' | awk '{print $2}')
  4. if [ $isIconsShown -eq 0 ]
  5. then
  6. # Show Desktop icons.
  7. xfconf-query -c xfce4-desktop -p '/desktop-icons/style' int -s 2
  8. ~/.myScripts/on-off_conky.sh
  9. else
  10. # Hide Desktop icons.
  11. xfconf-query -c xfce4-desktop -p '/desktop-icons/style' int -s 0
  12. ~/.myScripts/on-off_conky.sh
  13. fi
  14. # notify-send -i dialog-information "CapsLock turned off."