master
Daniel Napora 2023-01-12 12:26:41 +01:00
parent 42c5ceecad
commit d2ed26cb4b
2 changed files with 43 additions and 42 deletions

View File

@ -371,37 +371,37 @@ out2+=("^tag(lineheight)")
for i in 160 180 200 240 280 300 400; do out2+=("$(printf "<tt>%4s%%</tt>,%s" "$i" "mb-setvar item_height_factor=${i};$me")");done
########## THEMES
out+=("^sep(<i>$COLOR_SCHEME</i>)")
#out+=("^sep(<i>$COLOR_SCHEME</i>)")
ob_file=$HOME/.config/openbox/rc.xml
[[ -f $ob_file ]] && wm_theme=$(awk '/<theme>/ {while (getline n) {if (match(n, /<name>/)){l=n; exit}}} END {split(l, a, "[<>]"); print a[3]}' "$ob_file")
#ob_file=$HOME/.config/openbox/rc.xml
#[[ -f $ob_file ]] && wm_theme=$(awk '/<theme>/ {while (getline n) {if (match(n, /<name>/)){l=n; exit}}} END {split(l, a, "[<>]"); print a[3]}' "$ob_file")
if [ $jgmenu_theme != obtheme ]; then #INNY NIŻ OB THEME
. $HOME/.config/mabox/jgobthemes/${jgmenu_theme}.colorrc > /dev/null 2>&1 &
out+=("$CHOOSE [<b>$jgmenu_theme</b>],^checkout(motywy)")
out+=("$EDIT_CURRENT: (<b>$jgmenu_theme</b>),xdg-open $HOME/.config/mabox/jgobthemes/$jgmenu_theme.colorrc,geany")
out+=("$RANDTHEME,mb-setvar jgmenu_theme=$(basename -s .colorrc $(ls ~/.config/mabox/jgobthemes/*.colorrc | shuf -n 1));$me")
out+=("<s>$FOLLOW_OB</s>,mb-setvar jgmenu_theme=obtheme;$me
^sep()")
out+=("$GRADIENT [ <b>${menu_gradient_pos:-none}</b> ],^checkout(gradient)")
out2+=("^tag(gradient)")
for i in none top right bottom left top_left top_right bottom_left bottom_right; do out2+=("$(printf "<tt>%14s</tt>,%s" "$i" "mb-setvar menu_gradient_pos=${i};$me")");done
out2+=("^tag(motywy)")
else
#if [ $jgmenu_theme != obtheme ]; then #INNY NIŻ OB THEME
#. $HOME/.config/mabox/jgobthemes/${jgmenu_theme}.colorrc > /dev/null 2>&1 &
#out+=("$CHOOSE [<b>$jgmenu_theme</b>],^checkout(motywy)")
#out+=("$EDIT_CURRENT: (<b>$jgmenu_theme</b>),xdg-open $HOME/.config/mabox/jgobthemes/$jgmenu_theme.colorrc,geany")
#out+=("$RANDTHEME,mb-setvar jgmenu_theme=$(basename -s .colorrc $(ls ~/.config/mabox/jgobthemes/*.colorrc | shuf -n 1));$me")
#out+=("<s>$FOLLOW_OB</s>,mb-setvar jgmenu_theme=obtheme;$me
#^sep()")
#out+=("$GRADIENT [ <b>${menu_gradient_pos:-none}</b> ],^checkout(gradient)")
#out2+=("^tag(gradient)")
#for i in none top right bottom left top_left top_right bottom_left bottom_right; do out2+=("$(printf "<tt>%14s</tt>,%s" "$i" "mb-setvar menu_gradient_pos=${i};$me")");done
#out2+=("^tag(motywy)")
#else
. $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc > /dev/null 2>&1 &
#. $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc > /dev/null 2>&1 &
#out+=("#${menu_gradient_pos}\n")
out+=("$CHOOSE [<b>${wm_theme// /_}</b>],^checkout(motywy)")
out+=("$EDIT_CURRENT: (<b>${wm_theme// /_}</b>),xdg-open $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc,geany")
out+=("$RANDTHEME,mb-setvar jgmenu_theme=$(basename -s .colorrc $(ls ~/.config/mabox/jgobthemes/*.colorrc | shuf -n 1));$me")
out+=("$FOLLOW_OB,mb-setvar jgmenu_theme=obtheme;$me
^sep()")
out+=("$GRADIENT [ <b>${menu_gradient_pos:-none}</b> ],^checkout(gradient)")
out2+=("^tag(gradient)")
for i in none top right bottom left top_left top_right bottom_left bottom_right; do out2+=("$(printf "<tt>%14s</tt>,%s" "$i" "mb-setvar menu_gradient_pos=${i} $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc;$me")");done
out2+=("^tag(motywy)")
fi
#out+=("$CHOOSE [<b>${wm_theme// /_}</b>],^checkout(motywy)")
#out+=("$EDIT_CURRENT: (<b>${wm_theme// /_}</b>),xdg-open $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc,geany")
#out+=("$RANDTHEME,mb-setvar jgmenu_theme=$(basename -s .colorrc $(ls ~/.config/mabox/jgobthemes/*.colorrc | shuf -n 1));$me")
#out+=("$FOLLOW_OB,mb-setvar jgmenu_theme=obtheme;$me
#^sep()")
#out+=("$GRADIENT [ <b>${menu_gradient_pos:-none}</b> ],^checkout(gradient)")
#out2+=("^tag(gradient)")
#for i in none top right bottom left top_left top_right bottom_left bottom_right; do out2+=("$(printf "<tt>%14s</tt>,%s" "$i" "mb-setvar menu_gradient_pos=${i} $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc;$me")");done
#out2+=("^tag(motywy)")
#fi

View File

@ -14,6 +14,7 @@ case $LANG in
EDIT="Edytuj"
FILETOOLS="Narzędzia plikowe"
INST="Instaluj"
SETTINGS="Ustawienia"
;;
es*)
LABEL="Places"
@ -24,6 +25,7 @@ case $LANG in
EDIT="Edit"
FILETOOLS="File Tools"
INST="Install"
SETTINGS="Settings"
;;
*)
LABEL="Places"
@ -34,22 +36,21 @@ case $LANG in
EDIT="Edit"
FILETOOLS="File Tools"
INST="Install"
SETTINGS="Settings"
;;
esac
if [ ! -f ${PLACES} ]; then
cat <<EOF > ${PLACES}
^sep($LABEL)
$ROOTDIR (<b>/</b>),^pipe(jgbrowser /),folder
 $HOME_DIR (<b>~</b>),^pipe(jgbrowser),folder-home
 $(basename $(xdg-user-dir DOWNLOAD)),^pipe(jgbrowser $(xdg-user-dir DOWNLOAD)),folder-download
 $(basename $(xdg-user-dir DOCUMENTS)),^pipe(jgbrowser $(xdg-user-dir DOCUMENTS)),folder-documents
 $(basename $(xdg-user-dir MUSIC)),^pipe(jgbrowser $(xdg-user-dir MUSIC)),folder-music
 $(basename $(xdg-user-dir PICTURES)),^pipe(jgbrowser $(xdg-user-dir PICTURES)),folder-pictures
 $(basename $(xdg-user-dir VIDEOS)),^pipe(jgbrowser $(xdg-user-dir VIDEOS)),folder-video
