parent
b17d8f8094
commit
352f8242fc
172
bin/colorizer
172
bin/colorizer
|
@ -1,5 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
CNF_DIR="$HOME/.config/colorizer"
|
||||
mkdir -p "$CNF_DIR"
|
||||
CNF_FILE="$CNF_DIR/colorizer.conf"
|
||||
if [ ! -f $CNF_FILE ]; then
|
||||
cat <<EOF > ${CNF_FILE}
|
||||
# Autogenerate color themes on wallpaper change? yes or no
|
||||
wall2themes=yes
|
||||
# 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)
|
||||
wall2themes_menu=light
|
||||
# Accent color dark, light or none
|
||||
wall2themes_accent=dark
|
||||
# PyRadio preferred bg color dark, light or none (not generate/change colorscheme)
|
||||
wall2themes_pyradio=dark
|
||||
# User wallpaper dir
|
||||
user_wallpapers_dir=~/wallpapers
|
||||
EOF
|
||||
# Copy new nitrogen wrapper
|
||||
cp -a /usr/share/mabox/common/wrappers/nitrogen ~/.local/bin/
|
||||
fi
|
||||
|
||||
source "$CNF_FILE"
|
||||
|
||||
WALLPALDIR="$HOME/.config/colormenu/palettes/wallp"
|
||||
mkdir -p "$WALLPALDIR"
|
||||
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
|
||||
|
@ -8,6 +33,15 @@ if [ ! -f "$WALLPALDIR/$WALLPAPER.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/$WALLPAPER.clr"
|
||||
fi
|
||||
mapfile -t w < "$WALLPALDIR/$WALLPAPER.clr"
|
||||
if [[ "${#w[@]}" -lt 8 ]]; then
|
||||
w+=("#2e3440" "#4c566a" "#5e81ac" "#bf616b" "#b48ead" "#a3be8c" "#ebcb8b" "#d8dee9" "#eceff4")
|
||||
fi
|
||||
|
||||
#Accent colors
|
||||
plasma=("#e93a9a" "#e93d58" "#e9643a" "#e8cb2d" "#3dd425" "#00d3b8" "#3daee9" "#b875dc" "#926ee4" "#686b6f")
|
||||
ubuntu=("#E95420" "#18b0b0" "#3584e4" "#0e8420" "#c748ba" "#77216f" "#c7162b" "#f4a100")
|
||||
mint+=("#6cabcd" "#5b73c4" "#aa876a" "#9d9d9d" "#db9d61" "#c76199" "#8c6ec9" "#c15b58" "#c8ac69" "#5aaa9a")
|
||||
|
||||
|
||||
case "$LANG" in
|
||||
pl*)
|
||||
|
@ -16,8 +50,23 @@ case "$LANG" in
|
|||
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"
|
||||
WALLPAPER="Tapety"
|
||||
WALLPAPERS="Tapety"
|
||||
HELP="Pomoc"
|
||||
;;
|
||||
*)
|
||||
|
@ -26,8 +75,23 @@ case "$LANG" in
|
|||
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"
|
||||
WALLPAPER="Wallpaper"
|
||||
WALLPAPERS="Wallpaper"
|
||||
HELP="About and Help"
|
||||
;;
|
||||
esac
|
||||
|
@ -46,16 +110,64 @@ out+=("^sep($WALLCOLORS)")
|
|||
out+=("^sep($ACCENTINFO)")
|
||||
for i in "${w[@]}"
|
||||
do
|
||||
out+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,obtctl clractivebg '${i}';colorizer -s")
|
||||
out+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,w2theme accent '${i}';colorizer -s")
|
||||
done
|
||||
out+=("^sep()")
|
||||
out+=("RANDOM_WALLPAPER,nitrogen --random /usr/share/backgrounds --set-scaled --save;colorizer -s")
|
||||
out+=("^sep($OTHERTOOLS)")
|
||||
out+=("Tint2 Menu,^pipe(jgtint2-pipe)")
|
||||
out+=("$WALLPAPER,^pipe(jgwallpaperchanger)")
|
||||
out+=("Color Menu,colormenu")
|
||||
out+=("^sep()")
|
||||
#out+=("PREFERENCES")
|
||||
out+=("$ACCENT_COLORS,^checkout(acccolors)")
|
||||
out2+=("^tag(acccolors)")
|
||||
out2+=("^sep(Ubuntu)")
|
||||
for i in ${ubuntu[@]};do out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,w2theme accent '${i}';colorizer -s");done
|
||||
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")
|
||||
|
||||
### FUTURE: SAVE AND RESTORE
|
||||
#out+=("^sep()")
|
||||
#out+=("Pin current colors to wallpaper")
|
||||
###
|
||||
out+=("^sep($SETTINGS_AND_HELP)")
|
||||
out+=("$SETTINGS,^checkout(settings)")
|
||||
|
||||
out2+=("^tag(settings)")
|
||||
out2+=("^sep($COLORIZER_SETTINGS)")
|
||||
out2+=("$AUTOGEN_THEMES [ <b>${wall2themes}</b> ],^checkout(autogen)")
|
||||
out3+=("^tag(autogen")
|
||||
out3+=("^sep(GENERATE THEMES ON WALLPAPER CHANGE?)")
|
||||
out3+=("$YES,mb-setvar wall2themes=yes $CNF_FILE;colorizer -s")
|
||||
out3+=("$NO,mb-setvar wall2themes=no $CNF_FILE;colorizer -s")
|
||||
out2+=("^sep()")
|
||||
out2+=("$MENUPANELS [ <b>${wall2themes_menu}</b> ],^checkout(mp)")
|
||||
out3+=("^tag(mp)")
|
||||
out3+=("^sep(Generate menu/panels theme?)")
|
||||
out3+=("$NO,mb-setvar wall2themes_menu=none $CNF_FILE;colorizer -s")
|
||||
out3+=("^sep()")
|
||||
out3+=("$LIGHTBG,mb-setvar wall2themes_menu=light $CNF_FILE;colorizer -s")
|
||||
out3+=("$DARKBG,mb-setvar wall2themes_menu=dark $CNF_FILE;colorizer -s")
|
||||
|
||||
out2+=("Conky [ <b>${wall2themes_conky}</b> ],^checkout(conky)")
|
||||
out3+=("^tag(conky)")
|
||||
out3+=("^sep(Generate Conky theme?)")
|
||||
out3+=("$NO,mb-setvar wall2themes_conky=none $CNF_FILE;colorizer -s")
|
||||
out3+=("^sep()")
|
||||
out3+=("$LIGHTBG,mb-setvar wall2themes_conky=light $CNF_FILE;colorizer -s")
|
||||
out3+=("$DARKBG,mb-setvar wall2themes_conky=dark $CNF_FILE;colorizer -s")
|
||||
|
||||
out2+=("PyRadio [ <b>${wall2themes_pyradio}</b> ],^checkout(pyradio)")
|
||||
out3+=("^tag(pyradio)")
|
||||
out3+=("^sep(Generate PyRadio theme?)")
|
||||
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()")
|
||||
out2+=("$EDITCONF,xdg-open $CNF_FILE")
|
||||
out2+=("$RESET,rm $CNF_FILE;colorizer -s")
|
||||
|
||||
LNG=${LANG:0:2}
|
||||
if [[ -f "/usr/share/mabox-colorizer/help/$LNG.html" ]];then
|
||||
out+=("$HELP,yhtml /usr/share/mabox-colorizer/help/$LNG.html 'Mabox Help - Colorizer'")
|
||||
|
@ -63,6 +175,13 @@ else
|
|||
out+=("$HELP,yhtml /usr/share/mabox-colorizer/help/en.html 'Mabox Help - Colorizer'")
|
||||
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
|
||||
|
@ -87,19 +206,47 @@ if [[ "$1" == "-s" ]]; then
|
|||
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
|
||||
[ -z $jgmenu_use_borders ] && menu_border=0
|
||||
JGWIDTH=$((jgtools_padding + 278 + jgtools_padding))
|
||||
MENU_PADDING_TOP=$((jgtools_padding + 128))
|
||||
MENU_PADDING_TOP=$((jgtools_padding + 158))
|
||||
|
||||
#TEMP POSITION:
|
||||
MENU_VALIGN="top"
|
||||
MENU_MARGIN_Y="60"
|
||||
|
||||
THUMBDIR="$HOME/.config/mabox/wallthumbs"
|
||||
mkdir -p ${THUMBDIR}
|
||||
THUMB="${THUMBDIR}/${WALLPAPER}.png"
|
||||
if [[ ! -f "$THUMB" ]]
|
||||
then
|
||||
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
|
||||
fi
|
||||
# colors
|
||||
n=0
|
||||
m=0
|
||||
X=$((jgtools_padding + 12))
|
||||
Y=$((jgtools_padding + 104))
|
||||
for i in "${w[@]}"
|
||||
do
|
||||
if [[ "$n" -lt "10" ]];then
|
||||
dots+=("@rect,,$((X + 25*n)),$((Y)),22,22,1,left,top,#FFFFFF 60,${i} 100,")
|
||||
else
|
||||
dots+=("@rect,,$((X + 25*m)),$((Y+24)),22,22,1,left,top,#FFFFFF 80,${i} 100,")
|
||||
((m=m+1))
|
||||
fi
|
||||
((n=n+1))
|
||||
|
||||
done
|
||||
|
||||
mkconfigfile
|
||||
#THUMB="$(DISPLAY=:0 scrot -t 220x100 -o $HOME/.config/mabox/colorizer.png -e 'echo $m')"
|
||||
cat <<EOF > ${MENU_ITEMS}
|
||||
@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),270,120,4,left,top,,,/usr/share/mabox-colorizer/img/colorizer.png
|
||||
@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),270,150,4,left,top,,,${THUMB}
|
||||
@rect,,$((jgtools_padding + 4)),$((jgtools_padding + 100)),270,54,0,left,top,#222222 20,#222222 70,
|
||||
@text,,$((jgtools_padding + 168)),$((jgtools_padding + 124)),120,30,0,left,top,#FFFFFF ,${WINCLR}, <b>Colorizer</b>
|
||||
$(printf '%s\n' "${dots[@]}")
|
||||
#@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 34)),270,120,4,left,top,,,/usr/share/mabox-colorizer/img/colorizer.png
|
||||
$(printf '%s\n' "${out[@]}")
|
||||
$(printf '%s\n' "${out2[@]}")
|
||||
$(printf '%s\n' "${out3[@]}")
|
||||
EOF
|
||||
|
||||
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
|
||||
|
@ -107,3 +254,4 @@ EOF
|
|||
fi
|
||||
printf '%s\n' "${out[@]}"
|
||||
printf '%s\n' "${out2[@]}"
|
||||
printf '%s\n' "${out3[@]}"
|
||||
|
|
|
@ -69,10 +69,10 @@ if pgrep -af "conky.*mbcolor" >/dev/null; then
|
|||
out+=("$LIGHTBG,w2theme conky light;$me")
|
||||
out+=("$DARKBG,w2theme conky dark;$me")
|
||||
out+=("^sep(<small><i>Global settings (apply to all)</i></small>)")
|
||||
out+=("<small><span bgcolor='$CLR'> </span><span ${BG} fgcolor='$CLR'> AbCd </span></small> Default color <small>(normal text and border)</small>,^pipe(mbclr '$CLR' conkyctl default_color_all DEFAULT_COLOR '$me')")
|
||||
out+=("<small><span bgcolor='$CLR0'> </span><span ${BG} fgcolor='$CLR0'> AbCd </span></small> Color 0 <small>(normal text2)</small>,^pipe(mbclr '$CLR0' conkyctl color0_all COLOR_0 '$me')")
|
||||
out+=("<small><span bgcolor='$CLR1'> </span><span ${BG} fgcolor='$CLR1'> AbCd </span></small> Color 1 <small>(bigger text)</small>,^pipe(mbclr '$CLR1' conkyctl color1_all COLOR_1 '$me')")
|
||||
out+=("<small><span bgcolor='$CLR2'> </span><span ${BG} fgcolor='$CLR2'> AbCd </span></small> Color 2 <small>(bars/graphs)</small>,^pipe(mbclr '$CLR2' conkyctl color2_all COLOR_2 '$me')")
|
||||
out+=("<small><span bgcolor='$CLR'> </span><span weight='bold' ${BG} fgcolor='$CLR'> AbCd </span></small> Default color <small>(normal text and border)</small>,^pipe(mbclr '$CLR' conkyctl default_color_all DEFAULT_COLOR '$me')")
|
||||
out+=("<small><span bgcolor='$CLR0'> </span><span weight='bold' ${BG} fgcolor='$CLR0'> AbCd </span></small> Color 0 <small>(normal text2)</small>,^pipe(mbclr '$CLR0' conkyctl color0_all COLOR_0 '$me')")
|
||||
out+=("<small><span bgcolor='$CLR1'> </span><span weight='bold' ${BG} fgcolor='$CLR1'> AbCd </span></small> Color 1 <small>(bigger text)</small>,^pipe(mbclr '$CLR1' conkyctl color1_all COLOR_1 '$me')")
|
||||
out+=("<small><span bgcolor='$CLR2'> </span><span weight='bold' ${BG} fgcolor='$CLR2'> AbCd </span></small> Color 2 <small>(bars/graphs)</small>,^pipe(mbclr '$CLR2' conkyctl color2_all COLOR_2 '$me')")
|
||||
out+=("^sep()")
|
||||
if [ "$WINTRANS" == false ];then
|
||||
out+=("<small><span bgcolor='$WINCLR'> </span><span ${BG} fgcolor='$WINCLR'> AbCd </span></small> Background,^checkout(trans)")
|
||||
|
|
|
@ -1,29 +1,82 @@
|
|||
#!/bin/bash
|
||||
|
||||
# TODO Start Pyradio if not started
|
||||
# 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*)
|
||||
GENERATEFROMWP="Generuj z kolorów tapety..."
|
||||
LIGHTBG="Jasne tło"
|
||||
DARKBG="Ciemne tło"
|
||||
SETCOLORS="Ustaw kolory..."
|
||||
;;
|
||||
*)
|
||||
GENERATEFROMWP="Generate from wallpaper colors..."
|
||||
LIGHTBG="Light Background"
|
||||
DARKBG="Dark Background"
|
||||
SETCOLORS="Set colors individually..."
|
||||
;;
|
||||
esac
|
||||
|
||||
#getvalues () {
|
||||
getvalues () {
|
||||
read S SFG SBG<<< "$(grep '^Stations ' ${THEMERC})"
|
||||
read AS1 AS2 ASFG<<< "$(grep '^Active Station ' ${THEMERC})"
|
||||
read SB1 SB2 SBFG SBBG<<< "$(grep '^Status Bar ' ${THEMERC})"
|
||||
read NC1 NC2 NCFG NCBG<<< "$(grep '^Normal Cursor ' ${THEMERC})"
|
||||
read AC1 AC2 ACFG ACBG<<< "$(grep '^Active Cursor ' ${THEMERC})"
|
||||
read EC1 EC2 ECFG ECBG<<< "$(grep '^Edit Cursor ' ${THEMERC})"
|
||||
read EF1 EF2 EFFG<<< "$(grep '^Extra Func ' ${THEMERC})"
|
||||
read PURL1 PURL2 PURLFG<<< "$(grep '^PyRadio URL ' ${THEMERC})"
|
||||
read MB1 MB2 MBFG<<< "$(grep '^Messages Border ' ${THEMERC})"
|
||||
|
||||
#}
|
||||
|
||||
}
|
||||
getvalues
|
||||
|
||||
out+=("^sep(Colorize PyRadio)")
|
||||
out+=("^sep($GENERATEFROMWP)")
|
||||
out+=("$LIGHTBG,w2theme pyradio light;$me")
|
||||
out+=("$DARKBG,w2theme pyradio dark;$me")
|
||||
out+=("^sep($SETCOLORS)")
|
||||
out+=("<tt><span weight='bold' bgcolor='$SBG' fgcolor='$SFG'> AbCd </span></tt> Stations,^checkout(stations)")
|
||||
out2+=("^tag(stations)")
|
||||
out2+=("^sep(Stations)")
|
||||
out2+=("Stations Text,^pipe(mbclr '$SFG' prtctl stations_txt 'Stations Text' '$me')")
|
||||
out2+=("Stations Background,^pipe(mbclr '$SBG' prtctl stations_bg 'Stations Background' '$me')")
|
||||
|
||||
out+=("<tt><span weight='bold' bgcolor='$SBG' fgcolor='$ASFG'> AbCd </span></tt> Active Station (text),^pipe(mbclr '$ASFG' prtctl active_station ACTIVE_STATION '$me')")
|
||||
|
||||
out+=("<tt><span weight='bold' bgcolor='$NCBG' fgcolor='$NCFG'> AbCd </span></tt> Normal Cursor,^checkout(normalcursor)")
|
||||
out2+=("^tag(normalcursor)")
|
||||
out2+=("^sep(Normal Cursor)")
|
||||
out2+=("Normal Cursor Text,^pipe(mbclr '$NCFG' prtctl normal_cursor_txt 'Normal Cursor Text' '$me')")
|
||||
out2+=("Normal Cursor Background,^pipe(mbclr '$NCBG' prtctl normal_cursor_bg 'Normal Cursor Background' '$me')")
|
||||
|
||||
out+=("<tt><span weight='bold' bgcolor='$ACBG' fgcolor='$ACFG'> AbCd </span></tt> Active Cursor,^checkout(activecursor)")
|
||||
out2+=("^tag(activecursor)")
|
||||
out2+=("^sep(Active Cursor)")
|
||||
out2+=("Active Cursor Text,^pipe(mbclr '$ACFG' prtctl active_cursor_txt 'Active Cursor Text' '$me')")
|
||||
out2+=("Active Cursor Background,^pipe(mbclr '$ACBG' prtctl active_cursor_bg 'Active Cursor Background' '$me')")
|
||||
|
||||
|
||||
out+=("<tt><span weight='bold' bgcolor='$ECBG' fgcolor='$ECFG'> AbCd </span></tt> Edit Cursor,^checkout(editcursor)")
|
||||
out2+=("^tag(editcursor)")
|
||||
out2+=("^sep(Edit Cursor)")
|
||||
out2+=("Edit Cursor Text,^pipe(mbclr '$ECFG' prtctl edit_cursor_txt 'Edit Cursor Text' '$me')")
|
||||
out2+=("Edit Cursor Background,^pipe(mbclr '$ECBG' prtctl edit_cursor_bg 'Edit Cursor Background' '$me')")
|
||||
|
||||
out+=("<tt><span weight='bold' bgcolor='$SBBG' fgcolor='$SBFG'> AbCd </span></tt> Status Bar,^checkout(statusbar)")
|
||||
out2+=("^tag(statusbar)")
|
||||
out2+=("^sep(Status Bar)")
|
||||
out2+=("Status Bar Text,^pipe(mbclr '$SBFG' prtctl status_bar_txt 'Status Bar Text' '$me')")
|
||||
out2+=("Status Bar Background,^pipe(mbclr '$SBBG' prtctl status_bar_bg 'Status Bar Background' '$me')")
|
||||
out+=("<tt><span weight='bold' bgcolor='$SBG' fgcolor='$EFFG'> AbCd </span></tt> Extra Func,^pipe(mbclr '$EFFG' prtctl extra_func EXTRA_FUNC '$me')")
|
||||
out+=("<tt><span weight='bold' bgcolor='$SBG' fgcolor='$PURLFG'> AbCd </span></tt> PyRadio URL,^pipe(mbclr '$PURLFG' prtctl pyradio_url 'PyRadio URL' '$me')")
|
||||
out+=("<tt><span weight='bold' bgcolor='$SBG' fgcolor='$MBFG'> AbCd </span></tt> Messages Border,^pipe(mbclr '$MBFG' prtctl messages_border 'Messages Border' '$me')")
|
||||
|
||||
|
||||
### RUN
|
||||
|
@ -70,9 +123,9 @@ if [[ "$1" == "-s" ]]; then
|
|||
cat <<EOF > ${MENU_ITEMS}
|
||||
@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),270,150,4,left,top,,,${THUMB}
|
||||
#@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),270,150,4,left,top,,,/usr/share/mabox-colorizer/img/colorizer-conky.png
|
||||
@rect,,$((jgtools_padding + 244)),$((jgtools_padding + 6)),29,60,0,left,top,#FFFFFF 30,${WINCLR} 60,
|
||||
@rect,,$((jgtools_padding + 5)),$((jgtools_padding + 92)),29,60,0,left,top,#FFFFFF 30,${WINCLR} 60,
|
||||
@rect,,$((jgtools_padding + 36)),$((jgtools_padding + 112)),29,40,0,left,top,#FFFFFF 30,${WINCLR} 60,
|
||||
@rect,,$((jgtools_padding + 144)),$((jgtools_padding + 122)),120,30,4,left,top,#FFFFFF 60,#222222 80,
|
||||
@text,,$((jgtools_padding + 150)),$((jgtools_padding + 122)),120,30,0,left,top,#FFFFFF,${WINCLR}, <b>PyRadio</b>
|
||||
|
||||
$(printf '%s\n' "${out[@]}")
|
||||
$(printf '%s\n' "${out2[@]}")
|
||||
EOF
|
||||
|
@ -82,5 +135,5 @@ EOF
|
|||
fi
|
||||
|
||||
printf '%s\n' "${out[@]}"
|
||||
|
||||
printf '%s\n' "${out2[@]}"
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ transparent () {
|
|||
win_bgcolor_all () {
|
||||
sd "own_window_colour .*=.*$" "own_window_colour = '${1}'," ${CONKYDIR}/*mbcolor.conkyrc
|
||||
sd "own_window_transparent.*$" "own_window_transparent = false," ${CONKYDIR}/*mbcolor.conkyrc
|
||||
sd "own_window_transparent.*$" "own_window_transparent = true," ${CONKYDIR}/logo_mbcolor.conkyrc
|
||||
}
|
||||
win_bgcolor () {
|
||||
sd "own_window_colour .*=.*$" "own_window_colour = '${1}'," ${2}
|
||||
|
|
|
@ -11,6 +11,11 @@ THEMERC="$HOME/.config/mabox/jgobthemes/${OBTHEME}.colorrc";;
|
|||
THEMERC="$HOME/.config/mabox/jgobthemes/${jgmenu_theme}.colorrc";;
|
||||
esac
|
||||
|
||||
# Backup original theme file
|
||||
if [ ! -f "${THEMERC}.bak" ]; then
|
||||
cp ${THEMERC} ${THEMERC}.bak
|
||||
fi
|
||||
|
||||
reset () {
|
||||
rm ${THEMERC}
|
||||
mv ${THEMERC}.bak ${THEMERC}
|
||||
|
@ -129,9 +134,10 @@ color_norm_fg () {
|
|||
}
|
||||
color_sel_bg () {
|
||||
read SBG SBGA<<< "$(grep 'color_sel_bg' ${THEMERC} | cut -d'=' -f2)"
|
||||
alpha=${SBGA:-50}
|
||||
case "${#1}" in
|
||||
7) #color
|
||||
sd "color_sel_bg.*$" "color_sel_bg = $1 $SBGA" ${THEMERC}
|
||||
sd "color_sel_bg.*$" "color_sel_bg = $1 $alpha" ${THEMERC}
|
||||
;;
|
||||
*)
|
||||
sd "color_sel_bg.*$" "color_sel_bg = $SBG $1" ${THEMERC}
|
||||
|
|
93
bin/mbclr
93
bin/mbclr
|
@ -3,6 +3,34 @@
|
|||
# mbclr current polecenie funkcja argument backprg [config_file]
|
||||
# mbclr
|
||||
|
||||
case "$LANG" in
|
||||
pl*)
|
||||
SELECT_COLOR="Wybierz kolor"
|
||||
PICK_FROM_SCREEN="Pobierz kolor z ekranu"
|
||||
SELECT_OR_PICK="Wybierz kolor z selektora"
|
||||
OPACITY="Nieprzezroczystość"
|
||||
SHADES_OF_CURRENT="odcienie bieżącego"
|
||||
SHADES_OF="odcienie"
|
||||
WALLPAPER_COLORS="Kolory z tapety"
|
||||
ACCENT_COLORS="Popularne kolory akcentu"
|
||||
LIGHTCOLORS="Jasne kolory..."
|
||||
DARKCOLORS="Ciemne kolory..."
|
||||
;;
|
||||
*)
|
||||
SELECT_COLOR="Select color"
|
||||
PICK_FROM_SCREEN="Pick color from screen"
|
||||
SELECT_OR_PICK="Select or pick from screen"
|
||||
OPACITY="Opacity"
|
||||
SHADES_OF_CURRENT="shades of current"
|
||||
SHADES_OF="shades of"
|
||||
WALLPAPER_COLORS="Wallpaper colors"
|
||||
ACCENT_COLORS="Popular accent colors"
|
||||
LIGHTCOLORS="Light colors..."
|
||||
DARKCOLORS="Dark colors..."
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
main () {
|
||||
#read WALLPAPER<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
|
||||
WALLPALDIR="$HOME/.config/colormenu/palettes/wallp"
|
||||
|
@ -13,17 +41,20 @@ if [ ! -f "$WALLPALDIR/$WALLPAPER.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/$WALLPAPER.clr"
|
||||
fi
|
||||
mapfile -t wallcolors < "$WALLPALDIR/$WALLPAPER.clr"
|
||||
if [[ "${#wallcolors[@]}" -lt 8 ]]; then
|
||||
wallcolors+=("#2e3440" "#4c566a" "#5e81ac" "#bf616b" "#b48ead" "#a3be8c" "#ebcb8b" "#d8dee9" "#eceff4")
|
||||
fi
|
||||
|
||||
|
||||
dark=("#000000" "#111111" "#222222" "#333333" "#444444" "#555555" "#666666")
|
||||
light=("#FFFFFF" "#EEEEEE" "#DDDDDD" "#CCCCCC" "#BBBBBB" "#AAAAAA" "#999999")
|
||||
#yt=("#181818" "#212121" "#3d3d3d" "#FFFFFF" "#AAAAAA")
|
||||
plasma=("#e93a9a" "#e93d58" "#e9643a" "#e8cb2d" "#3dd425" "#00d3b8" "#3daee9" "#b875dc" "#926ee4" "#686b6f",)
|
||||
plasma=("#e93a9a" "#e93d58" "#e9643a" "#e8cb2d" "#3dd425" "#00d3b8" "#3daee9" "#b875dc" "#926ee4" "#686b6f")
|
||||
#ubuntu
|
||||
ubuntu=("#E95420" "#18b0b0" "#3584e4" "#0e8420" "#c748ba" "#77216f" "#c7162b" "#f4a100")
|
||||
#linuxmint
|
||||
mint+=("#6cabcd" "#5b73c4" "#aa876a" "#9d9d9d" "#db9d61" "#c76199" "#8c6ec9" "#c15b58" "#c8ac69" "#5aaa9a")
|
||||
w8+=("#a4c400" "#60a917" "#008a00" "#00aba9" "#1ba1e2" "#3e65ff" "#0050ef" "#6a00ff" "#aa00ff" "#f472d0" "#d80073" "#a20025" "#e51400" "#fa6800" "#f0a30a" "#e3c800" "#825a2c" "#6d8764" "#647687" "#76608a" "#87794e" "#a0522d")
|
||||
#w8+=("#a4c400" "#60a917" "#008a00" "#00aba9" "#1ba1e2" "#3e65ff" "#0050ef" "#6a00ff" "#aa00ff" "#f472d0" "#d80073" "#a20025" "#e51400" "#fa6800" "#f0a30a" "#e3c800" "#825a2c" "#6d8764" "#647687" "#76608a" "#87794e" "#a0522d")
|
||||
#for i in $(theme.sh -p |cut -d':' -f2)
|
||||
#do
|
||||
#colors+=("$i")
|
||||
|
@ -42,10 +73,10 @@ THEMERC="$HOME/.config/mabox/jgobthemes/${OBTHEME}.colorrc";;
|
|||
THEMERC="$HOME/.config/mabox/jgobthemes/${jgmenu_theme}.colorrc";;
|
||||
esac
|
||||
read COLOR OP<<< $(grep "${3}" ${THEMERC} | cut -d'=' -f2)
|
||||
out+=("^sep(OPACITY)")
|
||||
out+=("OPACITY <small>[ $OP ]</small>,^checkout(opacity)")
|
||||
out+=("^sep($OPACITY)")
|
||||
out+=("$OPACITY <small>[ $OP ]</small>,^checkout(opacity)")
|
||||
out2+=("^tag(opacity)")
|
||||
out2+=("^sep(OPACITY <small>[ $OP ]</small>")
|
||||
out2+=("^sep($OPACITY <small>[ $OP ]</small>")
|
||||
out2+=("<tt><small>100</small> <span bgcolor='$1' bgalpha='100%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 100;${5}")
|
||||
out2+=("<tt><small> 95</small> <span bgcolor='$1' bgalpha='95%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 95 ;${5}")
|
||||
out2+=("<tt><small> 90</small> <span bgcolor='$1' bgalpha='90%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 90 ;${5}")
|
||||
|
@ -64,62 +95,50 @@ fi
|
|||
|
||||
|
||||
#Current
|
||||
out+=("^sep(SELECT_COLOR)")
|
||||
out+=(" Pick color from screen,mbclr pixelcolor $2 $3 ${5} ${6}")
|
||||
out+=(" Select or pick from screen,mbclr pick $2 $3 ${5} ${6}")
|
||||
out+=("^sep($SELECT_COLOR)")
|
||||
out+=(" $PICK_FROM_SCREEN,mbclr pixelcolor $2 $3 ${5} ${6}")
|
||||
out+=(" $SELECT_OR_PICK,mbclr pick $2 $3 ${5} ${6}")
|
||||
out+=("^sep()")
|
||||
out+=("<tt><span bgcolor='$1'> </span></tt> shades of current,^checkout(curshades)")
|
||||
out+=("<tt><span bgcolor='$1'> </span></tt> $SHADES_OF_CURRENT (<small>$1</small>),^checkout(curshades)")
|
||||
|
||||
out+=("^sep(Wallpaper colors)")
|
||||
out+=("^sep($WALLPAPER_COLORS)")
|
||||
for i in "${wallcolors[@]}"
|
||||
do
|
||||
out+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,$2 $3 '${i}' ${6};${5}")
|
||||
done
|
||||
|
||||
out+=("^sep(ACCENT COLORS)")
|
||||
out+=("Ubuntu,^checkout(ubuntu)")
|
||||
out2+=("^tag(ubuntu)" "^sep(Ubuntu)")
|
||||
for i in ${ubuntu[@]};do out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,$2 $3 '${i}' ${6};${5}");done
|
||||
out+=("Mint,^checkout(mint)")
|
||||
out2+=("^tag(mint)" "^sep(Mint)")
|
||||
for i in ${mint[@]};do out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,$2 $3 '${i}' ${6};${5}");done
|
||||
out+=("Plasma,^checkout(plasma)")
|
||||
out2+=("^tag(plasma)" "^sep(Plasma)")
|
||||
for i in ${plasma[@]};do out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,$2 $3 '${i}' ${6};${5}");done
|
||||
out+=("W8,^checkout(w8)")
|
||||
out2+=("^tag(w8)" "^sep(W8)")
|
||||
for i in ${w8[@]};do out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,$2 $3 '${i}' ${6};${5}");done
|
||||
|
||||
|
||||
out+=("^sep()")
|
||||
out+=("<tt><span bgcolor='#DDDDDD'> </span></tt> Light colors..,^checkout(light)")
|
||||
out+=("$ACCENT_COLORS,^checkout(accents)")
|
||||
out2+=("^tag(accents)")
|
||||
out2+=("^sep(Ubuntu)")
|
||||
for i in ${ubuntu[@]};do out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,$2 $3 '${i}' ${6};${5}");done
|
||||
out2+=("^sep(Mint)")
|
||||
for i in ${mint[@]};do out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,$2 $3 '${i}' ${6};${5}");done
|
||||
out2+=("^sep(Plasma)")
|
||||
for i in ${plasma[@]};do out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,$2 $3 '${i}' ${6};${5}");done
|
||||
|
||||
out+=("^sep()")
|
||||
out+=("<tt><span bgcolor='#DDDDDD'> </span></tt> $LIGHTCOLORS,^checkout(light)")
|
||||
out2+=("^tag(light)")
|
||||
out2+=("^sep(LIGHT)")
|
||||
out2+=("^sep($LIGHTCOLORS)")
|
||||
for i in "${light[@]}"
|
||||
do
|
||||
out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,$2 $3 '${i}' ${6};${5}")
|
||||
done
|
||||
out+=("^sep()")
|
||||
out+=("<tt><span bgcolor='#222222'> </span></tt> Dark colors..,^checkout(dark)")
|
||||
out+=("<tt><span bgcolor='#222222'> </span></tt> $DARKCOLORS,^checkout(dark)")
|
||||
out2+=("^tag(dark)")
|
||||
out2+=("^sep(DARK)")
|
||||
out2+=("^sep($DARKCOLORS)")
|
||||
for i in "${dark[@]}"
|
||||
do
|
||||
out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,$2 $3 '${i}' ${6};${5}")
|
||||
done
|
||||
|
||||
#out+=("^sep()")
|
||||
#out+=("<tt><span bgcolor='#181818'> </span></tt> YT colors..,^checkout(yt)")
|
||||
#out2+=("^tag(yt)")
|
||||
#out2+=("^sep(yt)")
|
||||
#for i in "${yt[@]}"
|
||||
#do
|
||||
#out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,$2 $3 '${i}' ${6};${5}")
|
||||
#done
|
||||
|
||||
#Shades
|
||||
out2+=("^tag(curshades)")
|
||||
out2+=("^sep(Shades of $1)")
|
||||
out2+=("^sep($SHADES_OF $1)")
|
||||
for i in 3 25 2 15 1 05; do
|
||||
clr=$(pastel lighten 0.$i "${1}" | pastel format hex)
|
||||
if [ "${clr}" != "#ffffff" ];then
|
||||
|
|
|
@ -157,10 +157,6 @@ clractivebg () {
|
|||
sd "menu.items.active.bg.colorTo:.*$" "menu.items.active.bg.colorTo: ${colorTo}" ${THEMERC}
|
||||
|
||||
openbox --reconfigure
|
||||
# JGMENU based menus, sidepanels and tools
|
||||
jgctl color_title_bg ${colorTo}
|
||||
jgctl color_title_border ${1}
|
||||
jgctl color_sel_bg ${1}
|
||||
|
||||
|
||||
}
|
||||
|
|
55
bin/prtctl
55
bin/prtctl
|
@ -7,10 +7,17 @@
|
|||
THEMERC=~/.config/pyradio/themes/mbcolors.pyradio-theme
|
||||
|
||||
stations() {
|
||||
read S SFG SBG<<< "$(grep '^Stations ' ${THEMERC})"
|
||||
#notify-send.sh "$S" "$SFG $SBG"
|
||||
sd "^Stations .*$" "Stations $1 $2" ${THEMERC}
|
||||
}
|
||||
stations_txt() {
|
||||
read S SFG SBG<<< "$(grep '^Stations ' ${THEMERC})"
|
||||
sd "^Stations .*$" "Stations $1 $SBG" ${THEMERC}
|
||||
}
|
||||
stations_bg() {
|
||||
read S SFG SBG<<< "$(grep '^Stations ' ${THEMERC})"
|
||||
sd "^Stations .*$" "Stations $SFG $1" ${THEMERC}
|
||||
}
|
||||
|
||||
active_station(){
|
||||
read AS1 AS2 ASFG<<< "$(grep '^Active Station ' ${THEMERC})"
|
||||
sd "^Active Station .*$" "Active Station $1" ${THEMERC}
|
||||
|
@ -19,18 +26,48 @@ status_bar() {
|
|||
read SB1 SB2 SBFG SBBG<<< "$(grep '^Status Bar ' ${THEMERC})"
|
||||
sd "^Status Bar .*$" "Status Bar $1 $2" ${THEMERC}
|
||||
}
|
||||
status_bar_txt() {
|
||||
read SB1 SB2 SBFG SBBG<<< "$(grep '^Status Bar ' ${THEMERC})"
|
||||
sd "^Status Bar .*$" "Status Bar $1 $SBBG" ${THEMERC}
|
||||
}
|
||||
status_bar_bg() {
|
||||
read SB1 SB2 SBFG SBBG<<< "$(grep '^Status Bar ' ${THEMERC})"
|
||||
sd "^Status Bar .*$" "Status Bar $SBFG $1" ${THEMERC}
|
||||
}
|
||||
normal_cursor() {
|
||||
read NC1 NC2 NCFG NCBG<<< "$(grep '^Normal Cursor ' ${THEMERC})"
|
||||
sd "^Normal Cursor .*$" "Normal Cursor $1 $2" ${THEMERC}
|
||||
}
|
||||
normal_cursor_txt() {
|
||||
read NC1 NC2 NCFG NCBG<<< "$(grep '^Normal Cursor ' ${THEMERC})"
|
||||
sd "^Normal Cursor .*$" "Normal Cursor $1 $NCBG" ${THEMERC}
|
||||
}
|
||||
normal_cursor_bg() {
|
||||
read NC1 NC2 NCFG NCBG<<< "$(grep '^Normal Cursor ' ${THEMERC})"
|
||||
sd "^Normal Cursor .*$" "Normal Cursor $NCFG $1" ${THEMERC}
|
||||
}
|
||||
active_cursor() {
|
||||
read AC1 AC2 ACFG ACBG<<< "$(grep '^Active Cursor ' ${THEMERC})"
|
||||
sd "^Active Cursor .*$" "Active Cursor $1 $2" ${THEMERC}
|
||||
}
|
||||
active_cursor_txt() {
|
||||
read AC1 AC2 ACFG ACBG<<< "$(grep '^Active Cursor ' ${THEMERC})"
|
||||
sd "^Active Cursor .*$" "Active Cursor $1 $ACBG" ${THEMERC}
|
||||
}
|
||||
active_cursor_bg() {
|
||||
read AC1 AC2 ACFG ACBG<<< "$(grep '^Active Cursor ' ${THEMERC})"
|
||||
sd "^Active Cursor .*$" "Active Cursor $ACFG $1" ${THEMERC}
|
||||
}
|
||||
edit_cursor() {
|
||||
read EC1 EC2 ECFG ECBG<<< "$(grep '^Edit Cursor ' ${THEMERC})"
|
||||
sd "^Edit Cursor .*$" "Edit Cursor $1 $2" ${THEMERC}
|
||||
}
|
||||
edit_cursor_txt() {
|
||||
read EC1 EC2 ECFG ECBG<<< "$(grep '^Edit Cursor ' ${THEMERC})"
|
||||
sd "^Edit Cursor .*$" "Edit Cursor $1 $ECBG" ${THEMERC}
|
||||
}
|
||||
edit_cursor() {
|
||||
read EC1 EC2 ECFG ECBG<<< "$(grep '^Edit Cursor ' ${THEMERC})"
|
||||
sd "^Edit Cursor .*$" "Edit Cursor $ECFG $1" ${THEMERC}
|
||||
}
|
||||
extra_func() {
|
||||
sd "^Extra Func .*$" "Extra Func $1" ${THEMERC}
|
||||
}
|
||||
|
@ -42,13 +79,21 @@ messages_border() {
|
|||
}
|
||||
case "$1" in
|
||||
stations) stations "$2" "$3";;
|
||||
stations_fg) stations_fg "$2";;
|
||||
stations_txt) stations_txt "$2";;
|
||||
stations_bg) stations_bg "$2";;
|
||||
active_station) active_station "$2";;
|
||||
status_bar) status_bar "$2" "$3";;
|
||||
status_bar_txt) status_bar_txt "$2";;
|
||||
status_bar_bg) status_bar_bg "$2";;
|
||||
normal_cursor) normal_cursor "$2" "$3";;
|
||||
normal_cursor_txt) normal_cursor_txt "$2";;
|
||||
normal_cursor_bg) normal_cursor_bg "$2";;
|
||||
active_cursor) active_cursor "$2" "$3";;
|
||||
active_cursor_txt) active_cursor_txt "$2";;
|
||||
active_cursor_bg) active_cursor_bg "$2";;
|
||||
edit_cursor) edit_cursor "$2" "$3";;
|
||||
edit_cursor_txt) edit_cursor_txt "$2";;
|
||||
edit_cursor_bg) edit_cursor_bg "$2";;
|
||||
extra_func) extra_func "$2";;
|
||||
pyradio_url) pyradio_url "$2";;
|
||||
messages_border) messages_border "$2";;
|
||||
|
|
77
bin/w2theme
77
bin/w2theme
|
@ -11,10 +11,15 @@ convert ${WALLPATH} -resize 25% -colors 16 -unique-colors txt:- |grep -v '^#'| a
|
|||
fi
|
||||
mapfile -t w < "$WALLPALDIR/$WALLPAPER.clr"
|
||||
|
||||
if [[ "${#w[@]}" -lt 8 ]]; then
|
||||
w+=("#2e3440" "#4c566a" "#5e81ac" "#bf616b" "#b48ead" "#a3be8c" "#ebcb8b" "#d8dee9" "#eceff4")
|
||||
fi
|
||||
|
||||
menu_theme () {
|
||||
case "$1" in
|
||||
dark) #dark bg
|
||||
jgctl color_menu_bg "${w[0]}"
|
||||
jgctl color_menu_bg_to "${w[1]}"
|
||||
jgctl color_norm_fg "${w[-2]}"
|
||||
jgctl color_title_bg "${w[2]}"
|
||||
jgctl color_title_fg "${w[-2]}"
|
||||
|
@ -23,9 +28,11 @@ menu_theme () {
|
|||
jgctl color_sel_fg "${w[-1]}"
|
||||
jgctl color_sel_border "${w[3]}"
|
||||
jgctl color_sep_fg "${w[3]}"
|
||||
#sleep 1
|
||||
;;
|
||||
*) #light bg
|
||||
jgctl color_menu_bg "${w[-1]}"
|
||||
jgctl color_menu_bg_to "${w[-2]}"
|
||||
jgctl color_norm_fg "${w[1]}"
|
||||
jgctl color_title_bg "${w[-3]}"
|
||||
jgctl color_title_fg "${w[1]}"
|
||||
|
@ -34,7 +41,7 @@ menu_theme () {
|
|||
jgctl color_sel_fg "${w[0]}"
|
||||
jgctl color_sel_border "${w[-4]}"
|
||||
jgctl color_sep_fg "${w[-5]}"
|
||||
|
||||
#sleep 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
@ -51,8 +58,8 @@ conky_colors() {
|
|||
conkyctl win_bgcolor_all "${w[-1]}"
|
||||
conkyctl default_color_all "${w[0]}"
|
||||
conkyctl color0_all "${w[2]}"
|
||||
conkyctl color1_all "${w[3]}"
|
||||
conkyctl color2_all "${w[4]}"
|
||||
conkyctl color1_all "${w[4]}"
|
||||
conkyctl color2_all "${w[6]}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
@ -82,11 +89,75 @@ pyradio_theme() {
|
|||
;;
|
||||
esac
|
||||
}
|
||||
accent () {
|
||||
obtctl clractivebg ${1}
|
||||
colorTo=$(pastel darken 0.1 "${1}"|pastel format hex)
|
||||
# JGMENU based menus, sidepanels and tools
|
||||
jgctl color_title_bg ${colorTo}
|
||||
#TITLE_FG=$(pastel textcolor ${colorTo}|pastel format hex)
|
||||
TITLE_FG=$(pastel mix -f 0.4 ${colorTo} $(pastel textcolor ${colorTo})|pastel format hex)
|
||||
SEL_FG=$(pastel textcolor ${1}|pastel format hex)
|
||||
#notify-send.sh "FG" "${TITLE_FG}"
|
||||
jgctl color_title_fg ${TITLE_FG}
|
||||
jgctl color_title_border ${1}
|
||||
jgctl color_sel_bg ${1}
|
||||
jgctl color_sel_fg ${SEL_FG}
|
||||
}
|
||||
|
||||
colorize () {
|
||||
source ~/.config/colorizer/colorizer.conf
|
||||
# CONKY
|
||||
case "$wall2themes_conky" in
|
||||
dark) conky_colors dark;;
|
||||
light) conkycolors light;;
|
||||
*) : ;;
|
||||
esac
|
||||
# MENUS
|
||||
case "$wall2themes_menu" in
|
||||
dark) menu_theme dark;;
|
||||
light) menu_theme light;;
|
||||
*) : ;;
|
||||
esac
|
||||
# ACCENT_COLOR
|
||||
case "$wall2themes_accent" in
|
||||
dark)
|
||||
obtctl theme MBcolors
|
||||
accent ${w[1]}
|
||||
;;
|
||||
light)
|
||||
obtctl theme MBcolors
|
||||
accent ${w[-1]}
|
||||
;;
|
||||
*) : ;;
|
||||
esac
|
||||
# PYRADIO THEME
|
||||
case "$wall2themes_pyradio" in
|
||||
dark) pyradio_theme dark;;
|
||||
light) pyradio_theme light;;
|
||||
*) : ;;
|
||||
esac
|
||||
}
|
||||
|
||||
pin () {
|
||||
#get wallpaper path and filename without ext
|
||||
|
||||
# mkdir for colorscheme
|
||||
mkdir -p ~/.config/colorizer/pinned/$WALLNAME
|
||||
# if dir exist then action is update so remove old content
|
||||
rm -rf ~/.config/colorizer/pinned/$WALLNAME
|
||||
|
||||
# get menu themename jgmenu_theme= ( it is always MBcolors ????)
|
||||
. ~/.config/mabox/mabox.conf
|
||||
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
ob) obtheme "$2";;
|
||||
menu) menu_theme "$2";;
|
||||
conky) conky_colors "$2";;
|
||||
pyradio) pyradio_theme "$2";;
|
||||
accent) accent "$2";;
|
||||
colorize) colorize;;
|
||||
pin) pin;;
|
||||
*) ;;
|
||||
esac
|
||||
|
|
Loading…
Reference in New Issue