upd
This commit is contained in:
parent
f9e3a0973c
commit
b2a9ef9cd1
@ -22,7 +22,7 @@ case $LANG in
|
|||||||
CONKY_TOGGLE="Włącz/Wyłącz Conky"
|
CONKY_TOGGLE="Włącz/Wyłącz Conky"
|
||||||
PICOM_TOGGLE="Włącz/Wyłącz Picom"
|
PICOM_TOGGLE="Włącz/Wyłącz Picom"
|
||||||
DESKMNGR="Menadżer sesji pulpitowych"
|
DESKMNGR="Menadżer sesji pulpitowych"
|
||||||
WALLCHANGER="Tapeta"
|
WALLCHANGER="Tapetu oraz <b>stylizacja</b> pulpitu"
|
||||||
DESKGRID="Desktop Grid"
|
DESKGRID="Desktop Grid"
|
||||||
SCREEN_RES="Ustawienia ekranu"
|
SCREEN_RES="Ustawienia ekranu"
|
||||||
ENABLE="Włącz"
|
ENABLE="Włącz"
|
||||||
@ -62,7 +62,7 @@ case $LANG in
|
|||||||
CONKY_TOGGLE="Conky Toggle"
|
CONKY_TOGGLE="Conky Toggle"
|
||||||
PICOM_TOGGLE="Picom Toggle"
|
PICOM_TOGGLE="Picom Toggle"
|
||||||
DESKMNGR="Desktop session Manager"
|
DESKMNGR="Desktop session Manager"
|
||||||
WALLCHANGER="Wallpaper"
|
WALLCHANGER="Wallpaper & Desktop <b>styling</b>"
|
||||||
DESKGRID="Desktop Grid"
|
DESKGRID="Desktop Grid"
|
||||||
SCREEN_RES="Screen Settings"
|
SCREEN_RES="Screen Settings"
|
||||||
ENABLE="Enable"
|
ENABLE="Enable"
|
||||||
@ -102,7 +102,7 @@ case $LANG in
|
|||||||
DESKMNGR="Desktop session Manager"
|
DESKMNGR="Desktop session Manager"
|
||||||
CONKY_TOGGLE="Conky Toggle"
|
CONKY_TOGGLE="Conky Toggle"
|
||||||
PICOM_TOGGLE="Picom Toggle"
|
PICOM_TOGGLE="Picom Toggle"
|
||||||
WALLCHANGER="Wallpaper"
|
WALLCHANGER="Wallpaper & Desktop <b>styling</b>"
|
||||||
DESKGRID="Desktop Grid"
|
DESKGRID="Desktop Grid"
|
||||||
SCREEN_RES="Screen settings"
|
SCREEN_RES="Screen settings"
|
||||||
ENABLE="Enable"
|
ENABLE="Enable"
|
||||||
@ -239,8 +239,8 @@ 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+=("^sep($TOOLS)")
|
out+=("^sep($TOOLS)")
|
||||||
out+=("<big></big> $WALLCHANGER,^pipe(jgwallpaperchanger)")
|
out+=("<big></big> $WALLCHANGER,jgwallpaperchanger -s")
|
||||||
out+=("<big></big> SuperClick,^pipe(jgdeskgrid)")
|
out+=("<big></big> SuperClick,jgdeskgrid -s")
|
||||||
out+=("<big></big> $DESKMNGR,^pipe(jgdeskmngr)")
|
out+=("<big></big> $DESKMNGR,^pipe(jgdeskmngr)")
|
||||||
|
|
||||||
|
|
||||||
|
@ -392,42 +392,14 @@ out2+=("^tag(lineheight)")
|
|||||||
########## THEMES
|
########## THEMES
|
||||||
out+=("^sep(<i>$COLOR_SCHEME</i>)")
|
out+=("^sep(<i>$COLOR_SCHEME</i>)")
|
||||||
|
|
||||||
ob_file=$HOME/.config/openbox/rc.xml
|
out+=("$CHOOSE ,^checkout(motywy)")
|
||||||
[[ -f $ob_file ]] && wm_theme=$(awk '/<theme>/ {while (getline n) {if (match(n, /<name>/)){l=n; exit}}} END {split(l, a, "[<>]"); print a[3]}' "$ob_file")
|
out+=("$RANDTHEME,jgctl randomscheme;$me")
|
||||||
|
|
||||||
|
|
||||||
if [ $jgmenu_theme != obtheme ]; then #INNY NIŻ OB THEME
|
|
||||||
. $HOME/.config/mabox/jgobthemes/${jgmenu_theme}.colorrc > /dev/null 2>&1 &
|
|
||||||
out+=("$CHOOSE [<b>$jgmenu_theme</b>],^checkout(motywy)")
|
|
||||||
out+=("$EDIT_CURRENT: (<b>$jgmenu_theme</b>),xdg-open $HOME/.config/mabox/jgobthemes/$jgmenu_theme.colorrc,geany")
|
|
||||||
out+=("$RANDTHEME,mb-setvar jgmenu_theme=$(basename -s .colorrc $(ls ~/.config/mabox/jgobthemes/*.colorrc | shuf -n 1));$me")
|
|
||||||
out+=("<s>$FOLLOW_OB</s>,mb-setvar jgmenu_theme=obtheme;$me
|
|
||||||
^sep()")
|
|
||||||
out+=("$GRADIENT [ <b>${menu_gradient_pos:-none}</b> ],^checkout(gradient)")
|
|
||||||
out2+=("^tag(gradient)")
|
|
||||||
for i in none top right bottom left top_left top_right bottom_left bottom_right; do out2+=("$(printf "<tt>%14s</tt>,%s" "$i" "mb-setvar menu_gradient_pos=${i};$me")");done
|
|
||||||
out2+=("^tag(motywy)")
|
out2+=("^tag(motywy)")
|
||||||
else
|
|
||||||
|
|
||||||
. $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc > /dev/null 2>&1 &
|
for item in /usr/share/mb-jgtools/jgobthemes/*colorrc; do
|
||||||
out+=("#${menu_gradient_pos}\n")
|
|
||||||
out+=("$CHOOSE [<b>${wm_theme// /_}</b>],^checkout(motywy)")
|
|
||||||
out+=("$EDIT_CURRENT: (<b>${wm_theme// /_}</b>),xdg-open $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc,geany")
|
|
||||||
out+=("$RANDTHEME,mb-setvar jgmenu_theme=$(basename -s .colorrc $(ls ~/.config/mabox/jgobthemes/*.colorrc | shuf -n 1));$me")
|
|
||||||
out+=("$FOLLOW_OB,mb-setvar jgmenu_theme=obtheme;$me
|
|
||||||
^sep()")
|
|
||||||
out+=("$GRADIENT [ <b>${menu_gradient_pos:-none}</b> ],^checkout(gradient)")
|
|
||||||
out2+=("^tag(gradient)")
|
|
||||||
for i in none top right bottom left top_left top_right bottom_left bottom_right; do out2+=("$(printf "<tt>%14s</tt>,%s" "$i" "mb-setvar menu_gradient_pos=${i} $HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc;$me")");done
|
|
||||||
out2+=("^tag(motywy)")
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for item in "$HOME"/.config/mabox/jgobthemes/*colorrc; do
|
|
||||||
theme="${item##*/}"
|
theme="${item##*/}"
|
||||||
out2+=("${theme%.*},mb-setvar jgmenu_theme=${theme%.*};$me")
|
#notify-send.sh "th" "$item"
|
||||||
|
out2+=("${theme%.*},jgctl applyoldscheme ${item};$me")
|
||||||
done
|
done
|
||||||
|
|
||||||
########## ICONS
|
########## ICONS
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# jgwallpaperchanger - dynamic menu (or submenu) to configure/set wallpapers
|
# jgwallpaperchanger - dynamic menu (or submenu) to configure/set wallpapers
|
||||||
#
|
#
|
||||||
#TODO wallpaper colors on image
|
|
||||||
#TODO quickly colorize OB,Conky,menus from wp-colors + apply predefined schemes
|
#TODO quickly colorize OB,Conky,menus from wp-colors + apply predefined schemes
|
||||||
|
|
||||||
if [[ $1 == "-r" || "$1" == "-d" ]];then
|
if [[ $1 == "-r" || "$1" == "-d" ]];then
|
||||||
@ -14,6 +13,10 @@ CONFIG_DIR="$HOME/.config/mbwallpaper"
|
|||||||
CONF_FILE="$CONFIG_DIR/mbwallpaper.conf"
|
CONF_FILE="$CONFIG_DIR/mbwallpaper.conf"
|
||||||
WALLPAPERS_LIST="$CONFIG_DIR/wplist"
|
WALLPAPERS_LIST="$CONFIG_DIR/wplist"
|
||||||
|
|
||||||
|
## SYSTEM AND USER SAVED THEMES
|
||||||
|
OB_SYSTHEMES="/usr/share/mabox-colorizer/colorschemes/ob.csv"
|
||||||
|
OB_USERTHEMES="$HOME/.config/colorizer/openbox/userthemes.csv"
|
||||||
|
|
||||||
# Make config directory if not exist
|
# Make config directory if not exist
|
||||||
mkdir -p $CONFIG_DIR
|
mkdir -p $CONFIG_DIR
|
||||||
|
|
||||||
@ -34,7 +37,6 @@ source <(grep = $CONF_FILE)
|
|||||||
wallpaper_dir2=${wallpaper_dir/$HOME/\~}
|
wallpaper_dir2=${wallpaper_dir/$HOME/\~}
|
||||||
#notify-send.sh "Wallpaper Dir" "${wallpaper_dir}"
|
#notify-send.sh "Wallpaper Dir" "${wallpaper_dir}"
|
||||||
|
|
||||||
|
|
||||||
COLORIZER_CONF="$HOME/.config/colorizer/colorizer.conf"
|
COLORIZER_CONF="$HOME/.config/colorizer/colorizer.conf"
|
||||||
source ${COLORIZER_CONF}
|
source ${COLORIZER_CONF}
|
||||||
|
|
||||||
@ -66,7 +68,7 @@ esac
|
|||||||
main(){
|
main(){
|
||||||
case $LANG in
|
case $LANG in
|
||||||
pl*)
|
pl*)
|
||||||
_TITLE="Zmieniacz <b>tapet</b>"
|
_TITLE="Tapety oraz <b>stylizacja</b> pulpitu"
|
||||||
_WALLPAPERS="Tapety"
|
_WALLPAPERS="Tapety"
|
||||||
_RANDWALL="<b>Losowa</b> tapeta"
|
_RANDWALL="<b>Losowa</b> tapeta"
|
||||||
_EDIT_WPDIRS="Edytuj katalogi z tapetami"
|
_EDIT_WPDIRS="Edytuj katalogi z tapetami"
|
||||||
@ -94,7 +96,7 @@ case $LANG in
|
|||||||
_COLORIZER_PICOM="Kompozytor <b>Picom</b>"
|
_COLORIZER_PICOM="Kompozytor <b>Picom</b>"
|
||||||
_COLORIZER_OB="Moduł <b>Openbox</b>"
|
_COLORIZER_OB="Moduł <b>Openbox</b>"
|
||||||
_COLORIZER_MENU="Moduł <b>Menu</b>"
|
_COLORIZER_MENU="Moduł <b>Menu</b>"
|
||||||
_COLORIZER_CONKY="Moduł <b>Conky</b>"
|
_COLORIZER_CONKY="Menadżer <b>Conky</b>"
|
||||||
_COLORIZER_PYRADIO="Moduł <b>PyRadio</b>"
|
_COLORIZER_PYRADIO="Moduł <b>PyRadio</b>"
|
||||||
_COLORIZER_CAVA="Moduł <b>Cava</b>"
|
_COLORIZER_CAVA="Moduł <b>Cava</b>"
|
||||||
_B_LC_ACTION="Akcja (lewy klik)"
|
_B_LC_ACTION="Akcja (lewy klik)"
|
||||||
@ -111,9 +113,30 @@ case $LANG in
|
|||||||
_PREVIEW_DESC="<b>Podgląd</b> <i>użyj</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>"
|
_PREVIEW_DESC="<b>Podgląd</b> <i>użyj</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_WINDOW_DESC="Colorizer - <b>okno</b>"
|
||||||
_COL_MENU_DESC="Colorizer - dynamiczne <b>menu</b>"
|
_COL_MENU_DESC="Colorizer - dynamiczne <b>menu</b>"
|
||||||
|
|
||||||
|
_GOBACK="<i>powrót</i>"
|
||||||
|
|
||||||
|
SYSTEM_THEMES="Systemowe"
|
||||||
|
YOUR_THEMES="Moje motywy"
|
||||||
|
SAVE_CURRTHEME="Zapisz aktualną kobfigurację jako..."
|
||||||
|
OPEN_THEMEFILE="Odwórz plik z motywami w edytorze"
|
||||||
|
THEME="Motyw"
|
||||||
|
APPLY="Zastosuj"
|
||||||
|
APPLY_THEME="Pełny motyw (kolory, czcionki i rozmiar)"
|
||||||
|
APPLY_SCHEME="Tylko kolory"
|
||||||
|
DELETE="Usuń"
|
||||||
|
DELETE_THEME="Usuń motyw"
|
||||||
|
OBTHEME_LBL="Motyw OpenBox"
|
||||||
|
MONOCHROMATIC="Monochromatyczny"
|
||||||
|
CHOOSE_AND_PICK="Wybierz wariant i pobierz kolor..."
|
||||||
|
GENERATEFROMWP="Generuj z kolorów tapety..."
|
||||||
|
LIGHTBG=" Jasne tło"
|
||||||
|
DARKBG="Ciemne tło"
|
||||||
|
RANDOMIZE="Generuj losowo"
|
||||||
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
_TITLE="Wallpaper <b>Menu</b>"
|
_TITLE="Wallpaper & Desktop <b>styling</b>"
|
||||||
_WALLPAPERS="Wallpapers"
|
_WALLPAPERS="Wallpapers"
|
||||||
_RANDWALL="<b>Random</b> Wallpaper"
|
_RANDWALL="<b>Random</b> Wallpaper"
|
||||||
_EDIT_WPDIRS="Edit Wallpaper dirs"
|
_EDIT_WPDIRS="Edit Wallpaper dirs"
|
||||||
@ -135,15 +158,12 @@ case $LANG in
|
|||||||
_LEFTPANEL="Left panel"
|
_LEFTPANEL="Left panel"
|
||||||
_OBTHEME="Openbox Theme"
|
_OBTHEME="Openbox Theme"
|
||||||
_MENUPANELS="Menus/Panels"
|
_MENUPANELS="Menus/Panels"
|
||||||
|
_COLORIZER_CONKY="<b>Conky</b> Manager"
|
||||||
_COLORIZER_HELP="Main Window and Help"
|
_COLORIZER_HELP="Main Window and Help"
|
||||||
_COLORIZER_ROOT="<b>Colorizer</b> rootmenu"
|
_COLORIZER_ROOT="<b>Colorizer</b> rootmenu"
|
||||||
_COLORIZER_FONTS="Configure <b>Fonts</b>"
|
_COLORIZER_FONTS="Configure <b>Fonts</b>"
|
||||||
_COLORIZER_PICOM="<b>Compositor</b> settings <b>(Picom)</b>"
|
_COLORIZER_PICOM="<b>Compositor</b> settings <b>(Picom)</b>"
|
||||||
_COLORIZER_OB="<b>Openbox</b> module"
|
|
||||||
_COLORIZER_MENU="<b>Menus/SidePanels</b> module"
|
|
||||||
_COLORIZER_CONKY="<b>Conky</b> module"
|
|
||||||
_COLORIZER_PYRADIO="<b>PyRadio</b> module"
|
|
||||||
_COLORIZER_CAVA="<b>Cava</b> module"
|
|
||||||
_B_LC_ACTION="<i>left-click</i> action"
|
_B_LC_ACTION="<i>left-click</i> action"
|
||||||
_P_B_LC_ACTION="Panel button left-click action"
|
_P_B_LC_ACTION="Panel button left-click action"
|
||||||
_RAND="random"
|
_RAND="random"
|
||||||
@ -158,6 +178,25 @@ case $LANG in
|
|||||||
_PREVIEW_DESC="<b>Preview</b> & 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>"
|
_PREVIEW_DESC="<b>Preview</b> & 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_WINDOW_DESC="Colorizer - <b>window</b>"
|
||||||
_COL_MENU_DESC="Colorizer - dynamic <b>menu</b>"
|
_COL_MENU_DESC="Colorizer - dynamic <b>menu</b>"
|
||||||
|
|
||||||
|
_GOBACK="<i>go back</i>"
|
||||||
|
|
||||||
|
_CHANGE_THEME="Change theme"
|
||||||
|
_CLICK_TO_APPLY="<i>click to apply</i>"
|
||||||
|
SYSTEM_THEMES="System themes..."
|
||||||
|
YOUR_THEMES="Your themes..."
|
||||||
|
THEME="Theme"
|
||||||
|
_GENERATE="Generate..."
|
||||||
|
MONOCHROMATIC="Monochromatic <i>(pick color)</i>"
|
||||||
|
CHOOSE_AND_PICK="Choose variant and pick color..."
|
||||||
|
GENERATEFROMWP="...from wallpaper colors..."
|
||||||
|
LIGHTBG="light variant"
|
||||||
|
DARKBG="dark variant"
|
||||||
|
RANDOMIZE="Random"
|
||||||
|
_MORE_OPTIONS="<i>need more options?</i>"
|
||||||
|
_COLOR_TUNING="<i>color tuning?</i>"
|
||||||
|
_SAVE_OWN="<i>save/delete own themes?</i>"
|
||||||
|
_USE="<i>use...</i>"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -167,7 +206,7 @@ esac
|
|||||||
|
|
||||||
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"
|
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)")
|
||||||
[[ "$1" == "-s" || "$1" == "ipc" ]] && : || out+=("^sep($_WALLPAPERS)")
|
[[ "$1" == "-s" || "$1" == "ipc" ]] && : || out+=("^sep($_WALLPAPERS)")
|
||||||
if ! pgrep -f "mbwallpaper -s" > /dev/null; then
|
if ! pgrep -f "mbwallpaper -s" > /dev/null; then
|
||||||
#out+=("$NITROGEN,nitrogen")
|
#out+=("$NITROGEN,nitrogen")
|
||||||
@ -226,6 +265,167 @@ out2+=("^tag(interval)")
|
|||||||
out2+=("^sep($_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
|
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
|
||||||
|
|
||||||
|
#WALLPAPER and wallpaper colors
|
||||||
|
WALLPALDIR="$HOME/.cache/colorizer/palettes"
|
||||||
|
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | tail -1 | cut -d'=' -f2)
|
||||||
|
THUMBDIR="$HOME/.cache/colorizer/thumbs"
|
||||||
|
mkdir -p ${THUMBDIR}
|
||||||
|
NAME=${WALLPATH////_}
|
||||||
|
if [[ "${NAME}" =~ ^_home_.* ]]; then
|
||||||
|
n=${#HOME}
|
||||||
|
((n++))
|
||||||
|
NAME=${NAME:${n}}
|
||||||
|
fi
|
||||||
|
THUMB="${THUMBDIR}/${NAME}.png"
|
||||||
|
if [[ ! -f "$THUMB" ]]
|
||||||
|
then
|
||||||
|
magick convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
|
||||||
|
fi
|
||||||
|
# wp colors
|
||||||
|
if [ ! -f "$WALLPALDIR/$NAME.clr" ]; then
|
||||||
|
convert ${WALLPATH} -resize 25% -colors 16 -unique-colors txt:- |grep -v '^#'| awk '{print substr($3,1,7)}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$NAME.clr"
|
||||||
|
fi
|
||||||
|
mapfile -t w < "$WALLPALDIR/$NAME.clr"
|
||||||
|
if [[ "${#w[@]}" -lt 8 ]]; then
|
||||||
|
w+=("#2e3440" "#4c566a" "#5e81ac" "#bf616b" "#b48ead" "#a3be8c" "#ebcb8b" "#d8dee9" "#eceff4")
|
||||||
|
fi
|
||||||
|
|
||||||
|
### STYLES
|
||||||
|
out+=("^sep(Desktop styling)")
|
||||||
|
out+=("<big></big> <b>OpenBox</b> Windows Decoration,^root(obox)")
|
||||||
|
out+=("<big></big> Mabox <b>Menus</b>,^root(jgmenus)")
|
||||||
|
out+=("<big></big> <b>Conky</b> widgets,^root(conky)")
|
||||||
|
|
||||||
|
case "$2" in
|
||||||
|
obox)option="--checkout=obox";;
|
||||||
|
jgmenus)option="--checkout=jgmenus";;
|
||||||
|
conky)option="--checkout=conky";;
|
||||||
|
*)option="";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
## OPENBOX
|
||||||
|
out1+=("^tag(obox)")
|
||||||
|
out1+=("^sep(OpenBox Window Decorations)")
|
||||||
|
out1+=("${arrow_string_left} ${arrow_string_left} ${arrow_string_left} $_GOBACK,^back()")
|
||||||
|
|
||||||
|
out1+=("^sep($SYSTEM_THEMES)" "^sep()")
|
||||||
|
n=1
|
||||||
|
while IFS="|" read -r abg abgto afg aline nbg nbgto nfg nline grad txtjust pheight pwidth handle bord bevel buttons fsize fname ndslimc weight slant scheme_name
|
||||||
|
do
|
||||||
|
((n=n+1))
|
||||||
|
out1+=("<big><span bgcolor='${abg}' fgcolor='${afg}'><span bgcolor='${abgto}'> </span><small> <tt>$(printf '%-20s' "${scheme_name}")</tt> </small><span bgcolor='${abgto}'> </span></span> <span bgcolor='${nbgto}'> </span><span bgcolor='${nbg}' fgcolor='${nfg}'><small> <tt><i>in</i></tt> </small></span><span bgcolor='${nbgto}'> </span></big>,obtctl applytheme sys ${n};$me obox" "^sep()")
|
||||||
|
done < <(tail -n +2 "$OB_SYSTHEMES")
|
||||||
|
out1+=("^sep($YOUR_THEMES)" "^sep()")
|
||||||
|
n=1
|
||||||
|
while IFS="|" read -r abg abgto afg aline nbg nbgto nfg nline grad txtjust pheight pwidth handle bord bevel buttons fsize fname ndslimc weight slant scheme_name
|
||||||
|
do
|
||||||
|
((n=n+1))
|
||||||
|
out1+=("<big><span bgcolor='${abg}' fgcolor='${afg}'><span bgcolor='${abgto}'> </span><small> <tt>$(printf '%-20s' "${scheme_name}")</tt> </small><span bgcolor='${abgto}'> </span></span> <span bgcolor='${nbgto}'> </span><span bgcolor='${nbg}' fgcolor='${nfg}'><small> <tt><i>in</i></tt> </small></span><span bgcolor='${nbgto}'> </span></big>,obtctl applytheme usr ${n};$me obox" "^sep()")
|
||||||
|
done < <(tail -n +2 "$OB_USERTHEMES")
|
||||||
|
|
||||||
|
out1+=("^sep($_GENERATE)")
|
||||||
|
out1+=("<big></big> $RANDOMIZE,obtctl randomizer;$me obox")
|
||||||
|
out1+=("<big></big> $MONOCHROMATIC,^checkout(monoch)")
|
||||||
|
out2+=("^tag(monoch)")
|
||||||
|
out2+=("^sep(<i>$CHOOSE_AND_PICK</i>)")
|
||||||
|
out2+=("<big></big> $LIGHTBG...,obtctl mono pick light stylemenu")
|
||||||
|
out2+=("<big></big> $DARKBG...,obtctl mono pick dark stylemenu")
|
||||||
|
out1+=("^sep(<i>$GENERATEFROMWP</i>)" "^sep()")
|
||||||
|
out1+=("<big></big> <span bgcolor='${w[-2]}' fgcolor='#222222'> <span bgcolor='${w[-4]}'> </span> $LIGHTBG <span bgcolor='${w[-4]}'> </span> </span>,w2theme ob light;$me obox" "^sep()")
|
||||||
|
out1+=("<big></big> <span bgcolor='${w[2]}' fgcolor='#E5E5E5'> <span bgcolor='${w[4]}'> </span> $DARKBG <span bgcolor='${w[4]}'> </span> </span>,w2theme ob dark;$me obox")
|
||||||
|
out1+=("^sep()")
|
||||||
|
|
||||||
|
out1+=("^sep($_MORE_OPTIONS)")
|
||||||
|
out1+=("^sep($_COLOR_TUNING)" "^sep($_SAVE_OWN)")
|
||||||
|
out1+=("$_USE <b>Colorizer OpenBox</b>,colorizer-ob -s")
|
||||||
|
out1+=("^sep()")
|
||||||
|
out1+=("${arrow_string_left} ${arrow_string_left} ${arrow_string_left} $_GOBACK,^back()")
|
||||||
|
|
||||||
|
|
||||||
|
## JGMENUS
|
||||||
|
MENU_SYSSCHEMES="/usr/share/mabox-colorizer/colorschemes/menus.csv"
|
||||||
|
MENU_USERSCHEMES="$HOME/.config/colorizer/menus/userschemes2.csv"
|
||||||
|
JG_SYS_AMOUNT=$(cat $MENU_SYSSCHEMES |wc -l)
|
||||||
|
JG_USR_AMOUNT=$(cat $MENU_USERSCHEMES |wc -l)
|
||||||
|
out1+=("^tag(jgmenus)")
|
||||||
|
out1+=("^sep(Menu/Panels)")
|
||||||
|
out1+=("${arrow_string_left} ${arrow_string_left} ${arrow_string_left} $_GOBACK,^back()")
|
||||||
|
out1+=("^sep($_CHANGE_THEME)")
|
||||||
|
out1+=("<big></big> $SYSTEM_THEMES ($((JG_SYS_AMOUNT-1))),^checkout(jg_sys)")
|
||||||
|
out2+=("^tag(jg_sys)")
|
||||||
|
out2+=("^sep($_CLICK_TO_APPLY)")
|
||||||
|
|
||||||
|
n=1
|
||||||
|
while IFS="|" read -r mbg mbga mbgt mbgta mborder mbordera tbg tbga tfg tfga tborder tbordera normbg normbga nfg nfga sbg sbga sfg sfga sborder sbordera sepfg sepfga b r p ss ibor irad a al sephal grad scheme_name
|
||||||
|
do
|
||||||
|
((n=n+1))
|
||||||
|
case "$grad" in
|
||||||
|
none)icon="";;
|
||||||
|
top)icon="";;
|
||||||
|
right)icon="";;
|
||||||
|
bottom)icon="";;
|
||||||
|
left)icon="";;
|
||||||
|
top_left)icon="";;
|
||||||
|
top_right)icon="";;
|
||||||
|
bottom_left)icon="";;
|
||||||
|
bottom_right)icon="";;
|
||||||
|
esac
|
||||||
|
out2+=("<big><span bgcolor='${mbg}' fgcolor='${nfg}'> <tt><small>$(printf '%-18s' "${scheme_name}")</small></tt><span bgcolor='${tbg}' fgcolor='${tfg}'> <small><b>title</b></small> </span> <span bgcolor='${sbg}' fgcolor='${sfg}'> <small>[ sel ]</small> </span> <span bgcolor='${mbgt}'> <small>${icon}</small> </span></span></big>,jgctl applyscheme sys $n;$me jgmenus" "^sep()")
|
||||||
|
done < <(tail -n +2 "$MENU_SYSSCHEMES")
|
||||||
|
|
||||||
|
out1+=("<big></big> $YOUR_THEMES ($((JG_USR_AMOUNT-1))),^checkout(jg_usr)")
|
||||||
|
out2+=("^tag(jg_usr)")
|
||||||
|
out2+=("^sep($_CLICK_TO_APPLY)")
|
||||||
|
n=1
|
||||||
|
while IFS="|" read -r mbg mbga mbgt mbgta mborder mbordera tbg tbga tfg tfga tborder tbordera normbg normbga nfg nfga sbg sbga sfg sfga sborder sbordera sepfg sepfga b r p ss ibor irad a al sephal grad scheme_name
|
||||||
|
do
|
||||||
|
((n=n+1))
|
||||||
|
case "$grad" in
|
||||||
|
none)icon="";;
|
||||||
|
top)icon="";;
|
||||||
|
right)icon="";;
|
||||||
|
bottom)icon="";;
|
||||||
|
left)icon="";;
|
||||||
|
top_left)icon="";;
|
||||||
|
top_right)icon="";;
|
||||||
|
bottom_left)icon="";;
|
||||||
|
bottom_right)icon="";;
|
||||||
|
esac
|
||||||
|
out2+=("<big><span bgcolor='${mbg}' fgcolor='${nfg}'> <small><tt>$(printf '%-18s' "${scheme_name}")</tt></small><span bgcolor='${tbg}' bgalpha='${tbga}%' fgcolor='${tfg}'> <small><b>title</b></small> </span> <span bgcolor='${sbg}' bgalpha='${sbga}%' fgcolor='${sfg}'> <small>[ sel ]</small> </span> <span bgcolor='${mbgt}'> <small>${icon}</small> </span></span></big>,jgctl applyscheme usr ${n};$me jgmenus" "^sep()")
|
||||||
|
done < <(tail -n +2 "$MENU_USERSCHEMES")
|
||||||
|
|
||||||
|
out1+=("^sep($_GENERATE)")
|
||||||
|
out1+=("<big></big> $RANDOMIZE,jgctl randomscheme;$me jgmenus")
|
||||||
|
out1+=("<big></big> $MONOCHROMATIC,^checkout(monoch_menu)")
|
||||||
|
out2+=("^tag(monoch_menu)")
|
||||||
|
out2+=("^sep(<i>$CHOOSE_AND_PICK</i>)")
|
||||||
|
out2+=("<big></big> $LIGHTBG...,jgctl mono pick light stylemenu")
|
||||||
|
out2+=("<big></big> $DARKBG...,jgctl mono pick dark stylemenu")
|
||||||
|
out1+=("^sep($GENERATEFROMWP)")
|
||||||
|
out1+=("<big></big> <span bgcolor='${w[-3]}'> <span bgcolor='${w[-5]}'> <span bgcolor='${w[-1]}' fgcolor='${w[1]}'> </span> </span> </span> $LIGHTBG,w2theme menu light;$me jgmenus")
|
||||||
|
out1+=("<big></big> <span bgcolor='${w[1]}'> <span bgcolor='${w[4]}'> <span bgcolor='${w[2]}' fgcolor='${w[-2]}'> </span> </span> </span> $DARKBG,w2theme menu dark;$me jgmenus")
|
||||||
|
|
||||||
|
out1+=("^sep($_MORE_OPTIONS)")
|
||||||
|
out1+=("^sep($_COLOR_TUNING)" "^sep($_SAVE_OWN)")
|
||||||
|
out1+=("$_USE <b>Colorizer Menu</b> module,colorizer-menus -s")
|
||||||
|
out1+=("^sep()")
|
||||||
|
|
||||||
|
out1+=("${arrow_string_left} ${arrow_string_left} ${arrow_string_left} $_GOBACK,^back()")
|
||||||
|
|
||||||
|
|
||||||
|
## CONKIES
|
||||||
|
out1+=("^tag(conky)")
|
||||||
|
out1+=("${arrow_string_left} ${arrow_string_left} ${arrow_string_left} $_GOBACK,^back()")
|
||||||
|
out1+=("^sep(Conky)")
|
||||||
|
out1+=("^sep(<small><i>not implemented yet</i></small>)")
|
||||||
|
out1+=("$_COLORIZER_CONKY,colorizer-conky -s")
|
||||||
|
out1+=("^sep()")
|
||||||
|
out1+=("${arrow_string_left} ${arrow_string_left} ${arrow_string_left} $_GOBACK,^back()")
|
||||||
|
|
||||||
|
out+=("^sep()")
|
||||||
|
out+=("<big></big> $_COLORIZER_FONTS,colorizer-fonts -s")
|
||||||
|
out+=("^sep()")
|
||||||
|
out+=("<big></big> $_COLORIZER_PICOM,jgpicom-pipe -s")
|
||||||
|
|
||||||
|
|
||||||
### RUN
|
### RUN
|
||||||
@ -242,17 +442,7 @@ case "$1" in
|
|||||||
out+=("^sep(Mabox Colorizer)")
|
out+=("^sep(Mabox Colorizer)")
|
||||||
out+=("$_COLORIZER_HELP,ycolorizer")
|
out+=("$_COLORIZER_HELP,ycolorizer")
|
||||||
out+=("$_COLORIZER_ROOT,colorizer -s")
|
out+=("$_COLORIZER_ROOT,colorizer -s")
|
||||||
out+=("^sep()")
|
|
||||||
out+=("$_COLORIZER_FONTS,colorizer-fonts -s")
|
|
||||||
out+=("^sep()")
|
|
||||||
out+=("$_COLORIZER_PICOM,jgpicom-pipe -s")
|
|
||||||
out+=("^sep()")
|
|
||||||
out+=("$_COLORIZER_OB,colorizer-ob -s")
|
|
||||||
out+=("$_COLORIZER_MENU,colorizer-menus -s")
|
|
||||||
out+=("$_COLORIZER_CONKY,colorizer-conky -s")
|
|
||||||
out+=("^sep()")
|
|
||||||
out+=("$_COLORIZER_PYRADIO,colorizer-pyradio -s")
|
|
||||||
out+=("$_COLORIZER_CAVA,colorizer-cava -s")
|
|
||||||
out+=("^sep()")
|
out+=("^sep()")
|
||||||
|
|
||||||
|
|
||||||
@ -301,39 +491,44 @@ menu_margin_x=${submenu_spacing:-0}
|
|||||||
[ -z $jgmenu_use_borders ] && menu_border=0
|
[ -z $jgmenu_use_borders ] && menu_border=0
|
||||||
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
|
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
|
||||||
MENU_PADDING_TOP=$((jgtools_padding + 150))
|
MENU_PADDING_TOP=$((jgtools_padding + 150))
|
||||||
#WALLPAPER
|
|
||||||
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | tail -1 | cut -d'=' -f2)
|
# colors on image
|
||||||
THUMBDIR="$HOME/.cache/colorizer/thumbs"
|
n=0
|
||||||
mkdir -p ${THUMBDIR}
|
m=0
|
||||||
NAME=${WALLPATH////_}
|
X=$((jgtools_padding + 6))
|
||||||
if [[ "${NAME}" =~ ^_home_.* ]]; then
|
Y=$((jgtools_padding + 102))
|
||||||
n=${#HOME}
|
for i in "${w[@]}"
|
||||||
((n++))
|
do
|
||||||
NAME=${NAME:${n}}
|
if [[ "$n" -lt "13" ]];then
|
||||||
fi
|
dots+=("@rect,,$((X + 20*n)),$((Y)),18,18,1,left,top,#FFFFFF 80,${i} 100,")
|
||||||
THUMB="${THUMBDIR}/${NAME}.png"
|
else
|
||||||
if [[ ! -f "$THUMB" ]]
|
dots+=("@rect,,$((X + 20*m)),$((Y+20)),18,18,1,left,top,#FFFFFF 80,${i} 100,")
|
||||||
then
|
((m=m+1))
|
||||||
magick convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
|
|
||||||
fi
|
fi
|
||||||
|
((n=n+1))
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
#TEMP POSITION:
|
#TEMP POSITION:
|
||||||
MENU_VALIGN="top"
|
MENU_VALIGN="top"
|
||||||
MENU_MARGIN_Y="80"
|
MENU_MARGIN_Y="80"
|
||||||
|
|
||||||
mkconfigfile
|
mkconfigfile
|
||||||
|
echo menu_height_mode=dynamic >> ${CONFIG_FILE}
|
||||||
|
|
||||||
cat <<EOF > ${MENU_ITEMS}
|
cat <<EOF > ${MENU_ITEMS}
|
||||||
@icon,,$((jgtools_padding )),$((jgtools_padding)),270,150,4,left,top,,,${THUMB}
|
@icon,,$((jgtools_padding )),$((jgtools_padding)),270,150,4,left,top,,,${THUMB}
|
||||||
@rect,,$((jgtools_padding)),$((jgtools_padding + 119)),270,28,0,left,top,#222222 20,#222222 70,
|
@rect,,$((jgtools_padding)),$((jgtools_padding + 96)),270,52,0,left,top,#222222 20,#222222 70,
|
||||||
@text,,$((jgtools_padding + 6)),$((jgtools_padding + 100)),100,28,0,left,top,#DDDDDD 60,${WINCLR},<span size='41600' font_family='Ubuntu'><big></big></span>
|
@text,,$((jgtools_padding + 196)),$((jgtools_padding + 22)),100,28,0,left,top,#222222 30,${WINCLR},<span size='41600' font_family='Ubuntu'><big></big></span>
|
||||||
@text,,$((jgtools_padding + 84)),$((jgtools_padding + 119)),150,28,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'>$_TITLE</span>
|
@text,,$((jgtools_padding + 194)),$((jgtools_padding + 20)),100,28,0,left,top,#FFFFFF 45,${WINCLR},<span size='41600' font_family='Ubuntu'><big></big></span>
|
||||||
|
@text,,$((jgtools_padding + 74)),$((jgtools_padding + 119)),180,28,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'>$_TITLE</span>
|
||||||
|
$(printf '%s\n' "${dots[@]}")
|
||||||
$(printf '%s\n' "${out[@]}")
|
$(printf '%s\n' "${out[@]}")
|
||||||
$(printf '%s\n' "${out1[@]}")
|
$(printf '%s\n' "${out1[@]}")
|
||||||
$(printf '%s\n' "${out2[@]}")
|
$(printf '%s\n' "${out2[@]}")
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
|
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} ${option} 2>/dev/null
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
printf '%s\n' "${out[@]}"
|
printf '%s\n' "${out[@]}"
|
||||||
|
Loading…
Reference in New Issue
Block a user