mb-reset update

master
Daniel Napora 2021-05-28 02:47:06 +02:00
parent 4d3c90688d
commit d2040b58b1
2 changed files with 46 additions and 5 deletions

View File

@ -509,6 +509,7 @@ case $LANG in
DESKMNGR="Desktop Session Manager"
DESKTOPS="Pulpity i Okna"
DESKGRID="DeskGrid"
WALLCHANGER="Zmieniacz tapet"
;;
es*)
QUICK_NAV="Navegación rápida"
@ -525,6 +526,7 @@ case $LANG in
DESKMNGR="Desktop Session Manager"
DESKTOPS="Desktops and Windows"
DESKGRID="Desktop Grid"
WALLCHANGER="Wallpaper Changer"
;;
*)
QUICK_NAV="Quick Navigation"
@ -541,6 +543,7 @@ case $LANG in
DESKMNGR="Desktop Session Manager"
DESKTOPS="Desktops and Windows"
DESKGRID="DeskGrid"
WALLCHANGER="Wallpaper Changer"
;;
esac
@ -591,16 +594,18 @@ QNAV=""
fi
# PIPEMENUS
[ $places_menusettingspipe == true ] && menusettingspipe="<big></big> $MENUPANELS,^pipe(jgmenusettings-pipe -r)" && pipesep="^sep($PIPEMENUS)"
[ $places_tint2pipe == true ] && tint2pipe="<big></big> $TINT2SETTINGS,^pipe(jgtint2-pipe -r)" && pipesep="^sep($PIPEMENUS)"
[ $places_menusettingspipe == true ] && menusettingspipe="<big></big> $MENUPANELS,^pipe(jgmenusettings-pipe -r)" && pipesep="^sep($PIPEMENUS)"
[ $places_tint2pipe == true ] && tint2pipe="<big></big> $TINT2SETTINGS,^pipe(jgtint2-pipe -r)" && pipesep="^sep($PIPEMENUS)"
[ $places_sysinfopipe == true ] && sysinfopipe="<big></big> $SYSINFO,^pipe(jgsysinfo-pipe -r)" && pipesep="^sep($PIPEMENUS)"
[ $places_keyspipe == true ] && keyspipe="<big></big> $SHORTCUTS,^pipe(jgkeys-pipe -r)" && pipesep="^sep($PIPEMENUS)"
[ $places_sshpipe == true ] && sshpipe="<big></big> $SSH_CONN,^pipe(jgssh -r)" && pipesep="^sep($PIPEMENUS)"
[ $places_softwarepipe == true ] && softwarepipe="<big></big> $POPINSTALL,^pipe(jgsoftware-pipe -r)" && pipesep="^sep($PIPEMENUS)"
[[ $places_conkypipe == true || -z ${places_conkypipe} ]] && conkypipe="<big></big> $CONKYSETTINGS,^pipe(jgconky-pipe -r)" && pipesep="^sep($PIPEMENUS)"
[[ $places_conkypipe == true || -z ${places_conkypipe} ]] && conkypipe="<big></big> $CONKYSETTINGS,^pipe(jgconky-pipe -r)" && pipesep="^sep($PIPEMENUS)"
[[ $places_jgdeskmngr == true || -z ${places_jgdeskmngr} ]] && jgdeskmngr="<big></big> $DESKMNGR,^pipe(jgdeskmngr -r)" && pipesep="^sep($PIPEMENUS)"
[[ $places_jgdesktops == true || -z ${places_jgdesktops} ]] && jgdesktops="<big></big> $DESKTOPS,^pipe(jgdesktops -r)" && pipesep="^sep($PIPEMENUS)"
[[ $places_jgdeskgrid == true || -z ${places_jgdeskgrid} ]] && jgdeskgrid="<big></big> $DESKGRID,^pipe(jgdeskgrid -r)" && pipesep="^sep($PIPEMENUS)"
#[[ $places_jgwallpaperchanger == true || -z ${places_jgwallpaperchanger} ]] && jgwallpaperchanger="<big></big> $WALLCHANGER,^pipe(jgwallpaperchanger -r)" && pipesep="^sep($PIPEMENUS)"
# VBOXES
[[ $places_vboxes == true ]] && vboxes=". $HOME/.config/mabox/vboxes.csv" || vboxes=""
@ -619,6 +624,8 @@ cat <<EOF > ${MENU_ITEMS}
$(gtkbookmarks)
$pipesep
$menusettingspipe
#$jgwallpaperchanger
$jgdesktops
$jgdeskmngr
$jgdeskgrid
@ -626,7 +633,6 @@ $sysinfopipe
$keyspipe
$sshpipe
$softwarepipe
$menusettingspipe
$tint2pipe
$conkypipe

View File

@ -1,10 +1,18 @@
#!/bin/bash
# Daniel Napora 2021 <napcok@gmail.com>
#: mb-reset - reset/update user config files to current defaults. It only affects files shipped with Mabox. Be aware that you may loose your own customizations (if any).
#: mb-reset - reset/update user config files to current defaults.
#: It only affects files shipped with Mabox.
#: Be aware that you may loose your own customizations (if any).
#:
#: Usage: mb-reset option
#:
#: Options:
#: Compare mode:
#: -c - compare files using meld GUI (if installed)
#: It lets you see changes and decide which one to pick or not.
#: Works with rc.xml,bashrc and autostart files
#: Usage: mb-reset -c obrcxml | autostart | bashrc
#: Overwrite mode:
#: obrcxml - rc.xml default OpenBox configuration file
#: obautostart - default autostart file
#: bashrc - bash config file (~/.bashrc)
@ -30,6 +38,29 @@ __usage() {
exit
}
__compare() {
command -v meld >/dev/null 2>&1 || { echo "mb-reset compare mode requires meld. Install it and try again. (yay -S meld)" >&2; exit 1; }
case "$1" in
obrcxml)
meld /usr/share/mabox/common/rc.xml ~/.config/openbox/rc.xml &
;;
autostart)
meld /usr/share/mabox/common/autostart ~/.config/openbox/autostart &
;;
bashrc)
meld /usr/share/mabox/common/.bashrc ~/.bashrc &
;;
conky)
meld /usr/share/mabox/lang/$LNGDIR/.config/conky/ ~/.config/conky/ &
;;
*)
echo "Compare "
echo "Usage: mb-reset -c obrcxml|autostart|bashrc"
;;
esac
}
__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/
@ -87,6 +118,8 @@ rsync -a /usr/share/mb-jgtools/jgobthemes/* $HOME/.config/mabox/jgobthemes/
}
__conky() {
cp $HOME/.config/conky/conky-sessionfile{,.bak."$(date +%Y%m%d-%H%M%S)"}
cp $HOME/.config/conky/saved-sessions{,.bak."$(date +%Y%m%d-%H%M%S)"}
rsync -a /usr/share/mabox/lang/$LNGDIR/.config/conky/* $HOME/.config/conky/
killall -SIGUSR1 conky
}
@ -102,6 +135,7 @@ openbox --reconfigure
}
__obautostart() {
cp $HOME/.config/openbox/autostart{,.bak."$(date +%Y%m%d-%H%M%S)"}
rsync -a /usr/share/mabox/common/autostart $HOME/.config/openbox/
}
@ -115,6 +149,7 @@ rsync -a /usr/share/mabox/common/terminator/* $HOME/.config/terminator/
}
case "$1" in
-c|check) __compare "$2";;
"allmenus") __allmenus ;;
"mainmenu") __mainmenu ;;
"leftpanel") __leftpanel ;;