mb-reset update
parent
4d3c90688d
commit
d2040b58b1
|
@ -509,6 +509,7 @@ case $LANG in
|
||||||
DESKMNGR="Desktop Session Manager"
|
DESKMNGR="Desktop Session Manager"
|
||||||
DESKTOPS="Pulpity i Okna"
|
DESKTOPS="Pulpity i Okna"
|
||||||
DESKGRID="DeskGrid"
|
DESKGRID="DeskGrid"
|
||||||
|
WALLCHANGER="Zmieniacz tapet"
|
||||||
;;
|
;;
|
||||||
es*)
|
es*)
|
||||||
QUICK_NAV="Navegación rápida"
|
QUICK_NAV="Navegación rápida"
|
||||||
|
@ -525,6 +526,7 @@ case $LANG in
|
||||||
DESKMNGR="Desktop Session Manager"
|
DESKMNGR="Desktop Session Manager"
|
||||||
DESKTOPS="Desktops and Windows"
|
DESKTOPS="Desktops and Windows"
|
||||||
DESKGRID="Desktop Grid"
|
DESKGRID="Desktop Grid"
|
||||||
|
WALLCHANGER="Wallpaper Changer"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
QUICK_NAV="Quick Navigation"
|
QUICK_NAV="Quick Navigation"
|
||||||
|
@ -541,6 +543,7 @@ case $LANG in
|
||||||
DESKMNGR="Desktop Session Manager"
|
DESKMNGR="Desktop Session Manager"
|
||||||
DESKTOPS="Desktops and Windows"
|
DESKTOPS="Desktops and Windows"
|
||||||
DESKGRID="DeskGrid"
|
DESKGRID="DeskGrid"
|
||||||
|
WALLCHANGER="Wallpaper Changer"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -591,16 +594,18 @@ QNAV=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# PIPEMENUS
|
# PIPEMENUS
|
||||||
[ $places_menusettingspipe == true ] && menusettingspipe="<big></big> $MENUPANELS,^pipe(jgmenusettings-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_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_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_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_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_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_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_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_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
|
# VBOXES
|
||||||
[[ $places_vboxes == true ]] && vboxes=". $HOME/.config/mabox/vboxes.csv" || vboxes=""
|
[[ $places_vboxes == true ]] && vboxes=". $HOME/.config/mabox/vboxes.csv" || vboxes=""
|
||||||
|
|
||||||
|
@ -619,6 +624,8 @@ cat <<EOF > ${MENU_ITEMS}
|
||||||
|
|
||||||
$(gtkbookmarks)
|
$(gtkbookmarks)
|
||||||
$pipesep
|
$pipesep
|
||||||
|
$menusettingspipe
|
||||||
|
#$jgwallpaperchanger
|
||||||
$jgdesktops
|
$jgdesktops
|
||||||
$jgdeskmngr
|
$jgdeskmngr
|
||||||
$jgdeskgrid
|
$jgdeskgrid
|
||||||
|
@ -626,7 +633,6 @@ $sysinfopipe
|
||||||
$keyspipe
|
$keyspipe
|
||||||
$sshpipe
|
$sshpipe
|
||||||
$softwarepipe
|
$softwarepipe
|
||||||
$menusettingspipe
|
|
||||||
$tint2pipe
|
$tint2pipe
|
||||||
$conkypipe
|
$conkypipe
|
||||||
|
|
||||||
|
|
37
bin/mb-reset
37
bin/mb-reset
|
@ -1,10 +1,18 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Daniel Napora 2021 <napcok@gmail.com>
|
# 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
|
#: Usage: mb-reset option
|
||||||
#:
|
#:
|
||||||
#: Options:
|
#: 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
|
#: obrcxml - rc.xml default OpenBox configuration file
|
||||||
#: obautostart - default autostart file
|
#: obautostart - default autostart file
|
||||||
#: bashrc - bash config file (~/.bashrc)
|
#: bashrc - bash config file (~/.bashrc)
|
||||||
|
@ -30,6 +38,29 @@ __usage() {
|
||||||
exit
|
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() {
|
__allmenus() {
|
||||||
rsync -a /usr/share/mabox/lang/$LNGDIR/.config/mabox/settings* $HOME/.config/mabox/
|
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/jgmenu/*.csv $HOME/.config/jgmenu/
|
||||||
|
@ -87,6 +118,8 @@ rsync -a /usr/share/mb-jgtools/jgobthemes/* $HOME/.config/mabox/jgobthemes/
|
||||||
}
|
}
|
||||||
|
|
||||||
__conky() {
|
__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/
|
rsync -a /usr/share/mabox/lang/$LNGDIR/.config/conky/* $HOME/.config/conky/
|
||||||
killall -SIGUSR1 conky
|
killall -SIGUSR1 conky
|
||||||
}
|
}
|
||||||
|
@ -102,6 +135,7 @@ openbox --reconfigure
|
||||||
}
|
}
|
||||||
|
|
||||||
__obautostart() {
|
__obautostart() {
|
||||||
|
cp $HOME/.config/openbox/autostart{,.bak."$(date +%Y%m%d-%H%M%S)"}
|
||||||
rsync -a /usr/share/mabox/common/autostart $HOME/.config/openbox/
|
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
|
case "$1" in
|
||||||
|
-c|check) __compare "$2";;
|
||||||
"allmenus") __allmenus ;;
|
"allmenus") __allmenus ;;
|
||||||
"mainmenu") __mainmenu ;;
|
"mainmenu") __mainmenu ;;
|
||||||
"leftpanel") __leftpanel ;;
|
"leftpanel") __leftpanel ;;
|
||||||
|
|
Loading…
Reference in New Issue