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