update
This commit is contained in:
78
bin/w2theme
78
bin/w2theme
@@ -17,6 +17,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# w2theme - generate themes from wallpaper colors
|
||||
. ~/.config/mabox/mabox.conf
|
||||
|
||||
WALLPALDIR="$HOME/.cache/colorizer/palettes"
|
||||
mkdir -p "$WALLPALDIR"
|
||||
@@ -49,6 +50,9 @@ accents=("#e93d57" "#c7162b" "#e9633a" "#e95620" "#f4a300" "#e8cc2d" "#3cd425" "
|
||||
|
||||
menu_theme () {
|
||||
jgctl theme MBcolors
|
||||
jgctl color_menu_bg 100
|
||||
jgctl color_menu_bg_to 100
|
||||
|
||||
case "$1" in
|
||||
dark2) #dark bg
|
||||
ITEM_FG=$(pastel textcolor ${w[1]}|pastel format hex)
|
||||
@@ -68,7 +72,9 @@ menu_theme () {
|
||||
jgctl color_sel_fg "${ITEM_FG}"
|
||||
jgctl color_sel_border "${w[2]}"
|
||||
jgctl color_sep_fg "${w[2]}"
|
||||
jgctl color_norm_bg "${w[1]}"
|
||||
#jgctl color_norm_bg "${w[1]}"
|
||||
jgctl color_norm_bg "#000000"
|
||||
jgctl color_norm_bg "10"
|
||||
#sleep 1
|
||||
;;
|
||||
dark) #dark bg
|
||||
@@ -89,7 +95,9 @@ menu_theme () {
|
||||
jgctl color_sel_fg "${ITEM_FG}"
|
||||
jgctl color_sel_border "${w[2]}"
|
||||
jgctl color_sep_fg "${w[2]}"
|
||||
jgctl color_norm_bg "${w[0]}"
|
||||
#jgctl color_norm_bg "${w[0]}"
|
||||
jgctl color_norm_bg "#FFFFFF"
|
||||
jgctl color_norm_bg "3"
|
||||
#sleep 1
|
||||
;;
|
||||
light) #light bg
|
||||
@@ -110,7 +118,9 @@ menu_theme () {
|
||||
jgctl color_sel_fg "${ITEM_FG}"
|
||||
jgctl color_sel_border "${w[-3]}"
|
||||
jgctl color_sep_fg "${w[-3]}"
|
||||
jgctl color_norm_bg "${w[-1]}"
|
||||
#jgctl color_norm_bg "${w[-1]}"
|
||||
jgctl color_norm_bg "#000000"
|
||||
jgctl color_norm_bg "5"
|
||||
#sleep 1
|
||||
;;
|
||||
light2) #light bg
|
||||
@@ -131,7 +141,9 @@ menu_theme () {
|
||||
jgctl color_sel_fg "${ITEM_FG}"
|
||||
jgctl color_sel_border "${w[-3]}"
|
||||
jgctl color_sep_fg "${w[-3]}"
|
||||
jgctl color_norm_bg "${w[-2]}"
|
||||
#jgctl color_norm_bg "${w[-2]}"
|
||||
jgctl color_norm_bg "#FFFFFF"
|
||||
jgctl color_norm_bg "10"
|
||||
#sleep 1
|
||||
;;
|
||||
esac
|
||||
@@ -159,8 +171,8 @@ conky_colors() {
|
||||
conkyctl color3_all "${w[-2]}"
|
||||
;;
|
||||
*) #light bg
|
||||
conkyctl win_bgcolor_all "${w[-1]}"
|
||||
conkyctl default_color_all "${w[1]}"
|
||||
conkyctl win_bgcolor_all "${w[-2]}"
|
||||
conkyctl default_color_all "${w[-3]}"
|
||||
conkyctl color0_all "${w[2]}"
|
||||
conkyctl color1_all "${w[5]}"
|
||||
conkyctl color2_all "${w[3]}"
|
||||
@@ -363,6 +375,30 @@ case "$1" in
|
||||
esac
|
||||
obtctl shadow 0
|
||||
}
|
||||
|
||||
logo_colors(){
|
||||
case "$1" in
|
||||
dark)
|
||||
mabox-logo colors ${w[1]} ${w[-1]}
|
||||
;;
|
||||
light)
|
||||
mabox-logo colors ${w[-2]} ${w[3]}
|
||||
;;
|
||||
esac
|
||||
}
|
||||
clock(){
|
||||
case "$1" in
|
||||
dark)
|
||||
conkyctl color8 ${w[2]} ~/.config/conky/Better_Clock_mbcolor.conkyrc
|
||||
conkyctl color9 ${w[4]} ~/.config/conky/Better_Clock_mbcolor.conkyrc
|
||||
;;
|
||||
light)
|
||||
conkyctl color8 ${w[-1]} ~/.config/conky/Better_Clock_mbcolor.conkyrc
|
||||
conkyctl color9 ${w[-2]} ~/.config/conky/Better_Clock_mbcolor.conkyrc
|
||||
|
||||
;;
|
||||
esac
|
||||
}
|
||||
notify_colorize(){
|
||||
|
||||
case "$LANG" in
|
||||
@@ -389,17 +425,35 @@ _RESET="Reset"
|
||||
esac
|
||||
|
||||
notify-send.sh -t 5000 -i ~/.config/mabox/wpicon_wide.png --replace-file=/tmp/colorize_notid "$_TITLE" "$_THEME_MODIFIED" \
|
||||
-o "$_NEXT:mbwallpaper -o" -o "$_SETTINGS:jgwallpaperchanger -s autoth" -o "$_RESET:w2theme resetall"
|
||||
-o "$_NEXT:mbwallpaper -o" -o "$_SETTINGS:jgwallpaperchanger -s autoth" -o "$_RESET:w2theme resetall" -o "DISABLE NOTIFY:mb-setvar autotheming_notify=false"
|
||||
}
|
||||
colorize () {
|
||||
source ~/.config/colorizer/colorizer.conf
|
||||
[ -v autotheming_notify ] && : || mb-setvar autotheming_notify=true
|
||||
if [[ "$autotheming_notify" == "true" ]];then
|
||||
notify-send.sh -t 5000 -i ~/.config/mabox/wpicon_wide.png --replace-file=/tmp/colorize_notid "Mabox Auto theming in progress..." "\n\nPlease wait... a few seconds...\n\n"
|
||||
fi
|
||||
#
|
||||
# Logo SVG
|
||||
case "$wall2themes_logo" in
|
||||
dark) logo_colors dark;;
|
||||
light) logo_colors light;;
|
||||
*) : ;;
|
||||
esac
|
||||
# Better Clock
|
||||
case "$wall2themes_clock" in
|
||||
dark) clock dark;;
|
||||
light) clock light;;
|
||||
*) : ;;
|
||||
esac
|
||||
|
||||
# CONKY
|
||||
case "$wall2themes_conky" in
|
||||
dark) conky_colors dark;;
|
||||
light) conky_colors light;;
|
||||
*) : ;;
|
||||
esac
|
||||
|
||||
|
||||
#show_desktop
|
||||
#sleep 1
|
||||
@@ -436,9 +490,9 @@ colorize () {
|
||||
light) menu_theme light;;
|
||||
*) : ;;
|
||||
esac
|
||||
|
||||
if [[ "$autotheming_notify" == true ]];then
|
||||
notify_colorize
|
||||
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
@@ -484,8 +538,9 @@ reverse () {
|
||||
*) : ;;
|
||||
esac
|
||||
|
||||
|
||||
if [[ "$autotheming_notify" == "true" ]];then
|
||||
notify_colorize
|
||||
fi
|
||||
}
|
||||
|
||||
genthumb () {
|
||||
@@ -518,6 +573,7 @@ rm -rf ~/.config/colorizer/pinned/$WALLNAME
|
||||
}
|
||||
resetall(){
|
||||
fehbg default
|
||||
mabox-logo default
|
||||
conkyctl resetcolorsall
|
||||
obtctl resetMBcolors
|
||||
jgctl resetMBcolors
|
||||
@@ -532,6 +588,8 @@ case "$1" in
|
||||
conkyone) conky_colorsone "$2" "$3";;
|
||||
pyradio) pyradio_theme "$2";;
|
||||
cava) cava "$2";;
|
||||
logo_colors) logo_colors "$2";;
|
||||
clock) clock "$2";;
|
||||
accent) accent "$2";;
|
||||
gradient) gradient "$2" "$3";;
|
||||
colorize) colorize;;
|
||||
|
||||
Reference in New Issue
Block a user