2022-05-15 03:25:01 +02:00
|
|
|
#!/bin/bash
|
2022-09-19 20:59:26 +02:00
|
|
|
#
|
|
|
|
# colorizer - set of tools for Mabox theming
|
|
|
|
# Copyright (C) 2022 Daniel Napora <napcok@gmail.com>
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2022-08-15 01:42:52 +02:00
|
|
|
|
|
|
|
CNF_DIR="$HOME/.config/colorizer"
|
|
|
|
mkdir -p "$CNF_DIR"
|
|
|
|
CNF_FILE="$CNF_DIR/colorizer.conf"
|
2022-08-16 16:50:11 +02:00
|
|
|
CUSTOM_COMMANDS_FILE="$CNF_DIR/custom.csv"
|
|
|
|
|
2022-08-15 01:42:52 +02:00
|
|
|
if [ ! -f $CNF_FILE ]; then
|
|
|
|
cat <<EOF > ${CNF_FILE}
|
|
|
|
# Autogenerate color themes on wallpaper change? yes or no
|
2022-08-16 16:50:11 +02:00
|
|
|
wall2themes=no
|
2022-12-23 13:48:01 +01:00
|
|
|
# OB window decoration preferred color style: dark, light or none
|
|
|
|
wall2themes_ob=light
|
2022-08-15 01:42:52 +02:00
|
|
|
# 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
|
2022-08-16 16:50:11 +02:00
|
|
|
# Show related tools (show or hide)
|
|
|
|
related_tools=hide
|
|
|
|
# Colorizer size: full or compact
|
2022-09-19 20:59:26 +02:00
|
|
|
colorizer_size=full
|
|
|
|
# Action for rootmenucolors: accent or select
|
2022-12-08 17:48:55 +01:00
|
|
|
rootcolors=select
|
2022-09-19 20:59:26 +02:00
|
|
|
# Different colors for each/some Conkys: yes or no
|
2022-12-08 17:48:55 +01:00
|
|
|
conky_diff_colors=no
|
2022-09-19 20:59:26 +02:00
|
|
|
# Gradients: change openbox theme? (active window titlebar)
|
|
|
|
gradient_obtheme=yes
|
|
|
|
# Gradients: change menu/panels background?
|
2022-12-08 17:48:55 +01:00
|
|
|
gradient_menu=no
|
2022-08-15 01:42:52 +02:00
|
|
|
EOF
|
|
|
|
# Copy new nitrogen wrapper
|
|
|
|
cp -a /usr/share/mabox/common/wrappers/nitrogen ~/.local/bin/
|
|
|
|
fi
|
|
|
|
|
|
|
|
source "$CNF_FILE"
|
|
|
|
|
2022-06-11 12:57:39 +02:00
|
|
|
case "$LANG" in
|
|
|
|
pl*)
|
2022-09-26 10:02:47 +02:00
|
|
|
REGENERATE="(Re)Generuj z kolorów tapety..."
|
2022-08-20 20:51:56 +02:00
|
|
|
REGENERATEALL="Regeneruj wszystko"
|
|
|
|
ASCONFIGURED="wg konfiguracji"
|
|
|
|
REVERSE="odwrotnie"
|
|
|
|
CURRENTCONF="Obecna konfiguracja"
|
|
|
|
MODULES="Moduły"
|
2022-06-11 12:57:39 +02:00
|
|
|
OBTHEME="Motyw Openbox"
|
|
|
|
MENUPANELS="Menu i Panele"
|
|
|
|
TERMINALTHEME="Motyw terminala"
|
2022-07-06 08:41:00 +02:00
|
|
|
WALLCOLORS="Kolory z tapety"
|
2022-09-19 20:59:26 +02:00
|
|
|
ACCENTINFO="<i>ustaw kolor akcentu...</i>"
|
|
|
|
SELECT_ACTION="<i>wybierz działanie...</i>"
|
|
|
|
COLOR="Kolor"
|
|
|
|
SETACCENT="Ustaw kolor akcentu"
|
|
|
|
ACTIVE_WIN="<i>aktywne okno...</i>"
|
|
|
|
OB_ACTIVE_BG="Tło paska tytułowego"
|
|
|
|
OB_ACTIVE_BGTO="Tło paska tytułowego 2 <i>(dla gradientu)</i>"
|
|
|
|
OB_ACTIVE_TEXT="Tytuł aktywnego okna"
|
|
|
|
OB_ACTIVE_BORDER="Obramowanie"
|
|
|
|
INACTIVE_WIN="<i>nieaktywne okno...</i>"
|
|
|
|
OB_INACTIVE_BG="Tło paska tytułowego"
|
|
|
|
OB_INACTIVE_BGTO="Tło paska tytułowego 2 <i>(dla gradientu)</i>"
|
|
|
|
OB_INACTIVE_TEXT="Tytuł nieaktywnego okna"
|
|
|
|
OB_INACTIVE_BORDER="Obramowanie"
|
|
|
|
CONKY_BGCOLOR_ALL="Kolor tła (wszystkie)"
|
|
|
|
RUNNING_CONKYS="<i>działające Conky...</i>"
|
|
|
|
BGCOLOR_OF="Kolor tła dla"
|
|
|
|
MENU_BGCOLOR="Kolor tła menu"
|
|
|
|
MENU_SEP_BG="Kolor tła separatora/nagłówka"
|
|
|
|
MENU_ACTIVE_BG="Kolor aktywnej pozycji (akcent)"
|
|
|
|
MENU_ITEM_FG="Kolor elementu menu"
|
|
|
|
MENU_BORDER="Kolor obramowania menu"
|
|
|
|
|
2022-08-15 01:42:52 +02:00
|
|
|
ACCENT_COLORS="Popularne kolory akcentu"
|
|
|
|
EDIT_PALETTE="Edytuj paletę kolorów"
|
|
|
|
RANDWALL="Ustaw losową tapetę"
|
2022-08-16 16:50:11 +02:00
|
|
|
SYSWALLPAPER="Tapety <b>systemowe</b>"
|
|
|
|
USERWALLPAPER="Tapety <b>użytkownika</b>"
|
2022-09-19 20:59:26 +02:00
|
|
|
GRADIENTS="Gradienty"
|
2022-12-08 17:48:55 +01:00
|
|
|
PRE_GRADIENTS="Gradienty"
|
2022-09-19 20:59:26 +02:00
|
|
|
GRAD_OB="Stosować do motywu OpenBox?"
|
|
|
|
GRAD_MENU="Stosować do Menu/Paneli?"
|
|
|
|
GRAD_CONKY="Stosować do Conky?"
|
2022-08-15 01:42:52 +02:00
|
|
|
SETTINGS_AND_HELP="Pomoc i Ustawienia"
|
|
|
|
SETTINGS="Ustawienia"
|
|
|
|
COLORIZER_SETTINGS="Ustawienia Colorizera"
|
|
|
|
AUTOGEN_THEMES="Autogenerowanie motywów?"
|
2022-08-27 18:52:55 +02:00
|
|
|
GENERATETHEMES="Generować motywy po zmianie tapety?"
|
2022-12-23 13:48:01 +01:00
|
|
|
GENOB="Pokolorować Dekoracje Okien?"
|
2022-08-20 20:51:56 +02:00
|
|
|
GENMENU="Pokolorować menu i panele?"
|
|
|
|
GENCONKY="Pokolorować Conky?"
|
|
|
|
GENPYRADIO="Pokolorować PyRadio?"
|
2022-08-15 01:42:52 +02:00
|
|
|
EDITCONF="Edytuj plik konfiguracyjny"
|
2022-08-16 16:50:11 +02:00
|
|
|
RESET="Resetuj ustawienia Colorizera"
|
2022-08-15 01:42:52 +02:00
|
|
|
YES="Tak"
|
|
|
|
NO="Nie"
|
|
|
|
LIGHTBG="<b>light</b> - jasne tło"
|
|
|
|
DARKBG="<b>dark</b> - ciemne tło"
|
2022-08-16 16:50:11 +02:00
|
|
|
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"
|
2022-09-19 20:59:26 +02:00
|
|
|
ROOTMENU_COLORS_ACTION="Akcja dla kolorów w menu głównym"
|
|
|
|
ACCENT="<b>accent</b> - zmień kolor akcentu"
|
|
|
|
SELECT="<b>select</b> - wybierz akcję..."
|
|
|
|
DIFF_CONKY_COLORS="Różne kolory dla Conky"
|
2022-12-19 22:22:23 +01:00
|
|
|
HELP="Okno główne i Pomoc"
|
2022-12-17 12:12:52 +01:00
|
|
|
RESET_COLORS="Resetuj kolory"
|
|
|
|
RESET_CHOOSE="Resetuj..."
|
|
|
|
RESET_SEP="Resetuj kolory dla"
|
|
|
|
RES_OB_WD="Dekoracje okien OpenBox"
|
|
|
|
RES_CONKY="Conky"
|
|
|
|
RES_MENU="Menu i Paneli"
|
|
|
|
RES_ALL="Wszystko <i>(OB, menu, conky)</i>"
|
2022-12-22 02:33:00 +01:00
|
|
|
COLORIZE="Pokoloruj..."
|
2022-06-11 12:57:39 +02:00
|
|
|
;;
|
|
|
|
*)
|
2022-09-26 10:02:47 +02:00
|
|
|
REGENERATE="(Re)Generate from wallpaper colors..."
|
2022-08-20 20:51:56 +02:00
|
|
|
REGENERATEALL="Regenerate all"
|
|
|
|
ASCONFIGURED="as configured"
|
|
|
|
REVERSE="reverse"
|
|
|
|
CURRENTCONF="Current configuration"
|
|
|
|
MODULES="Modules"
|
2022-06-11 12:57:39 +02:00
|
|
|
OBTHEME="Openbox Theme"
|
|
|
|
MENUPANELS="Menus/Panels"
|
|
|
|
TERMINALTHEME="Terminal color scheme"
|
2022-07-06 08:41:00 +02:00
|
|
|
WALLCOLORS="Wallpaper Colors"
|
|
|
|
ACCENTINFO="<i>click to set accent color</i>"
|
2022-09-19 20:59:26 +02:00
|
|
|
SELECT_ACTION="<i>select action...</i>"
|
|
|
|
COLOR="Color"
|
|
|
|
SETACCENT="Set accent color"
|
|
|
|
ACTIVE_WIN="<i>active window...</i>"
|
|
|
|
OB_ACTIVE_BG="Background"
|
|
|
|
OB_ACTIVE_BGTO="Background 2 <i>(for gradients)</i>"
|
|
|
|
OB_ACTIVE_TEXT="Title text color"
|
|
|
|
OB_ACTIVE_BORDER="Border"
|
|
|
|
INACTIVE_WIN="<i>inactive window...</i>"
|
|
|
|
OB_INACTIVE_BG="Background"
|
|
|
|
OB_INACTIVE_BGTO="Background 2 <i>(for gradients)</i>"
|
|
|
|
OB_INACTIVE_TEXT="Title text color"
|
|
|
|
OB_INACTIVE_BORDER="Border"
|
|
|
|
CONKY_BGCOLOR_ALL="Background color (all)"
|
|
|
|
RUNNING_CONKYS="<i>running Conkys...</i>"
|
|
|
|
BGCOLOR_OF="Background color for"
|
|
|
|
MENU_BGCOLOR="Menu Background"
|
|
|
|
MENU_SEP_BG="Separator/Title Background"
|
|
|
|
MENU_ACTIVE_BG="Active item Background (accent)"
|
|
|
|
MENU_ITEM_FG="Item Foreground"
|
|
|
|
MENU_BORDER="Menu Border Color"
|
2022-08-15 01:42:52 +02:00
|
|
|
ACCENT_COLORS="Popular accent colors"
|
|
|
|
EDIT_PALETTE="Edit color palette"
|
|
|
|
RANDWALL="Set random wallpaper"
|
2022-08-16 17:55:55 +02:00
|
|
|
SYSWALLPAPER="<b>System</b> Wallpapers"
|
|
|
|
USERWALLPAPER="<b>User</b> Wallpapers"
|
2022-09-19 20:59:26 +02:00
|
|
|
GRADIENTS="Gradients"
|
|
|
|
PRE_GRADIENTS="Gradients"
|
|
|
|
GRAD_OB="Apply to OpenBox theme?"
|
|
|
|
GRAD_MENU="Apply to Menu/Panels?"
|
|
|
|
GRAD_CONKY="Apply to Conkies?"
|
2022-08-15 01:42:52 +02:00
|
|
|
SETTINGS_AND_HELP="Settings and Help"
|
|
|
|
SETTINGS="Settings"
|
|
|
|
COLORIZER_SETTINGS="Colorizer Settings"
|
|
|
|
AUTOGEN_THEMES="Autogenerate themes?"
|
2022-08-27 18:52:55 +02:00
|
|
|
GENERATETHEMES="Generate themes on wallpaper change?"
|
2022-12-23 13:48:01 +01:00
|
|
|
GENOB="Colorize Window Decorations?"
|
2022-08-20 20:51:56 +02:00
|
|
|
GENMENU="Colorize Menus and Panels?"
|
|
|
|
GENCONKY="Colorize Conky?"
|
|
|
|
GENPYRADIO="Colorize PyRadio?"
|
2022-08-15 01:42:52 +02:00
|
|
|
EDITCONF="Edit config file"
|
|
|
|
RESET="Reset to defaults"
|
|
|
|
YES="Yes"
|
|
|
|
NO="No"
|
|
|
|
LIGHTBG="with <b>light</b> background"
|
|
|
|
DARKBG="with <b>dark</b> background"
|
2022-08-16 16:50:11 +02:00
|
|
|
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"
|
2022-09-19 20:59:26 +02:00
|
|
|
ROOTMENU_COLORS_ACTION="Rootmenu Colors Action"
|
|
|
|
ACCENT="<b>accent</b> - chenge accent color"
|
|
|
|
SELECT="<b>select</b> - select action"
|
|
|
|
DIFF_CONKY_COLORS="Different colors for each Conky"
|
2022-12-19 22:22:23 +01:00
|
|
|
HELP="Main Window and Help"
|
2022-12-17 12:12:52 +01:00
|
|
|
RESET_COLORS="Reset Colors"
|
|
|
|
RESET_CHOOSE="Reset..."
|
2022-12-22 02:33:00 +01:00
|
|
|
RESET_SEP="Reset Colors of ..."
|
2022-12-17 12:12:52 +01:00
|
|
|
RES_OB_WD="OpenBox Window Decorations"
|
|
|
|
RES_CONKY="Conkies"
|
|
|
|
RES_MENU="Menus / Panels"
|
|
|
|
RES_ALL="All <i>(OB, menus, conky)</i>"
|
2022-12-22 02:33:00 +01:00
|
|
|
COLORIZE="Colorize..."
|
2022-06-11 12:57:39 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2022-08-16 16:50:11 +02:00
|
|
|
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)
|
|
|
|
WALLPAPER=${WALLPATH##*/}
|
|
|
|
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")
|
|
|
|
|
|
|
|
|
2022-05-15 03:25:01 +02:00
|
|
|
out+=("^sep(Mabox Colorizer)")
|
2022-12-17 12:12:52 +01:00
|
|
|
out+=(" $SETTINGS,^checkout(settings)")
|
2022-12-08 17:48:55 +01:00
|
|
|
LNG=${LANG:0:2}
|
|
|
|
if [[ -f "/usr/share/mabox-colorizer/help/$LNG.html" ]];then
|
2022-12-19 22:22:23 +01:00
|
|
|
out+=(" $HELP,yhtml /usr/share/mabox-colorizer/help/$LNG.html 'Mabox Colorizer'")
|
2022-12-08 17:48:55 +01:00
|
|
|
else
|
2022-12-19 22:22:23 +01:00
|
|
|
out+=(" $HELP,yhtml /usr/share/mabox-colorizer/help/en.html 'Mabox Colorizer'")
|
2022-12-08 17:48:55 +01:00
|
|
|
fi
|
|
|
|
out+=("^sep()")
|
2022-12-22 02:33:00 +01:00
|
|
|
out+=(" $COLORIZE,^pipe(randomizer c)")
|
2022-08-20 20:51:56 +02:00
|
|
|
out+=("^sep($MODULES)")
|
2022-06-11 12:57:39 +02:00
|
|
|
out+=("$OBTHEME,^pipe(colorizer-ob)")
|
2022-09-19 20:59:26 +02:00
|
|
|
out+=("Conky,^pipe(colorizer-conky)")
|
2022-06-11 12:57:39 +02:00
|
|
|
out+=("$MENUPANELS,^pipe(colorizer-menus)")
|
2022-05-15 03:25:01 +02:00
|
|
|
#out+=("TINT2,^pipe(colorizer-tint2)")
|
2022-05-15 15:56:00 +02:00
|
|
|
#out+=("Systray HW monitor,^pipe(colorizer-phwmon)")
|
2022-09-19 20:59:26 +02:00
|
|
|
|
|
|
|
if pgrep -f pyradio >/dev/null ;then
|
|
|
|
out+=("^sep()")
|
|
|
|
out+=("PyRadio,^pipe(colorizer-pyradio)")
|
|
|
|
fi
|
|
|
|
|
2022-07-06 08:41:00 +02:00
|
|
|
out+=("^sep($WALLCOLORS)")
|
2022-12-19 22:22:23 +01:00
|
|
|
out+=("北 $REGENERATE,^checkout(regen)")
|
|
|
|
out2+=("^tag(regen)")
|
|
|
|
out2+=("^sep($REGENERATEALL)")
|
|
|
|
out2+=(" $ASCONFIGURED,w2theme colorize;colorizer -s")
|
|
|
|
out2+=(" $REVERSE,w2theme reverse;colorizer -s")
|
|
|
|
#out2+=("^sep($CURRENTCONF)")
|
|
|
|
#out2+=("$MENUPANELS [ <b>${wall2themes_menu}</b> ],^checkout(mp)")
|
|
|
|
#out2+=("Conky [ <b>${wall2themes_conky}</b> ],^checkout(conky)")
|
|
|
|
#out2+=("PyRadio [ <b>${wall2themes_pyradio}</b> ],^checkout(pyradio)")
|
|
|
|
|
2022-09-19 20:59:26 +02:00
|
|
|
[[ $rootcolors = select ]]&& out+=("^sep($SELECT_ACTION)")||out+=("^sep($ACCENTINFO)")
|
|
|
|
n=0
|
2022-07-06 08:41:00 +02:00
|
|
|
for i in "${w[@]}"
|
|
|
|
do
|
2022-09-19 20:59:26 +02:00
|
|
|
if [ $rootcolors = select ];then
|
|
|
|
((n+=1))
|
|
|
|
out+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,^checkout(${i:1}${n}")
|
|
|
|
out2+=("^tag(${i:1}${n})")
|
|
|
|
out2+=("^sep(<tt>$COLOR <span bgcolor='$i'> </span> <small>$i</small> <span bgcolor='$i'> </span></tt>)")
|
|
|
|
out2+=("$SETACCENT,w2theme accent '${i}';colorizer -s")
|
|
|
|
out2+=("^sep(<big>OpenBox</big>)")
|
|
|
|
out2+=("^sep(<small>$ACTIVE_WIN</small>)")
|
|
|
|
out2+=("$OB_ACTIVE_BG,obtctl clractivebg '${i}';colorizer -s")
|
|
|
|
out2+=("$OB_ACTIVE_BGTO,obtctl clractivebgto '${i}';colorizer -s")
|
|
|
|
out2+=("$OB_ACTIVE_TEXT,obtctl activetextcolor '${i}';colorizer -s")
|
|
|
|
out2+=("$OB_ACTIVE_BORDER,obtctl activeborderColor '${i}';colorizer -s")
|
|
|
|
out2+=("^sep(<small>$INACTIVE_WIN</small>)")
|
|
|
|
out2+=("$OB_INACTIVE_BG,obtctl clrnormalbg '${i}';colorizer -s")
|
|
|
|
out2+=("$OB_INACTIVE_BGTO,obtctl clrnormalbgto '${i}';colorizer -s")
|
|
|
|
out2+=("$OB_INACTIVE_TEXT,obtctl inactivetextcolor '${i}';colorizer -s")
|
|
|
|
out2+=("$OB_INACTIVE_BORDER,obtctl inactiveborderColor '${i}';colorizer -s")
|
|
|
|
|
|
|
|
out2+=("^sep(<big>$MENUPANELS</big>)")
|
|
|
|
out2+=("$MENU_BGCOLOR,jgctl color_menu_bg '${i}';colorizer -s")
|
|
|
|
out2+=("$MENU_SEP_BG,jgctl color_title_bg '${i}';colorizer -s")
|
|
|
|
out2+=("$MENU_ITEM_FG,jgctl color_norm_fg '${i}';colorizer -s")
|
|
|
|
out2+=("$MENU_ACTIVE_BG,jgctl color_sel_bg '${i}';colorizer -s")
|
|
|
|
out2+=("$MENU_BORDER,jgctl color_menu_border '${i}';colorizer -s")
|
|
|
|
|
|
|
|
out2+=("^sep(<big>Conky</big>)")
|
|
|
|
out2+=("$CONKY_BGCOLOR_ALL,conkyctl win_bgcolor_all '${i}';colorizer -s")
|
|
|
|
# array with running conkies - only filenames with full path
|
|
|
|
readarray -t running < <(pgrep -af "conky.*mbcolor" | cut -d' ' -f4)
|
|
|
|
|
|
|
|
if [[ ${#running[@]} > 0 ]];then
|
|
|
|
out2+=("^sep(<small>$RUNNING_CONKYS</small>)")
|
|
|
|
for c in ${running[@]};do
|
|
|
|
filename=${c##*/}
|
|
|
|
name=${filename%%_mb*}
|
|
|
|
title=${name//_/ }
|
|
|
|
out2+=("$BGCOLOR_OF ${title^},conkyctl win_bgcolor '${i}' '${c}';colorizer -s")
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
else
|
|
|
|
out+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,w2theme accent '${i}';colorizer -s")
|
|
|
|
fi
|
|
|
|
|
2022-07-06 08:41:00 +02:00
|
|
|
done
|
|
|
|
out+=("^sep()")
|
2022-08-15 01:42:52 +02:00
|
|
|
out+=("$ACCENT_COLORS,^checkout(acccolors)")
|
|
|
|
out2+=("^tag(acccolors)")
|
|
|
|
out2+=("^sep(Ubuntu)")
|
2022-09-21 15:06:03 +02:00
|
|
|
for i in ${ubuntu[@]};do
|
|
|
|
if [ $rootcolors = select ];then
|
|
|
|
((n+=1))
|
|
|
|
out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,^checkout(${i:1}${n}")
|
|
|
|
out3+=("^tag(${i:1}${n})")
|
|
|
|
out3+=("^sep(<tt>$COLOR <span bgcolor='$i'> </span> <small>$i</small> <span bgcolor='$i'> </span></tt>)")
|
|
|
|
out3+=("$SETACCENT,w2theme accent '${i}';colorizer -s")
|
|
|
|
out3+=("^sep(<big>OpenBox</big>)")
|
|
|
|
out3+=("^sep(<small>$ACTIVE_WIN</small>)")
|
|
|
|
out3+=("$OB_ACTIVE_BG,obtctl clractivebg '${i}';colorizer -s")
|
|
|
|
out3+=("$OB_ACTIVE_BGTO,obtctl clractivebgto '${i}';colorizer -s")
|
|
|
|
out3+=("$OB_ACTIVE_TEXT,obtctl activetextcolor '${i}';colorizer -s")
|
|
|
|
out3+=("$OB_ACTIVE_BORDER,obtctl activeborderColor '${i}';colorizer -s")
|
|
|
|
out3+=("^sep(<small>$INACTIVE_WIN</small>)")
|
|
|
|
out3+=("$OB_INACTIVE_BG,obtctl clrnormalbg '${i}';colorizer -s")
|
|
|
|
out3+=("$OB_INACTIVE_BGTO,obtctl clrnormalbgto '${i}';colorizer -s")
|
|
|
|
out3+=("$OB_INACTIVE_TEXT,obtctl inactivetextcolor '${i}';colorizer -s")
|
|
|
|
out3+=("$OB_INACTIVE_BORDER,obtctl inactiveborderColor '${i}';colorizer -s")
|
|
|
|
|
|
|
|
out3+=("^sep(<big>$MENUPANELS</big>)")
|
|
|
|
out3+=("$MENU_BGCOLOR,jgctl color_menu_bg '${i}';colorizer -s")
|
|
|
|
out3+=("$MENU_SEP_BG,jgctl color_title_bg '${i}';colorizer -s")
|
|
|
|
out3+=("$MENU_ITEM_FG,jgctl color_norm_fg '${i}';colorizer -s")
|
|
|
|
out3+=("$MENU_ACTIVE_BG,jgctl color_sel_bg '${i}';colorizer -s")
|
|
|
|
out3+=("$MENU_BORDER,jgctl color_menu_border '${i}';colorizer -s")
|
|
|
|
|
|
|
|
out3+=("^sep(<big>Conky</big>)")
|
|
|
|
out3+=("$CONKY_BGCOLOR_ALL,conkyctl win_bgcolor_all '${i}';colorizer -s")
|
|
|
|
# array with running conkies - only filenames with full path
|
|
|
|
readarray -t running < <(pgrep -af "conky.*mbcolor" | cut -d' ' -f4)
|
|
|
|
|
|
|
|
if [[ ${#running[@]} > 0 ]];then
|
|
|
|
out3+=("^sep(<small>$RUNNING_CONKYS</small>)")
|
|
|
|
for c in ${running[@]};do
|
|
|
|
filename=${c##*/}
|
|
|
|
name=${filename%%_mb*}
|
|
|
|
title=${name//_/ }
|
|
|
|
out3+=("$BGCOLOR_OF ${title^},conkyctl win_bgcolor '${i}' '${c}';colorizer -s")
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,w2theme accent '${i}';colorizer -s")
|
|
|
|
fi
|
|
|
|
done
|
2022-08-15 01:42:52 +02:00
|
|
|
out2+=("^sep(Mint)")
|
2022-09-21 15:06:03 +02:00
|
|
|
for i in ${mint[@]};do
|
|
|
|
if [ $rootcolors = select ];then
|
|
|
|
((n+=1))
|
|
|
|
out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,^checkout(${i:1}${n}")
|
|
|
|
out3+=("^tag(${i:1}${n})")
|
|
|
|
out3+=("^sep(<tt>$COLOR <span bgcolor='$i'> </span> <small>$i</small> <span bgcolor='$i'> </span></tt>)")
|
|
|
|
out3+=("$SETACCENT,w2theme accent '${i}';colorizer -s")
|
|
|
|
out3+=("^sep(<big>OpenBox</big>)")
|
|
|
|
out3+=("^sep(<small>$ACTIVE_WIN</small>)")
|
|
|
|
out3+=("$OB_ACTIVE_BG,obtctl clractivebg '${i}';colorizer -s")
|
|
|
|
out3+=("$OB_ACTIVE_BGTO,obtctl clractivebgto '${i}';colorizer -s")
|
|
|
|
out3+=("$OB_ACTIVE_TEXT,obtctl activetextcolor '${i}';colorizer -s")
|
|
|
|
out3+=("$OB_ACTIVE_BORDER,obtctl activeborderColor '${i}';colorizer -s")
|
|
|
|
out3+=("^sep(<small>$INACTIVE_WIN</small>)")
|
|
|
|
out3+=("$OB_INACTIVE_BG,obtctl clrnormalbg '${i}';colorizer -s")
|
|
|
|
out3+=("$OB_INACTIVE_BGTO,obtctl clrnormalbgto '${i}';colorizer -s")
|
|
|
|
out3+=("$OB_INACTIVE_TEXT,obtctl inactivetextcolor '${i}';colorizer -s")
|
|
|
|
out3+=("$OB_INACTIVE_BORDER,obtctl inactiveborderColor '${i}';colorizer -s")
|
|
|
|
|
|
|
|
out3+=("^sep(<big>$MENUPANELS</big>)")
|
|
|
|
out3+=("$MENU_BGCOLOR,jgctl color_menu_bg '${i}';colorizer -s")
|
|
|
|
out3+=("$MENU_SEP_BG,jgctl color_title_bg '${i}';colorizer -s")
|
|
|
|
out3+=("$MENU_ITEM_FG,jgctl color_norm_fg '${i}';colorizer -s")
|
|
|
|
out3+=("$MENU_ACTIVE_BG,jgctl color_sel_bg '${i}';colorizer -s")
|
|
|
|
out3+=("$MENU_BORDER,jgctl color_menu_border '${i}';colorizer -s")
|
|
|
|
|
|
|
|
out3+=("^sep(<big>Conky</big>)")
|
|
|
|
out3+=("$CONKY_BGCOLOR_ALL,conkyctl win_bgcolor_all '${i}';colorizer -s")
|
|
|
|
# array with running conkies - only filenames with full path
|
|
|
|
readarray -t running < <(pgrep -af "conky.*mbcolor" | cut -d' ' -f4)
|
|
|
|
|
|
|
|
if [[ ${#running[@]} > 0 ]];then
|
|
|
|
out3+=("^sep(<small>$RUNNING_CONKYS</small>)")
|
|
|
|
for c in ${running[@]};do
|
|
|
|
filename=${c##*/}
|
|
|
|
name=${filename%%_mb*}
|
|
|
|
title=${name//_/ }
|
|
|
|
out3+=("$BGCOLOR_OF ${title^},conkyctl win_bgcolor '${i}' '${c}';colorizer -s")
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,w2theme accent '${i}';colorizer -s")
|
|
|
|
fi
|
|
|
|
done
|
2022-08-15 01:42:52 +02:00
|
|
|
out2+=("^sep(Plasma)")
|
2022-09-21 15:06:03 +02:00
|
|
|
for i in ${plasma[@]};do
|
|
|
|
if [ $rootcolors = select ];then
|
|
|
|
((n+=1))
|
|
|
|
out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,^checkout(${i:1}${n}")
|
|
|
|
out3+=("^tag(${i:1}${n})")
|
|
|
|
out3+=("^sep(<tt>$COLOR <span bgcolor='$i'> </span> <small>$i</small> <span bgcolor='$i'> </span></tt>)")
|
|
|
|
out3+=("$SETACCENT,w2theme accent '${i}';colorizer -s")
|
|
|
|
out3+=("^sep(<big>OpenBox</big>)")
|
|
|
|
out3+=("^sep(<small>$ACTIVE_WIN</small>)")
|
|
|
|
out3+=("$OB_ACTIVE_BG,obtctl clractivebg '${i}';colorizer -s")
|
|
|
|
out3+=("$OB_ACTIVE_BGTO,obtctl clractivebgto '${i}';colorizer -s")
|
|
|
|
out3+=("$OB_ACTIVE_TEXT,obtctl activetextcolor '${i}';colorizer -s")
|
|
|
|
out3+=("$OB_ACTIVE_BORDER,obtctl activeborderColor '${i}';colorizer -s")
|
|
|
|
out3+=("^sep(<small>$INACTIVE_WIN</small>)")
|
|
|
|
out3+=("$OB_INACTIVE_BG,obtctl clrnormalbg '${i}';colorizer -s")
|
|
|
|
out3+=("$OB_INACTIVE_BGTO,obtctl clrnormalbgto '${i}';colorizer -s")
|
|
|
|
out3+=("$OB_INACTIVE_TEXT,obtctl inactivetextcolor '${i}';colorizer -s")
|
|
|
|
out3+=("$OB_INACTIVE_BORDER,obtctl inactiveborderColor '${i}';colorizer -s")
|
|
|
|
|
|
|
|
out3+=("^sep(<big>$MENUPANELS</big>)")
|
|
|
|
out3+=("$MENU_BGCOLOR,jgctl color_menu_bg '${i}';colorizer -s")
|
|
|
|
out3+=("$MENU_SEP_BG,jgctl color_title_bg '${i}';colorizer -s")
|
|
|
|
out3+=("$MENU_ITEM_FG,jgctl color_norm_fg '${i}';colorizer -s")
|
|
|
|
out3+=("$MENU_ACTIVE_BG,jgctl color_sel_bg '${i}';colorizer -s")
|
|
|
|
out3+=("$MENU_BORDER,jgctl color_menu_border '${i}';colorizer -s")
|
|
|
|
|
|
|
|
out3+=("^sep(<big>Conky</big>)")
|
|
|
|
out3+=("$CONKY_BGCOLOR_ALL,conkyctl win_bgcolor_all '${i}';colorizer -s")
|
|
|
|
# array with running conkies - only filenames with full path
|
|
|
|
readarray -t running < <(pgrep -af "conky.*mbcolor" | cut -d' ' -f4)
|
|
|
|
|
|
|
|
if [[ ${#running[@]} > 0 ]];then
|
|
|
|
out3+=("^sep(<small>$RUNNING_CONKYS</small>)")
|
|
|
|
for c in ${running[@]};do
|
|
|
|
filename=${c##*/}
|
|
|
|
name=${filename%%_mb*}
|
|
|
|
title=${name//_/ }
|
|
|
|
out3+=("$BGCOLOR_OF ${title^},conkyctl win_bgcolor '${i}' '${c}';colorizer -s")
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,w2theme accent '${i}';colorizer -s")
|
|
|
|
fi
|
|
|
|
done
|
2022-08-16 16:50:11 +02:00
|
|
|
|
2022-09-19 20:59:26 +02:00
|
|
|
### TODO Rework below as submenu(edit palette and present palette with HTML helper- to keep it on desktop, allowing to copy colors from it)
|
|
|
|
|
|
|
|
##out+=("^sep()")
|
|
|
|
##out+=(" $EDIT_PALETTE,xdg-open $WALLPALDIR/$WALLPAPER.clr")
|
2022-08-16 16:50:11 +02:00
|
|
|
|
2022-09-19 20:59:26 +02:00
|
|
|
# Przerobić na submenu
|
2022-12-08 17:48:55 +01:00
|
|
|
#if [[ "$wall2themes" == "yes" ]];then
|
2022-08-15 01:42:52 +02:00
|
|
|
out+=("^sep($RANDWALL)")
|
2022-08-16 16:50:11 +02:00
|
|
|
syswallp=$(shopt -s nullglob ; set -- /usr/share/backgrounds/*.{jpg,JPG,jpeg,JPEG,png,PNG} ; echo $#)
|
2022-12-17 12:12:52 +01:00
|
|
|
out+=(" $SYSWALLPAPER (<small>${syswallp}</small>),nitrogen --random /usr/share/backgrounds --set-scaled --save;colorizer -s")
|
2022-08-16 16:50:11 +02:00
|
|
|
if [[ -d "${user_wallpapers_dir}" ]]; then
|
|
|
|
userwallp=$(shopt -s nullglob ; set -- $user_wallpapers_dir/*.{jpg,JPG,jpeg,JPEG,png,PNG} ; echo $#)
|
2022-12-17 12:12:52 +01:00
|
|
|
out+=(" $USERWALLPAPER (<small>${userwallp}</small>),nitrogen --random ${user_wallpapers_dir} --set-scaled --save;colorizer -s")
|
2022-08-16 16:50:11 +02:00
|
|
|
fi
|
2022-09-19 20:59:26 +02:00
|
|
|
out+=("^sep()")
|
|
|
|
out+=("$WALLPAPERS,^checkout(wallpapersettings)")
|
2022-12-08 17:48:55 +01:00
|
|
|
#fi
|
|
|
|
if [[ "$gradient_obtheme" == "yes" || "$gradient_menu" == "yes" ]];then
|
|
|
|
[[ "$gradient_obtheme" == "yes" ]] && OBGRAD="OB" || OBGRAD=""
|
|
|
|
[[ "$gradient_menu" == "yes" ]] && MENUGRAD="menus" || MENUGRAD=""
|
|
|
|
out+=("^sep($GRADIENTS <small>$OBGRAD $MENUGRAD</small>)")
|
|
|
|
out+=("<tt><span bgcolor='#16a084'> </span><span bgcolor='#43a480'> </span><span bgcolor='#5da97b'> </span><span bgcolor='#72ad77'> </span><span bgcolor='#84b171'> </span><span bgcolor='#95b66c'> </span><span bgcolor='#a5ba66'> </span><span bgcolor='#b5be61'> </span><span bgcolor='#c3c15a'> </span><span bgcolor='#d1c753'> </span><span bgcolor='#dfc94c'> </span><span bgcolor='#edce44'> </span><span bgcolor='#f4d03f'> </span></tt> $PRE_GRADIENTS,^pipe(mbgrad)")
|
2022-08-16 16:50:11 +02:00
|
|
|
fi
|
2022-12-19 22:22:23 +01:00
|
|
|
### RESET ACTIONS (replaced by Randomizer)
|
|
|
|
#out+=("^sep($RESET_COLORS)")
|
|
|
|
#out+=("$RESET_CHOOSE,^checkout(resetroot)")
|
|
|
|
#out2+=("^tag(resetroot)")
|
|
|
|
#out2+=("^sep($RESET_SEP)")
|
|
|
|
#out2+=("$RES_OB_WD,obtctl resetMBcolors;colorizer -s")
|
|
|
|
#out2+=("$RES_MENU,jgctl reset;colorizer -s")
|
|
|
|
#out2+=("$RES_CONKY,conkyctl resetcolorsall;colorizer -s")
|
|
|
|
#out2+=("^sep()")
|
|
|
|
#out2+=("\"\"\"$RES_ALL\"\"\",obtctl resetMBcolors;conkyctl resetcolorsall;jgctl reset;colorizer -s")
|
2022-08-15 01:42:52 +02:00
|
|
|
|
2022-08-16 16:50:11 +02:00
|
|
|
if [[ "$related_tools" == "show" ]];then
|
|
|
|
out+=(". $CUSTOM_COMMANDS_FILE")
|
|
|
|
fi
|
2022-08-15 01:42:52 +02:00
|
|
|
### FUTURE: SAVE AND RESTORE
|
|
|
|
#out+=("^sep()")
|
|
|
|
#out+=("Pin current colors to wallpaper")
|
|
|
|
###
|
|
|
|
|
|
|
|
out2+=("^tag(settings)")
|
2022-08-16 16:50:11 +02:00
|
|
|
out2+=("^sep($AUTOGEN_THEMES)")
|
2022-12-17 12:12:52 +01:00
|
|
|
out2+=(" $AUTOGEN_THEMES [ <b>${wall2themes}</b> ],^checkout(autogen)")
|
2022-08-15 01:42:52 +02:00
|
|
|
out3+=("^tag(autogen")
|
2022-08-27 18:52:55 +02:00
|
|
|
out3+=("^sep($GENERATETHEMES)")
|
2022-08-15 01:42:52 +02:00
|
|
|
out3+=("$YES,mb-setvar wall2themes=yes $CNF_FILE;colorizer -s")
|
|
|
|
out3+=("$NO,mb-setvar wall2themes=no $CNF_FILE;colorizer -s")
|
|
|
|
out2+=("^sep()")
|
2022-12-23 13:48:01 +01:00
|
|
|
|
|
|
|
out2+=("$OBTHEME [ <b>${wall2themes_ob}</b> ],^checkout(ob)")
|
|
|
|
out3+=("^tag(ob)")
|
|
|
|
out3+=("^sep($GENOB)")
|
|
|
|
out3+=("$NO,mb-setvar wall2themes_ob=none $CNF_FILE;colorizer -s")
|
|
|
|
out3+=("^sep()")
|
|
|
|
out3+=("$LIGHTBG,mb-setvar wall2themes_ob=light $CNF_FILE;colorizer -s")
|
|
|
|
out3+=("$DARKBG,mb-setvar wall2themes_ob=dark $CNF_FILE;colorizer -s")
|
|
|
|
|
|
|
|
|
2022-08-15 01:42:52 +02:00
|
|
|
out2+=("$MENUPANELS [ <b>${wall2themes_menu}</b> ],^checkout(mp)")
|
|
|
|
out3+=("^tag(mp)")
|
2022-08-20 20:51:56 +02:00
|
|
|
out3+=("^sep($GENMENU)")
|
2022-08-15 01:42:52 +02:00
|
|
|
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")
|
2022-12-23 13:48:01 +01:00
|
|
|
|
2022-08-15 01:42:52 +02:00
|
|
|
|
|
|
|
out2+=("Conky [ <b>${wall2themes_conky}</b> ],^checkout(conky)")
|
|
|
|
out3+=("^tag(conky)")
|
2022-08-20 20:51:56 +02:00
|
|
|
out3+=("^sep($GENCONKY)")
|
2022-08-15 01:42:52 +02:00
|
|
|
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")
|
2022-12-08 17:48:55 +01:00
|
|
|
#out2+=("$DIFF_CONKY_COLORS [ <b>$conky_diff_colors</b> ],^checkout(conkycolors)")
|
|
|
|
#out3+=("^tag(conkycolors)")
|
|
|
|
#out3+=("^sep($DIFF_CONKY_COLORS)")
|
|
|
|
#out3+=("$YES,mb-setvar conky_diff_colors=yes $CNF_FILE;colorizer -s")
|
|
|
|
#out3+=("$NO,mb-setvar conky_diff_colors=no $CNF_FILE;colorizer -s")
|
2022-08-15 01:42:52 +02:00
|
|
|
|
2022-12-23 13:48:01 +01:00
|
|
|
|
2022-08-15 01:42:52 +02:00
|
|
|
out2+=("PyRadio [ <b>${wall2themes_pyradio}</b> ],^checkout(pyradio)")
|
|
|
|
out3+=("^tag(pyradio)")
|
2022-08-20 20:51:56 +02:00
|
|
|
out3+=("^sep($GENPYRADIO)")
|
2022-08-15 01:42:52 +02:00
|
|
|
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")
|
2022-12-22 02:33:00 +01:00
|
|
|
#out2+=("^sep()")
|
2022-08-16 16:50:11 +02:00
|
|
|
|
2022-12-22 02:33:00 +01:00
|
|
|
#out2+=("$WALLPAPERS,^checkout(wallpapersettings)")
|
2022-08-16 16:50:11 +02:00
|
|
|
out3+=("^tag(wallpapersettings)")
|
|
|
|
out3+=("^sep($SYSWALLPAPER ($syswallp))")
|
|
|
|
out3+=("^sep(<i>/usr/share/backgrounds</i>)")
|
2022-12-17 12:12:52 +01:00
|
|
|
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")
|
2022-09-19 20:59:26 +02:00
|
|
|
out3+=("^sep($USERWALLPAPER ($userwallp))")
|
2022-08-16 16:50:11 +02:00
|
|
|
if [[ -d "${user_wallpapers_dir}" ]]; then
|
|
|
|
# dir exist
|
|
|
|
out3+=("^sep(<i>${user_wallpapers_dir}</i>)")
|
2022-12-17 12:12:52 +01:00
|
|
|
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")
|
2022-08-16 16:50:11 +02:00
|
|
|
out3+=("^sep()")
|
2022-12-17 12:12:52 +01:00
|
|
|
out3+=(" $CHANGE ($EDITCONF),xdg-open $CNF_FILE")
|
2022-08-16 16:50:11 +02:00
|
|
|
else
|
2022-09-19 20:59:26 +02:00
|
|
|
# dir not exist
|
2022-08-16 16:50:11 +02:00
|
|
|
out3+=("^sep(<i>${user_wallpapers_dir} - $USERDIR_NOT_EXIST</i>")
|
2022-12-17 12:12:52 +01:00
|
|
|
out3+=(" $CREATE_USERDIR,mkdir -p ${user_wallpapers_dir};colorizer -s")
|
|
|
|
out3+=(" $CHANGE ($EDITCONF),xdg-open $CNF_FILE")
|
2022-08-16 16:50:11 +02:00
|
|
|
fi
|
2022-09-19 20:59:26 +02:00
|
|
|
out2+=("^sep($GRADIENTS)")
|
|
|
|
out2+=("$GRAD_OB [ <b>${gradient_obtheme}</b> ],^checkout(grad_ob)")
|
|
|
|
out3+=("^tag(grad_ob")
|
|
|
|
out3+=("^sep($GRAD_OB)")
|
|
|
|
out3+=("$YES,mb-setvar gradient_obtheme=yes $CNF_FILE;colorizer -s")
|
|
|
|
out3+=("$NO,mb-setvar gradient_obtheme=no $CNF_FILE;colorizer -s")
|
|
|
|
out2+=("$GRAD_MENU [ <b>${gradient_menu}</b> ],^checkout(grad_menu)")
|
|
|
|
out3+=("^tag(grad_menu")
|
|
|
|
out3+=("^sep($GRAD_MENU)")
|
|
|
|
out3+=("$YES,mb-setvar gradient_menu=yes $CNF_FILE;colorizer -s")
|
|
|
|
out3+=("$NO,mb-setvar gradient_menu=no $CNF_FILE;colorizer -s")
|
|
|
|
out2+=("$GRAD_CONKY [ <b>${gradient_conkies}</b> ],^checkout(grad_conky)")
|
2022-12-08 17:48:55 +01:00
|
|
|
#out3+=("^tag(grad_conky")
|
|
|
|
#out3+=("^sep($GRAD_CONKY)")
|
|
|
|
#out3+=("$YES,mb-setvar gradient_conkies=yes $CNF_FILE;colorizer -s")
|
|
|
|
#out3+=("$NO,mb-setvar gradient_conkies=no $CNF_FILE;colorizer -s")
|
2022-08-16 16:50:11 +02:00
|
|
|
|
2022-09-19 20:59:26 +02:00
|
|
|
out2+=("^sep($OTHER_SETTINGS)")
|
2022-12-08 17:48:55 +01:00
|
|
|
#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+=("$ROOTMENU_COLORS_ACTION [ <b>$rootcolors</b> ],^checkout(rootcolors)")
|
|
|
|
out3+=("^tag(rootcolors)")
|
|
|
|
out3+=("^sep($ROOTMENU_COLORS_ACTION)")
|
|
|
|
out3+=("$ACCENT,mb-setvar rootcolors=accent $CNF_FILE;colorizer -s")
|
|
|
|
out3+=("$SELECT,mb-setvar rootcolors=select $CNF_FILE;colorizer -s")
|
|
|
|
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")
|
2022-08-16 16:50:11 +02:00
|
|
|
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()")
|
2022-12-17 12:12:52 +01:00
|
|
|
out3+=(" $EDIT_RELATED,xdg-open $CUSTOM_COMMANDS_FILE")
|
2022-08-27 18:52:55 +02:00
|
|
|
out3+=(" $RESET_RELATED,rm $CUSTOM_COMMANDS_FILE;colorizer -s")
|
2022-08-15 01:42:52 +02:00
|
|
|
out2+=("^sep()")
|
2022-12-17 12:12:52 +01:00
|
|
|
out2+=(" $EDITCONF,xdg-open $CNF_FILE")
|
2022-08-27 18:52:55 +02:00
|
|
|
out2+=(" $RESET,rm $CNF_FILE;colorizer -s")
|
2022-08-15 01:42:52 +02:00
|
|
|
|
|
|
|
|
2022-05-15 03:25:01 +02:00
|
|
|
### RUN
|
|
|
|
if [[ "$1" == "-s" ]]; then
|
|
|
|
. /usr/share/mb-jgtools/pipemenu-standalone.cfg
|
|
|
|
. $HOME/.config/mabox/mabox.conf
|
|
|
|
|
2022-08-16 16:50:11 +02:00
|
|
|
if [[ "$colorizer_size" == "full" ]];then
|
|
|
|
eval $(xdotool getdisplaygeometry --shell)
|
|
|
|
MENU_HEIGHT_MIN="$HEIGHT"
|
|
|
|
MENU_HEIGHT_MAX=$MENU_HEIGHT_MIN
|
2022-12-03 18:44:36 +01:00
|
|
|
jgtools_radius=0
|
2022-08-16 16:50:11 +02:00
|
|
|
menu_margin_x="0"
|
|
|
|
else
|
|
|
|
MENU_VALIGN="center"
|
|
|
|
menu_margin_x=${submenu_spacing:-0}
|
2022-05-15 03:25:01 +02:00
|
|
|
fi
|
2022-08-16 16:50:11 +02:00
|
|
|
|
2022-05-15 03:25:01 +02:00
|
|
|
MENU_PADDING_TOP=${jgtools_padding:-0}
|
|
|
|
MENU_HALIGN="left"
|
|
|
|
jgmenu_icon_size=0
|
2022-08-16 16:50:11 +02:00
|
|
|
|
2022-05-15 03:25:01 +02:00
|
|
|
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
|
|
|
|
[ -z $jgmenu_use_borders ] && menu_border=0
|
|
|
|
JGWIDTH=$((jgtools_padding + 278 + jgtools_padding))
|
2022-08-15 01:42:52 +02:00
|
|
|
MENU_PADDING_TOP=$((jgtools_padding + 158))
|
2022-05-15 03:25:01 +02:00
|
|
|
|
2022-08-15 01:42:52 +02:00
|
|
|
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
|
2022-05-15 03:25:01 +02:00
|
|
|
|
|
|
|
mkconfigfile
|
|
|
|
#THUMB="$(DISPLAY=:0 scrot -t 220x100 -o $HOME/.config/mabox/colorizer.png -e 'echo $m')"
|
2022-12-08 17:48:55 +01:00
|
|
|
case "$LANG" in
|
2022-12-19 22:22:23 +01:00
|
|
|
pl*) THGEN="generuj motywy:";;
|
|
|
|
*) THGEN="auto theming:";;
|
2022-12-08 17:48:55 +01:00
|
|
|
esac
|
|
|
|
if [ "$wall2themes" = "yes" ]; then
|
|
|
|
FGCOL="limegreen"
|
|
|
|
case "$LANG" in
|
|
|
|
pl*) STATE="on";;
|
|
|
|
*) STATE="on";;
|
|
|
|
esac
|
|
|
|
else
|
|
|
|
FGCOL="red"
|
|
|
|
case "$LANG" in
|
|
|
|
pl*) STATE="off";;
|
|
|
|
*) STATE="off";;
|
|
|
|
esac
|
|
|
|
fi
|
2022-05-15 03:25:01 +02:00
|
|
|
cat <<EOF > ${MENU_ITEMS}
|
2022-08-15 01:42:52 +02:00
|
|
|
@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),270,150,4,left,top,,,${THUMB}
|
2022-12-08 17:48:55 +01:00
|
|
|
@rect,,$((jgtools_padding + 4)),$((jgtools_padding + 8)),270,20,0,left,top,#222222 20,#222222 70,
|
|
|
|
@rect,,$((jgtools_padding + 4)),$((jgtools_padding + 120)),270,34,0,left,top,#222222 20,#222222 70,
|
|
|
|
@text,,$((jgtools_padding + 12)),$((jgtools_padding + 2)),270,30,0,left,top,#FFFFFF ,${WINCLR}, <span size='10400' font_family='Ubuntu'><small>${THGEN}</small> <span fgcolor='$FGCOL'><b>$STATE</b></span></span>
|
|
|
|
@text,,$((jgtools_padding + 198)),$((jgtools_padding + 124)),120,30,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Colorizer</b></span>
|
2022-08-15 01:42:52 +02:00
|
|
|
$(printf '%s\n' "${dots[@]}")
|
|
|
|
#@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 34)),270,120,4,left,top,,,/usr/share/mabox-colorizer/img/colorizer.png
|
2022-05-15 03:25:01 +02:00
|
|
|
$(printf '%s\n' "${out[@]}")
|
|
|
|
$(printf '%s\n' "${out2[@]}")
|
2022-08-15 01:42:52 +02:00
|
|
|
$(printf '%s\n' "${out3[@]}")
|
2022-05-15 03:25:01 +02:00
|
|
|
EOF
|
|
|
|
|
|
|
|
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
printf '%s\n' "${out[@]}"
|
|
|
|
printf '%s\n' "${out2[@]}"
|
2022-08-15 01:42:52 +02:00
|
|
|
printf '%s\n' "${out3[@]}"
|