smb,sftp bookmarks

master
Daniel Napora 2023-07-23 01:02:35 +02:00
parent 0b11e07586
commit 16dfdf7485
1 changed files with 16 additions and 0 deletions

View File

@ -36,12 +36,27 @@ if [ $places_bookmarks == true ]; then
case $LANG in case $LANG in
pl*) GTK_BOOKMARKS="Zakładki";; pl*) GTK_BOOKMARKS="Zakładki";;
es*) GTK_BOOKMARKS="Marcadores" ;; es*) GTK_BOOKMARKS="Marcadores" ;;
de*) GTK_BOOKMARKS="Lesezeichen" ;;
*) GTK_BOOKMARKS="Bookmarks" ;; *) GTK_BOOKMARKS="Bookmarks" ;;
esac esac
while read -r line while read -r line
do do
case $line in
file*)
uri=$(echo $line | cut -b 8- | cut -d' ' -f1 | sed 's/%20/ /g') uri=$(echo $line | cut -b 8- | cut -d' ' -f1 | sed 's/%20/ /g')
dirs+=(" ${line#* },^pipe(jgbrowser \"${uri}\")") dirs+=(" ${line#* },^pipe(jgbrowser \"${uri}\")")
;;
sftp*)
uri=$(echo $line | cut -d' ' -f1 | sed 's/%20/ /g')
label=$(echo $line | cut -d' ' -f2 | sed 's/%20/ /g')
dirs+=("󰡰 ${label}, pcmanfm -n ${uri}")
;;
smb*)
uri=$(echo $line | cut -d' ' -f1 | sed 's/%20/ /g')
label=$(echo $line | cut -d' ' -f2 | sed 's/%20/ /g')
dirs+=("󰡰 ${label}, pcmanfm -n ${uri}")
;;
esac
done <"$BOOKMARKS" done <"$BOOKMARKS"
printf "%b\n" "^sep($GTK_BOOKMARKS)" printf "%b\n" "^sep($GTK_BOOKMARKS)"
printf '%s\n' "${dirs[@]}" printf '%s\n' "${dirs[@]}"
@ -811,6 +826,7 @@ jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
} }
mblogout() { mblogout() {
jgmenu_icon_theme="Numix-Circle"
if [[ -n "$1" ]] if [[ -n "$1" ]]
then then
POSITION_MODE=${1:-pointer} POSITION_MODE=${1:-pointer}