Advertisement
Guest User

Untitled

a guest
Nov 9th, 2015
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.89 KB | None | 0 0
  1. # -*- sh -*-
  2. # Xsession.d script to workaround Qt4 icon themes in MATE and Xfce.
  3. # This file is sourced by Xsession(5), not executed.
  4.  
  5. if [ "$DESKTOP_SESSION" = 'mate' ]; then
  6.     DE='mate'
  7. elif [ "$DESKTOP_SESSION" = 'xfce' ]; then
  8.     DE='xfce'
  9. elif ( echo "$DESKTOP_SESSION" | grep -q 'xsession' ); then
  10.     SESSION=$(readlink $(readlink $(which 'x-session-manager')))
  11.     case "$SESSION" in
  12.         *mate*)
  13.           DE='mate'
  14.         ;;
  15.         *xfce*)
  16.           DE='xfce'
  17.         ;;
  18.     esac
  19. fi
  20.  
  21. if [ "$DE" = 'mate' ]; then
  22.     export DESKTOP_SESSION='gnome'
  23.     ICON_THEME=$(gsettings get 'org.mate.interface' 'icon-theme' | sed -e "s/^'//;s/'$//")
  24. elif [ "$DE" = 'xfce' ]; then
  25.     ICON_THEME=$(xfconf-query -c xsettings -p '/Net/IconThemeName')
  26. fi
  27. if [ ! -z "$ICON_THEME" ]; then
  28.     gconftool-2 --set --type string '/desktop/gnome/interface/icon_theme' "$ICON_THEME"
  29. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement