wallthumb
This commit is contained in:
parent
1fd13050b2
commit
40288559f5
@ -116,10 +116,24 @@ JGWIDTH=40
|
||||
menu_margin_x=${submenu_spacing:-0}
|
||||
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
|
||||
[ -z $jgmenu_use_borders ] && menu_border=0
|
||||
JGWIDTH=$((jgtools_padding + 278 + jgtools_padding))
|
||||
MENU_PADDING_TOP=$((jgtools_padding + 158))
|
||||
#WALLPAPER
|
||||
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
|
||||
|
||||
|
||||
mkconfigfile
|
||||
|
||||
cat <<EOF > ${MENU_ITEMS}
|
||||
@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),270,150,4,left,top,,,${THUMB}
|
||||
$(printf '%s\n' "${out[@]}")
|
||||
$(printf '%s\n' "${out2[@]}")
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user