conky menu,pcmanwp

This commit is contained in:
Daniel Napora 2023-05-29 21:16:10 +02:00
parent f0e8f8d509
commit 96ed5973d8
3 changed files with 41 additions and 105 deletions

View File

@ -612,32 +612,7 @@ if [[ "$OLD_SYNTAX" = "true" ]];then
out2+=("<big></big> $BOTTOMRIGHT,conkyctl pos bottom_right ${1};$me")
#out2+=("$ALIGNMENT [ <b>$POS</b> ],^checkout(posi)")
#out3+=("^tag(posi)")
#out3+=("^sep($POSITION)")
#out3+=(" $TOPLEFT,conkyctl pos top_left ${1};$me")
#out3+=(" $TOP,conkyctl pos top_middle ${1};$me")
#out3+=(" $TOPRIGHT,conkyctl pos top_right ${1};$me")
#out3+=(" $LEFT,conkyctl pos middle_left ${1};$me")
#out3+=("$CENTER,conkyctl pos middle_middle ${1};$me")
#out3+=(" $RIGHT,conkyctl pos middle_right ${1};$me")
#out3+=(" $BOTTOMLEFT,conkyctl pos bottom_left ${1};$me")
#out3+=(" $BOTTOM,conkyctl pos bottom_middle ${1};$me")
#out3+=(" $BOTTOMRIGHT,conkyctl pos bottom_right ${1};$me")
#out2+=("$HORIZONTAL_GAP [ <b>$GAPX</b> ],^checkout(gapx)")
#out3+=("^tag(gapx)")
#out3+=("^sep($HORIZONTAL_GAP)")
#for i in 0 10 20 30 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360; do
#out3+=("${i},conkyctl gap_x ${i} ${1};$me")
#done
#out2+=("$VERTICAL_GAP [ <b>$GAPY</b> ],^checkout(gapy)")
#out3+=("^tag(gapy)")
#out3+=("^sep($VERTICAL_GAP)")
#for i in 0 10 20 30 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360; do
#out3+=("${i},conkyctl gap_y ${i} ${1};$me")
#done
if [[ "$NOT_SUPPORTED" != "true" ]];then
if [[ "$NOT_SUPPORTED" != "true" ]];then
out2+=("^sep()")
out2+=(" $MAKEMOVEABLE,conkyctl makemoveableall")
fi
@ -698,7 +673,8 @@ if [[ "$OLD_SYNTAX" = "true" ]];then
out+=("^sep($COLORS)")
out+=("$TRANSPARENT [ <b>$WINTRANS</b> ],^checkout(transsingle)")
[[ "$WINTRANS" == false ]] && out+=("<big>󰄱</big> $TRANSPARENT,conkyctl transparent true ${1}") || out+=("<big>󰄲</big> $TRANSPARENT,conkyctl transparent false ${1}")
if [[ "$WINCLR" != "#" ]];then
if [ "$WINTRANS" == false ];then
out+=("<small><span bgcolor='$WINCLR'> </span><span ${BG} fgcolor='$WINCLR'> AbCd </span></small> $BACKGROUND,^pipe(mbclr '$WINCLR' conkyctl win_bgcolor '${BACKGROUND}' '$me' ${1})")
@ -718,10 +694,7 @@ if [[ "$OLD_SYNTAX" = "true" ]];then
out+=("^sep()")
fi
out2+=("^tag(transsingle)")
out2+=("^sep($TRANSPARENT)")
out2+=("$YES,conkyctl transparent true ${1};$me")
out2+=("$NO,conkyctl transparent false ${1};$me")
if [ "$WINTRANS" == false ];then
@ -778,11 +751,11 @@ if [[ "$OLD_SYNTAX" = "true" ]];then
out2+=("$DRAW $OLINE,conkyctl shades outline ${1};$me")
out+=("^sep()")
fi
out+=("$BORDERS [ <b>$BORD $STIP</b> ],^checkout(bordersingle)")
[[ "$BORD" == false ]] && out+=("<big>󰄱</big> $BORDERS [ <b>$STIP</b> ],^checkout(bordersingle)") || out+=("<big>󰄲</big> $BORDERS [ <b>$STIP</b> ],^checkout(bordersingle)")
out2+=("^tag(bordersingle)")
out2+=("^sep($DRAW $BORDERS?)")
out2+=("$YES,conkyctl draw_borders true ${1};$me")
out2+=("$NO,conkyctl draw_borders false ${1};$me")
[[ "$BORD" == false ]] && out2+=("<big>祿</big> $YES,conkyctl draw_borders true ${1};$me") || out2+=("<big>綠</big> $YES,conkyctl draw_borders false ${1};$me")
[[ "$BORD" == false ]] && out2+=("<big>綠</big> $NO,conkyctl draw_borders true ${1};$me") || out2+=("<big>祿</big> $NO,conkyctl draw_borders false ${1};$me")
out2+=("^sep($STIPPLED_BORDERS ?)")
out2+=("0 ($SOLID_LINE),conkyctl stippled_borders 0 ${1};$me")
out2+=("^sep()")
@ -863,7 +836,7 @@ contextmenu () {
jgtools_padding=4
MENU_PADDING_TOP=${jgtools_padding:-0}
TABS="90"
TABS=140
jgmenu_icon_size=0
@ -892,38 +865,7 @@ contextmenu () {
mkconfigfile
#if [[ "$OLD_SYNTAX" != "true" ]];then
# echo "color_menu_bg_to=${WINCLR} 100" >> ${CONFIG_FILE}
# TXTCOLOR=$(pastel textcolor ${WINCLR}|pastel format hex)
# #notify-send.sh "TXTCOLOR" "${TXTCOLOR} ${menu_gradient_pos}"
# if [ "$TXTCOLOR" == "#ffffff" ];then #bg is dark
# TXTCOLOR_NORM="#cccccc"
# WINCLR=$(pastel lighten 0.03 ${WINCLR}|pastel format hex)
# echo "color_norm_fg=${TXTCOLOR_NORM} 100" >> ${CONFIG_FILE}
# echo "color_sel_fg=${TXTCOLOR} 100" >> ${CONFIG_FILE}
# echo "color_title_fg=${TXTCOLOR} 60" >> ${CONFIG_FILE}
# SELBG=$(pastel darken 0.1 ${WINCLR}|pastel format hex)
# echo "color_sel_bg=${SELBG} 80" >> ${CONFIG_FILE}
# echo "color_title_bg=${SELBG} 30" >> ${CONFIG_FILE}
# echo "color_title_border=${SELBG} 60" >> ${CONFIG_FILE}
# else #bg is light
# TXTCOLOR_NORM="#333333"
# echo "color_norm_fg=${TXTCOLOR_NORM} 100" >> ${CONFIG_FILE}
# echo "color_sel_fg=${TXTCOLOR} 100" >> ${CONFIG_FILE}
# echo "color_title_fg=${TXTCOLOR} 90" >> ${CONFIG_FILE}
# SELBG=$(pastel darken 0.1 ${WINCLR}|pastel format hex)
# echo "color_sel_bg=${SELBG} 80" >> ${CONFIG_FILE}
# echo "color_title_bg=${SELBG} 90" >> ${CONFIG_FILE}
# echo "color_title_border=${SELBG} 90" >> ${CONFIG_FILE}
# fi
# echo "color_menu_bg=${WINCLR} 90" >> ${CONFIG_FILE}
# echo "color_menu_border=${CLR} 60" >> ${CONFIG_FILE}
# echo "menu_border=1" >> ${CONFIG_FILE}
# echo "menu_radius=0" >> ${CONFIG_FILE}
# echo "color_sep_fg=${CLR} 10" >> ${CONFIG_FILE}
# echo "font=${FONT} 10" >> ${CONFIG_FILE}
#fi
cat <<EOF > ${MENU_ITEMS}
$(printf '%s\n' "${out[@]}")
$(printf '%s\n' "${out2[@]}")
@ -1006,46 +948,11 @@ cmdmenu () {
jgtools_padding=4
MENU_PADDING_TOP=${jgtools_padding:-0}
JGWIDTH=270
TABS="300"
TABS=140
jgmenu_icon_size=0
mkconfigfile
#echo "color_menu_bg_to=${WINCLR} 100" >> ${CONFIG_FILE}
#TXTCOLOR=$(pastel textcolor ${WINCLR}|pastel format hex)
#####notify-send.sh "TXTCOLOR" "${TXTCOLOR} ${menu_gradient_pos}"
#if [ "$TXTCOLOR" == "#ffffff" ];then #bg is dark
#TXTCOLOR_NORM="#cccccc"
#WINCLR=$(pastel lighten 0.03 ${WINCLR}|pastel format hex)
#echo "color_norm_fg=${TXTCOLOR_NORM} 100" >> ${CONFIG_FILE}
#echo "color_sel_fg=${TXTCOLOR} 100" >> ${CONFIG_FILE}
#echo "color_title_fg=${TXTCOLOR} 60" >> ${CONFIG_FILE}
#SELBG=$(pastel darken 0.1 ${WINCLR}|pastel format hex)
#echo "color_sel_bg=${SELBG} 80" >> ${CONFIG_FILE}
#echo "color_title_bg=${SELBG} 30" >> ${CONFIG_FILE}
#echo "color_title_border=${SELBG} 60" >> ${CONFIG_FILE}
#else #bg is light
#TXTCOLOR_NORM="#333333"
#echo "color_norm_fg=${TXTCOLOR_NORM} 100" >> ${CONFIG_FILE}
#echo "color_sel_fg=${TXTCOLOR} 100" >> ${CONFIG_FILE}
#echo "color_title_fg=${TXTCOLOR} 90" >> ${CONFIG_FILE}
#SELBG=$(pastel darken 0.1 ${WINCLR}|pastel format hex)
#echo "color_sel_bg=${SELBG} 80" >> ${CONFIG_FILE}
#echo "color_title_bg=${SELBG} 90" >> ${CONFIG_FILE}
#echo "color_title_border=${SELBG} 90" >> ${CONFIG_FILE}
#fi
#echo "color_menu_bg=${WINCLR} 90" >> ${CONFIG_FILE}
#echo "color_menu_border=${CLR} 60" >> ${CONFIG_FILE}
#echo "menu_border=1" >> ${CONFIG_FILE}
#echo "menu_radius=0" >> ${CONFIG_FILE}
#echo "color_sep_fg=${CLR} 10" >> ${CONFIG_FILE}
#echo "font=${FONT} 10" >> ${CONFIG_FILE}
#echo "sub_spacing=3" >> ${CONFIG_FILE}
#echo "menu_margin_x=3" >> ${CONFIG_FILE}
#echo "menu_margin_y=3" >> ${CONFIG_FILE}
#notify-send.sh "CFG" "$(cat $CONFIG_FILE)"
echo "tabs = 170" >>${CONFIG_FILE}
case "$LANG" in
pl*)
CUSTOM_COMMANDS_SEP="Własne polecenia"

View File

@ -1,6 +1,23 @@
#/bin/bash
#!/bin/bash
# pcmanfm based wallpaper chooser
# simple command for now
pcmanfm -n /usr/share/backgrounds ~/wallpapers
CNF_FILE="$HOME/.config/mabox/wallp_dirs.conf"
if [ ! -f $CNF_FILE ]; then
cat <<EOF > ${CNF_FILE}
# User wallpapers directories - one per line
# Used by "Choose wallpaper" PCmanFM wrapper
# Set wallpapers using context (right click) menu in file manager
~/wallpapers/
EOF
fi
#System wallpaper dirs
syswpdirs+=("/usr/share/backgrounds")
if [ -d "/usr/share/backgrounds/tiled" ]; then
syswpdirs+=("/usr/share/backgrounds/tiled")
fi
readarray -t wpdirs < <(grep "^[^#]" "${CNF_FILE}")
pcmanfm -n $(echo ${syswpdirs[@]} ${wpdirs[@]})

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Choose wallpaper
Name[pl]=Wybierz tapetę
Comment=
Keywords=
StartupNotify=false
Icon=preferences-desktop-wallpaper
Exec=pcmanwp
Categories=Settings;
#NoDisplay=true