Skip to content

Commit

Permalink
Fix #59519: Interface theme dropped to "Same as system" on update (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
romandemidov authored Nov 1, 2022
1 parent 7364573 commit fa38b18
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions bin/run-desktopeditors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,19 @@ export XKB_CONFIG_ROOT=$SNAP/usr/share/X11/xkb
export QT_XKB_CONFIG_ROOT=$SNAP/usr/share/X11/xkb

# XDG Config
export XDG_CONFIG_HOME=$SNAP_USER_DATA/.config-$SNAP_VERSION
export XDG_CONFIG_HOME=$SNAP_USER_DATA/.config
export XDG_CONFIG_DIRS=$SNAP/etc:$XDG_CONFIG_DIRS
mkdir -p $XDG_CONFIG_HOME

#migrate config
if [ ! -f $XDG_CONFIG_HOME/onlyoffice/DesktopEditors.conf ]; then
mkdir -p $XDG_CONFIG_HOME/onlyoffice
LAST_CONFIG=$(ls -a -t $SNAP_USER_DATA | grep .config- | head -1)
if [ ! -z "${LAST_CONFIG}" ]; then
mv $SNAP_USER_DATA/$LAST_CONFIG/onlyoffice/DesktopEditors.conf $XDG_CONFIG_HOME/onlyoffice
fi
fi

# Note: this doesn't seem to work, QML's LocalStorage either ignores
# or fails to use $SNAP_USER_DATA if defined here
export XDG_DATA_DIRS=$SNAP/usr/share:$XDG_DATA_DIRS
Expand Down Expand Up @@ -116,11 +125,6 @@ if [ ! -d "$XDG_RUNTIME_DIR" ]; then
mkdir -p $XDG_RUNTIME_DIR -m 700
fi

#Copy ibus files for input methods
if [ -d "$HOME/.config/ibus" ]; then
cp -r $HOME/.config/ibus $XDG_CONFIG_HOME
fi

#Create cache for input methods
export GTK_IM_MODULE_FILE=$XDG_CACHE_HOME/immodules.cache
if [ ! -f $GTK_IM_MODULE_FILE ]; then
Expand Down

0 comments on commit fa38b18

Please sign in to comment.