Commit 982f7930 authored by Jens Henrik  Goebbert's avatar Jens Henrik Goebbert

update xdg_profile_init.sh

parent 856b7bdb
......@@ -109,17 +109,33 @@ for p in ${XDG_CONFIG_DIRS}; do
done
# always renew gtk-bookmarks
# make sure default JSC places ($WORK and $ARCH) are present
# 1) copy ${HOME}/.gtk-bookmarks to tmp-file
# 2) remove
# # add bookmarks file
# if [ -e ${XDG_PROFILES_DIR}/${XDG_PROFILE}/config/gtk-3.0/bookmarks ]; then
# cp ${XDG_PROFILES_DIR}/${XDG_PROFILE}/config/gtk-3.0/bookmarks ${XDG_CONFIG_HOME}/gtk-3.0/
# else
# touch ${XDG_CONFIG_HOME}/gtk-3.0/bookmarks
# fi
# ln -sf ${XDG_CONFIG_HOME}/gtk-3.0/bookmarks ${HOME}/.gtk-bookmarks
#
if [ ! -d ${XDG_CONFIG_HOME}/gtk-3.0 ]; then
echo "XDG profile ${XDG_PROFILE} choosen the first time ... creating ${XDG_CONFIG_HOME}/gtk-3.0"
mkdir -p ${XDG_CONFIG_HOME}/gtk-3.0/
fi
if [ ! -f ${XDG_CONFIG_HOME}/gtk-3.0/bookmarks ]; then
touch ${XDG_CONFIG_HOME}/gtk-3.0/bookmarks
cp ${XDG_CONFIG_DIR}/gtk-3.0/bookmarks ${XDG_CONFIG_HOME}/gtk-3.0/ 2>/dev/null || :
fi
IFS=:
for p in ${XDG_CONFIG_DIRS}; do
if [ -f ${p}/gtk-3.0/bookmarks ]; then
echo "debug: merge"
#merge with ${XDG_CONFIG_DIR}/gtk-3.0/bookmarks
fi
done
# replace env variables ${...} with their content
# - todo -
# link to .gtk-bookmarks for older file managers
if [ -L ${HOME}/.gtk-bookmarks ]; then
rm ${HOME}/.gtk-bookmarks
fi
if [ ! -f ${HOME}/.gtk-bookmarks ]; then
ln -s ${XDG_CONFIG_HOME}/gtk-3.0/bookmarks ${HOME}/.gtk-bookmarks
fi
# remove saved sessions, as we do not want infoterm windows to appear multiple times
# (todo: only remove the call of infoterm scripts instead)
......
# bookmarks of profile 'default'
file:///$WORK WORK
file:///$ARCH ARCH
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment