Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (26 sloc) 1.01 KB
##############################
# GTK launcher specific part #
##############################
# select gtk version
. $SNAP/flavor-select
if [ "$USE_gtk3" = true ]; then
export GTK_PATH=$RUNTIME/usr/lib/$ARCH/gtk-3.0
else
export GTK_PATH=$RUNTIME/usr/lib/$ARCH/gtk-2.0
fi
# ibus and fcitx integration
# with those defintions fcitx works unconfined out of the box, ibus requires
# user config to be copied though, https://launchpad.net/bugs/1580463
GTK_IM_MODULE_DIR=$XDG_CACHE_HOME/immodules
export GTK_IM_MODULE_FILE=$GTK_IM_MODULE_DIR/immodules.cache
if [ $needs_update = true ]; then
rm -rf $GTK_IM_MODULE_DIR
mkdir -p $GTK_IM_MODULE_DIR
if [ "$USE_gtk3" = true ]; then
ln -s $RUNTIME/usr/lib/$ARCH/gtk-3.0/3.0.0/immodules/*.so $GTK_IM_MODULE_DIR
$RUNTIME/usr/lib/$ARCH/libgtk-3-0/gtk-query-immodules-3.0 > $GTK_IM_MODULE_FILE
else
ln -s $RUNTIME/usr/lib/$ARCH/gtk-2.0/2.10.0/immodules/*.so $GTK_IM_MODULE_DIR
$RUNTIME/usr/lib/$ARCH/libgtk2.0-0/gtk-query-immodules-2.0 > $GTK_IM_MODULE_FILE
fi
fi