2021-01-28 21:29:00 +01:00
|
|
|
#!/bin/bash
|
|
|
|
# Daniel Napora 2021 <napcok@gmail.com>
|
2021-02-14 13:39:21 +01:00
|
|
|
#: mb-reset - reset/update user config files to current defaults. It only affects files shipped with Mabox.
|
2021-01-28 21:29:00 +01:00
|
|
|
#: Usage: mb-reset option
|
|
|
|
#:
|
|
|
|
#: Options:
|
2021-02-14 13:39:21 +01:00
|
|
|
#: tint2 - overwrite tint2 panel config files in ~/.config/tint2/
|
2021-02-01 19:47:01 +01:00
|
|
|
#: jgthemes - overwrite menu/sidepanels color schemes in ~/.config/mabox/jgobthemes/
|
|
|
|
#: mainmenu - overwrite main menu files (favorites.csv)
|
|
|
|
#: leftpanel - left panel custom commands
|
|
|
|
#: rightpanel - right panel custom commands
|
|
|
|
#: logout - logout dialog
|
|
|
|
#: obrcxml - rc.xml default OpenBox configuration file
|
2021-02-14 13:39:21 +01:00
|
|
|
#: obautostart - default autostart file
|
|
|
|
#: conky - overwrite conky config files in ~/.config/conky/
|
2021-01-28 21:29:00 +01:00
|
|
|
|
|
|
|
case $LANG in
|
|
|
|
pl*) LNGDIR="pl";;
|
|
|
|
es*) LNGDIR="es";;
|
|
|
|
*) LNGDIR="en";;
|
|
|
|
esac
|
|
|
|
|
|
|
|
__usage() {
|
|
|
|
grep "^#:" $0 | while read DOC; do printf '%s\n' "${DOC###:}"; done
|
|
|
|
exit
|
|
|
|
}
|
|
|
|
|
|
|
|
__allmenus() {
|
|
|
|
rsync -a /usr/share/mabox/lang/$LNGDIR/.config/mabox/settings* $HOME/.config/mabox/
|
|
|
|
rsync -a /usr/share/mabox/lang/$LNGDIR/.config/jgmenu/*.csv $HOME/.config/jgmenu/
|
|
|
|
rsync -a /usr/share/mabox/lang/$LNGDIR/.config/mabox/places* $HOME/.config/mabox/
|
|
|
|
rsync -a /usr/share/mabox/lang/$LNGDIR/.config/mabox/right* $HOME/.config/mabox/
|
|
|
|
rsync -a /usr/share/mabox/lang/$LNGDIR/.config/mabox/exit.csv $HOME/.config/mabox/
|
|
|
|
}
|
|
|
|
|
|
|
|
__mainmenu() {
|
|
|
|
rsync -a /usr/share/mabox/lang/$LNGDIR/.config/jgmenu/*.csv $HOME/.config/jgmenu/
|
|
|
|
rsync -a /usr/share/mabox/lang/$LNGDIR/.config/mabox/favorites.csv $HOME/.config/mabox/
|
|
|
|
}
|
|
|
|
|
|
|
|
__leftpanel() {
|
|
|
|
rsync -a /usr/share/mabox/lang/$LNGDIR/.config/mabox/places* $HOME/.config/mabox/
|
|
|
|
mb-setvar places_menusettingspipe=true
|
|
|
|
mb-setvar places_sysinfopipe=true
|
|
|
|
mb-setvar places_keyspipe=true
|
|
|
|
mb-setvar places_sshpipe=true
|
|
|
|
mb-setvar places_softwarepipe=true
|
|
|
|
}
|
|
|
|
|
|
|
|
__rightpanel() {
|
|
|
|
rsync -a /usr/share/mabox/lang/$LNGDIR/.config/mabox/right* $HOME/.config/mabox/
|
|
|
|
}
|
|
|
|
|
|
|
|
__logout() {
|
|
|
|
rsync -a /usr/share/mabox/lang/$LNGDIR/.config/mabox/exit.csv $HOME/.config/mabox/
|
|
|
|
}
|
|
|
|
|
|
|
|
__tint2() {
|
|
|
|
rsync -a /usr/share/mabox/lang/$LNGDIR/.config/tint2/*.tint2rc $HOME/.config/tint2/
|
|
|
|
killall -SIGUSR1 tint2
|
|
|
|
}
|
|
|
|
|
|
|
|
__jgthemes() {
|
|
|
|
rsync -a /usr/share/mb-jgtools/jgobthemes/* $HOME/.config/mabox/jgobthemes/
|
|
|
|
}
|
|
|
|
|
2021-02-14 13:39:21 +01:00
|
|
|
__conky() {
|
2021-01-28 21:29:00 +01:00
|
|
|
echo "Not implemented yet"
|
2021-02-14 13:39:21 +01:00
|
|
|
rsync -a /usr/share/mabox/lang/$LNGDIR/.config/conky/*conkyrc $HOME/.config/conky/
|
2021-01-28 21:29:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
__maboxthemes() {
|
|
|
|
echo "Not implemented yet"
|
|
|
|
}
|
|
|
|
|
|
|
|
__obrcxml() {
|
2021-02-01 19:47:01 +01:00
|
|
|
rsync -a /usr/share/mabox/common/rc.xml $HOME/.config/openbox/
|
2021-01-28 21:29:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
__obautostart() {
|
2021-02-01 19:47:01 +01:00
|
|
|
rsync -a /usr/share/mabox/common/autostart $HOME/.config/openbox/
|
2021-01-28 21:29:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
"allmenus") __allmenus ;;
|
|
|
|
"mainmenu") __mainmenu ;;
|
|
|
|
"leftpanel") __leftpanel ;;
|
|
|
|
"rightpanel") __rightpanel ;;
|
|
|
|
"logout") __logout ;;
|
|
|
|
"tint2") __tint2 ;;
|
|
|
|
"jgthemes") __jgthemes ;;
|
2021-02-14 13:39:21 +01:00
|
|
|
"conky") __conky ;;
|
2021-01-28 21:29:00 +01:00
|
|
|
"maboxthemes") __maboxthemes ;;
|
|
|
|
"obrcxml") __obrcxml ;;
|
|
|
|
"obautostart") __obautostart ;;
|
|
|
|
"-h|--help") __usage ;;
|
|
|
|
*) __usage ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|