summarylogtreecommitdiffstats
path: root/30-gtk3-nocsd.xinit.sh
blob: f6239beca72be26539a87bc1289576fffc9406fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

if [ -n "${GNOME_DESKTOP_SESSION_ID-}" ]; then
  # just in case DESKTOP_SESSION wasn't properly set
  _session=gnome
else
  _session="${DESKTOP_SESSION-}"
fi

case "${_session}" in

  gnome|gnome-*|*/gnome|*/gnome-*)
    unset GTK_CSD
  ;;

  *)
    export GTK_CSD=0
    export LD_PRELOAD="/usr/lib/libgtk3-nocsd.so.0${LD_PRELOAD:+:$LD_PRELOAD}"
  ;;
esac

unset _session