mb-places mountpoints

master
Daniel Napora 2022-11-28 20:29:38 +01:00
parent 57ecaebfb5
commit 5bf23e1a48
2 changed files with 21 additions and 0 deletions

View File

@ -342,6 +342,7 @@ case $menu_font_family in
Deja*) de="";;
Robo*) ro="";;
Inco*) in="";;
Ubunt*) ub="";;
*);;
esac
@ -360,6 +361,7 @@ out2+=("<span size=\"x-large\" font_family=\"Autour One\">$au Autour One</span>
out2+=("<span size=\"x-large\" font_family=\"DejaVu Serif\">$de DejaVu Serif</span>,mb-setvar \"menu_font_family='DejaVu Serif'\";$me")
out2+=("<span size=\"x-large\" font_family=\"Roboto Light\">$ro Roboto Light</span>,mb-setvar \"menu_font_family='Roboto Light'\";$me")
out2+=("<span size=\"x-large\" font_family=\"Inconsolata\">$in Inconsolata</span>,mb-setvar menu_font_family=Inconsolata;$me")
out2+=("<span size=\"x-large\" font_family=\"Ubuntu Regular\">$ub Ubuntu Regular</span>,mb-setvar \"menu_font_family='Ubuntu Regular'\";$me")
out2+=("^tag(titlefont)")

View File

@ -9,6 +9,7 @@ case $LANG in
LABEL="Miejsca"
ROOTDIR="Katalog główny"
HOME_DIR="Katalog domowy"
MOUNTPOINTS="Dyski (Punkty montowania)"
SHOW_HIDDEN="Wyświetlanie ukrytych plików"
EDIT="Edytuj"
FILETOOLS="Narzędzia plikowe"
@ -18,6 +19,7 @@ case $LANG in
LABEL="Places"
ROOTDIR="Root Directory"
HOME_DIR="Home Directory"
MOUNTPOINTS="Discs (mount points)"
SHOW_HIDDEN="Show hidden files"
EDIT="Edit"
FILETOOLS="File Tools"
@ -27,6 +29,7 @@ case $LANG in
LABEL="Places"
ROOTDIR="Root Directory"
HOME_DIR="Home Directory"
MOUNTPOINTS="Discs (mount points)"
SHOW_HIDDEN="Show hidden files"
EDIT="Edit"
FILETOOLS="File Tools"
@ -51,13 +54,29 @@ EOF
fi
mapfile -t out < "$PLACES"
out+=("^sep($MOUNTPOINTS)")
while read DEVICE SIZE USED FREE PERCENT MOUNT
do
[[ "${#MOUNT}" -gt "10" ]] && MOUNTLBL=${MOUNT##*/} || MOUNTLBL=${MOUNT}
[[ "${#MOUNTLBL}" -gt "10" ]] && MOUNTLBL=${MOUNTLBL:0:9}
[[ "${MOUNT}" = *"media"* ]] && ICON="drive-removable-media-usb" || ICON="drive-harddisk"
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")
out+=("^sep($FILETOOLS)")
if hash pcmanfm &>/dev/null; then
out+=("PCManFM,pcmanfm,file-manager")
fi
if hash thunar &>/dev/null; then
out+=("Thunar,thunar,file-manager")
fi
if hash fsearch &>/dev/null; then
out+=("FSearch,fsearch,search")
fi
if hash doublecmd &>/dev/null; then
out+=("Double Commander,doublecmd,doublecmd")