more updates

This commit is contained in:
Daniel Napora 2023-05-19 00:17:14 +02:00
parent 155d3d8f5e
commit 4fdc3c51b2
3 changed files with 113 additions and 31 deletions

View File

@ -84,26 +84,16 @@ out+=("<big>󱇙</big> $ABOUT,notify-send.sh -u critical -i mbcc '$title' '$he
out+=("<big>󰕰</big> $SHOW_IMGHELPER,drawgrid") out+=("<big>󰕰</big> $SHOW_IMGHELPER,drawgrid")
out+=("<big>󰋁</big> $QUICK_TILE,yhtml /usr/share/mabox/help/Quick_tiling.html 'Mabox Quick tiling trainer - Ctrl + Shift + click'") out+=("<big>󰋁</big> $QUICK_TILE,yhtml /usr/share/mabox/help/Quick_tiling.html 'Mabox Quick tiling trainer - Ctrl + Shift + click'")
out+=("^sep($CONFIGURATION)") out+=("^sep($CONFIGURATION)")
#out+=("$LCOLUMNS [ <b>$COL</b> ],^checkout(columns)")
#out+=("$LROWS [ <b>$ROWS</b> ],^checkout(rows)")
out+=("$LGAP [ <b>$GAP</b> ],^checkout(gap)")
out+=("$OUTER_GAP [ <b>$show_outer_gap</b> ],^checkout(outer)")
out+=("$NOTIFY [ <b>$notifications</b> ],^checkout(notify)")
out+=("^sep()")
out+=("$EDITCONF,xdg-open $CONFIG_FILE")
#out2+=("^tag(columns)") out+=("$LGAP [ <b>$GAP</b> ],^checkout(gap)")
#for i in 8 12 16 24 32; do out2+=("$(printf "<tt>%3s</tt>,%s" "$i" "mb-setvar columns=${i} $CONFIG_FILE;$me")");done [[ "$show_outer_gap" == "true" ]] && out+=("<big></big> $OUTER_GAP,mb-setvar show_outer_gap=false $CONFIG_FILE;$me") || out+=("<big></big> $OUTER_GAP,mb-setvar show_outer_gap=true $CONFIG_FILE;$me")
#out2+=("^tag(rows)") [[ "$notifications" == "true" ]] && out+=("<big></big> $NOTIFY,mb-setvar notifications=false $CONFIG_FILE;$me") || out+=("<big></big> $NOTIFY,mb-setvar notifications=true $CONFIG_FILE;$me")
#for i in 6 8 12 16 24; do out2+=("$(printf "<tt>%3s</tt>,%s" "$i" "mb-setvar rows=${i} $CONFIG_FILE;$me")");done
out+=("^sep()")
out+=("<big></big> $EDITCONF,xdg-open $CONFIG_FILE")
out2+=("^tag(gap)") out2+=("^tag(gap)")
for i in 0 4 8 10 16 20 24 32 40; do out2+=("$(printf "<tt>%3s</tt>,%s" "$i" "mb-setvar gap=${i} $CONFIG_FILE;$me")");done for i in 0 4 8 10 16 20 24 32 40; do out2+=("$(printf "<tt>%3s</tt>,%s" "$i" "mb-setvar gap=${i} $CONFIG_FILE;$me")");done
out2+=("^tag(outer)")
out2+=("$(printf "<tt>%3s</tt>,%s" "true" "mb-setvar show_outer_gap=true $CONFIG_FILE;$me")")
out2+=("$(printf "<tt>%3s</tt>,%s" "false" "mb-setvar show_outer_gap=false $CONFIG_FILE;$me")")
out2+=("^tag(notify)")
out2+=("$(printf "<tt>%3s</tt>,%s" "true" "mb-setvar notifications=true $CONFIG_FILE;$me")")
out2+=("$(printf "<tt>%3s</tt>,%s" "false" "mb-setvar notifications=false $CONFIG_FILE;$me")")
### RUN ### RUN
if [[ "$1" == "-s" ]]; then if [[ "$1" == "-s" ]]; then
@ -134,7 +124,6 @@ mkconfigfile
cat <<EOF > ${MENU_ITEMS} cat <<EOF > ${MENU_ITEMS}
$(printf '%s\n' "${out[@]}") $(printf '%s\n' "${out[@]}")
. ~/.config/mabox/jgdeskgrid.csv
$(printf '%s\n' "${out2[@]}") $(printf '%s\n' "${out2[@]}")
EOF EOF
@ -143,7 +132,6 @@ jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
exit 0 exit 0
fi fi
printf '%s\n' "${out[@]}" printf '%s\n' "${out[@]}"
cat ~/.config/mabox/jgdeskgrid.csv
if [[ $1 == "-r" ]]; then if [[ $1 == "-r" ]]; then
printf '%s\n' "^sep()" printf '%s\n' "^sep()"

View File

@ -1,7 +1,8 @@
#!/bin/bash #!/bin/bash
# jgdesktops # jgdesktops
# #
COLORIZER_CONF="$HOME/.config/colorizer/colorizer.conf"
source ${COLORIZER_CONF}
me="jgdesktops -s" me="jgdesktops -s"
case $LANG in case $LANG in
@ -32,12 +33,26 @@ case $LANG in
MCORNERS="<b>Krawędzie ekranu</b>" MCORNERS="<b>Krawędzie ekranu</b>"
RUNNING="(uruchomiona)" RUNNING="(uruchomiona)"
STOPPED="(zatrzymana)" STOPPED="(zatrzymana)"
MOUSE_DESK_ACTIONS="Akcje myszy na pulpicie" WMTWEAKS="Ulepszenia Menadżera Okien"
SHOW_DESK="Pokaż pulpit - lewy klik" SHOW_DESK="Pokaż pulpit - lewy klik"
SWITCH_DESK="Zmień pulpit - kółko myszy" SWITCH_DESK="Zmień pulpit - kółko myszy"
FOCUS="Fokus podąża za myszą" FOCUS="Fokus podąża za myszą"
WALLPAPER="Tapeta" WALLPAPER="Tapeta"
TOOLS="Narzędzia" TOOLS="Narzędzia"
OBTHEME="Motyw Openbox"
MENUPANELS="Menu i Panele"
AUTOGEN_THEMES="Autogenerowanie motywów?"
GENERATETHEMES="Generować motywy po zmianie tapety?"
GENOB="Pokolorować Dekoracje Okien?"
GENMENU="Pokolorować menu i panele?"
GENCONKY="Pokolorować Conky?"
GENPYRADIO="Pokolorować PyRadio?"
YES="Tak"
NO="Nie"
YESC="<b>Tak</b> <i>(kliknij aby wyłączyć)</i>"
NOC="<b>Nie</b> <i>(kliknij aby włączyć)</i>"
LIGHTBG="<b>light</b> - jasne tło"
DARKBG="<b>dark</b> - ciemne tło"
;; ;;
es*) es*)
REMOVE="Eliminar este menú del panel" REMOVE="Eliminar este menú del panel"
@ -66,12 +81,26 @@ case $LANG in
MCORNERS="<b>Screen Edges</b> - hot corners" MCORNERS="<b>Screen Edges</b> - hot corners"
RUNNING="(running)" RUNNING="(running)"
STOPPED="(stopped)" STOPPED="(stopped)"
MOUSE_DESK_ACTIONS="Mouse on Desktop Actions" WMTWEAKS="Window Manager tweaks"
SHOW_DESK="Show Desktop on left click" SHOW_DESK="Show Desktop on left click"
SWITCH_DESK="Switch Desktop on mousewheel up/down" SWITCH_DESK="Switch Desktop on mousewheel up/down"
FOCUS="Focus follow Mouse" FOCUS="Focus follow Mouse"
WALLPAPER="Wallpaper" WALLPAPER="Wallpaper"
TOOLS="Tools" TOOLS="Tools"
OBTHEME="Openbox Theme"
MENUPANELS="Menus/Panels"
AUTOGEN_THEMES="<b>Auto theming</b> - based on wallp colors"
GENERATETHEMES="Generate themes on wallpaper change?"
GENOB="Colorize Window Decorations?"
GENMENU="Colorize Menus and Panels?"
GENCONKY="Colorize Conky?"
GENPYRADIO="Colorize PyRadio?"
YES="Yes"
NO="No"
YESC="<b>Yes</b> <i>(click to disable)</i>"
NOC="<b>No</b> <i>(click to enable)</i>"
LIGHTBG="with <b>light</b> background"
DARKBG="with <b>dark</b> background"
;; ;;
*) *)
REMOVE="Remove this menu from panel" REMOVE="Remove this menu from panel"
@ -100,12 +129,27 @@ case $LANG in
MCORNERS="<b>Screen Edges</b> - hot corners" MCORNERS="<b>Screen Edges</b> - hot corners"
RUNNING="(running)" RUNNING="(running)"
STOPPED="(stopped)" STOPPED="(stopped)"
MOUSE_DESK_ACTIONS="Mouse on Desktop Actions" WMTWEAKS="Window Manager tweaks"
SHOW_DESK="Show Desktop on left click" SHOW_DESK="Show Desktop on left click"
SWITCH_DESK="Switch Desktop on mousewheel up/down" SWITCH_DESK="Switch Desktop on mousewheel up/down"
FOCUS="Focus follow Mouse" FOCUS="Focus follow Mouse"
WALLPAPER="Wallpaper" WALLPAPER="Wallpaper"
TOOLS="Tools" TOOLS="Tools"
COLORIZER_SETTINGS="Colorizer Settings"
OBTHEME="Openbox Theme"
MENUPANELS="Menus/Panels"
AUTOGEN_THEMES="<b>Auto theming</b> - based on wallp colors"
GENERATETHEMES="Generate themes on wallpaper change?"
GENOB="Colorize Window Decorations?"
GENMENU="Colorize Menus and Panels?"
GENCONKY="Colorize Conky?"
GENPYRADIO="Colorize PyRadio?"
YES="Yes"
NO="No"
YESC="<b>Yes</b> <i>(click to disable)</i>"
NOC="<b>No</b> <i>(click to enable)</i>"
LIGHTBG="with <b>light</b> background"
DARKBG="with <b>dark</b> background"
;; ;;
esac esac
@ -186,7 +230,7 @@ if command -v mcorners &> /dev/null;then
if [[ -f /tmp/mcorners.lck ]]; then if [[ -f /tmp/mcorners.lck ]]; then
out+=("<big>󰄲</big> $MCORNERS <i>$RUNNING</i>,mcorners --stop;$me") out+=("<big>󰄲</big> $MCORNERS <i>$RUNNING</i>,mcorners --stop;$me")
else else
out+=("<big>󰄱</big> $MCORNERS <i>$STOPPED</i>,mcorners -tl 'colorizer -s' -l 'mb-jgtools places' -t mabox-terminal -tr 'mb-music -s' -bl 'colorizer-menus -s' -b 'mb-fetch' -br 'skippy-xd-fix' -r 'mb-jgtools right' -iof;$me") out+=("<big>󰄱</big> $MCORNERS <i>$STOPPED</i>,mcorners -tl 'jgdesktops -s' -l 'mb-jgtools places' -tr 'mb-music -s' -bl 'colorizer -s' -br 'skippy-xd-fix' -r 'mb-jgtools right' -iof;$me")
fi fi
fi fi
if command -v cortilectl &> /dev/null;then if command -v cortilectl &> /dev/null;then
@ -196,13 +240,14 @@ if command -v cortilectl &> /dev/null;then
out+=("<big>󰄱</big> $CORTILE <i>$STOPPED</i>,cortilectl start;$me") out+=("<big>󰄱</big> $CORTILE <i>$STOPPED</i>,cortilectl start;$me")
fi fi
fi fi
[[ "$wall2themes" = "yes" ]] && out+=("<big></big> $AUTOGEN_THEMES,^checkout(colsettings)") || out+=("<big></big> $AUTOGEN_THEMES,^checkout(colsettings)")
# DESKTOP MOUSE ACTIONS # DESKTOP MOUSE ACTIONS
lclick=$(xml sel -N a=http://openbox.org/3.4/rc -t -v '/a:openbox_config/a:mouse/a:context[@name="Root"]/a:mousebind[@action="Press"][@button="Left"]/a:action/@name' $HOME/.config/openbox/rc.xml) lclick=$(xml sel -N a=http://openbox.org/3.4/rc -t -v '/a:openbox_config/a:mouse/a:context[@name="Root"]/a:mousebind[@action="Press"][@button="Left"]/a:action/@name' $HOME/.config/openbox/rc.xml)
mousewheel=$(xml sel -N a=http://openbox.org/3.4/rc -t -v '/a:openbox_config/a:mouse/a:context[@name="Root"]/a:mousebind[@action="Click"][@button="Up"]/a:action/a:to' $HOME/.config/openbox/rc.xml) mousewheel=$(xml sel -N a=http://openbox.org/3.4/rc -t -v '/a:openbox_config/a:mouse/a:context[@name="Root"]/a:mousebind[@action="Click"][@button="Up"]/a:action/a:to' $HOME/.config/openbox/rc.xml)
focus=$(xml sel -N a=http://openbox.org/3.4/rc -t -v '/a:openbox_config/a:focus/a:followMouse' $HOME/.config/openbox/rc.xml) focus=$(xml sel -N a=http://openbox.org/3.4/rc -t -v '/a:openbox_config/a:focus/a:followMouse' $HOME/.config/openbox/rc.xml)
out+=("^sep($MOUSE_DESK_ACTIONS)") out+=("^sep($WMTWEAKS)")
if [[ ! -z "$lclick" ]];then if [[ ! -z "$lclick" ]];then
[[ "$lclick" = "none" ]] && out+=("<big>󰄱</big> $SHOW_DESK,obxml show_desk on") || out+=("<big>󰄲</big> $SHOW_DESK,obxml show_desk off") [[ "$lclick" = "none" ]] && out+=("<big>󰄱</big> $SHOW_DESK,obxml show_desk on") || out+=("<big>󰄲</big> $SHOW_DESK,obxml show_desk off")
fi fi
@ -211,7 +256,54 @@ if [[ ! -z "$mousewheel" ]];then
fi fi
[[ "$focus" = "no" ]] && out+=("<big>󰄱</big> $FOCUS,obxml focus_follow_mouse on") || out+=("<big>󰄲</big> $FOCUS,obxml focus_follow_mouse off") [[ "$focus" = "no" ]] && out+=("<big>󰄱</big> $FOCUS,obxml focus_follow_mouse on") || out+=("<big>󰄲</big> $FOCUS,obxml focus_follow_mouse off")
out+=(". ~/.config/mabox/jgdesktops-bottom.csv") out+=("^sep($TOOLS)")
out+=("<big>󰸉</big> $WALLCHANGER,^pipe(jgwallpaperchanger)")
out+=("<big>󱇙</big> $DESKGRID,^pipe(jgdeskgrid)")
out+=("<big></big> $DESKMNGR,^pipe(jgdeskmngr)")
# COLORIZER_CONF SUBMENU
out2+=("^tag(colsettings)")
out2+=("^sep($GENERATETHEMES)")
[[ "$wall2themes" = "yes" ]] && out2+=("<big></big> $YESC,mb-setvar wall2themes=no $COLORIZER_CONF;$me") || out2+=("<big></big> $NOC,mb-setvar wall2themes=yes $COLORIZER_CONF;$me")
out2+=("^sep()")
out2+=("$OBTHEME [ <b>${wall2themes_ob}</b> ],^checkout(ob)")
out3+=("^tag(ob)")
out3+=("^sep($GENOB)")
out3+=("$NO,mb-setvar wall2themes_ob=none $COLORIZER_CONF;$me")
out3+=("^sep()")
out3+=("$LIGHTBG,mb-setvar wall2themes_ob=light $COLORIZER_CONF;$me")
out3+=("$DARKBG,mb-setvar wall2themes_ob=dark $COLORIZER_CONF;$me")
out2+=("$MENUPANELS [ <b>${wall2themes_menu}</b> ],^checkout(mp)")
out3+=("^tag(mp)")
out3+=("^sep($GENMENU)")
out3+=("$NO,mb-setvar wall2themes_menu=none $COLORIZER_CONF;$me")
out3+=("^sep()")
out3+=("$LIGHTBG,mb-setvar wall2themes_menu=light $COLORIZER_CONF;$me")
out3+=("$DARKBG,mb-setvar wall2themes_menu=dark $COLORIZER_CONF;$me")
out2+=("Conky [ <b>${wall2themes_conky}</b> ],^checkout(conky)")
out3+=("^tag(conky)")
out3+=("^sep($GENCONKY)")
out3+=("$NO,mb-setvar wall2themes_conky=none $COLORIZER_CONF;$me")
out3+=("^sep()")
out3+=("$LIGHTBG,mb-setvar wall2themes_conky=light $COLORIZER_CONF;$me")
out3+=("$DARKBG,mb-setvar wall2themes_conky=dark $COLORIZER_CONF;$me")
out2+=("PyRadio [ <b>${wall2themes_pyradio}</b> ],^checkout(pyradio)")
out3+=("^tag(pyradio)")
out3+=("^sep($GENPYRADIO)")
out3+=("$NO,mb-setvar wall2themes_pyradio=none $COLORIZER_CONF;$me")
out3+=("^sep()")
out3+=("$LIGHTBG,mb-setvar wall2themes_pyradio=light $COLORIZER_CONF;$me")
out3+=("$DARKBG,mb-setvar wall2themes_pyradio=dark $COLORIZER_CONF;$me")
#out+=(". ~/.config/mabox/jgdesktops-bottom.csv")
### RUN ### RUN
@ -246,6 +338,7 @@ mkconfigfile
cat <<EOF > ${MENU_ITEMS} cat <<EOF > ${MENU_ITEMS}
$(printf '%s\n' "${out[@]}") $(printf '%s\n' "${out[@]}")
$(printf '%s\n' "${out2[@]}") $(printf '%s\n' "${out2[@]}")
$(printf '%s\n' "${out3[@]}")
EOF EOF
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
@ -260,3 +353,4 @@ printf '%s\n' "^sep()"
printf '%s\n' "<i>$REMOVE</i>,mb-setvar places_jgdesktops=false;mb-jgtools places" printf '%s\n' "<i>$REMOVE</i>,mb-setvar places_jgdesktops=false;mb-jgtools places"
fi fi
printf '%s\n' "${out2[@]}" printf '%s\n' "${out2[@]}"
printf '%s\n' "${out3[@]}"

View File

@ -70,7 +70,7 @@ else
me="${0##*/} ${1:--s}" me="${0##*/} ${1:--s}"
fi fi
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 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"
#out+=("^sep($TITLE)") #out+=("^sep($TITLE)")
out+=("^sep($WALLPAPERS)") out+=("^sep($WALLPAPERS)")
@ -78,7 +78,7 @@ if ! pgrep mbwallpaper > /dev/null; then
#out+=("$NITROGEN,nitrogen") #out+=("$NITROGEN,nitrogen")
out+=("<big>󰇎</big> $RANDWALL,mbwallpaper -o;$me") out+=("<big>󰇎</big> $RANDWALL,mbwallpaper -o;$me")
out+=("<big>󰉔</big> $CHOOSE,pcmanwp") out+=("<big>󰉔</big> $CHOOSE,pcmanwp")
out+=("$GENERATOR,^pipe(jgwallpapergenerate)") #out+=("$GENERATOR,^pipe(jgwallpapergenerate)")
out+=("^sep(<i>$SLIDESHOW</i>)") out+=("^sep(<i>$SLIDESHOW</i>)")
out+=("$STARTS,run_wallpaperslideshow;$me") out+=("$STARTS,run_wallpaperslideshow;$me")
else else
@ -90,9 +90,9 @@ out+=("^sep()")
out+=("\"\"\"$WALLDIR: <small>[ <b>$wallpaper_dir</b> ]</small>\"\"\",xdg-open $CONFIG_FILE") out+=("\"\"\"$WALLDIR: <small>[ <b>$wallpaper_dir</b> ]</small>\"\"\",xdg-open $CONFIG_FILE")
out+=("$INTERVAL [ <b>$interval</b> ] <small>($SEC)</small>,^checkout(interval)") out+=("$INTERVAL [ <b>$interval</b> ] <small>($SEC)</small>,^checkout(interval)")
out+=("^sep()") out+=("^sep()")
out+=("$EDITCONF ,xdg-open $CONFIG_FILE") out+=("<big></big> $EDITCONF ,xdg-open $CONFIG_FILE")
out+=("$OPENDIR,pcmanfm -n $wallpaper_dir") out+=("<big></big> $OPENDIR,pcmanfm -n $wallpaper_dir")
out+=("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'\"\"\"") out+=("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'\"\"\"")
out2+=("^tag(interval)") out2+=("^tag(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} $CONFIG_FILE;$me")");done 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} $CONFIG_FILE;$me")");done