wallmenu update
This commit is contained in:
parent
9767eee0d6
commit
24b72a7d45
@ -30,6 +30,9 @@ fi
|
||||
|
||||
# read config variables from file
|
||||
source <(grep = $CONF_FILE)
|
||||
wallpaper_dir2=${wallpaper_dir/$HOME/\~}
|
||||
#notify-send.sh "Wallpaper Dir" "${wallpaper_dir}"
|
||||
|
||||
|
||||
COLORIZER_CONF="$HOME/.config/colorizer/colorizer.conf"
|
||||
source ${COLORIZER_CONF}
|
||||
@ -50,8 +53,11 @@ lclick(){
|
||||
case $t2_button_lclick_action in
|
||||
random) mbwallpaper -o;;
|
||||
choose) pcmanwp;;
|
||||
preview) mbwallpaper -c;;
|
||||
menu) jgwallpaperchanger ipc;;
|
||||
slideshow) run_wallpaperslideshow;;
|
||||
window) ycolorizer;;
|
||||
menu) colorizer -s;;
|
||||
colmenu) colorizer -s;;
|
||||
esac
|
||||
}
|
||||
|
||||
@ -66,7 +72,8 @@ case $LANG in
|
||||
EDIT_WPDIRS="Edytuj katalogi z tapetami"
|
||||
GENERATOR="Generuj (ImageMagick)..."
|
||||
CHOOSE_WP="Wybierz tapetę..."
|
||||
SLIDESHOW="Pokaz slajdów"
|
||||
SLIDESHOW_DESC="Pokaz slajdów"
|
||||
SLIDESHOW="pokaz slajdów"
|
||||
STARTS="Uruchom Pokaz slajdów <small>(<i>zatrzymany</i>)</small>"
|
||||
STOPS="Zatrzymaj Pokaz slajdów <small>(<i>działający - interwał: $interval sek.</i>)</small>"
|
||||
CONF="Konfiguracja"
|
||||
@ -89,10 +96,14 @@ case $LANG in
|
||||
B_LC_ACTION="Akcja przycisku (lewy klik)"
|
||||
RAND="losuj"
|
||||
CHOOSE="wybierz"
|
||||
WALL_MENU="menu tapet"
|
||||
WALL_MENU_DESC="Menu Tapet"
|
||||
PREVIEW="podgląd"
|
||||
COL_WINDOW="okno"
|
||||
COL_MENU="menu"
|
||||
RANDOM_DESC="Ustaw <b>losową</b> tapetę"
|
||||
CHOOSE_DESC="<b>Wybierz</b> tapetę (z menu kontekstowego)"
|
||||
PREVIEW_DESC="<b>Podgląd</b> <i>use</i> <span bgcolor='#333333' color='#d3d3d3'> <small></small> </span> <span bgcolor='#333333' color='#d3d3d3'> <small></small> </span> <span bgcolor='#333333' color='#d3d3d3'> <small>Enter</small> </span> <span bgcolor='#333333' color='#d3d3d3'> <small>Esc</small> </span>"
|
||||
COL_WINDOW_DESC="Colorizer - <b>okno</b>"
|
||||
COL_MENU_DESC="Colorizer - dynamiczne <b>menu</b>"
|
||||
;;
|
||||
@ -104,12 +115,13 @@ case $LANG in
|
||||
EDIT_WPDIRS="Edit Wallpaper dirs"
|
||||
GENERATOR="Generate (ImageMagick)..."
|
||||
CHOOSE_WP="Choose Wallpaper <small>(from context menu)</small>"
|
||||
SLIDESHOW="Slideshow"
|
||||
SLIDESHOW_DESC="Wallpaper Slideshow"
|
||||
SLIDESHOW="slideshow"
|
||||
STARTS="Start Slideshow <small>(<i>stopped</i>)</small>"
|
||||
STOPS="Stop Slideshow <small>(<i>running - interval: $interval sec.</i>)</small>"
|
||||
CONF="Configuration"
|
||||
WALLDIR="Images dir"
|
||||
INTERVAL="Slideshow Interval"
|
||||
INTERVAL="Interval"
|
||||
SEC="seconds"
|
||||
EDITCONF="Edit config file"
|
||||
OPENDIR="Open wallpaper directory"
|
||||
@ -124,13 +136,17 @@ case $LANG in
|
||||
COLORIZER_CONKY="<b>Conky</b> module"
|
||||
COLORIZER_PYRADIO="<b>PyRadio</b> module"
|
||||
COLORIZER_CAVA="<b>Cava</b> module"
|
||||
B_LC_ACTION="Button <i>left-click</i> action"
|
||||
B_LC_ACTION="<i>left-click</i> action"
|
||||
RAND="random"
|
||||
CHOOSE="choose"
|
||||
WALL_MENU="wallmenu"
|
||||
WALL_MENU_DESC="Wallpaper Menu"
|
||||
PREVIEW="preview and set"
|
||||
COL_WINDOW="window"
|
||||
COL_MENU="menu"
|
||||
RANDOM_DESC="Set <b>random</b> wallpaper"
|
||||
CHOOSE_DESC="<b>Choose</b> wallpaper (<i>from context menu</i>)"
|
||||
PREVIEW_DESC="Preview & set <i>use</i> <span bgcolor='#333333' color='#d3d3d3'> <small></small> </span> <span bgcolor='#333333' color='#d3d3d3'> <small></small> </span> <span bgcolor='#333333' color='#d3d3d3'> <small>Enter</small> </span> <span bgcolor='#333333' color='#d3d3d3'> <small>Esc</small> </span>"
|
||||
COL_WINDOW_DESC="Colorizer - <b>window</b>"
|
||||
COL_MENU_DESC="Colorizer - dynamic <b>menu</b>"
|
||||
;;
|
||||
@ -140,18 +156,36 @@ esac
|
||||
|
||||
|
||||
|
||||
help="\nBased on Mabox forum member Shwaybo <a href='https://forum.maboxlinux.org/t/chwp-desktop-wallpaper-changer/496'>idea</a>.\n\nchange wallpapers from a directory, never using the same picture twice until all the pictures have been shown, and rotating x number of seconds (configurable) before the next wallpaper change.\n"
|
||||
help="\nBased on <a href='https://forum.maboxlinux.org/t/chwp-desktop-wallpaper-changer/496'>idea</a> of Mabox forum member Shwaybo.\n\nchange wallpapers from a directory, never using the same picture twice until all the pictures have been shown, and rotating x number of seconds (configurable) before the next wallpaper change.\n"
|
||||
|
||||
#out+=("^sep($TITLE)")
|
||||
out+=("^sep($WALLPAPERS)")
|
||||
if ! pgrep mbwallpaper > /dev/null; then
|
||||
if ! pgrep -f "mbwallpaper -s" > /dev/null; then
|
||||
#out+=("$NITROGEN,nitrogen")
|
||||
out+=("<big></big> $RANDWALL,mbwallpaper -o;$me")
|
||||
out+=("<big></big> $CHOOSE_WP,pcmanwp")
|
||||
#out+=("$GENERATOR,^pipe(jgwallpapergenerate)")
|
||||
out+=("<big></big> $SLIDESHOW,^checkout(sshow)")
|
||||
out+=("^sep()")
|
||||
out+=("<big></big> $EDIT_WPDIRS,xdg-open $CNF_FILE")
|
||||
out+=("<big></big> $RANDWALL,mbwallpaper -o;$me")
|
||||
out+=("<big>易</big> $PREVIEW_DESC,mbwallpaper -c")
|
||||
#out+=("$GENERATOR,^pipe(jgwallpapergenerate)")
|
||||
out+=("<big></big> $SLIDESHOW_DESC,^checkout(sshow)")
|
||||
out+=("^sep()")
|
||||
out+=("<big></big> Wp dir [ <b>${wallpaper_dir2}</b> ],^checkout(wpdirs)")
|
||||
out2+=("^tag(wpdirs)")
|
||||
out2+=("^sep(Wallpaper dirs)")
|
||||
out2+=("^sep(<small><i>for <b>random</b>/<b>preview</b>/<b>slideshow</b> utils</i></small>)")
|
||||
|
||||
readarray -t wpdirs < <(grep -v '^\s*$\|^#\|^\s*\#' "$CNF_FILE")
|
||||
wpdirs=("/usr/share/backgrounds/" "${wpdirs[@]}")
|
||||
#notify-send.sh "DIRS" "${#wpdirs[@]}"
|
||||
|
||||
|
||||
for dir in "${wpdirs[@]}"
|
||||
do
|
||||
|
||||
[[ "$wallpaper_dir2" == "${dir}" ]] && out2+=("<big>綠</big> <b>${dir}</b>") || out2+=("<big>祿</big> ${dir},mbwallpaper changedir ${dir};$me")
|
||||
done
|
||||
out2+=("^sep()")
|
||||
out2+=("<big></big> $EDIT_WPDIRS,xdg-open $CNF_FILE")
|
||||
|
||||
|
||||
else
|
||||
@ -160,16 +194,16 @@ fi
|
||||
|
||||
|
||||
out1+=("^tag(sshow)")
|
||||
out1+=("^sep($SLIDESHOW)")
|
||||
out1+=("$STARTS,run_wallpaperslideshow;$me")
|
||||
out1+=("\"\"\"$WALLDIR: <small>[ <b>$wallpaper_dir</b> ]</small>\"\"\",xdg-open $CONF_FILE")
|
||||
out1+=("^sep($SLIDESHOW_DESC)")
|
||||
out1+=("$STARTS,run_wallpaperslideshow")
|
||||
out1+=("$INTERVAL [ <b>$interval</b> ] <small>($SEC)</small>,^checkout(interval)")
|
||||
out1+=("^sep()")
|
||||
out1+=("<big></big> $EDITCONF ,xdg-open $CONF_FILE")
|
||||
out1+=("<big></big> $OPENDIR,pcmanfm -n $wallpaper_dir")
|
||||
out1+=("About Slideshow,\"\"\"notify-send.sh -u critical -i mbcc 'Wallpaper Changer - rotate desktop wallpaper every n-seconds' \"$help\" -o 'Edit configuration file:geany ~/.config/mbwallpaper/mbwallpaper.conf'\"\"\"")
|
||||
#out1+=("<big></big> $EDITCONF ,xdg-open $CONF_FILE")
|
||||
#out1+=("<big></big> $OPENDIR,pcmanfm -n $wallpaper_dir")
|
||||
out1+=("About Slideshow,\"\"\"notify-send.sh -u critical -i mbcc 'Wallpaper Changer - rotate desktop wallpaper every n-seconds' \"$help\" \"\"\"")
|
||||
|
||||
out2+=("^tag(interval)")
|
||||
out2+=("^sep(interval)")
|
||||
for i in 3 5 10 30 60 120 300 600 1800 3600; do out2+=("$(printf "<tt> %4s</tt>,%s" "$i" "mb-setvar interval=${i} $CONF_FILE;$me")");done
|
||||
|
||||
|
||||
@ -185,7 +219,7 @@ case "$1" in
|
||||
-u) out+=(" ${arrow_string_left} Settings menu,mb-jgtools settings");;
|
||||
-d) POSITION_MODE=pointer;;
|
||||
ipc) POSITION_MODE=${1:-fixed}
|
||||
out+=("^sep(Colorizer)")
|
||||
out+=("^sep(Mabox Colorizer)")
|
||||
out+=("$COLORIZER_HELP,ycolorizer")
|
||||
out+=("$COLORIZER_ROOT,colorizer -s")
|
||||
out+=("^sep()")
|
||||
@ -203,18 +237,24 @@ case "$1" in
|
||||
case $t2_button_lclick_action in
|
||||
random) out+=("$B_LC_ACTION: <b>[ $RAND ]</b>,^checkout(laction)");;
|
||||
choose) out+=("$B_LC_ACTION: <b>[ $CHOOSE ]</b>,^checkout(laction)");;
|
||||
preview) out+=("$B_LC_ACTION: <b>[ $PREVIEW ]</b>,^checkout(laction)");;
|
||||
menu) out+=("$B_LC_ACTION: <b>[ $WALL_MENU ]</b>,^checkout(laction)");;
|
||||
slideshow) out+=("$B_LC_ACTION: <b>[ $SLIDESHOW ]</b>,^checkout(laction)");;
|
||||
window) out+=("$B_LC_ACTION: <b>[ $COL_WINDOW ]</b>,^checkout(laction)");;
|
||||
menu) out+=("$B_LC_ACTION: <b>[ $COL_MENU ]</b>,^checkout(laction)");;
|
||||
colmenu) out+=("$B_LC_ACTION: <b>[ $COL_MENU ]</b>,^checkout(laction)");;
|
||||
*) out+=("$B_LC_ACTION: <b>[ $CHOOSE ]</b>,^checkout(laction)");;
|
||||
esac
|
||||
|
||||
out2+=("^tag(laction)")
|
||||
out2+=("^sep(Panel button left-click action)")
|
||||
[[ "$t2_button_lclick_action" == "choose" ]] && out2+=("<big>綠</big> $CHOOSE_DESC") || out2+=("<big>祿</big> $CHOOSE_DESC,mb-setvar t2_button_lclick_action=choose $CONF_FILE")
|
||||
[[ "$t2_button_lclick_action" == "random" ]] && out2+=("<big>綠</big> $RANDOM_DESC") || out2+=("<big>祿</big> $RANDOM_DESC,mb-setvar t2_button_lclick_action=random $CONF_FILE")
|
||||
[[ "$t2_button_lclick_action" == "choose" ]] && out2+=("<big>綠</big> $CHOOSE_DESC") || out2+=("<big>祿</big> $CHOOSE_DESC,mb-setvar t2_button_lclick_action=choose $CONF_FILE")
|
||||
[[ "$t2_button_lclick_action" == "preview" ]] && out2+=("<big>綠</big> $PREVIEW_DESC") || out2+=("<big>祿</big> $PREVIEW_DESC,mb-setvar t2_button_lclick_action=preview $CONF_FILE")
|
||||
[[ "$t2_button_lclick_action" == "menu" ]] && out2+=("<big>綠</big> $WALL_MENU_DESC") || out2+=("<big>祿</big> $WALL_MENU_DESC,mb-setvar t2_button_lclick_action=menu $CONF_FILE")
|
||||
[[ "$t2_button_lclick_action" == "slideshow" ]] && out2+=("<big>綠</big> $SLIDESHOW_DESC") || out2+=("<big>祿</big> $SLIDESHOW_DESC,mb-setvar t2_button_lclick_action=slideshow $CONF_FILE")
|
||||
out2+=("^sep()")
|
||||
[[ "$t2_button_lclick_action" == "window" ]] && out2+=("<big>綠</big> $COL_WINDOW_DESC") || out2+=("<big>祿</big> $COL_WINDOW_DESC,mb-setvar t2_button_lclick_action=window $CONF_FILE")
|
||||
[[ "$t2_button_lclick_action" == "menu" ]] && out2+=("<big>綠</big> $COL_MENU_DESC") || out2+=("<big>祿</big> $COL_MENU_DESC,mb-setvar t2_button_lclick_action=menu $CONF_FILE")
|
||||
[[ "$t2_button_lclick_action" == "colmenu" ]] && out2+=("<big>綠</big> $COL_MENU_DESC") || out2+=("<big>祿</big> $COL_MENU_DESC,mb-setvar t2_button_lclick_action=colmenu $CONF_FILE")
|
||||
;;
|
||||
esac
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user