thumbdir
This commit is contained in:
parent
7fb19bf0a9
commit
0bbc0fab23
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# mb-jgtools: Menu, Sidepanels, Screenshot Tool and Exit Dialog for Mabox
|
||||
# Copyright (C) 2019-2022 Daniel Napora <napcok@gmail.com>
|
||||
# Copyright (C) 2019-2023 Daniel Napora <napcok@gmail.com>
|
||||
|
||||
. $HOME/.config/mabox/mabox.conf
|
||||
jgmenu_theme=${jgmenu_theme:-obtheme}
|
||||
@ -25,7 +25,7 @@ item_height_factor=${item_height_factor:-200}
|
||||
|
||||
gtkbookmarks() {
|
||||
if [ $places_bookmarks == true ]; then
|
||||
BOOKMARKS="$HOME/.gtk-bookmarks"
|
||||
BOOKMARKS="$HOME/.config/gtk-3.0/bookmarks"
|
||||
if [[ -s "$BOOKMARKS" ]]; then
|
||||
case $LANG in
|
||||
pl*) GTK_BOOKMARKS="Zakładki";;
|
||||
@ -443,17 +443,23 @@ esac
|
||||
|
||||
|
||||
if [ $panels_heightpos == "full" ]; then
|
||||
WALLPALDIR="$HOME/.config/colormenu/palettes/wallp"
|
||||
mkdir -p "$WALLPALDIR"
|
||||
|
||||
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
|
||||
WALLPAPER=${WALLPATH##*/}
|
||||
THUMBDIR="$HOME/.config/mabox/wallthumbs"
|
||||
mkdir -p ${THUMBDIR}
|
||||
THUMB="${THUMBDIR}/${WALLPAPER}.png"
|
||||
if [[ ! -f "$THUMB" ]]
|
||||
then
|
||||
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
|
||||
fi
|
||||
THUMBDIR="$HOME/.cache/colorizer/thumbs"
|
||||
mkdir -p ${THUMBDIR}
|
||||
NAME=${WALLPATH////_}
|
||||
if [[ "${NAME}" =~ ^_home_.* ]]; then
|
||||
n=${#HOME}
|
||||
((n++))
|
||||
NAME=${NAME:${n}}
|
||||
fi
|
||||
THUMB="${THUMBDIR}/${NAME}.png"
|
||||
if [[ ! -f "$THUMB" ]]
|
||||
then
|
||||
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
|
||||
fi
|
||||
|
||||
|
||||
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
|
||||
MENU_PADDING_TOP=$((jgtools_padding + 152))
|
||||
cat <<EOF > ${RHEAD}
|
||||
@ -724,17 +730,20 @@ if [[ -x "$(command -v VBoxManage)" ]]; then
|
||||
[[ $places_vboxes == true ]] && vboxes=". $HOME/.config/mabox/vboxes.csv" || vboxes=""
|
||||
fi
|
||||
if [ $panels_heightpos == "full" ]; then
|
||||
WALLPALDIR="$HOME/.config/colormenu/palettes/wallp"
|
||||
mkdir -p "$WALLPALDIR"
|
||||
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
|
||||
WALLPAPER=${WALLPATH##*/}
|
||||
THUMBDIR="$HOME/.config/mabox/wallthumbs"
|
||||
mkdir -p ${THUMBDIR}
|
||||
THUMB="${THUMBDIR}/${WALLPAPER}.png"
|
||||
if [[ ! -f "$THUMB" ]]
|
||||
then
|
||||
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
|
||||
fi
|
||||
THUMBDIR="$HOME/.cache/colorizer/thumbs"
|
||||
mkdir -p ${THUMBDIR}
|
||||
NAME=${WALLPATH////_}
|
||||
if [[ "${NAME}" =~ ^_home_.* ]]; then
|
||||
n=${#HOME}
|
||||
((n++))
|
||||
NAME=${NAME:${n}}
|
||||
fi
|
||||
THUMB="${THUMBDIR}/${NAME}.png"
|
||||
if [[ ! -f "$THUMB" ]]
|
||||
then
|
||||
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
|
||||
fi
|
||||
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
|
||||
MENU_PADDING_TOP=$((jgtools_padding + 152))
|
||||
cat <<EOF > ${LHEAD}
|
||||
|
Loading…
Reference in New Issue
Block a user