^sep()
$HOME_DIR (<b>~</b>),^pipe(jgbrowser),folder-home
$(basename $(xdg-user-dir DOWNLOAD)),^pipe(jgbrowser ~/$(basename $(xdg-user-dir DOWNLOAD))),folder-download
$(basename $(xdg-user-dir DOCUMENTS)),^pipe(jgbrowser ~/$(basename $(xdg-user-dir DOCUMENTS)),folder-documents
$(basename $(xdg-user-dir MUSIC)),^pipe(jgbrowser ~/$(basename $(xdg-user-dir MUSIC))),folder-music
$(basename $(xdg-user-dir PICTURES)),^pipe(jgbrowser ~/$(basename $(xdg-user-dir PICTURES))),folder-pictures
$(basename $(xdg-user-dir VIDEOS)),^pipe(jgbrowser ~/$(basename $(xdg-user-dir VIDEOS))),folder-video
^sep()
~/.config,^pipe(jgbrowser ~/.config),folder
 ~/.config,^pipe(jgbrowser ~/.config),folder
EOF
fi
mapfile -t out < "$PLACES"
@ -63,9 +64,7 @@ do
out+=("$MOUNTLBL,^pipe(jgbrowser ${MOUNT}),$ICON")
done < <(df -h | grep -v "boot" | grep '^/dev')
out+=("^sep()")
[[ $jgbrowser_show_hidden = false ]] && out+=("<i><s>$SHOW_HIDDEN</s></i>,mb-setvar jgbrowser_show_hidden=true;mb-places -s") || out+=("$SHOW_HIDDEN,mb-setvar jgbrowser_show_hidden=false;mb-places -s")
out+=("$EDIT $LABEL,xdg-open $PLACES,geany")
out2+=("^tag(inst)")
out+=("^sep($FILETOOLS)")
if hash pcmanfm &>/dev/null; then
@ -91,12 +90,14 @@ else
out2+=("$INST QDirStat,pamac-installer qdirstat,package-manager-icon")
fi
if (( ${#out2[@]} > 0 )); then
if (( ${#out2[@]} > 1 )); then
out+=("^sep()")
out+=("$INST ...,^checkout(inst),package-manager-icon ")
out+=("^tag(inst)")
fi
out+=("^sep($SETTINGS)")
[[ $jgbrowser_show_hidden = false ]] && out+=("<i><s>$SHOW_HIDDEN</s></i>,mb-setvar jgbrowser_show_hidden=true;mb-places -s") || out+=("$SHOW_HIDDEN,mb-setvar jgbrowser_show_hidden=false;mb-places -s")
out+=(" $EDIT $LABEL,xdg-open $PLACES,geany")
### RUN
if [[ "$1" == "-s" || "$1" == "ipc" ]]; then
@ -123,8 +124,8 @@ fi
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
[ -z $jgmenu_use_borders ] && menu_border=0
icons=1
iconmargin=4
icons=0
iconmargin=0
mkconfigfile
cat <<EOF > ${MENU_ITEMS}