2012-07-28 19:39:12 +02:00
|
|
|
#!/bin/sh
|
2012-07-28 20:04:21 +02:00
|
|
|
## Home session initialization.
|
2014-11-12 16:15:39 +01:00
|
|
|
|
2015-07-09 12:19:34 +02:00
|
|
|
SOURCEDIR="$HOME/dataperso"
|
2012-10-29 15:29:54 +01:00
|
|
|
[ -z "$XDG_CONFIG_HOME" ] && XDG_CONFIG_HOME="$HOME/.config"
|
|
|
|
[ -z "$XDG_DATA_HOME" ] && XDG_DATA_HOME="$HOME/.local/share"
|
|
|
|
[ -z "$XDG_DATA_DIRS" ] && XDG_DATA_DIRS="/usr/local/share"
|
2012-07-28 20:04:21 +02:00
|
|
|
|
2013-05-04 00:30:11 +02:00
|
|
|
## Temp folder
|
2013-05-22 17:35:54 +02:00
|
|
|
echo "==> 'temp' folder"
|
2013-07-03 23:24:01 +02:00
|
|
|
mkdir -p "$HOME/temp"
|
2013-05-22 17:35:54 +02:00
|
|
|
echo
|
2013-05-04 00:30:11 +02:00
|
|
|
|
2013-06-03 20:18:14 +02:00
|
|
|
if [ -d "$SOURCEDIR/contacts" ]; then
|
2014-11-12 16:15:39 +01:00
|
|
|
echo "==> Abook"
|
|
|
|
ln -snf "$SOURCEDIR/contacts" "$HOME/.abook"
|
|
|
|
echo
|
2013-05-22 17:35:54 +02:00
|
|
|
fi
|
2013-04-30 14:17:22 +02:00
|
|
|
|
2014-01-03 19:13:07 +01:00
|
|
|
if command -v mutt >/dev/null 2>&1; then
|
2014-11-12 16:15:39 +01:00
|
|
|
echo "==> Mutt"
|
|
|
|
[ -d "$SOURCEDIR" ] && ln -snf "$SOURCEDIR/mails" "$HOME/.mutt.d"
|
|
|
|
mkdir -p "$HOME/.cache/mutt/hcache"
|
|
|
|
echo
|
2013-05-22 17:35:54 +02:00
|
|
|
fi
|
2012-07-28 20:04:21 +02:00
|
|
|
|
2013-07-03 23:24:01 +02:00
|
|
|
if [ -d "$SOURCEDIR/todo" ]; then
|
2014-11-12 16:15:39 +01:00
|
|
|
echo "==> To-Do"
|
|
|
|
ln -snf "$SOURCEDIR/todo/todo.org" "$HOME/todo.org"
|
|
|
|
echo
|
2013-05-22 17:35:54 +02:00
|
|
|
fi
|
2012-07-28 19:39:12 +02:00
|
|
|
|
2012-11-29 18:17:42 +01:00
|
|
|
## dwb -- Install extensions.
|
2014-04-21 10:03:35 +02:00
|
|
|
if command -v dwbem >/dev/null 2>&1; then
|
2014-11-12 16:15:39 +01:00
|
|
|
echo "==> dwb"
|
2014-04-21 10:03:35 +02:00
|
|
|
|
2015-07-09 12:19:34 +02:00
|
|
|
# [ $(dwbem -l | grep -c "adblock_subscriptions") -eq 0 ] && dwbem -Ni adblock_subscriptions
|
2014-11-12 16:15:39 +01:00
|
|
|
[ $(dwbem -l | grep -c "navtools") -eq 0 ] && dwbem -Ni navtools
|
|
|
|
[ $(dwbem -l | grep -c "contenthandler") -eq 0 ] && dwbem -Ni contenthandler
|
|
|
|
# dwbem -Ni youtube_html5
|
2014-04-21 10:03:35 +02:00
|
|
|
|
2014-11-12 16:15:39 +01:00
|
|
|
(cd ~/.config/dwb/userscripts/ && git checkout extension_loader.js)
|
|
|
|
echo
|
2012-11-29 16:17:06 +01:00
|
|
|
fi
|
|
|
|
|
2012-09-16 22:19:38 +02:00
|
|
|
## Bookmarks
|
2013-05-22 17:35:54 +02:00
|
|
|
if [ -d "$SOURCEDIR" ]; then
|
2014-11-12 16:15:39 +01:00
|
|
|
echo "==> Bookmarks"
|
|
|
|
if [ -z "$BROWSER" ]; then
|
|
|
|
echo "Variable BROWSER is not set."
|
|
|
|
else
|
|
|
|
BROWSER_DATA_DIR="$XDG_DATA_HOME/$BROWSER/"
|
|
|
|
[ "$BROWSER" = "dwb" ] && BROWSER_DATA_DIR="$XDG_CONFIG_HOME/$BROWSER/default/"
|
|
|
|
|
|
|
|
[ -d "$SOURCEDIR" ] && ln -sf "$SOURCEDIR/bookmarks/bookmarks" "$BROWSER_DATA_DIR"
|
|
|
|
[ -d "$SOURCEDIR" ] && ln -sf "$SOURCEDIR/bookmarks/quickmarks" "$BROWSER_DATA_DIR"
|
|
|
|
[ -d "$SOURCEDIR" ] && ln -sf "$SOURCEDIR/bookmarks/cookies.allow" "$BROWSER_DATA_DIR"
|
|
|
|
fi
|
|
|
|
echo
|
2012-11-29 16:17:06 +01:00
|
|
|
fi
|
2013-01-09 19:25:23 +01:00
|
|
|
|
2013-03-15 22:38:01 +01:00
|
|
|
## News
|
2014-01-03 19:13:07 +01:00
|
|
|
if command -v newsbeuter >/dev/null 2>&1; then
|
2014-11-12 16:15:39 +01:00
|
|
|
echo "==> Newsbeuter"
|
|
|
|
mkdir -p "$XDG_DATA_HOME/newsbeuter"
|
|
|
|
[ -d "$SOURCEDIR" ] && ln -sf "$SOURCEDIR/news/urls" "$XDG_CONFIG_HOME/newsbeuter/"
|
|
|
|
[ -d "$SOURCEDIR" ] && ln -sf "$SOURCEDIR/news/news_starred" "$XDG_CONFIG_HOME/newsbeuter/"
|
|
|
|
echo
|
2013-05-04 00:12:48 +02:00
|
|
|
fi
|
2013-05-05 20:57:20 +02:00
|
|
|
|
|
|
|
## Launchers
|
2013-05-22 17:35:54 +02:00
|
|
|
if [ -d "$SOURCEDIR" ]; then
|
2014-11-12 16:15:39 +01:00
|
|
|
echo "==> Launchers"
|
|
|
|
ln -snf "$SOURCEDIR/launchers" "$HOME/.launchers"
|
|
|
|
echo
|
2013-05-24 11:44:23 +02:00
|
|
|
fi
|
2013-10-16 14:22:01 +02:00
|
|
|
|
|
|
|
## Temp scripts
|
|
|
|
if [ -d "$SOURCEDIR" ]; then
|
2014-11-12 16:15:39 +01:00
|
|
|
echo "==> Hackpool"
|
|
|
|
ln -snf "$SOURCEDIR/hackpool" "$HOME/.hackpool"
|
|
|
|
echo
|
2013-10-16 14:22:01 +02:00
|
|
|
fi
|