ready for testing

master 0.5.1
Daniel Napora 2022-08-16 16:50:11 +02:00
parent 352f8242fc
commit 4a5ca5d34c
7 changed files with 304 additions and 130 deletions

View File

@ -4,10 +4,12 @@
CNF_DIR="$HOME/.config/colorizer"
mkdir -p "$CNF_DIR"
CNF_FILE="$CNF_DIR/colorizer.conf"
CUSTOM_COMMANDS_FILE="$CNF_DIR/custom.csv"
if [ ! -f $CNF_FILE ]; then
cat <<EOF > ${CNF_FILE}
# Autogenerate color themes on wallpaper change? yes or no
wall2themes=yes
wall2themes=no
# conky preffered bg color dark, light or none (none = not generate/change colorscheme)
wall2themes_conky=dark
# Menu prefferred bg color dark, light or none (not generate/change colorscheme)
@ -18,6 +20,10 @@ wall2themes_accent=dark
wall2themes_pyradio=dark
# User wallpaper dir
user_wallpapers_dir=~/wallpapers
# Show related tools (show or hide)
related_tools=hide
# Colorizer size: full or compact
colorizer_size=compact
EOF
# Copy new nitrogen wrapper
cp -a /usr/share/mabox/common/wrappers/nitrogen ~/.local/bin/
@ -25,6 +31,109 @@ fi
source "$CNF_FILE"
case "$LANG" in
pl*)
OBTHEME="Motyw Openbox"
MENUPANELS="Menu i Panele"
TERMINALTHEME="Motyw terminala"
WALLCOLORS="Kolory z tapety"
ACCENTINFO="<i>ustaw kolor akcentu</i>"
ACCENT_COLORS="Popularne kolory akcentu"
EDIT_PALETTE="Edytuj paletę kolorów"
RANDWALL="Ustaw losową tapetę"
SYSWALLPAPER="Tapety <b>systemowe</b>"
USERWALLPAPER="Tapety <b>użytkownika</b>"
SETTINGS_AND_HELP="Pomoc i Ustawienia"
SETTINGS="Ustawienia"
COLORIZER_SETTINGS="Ustawienia Colorizera"
AUTOGEN_THEMES="Autogenerowanie motywów?"
EDITCONF="Edytuj plik konfiguracyjny"
RESET="Resetuj ustawienia Colorizera"
YES="Tak"
NO="Nie"
LIGHTBG="<b>light</b> - jasne tło"
DARKBG="<b>dark</b> - ciemne tło"
OTHERTOOLS="Powiązane narzędzia"
ADDLAUNCHER="Dodaj uruchamiacz Colorizera do panelu"
DELETELAUNCHER="Usuń uruchamiacz Colorizera z panelu"
HEIGHT="Wysokość Colorizera"
FULL="<b>full</b> - pełna wysokość"
COMPACT="<b>compact</b> - kompaktowa"
OTHER_SETTINGS="Inne ustawienia"
SHOW_RELATED="Pokazuj powiązane?"
SHOW="<b>show</b> - pokaż"
HIDE="<b>hide</b> - ukryj"
EDIT_RELATED="Edytuj powiązane"
RESET_RELATED="Resetuj powiązane"
LXAPPEARANCE="Motyw GTK i ikony"
THEMEMANAGER="Zarządzaj motywami"
WALLPAPERS="Katalogi z tapetami"
OPENDIR="Otwórz katalog w menadżerze plików"
OPENDIR_VIEWNIOR="Otwórz katalog w przeglądarce obrazków"
SETRANDOM="Ustaw losową"
CHANGE="Zmień"
USERDIR_NOT_EXIST="kalalog nie istnieje"
CREATE_USERDIR="Utwórz katalog"
HELP="Pomoc"
;;
*)
OBTHEME="Openbox Theme"
MENUPANELS="Menus/Panels"
TERMINALTHEME="Terminal color scheme"
WALLCOLORS="Wallpaper Colors"
ACCENTINFO="<i>click to set accent color</i>"
ACCENT_COLORS="Popular accent colors"
EDIT_PALETTE="Edit color palette"
RANDWALL="Set random wallpaper"
RANDOM_SYSWALLPAPER="<b>System</b> Wallpapers"
RANDOM_USERWALLPAPER="<b>User</b> Wallpapers"
SETTINGS_AND_HELP="Settings and Help"
SETTINGS="Settings"
COLORIZER_SETTINGS="Colorizer Settings"
AUTOGEN_THEMES="Autogenerate themes?"
EDITCONF="Edit config file"
RESET="Reset to defaults"
YES="Yes"
NO="No"
LIGHTBG="with <b>light</b> background"
DARKBG="with <b>dark</b> background"
OTHERTOOLS="Related tools"
ADDLAUNCHER="Add Colorizer launcher to panel"
DELETELAUNCHER="Delete Colorizer from panel"
HEIGHT="Height of Colorizer"
FULL="full"
COMPACT="compact"
OTHER_SETTINGS="Other settings"
SHOW_RELATED="Show related tools?"
SHOW="show"
HIDE="hide"
EDIT_RELATED="Edit related tools"
RESET_RELATED="Restet related tools"
LXAPPEARANCE="GTK theme and icons"
THEMEMANAGER="Theme manager"
WALLPAPERS="Wallpapers directories"
OPENDIR="Open directory in file manager"
OPENDIR_VIEWNIOR="Open directory in Image viewer"
SETRANDOM="Set random"
CHANGE="Change"
USERDIR_NOT_EXIST="directory does not exist"
CREATE_USERDIR="Create directory"
HELP="About and Help"
;;
esac
if [ ! -f $CUSTOM_COMMANDS_FILE ]; then
cat <<EOF > ${CUSTOM_COMMANDS_FILE}
^sep($OTHERTOOLS)
Tint2 Menu,^pipe(jgtint2-pipe)
#$WALLPAPERS,^pipe(jgwallpaperchanger)
$TERMINALTHEME,^term(theme.sh -i2;/bin/bash)
$LXAPPEARANCE,lxappearance
$THEMEMANAGER,mb-obthemes
Color Menu,colormenu
EOF
fi
WALLPALDIR="$HOME/.config/colormenu/palettes/wallp"
mkdir -p "$WALLPALDIR"
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
@ -43,66 +152,12 @@ ubuntu=("#E95420" "#18b0b0" "#3584e4" "#0e8420" "#c748ba" "#77216f" "#c7162b" "#
mint+=("#6cabcd" "#5b73c4" "#aa876a" "#9d9d9d" "#db9d61" "#c76199" "#8c6ec9" "#c15b58" "#c8ac69" "#5aaa9a")
case "$LANG" in
pl*)
OBTHEME="Motyw Openbox"
MENUPANELS="Menu i Panele"
TERMINALTHEME="Motyw terminala"
WALLCOLORS="Kolory z tapety"
ACCENTINFO="<i>ustaw kolor akcentu</i>"
ACCENT_COLORS="Popularne kolory akcentu"
EDIT_PALETTE="Edytuj paletę kolorów"
RANDWALL="Ustaw losową tapetę"
RANDOM_SYSWALLPAPER="Tapeta systemowa"
RANDOM_USERWALLPAPER="Tapeta użytkownika"
SETTINGS_AND_HELP="Pomoc i Ustawienia"
SETTINGS="Ustawienia"
COLORIZER_SETTINGS="Ustawienia Colorizera"
AUTOGEN_THEMES="Autogenerowanie motywów?"
EDITCONF="Edytuj plik konfiguracyjny"
RESET="Resetuj ustawienia"
YES="Tak"
NO="Nie"
LIGHTBG="<b>light</b> - jasne tło"
DARKBG="<b>dark</b> - ciemne tło"
OTHERTOOLS="Inne narzędzia"
WALLPAPERS="Tapety"
HELP="Pomoc"
;;
*)
OBTHEME="Openbox Theme"
MENUPANELS="Menus/Panels"
TERMINALTHEME="Terminal color scheme"
WALLCOLORS="Wallpaper Colors"
ACCENTINFO="<i>click to set accent color</i>"
ACCENT_COLORS="Popular accent colors"
EDIT_PALETTE="Edit color palette"
RANDWALL="Set random wallpaper"
RANDOM_SYSWALLPAPER="System Wallpaper"
RANDOM_USERWALLPAPER="User Wallpaper"
SETTINGS_AND_HELP="Settings and Help"
SETTINGS="Settings"
COLORIZER_SETTINGS="Colorizer Settings"
AUTOGEN_THEMES="Autogenerate themes?"
EDITCONF="Edit config file"
RESET="Reset to defaults"
YES="Yes"
NO="No"
LIGHTBG="with <b>light</b> background"
DARKBG="with <b>dark</b> background"
OTHERTOOLS="Other tools"
WALLPAPERS="Wallpaper"
HELP="About and Help"
;;
esac
out+=("^sep(Mabox Colorizer)")
out+=("$OBTHEME,^pipe(colorizer-ob)")
out+=("$MENUPANELS,^pipe(colorizer-menus)")
#out+=("TINT2,^pipe(colorizer-tint2)")
out+=("Conky,^pipe(colorizer-conky)")
#out+=("Systray HW monitor,^pipe(colorizer-phwmon)")
out+=("$TERMINALTHEME,^term(theme.sh -i2;/bin/bash)")
out+=("^sep()")
out+=("PyRadio,^pipe(colorizer-pyradio)")
#out+=("GTKTHEME,^pipe(colorizer-gtktheme)")
@ -121,11 +176,23 @@ out2+=("^sep(Mint)")
for i in ${mint[@]};do out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,w2theme accent '${i}';colorizer -s");done
out2+=("^sep(Plasma)")
for i in ${plasma[@]};do out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,w2theme accent '${i}';colorizer -s");done
out+=("$EDIT_PALETTE,geany $WALLPALDIR/$WALLPAPER.clr")
out+=("^sep($RANDWALL)")
out+=("$RANDOM_SYSWALLPAPER,nitrogen --random /usr/share/backgrounds --set-scaled --save;colorizer -s")
[ -d "${user_wallpapers_dir}" ] && out+=("$RANDOM_USERWALLPAPER,nitrogen --random ${user_wallpapers_dir} --set-scaled --save;colorizer -s")
out+=("^sep()")
out+=("$EDIT_PALETTE,geany $WALLPALDIR/$WALLPAPER.clr")
if [[ "$wall2themes" == "yes" ]];then
out+=("^sep($RANDWALL)")
syswallp=$(shopt -s nullglob ; set -- /usr/share/backgrounds/*.{jpg,JPG,jpeg,JPEG,png,PNG} ; echo $#)
out+=("$SYSWALLPAPER (<small>${syswallp}</small>),nitrogen --random /usr/share/backgrounds --set-scaled --save;colorizer -s")
if [[ -d "${user_wallpapers_dir}" ]]; then
userwallp=$(shopt -s nullglob ; set -- $user_wallpapers_dir/*.{jpg,JPG,jpeg,JPEG,png,PNG} ; echo $#)
out+=("$USERWALLPAPER (<small>${userwallp}</small>),nitrogen --random ${user_wallpapers_dir} --set-scaled --save;colorizer -s")
fi
fi
if [[ "$related_tools" == "show" ]];then
out+=(". $CUSTOM_COMMANDS_FILE")
fi
### FUTURE: SAVE AND RESTORE
#out+=("^sep()")
#out+=("Pin current colors to wallpaper")
@ -135,6 +202,18 @@ out+=("$SETTINGS,^checkout(settings)")
out2+=("^tag(settings)")
out2+=("^sep($COLORIZER_SETTINGS)")
if [[ -f "$HOME/.config/tint2/launcherapps/colorizer.desktop" ]]; then
out2+=("$DELETELAUNCHER,rm ~/.config/tint2/launcherapps/colorizer.desktop;killall -SIGUSR1 tint2;colorizer -s")
else
out2+=("$ADDLAUNCHER,cp /usr/share/applications/colorizer.desktop ~/.config/tint2/launcherapps/;killall -SIGUSR1 tint2;colorizer -s")
fi
out2+=("$HEIGHT [ <b>${colorizer_size}</b> ],^checkout(csize)")
out3+=("^tag(csize)")
out3+=("^sep($HEIGHT)")
out3+=("$FULL,mb-setvar colorizer_size=full $CNF_FILE;colorizer -s")
out3+=("$COMPACT,mb-setvar colorizer_size=compact $CNF_FILE;colorizer -s")
out2+=("^sep($AUTOGEN_THEMES)")
out2+=("$AUTOGEN_THEMES [ <b>${wall2themes}</b> ],^checkout(autogen)")
out3+=("^tag(autogen")
out3+=("^sep(GENERATE THEMES ON WALLPAPER CHANGE?)")
@ -164,6 +243,39 @@ out3+=("$NO,mb-setvar wall2themes_pyradio=none $CNF_FILE;colorizer -s")
out3+=("^sep()")
out3+=("$LIGHTBG,mb-setvar wall2themes_pyradio=light $CNF_FILE;colorizer -s")
out3+=("$DARKBG,mb-setvar wall2themes_pyradio=dark $CNF_FILE;colorizer -s")
out2+=("^sep($OTHER_SETTINGS)")
out2+=("$WALLPAPERS,^checkout(wallpapersettings)")
out3+=("^tag(wallpapersettings)")
out3+=("^sep($SYSWALLPAPER ($syswallp))")
out3+=("^sep(<i>/usr/share/backgrounds</i>)")
out3+=("$OPENDIR,xdg-open /usr/share/backgrounds")
out3+=("$OPENDIR_VIEWNIOR,viewnior /usr/share/backgrounds")
out3+=("$SETRANDOM,nitrogen --random /usr/share/backgrounds --set-scaled --save;colorizer -s")
out3+=("^sep($USERWALLPAPER)")
if [[ -d "${user_wallpapers_dir}" ]]; then
# dir exist
out3+=("^sep(<i>${user_wallpapers_dir}</i>)")
out3+=("$OPENDIR ,xdg-open ${user_wallpapers_dir}")
out3+=("$OPENDIR_VIEWNIOR ,viewnior ${user_wallpapers_dir}")
out3+=("$SETRANDOM,nitrogen --random ${user_wallpapers_dir} --set-scaled --save;colorizer -s")
out3+=("^sep()")
out3+=("$CHANGE ($EDITCONF),xdg-open $CNF_FILE")
else
# dir nit exist
out3+=("^sep(<i>${user_wallpapers_dir} - $USERDIR_NOT_EXIST</i>")
out3+=("$CREATE_USERDIR,mkdir -p ${user_wallpapers_dir};colorizer -s")
out3+=("$CHANGE ($EDITCONF),xdg-open $CNF_FILE")
fi
out2+=("$SHOW_RELATED [ <b>${related_tools}</b> ],^checkout(related)")
out3+=("^tag(related)")
out3+=("^sep($SHOW_RELATED)")
out3+=("$SHOW,mb-setvar related_tools=show $CNF_FILE;colorizer -s")
out3+=("$HIDE,mb-setvar related_tools=hide $CNF_FILE;colorizer -s")
out3+=("^sep()")
out3+=("$EDIT_RELATED,xdg-open $CUSTOM_COMMANDS_FILE")
out3+=("$RESET_RELATED,rm $CUSTOM_COMMANDS_FILE;colorizer -s")
out2+=("^sep()")
out2+=("$EDITCONF,xdg-open $CNF_FILE")
out2+=("$RESET,rm $CNF_FILE;colorizer -s")
@ -176,41 +288,34 @@ out+=("$HELP,yhtml /usr/share/mabox-colorizer/help/en.html 'Mabox Help - Coloriz
fi
out+=("^sep($OTHERTOOLS)")
out+=("Tint2 Menu,^pipe(jgtint2-pipe)")
#out+=("$WALLPAPERS,^pipe(jgwallpaperchanger)")
out+=("Color Menu,colormenu")
#out+=("PREFERENCES")
### RUN
if [[ "$1" == "-s" ]]; then
. /usr/share/mb-jgtools/pipemenu-standalone.cfg
. $HOME/.config/mabox/mabox.conf
#out+=("^sep()")
#out+=(" ⮜ $LEFTPANEL,mb-jgtools places")
if [[ $panels_heightpos == "top" ]]; then
MENU_VALIGN="top"
MENU_MARGIN_Y=${panels_topmargin:-0}
elif [[ $panels_heightpos == "bottom" ]]; then
MENU_VALIGN="bottom"
MENU_MARGIN_Y=${panels_topmargin:-0}
else
MENU_VALIGN="center"
if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell)
MENU_HEIGHT_MIN="$HEIGHT"
MENU_HEIGHT_MAX=$MENU_HEIGHT_MIN
MENU_RADIUS="0"
menu_margin_x="0"
else
MENU_VALIGN="center"
menu_margin_x=${submenu_spacing:-0}
fi
MENU_PADDING_TOP=${jgtools_padding:-0}
MENU_HALIGN="left"
jgmenu_icon_size=0
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))
#TEMP POSITION:
MENU_VALIGN="top"
MENU_MARGIN_Y="60"
#MENU_VALIGN="top"
#MENU_MARGIN_Y="60"
THUMBDIR="$HOME/.config/mabox/wallthumbs"
mkdir -p ${THUMBDIR}

View File

@ -180,22 +180,26 @@ fi
if [[ "$1" == "-s" ]]; then
. /usr/share/mb-jgtools/pipemenu-standalone.cfg
. $HOME/.config/mabox/mabox.conf
source $HOME/.config/colorizer/colorizer.conf
out+=("^sep()")
out+=(" ⮜ Back to Colorizer,colorizer -s")
if [[ $panels_heightpos == "top" ]]; then
MENU_VALIGN="top"
MENU_MARGIN_Y=${panels_topmargin:-0}
elif [[ $panels_heightpos == "bottom" ]]; then
MENU_VALIGN="bottom"
MENU_MARGIN_Y=${panels_topmargin:-0}
else
MENU_VALIGN="center"
if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell)
MENU_HEIGHT_MIN="$HEIGHT"
MENU_HEIGHT_MAX=$MENU_HEIGHT_MIN
MENU_RADIUS="0"
menu_margin_x="0"
else
MENU_VALIGN="center"
menu_margin_x=${submenu_spacing:-0}
fi
MENU_HALIGN="left"
jgmenu_icon_size=0
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))
@ -212,9 +216,6 @@ if [[ "$1" == "-s" ]]; then
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
fi
#TEMP POSITION:
MENU_VALIGN="top"
MENU_MARGIN_Y="60"
mkconfigfile
cat <<EOF > ${MENU_ITEMS}

View File

@ -150,24 +150,30 @@ out+=("Set random menu theme,mb-setvar jgmenu_theme=$(basename -s .colorrc $(ls
if [[ "$1" == "-s" ]]; then
. /usr/share/mb-jgtools/pipemenu-standalone.cfg
. $HOME/.config/mabox/mabox.conf
CNF_DIR="$HOME/.config/colorizer"
CNF_FILE="$CNF_DIR/colorizer.conf"
source "$CNF_FILE"
out+=("^sep()")
out+=(" ⮜ Back to Colorizer,colorizer -s")
if [[ $panels_heightpos == "top" ]]; then
MENU_VALIGN="top"
MENU_MARGIN_Y=${panels_topmargin:-0}
elif [[ $panels_heightpos == "bottom" ]]; then
MENU_VALIGN="bottom"
MENU_MARGIN_Y=${panels_topmargin:-0}
else
MENU_VALIGN="center"
if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell)
MENU_HEIGHT_MIN="$HEIGHT"
MENU_HEIGHT_MAX=$MENU_HEIGHT_MIN
MENU_RADIUS="0"
menu_margin_x="0"
else
MENU_VALIGN="center"
menu_margin_x=${submenu_spacing:-0}
fi
MENU_PADDING_TOP=${jgtools_padding:-0}
MENU_HALIGN="left"
jgmenu_icon_size=0
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))
@ -183,9 +189,7 @@ JGWIDTH=$((jgtools_padding + 278 + jgtools_padding))
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
fi
#TEMP POSITION:
MENU_VALIGN="top"
MENU_MARGIN_Y="60"
mkconfigfile

View File

@ -210,24 +210,28 @@ fi
if [[ "$1" == "-s" ]]; then
. /usr/share/mb-jgtools/pipemenu-standalone.cfg
. $HOME/.config/mabox/mabox.conf
source $HOME/.config/colorizer/colorizer.conf
out+=("^sep()")
out+=(" ⮜ Back to Colorizer,colorizer -s")
if [[ $panels_heightpos == "top" ]]; then
MENU_VALIGN="top"
MENU_MARGIN_Y=${panels_topmargin:-0}
elif [[ $panels_heightpos == "bottom" ]]; then
MENU_VALIGN="bottom"
MENU_MARGIN_Y=${panels_topmargin:-0}
else
if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell)
MENU_HEIGHT_MIN="$HEIGHT"
MENU_HEIGHT_MAX=$MENU_HEIGHT_MIN
MENU_RADIUS="0"
menu_margin_x="0"
else
MENU_VALIGN="center"
fi
menu_margin_x=${submenu_spacing:-0}
fi
MENU_PADDING_TOP=${jgtools_padding:-0}
MENU_HALIGN="left"
jgmenu_icon_size=0
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))
@ -244,10 +248,6 @@ JGWIDTH=$((jgtools_padding + 278 + jgtools_padding))
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
fi
#TEMP POSITION:
MENU_VALIGN="top"
MENU_MARGIN_Y="60"
mkconfigfile
cat <<EOF > ${MENU_ITEMS}

View File

@ -4,18 +4,29 @@
# TODO check if theme is writeable (users themes)
# TODO Save as new theme
me="colorizer-pyradio -s"
THEMERC=~/.config/pyradio/themes/mbcolors.pyradio-theme
case "$LANG" in
pl*)
START_PYRADIO="Uruchom PyRadio"
INFO="Info"
INFO_HEAD="Jak działa automatyczna zmiana kolorów?"
INFO_TXT="Automatyczna zmiana kolorów działa z motywem <b>mbcolors</b> (User theme).\nAby go ustawić:\n- użyj klawisza <b>t</b> - wybór motywów\n- zaznacz motyw <i>mbcolors</i> i naciśnij <b>spację</b> - (ustawia jako domyślny)\n- wciśnij <b>c</b> - aby włączyć śledzenie zmian w pliku motywu.\n\n"
RESETTHEME="Resetuj motyw"
GENERATEFROMWP="Generuj z kolorów tapety..."
LIGHTBG="Jasne tło"
DARKBG="Ciemne tło"
SETCOLORS="Ustaw kolory..."
;;
*)
START_PYRADIO="Start PyRadio"
INFO="Info"
INFO_HEAD="How it works?"
INFO_TXT="Automatic theme generation works with <b>mbcolors</b> user theme.\n Configuration:/n- use <b>t</b> key to show theme selection dialog\n- navigate to <i>mbcolors</i> theme and press <b>c</b>\n\n"
RESETTHEME="Reset theme"
GENERATEFROMWP="Generate from wallpaper colors..."
LIGHTBG="Light Background"
DARKBG="Dark Background"
@ -38,6 +49,9 @@ read MB1 MB2 MBFG<<< "$(grep '^Messages Border ' ${THEMERC})"
getvalues
out+=("^sep(Colorize PyRadio)")
out+=("$START_PYRADIO,terminator --geometry=420x440-20-20 -e pyradio")
out+=("$INFO,notify-send.sh -i music '$INFO_HEAD' '$INFO_TXT' -t 20000")
out+=("$RESETTHEME,prtctl resettheme;$me")
out+=("^sep($GENERATEFROMWP)")
out+=("$LIGHTBG,w2theme pyradio light;$me")
out+=("$DARKBG,w2theme pyradio dark;$me")
@ -83,22 +97,29 @@ read MB1 MB2 MBFG<<< "$(grep '^Messages Border ' ${THEMERC})"
if [[ "$1" == "-s" ]]; then
. /usr/share/mb-jgtools/pipemenu-standalone.cfg
. $HOME/.config/mabox/mabox.conf
CNF_DIR="$HOME/.config/colorizer"
CNF_FILE="$CNF_DIR/colorizer.conf"
source "$CNF_FILE"
out+=("^sep()")
out+=(" ⮜ Back to Colorizer,colorizer -s")
if [[ $panels_heightpos == "top" ]]; then
MENU_VALIGN="top"
MENU_MARGIN_Y=${panels_topmargin:-0}
elif [[ $panels_heightpos == "bottom" ]]; then
MENU_VALIGN="bottom"
MENU_MARGIN_Y=${panels_topmargin:-0}
else
MENU_VALIGN="center"
if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell)
MENU_HEIGHT_MIN="$HEIGHT"
MENU_HEIGHT_MAX=$MENU_HEIGHT_MIN
MENU_RADIUS="0"
menu_margin_x="0"
else
MENU_VALIGN="center"
menu_margin_x=${submenu_spacing:-0}
fi
MENU_HALIGN="left"
jgmenu_icon_size=0
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))
@ -115,9 +136,6 @@ if [[ "$1" == "-s" ]]; then
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
fi
#TEMP POSITION:
MENU_VALIGN="top"
MENU_MARGIN_Y="60"
mkconfigfile
cat <<EOF > ${MENU_ITEMS}

View File

@ -6,6 +6,7 @@
THEMERC=~/.config/pyradio/themes/mbcolors.pyradio-theme
stations() {
sd "^Stations .*$" "Stations $1 $2" ${THEMERC}
}
@ -77,6 +78,50 @@ pyradio_url() {
messages_border() {
sd "^Messages Border .*$" "Messages Border $1" ${THEMERC}
}
resettheme () {
mkdir -p ~/.config/pyradio/themes
cat <<EOF > ${THEMERC}
# Main foreground and background
Stations #309552 #142C2C
# Playing station text color
# (background color will come from Stations)
Active Station #cdc76d
# Status bar foreground and background
Status Bar #cdc76d #22564b
# Normal cursor foreground and background
Normal Cursor #0c1d23 #74885a
# Cursor foreground and background
# when cursor on playing station
Active Cursor #1a231a #cdc76d
# Cursor foreground and background
# This is the Line Editor cursor
Edit Cursor #eed6aa #1a231a
# Text color for extra function indication
# and jump numbers within the status bar
# (background color will come from Stations)
Extra Func #22564b
# Text color for URL
# (background color will come from Stations)
PyRadio URL #d2cda1
# Message window border foreground
# (background color will come from Stations)
Messages Border #d3d4bf
EOF
}
#run
if [ ! -f $THEMERC ]; then
resettheme
fi
case "$1" in
stations) stations "$2" "$3";;
stations_txt) stations_txt "$2";;
@ -97,5 +142,6 @@ case "$1" in
extra_func) extra_func "$2";;
pyradio_url) pyradio_url "$2";;
messages_border) messages_border "$2";;
resettheme) resettheme;;
*);;
esac

View File

@ -109,7 +109,7 @@ colorize () {
# CONKY
case "$wall2themes_conky" in
dark) conky_colors dark;;
light) conkycolors light;;
light) conky_colors light;;
*) : ;;
esac
# MENUS