Compare commits

...

110 Commits

Author SHA1 Message Date
Daniel Napora 89f905268f add monocolor 2024-02-22 14:24:51 +01:00
Daniel Napora ca2dd9bc5d fix cava 2000 px height :) 2024-02-01 18:55:17 +01:00
Daniel Napora b1168d4552 small fix 2024-02-01 14:05:01 +01:00
Daniel Napora 3b545c0f7e cosmetic changes 2024-02-01 14:01:44 +01:00
Daniel Napora da6b90b78d css, terminal, wp 2024-01-28 11:31:19 +01:00
Daniel Napora fbdfcc7efa Main window improvements 2024-01-25 13:01:29 +01:00
Daniel Napora e52e4c06b5 Help window cleaning 2024-01-17 22:41:38 +01:00
Daniel Napora 59d2cc5b49 really fix glyphicons in main window 2024-01-15 00:02:48 +01:00
Daniel Napora d49ea58107 fix nerd symbols 2024-01-14 22:05:04 +01:00
Daniel Napora 0a09781aa3 upd 2023-09-28 11:41:04 +02:00
Daniel Napora 3d2c5eefb1 cleaning rootmenu and help 2023-09-28 10:30:45 +02:00
Daniel Napora dfc7192e8a small improvements 2023-09-25 13:37:33 +02:00
Daniel Napora 05a80516b6 Openbox save/restore theme/colorscheme 2023-09-23 13:57:32 +02:00
Daniel Napora 106b6909d9 Conky and mbclr improvements 2023-09-11 18:59:49 +02:00
Daniel Napora 33550720c2 colorizer-menus reorder 2023-09-09 16:01:49 +02:00
Daniel Napora 51f6143a1b GTK colors added to color submenu 2023-09-09 09:18:19 +02:00
Daniel Napora f726918df8 upd 2023-09-08 13:17:36 +02:00
Daniel Napora 176034c8a6 fix apply system scheme to one Conky 2023-09-08 12:47:31 +02:00
Daniel Napora 835004602a polising conky module 2023-09-08 12:34:28 +02:00
Daniel Napora 0640f531a0 polishing 2023-09-06 16:13:11 +02:00
Daniel Napora f7f4329633 upd 2023-09-05 18:43:04 +02:00
Daniel Napora 02ed297f4d menu schemes, readable colors pairs 2023-09-05 18:38:53 +02:00
Daniel Napora 2c3c0e0ce9 remove unneeded script 2023-09-05 17:31:56 +02:00
Daniel Napora 6482e8ddfc save/restore menus 2023-09-05 17:18:04 +02:00
Daniel Napora 082d27f52e one place to configure fonts 2023-08-30 14:00:09 +02:00
Daniel Napora 7c0bd902af fonts handling improvements 2023-08-20 09:07:52 +02:00
Daniel Napora 3158254a39 font list comment 2023-08-17 17:41:11 +02:00
Daniel Napora cbd8694212 fonts and colors lists 2023-08-17 17:39:19 +02:00
Daniel Napora d4fd63c54b OB title font color only black and white 2023-08-03 01:28:41 +02:00
Daniel Napora 3a7535cc1e upd 2023-08-02 01:34:04 +02:00
Daniel Napora 07d4274ac3 handle OB rc.xml font and button layout other OB themes 2023-08-01 15:03:46 +02:00
Daniel Napora 6523ccd67a [Openbox module] title text and buttons handling improvements 2023-07-31 01:14:59 +02:00
Daniel Napora 69f0299723 bigger buttons for OB theme 2023-07-28 17:07:31 +02:00
Daniel Napora 7a636dcfc6 fix obtctl 2023-07-25 14:23:08 +02:00
Daniel Napora 91fb852719 randomizer fix,conky bars 2023-07-25 00:21:05 +02:00
Daniel Napora 257972dd44 remove tint2 - not ready yet 2023-06-01 12:03:25 +02:00
Daniel Napora 6169c64f39 fix glyphicons 2023-06-01 11:13:09 +02:00
Daniel Napora 96ed5973d8 conky menu,pcmanwp 2023-05-29 21:16:10 +02:00
Daniel Napora f0e8f8d509 PyRadio module is back 2023-05-17 00:04:59 +02:00
Daniel Napora 4a3eab634e do not allow to edit other themes than MBcolors in ~/.themes 2023-05-14 23:35:12 +02:00
Daniel Napora ab0f7815d2 cava mod upd, pyradio disabled for now 2023-05-14 14:34:17 +02:00
Daniel Napora 5a594efb44 lot of polishing 2023-05-10 23:50:21 +02:00
Daniel Napora 9f859f2187 upd 2023-05-09 16:45:54 +02:00
Daniel Napora 876c236e88 Cava module 2023-05-09 14:14:23 +02:00
Daniel Napora 19b950ea05 modules launchers exposed in sidebar of main window 2023-05-03 16:00:14 +02:00
Daniel Napora e7773f0dba mbclr improvements, conkyctl fix 2023-04-22 20:49:26 +02:00
Daniel Napora aad57c20d0 w2theme use correct palette 2023-01-25 21:17:32 +01:00
Daniel Napora 0fa2536dac cache_dir for thumbs and palletes changed 2023-01-18 23:58:47 +01:00
Daniel Napora d6d5c85b29 conky module improvements 2023-01-11 12:30:15 +01:00
Daniel Napora 7f86da54be use menu colors,position 2023-01-10 15:23:33 +01:00
Daniel Napora 72ad7ba4c1 checkupdates fix 2023-01-08 02:26:59 +01:00
Daniel Napora 34b1503e8d upd 2023-01-08 01:22:16 +01:00
Daniel Napora 661a120efb more on conky handling 2023-01-07 23:10:48 +01:00
Daniel Napora 997222b9ab upd 2023-01-05 19:42:32 +01:00
Daniel Napora 9ea2e57349 upd 2023-01-05 19:28:22 +01:00
Daniel Napora df900b8961 start work to handle foreign Conkys 2023-01-05 19:02:40 +01:00
Daniel Napora 0f088cb864 main window upd 2022-12-30 08:38:43 +01:00
Daniel Napora 05ca4a7fea fix obtheme from wp dark and light 2022-12-28 12:43:26 +01:00
Daniel Napora 1398be067c randomizer small fixes 2022-12-25 19:48:00 +01:00
Daniel Napora f42d8e040a upd 2022-12-23 22:51:29 +01:00
Daniel Napora af889291cf upd 2022-12-23 13:48:01 +01:00
Daniel Napora 53748b45d0 wall2theme completed 2022-12-23 11:10:27 +01:00
Daniel Napora f194a8dd21 upd 2022-12-22 02:33:00 +01:00
Daniel Napora 9ce4ec0442 Conky 2022-12-21 10:43:12 +01:00
Daniel Napora 320a9e986f upd 2022-12-20 09:46:47 +01:00
Daniel Napora 01a532e80c main window update 2022-12-20 00:35:35 +01:00
Daniel Napora 66ef501bae big update 2022-12-19 22:22:23 +01:00
Daniel Napora 4d3c79a930 glyphs 2022-12-17 12:50:10 +01:00
Daniel Napora d2214decdc upd 2022-12-17 12:12:52 +01:00
Daniel Napora 52ed781df7 upd 2022-12-08 17:48:55 +01:00
Daniel Napora 9001278bfc small fixes 2022-12-03 18:44:36 +01:00
Daniel Napora 76ac2a37aa big conky update 2022-12-03 16:23:34 +01:00
Daniel Napora 4dfcccc9eb conky context menu improvements 2022-11-21 12:31:17 +01:00
Daniel Napora 37a0fcb5e4 conky module update 2022-10-27 01:10:17 +02:00
Daniel Napora b39ca72853 conky module improvements 2022-10-17 14:48:35 +02:00
Daniel Napora f132019078 conky contextmenu pick colors fix 2022-10-15 12:19:57 +02:00
Daniel Napora 4d6499568a conky context menu - initial 2022-10-05 19:44:22 +02:00
Daniel Napora 52141e5c80 checkupdates disable unnecesary aur checking 2022-09-29 00:18:06 +02:00
Daniel Napora 6666e1dc50 small fixes 2022-09-26 10:02:47 +02:00
Daniel Napora 4fb6e64b10 choose actions also for populart accent colors 2022-09-21 15:06:03 +02:00
Daniel Napora 2a438d003c gradient reverse for menus 2022-09-21 13:37:15 +02:00
Daniel Napora 0e5a3f9c6b fix conky session file update 2022-09-21 00:27:41 +02:00
Daniel Napora bff8c4d39b massive update :) 2022-09-19 20:59:26 +02:00
Daniel Napora 0787a56085 fix 2022-08-28 01:31:25 +02:00
Daniel Napora 950da06b28 push again 2022-08-27 18:52:55 +02:00
Daniel Napora 785adde172 a week update 2022-08-27 16:36:46 +02:00
Daniel Napora 587d170ccd big update 2022-08-20 20:51:56 +02:00
Daniel Napora ef7c0ec0f2 translation update 2022-08-16 17:55:55 +02:00
Daniel Napora 4a5ca5d34c ready for testing 2022-08-16 16:50:11 +02:00
Daniel Napora 352f8242fc big update :) 2022-08-15 01:42:52 +02:00
Daniel Napora b17d8f8094 themes generators from wallpaper colors 2022-07-06 08:41:00 +02:00
Daniel Napora 3a7072c862 update 2022-06-29 16:31:14 +02:00
Daniel Napora 11b191511a PL translation started 2022-06-11 12:57:39 +02:00
Daniel Napora af6623eece update 2022-06-11 12:27:09 +02:00
Daniel Napora cae5b8ff7d help update 2022-06-08 21:45:29 +02:00
Daniel Napora 27dc78053f upd 2022-06-06 10:07:38 +02:00
Daniel Napora b1dd48e579 obtheme module and help 2022-06-04 22:50:37 +02:00
Daniel Napora aaec2b5f3c help and buttons 2022-06-04 14:43:00 +02:00
Daniel Napora 90b2531417 menu item setfont fix 2022-06-03 23:26:41 +02:00
Daniel Napora a6e97335e1 help and updates 2022-06-03 19:43:56 +02:00
Daniel Napora 5e1e8dbd31 better colorpicker,various improvements 2022-06-02 23:46:52 +02:00
Daniel Napora 1d5546e993 icons 2022-05-27 00:03:01 +02:00
Daniel Napora d44a5aed42 remove conkies, they shipped with mabox-i18n-files 2022-05-26 22:53:41 +02:00
Daniel Napora fbaaa5e919 icon changed 2022-05-26 22:49:16 +02:00
Daniel Napora b13031b9d9 logo conky 2022-05-26 22:39:07 +02:00
Daniel Napora d4a330020a decrease fontsize 2022-05-25 01:23:38 +02:00
Daniel Napora c62a7a82ee wallpaper palettes 2022-05-24 19:32:53 +02:00
Daniel Napora 2535bfcd83 checkupdates script translation, TODO 2022-05-20 13:45:52 +02:00
Daniel Napora 1afe50cced icon 2022-05-19 21:08:31 +02:00
Daniel Napora 849c4644f8 update 2022-05-19 14:50:08 +02:00
174 changed files with 9763 additions and 1345 deletions

9
TODO.md 100644
View File

@ -0,0 +1,9 @@
### Short term
- color select submenu - configurable exposed palette: wallpaper or palette from Color Menu (built-in or custom)
- documentation (About and help)
### Later
- autogenerated colorschemes from wallpaper colors (light and dark) for menus and conkies
- scripts to handle tint2 panel
- colorize "folder" icons

106
bin/cavactl 100755
View File

@ -0,0 +1,106 @@
#!/bin/bash
# cavactl - cava script for Mabox
CFGFILE=~/.config/cava/config
reload_config() {
pkill -USR1 cava
}
reload_colors() {
pkill -USR2 cava > /dev/null 2>&1
}
mode() {
case "$1" in
solid) sd ".*gradient .*" "gradient = 0" ${CFGFILE};;
gradient) sd ".*gradient .*" "gradient = 1" ${CFGFILE};;
esac
reload_colors
}
foregroundcolor(){
sd ".*foreground .*" "foreground = '${1}'" ${CFGFILE}
}
foreground() {
sd ".*foreground .*" "foreground = '${1}'" ${CFGFILE}
sd ".*gradient .*" "gradient = 0" ${CFGFILE}
reload_colors
}
gradientcolors() {
n=1
for i in $(pastel gradient -n 8 ${1} ${2}|pastel format hex)
do
sd ".*gradient_color_${n}.*" "gradient_color_${n} = '${i}'" ${CFGFILE}
((n++))
done
}
gradient() {
n=1
for i in $(pastel gradient -n 8 ${1} ${2}|pastel format hex)
do
sd ".*gradient_color_${n}.*" "gradient_color_${n} = '${i}'" ${CFGFILE}
((n++))
done
sd ".*gradient .*" "gradient = 1" ${CFGFILE}
sd ".*gradient_count .*" "gradient_count = 8" ${CFGFILE}
reload_colors
}
grad_from() {
read GR_TO <<< "$(grep '.*gradient_color_8 ' ${CFGFILE} | cut -d"'" -f2)"
gradient "$1" "${GR_TO}"
}
grad_to() {
read GR_FROM <<< "$(grep '.*gradient_color_1 ' ${CFGFILE} | cut -d"'" -f2)"
gradient "${GR_FROM}" "$1"
}
bar_width () {
sd ".*bar_width .*" "bar_width = ${1}" ${CFGFILE}
reload_config
}
bar_spacing() {
sd ".*bar_spacing .*" "bar_spacing = ${1}" ${CFGFILE}
reload_config
}
info () {
case "$LANG" in
pl*)
INFO_HEAD="Porady dla Cava"
INFO_TXT="\nCava jest uruchomiona w przezroczystym oknie...\n\
Możesz je więc <b>przesuwać</b> lub <b>zmieniać rozmiar</b> tak jak każde inne okno\n\
<i>Przesuwanie</i>: przytrzymaj <b>Alt</b> i przeciągnij\n\
<i>Zmiana rozmiaru</i>: przytrzymaj <b>Alt</b> i przeciągnij prawym przyciskiem myszy\n\n \
Użyj strzałek <b> </b>, aby zmienić szerokość słupków"
;;
*)
INFO_HEAD="Cava tips & tricks"
INFO_TXT="\nCava runs inside transparent window...\n\
So you can <b>move</b> or <b>resize</b> it like any other window\n\
<i>Move</i>: hold <b>Alt</b> and drag\n\
<i>Resize</i>: hold <b>Alt</b> and drag with right mouse button\n\n \
Use arrows <b> </b> to change bar width"
;;
esac
notify-send.sh -i amarok_playcount -u critical "$INFO_HEAD" "$INFO_TXT"
}
case "$1" in
mode) mode "$2";;
foregroundcolor) foregroundcolor "$2";;
foreground) foreground "$2";;
gradientcolors) gradientcolors "$2" "$3";;
gradient) gradient "$2" "$3";;
grad_from) grad_from "$2";;
grad_to) grad_to "$2";;
reload) reload_config;;
reload_colors)reload_colors;;
bar_width)bar_width "$2";;
bar_spacing)bar_spacing "$2";;
info) info;;
*):;;
esac

View File

@ -0,0 +1,67 @@
#!/bin/bash
# check updates and show how many packeges to update in Conky
# We don't need to run checkupdates at Conky start as it takes few seconds and block Conky
CNF_DIR="$HOME/.config/colorizer/conky"
CNF_FILE="$CNF_DIR/conky.cfg"
source <(grep = $CNF_FILE)
PKGS=$(checkupdates | wc -l)
mb-setvar updates=${PKGS}
case "$LANG" in
pl*)
AVAIL_UPDATES="Dostępne aktualizacje"
UPTODATE="System jest aktualny"
PKGS_TO_UPDATE="Pakiety do aktualizacji:"
YAY_UPD="Użyj yay (cli)"
PAMAC_UPD="Użyj Pamac (GUI)"
DISABLE="Wyłącz powiadomienia"
;;
es*)
AVAIL_UPDATES="Actualizaciones disponibles"
UPTODATE="El sistema esta actualizado"
PKGS_TO_UPDATE="Paquetes para actualizar:"
YAY_UPD="Actualizar con yay (cli)"
PAMAC_UPD="Actualizar con Pamac (GUI)"
DISABLE="Deshabilitar notificaciones"
;;
*)
AVAIL_UPDATES="Available updates"
UPTODATE="System is up to date"
PKGS_TO_UPDATE="Packages to update:"
YAY_UPD="Update with yay (cli)"
PAMAC_UPD="Update with Pamac (GUI)"
DISABLE="Disable notifications"
;;
esac
case "$1" in
-s)
CONKYPID=$(pgrep -f sysinfo_mbcolor)
;;
-g)
CONKYPID=$(pgrep -f sysinfo_graph_mbcolor)
;;
-m)
CONKYPID=$(pgrep -f mabox_info_mbcolor)
;;
esac
if [ -f /tmp/"$CONKYPID" ]; then
PKGS=$(checkupdates | wc -l)
if [ "$PKGS" != "0" ]; then
if [[ "$update_notifications" == "true" ]];then
notify-send.sh -u critical -i mbcc "$AVAIL_UPDATES" "$PKGS_TO_UPDATE $PKGS" -o "$YAY_UPD:terminator -T '$YAY_UPD' -e yay" \
-o "$PAMAC_UPD:pamac-manager --updates" -o "$DISABLE:mb-setvar update_notifications=false ${CNF_FILE}"
fi
printf "\${font}\${alignr} $AVAIL_UPDATES: \${color red}"
echo "$PKGS"
else
printf "\${font}\${color}\${alignr} $UPTODATE"
fi
else
echo "$1" > /tmp/"${CONKYPID}"
fi

View File

@ -1,57 +1,422 @@
#!/bin/bash
#
# colorizer - set of tools for Mabox (auto)theming
# Copyright (C) 2022-2023 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/>.
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}
# User wallpaper dir
user_wallpapers_dir=~/wallpapers
# Show related tools (show or hide)
related_tools=hide
# Colorizer size: full or compact
colorizer_size=full
# Gradients: change openbox theme? (active window titlebar)
gradient_obtheme=yes
# Gradients: change menu/panels background?
gradient_menu=no
EOF
fi
source "$CNF_FILE"
case "$LANG" in
pl*)
REGENERATE="(Re)Generuj z kolorów tapety..."
REGENERATEALL="Regeneruj wszystko"
ASCONFIGURED="wg konfiguracji"
REVERSE="odwrotnie"
CURRENTCONF="Obecna konfiguracja"
MODULES="Moduły"
FONTS="Konfiguruj <b>Czcionki</b>"
OBTHEME="Motyw <b>Openbox</b>"
MENUPANELS="<b>Menu</b> i Panele boczne"
COLORIZER_CONKY="<b>Conky</b> Manager i Colorizer"
CAVA="Cava - wizualizacja dźwięku"
TERMINALTHEME="Motyw terminala"
EDIT_PALETTE="Edytuj paletę kolorów"
RANDWALL="Ustaw losową tapetę"
SYSWALLPAPER="Tapety <b>systemowe</b>"
USERWALLPAPER="Tapety <b>użytkownika</b>"
GRADIENTS="Gradienty"
PRE_GRADIENTS="Gradienty"
GRAD_OB="Stosować do motywu OpenBox?"
GRAD_MENU="Stosować do Menu/Paneli?"
GRAD_CONKY="Stosować do Conky?"
SETTINGS_AND_HELP="Pomoc i Ustawienia"
SETTINGS="Ustawienia"
COLORIZER_SETTINGS="Ustawienia Colorizera"
GRADIENTS_ACT="Działanie gradientów w menu gł."
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="Okno główne i Pomoc"
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>"
COLORIZE="Szybko Pokoloruj lub Resetuj..."
;;
*)
REGENERATE="(Re)Generate from wallpaper colors..."
REGENERATEALL="Regenerate all"
ASCONFIGURED="as configured"
REVERSE="reverse"
CURRENTCONF="Current configuration"
MODULES="Modules"
FONTS="Configure <b>Fonts</b>"
OBTHEME="<b>Openbox</b> Theme"
MENUPANELS="<b>Menus/SidePanels</b>"
COLORIZER_CONKY="<b>Conky</b> Manager &amp; Colorizer"
CAVA="Cava - Audio Visualizer"
TERMINALTHEME="Terminal color scheme"
RANDWALL="Set random wallpaper"
SYSWALLPAPER="<b>System</b> Wallpapers"
USERWALLPAPER="<b>User</b> Wallpapers"
GRADIENTS="Gradients"
PRE_GRADIENTS="Gradients"
GRAD_OB="Apply to OpenBox theme?"
GRAD_MENU="Apply to Menu/Panels?"
GRAD_CONKY="Apply to Conkies?"
SETTINGS_AND_HELP="Settings and Help"
SETTINGS="Settings"
COLORIZER_SETTINGS="Colorizer Settings"
GRADIENTS_ACT="Gradients in Rootmenu actions"
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="Reset 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"
DIFF_CONKY_COLORS="Different colors for each Conky"
HELP="Main Window and Help"
RESET_COLORS="Reset Colors"
RESET_CHOOSE="Reset..."
RESET_SEP="Reset Colors of ..."
RES_OB_WD="OpenBox Window Decorations"
RES_CONKY="Conkies"
RES_MENU="Menus / Panels"
RES_ALL="All <i>(OB, menus, conky)</i>"
COLORIZE="Quickly Colorize or Reset..."
;;
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/.cache/colorizer/palettes"
mkdir -p "$WALLPALDIR"
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME}
((n++))
NAME=${NAME:${n}}
fi
if [ ! -f "$WALLPALDIR/$NAME.clr" ]; then
convert ${WALLPATH} -resize 25% -colors 16 -unique-colors txt:- |grep -v '^#'| awk '{print substr($3,1,7)}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$NAME.clr"
fi
mapfile -t w < "$WALLPALDIR/$NAME.clr"
if [[ "${#w[@]}" -lt 8 ]]; then
w+=("#2e3440" "#4c566a" "#5e81ac" "#bf616b" "#b48ead" "#a3be8c" "#ebcb8b" "#d8dee9" "#eceff4")
fi
#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")
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+=("Terminal color scheme,^term(theme.sh -i2;/bin/bash)")
#out+=("GTKTHEME,^pipe(colorizer-gtktheme)")
out+=("^sep(OTHER_TOOLS)")
out+=("WALLPAPER,^pipe(jgwallpaperchanger)")
out+=("MBX Colors,mbxcolors")
out+=(" $COLORIZE,^pipe(randomizer c)")
out+=("^sep($MODULES)")
out+=("<big></big> $FONTS,colorizer-fonts -s")
out+=("^sep()")
#out+=("PREFERENCES")
out+=("ABOUT and Help,yhtml /usr/share/mabox-colorizer/help/en.html 'Mabox Colorizer'")
out+=("$OBTHEME,colorizer-ob -s")
#out+=("TINT2,^pipe(colorizer-tint2)")
out+=("$MENUPANELS,colorizer-menus -s")
out+=("$COLORIZER_CONKY,colorizer-conky -s")
out+=("^sep()")
#out+=("Systray HW monitor,^pipe(colorizer-phwmon)")
#if pgrep -f pyradio >/dev/null ;then
# out+=("^sep()")
out+=("PyRadio,colorizer-pyradio -s")
#fi
#if pgrep -f cava >/dev/null ;then
# out+=("^sep()")
out+=("$CAVA,colorizer-cava -s")
#fi
### 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")
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
out+=("^sep()")
out+=("$WALLPAPERS,^checkout(wallpapersettings)")
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)")
fi
out+=("^sep($SETTINGS)")
out+=(" $SETTINGS,^checkout(settings)")
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 Colorizer'")
else
out+=(" $HELP,yhtml /usr/share/mabox-colorizer/help/en.html 'Mabox Colorizer'")
fi
### 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")
if [[ "$related_tools" == "show" ]];then
out+=(". $CUSTOM_COMMANDS_FILE")
fi
### FUTURE: SAVE AND RESTORE
#out+=("^sep()")
#out+=("Pin current colors to wallpaper")
###
out2+=("^tag(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 ($userwallp))")
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 not 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+=("^sep($GRADIENTS_ACT)")
[[ "$gradient_obtheme" == "yes" ]] && out2+=("<big></big> $GRAD_OB,mb-setvar gradient_obtheme=no $CNF_FILE;colorizer -s") || out2+=("<big></big> $GRAD_OB,mb-setvar gradient_obtheme=yes $CNF_FILE;colorizer -s")
#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")
[[ "$gradient_menu" == "yes" ]] && out2+=("<big></big> $GRAD_MENU,mb-setvar gradient_menu=no $CNF_FILE;colorizer -s") || out2+=("<big></big> $GRAD_MENU,mb-setvar gradient_menu=yes $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)")
#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")
out2+=("^sep($OTHER_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")
[[ "$related_tools" == "show" ]] && out2+=("<big></big> $SHOW_RELATED,^checkout(related)") || out2+=("<big></big> $SHOW_RELATED,^checkout(related)")
out3+=("^tag(related)")
out3+=("^sep($SHOW_RELATED)")
[[ "$related_tools" == "show" ]] && out3+=("<big>綠</big> $SHOW,colorizer -s" "<big>祿</big> $HIDE,mb-setvar related_tools=hide $CNF_FILE;colorizer -s") || out3+=("<big>祿</big> $SHOW,mb-setvar related_tools=show $CNF_FILE;colorizer -s" "<big>綠</big> $HIDE,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")
### 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
jgtools_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}
TABS=180
[ $(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))
#TEMP POSITION:
MENU_VALIGN="top"
MENU_MARGIN_Y="60"
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 150))
THUMBDIR="$HOME/.cache/colorizer/thumbs"
mkdir -p ${THUMBDIR}
THUMB="${THUMBDIR}/${NAME}.png"
if [[ ! -f "$THUMB" ]]
then
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
fi
# colors
n=0
m=0
X=$((jgtools_padding + 4))
Y=$((jgtools_padding + 96))
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)),$((jgtools_padding)),270,150,4,left,top,,,${THUMB}
@rect,,$((jgtools_padding)),$((jgtools_padding + 114)),270,32,0,left,top,#222222 20,#222222 70,
@text,,$((jgtools_padding + 168)),$((jgtools_padding + 116)),120,30,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Colorizer</b></span>
$(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
@ -59,3 +424,4 @@ EOF
fi
printf '%s\n' "${out[@]}"
printf '%s\n' "${out2[@]}"
printf '%s\n' "${out3[@]}"

236
bin/colorizer-cava 100755
View File

@ -0,0 +1,236 @@
#!/bin/bash
#
# colorizer - set of tools for Mabox (auto)theming
# Copyright (C) 2022-2023 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/>.
wmctrl -R cavatransparent
me="colorizer-cava -s"
CFGFILE=~/.config/cava/config
# get wallpaper color palette
WALLPALDIR="$HOME/.cache/colorizer/palettes"
mkdir -p "$WALLPALDIR"
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME}
((n++))
NAME=${NAME:${n}}
fi
if [ ! -f "$WALLPALDIR/$NAME.clr" ]; then
convert ${WALLPATH} -resize 25% -colors 16 -unique-colors txt:- |grep -v '^#'| awk '{print substr($3,1,7)}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$NAME.clr"
fi
mapfile -t w < "$WALLPALDIR/$NAME.clr"
if [[ "${#w[@]}" -lt 8 ]]; then
w+=("#2e3440" "#4c566a" "#5e81ac" "#bf616b" "#b48ead" "#a3be8c" "#ebcb8b" "#d8dee9" "#eceff4")
fi
case "$LANG" in
pl*)
INFO="Cava porady"
COLORIZE_CAVA="Pokoloruj Cava"
COLOR="Jednolity kolor"
REVERSE_GRADIENT="Odwróć kolory gradientu"
START_CAVA="Uruchom Cava"
STOP_CAVA="Zakończ Cava"
GENERATEFROMWP="Generuj z kolorów tapety..."
LIGHTBG="Jasne do ciemnego"
DARKBG="Ciemne do jesnego"
BARS="Słupki"
BAR_WIDTH="Szerokość słupków"
BAR_SPACING="Odstęp między słupkami"
COLOR_MODE="Tryb kolorowania"
SOLID_COLOR="Jednolity kolor"
GRADIENT="Gradient"
PREGRADIENT="Zastosuj gotowy gradient"
MODGRAD_FROM="Gradient kolor 1"
MODGRAD_TO="Gradient kolor 2"
EDITCONF="Edytuj plik konfiguracyjny"
RELOAD="Przeładuj konfigurację"
RELOAD_COLORS="Przeładuj kolory"
_COLORIZER_ROOT="<b>Colorizer</b> - menu główne"
;;
*)
INFO="CaVa tips &amp; tricks"
COLORIZE_CAVA="Colorize Cava"
COLOR="Solid Color"
REVERSE_GRADIENT="Reverse gradient's colors"
START_CAVA="Start Cava"
STOP_CAVA="Stop Cava"
GENERATEFROMWP="Generate from wallpaper colors..."
LIGHTBG="Light to Dark"
DARKBG="Dark to Light"
BARS="Bars"
BAR_WIDTH="Bar width"
BAR_SPACING="Bar spacing"
COLOR_MODE="Color mode"
SOLID_COLOR="Solid color"
GRADIENT="Gradient"
PREGRADIENT="Apply predefined gradient"
MODGRAD_FROM="Modify Gradient From"
MODGRAD_TO="Modify Gradient To"
EDITCONF="Edit config file"
RELOAD="Reload config"
RELOAD_COLORS="Reload colors only"
_COLORIZER_ROOT="<b>Colorizer</b> rootmenu"
;;
esac
getvalues () {
read FG <<< "$(grep '.*foreground ' ${CFGFILE} | cut -d"'" -f2)"
read BW <<< "$(grep '.*bar_width ' ${CFGFILE} | cut -d"=" -f2)"
read BS <<< "$(grep '.*bar_spacing ' ${CFGFILE} | cut -d"=" -f2)"
read GR <<< "$(grep '.*gradient ' ${CFGFILE} | cut -d"=" -f2)"
read GR_FROM <<< "$(grep '.*gradient_color_1 ' ${CFGFILE} | cut -d"'" -f2)"
read GR_TO <<< "$(grep '.*gradient_color_8 ' ${CFGFILE} | cut -d"'" -f2)"
if [ ${#FG} != 7 ];then
FGC="#59cc33"
else
FGC=${FG}
fi
FGT=$(pastel textcolor ${FGC}|pastel format hex)
}
getvalues
pgrep -f cavatransparent > /dev/null && out+=("<big>󰺢</big> $STOP_CAVA,mb-music cavakill;$me") || out+=("<big>󰺢</big> $START_CAVA,mb-music cavastart;$me")
out+=("^sep($COLORIZE_CAVA)")
out+=("<tt><span bgcolor='$FGC' fgcolor='$FGT'> ${FGC} </span></tt> $COLOR,^pipe(mbclr '$FGC' cavactl foreground Cava_Bar_Color '$me')")
out+=("^sep($GRADIENT)")
out+=("<span bgcolor='$GR_FROM'> </span><span bgcolor='$GR_TO'> </span> $PREGRADIENT,^pipe(mbgrad cava)")
out+=("<span bgcolor='$GR_TO'> </span><span bgcolor='$GR_FROM'> </span> $REVERSE_GRADIENT,cavactl gradient '${GR_TO}' '${GR_FROM}';$me")
out+=("^sep()")
out+=("<tt><span bgcolor='$GR_FROM'> </span></tt> $MODGRAD_FROM,^pipe(mbclr '$GR_FROM' cavactl grad_from Cava_Grad_From_Color '$me')")
out+=("<tt><span bgcolor='$GR_TO'> </span></tt> $MODGRAD_TO,^pipe(mbclr '$GR_TO' cavactl grad_to Cava_Grad_To_Color '$me')")
out+=("^sep($COLOR_MODE)")
[[ "$GR" == "0" ]] && out+=("<big>綠</big> $SOLID_COLOR,cavactl mode solid;$me" "<big>󰝦</big> $GRADIENT,cavactl mode gradient;$me") || out+=("<big>󰝦</big> $SOLID_COLOR,cavactl mode solid;$me" "<big>綠</big> $GRADIENT,cavactl mode gradient;$me")
out+=("^sep(<i>$GENERATEFROMWP</i>)")
out+=("<span bgcolor='${w[-3]}'> </span><span bgcolor='${w[3]}'> </span> $LIGHTBG,w2theme cava light;$me")
out+=("<span bgcolor='${w[3]}'> </span><span bgcolor='${w[-3]}'> </span> $DARKBG,w2theme cava dark;$me")
out+=("^sep($BARS)")
out+=("$BAR_WIDTH [ <b>$BW</b> ],^checkout(barwidth)")
out2+=("^tag(barwidth)")
out2+=("^sep($BAR_WIDTH)")
for i in 1 2 3 4 5 6 8 10
do
out2+=("$i,cavactl bar_width $i;$me")
done
out+=("$BAR_SPACING [ <b>$BS</b> ],^checkout(barspacing)")
out2+=("^tag(barspacing)")
out2+=("^sep($BAR_SPACING)")
for i in 0 1 2 3 4 5 6 8 10
do
out2+=("$i,cavactl bar_spacing $i;$me")
done
out+=("^sep()")
out+=(" $EDITCONF,xdg-open ~/.config/cava/config")
out+=("󰑓 $RELOAD,cavactl reload;$me")
out+=("󰑓 $RELOAD_COLORS,cavactl reload_colors;$me")
out+=("^sep()")
out+=(" $INFO,cavactl info")
### RUN
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+=(" ${arrow_string_left} $_COLORIZER_ROOT,colorizer -s")
if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell)
MENU_HEIGHT_MIN="$HEIGHT"
MENU_HEIGHT_MAX=$MENU_HEIGHT_MIN
jgtools_radius=0
menu_margin_x="0"
else
MENU_VALIGN="center"
menu_margin_x=${submenu_spacing:-0}
fi
MENU_HALIGN="left"
jgmenu_icon_size=0
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
[ -z $jgmenu_use_borders ] && menu_border=0
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 150))
#WALLPAPER
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
THUMBDIR="$HOME/.cache/colorizer/thumbs"
mkdir -p ${THUMBDIR}
NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME}
((n++))
NAME=${NAME:${n}}
fi
THUMB="${THUMBDIR}/${NAME}.png"
if [[ ! -f "$THUMB" ]]
then
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
fi
mkconfigfile
[[ "$GR" == "1" ]] && clr=${GR_FROM} || clr=${FG}
cat <<EOF > ${MENU_ITEMS}
@icon,,$((jgtools_padding)),$((jgtools_padding)),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)),$((jgtools_padding+100)),12,50,0,left,top,,${clr} 100,
@rect,,$((jgtools_padding+20)),$((jgtools_padding+115)),12,35,0,left,top,,${clr} 100,
@rect,,$((jgtools_padding+40)),$((jgtools_padding+124)),12,26,0,left,top,,${clr} 100,
@rect,,$((jgtools_padding+60)),$((jgtools_padding+114)),12,36,0,left,top,,${clr} 100,
@rect,,$((jgtools_padding+80)),$((jgtools_padding+100)),12,50,0,left,top,,${clr} 100,
@rect,,$((jgtools_padding+100)),$((jgtools_padding+96)),12,54,0,left,top,,${clr} 100,
@rect,,$((jgtools_padding+120)),$((jgtools_padding+74)),12,76,0,left,top,,${clr} 100,
@rect,,$((jgtools_padding+140)),$((jgtools_padding+64)),12,86,0,left,top,,${clr} 100,
@rect,,$((jgtools_padding+160)),$((jgtools_padding+76)),12,74,0,left,top,,${clr} 100,
@rect,,$((jgtools_padding+180)),$((jgtools_padding+94)),12,56,0,left,top,,${clr} 100,
@rect,,$((jgtools_padding+200)),$((jgtools_padding+114)),12,36,0,left,top,,${clr} 100,
@rect,,$((jgtools_padding+220)),$((jgtools_padding+129)),12,21,0,left,top,,${clr} 100,
@rect,,$((jgtools_padding+240)),$((jgtools_padding+119)),12,31,0,left,top,,${clr} 100,
@rect,,$((jgtools_padding+260)),$((jgtools_padding+110)),10,40,0,left,top,,${clr} 100,
@rect,,${jgtools_padding},$((jgtools_padding + 120)),270,28,0,left,top,#222222 20,#222222 70,
@text,,$((jgtools_padding + 108)),$((jgtools_padding + 120)),120,28,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Colorizer</b> Cava</span>
$(printf '%s\n' "${out[@]}")
$(printf '%s\n' "${out2[@]}")
EOF
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
exit 0
fi
printf '%s\n' "${out[@]}"
printf '%s\n' "${out2[@]}"

View File

@ -1,12 +1,189 @@
#!/bin/bash
#
# colorizer - set of tools for Mabox (auto)theming
# Copyright (C) 2022-2024 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/>.
SYSSCHEMES="/usr/share/mabox-colorizer/colorschemes/conky.csv"
USERSCHEMES="$HOME/.config/colorizer/conky/c_userschemes.csv"
me="colorizer-conky -s"
CONKYDIR="$HOME/.config/conky"
BASECONKY="$CONKYDIR/sysinfo_mbcolor.conkyrc"
if [ ! -f "${BASECONKY}" ]; then
rsync -a /usr/share/mabox-colorizer/conky/* ${CONKYDIR}/
COLORIZERDIR="$HOME/.config/colorizer"
CONKYTHEMEDIR="$COLORIZERDIR/conky/themes"
if [ ! -d "$CONKYTHEMEDIR" ];then
mkdir -p "$CONKYTHEMEDIR"
rsync -a /usr/share/mabox-colorizer/themes/conky/* ${CONKYTHEMEDIR}/
fi
LNG=${LANG:0:2}
if [ ! -f "${BASECONKY}" ]; then
if [ -d "/usr/share/mabox/lang/$LNG/.config/conky" ]; then
rsync -a /usr/share/mabox/lang/$LNG/.config/conky/* ${CONKYDIR}/
else
rsync -a /usr/share/mabox/lang/en/.config/conky/* ${CONKYDIR}/
fi
fi
CNF_DIR="$HOME/.config/colorizer/conky"
CNF_FILE="$CNF_DIR/conky.cfg"
[ ! -d "$CNF_DIR" ] && mkdir -p "$CNF_DIR"
if [ ! -f $CNF_FILE ]; then
cat <<EOF > ${CNF_FILE}
update_notifications=true
EOF
fi
### Wallpaper colors
WALLPALDIR="$HOME/.cache/colorizer/palettes"
mkdir -p "$WALLPALDIR"
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME}
((n++))
NAME=${NAME:${n}}
fi
if [ ! -f "$WALLPALDIR/$NAME.clr" ]; then
convert ${WALLPATH} -resize 25% -colors 16 -unique-colors txt:- |grep -v '^#'| awk '{print substr($3,1,7)}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$NAME.clr"
fi
mapfile -t w < "$WALLPALDIR/$NAME.clr"
case "$LANG" in
pl*)
COLORIZECONKY="Conky Manager"
NO_CONKY_RUNNING="Brak uruchomionych Conky"
RUN_CONKY_SESSION="Uruchom zapisaną sesję"
MOVEABLEALL="Ustaw wszystkie (<i>przeciągaj</i>)..."
NOT_FULLY_SUPPORTED="Częściowo wspierane..."
UNSUPPORTED="Conky - częściowo wspierane"
UNSUPPORTED_START="kliknij aby uruchomić"
SCHEMES="Motywy kolorystycznie"
SYSTEM_SCHEMES="Systemowe"
YOUR_SCHEMES="Moje motywy"
SAVE_CURRSCHEME="Zapisz aktualną kolorystykę jako..."
OPEN_SCHEMEFILE="Odwórz plik ze schematami w edytorze"
COLORSCHEME="Schemat kolorów"
APPLY_SCHEME="Zastosuj"
DELETE="Usuń"
DELETE_SCHEME="Usuń schemat kolorów"
MONOCHROMATIC="Monochromatyczny"
CHOOSE_AND_PICK="Wybierz wariant i pobierz kolor..."
GENERATEFROMWP="Generuj z kolorów tapety"
LIGHTBG="Jasne tło"
DARKBG="Ciemne tło"
GLOBALSETTINGS="Ustawienia globalne <small>(dla wszystkich)</small>"
REGENERATE="Motywy kolorów"
OPENTHEMEDIR="Otwórz katalog motywów"
DEFCOLOR="Domyślny kolor <small>(tekst i ramka)</small>"
COLOR_0="Kolor 0 <small>(tekst2)</small>"
COLOR_1="Kolor 1 <small>(większy tekst)</small>"
COLOR_2="Kolor 2 <small>(pasek/graf)</small>"
BACKGROUND="Kolor tła"
TRANSPARENT="Przezroczyste tło?"
YES="Tak"
NO="Nie"
FONTS="Czcionka"
SELECTFONT="Wybierz czcionkę..."
FONTFAMILY_LBL="czcionka"
_EDIT_FAVFONTS="Edytuj ulubione czcionki"
FONTSIZE_LBL="rozmiar czcionki"
INCREASE="Powiększ do"
DECREASE="Pomniejsz do"
OLINE="Obrys"
SHADOW="Cień"
DRAW="Rysuj"
BORDERS="Obramowanie"
STIPPLED_BORDERS="Nakrapiane"
SOLID_LINE="linia ciągła"
RUNNING_CONKIES="Uruchomione Conky"
STOP_ALL="Zatrzymaj wszystkie"
MORECONKIES="Więcej Conky..."
CLICKTOSTART="Kliknij aby uruchomić"
STARTALL="Uruchom wszystkie"
RESET="Resetuj"
RESETALL="Resetuj wszystkie"
RESETCOLORS="Przywróć domyślne kolory"
AREYOUSURE="Czy aby napewno?"
_COLORIZER_ROOT="<b>Colorizer</b> - menu główne"
;;
*)
COLORIZECONKY="Conky Manager"
NO_CONKY_RUNNING="No Conky running"
RUN_CONKY_SESSION="Run Conky session"
MOVEABLEALL="Make moveable all..."
NOT_FULLY_SUPPORTED="Partially supported"
UNSUPPORTED="partially supported Conkies"
UNSUPPORTED_START="click to start"
SCHEMES="Color Schemes"
SYSTEM_SCHEMES="System colorschemes"
YOUR_SCHEMES="My colorschemes"
SAVE_CURRSCHEME="Save current colors as..."
OPEN_SCHEMEFILE="Open schemes file in editor"
COLORSCHEME="Color Scheme"
APPLY_SCHEME="Apply colorscheme"
DELETE="Delete"
DELETE_SCHEME="Delete colorscheme"
MONOCHROMATIC="Monochromatic"
CHOOSE_AND_PICK="Choose variant and pick color..."
GENERATEFROMWP="Generate from wallpaper colors"
LIGHTBG="Light Background"
DARKBG="Dark Background"
GLOBALSETTINGS="Global settings <small>(apply to all)</small>"
REGENERATE="Color schemes"
OPENTHEMEDIR="Open schemes dir"
DEFCOLOR="Default color <small>(text and border)</small>"
COLOR_0="Color 0 <small>(text2)</small>"
COLOR_1="Color 1 <small>(bigger text)</small>"
COLOR_2="Color 2 <small>(bars/graphs)</small>"
BACKGROUND="Background color"
TRANSPARENT="Transparent background?"
YES="Yes"
NO="No"
FONTS="Font"
SELECTFONT="Select Font..."
FONTFAMILY_LBL="font family"
_EDIT_FAVFONTS="Edit favorite fonts list"
FONTSIZE_LBL="font size"
INCREASE="Increase to"
DECREASE="Decrease to"
OLINE="Outline"
SHADOW="Shadow"
DRAW="Draw"
BORDERS="Borders"
STIPPLED_BORDERS="Stippled borders"
SOLID_LINE="solid line"
RUNNING_CONKIES="Running Conkys"
STOP_ALL="Stop All"
MORECONKIES="More Conkies Available"
CLICKTOSTART="...click to start"
STARTALL="Start all"
RESET="Reset"
RESETALL="Reset all to defaults"
RESETCOLORS="Restore default colors"
AREYOUSURE="Are you sure?"
_COLORIZER_ROOT="<b>Colorizer</b> rootmenu"
;;
esac
getvalues () {
read WINTRANS <<< "$(grep own_window_transparent ${BASECONKY} | cut -d'=' -f2 | cut -d"," -f1)"
read FONTDEF <<< "$(grep "font .*=.*,$" ${BASECONKY} | cut -d'=' -f2,3 |cut -d"'" -f2)"
@ -23,60 +200,35 @@ getvalues () {
[[ $CLR1 =~ ^#.* ]] && : || CLR1="#${CLR1}"
read CLR2 <<< "$(grep color2 ${BASECONKY} | cut -d'=' -f2 | cut -d"'" -f2)"
[[ $CLR2 =~ ^#.* ]] && : || CLR2="#${CLR2}"
read OUTLINE <<< "$(grep draw_outline ${BASECONKY} | cut -d'=' -f2 | cut -d"," -f1)"
read SHADES <<< "$(grep draw_shades ${BASECONKY} | cut -d'=' -f2 | cut -d"," -f1)"
SHADOWS="no"
[[ "$OUTLINE" == "true" ]] && SHADOWS="outline"
[[ "$SHADES" == "true" ]] && SHADOWS="shadow"
read BORD <<< "$(grep draw_borders ${BASECONKY} | cut -d'=' -f2 | cut -d"," -f1)"
read STIP <<< "$(grep stippled_borders ${BASECONKY} | cut -d'=' -f2 | cut -d"," -f1)"
#currcolors="${WINCLR}|${CLR}|${CLR0}|${CLR1}|${CLR2}|"
cursettings="${WINCLR}|${CLR}|${CLR0}|${CLR1}|${CLR2}|${WINTRANS}|${OUTLINE}|${SHADES}|${BORD}|${STIP}|"
}
if pgrep -af "conky.*mbcolor" >/dev/null; then
if pgrep -u $USER -af "conky.*mbcolor" >/dev/null; then
getvalues
if [ ! -f "$USERSCHEMES" ]; then
mkdir -p "$HOME/.config/colorizer/conky/"
echo "WINCLR | CLR | CLR0 | CLR1 | CLR2 |WINTRANS|OUTLINE|SHADES | BORD | STIP |scheme_name" > "$USERSCHEMES"
fi
[[ "$WINTRANS" == false ]] && BG="bgcolor='$WINCLR'" || BG=""
out+=("^sep(Colorize Conky)")
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,^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,^pipe(mbclr '$CLR0' conkyctl color0_all COLOR_0 '$me')")
out+=("<small><span bgcolor='$CLR1'> </span><span ${BG} fgcolor='$CLR1'> AbCd </span></small> Color 1,^pipe(mbclr '$CLR1' conkyctl color1_all COLOR_1 '$me')")
out+=("<small><span bgcolor='$CLR2'> </span><span ${BG} fgcolor='$CLR2'> AbCd </span></small> Color 2,^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)")
else
out+=("<small><span>transparent </span></small> Background,^checkout(trans)")
fi
out2+=("^tag(trans)")
out2+=("^sep(TRANSPARENT?)")
out2+=("Yes,conkyctl transparent_all true;$me")
out2+=("No,conkyctl transparent_all false;$me")
out2+=("^sep()")
out2+=("<small><span bgcolor='$WINCLR'> </span></small> Background color,^pipe(mbclr '$WINCLR' conkyctl win_bgcolor_all WIN_BGCOLOR '$me')")
out+=("^sep()")
out+=("FONTS [ $FONT $FONTSIZE ],^checkout(font)")
out2+=("^tag(font)")
out2+=("^sep(BASE_FONT)")
out2+=("<tt>++</tt> Increase,conkyctl basefont_inc_all;$me")
out2+=("<tt>--</tt> Decrease,conkyctl basefont_dec_all;$me")
out2+=("^sep(Outline/Shadow)")
out2+=("No,conkyctl shades_all no;$me")
out2+=("^sep()")
out2+=("Draw shades,conkyctl shades_all shadow;$me")
out2+=("Draw outline,conkyctl shades_all outline;$me")
out+=("^sep()")
out+=("BORDERS [ $BORD $STIP ],^checkout(border)")
out2+=("^tag(border)")
out2+=("^sep(DRAW BORDERS?)")
out2+=("Yes,conkyctl draw_borders_all true;$me")
out2+=("No,conkyctl draw_borders_all false;$me")
out2+=("^sep(STIPPLED BORDERS?)")
out2+=("0,conkyctl stippled_borders_all 0;$me")
out2+=("1,conkyctl stippled_borders_all 1;$me")
out2+=("2,conkyctl stippled_borders_all 2;$me")
out2+=("3,conkyctl stippled_borders_all 3;$me")
out2+=("4,conkyctl stippled_borders_all 4;$me")
#out+=("^sep($COLORIZECONKY)")
#while read -r pid b c confpath
#do
# filename=${confpath##*/}
@ -85,45 +237,226 @@ if pgrep -af "conky.*mbcolor" >/dev/null; then
#done < <(pgrep -af "conky.*mbcolor")
# array with running conkies - only filenames with full path
readarray -t running < <(pgrep -af "conky.*mbcolor" | cut -d' ' -f4)
readarray -t running < <(pgrep -u $USER -af "conky -c " | cut -d' ' -f4)
#array with all supported conkies
for i in "$CONKYDIR"/*_mbcolor*; do
supported+=("$i")
#array with all conkies found
#for i in "$CONKYDIR"/*.con* "$CONKYDIR"/**/*.con*; do
for i in "$CONKYDIR"/*.conkyrc "$CONKYDIR"/*.conf "$CONKYDIR"/**/*.conkyrc "$CONKYDIR"/**/*.conf; do
if [[ "$i" == *mbcolor* ]];then
supported+=("$i")
else
if [[ "$i" != *"/*"* ]];then
unsupported+=("$i")
fi
fi
done
#array with not started conkies
notstarted=($(echo ${running[@]} ${supported[@]} | tr ' ' '\n' | sort | uniq -u))
notstarted=($(echo ${running[@]} ${supported[@]} ${unsupported[@]} ${unsupported[@]}| tr ' ' '\n' | sort | uniq -u))
notstarted_unsupported=($(echo ${running[@]} ${supported[@]} ${supported[@]} ${unsupported[@]} | tr ' ' '\n' | sort | uniq -u))
RCONKIES="${#running[@]}"
NSCONKIES="${#notstarted[@]}"
ALLSUPP=$(($RCONKIES+$NSCONKIES))
#notify-send.sh "$ALLSUPP" "$RCONKIES $NSCONKIES"
if [[ ${#running[@]} > 0 ]];then
out+=("^sep(<small><i>Individual settings</i></small>)")
out+=("^sep($RUNNING_CONKIES)")
for c in ${running[@]};do
filename=${c##*/}
name=${filename%%_mb*}
title=${name//_/ }
name2=${name%%.con*}
title=${name2//_/ }
out+=("${title^},^pipe(conkyctl single ${c})")
done
if [[ ${#notstarted[@]} > 0 ]];then
out+=("^sep(More Conkies Available)")
out+=("^sep(<small><i>click to start</i></small>)")
out+=("^sep()")
out+=("$STOP_ALL (${#running[@]}),conky_toggle;sleep .5;$me")
fi
if [[ ${#notstarted[@]} > 0 ]];then
out+=("^sep($MORECONKIES)")
if [[ "$ALLSUPP" < 12 ]];then
out+=("^sep(<small><i>$CLICKTOSTART</i></small>)")
for c in ${notstarted[@]};do
filename=${c##*/}
name=${filename%%_mb*}
title=${name//_/ }
out+=("${title^},conkyctl startone ${c};$me")
done
filename=${c##*/}
name=${filename%%_mb*}
title=${name//_/ }
out+=("${title^},conkyctl startone ${c};$me")
done
if [[ ${#notstarted[@]} > 1 ]];then
out+=("^sep()")
out+=("Start all (${#notstarted[@]}),conkyctl startall;$me")
fi
out+=("$STARTALL (${#notstarted[@]}),conkyctl startall;$me")
fi
else # too many conkies not started -> show them in submenu
out+=("$CLICKTOSTART (${#notstarted[@]}),^checkout(nstarted)")
out2+=("^tag(nstarted)")
for c in ${notstarted[@]};do
filename=${c##*/}
name=${filename%%_mb*}
title=${name//_/ }
out2+=("${title^},conkyctl startone ${c};$me")
done
if [[ ${#notstarted[@]} > 1 ]];then
out2+=("^sep()")
out2+=("$STARTALL (${#notstarted[@]}),conkyctl startall;$me")
fi
fi
fi
if [[ ${#notstarted_unsupported[@]} > 0 ]];then
out+=("^sep()")
out+=("$NOT_FULLY_SUPPORTED (${#notstarted_unsupported[@]}),^checkout(unsup)")
out2+=("^tag(unsup)")
out2+=("^sep($UNSUPPORTED)")
out2+=("^sep($UNSUPPORTED_START)")
for c in ${notstarted_unsupported[@]};do
filename=${c##*/}
name=${filename%%.con*}
title=${name//_/ }
out2+=("${title^},conkyctl startone ${c};$me")
done
fi
#GLOBAL START
out+=("^sep($GLOBALSETTINGS)")
out+=(" $MOVEABLEALL,conkyctl makemoveableall")
out+=("^sep()")
[[ "$WINTRANS" = true ]] && bga=1 || bga=100
out+=("<big><span bgcolor='$WINCLR' bgalpha='${bga}%'> <span fgcolor='$CLR'></span> <span fgcolor='$CLR0'></span> <span fgcolor='$CLR1'></span> <span fgcolor='$CLR2'></span> </span></big> $REGENERATE,^checkout(regenconky)")
out2+=("^tag(regenconky)")
out2+=("^sep($REGENERATE)")
out2+=("^sep($MONOCHROMATIC)")
out2+=("^sep(<i>$CHOOSE_AND_PICK</i>)")
out2+=("<big></big> $DARKBG...,conkyctl mono pick dark")
out2+=("<big></big> $LIGHTBG...,conkyctl mono pick light")
out2+=("^sep($GENERATEFROMWP)")
out2+=("<big><span bgcolor='${w[-1]}' fgcolor='${w[0]}'> $LIGHTBG <span fgcolor='${w[4]}'></span> <span fgcolor='${w[5]}'></span> </span></big>,w2theme conky light;$me")
out2+=("<big><span bgcolor='${w[0]}' fgcolor='${w[-1]}'> $DARKBG <span fgcolor='${w[-4]}'></span> <span fgcolor='${w[-5]}'></span> </span></big>,w2theme conky dark;$me")
out2+=("^sep($SYSTEM_SCHEMES)")
n=1
while IFS="|" read -r winclr clr clr0 clr1 clr2 wintrans outline shades bord stip scheme_name
do
((n=n+1))
[[ "$wintrans" = true ]] && bga=1 || bga=100
out2+=("<tt>$(printf '%-20s' "${scheme_name}")</tt><big><span bgcolor='$winclr' bgalpha='${bga}%'> <span fgcolor='$clr'>󰯲</span> <span fgcolor='$clr0'>󰝥</span> <span fgcolor='$clr1'>󰲠</span> <span fgcolor='$clr2'>󰲢</span> </span></big>,conkyctl applyscheme_all sys ${n};$me")
done < <(tail -n +2 "$SYSSCHEMES")
out2+=("^sep($YOUR_SCHEMES)")
out2+=("<big></big> $SAVE_CURRSCHEME,conkyctl savescheme '${cursettings}';$me")
out2+=("<big></big> $OPEN_SCHEMEFILE,xdg-open $USERSCHEMES")
out2+=("^sep()")
n=1
while IFS="|" read -r winclr clr clr0 clr1 clr2 wintrans outline shades bord stip scheme_name
do
((n=n+1))
[[ "$wintrans" = true ]] && bga=1 || bga=100
out2+=("<tt>$(printf '%-20s' "${scheme_name}")</tt><big><span bgcolor='$winclr' bgalpha='${bga}%'> <span fgcolor='$clr'>󰯲</span> <span fgcolor='$clr0'>󰝥</span> <span fgcolor='$clr1'>󰲠</span> <span fgcolor='$clr2'>󰲢</span> </span></big>,^checkout(sch${n})")
#echo "${own_window_colour}|${default_color}|${color0}|${color1}|${color2}|${themename}" >> "$USERSCHEMES"
out3+=("^tag(sch${n}")
out3+=("^sep($COLORSCHEME: ${scheme_name})")
out3+=("<big></big> $APPLY_SCHEME <big><span bgcolor='$winclr' bgalpha='${bga}%'> <span fgcolor='$clr'>󰯲</span> <span fgcolor='$clr0'>󰝥</span> <span fgcolor='$clr1'>󰲠</span> <span fgcolor='$clr2'>󰲢</span> </span></big>,conkyctl applyscheme_all usr ${n};$me")
out3+=("^sep($DELETE)")
out3+=("<big>󰗨</big> $DELETE_SCHEME ${scheme_name},conkyctl delscheme ${n};$me")
done < <(tail -n +2 "$USERSCHEMES")
out+=("^sep()")
out+=("<big>󰛖</big> $FONTS [ <b><span font_family=\"${FONT}\">$FONT</span> $FONTSIZE</b> ],^checkout(font)")
out2+=("^tag(font)")
out2+=("^sep($FONTS)")
out2+=("<big>󰛖</big> $SELECTFONT [ <b><span font_family=\"${FONT}\">$FONT</span> $FONTSIZE</b> ],mb-setfont conky_all;$me")
out2+=("^sep($FONTSIZE_LBL)")
out2+=("<big>󰧴</big> $INCREASE <b>$((FONTSIZE+1)) px</b>,conkyctl basefont_inc_all;$me")
out2+=("<big>󰧳</big> $DECREASE <b>$((FONTSIZE-1)) px</b>,conkyctl basefont_dec_all;$me")
out2+=("^sep()")
sizes=(14 13 12 11 10 9 8 7 6)
for i in "${sizes[@]}"
do
[[ "$FONTSIZE" == "$i" ]] && out2+=("<big>綠</big> <b>$i px</b>,conkyctl basefont_size_all $i;$me") || out2+=("<big>祿</big> $i px,conkyctl basefont_size_all $i;$me")
done
if [ -f "$HOME/.config/mabox/fonts.list" ];then
mapfile -t favfonts < <( grep -vE "^($|#)" ~/.config/mabox/fonts.list)
else
mapfile -t favfonts < <( grep -vE "^($|#)" /usr/share/mabox-colorizer/fonts.list)
cp /usr/share/mabox-colorizer/fonts.list ~/.config/mabox/
fi
#notify-send.sh "Ile" "${#favfonts[@]}"
if [ "${#favfonts[@]}" -gt 0 ];then
out2+=("^sep($FONTFAMILY_LBL)")
for fon in "${favfonts[@]}";do
[[ "$FONT" == "$fon" ]] && out2+=("<big>綠</big> <span font_family=\"${fon}\">${fon}</span>,$me") || out2+=("<big>祿</big> <span font_family=\"${fon}\">${fon}</span>,conkyctl basefont_family_all \"${fon}\";$me")
done
fi
out2+=("^sep()")
out2+=("<small> $_EDIT_FAVFONTS</small>,geany ~/.config/mabox/fonts.list")
[[ "$SHADOWS" == "shadow" ]] && out+=("<big>󰄲</big> $SHADOW,conkyctl shades_all no;$me") || out+=("<big>󰄱</big> $SHADOW,conkyctl shades_all shadow;$me")
[[ "$SHADOWS" == "outline" ]] && out+=("<big>󰄲</big> $OLINE,conkyctl shades_all no;$me") || out+=("<big>󰄱</big> $OLINE,conkyctl shades_all outline;$me")
out+=("^sep()")
[[ "$BORD" == false ]] && out+=("<big>󰄱</big> $BORDERS [ <b>$STIP</b> ],^checkout(border)") || out+=("<big>󰄲</big> $BORDERS [ <b>$STIP</b> ],^checkout(border)")
out2+=("^tag(border)")
out2+=("^sep($DRAW $BORDERS?)")
[[ "$BORD" == false ]] && out2+=("<big>祿</big> $YES,conkyctl draw_borders_all true;$me") || out2+=("<big>綠</big> $YES,conkyctl draw_borders_all false;$me")
[[ "$BORD" == false ]] && out2+=("<big>綠</big> $NO,conkyctl draw_borders_all true;$me") || out2+=("<big>祿</big> $NO,conkyctl draw_borders_all false;$me")
out2+=("^sep($STIPPLED_BORDERS?)")
[[ "$STIP" == 0 ]] && out2+=("<big>綠</big> 0 ($SOLID_LINE),conkyctl stippled_borders_all 0;$me") || out2+=("<big>祿</big> 0 ($SOLID_LINE),conkyctl stippled_borders_all 0;$me")
out2+=("^sep()")
[[ "$STIP" == 1 ]] && out2+=("<big>綠</big> 1 px,conkyctl stippled_borders_all 1;$me") || out2+=("<big>祿</big> 1 px,conkyctl stippled_borders_all 1;$me")
[[ "$STIP" == 2 ]] && out2+=("<big>綠</big> 2 px,conkyctl stippled_borders_all 2;$me") || out2+=("<big>祿</big> 2 px,conkyctl stippled_borders_all 2;$me")
[[ "$STIP" == 3 ]] && out2+=("<big>綠</big> 3 px,conkyctl stippled_borders_all 3;$me") || out2+=("<big>祿</big> 3 px,conkyctl stippled_borders_all 3;$me")
[[ "$STIP" == 4 ]] && out2+=("<big>綠</big> 4 px,conkyctl stippled_borders_all 4;$me") || out2+=("<big>祿</big> 4 px,conkyctl stippled_borders_all 4;$me")
out+=("^sep()")
pgrep -af "conky/sysinfo_mbcolor" > /dev/null || out+=("<big><span bgcolor='red' fgcolor='white'>  README <small>(important info)</small>  </span></big>,conkyctl baseconky_info")
if [ "$WINTRANS" == false ];then
out+=("<span bgcolor='$WINCLR'> </span><span weight='bold' ${BG} fgcolor='$WINCLR'> AbCd </span> $BACKGROUND,^pipe(mbclr '$WINCLR' conkyctl win_bgcolor_all '${BACKGROUND}' '$me')")
else
out+=("<span> transparent </span> $BACKGROUND,^pipe(mbclr '$WINCLR' conkyctl win_bgcolor_all '${BACKGROUND}' '$me')")
fi
[[ "$WINTRANS" == false ]] && out+=("<big>󰄱</big> $TRANSPARENT,conkyctl transparent_all true;$me") || out+=("<big>󰄲</big> $TRANSPARENT,conkyctl transparent_all false;$me")
out+=("^sep()")
out+=("<span bgcolor='$CLR'> </span><span weight='bold' ${BG} fgcolor='$CLR'> AbCd </span> $DEFCOLOR,^pipe(mbclr '$CLR' conkyctl default_color_all '${DEFCOLOR}' '$me')")
out+=("<span bgcolor='$CLR0'> </span><span weight='bold' ${BG} fgcolor='$CLR0'> AbCd </span> $COLOR_0,^pipe(mbclr '$CLR0' conkyctl color0_all '${COLOR_0}' '$me')")
out+=("<span bgcolor='$CLR1'> </span><span weight='bold' ${BG} fgcolor='$CLR1'> AbCd </span> $COLOR_1,^pipe(mbclr '$CLR1' conkyctl color1_all '${COLOR_1}' '$me')")
out+=("<span bgcolor='$CLR2'> </span><span weight='bold' ${BG} fgcolor='$CLR2'> AbCd </span> $COLOR_2,^pipe(mbclr '$CLR2' conkyctl color2_all '${COLOR_2}' '$me')")
#out+=("^sep()")
#out+=("^sep($RESET)")
#out+=("󰁯 $RESETCOLORS,^checkout(resetcolors)")
#out2+=("^tag(resetcolors)")
#out2+=("^sep($AREYOUSURE)")
#out2+=("$YES,conkyctl resetcolorsall;$me")
#out+=(" $RESETALL,^checkout(resetall)") NOT SAFE!!!
#out2+=("^tag(resetall)")
#out2+=("^sep($AREYOUSURE)")
#out2+=("$YES,rm $BASECONKY;$me")
else
out+=("^sep($NO_CONKY_RUNNING)")
SESSIONFILE=$HOME/.config/conky/conky-sessionfile
if [ -f "$SESSIONFILE" ];then
read N REST <<< $(wc -l "${SESSIONFILE}")
if [[ "$N" -gt "0" ]];then
out+=("$RUN_CONKY_SESSION ($N Conky),conky_toggle;$me")
fi
fi
#out+=("RESET")
else
out+=("^sep(No supported Conky running)")
out+=("^sep(<small><i>click to start some</i></small>)")
out+=("^sep(<small><i>$CLICKTOSTART</i></small>)")
for confpath in "$CONKYDIR"/*_mb*;
do
filename=${confpath##*/}
@ -132,57 +465,67 @@ else
out+=("${title^},conkyctl startone ${confpath};$me")
done
out+=("^sep()")
out+=("Start all,conkyctl startall;$me")
out+=("$STARTALL,conkyctl startall;$me")
fi
### RUN
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")
out+=(" ${arrow_string_left} $_COLORIZER_ROOT,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
jgtools_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))
MENU_PADDING_TOP=$((jgtools_padding + 158))
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 150))
#WALLPAPER
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
WALLPAPER=${WALLPATH##*/}
THUMBDIR="$HOME/.config/mabox/wallthumbs"
THUMBDIR="$HOME/.cache/colorizer/thumbs"
mkdir -p ${THUMBDIR}
THUMB="${THUMBDIR}/${WALLPAPER}.png"
NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME}
((n++))
NAME=${NAME:${n}}
fi
THUMB="${THUMBDIR}/${NAME}.png"
if [[ ! -f "$THUMB" ]]
then
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
fi
#TEMP POSITION:
MENU_VALIGN="top"
MENU_MARGIN_Y="60"
mkconfigfile
cat <<EOF > ${MENU_ITEMS}
@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),270,150,4,left,top,,,${THUMB}
@icon,,$((jgtools_padding)),$((jgtools_padding)),270,150,4,left,top,,,${THUMB}
@rect,,$((jgtools_padding)),$((jgtools_padding + 116)),270,28,0,left,top,#222222 20,#222222 70,
#@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 + 82)),29,40,0,left,top,#FFFFFF 30,${WINCLR} 60,
@text,,$((jgtools_padding + 80)),$((jgtools_padding + 116)),190,30,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Conky</b> Manager &amp; Colorizer</span>
@rect,,$((jgtools_padding + 239)),$((jgtools_padding + 2)),29,60,0,left,top,#FFFFFF 30,${WINCLR} 60,
@rect,,$((jgtools_padding + 2)),$((jgtools_padding + 88)),29,60,0,left,top,#FFFFFF 30,${WINCLR} 60,
@rect,,$((jgtools_padding + 34)),$((jgtools_padding + 108)),29,40,0,left,top,#FFFFFF 30,${WINCLR} 60,
$(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
@ -191,4 +534,5 @@ fi
printf '%s\n' "${out[@]}"
printf '%s\n' "${out2[@]}"
printf '%s\n' "${out3[@]}"

413
bin/colorizer-fonts 100755
View File

@ -0,0 +1,413 @@
#!/bin/bash
#
# colorizer - set of tools for Mabox (auto)theming
# Copyright (C) 2022-2023 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/>.
. $HOME/.config/mabox/mabox.conf
me="colorizer-fonts -s"
CONKYDIR="$HOME/.config/conky"
BASECONKY="$CONKYDIR/sysinfo_mbcolor.conkyrc"
# Favorited fonts list
if [ -f "$HOME/.config/mabox/fonts.list" ];then
mapfile -t favfonts < <( grep -vE "^($|#)" ~/.config/mabox/fonts.list)
else
mapfile -t favfonts < <( grep -vE "^($|#)" /usr/share/mabox-colorizer/fonts.list)
cp /usr/share/mabox-colorizer/fonts.list ~/.config/mabox/
fi
case "$LANG" in
pl*)
_INCREASE_ALL="Powiększ wszystkie"
_DECREASE_ALL="Pomniejsz wszystkie"
_RESET="Resetuj do domyślnych"
_ALL="Wszystko"
_OPENBOX_WM="Openbox"
_TITLEBAR_FONT="Czcionka tytułu"
_BOLD="Pogrubienie"
_ITALIC="Kursywa"
_TEXTALIGN="Wyrównanie"
_LEFT="Lewo"
_CENTER="Środek"
_RIGHT="Prowo"
_MENUS="Menu"
_MENU_TITLE="Nagłówek"
_MENU_ITEM="Element"
_MENU_TITLE_FONT="Czcionka nagłówka"
_MENU_ITEM_FONT="Czcionka elementu"
_FONT_CUSTOM="Wybierz czcionkę i rozmiar..."
_FONT_FAMILY="rodzina"
_EDIT_FAVFONTS="Edytuj ulubione czcionki"
_FONT_SIZE="rozmiar"
_INCREASE="Powiększ do"
_DECREASE="Pomniejsz do"
_CONKY="Conky"
_CONKYFONT="Czcionka dla Conky"
_CONKYBASEFONT="Czcionka podstawowa"
_C_EFFECTS="Efekty"
_SHADOW="Cień"
_OUTLINE="Poświata"
_PANEL="Panel tint2"
_GTK="GTK"
_FAVORITE_LBL="Ulubione czcionki"
_USE="Użyj czcionki"
_FOR="dla..."
_COLORIZER_ROOT="<b>Colorizer</b> - menu główne"
;;
*)
_INCREASE_ALL="Increase all"
_DECREASE_ALL="Decrease all"
_RESET="Reset to defaults..."
_ALL="All"
_OPENBOX_WM="Openbox"
_TITLEBAR_FONT="TitleBar Font"
_BOLD="Bold"
_ITALIC="Italic"
_TEXTALIGN="Text align"
_LEFT="Left"
_CENTER="Center"
_RIGHT="Right"
_MENUS="Menus"
_MENU_TITLE="Menu Title"
_MENU_ITEM="Menu Item"
_MENU_TITLE_FONT="Menu Title Font"
_MENU_ITEM_FONT="Menu Item Font"
_FONT_CUSTOM="Select custom font and size..."
_FONT_FAMILY="font family"
_EDIT_FAVFONTS="Edit favorite fonts list"
_FONT_SIZE="font size"
_INCREASE="Increase to"
_DECREASE="Decrease to"
_CONKY="Widgets (Conky)"
_CONKYFONT="Conky Font"
_CONKYBASEFONT="Base font"
_C_EFFECTS="Effects"
_SHADOW="Shadow"
_OUTLINE="Outline"
_PANEL="Panel Tint2"
_GTK="GTK Font"
_FAVORITE_LBL="Favorite Fonts"
_USE="Use"
_FOR="font for ..."
_COLORIZER_ROOT="<b>Colorizer</b> rootmenu"
;;
esac
getvalues () {
GTK2RC="$HOME"/.gtkrc-2.0
GTK_FONT=( $(grep "gtk-font-name" ${GTK2RC} | cut -d'"' -f2) )
GTK_FAMILY=${GTK_FONT[@]::${#GTK_FONT[@]}-1}
GTK_SIZE=${GTK_FONT[-1]}
nspace="http://openbox.org/3.4/rc"
obcfg="$HOME/.config/openbox/rc.xml"
OBFSIZE=$(xmlstarlet sel -N a="$nspace" -t -v '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:size' "$obcfg")
OBFNAME=$(xmlstarlet sel -N a="$nspace" -t -v '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:name' "$obcfg")
NDSLIMC=$(xmlstarlet sel -N a="$nspace" -t -v '/a:openbox_config/a:theme/a:titleLayout' "$cfg")
WEIGHT=$(xmlstarlet sel -N a="$nspace" -t -v '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:weight' "$obcfg")
SLANT=$(xmlstarlet sel -N a="$nspace" -t -v '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:slant' "$obcfg")
OBTHEME=$(awk '/<theme>/ {while (getline n) {if (match(n, /<name>/))
{l=n; exit}}} END {split(l, a, "[<>]"); print a[3]}' "$HOME/.config/openbox/rc.xml")
THEMERC="$HOME/.themes/$OBTHEME/openbox-3/themerc"
if [ -f "$THEMERC" ];then
read TXTJUST <<< "$(grep text.justify ${THEMERC} | cut -d':' -f2)"
else
:
fi
read FONTDEF <<< "$(grep "font .*=.*,$" ${BASECONKY} | cut -d'=' -f2,3 |cut -d"'" -f2)"
C_FONT=${FONTDEF%:*}
C_FONTSIZE=${FONTDEF#*=}
read OUTLINE <<< "$(grep draw_outline ${BASECONKY} | cut -d'=' -f2 | cut -d"," -f1)"
read SHADES <<< "$(grep draw_shades ${BASECONKY} | cut -d'=' -f2 | cut -d"," -f1)"
SHADOWS="no"
[[ "$OUTLINE" == "true" ]] && SHADOWS="outline"
[[ "$SHADES" == "true" ]] && SHADOWS="shadow"
}
getvalues
out+=("<big>󰧴</big> $_INCREASE_ALL,fontctl inc_all;$me")
out+=("<big>󰧳</big> $_DECREASE_ALL,fontctl dec_all;$me")
out+=("^sep()")
out+=("<big>󰑓</big> $_RESET,^checkout(reset)")
out2+=("^tag(reset)")
out2+=("^sep($_RESET)")
out2+=("$_ALL,fontctl resetall;$me")
out2+=("^sep()")
out2+=("$_TITLEBAR_FONT,fontctl resetob;$me")
out2+=("$_MENUS,fontctl resetmenus;$me")
out2+=("$_CONKY,fontctl resetconky;$me")
out2+=("$_GTK,fontctl resetgtk;$me")
out+=("^sep($_OPENBOX_WM)")
out+=("$_TITLEBAR_FONT [ <b><span font_family=\"$OBFNAME\">$OBFNAME $OBFSIZE</span></b> ],^checkout(obtitletext)")
out+=("^sep($_MENUS)")
out+=("$_MENU_TITLE [ <b><span font_family=\"$menu_sep_font_family\">$menu_sep_font_family $menu_sep_font_size</span></b> ],^checkout(mtitlefont)")
out+=("$_MENU_ITEM [ <b><span font_family=\"$menu_font_family\">$menu_font_family $menu_font_size</span></b> ],^checkout(mitemfont)")
out+=("^sep($_GTK)")
out+=("$_GTK [ <b>${GTK_FAMILY} ${GTK_SIZE}</b> ],^checkout(gtkfont)")
out+=("^sep($_CONKY)")
out+=("$_CONKYBASEFONT [ <b><span font_family=\"${C_FONT}\">$C_FONT</span> $C_FONTSIZE</b> ],^checkout(conkyfont)")
#out+=("^sep($_PANEL)")
#out+=("<i>(not implemented yet)</i>")
# FAV FONTS in rootmenu
if [ "${#favfonts[@]}" -gt 0 ];then
out+=("^sep($_FAVORITE_LBL)")
i=0
for fon in "${favfonts[@]}";do
out+=("<span> </span><span font_family=\"${fon}\">${fon}</span>,^checkout(favfont$i),$me")
out2+=("^tag(favfont$i)")
out2+=("^sep($_USE)")
out2+=("^sep(<span font_family=\"${fon}\">${fon}</span>)")
out2+=("^sep($_FOR)")
out2+=("$_TITLEBAR_FONT,obtctl fontfamily \"${fon}\";$me")
out2+=("$_MENU_TITLE,mb-setvar \"menu_sep_font_family='${fon}'\";$me")
out2+=("$_MENU_ITEM,mb-setvar \"menu_font_family='${fon}'\";$me")
out2+=("$_GTK,fontctl gtk_fontfamily \"${fon}\";$me")
out2+=("$_CONKY,conkyctl basefont_family_all \"${fon}\";$me")
i=$((i+1))
done
out+=("^sep()")
out+=("<small> $_EDIT_FAVFONTS </small>,geany ~/.config/mabox/fonts.list")
fi
#SUBMENUS
# OpenBox Title Font
out2+=("^tag(obtitletext)")
out2+=("^sep($_TITLEBAR_FONT)")
out2+=("^sep(<span font_family=\"$OBFNAME\">$OBFNAME $OBFSIZE</span>)")
out2+=("<big>󰛖</big> $_FONT_CUSTOM,mb-setfont obtitle;$me")
out2+=("^sep($_FONT_SIZE)")
out2+=("<big>󰧴</big> $_INCREASE <b>$((OBFSIZE+1)) px</b>,fontctl ob_fontsize inc;$me")
out2+=("<big>󰧳</big> $_DECREASE <b>$((OBFSIZE-1)) px</b>,fontctl ob_fontsize dec;$me")
out2+=("^sep()")
sizes=(16 15 14 13 12 11 10 9 8)
for i in "${sizes[@]}"
do
[[ "$OBFSIZE" == "$i" ]] && out2+=("<big>綠</big> <b>$i px</b>,obtctl fontsize $i;$me") || out2+=("<big>祿</big> $i px,fontctl ob_fontsize $i;$me")
done
out2+=("^sep($_FONT_FAMILY)")
if [ "${#favfonts[@]}" -gt 0 ];then
for fon in "${favfonts[@]}";do
[[ "${OBFNAME}" == "$fon" ]] && out2+=("<big>綠</big> <span font_family=\"${fon}\">${fon}</span>,$me") || out2+=("<big>祿</big> <span font_family=\"${fon}\">${fon}</span>,obtctl fontfamily \"${fon}\";$me")
done
fi
out2+=("^sep()")
[[ "$WEIGHT" =~ .*"old" ]] && out2+=("<big></big> <b>$_BOLD</b>,obtctl fontweight Normal;$me") || out2+=("<big></big> <b>$_BOLD</b>,obtctl fontweight Bold;$me")
[[ "$SLANT" =~ .*"talic" ]] && out2+=("<big></big> <i>$_ITALIC</i>,obtctl fontslant Normal;$me") || out2+=("<big></big> <i>$_ITALIC</i>,obtctl fontslant Italic;$me")
#SHADOW
out2+=("^sep($_TEXTALIGN)")
[[ "$TXTJUST" = left ]] && out2+=("<big>綠 </big> $_LEFT,obtctl textjustify left;$me")||out2+=("<big>祿 </big> $_LEFT,obtctl textjustify left;$me")
[[ "$TXTJUST" = center ]] && out2+=("<big>綠 </big> $_CENTER,obtctl textjustify center;$me")||out2+=("<big>祿 </big> $_CENTER,obtctl textjustify center;$me")
[[ "$TXTJUST" = right ]] && out2+=("<big>綠 </big> $_RIGHT,obtctl textjustify right;$me")||out2+=("<big>祿 </big> $_RIGHT,obtctl textjustify right;$me")
# Menu Title Font
out2+=("^tag(mtitlefont)")
out2+=("^sep($_MENU_TITLE_FONT)")
out2+=("^sep(<span font_family=\"$menu_sep_font_family\">$menu_sep_font_family $menu_sep_font_size</span>)")
out2+=("<big>󰛖</big> $_FONT_CUSTOM,mb-setfont menu_sep;$me")
out2+=("^sep($_FONT_SIZE)")
out2+=("<big>󰧴</big> $_INCREASE <b>$((menu_sep_font_size+1)) px</b>,mb-setvar menu_sep_font_size=$((menu_sep_font_size+1));$me")
out2+=("<big>󰧳</big> $_DECREASE <b>$((menu_sep_font_size-1)) px</b>,mb-setvar menu_sep_font_size=$((menu_sep_font_size-1));$me")
out2+=("^sep()")
sizes=(14 13 12 11 10 9 8)
for i in "${sizes[@]}"
do
[[ "$menu_sep_font_size" == "$i" ]] && out2+=("<big>綠</big> <b>$i px</b>,$me") || out2+=("<big>祿</big> $i px,mb-setvar menu_sep_font_size=$i;$me")
done
if [ "${#favfonts[@]}" -gt 0 ];then
out2+=("^sep($_FONT_FAMILY)")
for fon in "${favfonts[@]}";do
[[ "$menu_sep_font_family" == "$fon" ]] && out2+=("<big>綠</big> <span font_family=\"${fon}\">${fon}</span>,$me") || out2+=("<big>祿</big> <span font_family=\"${fon}\">${fon}</span>,mb-setvar \"menu_sep_font_family='${fon}'\";$me")
done
fi
out2+=("^sep()")
out2+=("<small> $_EDIT_FAVFONTS </small>,geany ~/.config/mabox/fonts.list")
# Item font submenu
out2+=("^tag(mitemfont)")
out2+=("^sep($_MENU_ITEM_FONT)")
out2+=("^sep(<span font_family=\"$menu_font_family\">$menu_font_family $menu_font_size</span>)")
out2+=("<big>󰛖</big> $_FONT_CUSTOM,mb-setfont menu_item;$me")
out2+=("^sep($_FONT_SIZE)")
out2+=("<big>󰧴</big> $_INCREASE <b>$((menu_font_size+1)) px</b>,mb-setvar menu_font_size=$((menu_font_size+1));$me")
out2+=("<big>󰧳</big> $_DECREASE <b>$((menu_font_size-1)) px</b>,mb-setvar menu_font_size=$((menu_font_size-1));$me")
out2+=("^sep()")
sizes=(14 13 12 11 10 9 8)
for i in "${sizes[@]}"
do
[[ "$menu_font_size" == "$i" ]] && out2+=("<big>綠</big> <b>$i px</b>,$me") || out2+=("<big>祿</big> $i px,mb-setvar menu_font_size=$i;$me")
done
if [ "${#favfonts[@]}" -gt 0 ];then
out2+=("^sep($_FONT_FAMILY)")
for fon in "${favfonts[@]}";do
[[ "$menu_font_family" == "$fon" ]] && out2+=("<big>綠</big> <span font_family=\"${fon}\">${fon}</span>,$me") || out2+=("<big>祿</big> <span font_family=\"${fon}\">${fon}</span>,mb-setvar \"menu_font_family='${fon}'\";$me")
done
fi
out2+=("^sep()")
out2+=("<small> $_EDIT_FAVFONTS</small>,geany ~/.config/mabox/fonts.list")
# Conky
out2+=("^tag(conkyfont)")
out2+=("^sep($_CONKYFONT)")
out2+=("^sep($C_FONT $C_FONTSIZE)")
out2+=("<big>󰛖</big> $_FONT_CUSTOM,mb-setfont conky_all;$me")
out2+=("^sep($_FONT_SIZE)")
out2+=("<big>󰧴</big> $_INCREASE <b>$((C_FONTSIZE+1)) px</b>,conkyctl basefont_inc_all;$me")
out2+=("<big>󰧳</big> $_DECREASE <b>$((C_FONTSIZE-1)) px</b>,conkyctl basefont_dec_all;$me")
out2+=("^sep()")
sizes=(14 13 12 11 10 9 8 7 6)
for i in "${sizes[@]}"
do
[[ "$C_FONTSIZE" == "$i" ]] && out2+=("<big>綠</big> <b>$i px</b>,conkyctl basefont_size_all $i;$me") || out2+=("<big>祿</big> $i px,conkyctl basefont_size_all $i;$me")
done
if [ "${#favfonts[@]}" -gt 0 ];then
out2+=("^sep($_FONT_FAMILY)")
for fon in "${favfonts[@]}";do
[[ "$C_FONT" == "$fon" ]] && out2+=("<big>綠</big> <span font_family=\"${fon}\">${fon}</span>,$me") || out2+=("<big>祿</big> <span font_family=\"${fon}\">${fon}</span>,conkyctl basefont_family_all \"${fon}\";$me")
done
fi
out2+=("^sep()")
out2+=("<small> $_EDIT_FAVFONTS</small>,geany ~/.config/mabox/fonts.list")
out2+=("^sep($_C_EFFCTS)")
[[ "$SHADOWS" == "shadow" ]] && out2+=("<big>󰄲</big> $_SHADOW,conkyctl shades_all no;$me") || out2+=("<big>󰄱</big> $_SHADOW,conkyctl shades_all shadow;$me")
[[ "$SHADOWS" == "outline" ]] && out2+=("<big>󰄲</big> $_OUTLINE,conkyctl shades_all no;$me") || out2+=("<big>󰄱</big> $_OUTLINE,conkyctl shades_all outline;$me")
# GTK 2/3 font
out2+=("^tag(gtkfont)")
out2+=("^sep($_GTK)")
out2+=("^sep(<span font_family=\"$menu_font_family\">$menu_font_family $menu_font_size</span>)")
out2+=("<big>󰛖</big> $_FONT_CUSTOM,mb-setfont gtk;$me")
out2+=("^sep($_FONT_SIZE)")
out2+=("<big>󰧴</big> $_INCREASE <b>$((GTK_SIZE+1)) px</b>,fontctl gtk_fontsize inc;$me")
out2+=("<big>󰧳</big> $_DECREASE <b>$((GTK_SIZE-1)) px</b>,fontctl gtk_fontsize dec;$me")
out2+=("^sep()")
sizes=(14 13 12 11 10 9 8)
for i in "${sizes[@]}"
do
[[ "$GTK_SIZE" == "$i" ]] && out2+=("<big>綠</big> <b>$i px</b>,$me") || out2+=("<big>祿</big> $i px,fontctl gtk_fontsize $i;$me")
done
if [ "${#favfonts[@]}" -gt 0 ];then
out2+=("^sep($_FONT_FAMILY)")
for fon in "${favfonts[@]}";do
[[ "$GTK_FAMILY" == "$fon" ]] && out2+=("<big>綠</big> <span font_family=\"${fon}\">${fon}</span>,$me") || out2+=("<big>祿</big> <span font_family=\"${fon}\">${fon}</span>,fontctl gtk_fontfamily \"${fon}\";$me")
done
fi
out2+=("^sep()")
out2+=("<small> $_EDIT_FAVFONTS</small>,geany ~/.config/mabox/fonts.list")
### RUN
if [[ "$1" == "-s" ]]; then
. /usr/share/mb-jgtools/pipemenu-standalone.cfg
CNF_DIR="$HOME/.config/colorizer"
CNF_FILE="$CNF_DIR/colorizer.conf"
source "$CNF_FILE"
out+=("^sep()")
out+=(" ${arrow_string_left} $_COLORIZER_ROOT,colorizer -s")
if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell)
MENU_HEIGHT_MIN="$HEIGHT"
MENU_HEIGHT_MAX=$MENU_HEIGHT_MIN
jgtools_radius=0
menu_margin_x="0"
else
MENU_VALIGN="center"
menu_margin_x=${submenu_spacing:-0}
fi
MENU_HALIGN="left"
jgmenu_icon_size=0
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
[ -z $jgmenu_use_borders ] && menu_border=0
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 150))
#WALLPAPER
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
THUMBDIR="$HOME/.cache/colorizer/thumbs"
mkdir -p ${THUMBDIR}
NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME}
((n++))
NAME=${NAME:${n}}
fi
THUMB="${THUMBDIR}/${NAME}.png"
if [[ ! -f "$THUMB" ]]
then
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
fi
mkconfigfile
[[ "$GR" == "1" ]] && clr=${GR_FROM} || clr=${FG}
cat <<EOF > ${MENU_ITEMS}
@icon,,$((jgtools_padding)),$((jgtools_padding)),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)),$((jgtools_padding + 116)),270,28,0,left,top,#222222 20,#222222 70,
@text,,$((jgtools_padding + 10)),$((jgtools_padding + 106)),100,28,0,left,top,#FFFFFF ,${WINCLR},<span size='41600' font_family='Ubuntu'><big></big></span>
@text,,$((jgtools_padding + 128)),$((jgtools_padding + 116)),150,28,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'>Mabox <b>Fonts</b> config</span>
$(printf '%s\n' "${out[@]}")
$(printf '%s\n' "${out2[@]}")
EOF
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
exit 0
fi
printf '%s\n' "${out[@]}"
printf '%s\n' "${out2[@]}"

View File

@ -1,4 +1,45 @@
#!/bin/bash
#
# colorizer - set of tools for Mabox (auto)theming
# Copyright (C) 2022-2023 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/>.
SYSSCHEMES="/usr/share/mabox-colorizer/colorschemes/menus.csv"
USERSCHEMES="$HOME/.config/colorizer/menus/userschemes.csv"
### Wallpaper colors
WALLPALDIR="$HOME/.cache/colorizer/palettes"
mkdir -p "$WALLPALDIR"
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME}
((n++))
NAME=${NAME:${n}}
fi
if [ ! -f "$WALLPALDIR/$NAME.clr" ]; then
convert ${WALLPATH} -resize 25% -colors 16 -unique-colors txt:- |grep -v '^#'| awk '{print substr($3,1,7)}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$NAME.clr"
fi
mapfile -t w < "$WALLPALDIR/$NAME.clr"
me="colorizer-menus -s"
. $HOME/.config/mabox/mabox.conf
case "$jgmenu_theme" in
@ -12,10 +53,186 @@ case "$jgmenu_theme" in
THEMERC="$HOME/.config/mabox/jgobthemes/${jgmenu_theme}.colorrc";;
esac
GRADIENT_FILE="$HOME"/.config/colorizer/gradients_menu.inc
if [ ! -f "$GRADIENT_FILE" ]; then
cp /usr/share/mabox-colorizer/gradients_menu.inc "$GRADIENT_FILE"
fi
# Backup original theme file
if [ ! -f "${THEMERC}.bak" ]; then
cp ${THEMERC} ${THEMERC}.bak
fi
case "$LANG" in
pl*)
MENU_THEME="Motyw menu"
QUICK_TWEAKS="Ustawienia główne"
OVERALL_STYLE="Ogólny styl"
SCHEMES="Motywy kolorystycznie"
SYSTEM_SCHEMES="Systemowe"
YOUR_SCHEMES="Moje motywy"
SAVE_CURRSCHEME="Zapisz aktualną kolorystykę jako..."
OPEN_SCHEMEFILE="Odwórz plik ze schematami w edytorze"
COLORSCHEME="Schemat kolorów"
APPLY_SCHEME="Zastosuj"
DELETE="Usuń"
DELETE_SCHEME="Usuń schemat kolorów"
BORDER="Obramowanie"
PADDING="Margines wewnętrzny"
RADIUS="Zaokrąglone rogi"
SUBSPACING="Odstęp submenu"
LINE_HEIGHT="Wysokość lini"
ARROW_STRING="Znak strzałki"
ARROW_STRING_LEFT="Znak strzałki lewej"
MBG_OPACITY="(Nie)przeźroczystość Menu"
SIZING="Rozmiar menu"
WIDE="szerokie"
NORMAL="normalne"
TIGHT="wąskie"
MONOCHROMATIC="Monochromatyczny"
CHOOSE_AND_PICK="Wybierz wariant i pobierz kolor..."
GENERATEFROMWP="<i>Generuj z kolorów tapety...</i>"
LIGHTBG="Jasne tło"
DARKBG="Ciemne tło"
COLOR_MENU_BG="Tło menu"
COLOR_MENU_BG_TO="Tło menu 2 (gradient)"
COLOR_MENU_BORDER="Obramowanie menu"
GRADIENT_POS="Kierunek gradientu"
NONE="brak gradientu (none)"
TOP="od góry (top)"
RIGHT="od prawej (right)"
BOTTOM="z dołu (bottom)"
LEFT="od lewej (left)"
TOP_LEFT="od góry z lewej (top_left)"
TOP_RIGHT="od góry z prawej (top_right)"
BOTTOM_LEFT="z dołu od lewej (bottom_left)"
BOTTOM_RIGHT="z dołu od prawej (bottom_right)"
PRE_GRADIENTS="Zastosuj gradient"
GRADIENT_REVERSE="Odwróć kolory Gradientu"
ITEM="Pozycja (element) menu "
FONT="Czcionka"
FONTS="Czcionki"
INCREASE="Powiększ do"
DECREASE="Pomniejsz do"
FONT_CUSTOM="Wybierz czcionkę i rozmiar..."
FONT_FAMILY="rodzina"
FONT_SIZE="rozmiar"
ITEM_FONT="Czcionka elementu"
TITLE_FONT="Czcionka nagłówka"
COLOR_NORM_FG="Kolor tekstu"
SEL_ITEM="Aktywny element (akcent)"
COLOR_SEL_BG="Tło"
COLOR_SEL_FG="Tekst"
COLOR_SEL_BORDER="Obramowanie"
I_BORDER="Obramowanie"
I_RADIUS="i Zaokrąglenie"
ITEM_BORDER="Obramowanie (px)"
ITEM_RADIUS="Zaokrąglenie (px)"
COLOR_NORM_BG="Tło"
SEPARATOR_TITLE="Separator/Nagłówek"
TITLE="Nagłówek"
COLOR_TITLE_BG="Tło nagłówka"
COLOR_TITLE_FG="Kolor tekstu nagłówka"
COLOR_TITLE_BORDER="Kolor obramowania"
SEP_HALIGN="Wyrównanie nagłówka"
H_LEFT="do lewej"
H_CENTER="po środku"
H_RIGHT="do prawej"
COLOR_SEP_FG="Kolor separatora (linii)"
MORE_MENU_SETTINGS="więcej ustawień menu"
GLOBAL_MENU_SETTINGS="Globalne Ustawienia Menu"
RESET="Resetuj motyw"
TO_DEFAULT=""
EDIT="Edytuj plik "
FILE="plik"
SET_RANDOM="Ustaw losowy motyw menu"
_COLORIZER_ROOT="<b>Colorizer</b> - menu główne"
;;
*)
MENU_THEME="Menu theme"
QUICK_TWEAKS="Global Settings/Quick Tweaks"
OVERALL_STYLE="Overall style"
SCHEMES="Color Schemes"
SYSTEM_SCHEMES="System colorschemes"
YOUR_SCHEMES="My colorschemes"
SAVE_CURRSCHEME="Save current colors as..."
OPEN_SCHEMEFILE="Open schemes file in editor"
COLORSCHEME="Color Scheme"
APPLY_SCHEME="Apply colorscheme"
DELETE="Delete"
DELETE_SCHEME="Delete colorscheme"
BORDER="Menu Border"
PADDING="Padding"
RADIUS="Rounded Corners"
SUBSPACING="Submenu Spacing"
LINE_HEIGHT="Line height"
ARROW_STRING="Arrow string"
ARROW_STRING_LEFT="Left Arrow string"
MBG_OPACITY="Menu BG Opacity"
SIZING="Menu sizing"
WIDE="wide"
NORMAL="normal"
TIGHT="tight"
MONOCHROMATIC="Monochromatic"
CHOOSE_AND_PICK="Choose variant and pick color..."
GENERATEFROMWP="<i>Generate from wallpaper colors...</i>"
LIGHTBG="Light Background"
DARKBG="Dark Background"
COLOR_MENU_BG="Background (BG)"
COLOR_MENU_BG_TO="BG to (gradient)"
COLOR_MENU_BORDER="Menu Border"
GRADIENT_POS="Gradient direction"
NONE="none"
TOP="top"
RIGHT="right"
BOTTOM="bottom"
LEFT="left"
TOP_LEFT="top_left"
TOP_RIGHT="top_right"
BOTTOM_LEFT="bottom_left"
BOTTOM_RIGHT="bottom_right"
PRE_GRADIENTS="Apply gradient"
GRADIENT_REVERSE="Reverse gradient colors"
ITEM="Item"
FONT="Font"
FONTS="Fonts"
INCREASE="Increase to"
DECREASE="Decrease to"
FONT_CUSTOM="Select custom font and size..."
FONT_FAMILY="font family"
FONT_SIZE="font size"
ITEM_FONT="Item Font"
TITLE_FONT="Title Font"
COLOR_NORM_FG="Text Color"
SEL_ITEM="Selected Item (accent)"
COLOR_SEL_BG="Background"
COLOR_SEL_FG="Text"
COLOR_SEL_BORDER="Border"
I_BORDER="Item Border"
I_RADIUS="and Radius"
ITEM_BORDER="Item Border (px)"
ITEM_RADIUS="Item Radius (px)"
COLOR_NORM_BG="Item Background"
SEPARATOR_TITLE="Separator/Title"
TITLE="Title"
COLOR_TITLE_BG="Title Background"
COLOR_TITLE_FG="Title Foreground"
COLOR_TITLE_BORDER="Title Border color "
SEP_HALIGN="Title alignment"
H_LEFT="left"
H_CENTER="center"
H_RIGHT="right"
COLOR_SEP_FG="Separator (line) color"
MORE_MENU_SETTINGS="more menu settings"
GLOBAL_MENU_SETTINGS="Global Menu Settings"
RESET="Reset"
TO_DEFAULT="to default"
EDIT="Edit"
FILE="file"
SET_RANDOM="Set random menu theme"
_COLORIZER_ROOT="<b>Colorizer</b> rootmenu"
;;
esac
getvalues () {
read MBG MBGA<<< "$(grep 'color_menu_bg ' ${THEMERC} | cut -d'=' -f2)"
@ -41,157 +258,370 @@ getvalues () {
}
getvalues
#color_menu_bg = #ECE9E6 90
#color_menu_bg_to = #ffffff 90
#color_menu_border = #ECE9E6 100
#menu_gradient_pos=bottom_left
# Current colors
currcolors="${MBG}|${MBGT}|${MBORDER}|${TBG}|${TFG}|${TBORDER}|${NORMBG}|${NFG}|${SBG}|${SFG}|${SBORDER}|${SEPFG}|${GRADIENT}|"
#echo "${currcolors}" > ~/.config/mabox/.menu_colors
if [ ! -f "$USERSCHEMES" ]; then
mkdir -p "$HOME/.config/colorizer/menus/"
echo " MBG | MBGT |MBORDER| TBG | TFG |TBORDER|NORMBG | NFG | SBG | SFG |SBORDER| SEPFG |GRADIENT|scheme_name" > "$USERSCHEMES"
fi
#sep_height = 0
#sep_halign = right
#color_sep_fg = #222222 40
#color_title_bg = #222222 30
#color_title_fg = #EEEEEE 100
#color_title_border = #222222 3
out+=("^sep($MENU_THEME: <i>${jgmenu_theme}</i>)")
out+=("<big></big> $QUICK_TWEAKS,^checkout(tweaks)")
#item_border = 1
#item_radius = 2
#color_norm_bg = #222222 0
#color_norm_fg = #222222 100
#color_sel_bg = #222222 60
#color_sel_fg = #EEEEEE 90
#color_sel_border = #222222 50
out2+=("^tag(tweaks)")
out2+=("^sep($OVERALL_STYLE)")
######
out2+=("$BORDER [ <b>${jgtools_border:-0}px</b> ],^checkout(mborder)")
out2+=("$PADDING [ <b>${jgtools_padding:-0}px</b> ],^checkout(mpadding)")
#out2+=("$RADIUS [ <b>${jgtools_radius:-0}</b> ],^checkout(mradius)")
out2+=("$SUBSPACING [ <b>${submenu_spacing:-0}px</b> ],^checkout(subspacing)")
out2+=("^sep()")
out2+=("$LINE_HEIGHT [ <b>$item_height_factor%</b> ],^checkout(lineheight)")
out2+=("^sep()")
out2+=("$ARROW_STRING [ <b>$arrow_string</b> ],^checkout(arrow)")
out2+=("$ARROW_STRING_LEFT [ <b>$arrow_string_left</b> ],^checkout(arrowleft)")
out+=("^sep(Menu theme: <i>${jgmenu_theme}</i>)")
out+=("<tt><small>$(printf '%3s' "$MBGA")</small> <span bgcolor='$MBG' bgalpha='${MBGA/#[0]/1}%'> </span><span bgcolor='$MBG'> </span></tt> COLOR_MENU_BG,^pipe(mbclr '$MBG' jgctl color_menu_bg COLOR_MENU_BG '$me')")
out+=("<tt><small>$(printf '%3s' "$MBGTA")</small> <span bgcolor='$MBGT' bgalpha='${MBGTA/#[0]/1}%'> </span><span bgcolor='$MBGT'> </span></tt> COLOR_MENU_BG_TO,^pipe(mbclr '$MBGT' jgctl color_menu_bg_to COLOR_MENU_BG_TO '$me')")
out+=("<tt><small>$(printf '%3s' "$MBORDERA")</small> <span bgcolor='$MBORDER' bgalpha='${MBORDERA/#[0]/1}%'> </span><span bgcolor='$MBORDER'> </span></tt> COLOR_MENU_BORDER,^pipe(mbclr '$MBORDER' jgctl color_menu_border COLOR_MENU_BORDER '$me')")
out3+=("^tag(mborder)")
out3+=("^sep($BORDER)")
for i in 0 1 2 3 4 5 6 8 10 12; do [[ "$jgtools_border" == $i ]] && out3+=("<big>綠</big> $(printf "<b><tt>%3s</tt></b>,%s" "$i" "jgctl border ${i}")") || out3+=("<big>祿</big> $(printf "<tt>%3s</tt>,%s" "$i" "jgctl border ${i}")");done
out3+=("^tag(mpadding)")
out3+=("^sep($PADDING)")
for i in 0 2 4 6 8 10 12 14 16 18 20 22 24 28 32 40; do [[ "$jgtools_padding" == $i ]] && out3+=("<big>綠</big> $(printf "<b><tt>%3s</tt></b>,%s" "$i" "jgctl padding ${i}")") || out3+=("<big>祿</big> $(printf "<tt>%3s</tt>,%s" "$i" "jgctl padding ${i}")");done
out3+=("^tag(subspacing)")
out3+=("^sep($SUBSPACING)")
for i in -20 -12 -10 -8 -6 -4 -2 0 1 2 4 6 8 10 12 14 16 18 20; do [[ "$submenu_spacing" == $i ]] && out3+=("<big>綠</big> $(printf "<b><tt>%4s</tt></b>,%s" "$i" "mb-setvar submenu_spacing=${i};$me")") || out3+=("<big>祿</big> $(printf "<tt>%4s</tt>,%s" "$i" "mb-setvar submenu_spacing=${i};$me")");done
out3+=("^tag(lineheight)")
out3+=("^sep($LINE_HEIGHT)")
for i in 160 180 200 220 240 280 300; do [[ "$item_height_factor" == $i ]] && out3+=("<big>綠</big> $(printf "<b><tt>%4s%%</tt></b>,%s" "$i" "mb-setvar item_height_factor=${i};$me")") || out3+=("<big>祿</big> $(printf "<tt>%4s%%</tt>,%s" "$i" "mb-setvar item_height_factor=${i};$me")");done
out3+=("^tag(arrow)")
out3+=("^sep($ARROW_STRING)")
for i in "" "" "" "" "" "" "󰔰" "󰮺" "" "壟" "" "" "" "" "" "󰋇" "..." ":." "." "+" "^" "-" "_" "" "" "󰞔" "" ""; do [[ "$arrow_string" == $i ]] && out3+=("<tt>&gt;&gt; </tt>$i<tt> &lt;&lt;</tt>,$me") || out3+=("<tt> </tt>$i,mb-setvar arrow_string=${i};$me");done
out3+=("^tag(arrowleft)")
out3+=("^sep($ARROW_STRING_LEFT)")
for i in "" "" "" "" "" "" "󰶢" "󰮹" "" "鹿" "" "" "" "" "" "󰩔"; do [[ "$arrow_string_left" == $i ]] && out3+=("<tt>&gt;&gt; </tt>$i<tt> &lt;&lt;</tt>,$me") || out3+=("<tt> </tt>$i,mb-setvar arrow_string_left=${i};$me");done
out2+=("^sep()")
out2+=("$MBG_OPACITY,^checkout(mbgopacity")
out3+=("^tag(mbgopacity)")
out3+=("^sep(mbgopacity)")
out3+=("100% Opaque,jgctl tweak opacity 100;$me")
out3+=("90%,jgctl tweak opacity 90;$me")
out3+=("80%,jgctl tweak opacity 80;$me")
out3+=("60%,jgctl tweak opacity 60;$me")
out3+=("50%,jgctl tweak opacity 50;$me")
out3+=("40%,jgctl tweak opacity 40;$me")
out3+=("30%,jgctl tweak opacity 30;$me")
out3+=("20%,jgctl tweak opacity 20;$me")
out3+=("10%,jgctl tweak opacity 10;$me")
out3+=("0% Fully transparent,jgctl tweak opacity 0;$me")
out2+=("^sep()")
out2+=("Solid Color,jgctl tweak solid;$me")
out2+=("Gradient,jgctl tweak gradient;$me")
out2+=("^sep($SIZING)")
out2+=("$WIDE,jgctl tweak sizing wide;$me")
out2+=("$NORMAL,jgctl tweak sizing normal;$me")
out2+=("$TIGHT,jgctl tweak sizing tight;$me")
#### COLOR SCHEMES 
out+=("<big><span bgcolor='${MBG}'> <span fgcolor='${TBG}'></span> <span fgcolor='${SFG}'></span> <span fgcolor='${SBG}'></span> </span></big> $SCHEMES,^checkout(schemes)")
out2+=("^tag(schemes)")
out2+=("^sep($SCHEMES)")
out2+=("^sep($MONOCHROMATIC)")
out2+=("^sep(<i>$CHOOSE_AND_PICK</i>)")
out2+=("<big></big> $LIGHTBG...,jgctl mono pick light")
out2+=("<big></big> $DARKBG...,jgctl mono pick dark")
out2+=("^sep($GENERATEFROMWP)")
out2+=("<big><span bgcolor='${w[-3]}'> <span bgcolor='${w[-5]}'> <span bgcolor='${w[-1]}' fgcolor='${w[1]}'> $LIGHTBG </span> </span> </span></big>,w2theme menu light;$me")
out2+=("<big><span bgcolor='${w[1]}'> <span bgcolor='${w[4]}'> <span bgcolor='${w[2]}' fgcolor='${w[-2]}'> $DARKBG </span> </span> </span></big>,w2theme menu dark;$me")
out2+=("^sep($SYSTEM_SCHEMES)")
n=1
while IFS="|" read -r mbg mbgt mborder tbg tfg tborder normbg nfg sbg sfg sborder sepfg grad scheme_name
do
((n=n+1))
case "$grad" in
none)icon="󰄱";;
top)icon="";;
right)icon="";;
bottom)icon="";;
left)icon="";;
top_left)icon="";;
top_right)icon="";;
bottom_left)icon="";;
bottom_right)icon="";;
esac
out2+=("<tt>$(printf '%-20s' "${scheme_name}")</tt><big><span bgcolor='${mbg}' fgcolor='${nfg}'> <small>item</small> <span bgcolor='${tbg}' fgcolor='${tfg}'> <small><b>title</b></small> </span> <span bgcolor='${sbg}' fgcolor='${sfg}'> <small>[ sel ]</small> </span> <span bgcolor='${mbgt}'> <small>${icon}</small> </span></span></big>,jgctl applyscheme sys $n;$me")
done < <(tail -n +2 "$SYSSCHEMES")
out2+=("^sep($YOUR_SCHEMES)")
out2+=("<big></big> $SAVE_CURRSCHEME,jgctl savescheme '${currcolors}';$me")
out2+=("<big></big> $OPEN_SCHEMEFILE,xdg-open $USERSCHEMES")
out2+=("^sep()")
n=1
while IFS="|" read -r mbg mbgt mborder tbg tfg tborder normbg nfg sbg sfg sborder sepfg grad scheme_name
do
((n=n+1))
case "$grad" in
none)icon="󰄱";;
top)icon="";;
right)icon="";;
bottom)icon="";;
left)icon="";;
top_left)icon="";;
top_right)icon="";;
bottom_left)icon="";;
bottom_right)icon="";;
esac
out2+=("<tt>$(printf '%-20s' "${scheme_name}")</tt><big><span bgcolor='${mbg}' fgcolor='${nfg}'> <small>item</small> <span bgcolor='${tbg}' fgcolor='${tfg}'> <small><b>title</b></small> </span> <span bgcolor='${sbg}' fgcolor='${sfg}'> <small>[ sel ]</small> </span> <span bgcolor='${mbgt}'> <small>${icon}</small> </span></span></big>,^checkout(sch${n})")
out3+=("^tag(sch${n}")
out3+=("^sep($COLORSCHEME: ${scheme_name})")
out3+=("<big></big> $APPLY_SCHEME,jgctl applyscheme usr ${n};$me")
out3+=("^sep($DELETE)")
out3+=("<big>󰗨</big> $DELETE_SCHEME ${scheme_name},jgctl delscheme ${n};$me")
done < <(tail -n +2 "$USERSCHEMES")
out+=("^sep($FONTS)")
out+=("<big>󰛖</big> $TITLE [ <b>$menu_sep_font_family $menu_sep_font_size</b> ],^checkout(mtitlefont)")
out+=("<big>󰛖</big> $ITEM [ <b>$menu_font_family $menu_font_size</b> ],^checkout(mitemfont)")
# Item font submenu
out2+=("^tag(mitemfont)")
out2+=("^sep($ITEM_FONT)")
out2+=("<big>󰛖</big> $FONT_CUSTOM,mb-setfont menu_item;$me")
out2+=("^sep($FONT_SIZE)")
out2+=("<big>󰧴</big> $INCREASE <b>$((menu_font_size+1)) px</b>,mb-setvar menu_font_size=$((menu_font_size+1));$me")
out2+=("<big>󰧳</big> $DECREASE <b>$((menu_font_size-1)) px</b>,mb-setvar menu_font_size=$((menu_font_size-1));$me")
out2+=("^sep()")
sizes=(14 13 12 11 10 9 8)
for i in "${sizes[@]}"
do
[[ "$menu_font_size" == "$i" ]] && out2+=("<big>綠</big> <b>$i px</b>,$me") || out2+=("<big>祿</big> $i px,mb-setvar menu_font_size=$i;$me")
done
if [ -f "$HOME/.config/mabox/fonts.list" ];then
mapfile -t favfonts < <( grep -vE "^($|#)" ~/.config/mabox/fonts.list)
else
mapfile -t favfonts < <( grep -vE "^($|#)" /usr/share/mabox-colorizer/fonts.list)
cp /usr/share/mabox-colorizer/fonts.list ~/.config/mabox/
fi
if [ "${#favfonts[@]}" -gt 0 ];then
out2+=("^sep($FONT_FAMILY)")
for fon in "${favfonts[@]}";do
[[ "$menu_font_family" == "$fon" ]] && out2+=("<big>綠</big> <span font_family=\"${fon}\">${fon}</span>,$me") || out2+=("<big>祿</big> <span font_family=\"${fon}\">${fon}</span>,mb-setvar \"menu_font_family='${fon}'\";$me")
done
fi
out2+=("^tag(mtitlefont)")
out2+=("^sep($TITLE_FONT)")
out2+=("<big>󰛖</big> $FONT_CUSTOM,mb-setfont menu_sep;$me")
out2+=("^sep($FONT_SIZE)")
out2+=("<big>󰧴</big> $INCREASE <b>$((menu_sep_font_size+1)) px</b>,mb-setvar menu_sep_font_size=$((menu_sep_font_size+1));$me")
out2+=("<big>󰧳</big> $DECREASE <b>$((menu_sep_font_size-1)) px</b>,mb-setvar menu_sep_font_size=$((menu_sep_font_size-1));$me")
out2+=("^sep()")
sizes=(14 13 12 11 10 9 8)
for i in "${sizes[@]}"
do
[[ "$menu_sep_font_size" == "$i" ]] && out2+=("<big>綠</big> <b>$i px</b>,$me") || out2+=("<big>祿</big> $i px,mb-setvar menu_sep_font_size=$i;$me")
done
if [ "${#favfonts[@]}" -gt 0 ];then
out2+=("^sep($FONT_FAMILY)")
for fon in "${favfonts[@]}";do
[[ "$menu_sep_font_family" == "$fon" ]] && out2+=("<big>綠</big> <span font_family=\"${fon}\">${fon}</span>,$me") || out2+=("<big>祿</big> <span font_family=\"${fon}\">${fon}</span>,mb-setvar \"menu_sep_font_family='${fon}'\";$me")
done
fi
### MENU
out+=("^sep(Menu)")
out+=("<tt><small>$(printf '%3s' "$MBGA")</small> <span bgcolor='$MBG' bgalpha='${MBGA/#[0]/1}%'> </span><span bgcolor='$MBG'> </span></tt> $COLOR_MENU_BG,^pipe(mbclr '$MBG' jgctl color_menu_bg '${COLOR_MENU_BG}' '$me')")
out+=("<tt><small>$(printf '%3s' "$MBGTA")</small> <span bgcolor='$MBGT' bgalpha='${MBGTA/#[0]/1}%'> </span><span bgcolor='$MBGT'> </span></tt> $COLOR_MENU_BG_TO,^pipe(mbclr '$MBGT' jgctl color_menu_bg_to '${COLOR_MENU_BG_TO}' '$me')")
if [[ "$jgtools_border" != "0" ]];then
out+=("<tt><small>$(printf '%3s' "$MBORDERA")</small> <span bgcolor='$MBORDER' bgalpha='${MBORDERA/#[0]/1}%'> </span><span bgcolor='$MBORDER'> </span></tt> $COLOR_MENU_BORDER,^pipe(mbclr '$MBORDER' jgctl color_menu_border '${COLOR_MENU_BORDER}' '$me')")
fi
out+=("^sep()")
out+=("GRADIENT_POS [ $GRADIENT ],^checkout(gradientpos)")
out+=("^sep(separator/title)")
out+=("<tt><small>$(printf '%3s' "$TBGA")</small> <span bgcolor='$TBG' bgalpha='${TBGA}%'> </span><span bgcolor='$TBG'> </span></tt> COLOR_TITLE_BG,^pipe(mbclr '$TBG' jgctl color_title_bg COLOR_TITLE_BG '$me')")
out+=("<tt><small>$(printf '%3s' "$TFGA")</small> <span weight='bold' bgcolor='$TBG' bgalpha='${TBGA/#[0]/1}%' fgcolor='$TFG' fgalpha='${TFGA}%'> AbCd </span></tt> COLOR_TITLE_FG,^pipe(mbclr '$TFG' jgctl color_title_fg COLOR_TITLE_FG '$me')")
out+=("<tt><small>$(printf '%3s' "$TBORDERA")</small> <span bgcolor='$TBORDER' bgalpha='${TBORDERA/#[0]/1}%'> </span><span bgcolor='$TBORDER'> </span></tt> COLOR_TITLE_BORDER,^pipe(mbclr '$TBORDER' jgctl color_title_border COLOR_TITLE_BORDER '$me')")
case "$GRADIENT" in
none)icon="󰄱";;
top)icon="";;
right)icon="";;
bottom)icon="";;
left)icon="";;
top_left)icon="";;
top_right)icon="";;
bottom_left)icon="";;
bottom_right)icon="";;
esac
out+=("<big>$icon</big> $GRADIENT_POS [ <b>$GRADIENT</b> ],^checkout(gradientpos)")
out+=("<big></big> $GRADIENT_REVERSE,jgctl gradient '${MBGT}' '${MBG}';$me")
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 menu)")
### TITLE/SEPARATOR
out+=("^sep($SEPARATOR_TITLE)")
out+=("<tt><small>$(printf '%3s' "$TBGA")</small> <span bgcolor='$TBG' bgalpha='${TBGA}%'> </span><span bgcolor='$TBG'> </span></tt> $COLOR_TITLE_BG,^pipe(mbclr '$TBG' jgctl color_title_bg '${COLOR_TITLE_BG}' '$me')")
out+=("<tt><small>$(printf '%3s' "$TFGA")</small> <span weight='bold' bgcolor='$TBG' bgalpha='${TBGA/#[0]/1}%' fgcolor='$TFG' fgalpha='${TFGA}%'> AbCd </span></tt> $COLOR_TITLE_FG,^pipe(mbclr '$TFG' jgctl color_title_fg '${COLOR_TITLE_FG}' '$me')")
out+=("<tt><small>$(printf '%3s' "$TBORDERA")</small> <span bgcolor='$TBORDER' bgalpha='${TBORDERA/#[0]/1}%'> </span><span bgcolor='$TBORDER'> </span></tt> $COLOR_TITLE_BORDER,^pipe(mbclr '$TBORDER' jgctl color_title_border '${COLOR_TITLE_BORDER}' '$me')")
out+=("^sep()")
out+=("SEP_HALIGN [ $SEPHALIGN ],^checkout(sephalign)")
case "$SEPHALIGN" in
left) icon="";;
center) icon="";;
right) icon="";;
esac
out+=("<big>$icon</big> $SEP_HALIGN [ <b>$SEPHALIGN</b> ],^checkout(sephalign)")
out+=("^sep()")
out+=("<tt><small>$(printf '%3s' "$SEPFGA")</small> <span fgcolor='$SEPFG' fgalpha='${SEPFGA/#[0]/1}%'>------</span></tt> COLOR_SEP_FG,^pipe(mbclr '$SEPFG' jgctl color_sep_fg COLOR_SEP_FG '$me')")
out+=("^sep(item)")
out+=("<tt><small>$(printf '%3s' "$NFGA")</small> <span weight='bold' fgcolor='$NFG' fgalpha='${NFGA/#[0]/1}%'> AbCd </span></tt> COLOR_NORM_FG,^pipe(mbclr '$NFG' jgctl color_norm_fg COLOR_NORM_FG '$me')")
out+=("<tt><small>$(printf '%3s' "$SBGA")</small> <span bgcolor='$SBG' bgalpha='${SBGA/#[0]/1}%'> </span><span bgcolor='$SBG'> </span></tt> COLOR_SEL_BG,^pipe(mbclr '$SBG' jgctl color_sel_bg COLOR_SEL_BG '$me')")
out+=("<tt><small>$(printf '%3s' "$SFGA")</small> <span weight='bold' bgcolor='$SBG' bgalpha='${SBGA/#[0]/1}%' fgcolor='$SFG' fgalpha='${SFGA/#[0]/1}%'> AbCd </span></tt> COLOR_SEL_FG,^pipe(mbclr '$SFG' jgctl color_sel_fg COLOR_SEL_FG '$me')")
out+=("<tt><small>$(printf '%3s' "$SBORDERA")</small> <span bgcolor='$SBORDER' bgalpha='${SBORDERA/#[0]/1}%'> </span><span bgcolor='$SBORDER'> </span></tt> COLOR_SEL_BORDER,^pipe(mbclr '$SBORDER' jgctl color_sel_border COLOR_SEL_BORDER '$me')")
out+=("ITEM_BORDER [ $IBORDER ],^checkout(itemborder)")
out+=("ITEM_RADIUS [ $IRADIUS ],^checkout(itemradius)")
out+=("<tt><small>$(printf '%3s' "$SEPFGA")</small> <span fgcolor='$SEPFG' fgalpha='${SEPFGA/#[0]/1}%'>------</span></tt> ${COLOR_SEP_FG},^pipe(mbclr '$SEPFG' jgctl color_sep_fg '${COLOR_SEP_FG}' '$me')")
### SELECTED ITEM (ACCENT)
out+=("^sep($SEL_ITEM)")
out+=("<tt><small>$(printf '%3s' "$SBGA")</small> <span bgcolor='$SBG' bgalpha='${SBGA/#[0]/1}%'> </span><span bgcolor='$SBG'> </span></tt> $COLOR_SEL_BG,^pipe(mbclr '$SBG' jgctl color_sel_bg '${COLOR_SEL_BG}' '$me')")
out+=("<tt><small>$(printf '%3s' "$SFGA")</small> <span weight='bold' bgcolor='$SBG' bgalpha='${SBGA/#[0]/1}%' fgcolor='$SFG' fgalpha='${SFGA/#[0]/1}%'> AbCd </span></tt> $COLOR_SEL_FG,^pipe(mbclr '$SFG' jgctl color_sel_fg '${COLOR_SEL_FG}' '$me')")
if [[ "$IBORDER" != "0" ]];then
out+=("<tt><small>$(printf '%3s' "$SBORDERA")</small> <span bgcolor='$SBORDER' bgalpha='${SBORDERA/#[0]/1}%'> </span><span bgcolor='$SBORDER'> </span></tt> $COLOR_SEL_BORDER,^pipe(mbclr '$SBORDER' jgctl color_sel_border '${COLOR_SEL_BORDER}' '$me')")
fi
out+=("^sep()")
[[ ! -z "$NORMBG" ]] && out+=("<tt><small>$(printf '%3s' "$NORMBGA")</small> <span bgcolor='${NORMBG}' bgalpha='${NORMBGA/#[0]/1}%'> </span><span bgcolor='${NORMBG}'> </span></tt> COLOR_NORM_BG,^pipe(mbclr '$NORMBG' jgctl color_norm_bg COLOR_NORM_BG '$me')")
out+=("Apply <big><span bgcolor='${SBG}' fgcolor='${SFG}'> accent </span></big> preset,^checkout(sel_accents)")
out2+=("^tag(sel_accents)")
out2+=("^sep(Accent presets)")
while IFS="," read -r BG FG BGNAME FGNAME
do
[[ "$BGNAME" == "" ]] && BGNAME=${BG}
[[ "$FGNAME" == "" ]] && FGNAME=${FG}
out2+=("<big><span bgcolor='${FG}'> <span bgcolor='${BG}' fgcolor='${FG}'><small><tt>$(printf '%*s' 25 "${FGNAME} on ${BGNAME}")</tt></small> </span> </span></big>,jgctl accent '${BG}' '${FG}';$me")
out21+=("<big><span bgcolor='${BG}'> <span bgcolor='${FG}' fgcolor='${BG}'><small><tt>$(printf '%*s' 25 "${BGNAME} on ${FGNAME}")</tt></small> </span> </span></big>,jgctl accent '${FG}' '${BG}';$me")
done < <(tail -n +2 /usr/share/mabox-colorizer/readable_colors.csv)
out2+=("${out21[@]}")
### ITEM
out+=("^sep($ITEM)")
out+=("<tt><small>$(printf '%3s' "$NFGA")</small> <span weight='bold' fgcolor='$NFG' fgalpha='${NFGA/#[0]/1}%'> AbCd </span></tt> $COLOR_NORM_FG,^pipe(mbclr '$NFG' jgctl color_norm_fg '${COLOR_NORM_FG}' '$me')")
out+=("^sep()")
[[ ! -z "$NORMBG" ]] && out+=("<tt><small>$(printf '%3s' "$NORMBGA")</small> <span bgcolor='${NORMBG}' bgalpha='${NORMBGA/#[0]/1}%'> </span><span bgcolor='${NORMBG}'> </span></tt> $COLOR_NORM_BG,^pipe(mbclr '$NORMBG' jgctl color_norm_bg '${COLOR_NORM_BG}' '$me')" "^sep()")
out+=("$I_BORDER [ <b>$IBORDER</b> ] $I_RADIUS [ <b>$IRADIUS</b> ],^checkout(itemborder_radius)")
out2+=("^tag(gradientpos)")
out2+=("^sep(GRADIENT_POS <small>$GRADIENT</small>)")
out2+=("none,jgctl menu_gradient_pos none;$me")
out2+=("^sep($GRADIENT_POS <small>$GRADIENT</small>)")
out2+=("󰄱 $NONE,jgctl menu_gradient_pos none;$me")
out2+=("^sep()")
out2+=("top,jgctl menu_gradient_pos top;$me")
out2+=("right,jgctl menu_gradient_pos right;$me")
out2+=("bottom,jgctl menu_gradient_pos bottom;$me")
out2+=("left,jgctl menu_gradient_pos left;$me")
out2+=("top_left,jgctl menu_gradient_pos top_left;$me")
out2+=("top_right,jgctl menu_gradient_pos top_right;$me")
out2+=("bottom_left,jgctl menu_gradient_pos bottom_left;$me")
out2+=("bottom_right,jgctl menu_gradient_pos bottom_right;$me")
out2+=(" $TOP,jgctl menu_gradient_pos top;$me")
out2+=(" $RIGHT,jgctl menu_gradient_pos right;$me")
out2+=(" $BOTTOM,jgctl menu_gradient_pos bottom;$me")
out2+=(" $LEFT,jgctl menu_gradient_pos left;$me")
out2+=(" $TOP_LEFT,jgctl menu_gradient_pos top_left;$me")
out2+=(" $TOP_RIGHT,jgctl menu_gradient_pos top_right;$me")
out2+=(" $BOTTOM_LEFT,jgctl menu_gradient_pos bottom_left;$me")
out2+=(" $BOTTOM_RIGHT,jgctl menu_gradient_pos bottom_right;$me")
out2+=("^tag(sephalign)")
out2+=("^sep(SEP_HALIGN)")
out2+=("left,jgctl sep_halign left;$me")
out2+=("center,jgctl sep_halign center;$me")
out2+=("right,jgctl sep_halign right;$me")
out2+=("^tag(itemborder)")
out2+=("^sep(ITEM_BORDER)")
out2+=("0,jgctl item_border 0;$me")
out2+=("^sep($SEP_HALIGN)")
[[ "$SEPHALIGN" == "left" ]] && out2+=("<big>綠</big>  $H_LEFT,jgctl sep_halign left;$me") || out2+=("<big>祿</big>  $H_LEFT,jgctl sep_halign left;$me")
[[ "$SEPHALIGN" == "center" ]] && out2+=("<big>綠</big>  $H_CENTER,jgctl sep_halign center;$me") || out2+=("<big>祿</big>  $H_CENTER,jgctl sep_halign center;$me")
[[ "$SEPHALIGN" == "right" ]] && out2+=("<big>綠</big>  $H_RIGHT,jgctl sep_halign right;$me") || out2+=("<big>祿</big>  $H_RIGHT,jgctl sep_halign right;$me")
out2+=("^tag(itemborder_radius)")
out2+=("^sep($ITEM_BORDER)")
[[ "$IBORDER" == 0 ]] && out2+=("<big>綠</big> 0 px,jgctl item_border 0;$me") || out2+=("<big>祿</big> 0 px,jgctl item_border 0;$me")
out2+=("^sep()")
out2+=("1,jgctl item_border 1;$me")
out2+=("2,jgctl item_border 2;$me")
out2+=("^tag(itemradius)")
out2+=("^sep(ITEM_RADIUS)")
out2+=("0,jgctl item_radius 0;$me")
[[ "$IBORDER" == 1 ]] && out2+=("<big>綠</big> 1 px,jgctl item_border 1;$me") || out2+=("<big>祿</big> 1 px,jgctl item_border 1;$me")
[[ "$IBORDER" == 2 ]] && out2+=("<big>綠</big> 2 px,jgctl item_border 2;$me") || out2+=("<big>祿</big> 2 px,jgctl item_border 2;$me")
out2+=("^sep($ITEM_RADIUS)")
[[ "$IRADIUS" == 0 ]] && out2+=("<big>綠</big> 0 px,jgctl item_radius 0;$me") || out2+=("<big>祿</big> 0 px,jgctl item_radius 0;$me")
out2+=("^sep()")
out2+=("1,jgctl item_radius 1;$me")
out2+=("2,jgctl item_radius 2;$me")
out2+=("3,jgctl item_radius 3;$me")
out2+=("4,jgctl item_radius 4;$me")
out2+=("5,jgctl item_radius 5;$me")
out2+=("6,jgctl item_radius 6;$me")
[[ "$IRADIUS" == 1 ]] && out2+=("<big>綠</big> 1 px,jgctl item_radius 1;$me") || out2+=("<big>祿</big> 1 px,jgctl item_radius 1;$me")
[[ "$IRADIUS" == 2 ]] && out2+=("<big>綠</big> 2 px,jgctl item_radius 2;$me") || out2+=("<big>祿</big> 2 px,jgctl item_radius 2;$me")
[[ "$IRADIUS" == 3 ]] && out2+=("<big>綠</big> 3 px,jgctl item_radius 3;$me") || out2+=("<big>祿</big> 3 px,jgctl item_radius 3;$me")
[[ "$IRADIUS" == 4 ]] && out2+=("<big>綠</big> 4 px,jgctl item_radius 4;$me") || out2+=("<big>祿</big> 4 px,jgctl item_radius 4;$me")
[[ "$IRADIUS" == 5 ]] && out2+=("<big>綠</big> 5 px,jgctl item_radius 5;$me") || out2+=("<big>祿</big> 5 px,jgctl item_radius 5;$me")
[[ "$IRADIUS" == 6 ]] && out2+=("<big>綠</big> 6 px,jgctl item_radius 6;$me") || out2+=("<big>祿</big> 6 px,jgctl item_radius 6;$me")
out+=("")
out+=("^sep()")
if [ -f "${THEMERC}.bak" ]; then
out+=("RESET,jgctl reset;$me")
fi
out+=("EDIT FILE...,xdg-open $THEMERC")
out+=("rand,mb-setvar jgmenu_theme=$(basename -s .colorrc $(ls ~/.config/mabox/jgobthemes/*.colorrc | shuf -n 1));$me")
out+=("^sep(GLOBAL MENU SETTINGS)")
### COPIED FROM jgmenusettings-pipe for now
out+=("FONT_CUSTOM [ <b>${menu_font_family:-0} ${menu_font_size:-0}</b> ],mb-setfont menu;$me")
out+=("BORDER [ <b>${jgtools_border:-0}</b> ],^checkout(mborder)")
out+=("PADDING [ <b>${jgtools_padding:-0}</b> ],^checkout(mpadding)")
out+=("RADIUS [ <b>${jgtools_radius:-0}</b> ],^checkout(mradius)")
out+=("SUBSPACING [ <b>${submenu_spacing:-0}</b> ],^checkout(subspacing)")
out2+=("^tag(mborder)")
for i in 0 1 2 3 4 5 6 8 10 12; do out2+=("$(printf "<tt>%3s</tt>,%s" "$i" "mb-setvar jgtools_border=${i};$me")");done
out2+=("^tag(mpadding)")
for i in 0 2 4 6 8 10 12 14 16 18 20 22 24 28 32 40; do out2+=("$(printf "<tt>%3s</tt>,%s" "$i" "mb-setvar jgtools_padding=${i};$me")");done
out2+=("^tag(mradius)")
for i in 0 1 2 3 4 6 8 12 14 16 18 20 40; do out2+=("$(printf "<tt>%3s</tt>,%s" "$i" "mb-setvar jgtools_radius=${i};$me")");done
out2+=("^tag(subspacing)")
for i in -20 -8 -6 -4 -2 0 1 2 4 6 8 10 12 14 16 18 20; do out2+=("$(printf "<tt>%4s</tt>,%s" "$i" "mb-setvar submenu_spacing=${i};$me")");done
#out+=("^sep($MORE_MENU_SETTINGS)")
#out+=(" $GLOBAL_MENU_SETTINGS,jgmenusettings-pipe -c")
#out+=("$GLOBAL_MENU_SETTINGS,^pipe(jgmenusettings-pipe -r)")
### RUN
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")
out+=(" ${arrow_string_left} $_COLORIZER_ROOT,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
jgtools_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))
MENU_PADDING_TOP=$((jgtools_padding + 158))
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 150))
#WALLPAPER
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
WALLPAPER=${WALLPATH##*/}
THUMBDIR="$HOME/.config/mabox/wallthumbs"
THUMBDIR="$HOME/.cache/colorizer/thumbs"
mkdir -p ${THUMBDIR}
THUMB="${THUMBDIR}/${WALLPAPER}.png"
NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME}
((n++))
NAME=${NAME:${n}}
fi
THUMB="${THUMBDIR}/${NAME}.png"
if [[ ! -f "$THUMB" ]]
then
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
fi
#TEMP POSITION:
MENU_VALIGN="top"
MENU_MARGIN_Y="60"
mkconfigfile
cat <<EOF > ${MENU_ITEMS}
@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),270,150,4,left,top,,,${THUMB}
@icon,,$((jgtools_padding )),$((jgtools_padding)),270,150,4,left,top,,,${THUMB}
@rect,,$((jgtools_padding)),$((jgtools_padding + 116)),270,30,0,left,top,#222222 20,#222222 70,
@text,,$((jgtools_padding + 158)),$((jgtools_padding + 116)),120,30,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Colorizer</b> Menus</span>
@rect,,$((jgtools_padding + 4)),$((jgtools_padding + 22)),35,80,2,left,top,${MBORDER} ${MBORDERA},${MBG} ${MBGA},
@rect,,$((jgtools_padding + 40)),$((jgtools_padding + 72)),35,60,2,left,top,${MBORDER} ${MBORDERA},${MBG} ${MBGA},
$(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
@ -199,3 +629,4 @@ EOF
fi
printf '%s\n' "${out[@]}"
printf '%s\n' "${out2[@]}"
printf '%s\n' "${out3[@]}"

View File

@ -1,6 +1,48 @@
#!/bin/bash
#
# colorizer - set of tools for Mabox (auto)theming
# Copyright (C) 2022-2023 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/>.
MBCOLORSDIR="$HOME"/.themes/MBcolors/openbox-3/
GRADIENT_FILE="$HOME"/.config/colorizer/gradients_all.inc
MORE_GRADIENT_FILE="$HOME"/.config/colorizer/gradients_menu.inc
SYSTHEMES="/usr/share/mabox-colorizer/colorschemes/ob.csv"
USERTHEMES="$HOME/.config/colorizer/openbox/userthemes.csv"
### Wallpaper colors
WALLPALDIR="$HOME/.cache/colorizer/palettes"
mkdir -p "$WALLPALDIR"
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME}
((n++))
NAME=${NAME:${n}}
fi
if [ ! -f "$WALLPALDIR/$NAME.clr" ]; then
convert ${WALLPATH} -resize 25% -colors 16 -unique-colors txt:- |grep -v '^#'| awk '{print substr($3,1,7)}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$NAME.clr"
fi
mapfile -t w < "$WALLPALDIR/$NAME.clr"
if [ ! -f "$GRADIENT_FILE" ]; then
cp /usr/share/mabox-colorizer/gradients.inc "$GRADIENT_FILE"
fi
if [ ! -d "$MBCOLORSDIR" ]; then
mkdir -p ${MBCOLORSDIR}
@ -12,7 +54,239 @@ OBTHEME=$(awk '/<theme>/ {while (getline n) {if (match(n, /<name>/))
THEMERC="$HOME/.themes/$OBTHEME/openbox-3/themerc"
me="colorizer-ob -s"
if [ -f "$THEMERC" ]; then
case "$LANG" in
pl*)
QUICK_TWEAKS="Ustawienia główne"
OVERALL_STYLE="Ogólny styl"
THEMES="Motywy"
SYSTEM_THEMES="Systemowe"
YOUR_THEMES="Moje motywy"
SAVE_CURRTHEME="Zapisz aktualną kobfigurację jako..."
OPEN_THEMEFILE="Odwórz plik z motywami w edytorze"
THEME="Motyw"
APPLY="Zastosuj"
APPLY_THEME="Pełny motyw (kolory, czcionki i rozmiar)"
APPLY_SCHEME="Tylko kolory"
DELETE="Usuń"
DELETE_THEME="Usuń motyw"
OBTHEME_LBL="Motyw OpenBox"
MONOCHROMATIC="Monochromatyczny"
CHOOSE_AND_PICK="Wybierz wariant i pobierz kolor..."
GENERATEFROMWP="Generuj z kolorów tapety..."
LIGHTBG=" Jasne tło"
DARKBG="Ciemne tło"
RANDOMIZE="Generuj losowo"
TITLEBAR="Pasek tytułowy"
ACTIVE_WINDOW="Aktywne okno"
INACTIVE_WINDOW="Nieaktywne okno"
TITLEBAR_FONT="Czcionka"
ACTIVE_BG="Tło aktywnego okna"
INACTIVE_BG="Tło nieaktywnego okna"
TEXT_COLOR="Kolor tekstu"
TITLEBAR_TEXT="Tekst paska tytułowego"
FONT="Czcionka"
FONTSIZE="Rozmiar czcionki"
_INCREASE="Powiększ do"
_DECREASE="Pomniejsz do"
FONTFAMILY="Czcionka (rodzina)"
BOLD="Pogrubienie"
ITALIC="Kursywa"
TEXTALIGN="Wyrównanie tytułu"
LEFT="do lewej"
CENTER="po środku"
RIGHT="do prawej"
SHADOW="Cień"
NOSHADOW="bez cienia"
DARK="Ciemny"
LIGHT="Jasny"
TEXT="Tekst"
ACTIVE_FG="w aktywnym oknie"
INACTIVE_FG="w nieaktywnym oknie"
PADDING="Odstęp"
VERTICAL="W pionie"
HORIZONTAL="W poziomie"
RAISED_OR_FLAT="Płaski, Uniesiony, Wklęsły"
FLAT="płaski - <b>flat</b>"
RAISED="uniesiony - <b>raised</b>"
SUNKEN="wklęsły - <b>sunken</b>"
BUTTONS_LBL="Przyciski"
BUTTONS_LAYOUT="Układ przycisków"
LEGEND="Legenda"
GRADIENT_TYPE="Typ Gradientu"
SOLID_COLOR="Jednolity kolor (brak gradientu)"
PRE_GRADIENTS="Gotowe gradienty"
GRADIENT_REVERSE="Odwróć kolory Gradientu"
SPLITVERTICAL="Podział w pionie"
MIRRORHORIZONTAL="LustroPoziome"
DIAGONAL="Przekątna"
CROSSDIAGONAL="Przekątna krzyżowa"
PYRAMID="Piramida"
ACTIVE_BG_TO="Tło aktywnego okna 2"
INACTIVE_BG_TO="Tło nieaktywnego okna 2"
BORDER="Obramowanie okna"
BORDER_PX="Obramowanie (px)"
ACTIVE_BORDER="Obramowanie akt. okna"
INACTIVE_BORDER="Obramowanie nieakt. okna"
HANDLEWIDTH="Uchwyt - rozmiar"
ACTIVEHANDLE="Aktywny Uchwyt"
YES="Tak"
NO="Nie"
GRIPONLY="Tylko chwyt (po bokach)"
RESET="Resetuj"
RESET_THEME="Resetuj motyw"
AREYOUSURE="Czy aby na pewno?"
NOT_SUPORTED_OBTHEME="Nie wspierany motyw"
UNLOCK="odblokuj swoją kreatywność..."
SWITCH_TO_MBCOLORS="Przełącz na <b>MBColors</b>"
_COLORIZER_ROOT="<b>Colorizer</b> - menu główne"
;;
*)
QUICK_TWEAKS="Global Settings/Quick Tweaks"
OVERALL_STYLE="Overall style"
THEMES="Themes"
SYSTEM_THEMES="System themes"
YOUR_THEMES="My Themes"
SAVE_CURRTHEME="Save current setup as..."
OPEN_THEMEFILE="Open themes file in editor"
THEME="Theme"
APPLY="Apply"
APPLY_THEME="Full theme (colors,fonts and sizing)"
APPLY_SCHEME="Colors only"
DELETE="Delete"
DELETE_THEME="Delete theme"
OBTHEME_LBL="OpenBox theme"
MONOCHROMATIC="Monochromatic"
CHOOSE_AND_PICK="Choose variant and pick color..."
GENERATEFROMWP="Generate from wallpaper colors..."
LIGHTBG="Light Background"
DARKBG="Dark Background"
RANDOMIZE="Generate randomly"
TITLEBAR="Title Bar"
ACTIVE_WINDOW="Active Window"
INACTIVE_WINDOW="Inactive Window"
ACTIVE_BG="Active Background"
INACTIVE_BG="Inactive Background"
TEXT_COLOR="Text color"
TITLEBAR_TEXT="Title Bar Text"
TITLEBAR_FONT="Title Bar Font"
FONT="Font"
FONTSIZE="font size"
_INCREASE="Increase to"
_DECREASE="Decrease to"
FONTFAMILY="font family"
BOLD="Bold"
ITALIC="Italic"
TEXTALIGN="Title align"
LEFT="left"
CENTER="center"
RIGHT="right"
SHADOW="Shadow"
NOSHADOW="no shadow"
DARK="Dark"
LIGHT="Light"
TEXT="Text"
ACTIVE_FG="in active window"
INACTIVE_FG="in inactive window"
PADDING="Padding"
VERTICAL="Vertical"
HORIZONTAL="Horizontal"
RAISED_OR_FLAT="Flat, Raised or Sunken"
FLAT="flat"
RAISED="raised"
SUNKEN="sunken"
BUTTONS_LBL="Buttons"
BUTTONS_LAYOUT="Buttons Layout"
LEGEND="Legend"
GRADIENT_TYPE="Gradient type"
SPLITVERTICAL="SplitVertical"
MIRRORHORIZONTAL="MirrorHorizontal"
DIAGONAL="Diagonal"
CROSSDIAGONAL="CrossDiagonal"
PYRAMID="Pyramid"
SOLID_COLOR="Solid color (no gradient)"
PRE_GRADIENTS="Predefined gradients"
GRADIENT_REVERSE="Reverse Gradient Colors"
ACTIVE_BG_TO="Active Background to"
INACTIVE_BG_TO="Inactive Background to"
BORDER="Window Border"
BORDER_PX="Border (px)"
ACTIVE_BORDER="Active Border"
INACTIVE_BORDER="Inactiva Border"
HANDLEWIDTH="Handle Width"
ACTIVEHANDLE="Active Handle"
YES="Yes"
NO="No"
GRIPONLY="Grip only"
RESET="Reset"
RESET_THEME="Reset theme to default"
AREYOUSURE="Are you sure?"
NOT_SUPORTED_OBTHEME="Theme not supported"
UNLOCK="Unlock your creativity..."
SWITCH_TO_MBCOLORS="Switch to <b>MBColors</b>"
_COLORIZER_ROOT="<b>Colorizer</b> rootmenu"
;;
esac
getvalues () {
read ABG <<< "$(grep .active.title.bg.color: ${THEMERC} | cut -d':' -f2)"
read ABGTO <<< "$(grep .active.title.bg.colorTo ${THEMERC} | cut -d':' -f2)"
read NBG <<< "$(grep .inactive.title.bg.color: ${THEMERC} | cut -d':' -f2)"
read NBGTO <<< "$(grep .inactive.title.bg.colorTo ${THEMERC} | cut -d':' -f2)"
read AFG <<< "$(grep .active.label.text.color ${THEMERC} | cut -d':' -f2)"
read NFG <<< "$(grep .inactive.label.text.color ${THEMERC} | cut -d':' -f2)"
read ALINE <<< "$(grep .active.border.color ${THEMERC} | cut -d':' -f2)"
read NLINE <<< "$(grep inactive.border.color ${THEMERC} | cut -d':' -f2)"
read PHEIGHT <<< "$(grep ^padding.height: ${THEMERC} | cut -d':' -f2)"
read PWIDTH <<< "$(grep ^padding.width: ${THEMERC} | cut -d':' -f2)"
read TXTJUST <<< "$(grep text.justify ${THEMERC} | cut -d':' -f2)"
read HANDLE <<< "$(grep handle.width ${THEMERC} | cut -d':' -f2)"
read BORD <<< "$(grep border.width ${THEMERC} | cut -d':' -f2)"
#read BEVEL REST <<< "$(grep .title.bg: ${THEMERC} | cut -d':' -f2)"
read TITLEBG <<< "$(grep .title.bg: ${THEMERC} | cut -d':' -f2)"
case "${TITLEBG,,}" in
*flat*) BEVEL="flat";;
*raised*) BEVEL="raised";;
*sunken*) BEVEL="sunken";;
esac
case "${TITLEBG,,}" in
*solid*) GRAD=Solid;;
*splitvertical*) GRAD=SplitVertical;;
*vertical*) GRAD=Vertical;;
*mirrorhorizontal*) GRAD=MirrorHorizontal;;
*horizontal*) GRAD=Horizontal;;
*crossdiagonal*) GRAD=CrossDiagonal;;
*diagonal*) GRAD=Diagonal;;
*pyramid*) GRAD=Pyramid;;
esac
but=$(<"$MBCOLORSDIR/.buttons")
BUTTONS=${but:-tiny}
#notify-send.sh "Buttons" "$BUTTONS"
read AHBG <<< "$(grep .active.handle.bg.color: ${THEMERC} | cut -d':' -f2)"
if [ "$ABG" == "$AHBG" ];then
AHANDLE="yes"
else
AHANDLE="no"
fi
}
getvaluesrc() {
#from RC.xml
nspace="http://openbox.org/3.4/rc"
cfg="$HOME/.config/openbox/rc.xml"
FSIZE=$(xmlstarlet sel -N a="$nspace" -t -v '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:size' "$cfg")
FNAME=$(xmlstarlet sel -N a="$nspace" -t -v '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:name' "$cfg")
NDSLIMC=$(xmlstarlet sel -N a="$nspace" -t -v '/a:openbox_config/a:theme/a:titleLayout' "$cfg")
WEIGHT=$(xmlstarlet sel -N a="$nspace" -t -v '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:weight' "$cfg")
WEIGHT_INACT=$(xmlstarlet sel -N a="$nspace" -t -v '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:weight' "$cfg")
SLANT=$(xmlstarlet sel -N a="$nspace" -t -v '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:slant' "$cfg")
SLANT_INACT=$(xmlstarlet sel -N a="$nspace" -t -v '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:slant' "$cfg")
}
if [[ -f "$THEMERC" ]] && [[ "$OBTHEME" = "MBcolor"* ]]; then
if [ ! -f "${THEMERC}.bak" ]; then
cp ${THEMERC} ${THEMERC}.bak
#check if lines, and add missing
@ -42,51 +316,137 @@ if [ -f "$THEMERC" ]; then
grep ^[^#] "$THEMERC" | grep -qiF -- .text.font: || echo "window.*.text.font: shadow=n:shadowtint=70:shadowoffset=1" >> "$THEMERC"
fi
getvalues () {
read ABG <<< "$(grep .active.title.bg.color: ${THEMERC} | cut -d':' -f2)"
read ABGTO <<< "$(grep .active.title.bg.colorTo ${THEMERC} | cut -d':' -f2)"
read NBG <<< "$(grep .inactive.title.bg.color: ${THEMERC} | cut -d':' -f2)"
read NBGTO <<< "$(grep .inactive.title.bg.colorTo ${THEMERC} | cut -d':' -f2)"
read AFG <<< "$(grep .active.label.text.color ${THEMERC} | cut -d':' -f2)"
read NFG <<< "$(grep .inactive.label.text.color ${THEMERC} | cut -d':' -f2)"
read ALINE <<< "$(grep .active.border.color ${THEMERC} | cut -d':' -f2)"
read NLINE <<< "$(grep inactive.border.color ${THEMERC} | cut -d':' -f2)"
read PHEIGHT <<< "$(grep ^padding.height: ${THEMERC} | cut -d':' -f2)"
read PWIDTH <<< "$(grep ^padding.width: ${THEMERC} | cut -d':' -f2)"
read TXTJUST <<< "$(grep text.justify ${THEMERC} | cut -d':' -f2)"
read HANDLE <<< "$(grep handle.width ${THEMERC} | cut -d':' -f2)"
read BORD <<< "$(grep border.width ${THEMERC} | cut -d':' -f2)"
read WINRAISED REST <<< "$(grep .title.bg: ${THEMERC} | cut -d':' -f2)"
read AHBG <<< "$(grep .active.handle.bg.color: ${THEMERC} | cut -d':' -f2)"
if [ "$ABG" == "$AHBG" ];then
AHANDLE="yes"
else
AHANDLE="no"
fi
}
getvalues
getvaluesrc
out+=("^sep(Openbox theme: <i>$OBTHEME</i>)")
out+=("^sep(TITLEBAR)")
out+=("<tt><span bgcolor='$ABG'> </span></tt> ACTIVEBG,^pipe(mbclr '$ABG' obtctl clractivebg ACTIVE_BG '$me')")
out+=("<tt><span bgcolor='$NBG'> </span></tt> NORMALBG,^pipe(mbclr '$NBG' obtctl clrnormalbg NORMAL_BG '$me')")
out+=("TEXT,^checkout(titletext)")
currvalues=("${ABG}|${ABGTO}|${AFG}|${ALINE}|${NBG}|${NBGTO}|${NFG}|${NLINE}|${GRAD,,}|${TXTJUST}|${PHEIGHT}|${PWIDTH}|${HANDLE}|${BORD}|${BEVEL}|${BUTTONS}|${FSIZE}|${FNAME}|${NDSLIMC}|${WEIGHT}|${SLANT}|")
out+=("PADDING [ $PHEIGHT $PWIDTH ],^checkout(padding)")
out+=("^sep(BORDER)")
out+=("<tt><span bgcolor='$ALINE'> </span></tt> ACTIVELINE,^pipe(mbclr '$ALINE' obtctl activeborderColor ACTIVE_BORDER_COLOR '$me')")
out+=("<tt><span bgcolor='$NLINE'> </span></tt> NORMALLINE,^pipe(mbclr '$NLINE' obtctl inactiveborderColor INACTIVE_BORDER_COLOR '$me')")
out+=("BORDER [ $BORD ],^checkout(border)")
out+=("HANDLEWIDTH [ $HANDLE ],^checkout(handlewidth)")
out+=("^sep(EFFECTS)")
out+=("GRADIENT [ ${REST##* } ],^checkout(gradient)")
out+=("RAISED? [ $WINRAISED ],^checkout(raised)")
out+=("ACTIVEHANDLE? [ $AHANDLE ],^checkout(handle)")
out+=("^sep()")
if [ -f "${THEMERC}.bak" ]; then
out+=("RESET TO DEFAULTS,obtctl reset;$me")
#notify-send.sh "$BEVEL" "${currvalues}"
if [ ! -f "$USERTHEMES" ]; then
mkdir -p "$HOME/.config/colorizer/openbox/"
echo " ABG | ABGTO | AFG | ALINE | NBG | NBGTO | NFG | NLINE | GRAD |TXTJUST|PHEIGHT|PWIDTH|HANDLE|BORD|BEVEL|BUTTONS|FSIZE|FNAME|NDSLIMC|WEIGHT|SLANT|scheme_name" > "$USERTHEMES"
fi
out+=("Edit...,xdg-open ${THEMERC}")
#out+=("^sep($OBTHEME_LBL: <i>$OBTHEME</i>)")
out+=("<big></big> $QUICK_TWEAKS,^checkout(tweaks)")
out2+=("^tag(tweaks)")
out2+=("^sep(Overall style)")
out2+=("Large,obtctl tweak large;$me")
out2+=("Big,obtctl tweak big;$me")
out2+=("Normal,obtctl tweak normal;$me")
out2+=("Small,obtctl tweak small;$me")
out2+=("Tiny,obtctl tweak tiny;$me")
out2+=("^sep()")
out2+=("<big></big> $RANDOMIZE,obtctl randomizer;$me")
out2+=("\"\"\"^sep($RAISED_OR_FLAT?)\"\"\"")
[[ "$BEVEL" == "flat" ]] && out2+=("<big>綠</big> $FLAT,obtctl raised 0;$me") || out2+=("<big>祿</big> $FLAT,obtctl raised 0;$me")
[[ "$BEVEL" == "raised" ]] && out2+=("<big>綠</big> $RAISED,obtctl raised 1;$me") || out2+=("<big>祿</big> $RAISED,obtctl raised 1;$me")
[[ "$BEVEL" == "sunken" ]] && out2+=("<big>綠</big> $SUNKEN,obtctl raised 2;$me") || out2+=("<big>祿</big> $SUNKEN,obtctl raised 2;$me")
out2+=("^sep($GRADIENT_TYPE)")
[[ "$GRAD" == Solid ]] && out2+=("<big>綠</big> $SOLID_COLOR,obtctl gradient_type solid;$me") || out2+=("<big>祿</big> $SOLID_COLOR,obtctl gradient_type solid;$me")
out2+=("^sep()")
[[ "$GRAD" == Vertical ]] && out2+=("<big>綠</big> $VERTICAL,obtctl gradient_type vertical;$me") || out2+=("<big>祿</big> $VERTICAL,obtctl gradient_type vertical;$me")
[[ "$GRAD" == Horizontal ]] && out2+=("<big>綠</big> $HORIZONTAL,obtctl gradient_type horizontal;$me") || out2+=("<big>祿</big> $HORIZONTAL,obtctl gradient_type horizontal;$me")
[[ "$GRAD" == MirrorHorizontal ]] && out2+=("<big>綠</big> $MIRRORHORIZONTAL,obtctl gradient_type mirrorhorizontal;$me") || out2+=("<big>祿</big> $MIRRORHORIZONTAL,obtctl gradient_type mirrorhorizontal;$me")
[[ "$GRAD" == SplitVertical ]] && out2+=("<big>綠</big> $SPLITVERTICAL,obtctl gradient_type splitvertical;$me") || out2+=("<big>祿</big> $SPLITVERTICAL,obtctl gradient_type splitvertical;$me")
[[ "$GRAD" == Diagonal ]] && out2+=("<big>綠</big> $DIAGONAL,obtctl gradient_type diagonal;$me") || out2+=("<big>祿</big> $DIAGONAL,obtctl gradient_type diagonal;$me")
[[ "$GRAD" == CrossDiagonal ]] && out2+=("<big>綠</big> $CROSSDIAGONAL,obtctl gradient_type crossdiagonal;$me") || out2+=("<big>祿</big> $CROSSDIAGONAL,obtctl gradient_type crossdiagonal;$me")
[[ "$GRAD" == Pyramid ]] && out2+=("<big>綠</big> $PYRAMID,obtctl gradient_type pyramid;$me") || out2+=("<big>祿</big> $PYRAMID,obtctl gradient_type pyramid;$me")
#### COLOR SCHEMES 
out+=("<big><span fgcolor='${ABGTO}'></span> <span fgcolor='${ABG}'></span> <span fgcolor='${ABGTO}'></span></big> $THEMES,^checkout(schemes)")
out2+=("^tag(schemes)")
out2+=("^sep($THEMES)")
out2+=("^sep($MONOCHROMATIC)")
out2+=("^sep(<i>$CHOOSE_AND_PICK</i>)")
out2+=("<big></big> $LIGHTBG...,obtctl mono pick light")
out2+=("<big></big> $DARKBG...,obtctl mono pick dark")
out2+=("^sep(<i>$GENERATEFROMWP</i>)")
out2+=("<big><span bgcolor='${w[-2]}' fgcolor='#222222'> <span bgcolor='${w[-4]}'> </span> $LIGHTBG <span bgcolor='${w[-4]}'> </span> </span></big>,w2theme ob light;$me")
out2+=("<big><span bgcolor='${w[2]}' fgcolor='#E5E5E5'> <span bgcolor='${w[4]}'> </span> $DARKBG <span bgcolor='${w[4]}'> </span> </span></big>,w2theme ob dark;$me")
out2+=("^sep()")
out2+=("<big></big> $RANDOMIZE,obtctl randomizer;$me")
out2+=("^sep($SYSTEM_THEMES)")
n=1
while IFS="|" read -r abg abgto afg aline nbg nbgto nfg nline grad txtjust pheight pwidth handle bord bevel buttons fsize fname ndslimc weight slant scheme_name
do
((n=n+1))
out2+=("<big><span bgcolor='${abg}' fgcolor='${afg}'><span bgcolor='${abgto}'> </span><small> <tt>$(printf '%-20s' "${scheme_name}")</tt> </small><span bgcolor='${abgto}'> </span></span> <span bgcolor='${nbgto}'> </span><span bgcolor='${nbg}' fgcolor='${nfg}'><small> <tt><i>inactive</i></tt> </small></span><span bgcolor='${nbgto}'> </span></big>,^checkout(schsys${n})")
out3+=("^tag(schsys${n}")
out3+=("^sep($THEME: ${scheme_name})")
out3+=("^sep($APPLY)")
out3+=("\"\"\"<big></big> $APPLY_THEME\"\"\",obtctl applytheme sys ${n};$me")
out3+=("^sep()")
out3+=("<big></big> $APPLY_SCHEME <big><span bgcolor='${abgto}'> </span><span bgcolor='${abg}'> </span><span bgcolor='${abgto}'> </span></big>,obtctl applyscheme sys ${n};$me")
done < <(tail -n +2 "$SYSTHEMES")
out2+=("^sep($YOUR_THEMES)")
out2+=("<big></big> $SAVE_CURRTHEME,obtctl savetheme '${currvalues}';$me")
out2+=("<big></big> $OPEN_THEMEFILE,xdg-open $USERSCHEMES")
out2+=("^sep()")
n=1
while IFS="|" read -r abg abgto afg aline nbg nbgto nfg nline grad txtjust pheight pwidth handle bord bevel buttons fsize fname ndslimc weight slant scheme_name
do
((n=n+1))
out2+=("<big><span bgcolor='${abg}' fgcolor='${afg}'><span bgcolor='${abgto}'> </span><small> <tt>$(printf '%-20s' "${scheme_name}")</tt> </small><span bgcolor='${abgto}'> </span></span> <span bgcolor='${nbgto}'> </span><span bgcolor='${nbg}' fgcolor='${nfg}'><small> <tt><i>inactive</i></tt> </small></span><span bgcolor='${nbgto}'> </span></big>,^checkout(sch${n})")
out3+=("^tag(sch${n}")
out3+=("^sep($THEME: ${scheme_name})")
out3+=("^sep($APPLY)")
out3+=("\"\"\"<big></big> $APPLY_THEME\"\"\",obtctl applytheme usr ${n};$me")
out3+=("^sep()")
out3+=("<big></big> $APPLY_SCHEME <big><span bgcolor='${abgto}'> </span><span bgcolor='${abg}'> </span><span bgcolor='${abgto}'> </span></big>,obtctl applyscheme usr ${n};$me")
out3+=("^sep($DELETE)")
out3+=("<big>󰗨</big> $DELETE_THEME: <i>${scheme_name}</i>,obtctl delscheme ${n};$me")
done < <(tail -n +2 "$USERTHEMES")
out+=("^sep($TITLEBAR)")
out+=("<big>󰛖</big> $TITLEBAR_FONT [ <b> ${FNAME} ${FSIZE} </b> ],^checkout(titletext)")
out+=("<big>󰧈</big> $PADDING [ <b>$PHEIGHT $PWIDTH</b> ],^checkout(padding)")
out+=("<tt><span bgcolor='$ABG' fgcolor='$AFG'><small>    </small></span></tt> $BUTTONS_LBL,^checkout(tbuttons)")
out+=("^sep($ACTIVE_WINDOW)")
out+=("<tt><span bgcolor='$ABG'> </span></tt> $ACTIVE_BG,^pipe(mbclr '$ABG' obtctl clractivebg '${ACTIVE_BG}' '$me')")
[[ ! -z "$ABGTO" ]] && out+=("<tt><span bgcolor='$ABG'> </span><span bgcolor='$ABGTO'> </span></tt> $ACTIVE_BG_TO,^pipe(mbclr '$ABGTO' obtctl clractivebgto '${ACTIVE_BG_TO}' '$me')")
out+=("<tt><span bgcolor='$ABG' fgcolor='$AFG'> <b>title</b> </span></tt> $TEXT_COLOR,^pipe(mbclr '$AFG' obtctl activetextcolor '${TEXT} ${ACTIVE_FG}' '$me')")
out+=("^sep($INACTIVE_WINDOW)")
out+=("<tt><span bgcolor='$NBG'> </span></tt> $INACTIVE_BG,^pipe(mbclr '$NBG' obtctl clrnormalbg '${INACTIVE_BG}' '$me')")
[[ ! -z "$ABGTO" ]] && out+=("<tt><span bgcolor='$NBG'> </span><span bgcolor='$NBGTO'> </span></tt> $INACTIVE_BG_TO,^pipe(mbclr '$NBGTO' obtctl clrnormalbgto '${INACTIVE_BG_TO}' '$me')")
out+=("<tt><span bgcolor='$NBG' fgcolor='$NFG'> <b>title</b> </span></tt> $TEXT_COLOR,^pipe(mbclr '$NFG' obtctl inactivetextcolor '${TEXT} ${INACTIVE_FG}' '$me')")
out+=("^sep()")
[[ "$WEIGHT_INACT" =~ .*"old" ]] && out+=("<big></big> <b>$BOLD</b>,obtctl fontweight_inactive Normal;$me") || out+=("<big></big> <b>$BOLD</b>,obtctl fontweight_inactive Bold;$me")
[[ "$SLANT_INACT" =~ .*"talic" ]] && out+=("<big></big> <i>$ITALIC</i>,obtctl fontslant_inactive Normal;$me") || out+=("<big></big> <i>$ITALIC</i>,obtctl fontslant_inactive Italic;$me")
out+=("^sep(Gradient)")
out+=("<big>󰹸</big> $GRADIENT_TYPE [ <b>${GRAD}</b> ],^checkout(gradient)")
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 ob)")
out+=("<big></big> $GRADIENT_REVERSE,obtctl activegradient '${ABGTO}' '${ABG}';$me")
out+=("^sep($BORDER)")
out+=("<tt><span bgcolor='$ALINE'> </span></tt> $ACTIVE_BORDER,^pipe(mbclr '$ALINE' obtctl activeborderColor '${ACTIVE_BORDER_COLOR}' '$me')")
out+=("<tt><span bgcolor='$NLINE'> </span></tt> $INACTIVE_BORDER,^pipe(mbclr '$NLINE' obtctl inactiveborderColor '${INACTIVE_BORDER_COLOR}' '$me')")
out+=("<big>󰝣</big> $BORDER [ <b>$BORD</b> ],^checkout(border)")
out+=("$HANDLEWIDTH [ <b>$HANDLE</b> ],^checkout(handlewidth)")
#out+=("$ACTIVEHANDLE? [ <b>$AHANDLE</b> ],^checkout(handle)")
if [ -f "${THEMERC}.bak" ]; then
out+=("^sep($RESET)")
out+=("󰁯 $RESET_THEME,^checkout(resettheme)")
out2+=("^tag(resettheme)")
out2+=("^sep($AREYOUSURE)")
out2+=("$YES,obtctl resetMBcolors;$me")
fi
#out+=("Edit...,xdg-open ${THEMERC}")
#out2+=("^tag(themes)")
#out2+=("^sep(themes)")
#for i in $(ls $HOME/.themes);do
@ -94,30 +454,84 @@ out+=("Edit...,xdg-open ${THEMERC}")
# out2+=("$i,obtctl theme $i;$me")
# fi
#done
#TBUTTONS
out2+=("^tag(tbuttons)")
out2+=("^sep($BUTTONS_LBL)")
out2+=("Tiny,obtctl buttons tiny;$me")
out2+=("Normal,obtctl buttons normal;$me")
out2+=("Bold,obtctl buttons bold;$me")
out2+=("Dots,obtctl buttons dots;$me")
out2+=("^sep()")
out2+=("Big 12px,obtctl buttons big-12;$me")
out2+=("Big 14px,obtctl buttons big-14;$me")
out2+=("^sep($TEXTALIGN)")
[[ "$TXTJUST" = left ]] && out2+=("<big>綠 </big> $LEFT,obtctl textjustify left;$me")||out2+=("<big>祿 </big> $LEFT,obtctl textjustify left;$me")
[[ "$TXTJUST" = center ]] && out2+=("<big>綠 </big> $CENTER,obtctl textjustify center;$me")||out2+=("<big>祿 </big> $CENTER,obtctl textjustify center;$me")
[[ "$TXTJUST" = right ]] && out2+=("<big>綠 </big> $RIGHT,obtctl textjustify right;$me")||out2+=("<big>祿 </big> $RIGHT,obtctl textjustify right;$me")
out2+=("^sep($BUTTONS_LAYOUT)")
[[ "$NDSLIMC" == NDSLIMC ]] && out2+=("<big>綠</big> <tt>full </tt> <b>NDSLIMC</b> (default),obtctl ndslimc NDSLIMC;$me") || out2+=("<big>祿</big> <tt>full </tt> <b>NDSLIMC</b> (default),obtctl ndslimc NDSLIMC;$me")
[[ "$NDSLIMC" == NLIMC ]] && out2+=("<big>綠</big> <tt>mini </tt> <b>NLIMC</b>,obtctl ndslimc NLIMC;$me") || out2+=("<big>祿</big> <tt>mini </tt> <b>NLIMC</b>,obtctl ndslimc NLIMC;$me")
[[ "$NDSLIMC" == LIMC ]] && out2+=("<big>綠</big> <tt>mini (no icon)</tt> <b>LIMC</b>,obtctl ndslimc LIMC;$me") || out2+=("<big>祿</big> <tt>mini (no icon)</tt> <b>LIMC</b>,obtctl ndslimc LIMC;$me")
[[ "$NDSLIMC" == CMIL ]] && out2+=("<big>綠</big> <tt>crazy </tt> <b>CMIL</b>,obtctl ndslimc CMIL;$me") || out2+=("<big>祿</big> <tt>crazy </tt> <b>CMIL</b>,obtctl ndslimc CMIL;$me")
out2+=("^sep(<small>$LEGEND</small>)")
out2+=("^sep(N:<small> Window icon</small>)")
out2+=("^sep(L:<small> Window label (Title)</small>)")
out2+=("^sep(I:<small> Iconify (Minimize)</small>)")
out2+=("^sep(M:<small> Maximize</small>)")
out2+=("^sep(C:<small> Close</small>)")
out2+=("^sep(S:<small> Shade (Roll up)</small>)")
out2+=("^sep(D:<small> Omnipresent (On all desktops)</small>)")
#TEXT
out2+=("^tag(titletext)")
out2+=("^sep(TITLE_BAR)")
out2+=("FONT...,mb-setfont obtitle;$me")
out2+=("TEXTALIGN [ $TXTJUST ],^checkout(talign)")
out2+=("SHADOW,^checkout(shadow)")
out2+=("^sep($TITLEBAR_FONT)")
out2+=("$FONT... [ <b> ${FNAME} ${FSIZE} </b> ],mb-setfont obtitle;$me")
out2+=("^sep($FONTSIZE)")
out2+=("<big>󰧴</big> $_INCREASE <b>$((FSIZE+1)) px</b>,fontctl ob_fontsize inc;$me")
out2+=("<big>󰧳</big> $_DECREASE <b>$((FSIZE-1)) px</b>,fontctl ob_fontsize dec;$me")
out2+=("^sep()")
out2+=("<tt><span bgcolor='$AFG'> </span></tt> ACTIVEFG,^pipe(mbclr '$AFG' obtctl activetextcolor ACTIVE_COLOR '$me')")
out2+=("<tt><span bgcolor='$NFG'> </span></tt> NORMALFG,^pipe(mbclr '$NFG' obtctl inactivetextcolor INACTIVE_COLOR '$me')")
#TEXTALIGN
out2+=("^tag(talign)")
out2+=("^sep(TEXTALIGN)")
out2+=("center,obtctl textjustify center;$me")
out2+=("left,obtctl textjustify left;$me")
out2+=("right,obtctl textjustify right;$me")
sizes=(16 15 14 13 12 11 10 9 8)
for i in "${sizes[@]}"
do
[[ "$FSIZE" == "$i" ]] && out2+=("<big>綠</big> <b>$i px</b>,obtctl fontsize $i;$me") || out2+=("<big>祿</big> $i px,obtctl fontsize $i;$me")
done
out2+=("^sep($FONTFAMILY)")
if [ -f "$HOME/.config/mabox/fonts.list" ];then
mapfile -t favfonts < <( grep -vE "^($|#)" ~/.config/mabox/fonts.list)
else
mapfile -t favfonts < <( grep -vE "^($|#)" /usr/share/mabox-colorizer/fonts.list)
cp /usr/share/mabox-colorizer/fonts.list ~/.config/mabox/
fi
if [ "${#favfonts[@]}" -gt 0 ];then
for fon in "${favfonts[@]}";do
[[ "${FNAME}" == "$fon" ]] && out2+=("<big>綠</big> <span font_family=\"${fon}\">${fon}</span>,$me") || out2+=("<big>祿</big> <span font_family=\"${fon}\">${fon}</span>,obtctl fontfamily \"${fon}\";$me")
done
fi
out2+=("^sep()")
[[ "$WEIGHT" =~ .*"old" ]] && out2+=("<big></big> <b>$BOLD</b>,obtctl fontweight Normal;$me") || out2+=("<big></big> <b>$BOLD</b>,obtctl fontweight Bold;$me")
[[ "$SLANT" =~ .*"talic" ]] && out2+=("<big></big> <i>$ITALIC</i>,obtctl fontslant Normal;$me") || out2+=("<big></big> <i>$ITALIC</i>,obtctl fontslant Italic;$me")
#SHADOW
out2+=("^sep($TEXTALIGN)")
[[ "$TXTJUST" = left ]] && out2+=("<big>綠 </big> $LEFT,obtctl textjustify left;$me")||out2+=("<big>祿 </big> $LEFT,obtctl textjustify left;$me")
[[ "$TXTJUST" = center ]] && out2+=("<big>綠 </big> $CENTER,obtctl textjustify center;$me")||out2+=("<big>祿 </big> $CENTER,obtctl textjustify center;$me")
[[ "$TXTJUST" = right ]] && out2+=("<big>綠 </big> $RIGHT,obtctl textjustify right;$me")||out2+=("<big>祿 </big> $RIGHT,obtctl textjustify right;$me")
out2+=("^sep()")
out2+=("$SHADOW,^checkout(shadow)")
out2+=("^tag(shadow)")
out2+=("^sep(SHADOW)")
out2+=("no shadow,obtctl shadow 0;$me")
out2+=("^sep($SHADOW)")
out2+=("$NOSHADOW,obtctl shadow 0;$me")
out2+=("^sep()")
out2+=("Dark,obtctl shadow 1;$me")
out2+=("Light,obtctl shadow 2;$me")
out2+=("$DARK,obtctl shadow 1;$me")
out2+=("$LIGHT,obtctl shadow 2;$me")
#PADDING
out2+=("^tag(padding)")
out2+=("^sep(VERTICAL)")
out2+=("^sep($VERTICAL)")
out2+=("0,obtctl paddingHeight 0;$me")
out2+=("^sep()")
out2+=("1,obtctl paddingHeight 1;$me")
@ -126,10 +540,12 @@ out2+=("3,obtctl paddingHeight 3;$me")
out2+=("4,obtctl paddingHeight 4;$me")
out2+=("5,obtctl paddingHeight 5;$me")
out2+=("6,obtctl paddingHeight 6;$me")
out2+=("7,obtctl paddingHeight 7;$me")
out2+=("8,obtctl paddingHeight 8;$me")
out2+=("10,obtctl paddingHeight 10;$me")
out2+=("^sep(HORIZONTAL)")
out2+=("12,obtctl paddingHeight 12;$me")
out2+=("16,obtctl paddingHeight 16;$me")
out2+=("20,obtctl paddingHeight 20;$me")
out2+=("^sep($HORIZONTAL)")
out2+=("0,obtctl paddingWidth 0;$me")
out2+=("^sep()")
out2+=("1,obtctl paddingWidth 1;$me")
@ -137,9 +553,15 @@ out2+=("2,obtctl paddingWidth 2;$me")
out2+=("3,obtctl paddingWidth 3;$me")
out2+=("4,obtctl paddingWidth 4;$me")
out2+=("5,obtctl paddingWidth 5;$me")
out2+=("6,obtctl paddingWidth 6;$me")
out2+=("8,obtctl paddingWidth 8;$me")
out2+=("10,obtctl paddingWidth 10;$me")
out2+=("12,obtctl paddingWidth 12;$me")
out2+=("16,obtctl paddingWidth 16;$me")
out2+=("20,obtctl paddingWidth 20;$me")
#BORDER
out2+=("^tag(border)")
out2+=("^sep(border)")
out2+=("^sep($BORDER)")
out2+=("0,obtctl borderWidth 0;$me")
out2+=("^sep()")
out2+=("1,obtctl borderWidth 1;$me")
@ -147,37 +569,38 @@ out2+=("2,obtctl borderWidth 2;$me")
out2+=("3,obtctl borderWidth 3;$me")
out2+=("4,obtctl borderWidth 4;$me")
out2+=("5,obtctl borderWidth 5;$me")
#RAISED
out2+=("^tag(raised)")
out2+=("^sep(raised)")
out2+=("0 (flat),obtctl raised 0;$me")
out2+=("1 (raised),obtctl raised 1;$me")
out2+=("6,obtctl borderWidth 6;$me")
out2+=("8,obtctl borderWidth 8;$me")
out2+=("10,obtctl borderWidth 10;$me")
out2+=("12,obtctl borderWidth 12;$me")
out2+=("16,obtctl borderWidth 16;$me")
out2+=("20,obtctl borderWidth 20;$me")
#GRADIENT
out2+=("^tag(gradient)")
out2+=("^sep(GRADIENT)")
out2+=("solid,obtctl gradient solid;$me")
out2+=("^sep($GRADIENT_TYPE)")
[[ "$GRAD" == Solid ]] && out2+=("<big>綠</big> $SOLID_COLOR,obtctl gradient_type solid;$me") || out2+=("<big>祿</big> $SOLID_COLOR,obtctl gradient_type solid;$me")
out2+=("^sep()")
out2+=("Vertical,obtctl gradient vertical;$me")
out2+=("Horizontal,obtctl gradient horizontal;$me")
out2+=("MirrorHorizontal,obtctl gradient mirrorhorizontal;$me")
out2+=("SplitVertical,obtctl gradient splitvertical;$me")
out2+=("Diagonal,obtctl gradient diagonal;$me")
out2+=("CrossDiagonal,obtctl gradient crossdiagonal;$me")
out2+=("Pyramid,obtctl gradient pyramid;$me")
out2+=("^sep(COLORS)")
[[ ! -z "$ABGTO" ]] && out2+=("<tt><span bgcolor='$ABGTO'> </span></tt> ACTIVEBGTO,^pipe(mbclr '$ABGTO' obtctl clractivebgto ACTIVE_BG_TO '$me')")
[[ ! -z "$ABGTO" ]] && out2+=("<tt><span bgcolor='$NBGTO'> </span></tt> NORMALBGTO,^pipe(mbclr '$NBGTO' obtctl clrnormalbgto INACTIVE_BG_TO '$me')")
#HANDLE
out2+=("^tag(handle)")
out2+=("^sep(ACTIVEHANDLE)")
out2+=("NO,obtctl activehandle no;$me")
out2+=("YES,obtctl activehandle yes;$me")
out2+=("GRIPONLY,obtctl activehandle grip;$me")
[[ "$GRAD" == Vertical ]] && out2+=("<big>綠</big> $VERTICAL,obtctl gradient_type vertical;$me") || out2+=("<big>祿</big> $VERTICAL,obtctl gradient_type vertical;$me")
[[ "$GRAD" == Horizontal ]] && out2+=("<big>綠</big> $HORIZONTAL,obtctl gradient_type horizontal;$me") || out2+=("<big>祿</big> $HORIZONTAL,obtctl gradient_type horizontal;$me")
[[ "$GRAD" == MirrorHorizontal ]] && out2+=("<big>綠</big> $MIRRORHORIZONTAL,obtctl gradient_type mirrorhorizontal;$me") || out2+=("<big>祿</big> $MIRRORHORIZONTAL,obtctl gradient_type mirrorhorizontal;$me")
[[ "$GRAD" == SplitVertical ]] && out2+=("<big>綠</big> $SPLITVERTICAL,obtctl gradient_type splitvertical;$me") || out2+=("<big>祿</big> $SPLITVERTICAL,obtctl gradient_type splitvertical;$me")
[[ "$GRAD" == Diagonal ]] && out2+=("<big>綠</big> $DIAGONAL,obtctl gradient_type diagonal;$me") || out2+=("<big>祿</big> $DIAGONAL,obtctl gradient_type diagonal;$me")
[[ "$GRAD" == CrossDiagonal ]] && out2+=("<big>綠</big> $CROSSDIAGONAL,obtctl gradient_type crossdiagonal;$me") || out2+=("<big>祿</big> $CROSSDIAGONAL,obtctl gradient_type crossdiagonal;$me")
[[ "$GRAD" == Pyramid ]] && out2+=("<big>綠</big> $PYRAMID,obtctl gradient_type pyramid;$me") || out2+=("<big>祿</big> $PYRAMID,obtctl gradient_type pyramid;$me")
#HANDLE
#out2+=("^tag(handle)")
#out2+=("^sep($ACTIVEHANDLE)")
#out2+=("$NO,obtctl activehandle no;$me")
#out2+=("$YES,obtctl activehandle yes;$me")
#out2+=("$GRIPONLY,obtctl activehandle grip;$me")
#HANDLE WIDTH
out2+=("^tag(handlewidth)")
out2+=("^sep(HANDLEWIDTH)")
out2+=("^sep($HANDLEWIDTH)")
out2+=("0,obtctl handlewidth 0;$me")
out2+=("^sep()")
out2+=("1,obtctl handlewidth 1;$me")
out2+=("2,obtctl handlewidth 2;$me")
out2+=("3,obtctl handlewidth 3;$me")
out2+=("4,obtctl handlewidth 4;$me")
@ -185,66 +608,113 @@ out2+=("6,obtctl handlewidth 6;$me")
out2+=("8,obtctl handlewidth 8;$me")
out2+=("10,obtctl handlewidth 10;$me")
else
out+=("^sep(NOT SUPORTED OB theme)")
out+=("Switch to MBcolors,obtctl theme MBcolors;$me")
#for i in $(ls $HOME/.themes);do
#if [ -f "$HOME/.themes/${i}/openbox-3/themerc" ]; then
#out+=("$i,obtctl theme $i;$me")
#fi
#done
else # Theme other than MBColors, we can only edit rc.xml
getvaluesrc
out+=("^sep($NOT_SUPORTED_OBTHEME)")
out+=("^sep(<small>$UNLOCK</small>)")
out+=("$SWITCH_TO_MBCOLORS,obtctl theme MBcolors;$me")
out+=("^sep($TITLEBAR_FONT)")
out+=("$FONT... [ <b> ${FNAME} ${FSIZE} </b> ],mb-setfont obtitle;$me")
out+=("^sep(font family)")
if [ -f "$HOME/.config/mabox/fonts.list" ];then
mapfile -t favfonts < <( grep -vE "^($|#)" ~/.config/mabox/fonts.list)
else
mapfile -t favfonts < <( grep -vE "^($|#)" /usr/share/mabox-colorizer/fonts.list)
cp /usr/share/mabox-colorizer/fonts.list ~/.config/mabox/
fi
if [ "${#favfonts[@]}" -gt 0 ];then
for fon in "${favfonts[@]}";do
[[ "${FNAME}" == "$fon" ]] && out+=("<big>綠</big> <span font_family=\"${fon}\">${fon}</span>,$me") || out+=("<big>祿</big> <span font_family=\"${fon}\">${fon}</span>,obtctl fontfamily \"${fon}\";$me")
done
fi
out+=("^sep()")
[[ "$WEIGHT" =~ .*"old" ]] && out+=("<big></big> <b>$BOLD</b>,obtctl fontweight Normal;$me") || out+=("<big></big> <b>$BOLD</b>,obtctl fontweight Bold;$me")
[[ "$SLANT" =~ .*"talic" ]] && out+=("<big></big> <i>$ITALIC</i>,obtctl fontslant Normal;$me") || out+=("<big></big> <i>$ITALIC</i>,obtctl fontslant Italic;$me")
out+=("^sep()")
out+=("$FONTSIZE [ <b>$FSIZE px</b> ],^checkout(obfsize)")
out2+=("^tag(obfsize)")
out2+=("^sep($FONTSIZE)")
sizes=(16 15 14 13 12 11 10 9 8)
for i in "${sizes[@]}"
do
[[ "$FSIZE" == "$i" ]] && out2+=("<big>綠</big> <b>$i px</b>,obtctl fontsize $i;$me") || out2+=("<big>祿</big> $i px,obtctl fontsize $i;$me")
done
out+=("^sep($BUTTONS_LAYOUT)")
[[ "$NDSLIMC" == NDSLIMC ]] && out+=("<big>綠</big> <tt>full </tt> <b>NDSLIMC</b> (default),obtctl ndslimc NDSLIMC;$me") || out+=("<big>祿</big> <tt>full </tt> <b>NDSLIMC</b> (default),obtctl ndslimc NDSLIMC;$me")
[[ "$NDSLIMC" == NLIMC ]] && out+=("<big>綠</big> <tt>mini </tt> <b>NLIMC</b>,obtctl ndslimc NLIMC;$me") || out+=("<big>祿</big> <tt>mini </tt> <b>NLIMC</b>,obtctl ndslimc NLIMC;$me")
[[ "$NDSLIMC" == LIMC ]] && out+=("<big>綠</big> <tt>mini (no icon)</tt> <b>LIMC</b>,obtctl ndslimc LIMC;$me") || out+=("<big>祿</big> <tt>mini (no icon)</tt> <b>LIMC</b>,obtctl ndslimc LIMC;$me")
[[ "$NDSLIMC" == CMIL ]] && out+=("<big>綠</big> <tt>crazy </tt> <b>CMIL</b>,obtctl ndslimc CMIL;$me") || out+=("<big>祿</big> <tt>crazy </tt> <b>CMIL</b>,obtctl ndslimc CMIL;$me")
out+=("^sep(<small>$LEGEND</small>)")
out+=("^sep(N:<small> Window icon</small>)")
out+=("^sep(L:<small> Window label (Title)</small>)")
out+=("^sep(I:<small> Iconify (Minimize)</small>)")
out+=("^sep(M:<small> Maximize</small>)")
out+=("^sep(C:<small> Close</small>)")
out+=("^sep(S:<small> Shade (Roll up)</small>)")
out+=("^sep(D:<small> Omnipresent (On all desktops)</small>)")
fi
### RUN
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")
out+=(" ${arrow_string_left} $_COLORIZER_ROOT,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
jgtools_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))
MENU_PADDING_TOP=$((jgtools_padding + 158))
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 150))
# WALLPAPER IMAGE
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
WALLPAPER=${WALLPATH##*/}
THUMBDIR="$HOME/.config/mabox/wallthumbs"
mkdir -p ${THUMBDIR}
THUMB="${THUMBDIR}/${WALLPAPER}.png"
if [[ ! -f "$THUMB" ]]
then
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
THUMBDIR="$HOME/.cache/colorizer/thumbs"
mkdir -p ${THUMBDIR}
NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME}
((n++))
NAME=${NAME:${n}}
fi
THUMB="${THUMBDIR}/${NAME}.png"
if [[ ! -f "$THUMB" ]]
then
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
fi
#TEMP POSITION:
MENU_VALIGN="top"
MENU_MARGIN_Y="60"
fi
mkconfigfile
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-ob.png
@icon,,$((jgtools_padding)),$((jgtools_padding)),270,150,4,left,top,,,${THUMB}
@icon,,$((jgtools_padding)),$((jgtools_padding)),270,150,4,left,top,,,/usr/share/mabox-colorizer/img/colorizer-ob.png
@rect,,$((jgtools_padding)),$((jgtools_padding + 124)),270,22,0,left,top,#222222 20,#222222 70,
@text,,$((jgtools_padding + 138)),$((jgtools_padding + 120)),130,30,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Colorizer</b> Openbox</span>
$(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
@ -254,3 +724,4 @@ exit 0
fi
printf '%s\n' "${out[@]}"
printf '%s\n' "${out2[@]}"
printf '%s\n' "${out3[@]}"

View File

@ -0,0 +1,247 @@
#!/bin/bash
#
# colorizer - set of tools for Mabox (auto)theming
# Copyright (C) 2022-2023 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/>.
# TODO Start Pyradio if not started
# TODO check if theme is writeable (users themes)
# TODO Save as new theme
PR_WINID=$(wmctrl -lp |grep 'PyRadio: \|PyRadio -'|cut -d' ' -f1)
wmctrl -iR ${PR_WINID}
if [[ ! -f "$HOME"/local/share/applications/pyradio.desktop ]];then
pyradio --terminal terminator > /dev/null 2>&1
fi
me="colorizer-pyradio -s"
THEMERC=~/.config/pyradio/themes/mbcolors.pyradio-theme
# get wallpaper color palette
WALLPALDIR="$HOME/.cache/colorizer/palettes"
mkdir -p "$WALLPALDIR"
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME}
((n++))
NAME=${NAME:${n}}
fi
if [ ! -f "$WALLPALDIR/$NAME.clr" ]; then
convert ${WALLPATH} -resize 25% -colors 16 -unique-colors txt:- |grep -v '^#'| awk '{print substr($3,1,7)}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$NAME.clr"
fi
mapfile -t w < "$WALLPALDIR/$NAME.clr"
if [[ "${#w[@]}" -lt 8 ]]; then
w+=("#2e3440" "#4c566a" "#5e81ac" "#bf616b" "#b48ead" "#a3be8c" "#ebcb8b" "#d8dee9" "#eceff4")
fi
case "$LANG" in
pl*)
COLORIZE_PYRADIO="Pokoloruj PyRadio"
START_PYRADIO="Uruchom PyRadio"
INFO="Ważna informacja"
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"
GENERATEFROMWP="Generuj z kolorów tapety..."
LIGHTBG="Jasne tło"
DARKBG="Ciemne tło"
SETCOLORS="Ustaw kolory..."
RESETTHEME="Resetuj motyw"
EXPORTTHEME="<b>Eksportuj</b> jako nowy motyw"
CONFIG_AND_DOCS="Konfiguracja i Dokumentacja"
README="PyRadio CZYTAJTO"
MANUAL="Manual PyRadio"
EDITCONF="Edytuj plik konfiguracyjny"
EDITSTATIONS="Edytuj listę stacji"
CONFIGDIR="Katalog z konfiguracją"
_COLORIZER_ROOT="<b>Colorizer</b> - menu główne"
;;
*)
COLORIZE_PYRADIO="Colorize PyRadio"
START_PYRADIO="Start PyRadio"
INFO="Info (important)"
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"
GENERATEFROMWP="Generate from wallpaper colors..."
LIGHTBG="Light Background"
DARKBG="Dark Background"
SETCOLORS="Set colors individually..."
RESETTHEME="Reset theme"
EXPORTTHEME="<b>Export</b> as new theme"
CONFIG_AND_DOCS="Config and Docs"
README="PyRadi README"
MANUAL="PyRadio Manual"
EDITCONF="Edit config file"
EDITSTATIONS="Edit stations list"
CONFIGDIR="Config Dir"
_COLORIZER_ROOT="<b>Colorizer</b> rootmenu"
;;
esac
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+=("$START_PYRADIO,terminator --geometry=420x440-20-20 -e pyradio")
if pgrep -f "/usr/bin/python /usr/bin/pyradio" >/dev/null ;then
:
else
out+=("$START_PYRADIO <span bgcolor='#333333' color='#d3d3d3'> <small>W + r</small> </span>,xdotool key super+r;$me")
#out+=("PYRADIO <span bgcolor='#333333' color='#d3d3d3'> <small>W + r</small> </span>,gtk-launch pyradio;sleep 1;$me")
fi
out+=(" $INFO,notify-send.sh -i pyradio -u critical '$INFO_HEAD' '$INFO_TXT'")
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+=("<tt><span weight='bold' bgcolor='$SBG' fgcolor='$SFG'> AbCd </span></tt> Text,^pipe(mbclr '$SFG' prtctl stations_txt 'Stations Text' '$me')")
out2+=("<tt><span weight='bold' bgcolor='$SBG' fgcolor='$SFG'> </span></tt> 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+=("<tt><span weight='bold' bgcolor='$NCBG' fgcolor='$NCFG'> AbCd </span></tt> Text,^pipe(mbclr '$NCFG' prtctl normal_cursor_txt 'Normal Cursor Text' '$me')")
out2+=("<tt><span weight='bold' bgcolor='$NCBG' fgcolor='$NCFG'> </span></tt> 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+=("<tt><span weight='bold' bgcolor='$ACBG' fgcolor='$ACFG'> AbCd </span></tt> Text,^pipe(mbclr '$ACFG' prtctl active_cursor_txt 'Active Cursor Text' '$me')")
out2+=("<tt><span weight='bold' bgcolor='$ACBG' fgcolor='$ACFG'> </span></tt> 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+=("<tt><span weight='bold' bgcolor='$ECBG' fgcolor='$ECFG'> AbCd </span></tt> Text,^pipe(mbclr '$ECFG' prtctl edit_cursor_txt 'Edit Cursor Text' '$me')")
out2+=("<tt><span weight='bold' bgcolor='$ECBG' fgcolor='$ECFG'> </span></tt> 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+=("<tt><span weight='bold' bgcolor='$SBBG' fgcolor='$SBFG'> AbCd </span></tt> Text,^pipe(mbclr '$SBFG' prtctl status_bar_txt 'Status Bar Text' '$me')")
out2+=("<tt><span weight='bold' bgcolor='$SBBG' fgcolor='$SBFG'> </span></tt> 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> Group, PyRadio URL\"\"\",^pipe(mbclr '$PURLFG' prtctl pyradio_url 'PyRadio URL' '$me')")
out+=("<tt><span weight='bold' bgcolor='$SBG' fgcolor='$MBFG'>_________</span></tt> Messages Border,^pipe(mbclr '$MBFG' prtctl messages_border 'Messages Border' '$me')")
out+=("^sep(<i>$GENERATEFROMWP</i>)")
out+=("<tt><span bgcolor='${w[-1]}' fgcolor='${w[4]}'> 1. station </span></tt> $LIGHTBG,w2theme pyradio light;$me")
out+=("<tt><span bgcolor='${w[0]}' fgcolor='${w[-3]}'> 2. station </span></tt> $DARKBG,w2theme pyradio dark;$me")
out+=("^sep()")
out+=(" $RESETTHEME,prtctl resettheme;$me")
out+=("^sep()")
out+=("$EXPORTTHEME,prtctl exp;$me")
out+=("^sep($CONFIG_AND_DOCS)")
#out+=("PyRadio README,cat /usr/share/doc/pyradio/README.html| yad --html --no-buttons --no-escape --height=800 --width=600")
out+=(" $README,xdg-open /usr/share/doc/pyradio/README.html")
out+=(" $MANUAL,^term(man pyradio)")
out+=("^sep()")
out+=(" $EDITCONF,xdg-open ~/.config/pyradio/config")
out+=(" $EDITSTATIONS,xdg-open ~/.config/pyradio/stations.csv")
out+=("^sep()")
out+=(" $CONFIGDIR,^pipe(jgbrowser ~/.config/pyradio)")
### RUN
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+=(" ${arrow_string_left} $_COLORIZER_ROOT,colorizer -s")
if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell)
MENU_HEIGHT_MIN="$HEIGHT"
MENU_HEIGHT_MAX=$MENU_HEIGHT_MIN
jgtools_radius=0
menu_margin_x="0"
else
MENU_VALIGN="center"
menu_margin_x=${submenu_spacing:-0}
fi
MENU_HALIGN="left"
jgmenu_icon_size=0
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
[ -z $jgmenu_use_borders ] && menu_border=0
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 150))
#WALLPAPER
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
THUMBDIR="$HOME/.cache/colorizer/thumbs"
mkdir -p ${THUMBDIR}
NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME}
((n++))
NAME=${NAME:${n}}
fi
THUMB="${THUMBDIR}/${NAME}.png"
if [[ ! -f "$THUMB" ]]
then
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
fi
mkconfigfile
cat <<EOF > ${MENU_ITEMS}
@icon,,$((jgtools_padding)),$((jgtools_padding)),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)),$((jgtools_padding + 116)),270,34,0,left,top,#222222 20,#222222 70,
@text,,$((jgtools_padding + 144)),$((jgtools_padding + 120)),120,30,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Colorizer</b> PyRadio</span>
$(printf '%s\n' "${out[@]}")
$(printf '%s\n' "${out2[@]}")
EOF
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
exit 0
fi
printf '%s\n' "${out[@]}"
printf '%s\n' "${out2[@]}"

View File

@ -0,0 +1,27 @@
#!/bin/bash
CFGFILE="$HOME/.config/conky/Network_mbcolor.conkyrc"
rm /tmp/xx*
cd /tmp
csplit -s ${CFGFILE} /conky.text/
#IFACE=$(ip route get 8.8.8.8 | awk -- '{printf $5}')
IFACE=$(ip route get 8.8.8.8 | awk '{for(i=1; i<NF; i++) {if($i=="dev") dev=i+1} print $dev}')
cat <<EOF >> /tmp/xx00
conky.text = [[
\${color}NETWORK
\${color}Device \${alignr}$IFACE
\${color}IP \${alignr}\${addr $IFACE}
\${color}Download \$color0\${downspeed $IFACE} \${alignr}\${color0}\${upspeed $IFACE}\${color} Upload
\${color2}\${downspeedgraph $IFACE 30,100 -t} \${alignr} \${upspeedgraph $IFACE 30,100 -t}
\${color}Total Down \${color0}\${totaldown $IFACE} \${alignr}\${color0}\${totalup $IFACE}\${color} Total Up
\${color}\${hr}
\${execi 30 netstat -ept | grep ESTAB | awk '{print \$9}' | cut -d/ -f2 | sort | uniq -c | sort -nr}
]];
EOF
cat /tmp/xx00 > ${CFGFILE}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
#!/bin/bash
getdata () {
df -h | grep -v "boot" | grep -v "/dev/loop" | grep '^/dev' | while read DEVICE SIZE USED FREE PERCENT MOUNT
do
[[ "${#MOUNT}" -gt "10" ]] && MOUNTLBL=${MOUNT##*/} || MOUNTLBL=${MOUNT}
[[ "${#MOUNTLBL}" -gt "10" ]] && MOUNTLBL=${MOUNTLBL:0:9}
echo "$MOUNTLBL\${goto 90}\${color2}\${fs_bar 6,64 $MOUNT}\${color}\${goto 160}$USED\${goto 200}$PERCENT\${alignr}$SIZE"
done
}
case "$LANG" in
pl*)
MOUNTPOINTS="Punkty montowania"
USED="użyte"
SIZE="rozmiar"
;;
*)
MOUNTPOINTS="MOUNT POINTS"
USED="used"
SIZE="size"
;;
esac
echo "$MOUNTPOINTS"
echo "\${goto 160}$USED\${goto 200}%\${alignr}$SIZE"
getdata

161
bin/convert.lua 100755
View File

@ -0,0 +1,161 @@
#! /usr/bin/lua
local usage = [[
Usage: convert.lua old_conkyrc [new_conkyrc]
Tries to convert conkyrc from the old v1.x format to the new, lua-based format.
Keep in mind that there is no guarantee that the output will work correctly
with conky, or that it will be able to convert every conkyrc. However, it
should provide a good starting point.
Although you can use this script with only 1 arg and let it overwrite the old
config, it's suggested to use 2 args so that the new config is written in a new
file (so that you have backup if something went wrong).
Optional: Install dos2unix. We will attempt to use this if it is available
because Conky configs downloaded from Internet sometimes are created on DOS/Windows
machines with different line endings than Conky configs created on Unix/Linux.
For more information about the new format, read the wiki page
<https://github.com/brndnmtthws/conky/wiki>
]];
local function quote(s)
if not s:find("[\n'\\]") then
return "'" .. s .. "'";
end;
local q = '';
while s:find(']' .. q .. ']', 1, true) do
q = q .. '=';
end;
return string.format('[%s[\n%s]%s]', q, s, q);
end;
local bool_setting = {
background = true, disable_auto_reload = true, double_buffer = true, draw_borders = true,
draw_graph_borders = true, draw_outline = true, draw_shades = true, extra_newline = true,
format_human_readable = true, no_buffers = true, out_to_console = true,
out_to_wayland = true,
out_to_ncurses = true, out_to_stderr = true, out_to_x = true, override_utf8_locale = true,
own_window = true, own_window_argb_visual = true, own_window_transparent = true,
short_units = true, show_graph_range = true, show_graph_scale = true,
times_in_seconds = true, top_cpu_separate = true, uppercase = true, use_xft = true,
draw_blended = true, forced_redraw = true
};
local num_setting = {
border_inner_margin = true, border_outer_margin = true, border_width = true,
cpu_avg_samples = true, diskio_avg_samples = true, gap_x = true, gap_y = true,
imlib_cache_flush_interval = true, imlib_cache_size = true,
max_port_monitor_connections = true, max_text_width = true, max_user_text = true,
maximum_width = true, mpd_port = true, music_player_interval = true, net_avg_samples = true,
own_window_argb_value = true, pad_percents = true, stippled_borders = true,
text_buffer_size = true, top_name_width = true, total_run_times = true,
update_interval = true, update_interval_on_battery = true, xftalpha = true,
xinerama_head = true,
};
local split_setting = {
default_bar_size = true, default_gauge_size = true, default_graph_size = true,
minimum_size = true
};
local colour_setting = {
color0 = true, color1 = true, color2 = true, color3 = true, color4 = true, color5 = true,
color6 = true, color7 = true, color8 = true, color9 = true, default_color = true,
default_outline_color = true, default_shade_color = true, own_window_colour = true
};
local function alignment_map(value)
local map = { m = 'middle', t = 'top', b = 'bottom', r = 'right', l = 'left' };
if map[value] == nil then
return value;
else
return map[value];
end;
end;
local function handle(setting, value)
setting = setting:lower();
if setting == '' then
return '';
end;
if split_setting[setting] then
local x, y = value:match('^(%S+)%s*(%S*)$');
local ret = setting:gsub('_size', '_width = ') .. x .. ',';
if y ~= '' then
ret = ret .. ' ' .. setting:gsub('_size', '_height = ') .. y .. ',';
end;
return '\t' .. ret;
end;
if bool_setting[setting] then
value = value:lower();
if value == 'yes' or value == 'true' or value == '1' or value == '' then
value = 'true';
else
value = 'false';
end;
elseif not num_setting[setting] then
if setting == 'alignment' and value:len() == 2 then
value = alignment_map(value:sub(1,1)) .. '_' .. alignment_map(value:sub(2,2));
elseif colour_setting[setting] and value:match('^[0-9a-fA-F]+$') then
value = '#' .. value;
elseif setting == 'xftfont' then
setting = 'font';
end;
value = quote(value);
end;
return '\t' .. setting .. ' = ' .. value .. ',';
end;
local function convert(s)
local setting, comment = s:match('^([^#]*)#?(.*)\n$');
if comment ~= '' then
comment = '--' .. comment;
end;
comment = comment .. '\n';
return handle(setting:match('^%s*(%S*)%s*(.-)%s*$')) .. comment;
end;
local input;
local output;
if conky == nil then --> standalone program
-- 1 arg: arg is input and outputfile
-- 2 args: 1st is inputfile, 2nd is outputfile
-- 0, 3 or more args: print usage to STDERR and quit
if #arg == 1 or #arg == 2 then
if os.execute('command -v dos2unix 2>&1 >/dev/null') == 0 then
os.execute('dos2unix ' .. arg[1]);
end
input = io.input(arg[1]);
else
io.stderr:write(usage);
return;
end;
else
-- we are called from conky, the filename is the first argument
input = io.open(..., 'r');
end;
local config = input:read('*a');
input:close();
local settings, text = config:match('^(.-)TEXT\n(.*)$');
local converted = 'conky.config = {\n' .. settings:gsub('.-\n', convert) .. '};\n\nconky.text = ' ..
quote(text) .. ';\n';
if conky == nil then
if #arg == 2 then
output = io.output(arg[2]);
else
output = io.output(arg[1]);
end
output:write(converted);
output:close();
else
return assert(load(converted, 'converted config'));
end;

146
bin/fontctl 100755
View File

@ -0,0 +1,146 @@
#!/bin/bash
# fontctl - cli to handle fonts in Mabox: openbox, jgmenu, tint2, conky, gtk
CONKYDIR="$HOME"/.config/conky
BASECONKY="$CONKYDIR/sysinfo_mbcolor.conkyrc"
. $HOME/.config/mabox/mabox.conf
get_gtkfont() {
GTK2RC="$HOME"/.gtkrc-2.0
GTK3RC="$HOME"/.config/gtk-3.0/settings.ini
GTK_FONT=( $(grep "gtk-font-name" ${GTK2RC} | cut -d'"' -f2) )
GTK_FAMILY=${GTK_FONT[@]::${#GTK_FONT[@]}-1}
GTK_SIZE=${GTK_FONT[-1]}
}
gtk_fontfamily() {
get_gtkfont
sd "^gtk-font-name=.*" "gtk-font-name=\"${1} ${GTK_SIZE}\"" ${GTK2RC}
sd "^gtk-font-name=.*" "gtk-font-name=${1} ${GTK_SIZE}" ${GTK3RC}
reload-gtk
}
gtk_fontsize() {
get_gtkfont
case "$1" in
inc) SIZE=$((GTK_SIZE+1));;
dec) SIZE=$((GTK_SIZE-1));;
*) SIZE=${1};;
esac
sd "^gtk-font-name=.*" "gtk-font-name=\"${GTK_FAMILY} ${SIZE}\"" ${GTK2RC}
sd "^gtk-font-name=.*" "gtk-font-name=${GTK_FAMILY} ${SIZE}" ${GTK3RC}
reload-gtk
}
resetgtk() {
get_gtkfont
sd "^gtk-font-name=.*" "gtk-font-name=\"Ubuntu 10\"" ${GTK2RC}
sd "^gtk-font-name=.*" "gtk-font-name=Ubuntu 10" ${GTK3RC}
reload-gtk
}
resetob () {
nspace="http://openbox.org/3.4/rc"
cfg="$HOME/.config/openbox/rc.xml"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:name' -v "Ubuntu" "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:name' -v "Ubuntu" "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:size' -v 9 "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:size' -v 9 "$cfg"
#add Weight and slant
openbox --reconfigure
}
resetmenus () {
mb-setvar menu_font_size=10
mb-setvar menu_sep_font_size=11
mb-setvar "menu_font_family=\'Ubuntu\'"
mb-setvar "menu_sep_font_family=\'Ubuntu Bold\'"
}
resetconky () {
sd "font .*=.*,$" "font = 'Ubuntu:size=8'," ${CONKYDIR}/*mbcolor.conkyrc
}
resetall () {
resetconky
resetob
resetmenus
resetgtk
}
inc_all() {
gtk_fontsize inc
inc_conky
inc_menus
}
dec_all() {
gtk_fontsize dec
dec_conky
dec_menus
}
inc_conky () {
read FONTDEF <<< "$(grep "font .*=.*,$" ${BASECONKY} | cut -d'=' -f2,3 |cut -d"'" -f2)"
FONT=${FONTDEF%:*}
FONTSIZE=${FONTDEF#*=}
((FONTSIZE++))
sd "font .*=.*,$" "font = '${FONT}:size=${FONTSIZE}'," ${CONKYDIR}/*mbcolor.conkyrc
}
dec_conky () {
read FONTDEF <<< "$(grep "font .*=.*,$" ${BASECONKY} | cut -d'=' -f2,3 |cut -d"'" -f2)"
FONT=${FONTDEF%:*}
FONTSIZE=${FONTDEF#*=}
((FONTSIZE--))
sd "font .*=.*,$" "font = '${FONT}:size=${FONTSIZE}'," ${CONKYDIR}/*mbcolor.conkyrc
}
inc_menus () {
mb-setvar menu_font_size=$((menu_font_size+1))
mb-setvar menu_sep_font_size=$((menu_sep_font_size+1))
}
dec_menus () {
mb-setvar menu_font_size=$((menu_font_size-1))
mb-setvar menu_sep_font_size=$((menu_sep_font_size-1))
}
ob_fontsize () {
nspace="http://openbox.org/3.4/rc"
cfg="$HOME/.config/openbox/rc.xml"
case "$1" in
inc|increase)
SIZE=$(xmlstarlet sel -N a="$nspace" -t -v '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:size' "$cfg")
if [ "$SIZE" -lt "21" ];then
((SIZE=SIZE+1))
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:size' -v "$SIZE" "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:size' -v "$SIZE" "$cfg"
fi
;;
dec|decrease)
SIZE=$(xmlstarlet sel -N a="$nspace" -t -v '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:size' "$cfg")
if [ "$SIZE" -gt "7" ];then
((SIZE=SIZE-1))
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:size' -v "$SIZE" "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:size' -v "$SIZE" "$cfg"
fi
;;
*)
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:size' -v "$1" "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:size' -v "$1" "$cfg"
;;
esac
openbox --reconfigure
}
case "$1" in
gtk_fontfamily) gtk_fontfamily "$2";;
gtk_fontsize) gtk_fontsize "$2";;
inc_all) inc_all;;
dec_all) dec_all;;
inc_conky) inc_conky;;
dec_conky) dec_conky;;
inc_menus) inc_menus;;
dec_menus) dec_menus;;
ob_fontsize) ob_fontsize "$2";; # arg: size, inc or dec
resetall) resetall;;
resetob) resetob;;
resetmenus) resetmenus;;
resetconky) resetconky;;
resetgtk) resetgtk;;
*):;;
esac

119
bin/gtkcolors.py 100755
View File

@ -0,0 +1,119 @@
#!/usr/bin/env python3
"""
Based on labwc-gtktheme.py:
Create labwc theme based on the current Gtk theme
SPDX-License-Identifier: GPL-2.0-only
Copyright (C) @Misko_2083 2019
Copyright (C) Johan Malm 2019-2022
"""
import os
import errno
from tokenize import tokenize, NUMBER, NAME, OP
from io import BytesIO
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
def parse(tokens):
"""
Parse css color expression token list and return red/green/blue values
Valid name-tokens include 'rgb' and 'rgba', whereas 'alpha', 'shade' and
'mix' are ignored. @other-color references are still to be implemented.
"""
nr_colors_to_parse = 0
in_label = False
color = []
for toknum, tokval, _, _, _ in tokens:
if '@' in tokval:
in_label = True
continue
if toknum == NAME and in_label:
color.clear()
color.append(f"@{tokval}")
return color
if nr_colors_to_parse > 0:
if toknum == OP and tokval in ')':
print("warn: still parsing numbers; did not expect ')'")
if toknum == NUMBER:
color.append(tokval)
nr_colors_to_parse -= 1
continue
if toknum == NAME and tokval in 'rgb':
nr_colors_to_parse = 3
elif toknum == NAME and tokval in 'rgba':
nr_colors_to_parse = 4
return color
def color_hex(color):
""" return rrggbb color hex from list [r, g, b,...] """
if not color:
return "None"
elif len(color) < 3:
return f"{color[0]}"
return '{:02x}{:02x}{:02x}'.format(*(int(x) for x in color[:3]))
def hex_from_expr(line):
""" parse color expression to return hex style rrggbb """
tokens = tokenize(BytesIO(line.encode('utf-8')).readline)
color = parse(tokens)
return color_hex(color)
def parse_section(lines, name):
theme = {}
inside = False
for line in lines:
if f"{name} {{" in line:
inside = True
continue
if inside:
if "}" in line or "{" in line:
inside = False
break
if 'color' not in line:
continue
key, value = line.strip().split(":", maxsplit=1)
theme[f'{name}.{key.replace(" ", "")}'] = hex_from_expr(value)
return theme
def resolve_labels(theme):
for key, label in theme.items():
if '@' in label:
for tmp, value in theme.items():
if tmp == label[1:]:
theme[key] = value
return resolve_labels(theme)
return theme
def main():
""" main """
gset = Gtk.Settings.get_default()
themename = gset.get_property("gtk-theme-name")
css = Gtk.CssProvider.get_named(themename).to_string()
lines = css.split("\n")
theme = {}
# Parse @define-color lines using syntax "@define-color <key> <value>"
for line in lines:
if "@define-color" not in line:
continue
x = line.split(" ", maxsplit=2)
theme[x[1]] = hex_from_expr(x[2])
# Add the color definitions in the headerbar{} and menu{} sections
theme |= parse_section(lines, "headerbar")
theme |= parse_section(lines, "menu")
theme = resolve_labels(theme)
for key, value in theme.items():
print(f"{key}: {value}")
return
if __name__ == '__main__':
main()

288
bin/jgctl
View File

@ -11,11 +11,28 @@ 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
theme () {
mb-setvar jgmenu_theme=${1}
}
reset () {
rm ${THEMERC}
mv ${THEMERC}.bak ${THEMERC}
}
resetMBcolors() {
mb-setvar jgmenu_theme=MBcolors
mb-setvar item_height_factor=200
reset
case "$1" in
show)
colorizer-menus -s
;;
*):;;
esac
}
color_menu_bg () {
read MBG MBGA<<< "$(grep 'color_menu_bg ' ${THEMERC} | cut -d'=' -f2)"
case "${#1}" in
@ -52,6 +69,62 @@ color_menu_border () {
menu_gradient_pos () {
sd "menu_gradient_pos.*$" "menu_gradient_pos = $1" ${THEMERC}
}
gradient () {
read MBG MBGA<<< "$(grep 'color_menu_bg ' ${THEMERC} | cut -d'=' -f2)"
read MBGT MBGTA<<< "$(grep 'color_menu_bg_to ' ${THEMERC} | cut -d'=' -f2)"
sd "color_menu_bg .*$" "color_menu_bg = $1 $MBGA" ${THEMERC}
sd "color_menu_bg_to.*$" "color_menu_bg_to = $2 $MBGTA" ${THEMERC}
# Item
ITEM_FG=$(pastel textcolor ${2}|pastel format hex)
if [[ "${ITEM_FG}" == *"ffffff"* ]];then
ITEM_FGCOLOR="#c0c0c0"
else
ITEM_FGCOLOR="#222222"
fi
read NFG NFGA<<< "$(grep 'color_norm_fg' ${THEMERC} | cut -d'=' -f2)"
sd "color_norm_fg.*$" "color_norm_fg = $ITEM_FGCOLOR $NFGA" ${THEMERC}
read NBG NBGA<<< "$(grep 'color_norm_bg' ${THEMERC} | cut -d'=' -f2)"
sd "color_norm_bg.*$" "color_norm_bg = $2 $NBGA" ${THEMERC}
# Title (Separator with text)
read TBG TBGA<<< "$(grep 'color_title_bg' ${THEMERC} | cut -d'=' -f2)"
sd "color_title_bg.*$" "color_title_bg = $2 $TBGA" ${THEMERC}
# calculate readable FG color
TITLE_FG=$(pastel textcolor ${2}|pastel format hex)
read TFG TFGA<<< "$(grep 'color_title_fg' ${THEMERC} | cut -d'=' -f2)"
###TITLE_FGCOLOR=$(pastel complement ${2}|pastel format hex)
if [[ "${TITLE_FG}" == *"ffffff"* ]];then
TITLE_FGCOLOR=$(pastel mix -f 0.7 '#ffffff' "${2}"|pastel format hex)
else
TITLE_FGCOLOR=$(pastel mix -f 0.7 '#000000' "${2}"|pastel format hex)
fi
sd "color_title_fg.*$" "color_title_fg = ${TITLE_FGCOLOR} $TFGA" ${THEMERC}
###sd "color_title_fg.*$" "color_title_fg = ${1} $TFGA" ${THEMERC}
read TBORDER TBORDERA<<< "$(grep 'color_title_border' ${THEMERC} | cut -d'=' -f2)"
TITLE_BORDER=$(pastel darken 0.05 ${1}|pastel format hex)
sd "color_title_border.*$" "color_title_border = $TITLE_BORDER $TBORDERA" ${THEMERC}
# Selected (Active) item
read SBG SBGA<<< "$(grep 'color_sel_bg' ${THEMERC} | cut -d'=' -f2)"
alpha=${SBGA:-100}
sd "color_sel_bg.*$" "color_sel_bg = $2 $alpha" ${THEMERC}
ACTIVE_FG=$(pastel textcolor ${2}|pastel format hex)
read SFG SFGA<<< "$(grep 'color_sel_fg' ${THEMERC} | cut -d'=' -f2)"
sd "color_sel_fg.*$" "color_sel_fg = $ACTIVE_FG $SFGA" ${THEMERC}
read SBORDER SBORDERA<<< "$(grep 'color_sel_border' ${THEMERC} | cut -d'=' -f2)"
alpha=${SBORDERA:-100}
sd "color_sel_border.*$" "color_sel_border = $1 $alpha" ${THEMERC}
# Separator line
read SFG SFGA<<< "$(grep 'color_sep_fg' ${THEMERC} | cut -d'=' -f2)"
SEP_FG=$(pastel mix -f 0.5 "${1}" "${2}"|pastel format hex)
sd "color_sep_fg.*$" "color_sep_fg = $SEP_FG $SFGA" ${THEMERC}
# Menu border
read MBORDER MBORDERA<<< "$(grep 'color_menu_border' ${THEMERC} | cut -d'=' -f2)"
sd "color_menu_border.*$" "color_menu_border = $1 $MBORDERA" ${THEMERC}
}
sep_halign () {
sd "sep_halign.*$" "sep_halign = $1" ${THEMERC}
}
@ -68,6 +141,7 @@ color_sep_fg () {
}
color_title_bg () {
read TBG TBGA<<< "$(grep 'color_title_bg' ${THEMERC} | cut -d'=' -f2)"
#notify-send.sh "${1}" "${#1}"
case "${#1}" in
7) #color
sd "color_title_bg.*$" "color_title_bg = $1 $TBGA" ${THEMERC}
@ -129,9 +203,10 @@ color_norm_fg () {
}
color_sel_bg () {
read SBG SBGA<<< "$(grep 'color_sel_bg' ${THEMERC} | cut -d'=' -f2)"
alpha=${SBGA:-100}
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}
@ -159,13 +234,210 @@ color_sel_border () {
sd "color_sel_border.*$" "color_sel_border = $SBORDER $1" ${THEMERC}
;;
esac
#read IBOR<<< "$(grep 'item_border' ${THEMERC} | cut -d'=' -f2)"
#[[ ${IBOR} == "0" ]] && item_border 1
}
accent () {
color_sel_bg "${1}"
color_sel_fg "${2}"
color_sel_border "${2}"
}
tweak () {
case "$1" in
solid)
menu_gradient_pos none
tweak opacity 100
opacity color_norm_bg 0
opacity color_sep_fg 30
item_radius 0
item_border 0
;;
gradient)
menu_gradient_pos right
opacity color_norm_bg 10
opacity color_sep_fg 0
item_radius 3
item_border 0
;;
opacity)
opacity color_menu_bg "$2"
opacity color_menu_bg_to "$2"
;;
sizing)
case "$2" in
tight)
mb-setvar jgtools_padding=4
mb-setvar jgtools_border=0
mb-setvar submenu_spacing=2
mb-setvar arrow_string=
;;
normal)
mb-setvar jgtools_padding=8
mb-setvar jgtools_border=3
mb-setvar submenu_spacing=3
mb-setvar arrow_string=
;;
wide)
mb-setvar jgtools_padding=20
mb-setvar jgtools_border=6
mb-setvar submenu_spacing=6
mb-setvar arrow_string=
;;
esac
;;
*):;;
esac
[[ "$3" == "menu" ]] && colorizer-menus -s 2>/dev/null
}
t_search_field () {
[[ $search_field == "false" ]] && mb-setvar search_field=true || mb-setvar search_field=false
mb-jgtools main ipc
}
t_apps_in_submenu () {
[[ $apps_in_submenu == "true" ]] && mb-setvar apps_in_submenu=false || mb-setvar apps_in_submenu=true
mb-jgtools main ipc
}
t_icons () {
[[ $jgmenu_use_icons == "true" ]] && mb-setvar jgmenu_use_icons=false || mb-setvar jgmenu_use_icons=true
mb-jgtools main ipc
}
border () {
[[ "$jgtools_padding" -lt "${1}" ]] && mb-setvar jgtools_padding=${1}
mb-setvar jgtools_border=${1}
colorizer-menus -s
}
padding () {
[[ "$jgtools_border" -gt "${1}" ]] && mb-setvar jgtools_border=${1}
mb-setvar jgtools_padding=${1}
colorizer-menus -s
}
opacity () {
# jgctl opacity element value
read FUNC B COLOR OPACITY REST<<< "$(grep ${1} ${THEMERC})"
#echo "$FUNC $B $COLOR $OPACITY $REST"
sd "$1 .*= $COLOR.*$" "$FUNC = $COLOR $2 $REST" ${THEMERC}
}
savescheme () {
case "$LANG" in
pl*)SAVE_AS="Nowy motyw Menu"
DESC="Zapisz obecnie ustawione kolory Menu jako nowy motyw..."
LABEL="Nazwa:"
NAME="nazwa";;
*) SAVE_AS="New Menu colorscheme"
DESC="Save current Menu colors as colorscheme..."
LABEL="Name:"
NAME="colorscheme-name";;
esac
# ask for scheme name
schemename=$(yad --center --width=300 --borders=20 --window-icon=mbcc --title "$SAVE_AS" --text="$DESC" --entry --entry-label="$LABEL" --entry-text="$NAME") || exit 1
echo "${1}${schemename}" >> "$HOME/.config/colorizer/menus/userschemes.csv"
}
applyscheme () {
theme MBcolors
line=$(awk 'NR == n' n=$1 "$HOME/.config/colorizer/menus/userschemes.csv")
#notify-send.sh "$1" "${line}"
case "$1" in
sys) SCHEMEFILE="/usr/share/mabox-colorizer/colorschemes/menus.csv";;
usr) SCHEMEFILE="$HOME/.config/colorizer/menus/userschemes.csv";;
esac
while IFS="|" read -r mbg mbgt mborder tbg tfg tborder normbg nfg sbg sfg sborder sepfg grad scheme_name
do
mb-setvar jgmenu_theme=MBcolors
color_menu_bg "${mbg}"
color_menu_bg_to "${mbgt}"
color_menu_border "${mborder}"
color_title_bg "${tbg}"
color_title_fg "${tfg}"
color_title_border "${tborder}"
color_norm_bg "${normbg}"
color_norm_fg "${nfg}"
color_sel_bg "${sbg}"
color_sel_fg "${sfg}"
color_sel_border "${sborder}"
color_sep_fg "${sepfg}"
menu_gradient_pos "${grad}"
item_border 0
color_title_bg 100
color_menu_bg 100
color_menu_bg_to 100
color_norm_bg 0
#notify-send.sh "${scheme_name}" "${mbg}"
done < <(awk 'NR == n' n=$2 "$SCHEMEFILE")
}
delscheme() {
sed -i ${1}d "$HOME/.config/colorizer/menus/userschemes.csv"
}
mono () {
lighten=(0.92 0.8 0.65 0.45 0.28)
darken=(0.9 0.74 0.54 0.38 0.18)
if [ "${1}" == pick ];then
color=$(gpick -pso 2>/dev/null)
else
color="${1}"
fi
if [ "${#color}" == 7 ];then
for i in "${lighten[@]}"
do
pal+=("$(pastel mix -f $i "#ffffff" "$color"|pastel format hex)")
done
pal+=("$color")
for i in "${darken[@]}"
do
pal+=("$(pastel mix -f $i "$color" "#000000"|pastel format hex)")
done
else
exit 0
fi
# colorize menu
if [ "$2" == "dark" ];then
#notify-send.sh "$1" "gen_menu"
color_menu_bg "${pal[8]}"
color_menu_bg_to "${pal[7]}"
color_menu_border "${pal[10]}"
color_title_bg "${pal[9]}"
color_title_border "${pal[9]}"
color_title_fg "${pal[2]}"
color_norm_fg "${pal[3]}"
color_sel_bg "${pal[6]}"
color_sel_fg "${pal[1]}"
color_sep_fg "${pal[6]}"
else #light
color_menu_bg "${pal[2]}"
color_menu_bg_to "${pal[3]}"
color_menu_border "${pal[1]}"
color_title_bg "${pal[3]}"
color_title_border "${pal[4]}"
color_title_fg "${pal[10]}"
color_norm_fg "${pal[8]}"
color_sel_bg "${pal[4]}"
color_sel_fg "${pal[10]}"
color_sep_fg "${pal[3]}"
fi
colorizer-menus -s 2>/dev/null
}
case "$1" in
theme) theme "$2";;
reset) reset ;;
resetMBcolors) resetMBcolors "$2";;
color_menu_bg) color_menu_bg "$2";;
color_menu_bg_to) color_menu_bg_to "$2";;
color_menu_border) color_menu_border "$2";;
menu_gradient_pos) menu_gradient_pos "$2";;
gradient) gradient "$2" "$3";;
sep_halign) sep_halign "$2";;
color_sep_fg) color_sep_fg "$2";;
color_title_bg) color_title_bg "$2";;
@ -178,5 +450,17 @@ case "$1" in
color_sel_bg) color_sel_bg "$2";;
color_sel_fg) color_sel_fg "$2";;
color_sel_border) color_sel_border "$2";;
accent) accent "$2" "$3";;
tweak) tweak "$2" "$3" "$4";;
opacity) opacity "$2" "$3";;
t_search_field)t_search_field;;
t_apps_in_submenu) t_apps_in_submenu;;
t_icons)t_icons;;
border)border "$2";;
padding)padding "$2";;
mono) mono "$2" "$3";;
savescheme) savescheme "$2";;
applyscheme) applyscheme "$2" "$3";;
delscheme) delscheme "$2";;
*) : ;;
esac

293
bin/mbclr
View File

@ -1,35 +1,88 @@
#!/bin/bash
#
# colorizer - set of tools for Mabox (auto)theming
# Copyright (C) 2022-2023 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/>.
# mbclr current polecenie funkcja argument backprg [config_file]
# mbclr
#notify-send.sh "mbclr" "${1}\n${2}\n${3}\n${4}\n${5}\n${6}"
case "$LANG" in
pl*)
PICK_FROM_SCREEN="Pobierz kolor z ekranu"
SELECT_OR_PICK="Wybierz kolor z selektora"
OPACITY="Nieprzezroczystość"
SHADES_OF_CURRENT="Oblicz z bieżącego"
SHADES_OF="Odcienie"
LIGHTEN_DARKEN="Jaśniejsze / Ciemniejsze"
SATURATION="Nasycenie..."
ROTATE_HSL_HUE="Obróć kanał barwy HSL..."
CHANGE_COLOR="Zmień na..."
CURRENT="obecny kolor"
WALLPAPER_COLORS="...kolory z tapety"
GTKCOLORS="Kolory motywu GTK"
ACCENT_COLORS="Popularne kolory akcentu"
GRAYS="Odcienie szarości"
;;
*)
PICK_FROM_SCREEN="Pick color from screen"
SELECT_OR_PICK="Select or pick from screen"
OPACITY="Opacity"
SHADES_OF_CURRENT="Calculate from"
SHADES_OF="Shades of"
LIGHTEN_DARKEN="Lighten / Darken"
SATURATION="Saturation..."
ROTATE_HSL_HUE="Rotate HSL hue channel..."
CHANGE_COLOR="Change to..."
CURRENT="current color"
WALLPAPER_COLORS="...wallpaper colors"
GTKCOLORS="GTK theme colors"
ACCENT_COLORS="Popular accent colors"
GRAYS="Shades of Gray"
;;
esac
ccol_ind="<span bgcolor='${1}'> </span>"
gtkthemename=$(grep gtk-theme ~/.config/gtk-3.0/settings.ini |cut -d'=' -f2)
main () {
#read WALLPAPER<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
WALLPALDIR="$HOME/.config/mbxcolors/palettes/wallp"
WALLPALDIR="$HOME/.cache/colorizer/palettes"
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 $3}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$WALLPAPER.clr"
NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME}
((n++))
NAME=${NAME:${n}}
fi
mapfile -t wallcolors < "$WALLPALDIR/$WALLPAPER.clr"
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",)
#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")
#for i in $(theme.sh -p |cut -d':' -f2)
#do
#colors+=("$i")
#done
if [ ! -f "$WALLPALDIR/$NAME.clr" ]; then
convert ${WALLPATH} -resize 25% -colors 16 -unique-colors txt:- |grep -v '^#'| awk '{print substr($3,1,7)}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$NAME.clr"
fi
mapfile -t wallcolors < "$WALLPALDIR/$NAME.clr"
if [[ "${#wallcolors[@]}" -lt 8 ]]; then
wallcolors+=("#2e3440" "#4c566a" "#5e81ac" "#bf616b" "#b48ead" "#a3be8c" "#ebcb8b" "#d8dee9" "#eceff4")
fi
grays=("#000000" "#0d0d0d" "#1b1b1b" "#282828" "#363636" "#434343" "#515151" "#5e5e5e" "#6b6b6b" "#797979" "#868686" "#949494" "#a1a1a1" "#aeaeae" "#bcbcbc" "#c9c9c9" "#d7d7d7" "#e4e4e4" "#f2f2f2" "#FFFFFF")
accents=("#e93d57" "#c7162b" "#e9633a" "#e95620" "#f4a300" "#e8cc2d" "#3cd425" "#0e8420" "#00d3b7" "#18b0b0" "#3dade9" "#686b6f" "#3584e4" "#916ee4" "#b875dc" "#77216e" "#c748ba" "#e93a9a")
out+=("^sep($4)")
if [[ "$2" == "jgctl" ]]; then
. $HOME/.config/mabox/mabox.conf
@ -42,113 +95,181 @@ 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>[ <b>$OP</b> ]</small>,^checkout(opacity)")
out2+=("^tag(opacity)")
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}")
out2+=("<tt><small> 80</small> <span bgcolor='$1' bgalpha='80%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 80 ;${5}")
out2+=("<tt><small> 70</small> <span bgcolor='$1' bgalpha='70%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 70 ;${5}")
out2+=("<tt><small> 60</small> <span bgcolor='$1' bgalpha='60%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 60 ;${5}")
out2+=("<tt><small> 50</small> <span bgcolor='$1' bgalpha='50%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 50 ;${5}")
out2+=("<tt><small> 40</small> <span bgcolor='$1' bgalpha='40%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 40 ;${5}")
out2+=("<tt><small> 30</small> <span bgcolor='$1' bgalpha='30%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 30 ;${5}")
out2+=("<tt><small> 20</small> <span bgcolor='$1' bgalpha='20%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 20 ;${5}")
out2+=("<tt><small> 10</small> <span bgcolor='$1' bgalpha='10%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 10 ;${5}")
out2+=("<tt><small> 5</small> <span bgcolor='$1' bgalpha='5%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 5 ;${5}")
out2+=("<tt><small> 0</small> <span bgcolor='$1' bgalpha='1%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 0 ;${5}")
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}")
out2+=("<tt><small> 80</small> <span bgcolor='$1' bgalpha='80%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 80 ;${5}")
out2+=("<tt><small> 70</small> <span bgcolor='$1' bgalpha='70%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 70 ;${5}")
out2+=("<tt><small> 60</small> <span bgcolor='$1' bgalpha='60%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 60 ;${5}")
out2+=("<tt><small> 50</small> <span bgcolor='$1' bgalpha='50%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 50 ;${5}")
out2+=("<tt><small> 40</small> <span bgcolor='$1' bgalpha='40%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 40 ;${5}")
out2+=("<tt><small> 30</small> <span bgcolor='$1' bgalpha='30%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 30 ;${5}")
out2+=("<tt><small> 20</small> <span bgcolor='$1' bgalpha='20%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 20 ;${5}")
out2+=("<tt><small> 10</small> <span bgcolor='$1' bgalpha='10%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 10 ;${5}")
out2+=("<tt><small> 5</small> <span bgcolor='$1' bgalpha='5%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 5 ;${5}")
out2+=("<tt><small> 0</small> <span bgcolor='$1' bgalpha='1%'> </span><span bgcolor='$1'> </span></tt>,jgctl $3 0 ;${5}")
fi
if [[ "$2" == "t2ctl" ]]; then
T2RC="$HOME/.config/tint2/jaskier_mb.tint2rc"
read COLOR OP<<< $(grep "${3}" ${T2RC} | cut -d'=' -f2)
out+=("^sep($OPACITY)")
out+=("$OPACITY <small>[ <b>$OP</b> ]</small>,^checkout(opacity)")
out2+=("^tag(opacity)")
out2+=("^sep($OPACITY <small>[ $OP ]</small>")
out2+=("<tt><small>100</small> <span bgcolor='$1' bgalpha='100%'> </span><span bgcolor='$1'> </span></tt>,t2ctl $3 100;${5}")
out2+=("<tt><small> 95</small> <span bgcolor='$1' bgalpha='95%'> </span><span bgcolor='$1'> </span></tt>,t2ctl $3 95 ;${5}")
out2+=("<tt><small> 90</small> <span bgcolor='$1' bgalpha='90%'> </span><span bgcolor='$1'> </span></tt>,t2ctl $3 90 ;${5}")
out2+=("<tt><small> 80</small> <span bgcolor='$1' bgalpha='80%'> </span><span bgcolor='$1'> </span></tt>,t2ctl $3 80 ;${5}")
out2+=("<tt><small> 70</small> <span bgcolor='$1' bgalpha='70%'> </span><span bgcolor='$1'> </span></tt>,t2ctl $3 70 ;${5}")
out2+=("<tt><small> 60</small> <span bgcolor='$1' bgalpha='60%'> </span><span bgcolor='$1'> </span></tt>,t2ctl $3 60 ;${5}")
out2+=("<tt><small> 50</small> <span bgcolor='$1' bgalpha='50%'> </span><span bgcolor='$1'> </span></tt>,t2ctl $3 50 ;${5}")
out2+=("<tt><small> 40</small> <span bgcolor='$1' bgalpha='40%'> </span><span bgcolor='$1'> </span></tt>,t2ctl $3 40 ;${5}")
out2+=("<tt><small> 30</small> <span bgcolor='$1' bgalpha='30%'> </span><span bgcolor='$1'> </span></tt>,t2ctl $3 30 ;${5}")
out2+=("<tt><small> 20</small> <span bgcolor='$1' bgalpha='20%'> </span><span bgcolor='$1'> </span></tt>,t2ctl $3 20 ;${5}")
out2+=("<tt><small> 10</small> <span bgcolor='$1' bgalpha='10%'> </span><span bgcolor='$1'> </span></tt>,t2ctl $3 10 ;${5}")
out2+=("<tt><small> 5</small> <span bgcolor='$1' bgalpha='5%'> </span><span bgcolor='$1'> </span></tt>,t2ctl $3 5 ;${5}")
out2+=("<tt><small> 0</small> <span bgcolor='$1' bgalpha='1%'> </span><span bgcolor='$1'> </span></tt>,t2ctl $3 0 ;${5}")
fi
CUR_FG=$(pastel textcolor $1|pastel format hex)
out+=("^sep($SHADES_OF_CURRENT <tt><span bgcolor='$1' fgcolor='$CUR_FG'>$1</span></tt>)")
out+=("$LIGHTEN_DARKEN,^checkout(curshades)")
out+=("$SATURATION,^checkout(saturate)")
out+=("<big>󰑧</big> $ROTATE_HSL_HUE,^checkout(rotate_hsl)")
#out+=("$SHADES_OF_CURRENT <tt><span bgcolor='$1'> </span></tt> (<small>$1</small>),^checkout(curshades)")
out+=("^sep($CHANGE_COLOR)")
#Current
out+=("^sep(SELECT_COLOR)")
out+=(" Select or pick from screen,mbclr pick $2 $3 ${5}")
out+=("<big></big> $PICK_FROM_SCREEN,mbclr pixelcolor $2 $3 ${5} ${6}")
out+=("<big></big> $SELECT_OR_PICK,mbclr pick $2 $3 ${5} ${6}")
out+=("^sep()")
out+=("<big><span bgcolor='#e93d57'> </span> <span bgcolor='#f4a300'> </span> <span bgcolor='#3cd425'> </span> <span bgcolor='#3584e4'> </span> <span bgcolor='#e93a9a'> </span></big> $ACCENT_COLORS,^checkout(accents)")
out2+=("^tag(accents)")
out2+=("^sep($ACCENT_COLORS)")
for i in ${accents[@]};do out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span>${ccol_ind}</tt>,$2 $3 '${i}' ${6};${5}");done
out+=("^sep()")
out+=("<tt><span bgcolor='$1'> </span></tt> shades of current,^checkout(curshades)")
out+=("^sep(Wallpaper colors)")
mapfile -t gtkcolors < <( gtkcolors.py 2>/dev/null| grep -v None|awk '{print "#"$2}'|sort|uniq)
if [ "${#gtkcolors[@]}" -gt 0 ];then
out+=("$GTKCOLORS,^checkout(gtkcols)")
out2+=("^tag(gtkcols)")
out2+=("^sep($GTKCOLORS)")
out2+=("^sep($gtkthemename)")
for i in ${gtkcolors[@]};do out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span>${ccol_ind}</tt>,$2 $3 '${i}' ${6};${5}");done
out+=("^sep()")
fi
out+=("$GRAYS,^checkout(grayscol)")
out2+=("^tag(grayscol)")
out2+=("^sep($GRAYS)")
for i in "${grays[@]}"
do
out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span>${ccol_ind}</tt>,$2 $3 '${i}' ${6};${5}")
done
out+=("^sep($WALLPAPER_COLORS)")
for i in "${wallcolors[@]}"
do
out+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,$2 $3 '${i}' ${6};${5}")
out+=("<tt><small>$i</small> <span bgcolor='$i'> </span>${ccol_ind}</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)")
out2+=("^tag(light)")
out2+=("^sep(LIGHT)")
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)")
out2+=("^tag(dark)")
out2+=("^sep(DARK)")
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
# 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
out2+=("<tt><small>$clr</small> <span bgcolor='$clr'> </span></tt>,$2 $3 '${clr}' ${6};${5}")
out2+=("<tt><small>$clr</small> <span bgcolor='$clr'> </span>${ccol_ind}</tt>,$2 $3 '${clr}' ${6};${5}")
fi
done
out2+=("^sep()")
out2+=("<tt><small>$1</small> <span bgcolor='$1'> </span></tt>,$2 $3 '${1}' ${6};${5}")
out2+=("<tt><span bgcolor='$1' fgcolor='$CUR_FG'> <small>$CURRENT $1</small> </span></tt>,$2 $3 '${1}' ${6};${5}")
out2+=("^sep()")
for i in 05 1 15 2 25 3; do
clr=$(pastel darken 0.$i "${1}" | pastel format hex)
if [ "${clr}" != "#000000" ];then
out2+=("<tt><small>$clr</small> <span bgcolor='$clr'> </span></tt>,$2 $3 '${clr}' ${6};${5}")
out2+=("<tt><small>$clr</small> <span bgcolor='$clr'> </span>${ccol_ind}</tt>,$2 $3 '${clr}' ${6};${5}")
fi
done
# Shades ENG
# SATURATION
out2+=("^tag(saturate)")
out2+=("^sep($SATURATION)")
for i in 9 8 7 6 5 4 3 2 1; do
clr=$(pastel desaturate 0.$i "${1}" | pastel format hex)
if [ "${clr}" != "${oldclr}" ];then
out2+=("<tt><small>$clr</small> <span bgcolor='$clr'> </span>${ccol_ind}</tt>,$2 $3 '${clr}' ${6};${5}")
oldclr=${clr}
fi
done
out2+=("^sep()")
out2+=("<tt><span bgcolor='$1' fgcolor='$CUR_FG'> <small>$CURRENT $1</small> </span></tt>,$2 $3 '${1}' ${6};${5}")
out2+=("^sep()")
for i in 1 2 3 4 5 6 7 8 9; do
clr=$(pastel saturate 0.$i "${1}" | pastel format hex)
if [ "${clr}" != "${oldclr}" ];then
out2+=("<tt><small>$clr</small> <span bgcolor='$clr'> </span>${ccol_ind}</tt>,$2 $3 '${clr}' ${6};${5}")
oldclr=${clr}
fi
done
# SATURATION END
# ROTATE HSL
out2+=("^tag(rotate_hsl)")
out2+=("^sep($ROTATE_HSL_HUE)")
for i in {135..15..15};do
clr=$(pastel rotate -- -$i "${1}" |pastel format hex)
out2+=("<tt><small>$clr</small> <span bgcolor='$clr'> </span>${ccol_ind} <small>-$i°</small></tt>,$2 $3 '${clr}' ${6};${5}")
done
out2+=("^sep()")
out2+=("<tt><span bgcolor='$1' fgcolor='$CUR_FG'> <small>$CURRENT $1</small> </span></tt>,$2 $3 '${1}' ${6};${5}")
out2+=("^sep()")
for i in {15..135..15};do
clr=$(pastel rotate $i "${1}" |pastel format hex)
out2+=("<tt><small>$clr</small> <span bgcolor='$clr'> </span>${ccol_ind} <small>$i°</small></tt>,$2 $3 '${clr}' ${6};${5}")
done
# ROTATE HSL END
printf '%s\n' "${out[@]}"
printf '%s\n' "${out2[@]}"
}
pickcolor () {
#notify-send.sh -t 50000 "From pickcolor" "1: $1\n2: $2\n3: $3\n4: $4\n5: $5\n6: $6"
color=$(gcolor3 2>/dev/null)
if [ "$color" ]; then
mycmd=("$1 $2 '${color}';${3} -s")
mycmd=("$1 $2 '${color}' ${4};${3}")
fi
eval "${mycmd[@]}"
}
pixelcolor() {
picker=${picker:-gpick}
if [ "$picker" == "gpick" ]; then
command="gpick -pso 2>/dev/null"
else
command="xcolor --preview-size ${size} --scale ${scale}"
fi
color="$(${command})"
if [ -n "${color}" ]; then
mycmd=("$1 $2 '${color}' ${4};${3}")
fi
eval "${mycmd[@]}"
#notify-send.sh "Qpa $1" "${mycmd[@]}"
}
case "$1" in
pick) pickcolor "$2" "${3}" "${5}";;
pick) pickcolor "$2" "${3}" "${4} ${5}" "${6}";;
pixelcolor) pixelcolor "$2" "${3}" "${4} ${5}" "${6}";;
*) main "$@" ;;
esac

122
bin/mbgrad 100755
View File

@ -0,0 +1,122 @@
#!/bin/bash
GRADIENT_FILE="$HOME"/.config/colorizer/gradients_all.inc
if [ ! -f $GRADIENT_FILE ]; then
cp -a /usr/share/mabox-colorizer/gradients_all.inc $GRADIENT_FILE
fi
case "$1" in
ob)
CACHEFILE="$HOME"/.config/colorizer/grad_ob.csv
COMMAND="obtctl activegradient"
me="colorizer-ob -s"
;;
menu)
CACHEFILE="$HOME"/.config/colorizer/grad_menu.csv
COMMAND="jgctl gradient"
me="colorizer-menus -s"
;;
cava)
CACHEFILE="$HOME"/.config/colorizer/grad_cava.csv
COMMAND="cavactl gradient"
me="colorizer-cava -s"
;;
*)
CACHEFILE="$HOME"/.config/colorizer/grad_root.csv
COMMAND="w2theme gradient"
me="colorizer -s"
;;
esac
if [ -f "$CACHEFILE" ]; then
cat "$CACHEFILE"
else
case $LANG in
pl*)
GRADIENTS="Gradienty"
MORE_GRADIENTS="Więcej..."
;;
*)
GRADIENTS="Gradients"
MORE_GRADIENTS="More gradients"
;;
esac
out2+=("^sep($GRADIENTS)")
n=0
while read -r FROM TO NAME;
do
((n++))
for i in $(pastel gradient -n 24 ${FROM} ${TO}|pastel format hex)
do
tablica+="<span bgcolor='$i'> </span>"
done
case "$n" in
31) out2+=("^sep($MORE_GRADIENTS)")
out2+=("$GRADIENTS 30...60,^checkout(grad31)")
out3+=("^tag(grad31)")
out3+=("^sep($GRADIENTS 30...60)");;
61) out2+=("$GRADIENTS 61...90,^checkout(grad61)")
out3+=("^tag(grad61)")
out3+=("^sep($GRADIENTS 61...90)");;
91) out2+=("$GRADIENTS 91...120,^checkout(grad91)")
out3+=("^tag(grad91)")
out3+=("^sep($GRADIENTS 91...120)");;
121) out2+=("$GRADIENTS 121...150,^checkout(grad121)")
out3+=("^tag(grad121)")
out3+=("^sep($GRADIENTS 121...150)");;
151) out2+=("$GRADIENTS 151...180,^checkout(grad151)")
out3+=("^tag(grad151)")
out3+=("^sep($GRADIENTS 151...180)");;
181) out2+=("$GRADIENTS 181...210,^checkout(grad181)")
out3+=("^tag(grad181)")
out3+=("^sep($GRADIENTS 181...210)");;
211) out2+=("$GRADIENTS 211...240,^checkout(grad211)")
out3+=("^tag(grad211)")
out3+=("^sep($GRADIENTS 211...240)");;
241) out2+=("$GRADIENTS 241...270,^checkout(grad241)")
out3+=("^tag(grad241)")
out3+=("^sep($GRADIENTS 241...270)");;
271) out2+=("$GRADIENTS 271...300,^checkout(grad271)")
out3+=("^tag(grad271)")
out3+=("^sep($GRADIENTS 271...300)");;
301) out2+=("$GRADIENTS 301...330,^checkout(grad301)")
out3+=("^tag(grad301)")
out3+=("^sep($GRADIENTS 301...330)");;
331) out2+=("$GRADIENTS 331...,^checkout(grad331)")
out3+=("^tag(grad331)")
out3+=("^sep($GRADIENTS 331...)");;
*) : ;;
esac
case 1 in
$(($n<=30))) out2+=("<tt>$(echo ${tablica})</tt> ${NAME},${COMMAND} '${FROM}' '${TO}';${me}");;
$((30<$n && $n<=60))) out3+=("<tt>$(echo ${tablica})</tt> ${NAME},${COMMAND} '${FROM}' '${TO}';$me");;
$((60<$n && $n<=90))) out3+=("<tt>$(echo ${tablica})</tt> ${NAME},${COMMAND} '${FROM}' '${TO}';$me");;
$((90<$n && $n<=120))) out3+=("<tt>$(echo ${tablica})</tt> ${NAME},${COMMAND} '${FROM}' '${TO}';$me");;
$((120<$n && $n<=150))) out3+=("<tt>$(echo ${tablica})</tt> ${NAME},${COMMAND} '${FROM}' '${TO}';$me");;
$((150<$n && $n<=180))) out3+=("<tt>$(echo ${tablica})</tt> ${NAME},${COMMAND} '${FROM}' '${TO}';$me");;
$((180<$n && $n<=210))) out3+=("<tt>$(echo ${tablica})</tt> ${NAME},${COMMAND} '${FROM}' '${TO}';$me");;
$((210<$n && $n<=240))) out3+=("<tt>$(echo ${tablica})</tt> ${NAME},${COMMAND} '${FROM}' '${TO}';$me");;
$((240<$n && $n<=270))) out3+=("<tt>$(echo ${tablica})</tt> ${NAME},${COMMAND} '${FROM}' '${TO}';$me");;
$((270<$n && $n<=300))) out3+=("<tt>$(echo ${tablica})</tt> ${NAME},${COMMAND} '${FROM}' '${TO}';$me");;
$((300<$n && $n<=330))) out3+=("<tt>$(echo ${tablica})</tt> ${NAME},${COMMAND} '${FROM}' '${TO}';$me");;
$((330<$n))) out3+=("<tt>$(echo ${tablica})</tt> ${NAME},${COMMAND} '${FROM}' '${TO}';$me");;
*)
:
;;
esac
tablica=()
done < "${GRADIENT_FILE}"
printf '%s\n' "${out[@]}"
printf '%s\n' "${out2[@]}"
printf '%s\n' "${out3[@]}"
printf '%s\n' "${out[@]}" > $CACHEFILE
printf '%s\n' "${out2[@]}" >> $CACHEFILE
printf '%s\n' "${out3[@]}" >> $CACHEFILE
fi

View File

@ -3,84 +3,158 @@
OBTHEME=$(awk '/<theme>/ {while (getline n) {if (match(n, /<name>/))
{l=n; exit}}} END {split(l, a, "[<>]"); print a[3]}' "$HOME/.config/openbox/rc.xml")
#echo "$OBTHEME"
THEMEDIR="$HOME/.themes/$OBTHEME/openbox-3"
THEMERC="$HOME/.themes/$OBTHEME/openbox-3/themerc"
#if [[ $OBTHEME = MBcolor* ]];then
#switch to MBcolors theme
# THEMEDIR="$HOME/.themes/$OBTHEME/openbox-3"
# THEMERC="$HOME/.themes/$OBTHEME/openbox-3/themerc"
# else
# xmlstarlet ed -L -N o="http://openbox.org/3.4/rc" -u '/o:openbox_config/o:theme/o:name' -v "MBcolors" "$HOME/.config/openbox/rc.xml"
# THEMEDIR="$HOME/.themes/MBcolors/openbox-3"
# THEMERC="$HOME/.themes/MBcolors/openbox-3/themerc"
#fi
MBCOLORSDIR="$HOME"/.themes/MBcolors/openbox-3/
if [ ! -d "$MBCOLORSDIR" ]; then
mkdir -p ${MBCOLORSDIR}
rsync -a /usr/share/mabox-colorizer/themes/MBcolors/openbox-3/* ${MBCOLORSDIR}/
fi
if [ ! -f "${THEMERC}.bak" ]; then
cp ${THEMERC} ${THEMERC}.bak
fi
theme () {
xmlstarlet ed -L -N o="http://openbox.org/3.4/rc" -u '/o:openbox_config/o:theme/o:name' -v "$1" "$HOME/.config/openbox/rc.xml"
openbox --reconfigure
}
reset () {
rm ${THEMERC}
mv ${THEMERC}.bak ${THEMERC}
openbox --reconfigure
}
resetonlycolors () {
theme MBcolors
clractivebg "#579c8e"
clractivebgto "#41756a"
}
resetMBcolors() {
theme MBcolors
rsync -a /usr/share/mabox-colorizer/themes/MBcolors/openbox-3/* ${MBCOLORSDIR}/
#set font
nspace="http://openbox.org/3.4/rc"
cfg="$HOME/.config/openbox/rc.xml"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:name' -v "Ubuntu" "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:size' -v "9" "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:weight' -v "Bold" "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:slant' -v "Normal" "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:name' -v "Ubuntu" "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:size' -v "9" "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:weight' -v "Bold" "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:slant' -v "Normal" "$cfg"
}
borderWidth () {
sd "^border.width:.*$" "border.width: $1" ${THEMERC}
openbox --reconfigure
case "$1" in
increase)
read BWIDTH <<< "$(grep border.width: ${THEMERC} | cut -d':' -f2)"
BWIDTH=$((BWIDTH+1))
sd "^border.width:.*$" "border.width: ${BWIDTH}" ${THEMERC}
;;
decrease)
read BWIDTH <<< "$(grep border.width: ${THEMERC} | cut -d':' -f2)"
if [ "$BWIDTH" -gt "0" ];then
BWIDTH=$((BWIDTH-1))
sd "^border.width:.*$" "border.width: ${BWIDTH}" ${THEMERC}
fi
;;
*)
sd "^border.width:.*$" "border.width: $1" ${THEMERC}
;;
esac
}
activeborderColor () {
sd "\.active.border.color:.*$" ".active.border.color: $1" ${THEMERC}
openbox --reconfigure
}
inactiveborderColor () {
sd "\.inactive.border.color:.*$" ".inactive.border.color: $1" ${THEMERC}
openbox --reconfigure
}
paddingHeight () {
sd "^padding.height:.*$" "padding.height: $1" ${THEMERC}
openbox --reconfigure
case "$1" in
increase)
read PHEIGHT <<< "$(grep ^padding.height: ${THEMERC} | cut -d':' -f2)"
PHEIGHT=$((PHEIGHT+1))
sd "^padding.height:.*$" "padding.height: ${PHEIGHT}" ${THEMERC}
sd "^padding.width:.*$" "padding.width: ${PHEIGHT}" ${THEMERC}
;;
decrease)
read PHEIGHT <<< "$(grep ^padding.height: ${THEMERC} | cut -d':' -f2)"
if [ "$PHEIGHT" -gt "0" ];then
PHEIGHT=$((PHEIGHT-1))
sd "^padding.height:.*$" "padding.height: ${PHEIGHT}" ${THEMERC}
sd "^padding.width:.*$" "padding.width: ${PHEIGHT}" ${THEMERC}
fi
;;
0|1|2|3|4|5|6|8|10|12|16|20)
sd "^padding.height:.*$" "padding.height: $1" ${THEMERC}
sd "^padding.width:.*$" "padding.width: $1" ${THEMERC}
;;
esac
}
paddingWidth () {
sd "^padding.width:.*$" "padding.width: $1" ${THEMERC}
openbox --reconfigure
}
textjustify () {
sd "\.text.justify:.*$" ".text.justify: $1" ${THEMERC}
openbox --reconfigure
}
shadow () {
case "$1" in
0)
0|no)
sd "\.active.label.text.font:.*$" ".active.label.text.font: shadow=n:shadowtint=70:shadowoffset=1" ${THEMERC}
sd "\.inactive.label.text.font:.*$" ".inactive.label.text.font: shadow=n:shadowtint=20:shadowoffset=1" ${THEMERC}
;;
1)
1|dark)
sd "\.active.label.text.font:.*$" ".active.label.text.font: shadow=y:shadowtint=70:shadowoffset=1" ${THEMERC}
sd "\.inactive.label.text.font:.*$" ".inactive.label.text.font: shadow=y:shadowtint=20:shadowoffset=1" ${THEMERC}
#sd "\.inactive.label.text.font:.*$" ".inactive.label.text.font: shadow=y:shadowtint=20:shadowoffset=1" ${THEMERC}
;;
2)
sd "\.active.label.text.font:.*$" ".active.label.text.font: shadow=y:shadowtint=-70:shadowoffset=1" ${THEMERC}
sd "\.inactive.label.text.font:.*$" ".inactive.label.text.font: shadow=y:shadowtint=-20:shadowoffset=1" ${THEMERC}
2|light)
sd "\.active.label.text.font:.*$" ".active.label.text.font: shadow=y:shadowtint=-40:shadowoffset=1" ${THEMERC}
#sd "\.inactive.label.text.font:.*$" ".inactive.label.text.font: shadow=y:shadowtint=-20:shadowoffset=1" ${THEMERC}
;;
esac
openbox --reconfigure
esac
}
handlewidth () {
sd "\.handle.width:.*$" ".handle.width: $1" ${THEMERC}
openbox --reconfigure
}
raised () {
#flat or raised
#flat 0 or raised 1 or sunken 2
read WINRAISED REST <<< "$(grep .title.bg: ${THEMERC} | cut -d':' -f2)"
case "$1" in
0)
0|flat)
sd "\.title.bg:.*$" ".title.bg: flat ${REST}" ${THEMERC}
sd "\.handle.bg:.*$" ".handle.bg: flat ${REST}" ${THEMERC}
sd "\.grip.bg:.*$" ".grip.bg: flat ${REST}" ${THEMERC}
openbox --reconfigure;;
1)
;;
1|raised)
sd "\.title.bg:.*$" ".title.bg: raised ${REST}" ${THEMERC}
sd "\.handle.bg:.*$" ".handle.bg: raised ${REST}" ${THEMERC}
sd "\.grip.bg:.*$" ".grip.bg: raised ${REST}" ${THEMERC}
openbox --reconfigure;;
;;
2|sunken)
sd "\.title.bg:.*$" ".title.bg: sunken ${REST}" ${THEMERC}
sd "\.handle.bg:.*$" ".handle.bg: sunken ${REST}" ${THEMERC}
sd "\.grip.bg:.*$" ".grip.bg: sunken ${REST}" ${THEMERC}
;;
esac
}
gradient () {
gradient_type () {
#solid or gradient gradient-type
read WINRAISED REST <<< "$(grep .title.bg: ${THEMERC} | cut -d':' -f2)"
case "$1" in
@ -88,14 +162,139 @@ gradient () {
sd "\.title.bg:.*$" ".title.bg: ${WINRAISED} solid" ${THEMERC}
sd "\.handle.bg:.*$" ".handle.bg: ${WINRAISED} solid" ${THEMERC}
sd "\.grip.bg:.*$" ".grip.bg: ${WINRAISED} solid" ${THEMERC}
openbox --reconfigure;;
;;
*)
sd "\.title.bg:.*$" ".title.bg: ${WINRAISED} gradient ${1}" ${THEMERC}
sd "\.handle.bg:.*$" ".handle.bg: ${WINRAISED} gradient ${1}" ${THEMERC}
sd "\.grip.bg:.*$" ".grip.bg: ${WINRAISED} gradient ${1}" ${THEMERC}
openbox --reconfigure;;
;;
esac
}
random_gradient () {
GRADIENT_FILE="$HOME"/.config/colorizer/gradients_all.inc
if [ ! -f $GRADIENT_FILE ]; then
cp -a /usr/share/mabox-colorizer/gradients_all.inc $GRADIENT_FILE
fi
read CLR CLRTO REST <<< "$(shuf -n 1 $GRADIENT_FILE)"
activegradient "$CLR" "$CLRTO"
}
activegradient () {
# ACTIVE
# ACTIVE GRIP and HANDLE
colorTo=$(pastel darken 0.1 "${1}"|pastel format hex)
#activehandle?
###read ABG <<< "$(grep .active.title.bg.color: ${THEMERC} | cut -d':' -f2)"
###read AHBG <<< "$(grep .active.handle.bg.color: ${THEMERC} | cut -d':' -f2)"
###if [ "$ABG" == "$AHBG" ];then
###fi
sd "\.active.grip.bg.color:.*$" ".active.grip.bg.color: ${1}" ${THEMERC}
sd "\.active.grip.bg.colorTo:.*$" ".active.grip.bg.colorTo: ${colorTo}" ${THEMERC}
sd "^window.active.title.bg.color:.*$" "window.active.title.bg.color: ${1}" ${THEMERC}
sd "\.active.border.color:.*$" ".active.border.color: ${1}" ${THEMERC}
sd "^window.active.title.bg.colorTo:.*$" "window.active.title.bg.colorTo: ${colorTo}" ${THEMERC}
#sd "\.active.handle.bg.color:.*$" ".active.handle.bg.color: ${1}" ${THEMERC}
sd "^window.active.title.bg.color:.*$" "window.active.title.bg.color: ${1}" ${THEMERC}
sd "^window.active.title.bg.colorTo:.*$" "window.active.title.bg.colorTo: ${2}" ${THEMERC}
# Border color = active.title.bg.color (gradient start color)
sd "\.active.border.color:.*$" ".active.border.color: $1" ${THEMERC}
#### INACTIVE
icolor=$(pastel mix -s RGB -f 0.3 ${1} '#000000' |pastel format hex)
icolorTo=$(pastel mix -s RGB -f 0.3 ${2} '#000000' |pastel format hex)
sd "^window.inactive.title.bg.color:.*$" "window.inactive.title.bg.color: ${icolor}" ${THEMERC}
sd "^window.inactive.title.bg.colorTo:.*$" "window.inactive.title.bg.colorTo: ${icolorTo}" ${THEMERC}
# Border color = active.title.bg.color (gradient start color)
sd "\.inactive.border.color:.*$" ".inactive.border.color: ${icolor}" ${THEMERC}
## INACTIVE GRIP and HANDLE
#normalhandle?
###read IBG <<< "$(grep .inactive.title.bg.color: ${THEMERC} | cut -d':' -f2)"
###read IHBG <<< "$(grep .inactive.handle.bg.color: ${THEMERC} | cut -d':' -f2)"
###if [ "$IBG" == "$IHBG" ];then
sd "\.inactive.handle.bg.color:.*$" ".inactive.handle.bg.color: ${icolor}" ${THEMERC}
sd "\.inactive.handle.bg.colorTo:.*$" ".inactive.handle.bg.colorTo: ${icolorTo}" ${THEMERC}
###fi
sd "\.inactive.grip.bg.color:.*$" ".inactive.grip.bg.color: ${icolor}" ${THEMERC}
sd "\.inactive.grip.bg.colorTo:.*$" ".inactive.grip.bg.colorTo: ${icolorTo}" ${THEMERC}
sd "^window.inactive.title.bg.color:.*$" "window.inactive.title.bg.color: ${icolor}" ${THEMERC}
sd "\.inactive.border.color:.*$" ".inactive.border.color: ${icolor}" ${THEMERC}
sd "^window.inactive.title.bg.colorTo:.*$" "window.inactive.title.bg.colorTo: ${icolorTo}" ${THEMERC}
## Active handle always have inactive colors
sd "\.active.handle.bg.color:.*$" ".active.handle.bg.color: ${icolor}" ${THEMERC}
sd "\.active.handle.bg.colorTo:.*$" ".active.handle.bg.colorTo: ${icolorTo}" ${THEMERC}
# calculate color for title.fg and buttons
TITLE_FG=$(pastel textcolor ${2}|pastel format hex)
if [[ "${TITLE_FG}" == *"ffffff"* ]];then
TITLE_FG="#E5E5E5"
else
TITLE_FG="#222222"
fi
sd "\.active.label.text.color:.*$" ".active.label.text.color: ${TITLE_FG}" ${THEMERC}
# Button colors
activebuttonscolors "${TITLE_FG}"
# Shadow
read SHADOW <<< "$(grep .active.label.text.font: ${THEMERC} | cut -d':' -f2| cut -d'=' -f2)"
if [ "$SHADOW" == "y" ];then
if [ "$TITLE_FG" == "#E5E5E5" ];then
shadow dark
else
shadow light
fi
fi
}
gradient () {
sd "^window.active.title.bg.color:.*$" "window.active.title.bg.color: ${1}" ${THEMERC}
sd "^window.active.title.bg.colorTo:.*$" "window.active.title.bg.colorTo: ${2}" ${THEMERC}
# Border color = active.title.bg.color (gradient start color)
sd "\.active.border.color:.*$" ".active.border.color: $1" ${THEMERC}
#### INACTIVE
icolor=$(pastel darken 0.5 ${1}|pastel format hex)
icolorTo=$(pastel darken 0.5 ${2}|pastel format hex)
sd "^window.inactive.title.bg.color:.*$" "window.inactive.title.bg.color: ${icolor}" ${THEMERC}
sd "^window.inactive.title.bg.colorTo:.*$" "window.inactive.title.bg.colorTo: ${icolorTo}" ${THEMERC}
# Border color = active.title.bg.color (gradient start color)
sd "\.inactive.border.color:.*$" ".inactive.border.color: ${icolor}" ${THEMERC}
# calculate color for title.fg and buttons
TITLE_FG=$(pastel textcolor ${2}|pastel format hex)
if [[ "${TITLE_FG}" == *"ffffff"* ]];then
TITLE_FG="#E5E5E5"
else
TITLE_FG="#222222"
fi
sd "\.active.label.text.color:.*$" ".active.label.text.color: ${TITLE_FG}" ${THEMERC}
# Button colors
activebuttonscolors "${TITLE_FG}"
# Shadow
read SHADOW <<< "$(grep .active.label.text.font: ${THEMERC} | cut -d':' -f2| cut -d'=' -f2)"
if [ "$SHADOW" == "y" ];then
if [ "$TITLE_FG" == "#E5E5E5" ];then
shadow dark
else
shadow light
fi
fi
}
gradient_reverse () {
:
}
activehandle () {
case "$1" in
no) #no
@ -131,7 +330,20 @@ activehandle () {
sd "\.active.handle.bg.colorTo:.*$" ".active.handle.bg.colorTo: ${NBGTO}" ${THEMERC}
;;
esac
#openbox --reconfigure
}
clractivebg_only () {
sd "^window.active.title.bg.color:.*$" "window.active.title.bg.color: ${1}" ${THEMERC}
# calculate color for title.fg and buttons
TITLE_FG=$(pastel textcolor ${1}|pastel format hex)
if [[ "${TITLE_FG}" == *"ffffff"* ]];then
TITLE_FG="#E5E5E5"
else
TITLE_FG="#222222"
fi
sd "\.active.label.text.color:.*$" ".active.label.text.color: ${TITLE_FG}" ${THEMERC}
# Button colors
activebuttonscolors "${TITLE_FG}"
}
clractivebg () {
colorTo=$(pastel darken 0.1 "${1}"|pastel format hex)
@ -148,60 +360,476 @@ clractivebg () {
sd "\.active.border.color:.*$" ".active.border.color: ${1}" ${THEMERC}
sd "^window.active.title.bg.colorTo:.*$" "window.active.title.bg.colorTo: ${colorTo}" ${THEMERC}
openbox --reconfigure
#menu (Openbox menu - not really used in Mabox)
sd "menu.title.bg.color:.*$" "menu.title.bg.color: ${1}" ${THEMERC}
sd "menu.title.bg.colorTo:.*$" "menu.title.bg.colorTo: ${colorTo}" ${THEMERC}
sd "menu.items.active.bg.color:.*$" "menu.items.active.bg.color: ${1}" ${THEMERC}
sd "menu.items.active.bg.colorTo:.*$" "menu.items.active.bg.colorTo: ${colorTo}" ${THEMERC}
# calculate color for title.fg and buttons
TITLE_FG=$(pastel textcolor ${colorTo}|pastel format hex)
if [[ "${TITLE_FG}" == *"ffffff"* ]];then
TITLE_FG="#E5E5E5"
else
TITLE_FG="#222222"
fi
sd "\.active.label.text.color:.*$" ".active.label.text.color: ${TITLE_FG}" ${THEMERC}
# Button colors
activebuttonscolors "${TITLE_FG}"
}
clrnormalbg_only () {
sd "^window.inactive.title.bg.color:.*$" "window.inactive.title.bg.color: ${1}" ${THEMERC}
}
clrnormalbg () {
colorTo=$(pastel darken 0.1 "${1}"|pastel format hex)
#normalhandle?
read IBG <<< "$(grep .inactive.title.bg.color: ${THEMERC} | cut -d':' -f2)"
read IHBG <<< "$(grep .inactive.handle.bg.color: ${THEMERC} | cut -d':' -f2)"
if [ "$IBG" == "$IHBG" ];then
sd "\.inactive.handle.bg.color:.*$" ".inactive.handle.bg.color: ${1}" ${THEMERC}
sd "\.inactive.handle.bg.colorTo:.*$" ".inactive.handle.bg.colorTo: ${colorTo}" ${THEMERC}
fi
###sd "\.inactive.handle.bg.color:.*$" ".inactive.handle.bg.color: ${1}" ${THEMERC}
###sd "\.inactive.handle.bg.colorTo:.*$" ".inactive.handle.bg.colorTo: ${colorTo}" ${THEMERC}
sd "\.handle.bg.color:.*$" ".handle.bg.color: ${1}" ${THEMERC}
sd "\.handle.bg.colorTo:.*$" ".handle.bg.colorTo: ${colorTo}" ${THEMERC}
sd "\.inactive.grip.bg.color:.*$" ".inactive.grip.bg.color: ${1}" ${THEMERC}
sd "\.inactive.grip.bg.colorTo:.*$" ".inactive.grip.bg.colorTo: ${colorTo}" ${THEMERC}
sd "^window.inactive.title.bg.color:.*$" "window.inactive.title.bg.color: ${1}" ${THEMERC}
sd "\.inactive.border.color:.*$" ".inactive.border.color: ${1}" ${THEMERC}
sd "^window.inactive.title.bg.colorTo:.*$" "window.inactive.title.bg.colorTo: ${colorTo}" ${THEMERC}
openbox --reconfigure
sd "\.inactive.border.color:.*$" ".inactive.border.color: ${1}" ${THEMERC}
}
clractivebgto () {
sd "^window.active.title.bg.colorTo:.*$" "window.active.title.bg.colorTo: ${1}" ${THEMERC}
#activehandle?
read ABG <<< "$(grep .active.title.bg.color: ${THEMERC} | cut -d':' -f2)"
read AHBG <<< "$(grep .active.handle.bg.color: ${THEMERC} | cut -d':' -f2)"
if [ "$ABG" == "$AHBG" ];then
###read ABG <<< "$(grep .active.title.bg.color: ${THEMERC} | cut -d':' -f2)"
###read AHBG <<< "$(grep .active.handle.bg.color: ${THEMERC} | cut -d':' -f2)"
###if [ "$ABG" == "$AHBG" ];then
sd "\.active.handle.bg.colorTo:.*$" ".active.handle.bg.colorTo: ${1}" ${THEMERC}
fi
###fi
sd "\.active.grip.bg.colorTo:.*$" ".active.grip.bg.colorTo: ${1}" ${THEMERC}
openbox --reconfigure
}
clrnormalbgto () {
sd "^window.inactive.title.bg.colorTo:.*$" "window.inactive.title.bg.colorTo: ${1}" ${THEMERC}
#normalhandle?
read IBG <<< "$(grep .inactive.title.bg.color: ${THEMERC} | cut -d':' -f2)"
read IHBG <<< "$(grep .inactive.handle.bg.color: ${THEMERC} | cut -d':' -f2)"
if [ "$IBG" == "$IHBG" ];then
sd "\.inactive.handle.bg.colorTo:.*$" ".inactive.handle.bg.colorTo: ${1}" ${THEMERC}
fi
sd "\.inactive.grip.bg.colorTo:.*$" ".inactive.grip.bg.colorTo: ${1}" ${THEMERC}
openbox --reconfigure
}
activetextcolor () {
sd "\.active.label.text.color:.*$" ".active.label.text.color: ${1}" ${THEMERC}
openbox --reconfigure
activebuttonscolors ${1}
}
inactivetextcolor () {
sd "\.inactive.label.text.color:.*$" ".inactive.label.text.color: ${1}" ${THEMERC}
openbox --reconfigure
}
buttons () {
rm $THEMEDIR/*.xbm
cp -a /usr/share/mabox-colorizer/themes/obbuttons/${1}/*.xbm $THEMEDIR/
#save buttons name to file
echo "${1}" > $THEMEDIR/.buttons
#if buttons big check font size also
case "$1" in
big-12)
nspace="http://openbox.org/3.4/rc"
cfg="$HOME/.config/openbox/rc.xml"
SIZE=$(xmlstarlet sel -N a="$nspace" -t -v '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:size' "$cfg")
if [ "$SIZE" -lt "12" ]; then
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:size' -v "12" "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:size' -v "12" "$cfg"
fi
;;
big-14)
nspace="http://openbox.org/3.4/rc"
cfg="$HOME/.config/openbox/rc.xml"
SIZE=$(xmlstarlet sel -N a="$nspace" -t -v '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:size' "$cfg")
if [ "$SIZE" -lt "14" ]; then
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:size' -v "14" "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:size' -v "14" "$cfg"
fi
;;
*) : ;;
esac
}
ndslimc() {
xmlstarlet ed -L -N o="http://openbox.org/3.4/rc" -u '/o:openbox_config/o:theme/o:titleLayout' -v "$1" "$HOME/.config/openbox/rc.xml"
}
activebuttonscolors () {
sd "^window.active.button.*.unpressed.image.color:.*$" "window.active.button.*.unpressed.image.color: ${1}" ${THEMERC}
# Calculate colors for other button states (mix of ${1} and clractivebg
#read ABG <<< "$(grep .active.title.bg.color: ${THEMERC} | cut -d':' -f2)"
#hover=$(pastel mix -f 0.2 "${1}" "${ABG}"|pastel format hex)
#pressed=$()
#disabled=$()
if [[ "${1}" == *"E5E5E5"* ]];then
hover="#FFFFFF"
else
hover="#000000"
fi
#notify-send.sh "${1}" "${hover}"
sd "^window.active.button.*.hover.image.color:.*$" "window.active.button.*.hover.image.color: ${hover}" ${THEMERC}
}
fontfamily () {
nspace="http://openbox.org/3.4/rc"
cfg="$HOME/.config/openbox/rc.xml"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:name' -v "${1}" "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:name' -v "${1}" "$cfg"
}
fontsize () {
nspace="http://openbox.org/3.4/rc"
cfg="$HOME/.config/openbox/rc.xml"
case "$1" in
inc|increase)
SIZE=$(xmlstarlet sel -N a="$nspace" -t -v '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:size' "$cfg")
if [ "$SIZE" -lt "21" ];then
((SIZE=SIZE+1))
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:size' -v "$SIZE" "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:size' -v "$SIZE" "$cfg"
fi
;;
dec|decrease)
SIZE=$(xmlstarlet sel -N a="$nspace" -t -v '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:size' "$cfg")
if [ "$SIZE" -gt "7" ];then
((SIZE=SIZE-1))
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:size' -v "$SIZE" "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:size' -v "$SIZE" "$cfg"
fi
;;
*)
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:size' -v "$1" "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:size' -v "$1" "$cfg"
;;
esac
}
fontweight () {
nspace="http://openbox.org/3.4/rc"
cfg="$HOME/.config/openbox/rc.xml"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:weight' -v "${1}" "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:weight' -v "${1}" "$cfg"
}
fontweight_inactive () {
nspace="http://openbox.org/3.4/rc"
cfg="$HOME/.config/openbox/rc.xml"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:weight' -v "${1}" "$cfg"
}
fontweighttoggle (){
nspace="http://openbox.org/3.4/rc"
cfg="$HOME/.config/openbox/rc.xml"
WEIGHT=$(xmlstarlet sel -N a="$nspace" -t -v '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:weight' "$cfg")
if [ "$WEIGHT" = "Normal" ];then
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:weight' -v "Bold" "$cfg"
else
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:weight' -v "Normal" "$cfg"
fi
}
fontslant (){
nspace="http://openbox.org/3.4/rc"
cfg="$HOME/.config/openbox/rc.xml"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:slant' -v "${1}" "$cfg"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:slant' -v "${1}" "$cfg"
}
fontslant_inactive (){
nspace="http://openbox.org/3.4/rc"
cfg="$HOME/.config/openbox/rc.xml"
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="InactiveWindow"]/a:slant' -v "${1}" "$cfg"
}
fontslanttoggle (){
nspace="http://openbox.org/3.4/rc"
cfg="$HOME/.config/openbox/rc.xml"
SLANT=$(xmlstarlet sel -N a="$nspace" -t -v '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:slant' "$cfg")
if [ "$SLANT" = "Normal" ];then
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:slant' -v "Italic" "$cfg"
else
xmlstarlet ed -L -N a="$nspace" -u '/a:openbox_config/a:theme/a:font[@place="ActiveWindow"]/a:slant' -v "Normal" "$cfg"
fi
}
randomizer () {
# TODO: - maybe put all options to cnf file and let users customize options???
### ensure we use MBColors at the moment
theme MBcolors
### SHADOW (here, because we must know if is set later when title font color is calculated)
### Maybe better is not to change shadow? for now
#SHADOWS=(no dark light)
#rand=$((RANDOM%3))
#SHADOW="${SHADOWS[$rand]}"
#shadow "${SHADOW}"
shadow no
### RANDOM GRADIENT COLORS
GRADIENT_FILE="$HOME"/.config/colorizer/gradients_all.inc
if [ ! -f $GRADIENT_FILE ]; then
cp -a /usr/share/mabox-colorizer/gradients_all.inc $GRADIENT_FILE
fi
read CLR CLRTO GRAD_NAME <<< "$(shuf -n 1 $GRADIENT_FILE)"
#obtctl random_gradient
activegradient "$CLR" "$CLRTO"
### rand gradient type
TYPES=(solid vertical horizontal mirrorhorizontal diagonal mirrorhorizontal)
rand=$((RANDOM%6))
G_TYPE="${TYPES[$rand]}"
gradient_type "${G_TYPE}"
#rand
### Random border
BORDERS=(0 0 1 2 4 6)
rand=$((RANDOM%5))
BORDER="${BORDERS[$rand]}"
borderWidth "${BORDER}"
HANDLES=(0 0 2 4)
rand=$((RANDOM%4))
HANDLE="${HANDLES[$rand]}"
handlewidth "${HANDLE}"
### Random padding
PADDINGS=(2 4 8 12)
rand=$((RANDOM%4))
PADDING="${PADDINGS[$rand]}"
paddingHeight "${PADDING}"
### TITLEBAR STYLE
STYLES=(flat raised raised sunken)
rand=$((RANDOM%4))
STYLE="${STYLES[$rand]}"
raised "${STYLE}"
### TEXT ALIGN
ALIGNS=(left center right)
rand=$((RANDOM%3))
ALIGN="${ALIGNS[$rand]}"
textjustify "${ALIGN}"
### FONT FAMILY
FAMILIES=(Ubuntu "Noto Sans" "Roboto Condensed" "GE Inspira" "JetBrains Mono")
rand=$((RANDOM%5))
FAMILY="${FAMILIES[$rand]}"
fontfamily "${FAMILY}"
### FONT WEIGHT
WEIGHTS=(Bold Normal)
rand=$((RANDOM%2))
WEIGHT="${WEIGHTS[$rand]}"
fontweight "${WEIGHT}"
### FONT SLANT
SLANTS=(Italic Normal)
rand=$((RANDOM%2))
SLANT="${SLANTS[$rand]}"
fontslant "${SLANT}"
### FONT SIZE
FONTSIZES=(8 10 11 12 14 16)
rand=$((RANDOM%6))
FONTSIZE="${FONTSIZES[$rand]}"
fontsize "${FONTSIZE}"
### Buttons
BUTTONS=(tiny normal bold dots big-12 big-14)
rand=$((RANDOM%6))
BUTTON="${BUTTONS[$rand]}"
buttons "${BUTTON}"
### Buttons layout
LAYOUTS=(NDSLIMC NDSLIMC NLIMC LIMC)
rand=$((RANDOM%4))
LAYOUT="${LAYOUTS[$rand]}"
ndslimc "${LAYOUT}"
#MSG="
#Openbox Window Decoration settings
#Gradient
#name: <b>${GRAD_NAME}</b>
#colors: <b>${CLR}</b> to <b>${CLRTO}</b>
#type: <b>$G_TYPE</b>
#Border: <b>${BORDER}</b>
#Padding: <b>${PADDING}</b>
#Titlebar style: <b>${STYLE}</b>
#Buttons: <b>${BUTTON}</b>
#Title align: <b>${ALIGN}</b>
#Font: <b>${FAMILY} ${WEIGHT} ${SLANT} ${FONTSIZE}</b>
#"
# notify-send.sh -R /tmp/randomizer_notify -t 10000 -i mbcc "Mabox Colorizer" "${MSG}" \
# -o "Regenerate:randomizer ob" -o "Customize:colorizer-ob -s"
}
tweak() {
case "$1" in
large)
fontsize 14
paddingHeight 8
buttons big-14
borderWidth 6
handlewidth 6
;;
big)
fontsize 12
paddingHeight 6
buttons big-12
borderWidth 4
handlewidth 4
;;
normal)
fontsize 11
paddingHeight 4
buttons tiny
borderWidth 1
handlewidth 3
;;
small)
fontsize 10
paddingHeight 2
buttons dots
borderWidth 0
handlewidth 2
;;
tiny)
fontsize 9
paddingHeight 1
buttons normal
borderWidth 0
handlewidth 0
;;
*):;;
esac
}
savetheme () {
case "$LANG" in
pl*)SAVE_AS="Nowy motyw Openbox"
DESC="Zapisz obecne ustawionia Openbox jako nowy motyw..."
LABEL="Nazwa:"
NAME="nazwa";;
*) SAVE_AS="New Openbox theme"
DESC="Save current Openbox window decoration setup as theme..."
LABEL="Name:"
NAME="theme-name";;
esac
# ask for scheme name
schemename=$(yad --center --width=300 --borders=20 --window-icon=mbcc --title "$SAVE_AS" --text="$DESC" --entry --entry-label="$LABEL" --entry-text="$NAME") || exit 1
echo "${1}${schemename}" >> "$HOME/.config/colorizer/openbox/userthemes.csv"
}
applyscheme () {
theme MBcolors
case "$1" in
sys) SCHEMEFILE="/usr/share/mabox-colorizer/colorschemes/ob.csv";;
usr) SCHEMEFILE="$HOME/.config/colorizer/openbox/userthemes.csv";;
esac
while IFS="|" read -r abg abgto afg aline nbg nbgto nfg nline grad txtjust pheight pwidth handle bord bevel button fsize fname ndslim weight slant scheme_name
do
clractivebg "${abg}"
clractivebgto "${abgto}"
activetextcolor "${afg}"
activeborderColor "${aline}"
clrnormalbg "${nbg}"
clrnormalbgto "${nbgto}"
inactivetextcolor "${nfg}"
inactiveborderColor "${nline}"
gradient_type "${grad}"
done < <(awk 'NR == n' n=$2 "$SCHEMEFILE")
}
applytheme() {
case "$1" in
sys) SCHEMEFILE="/usr/share/mabox-colorizer/colorschemes/ob.csv";;
usr) SCHEMEFILE="$HOME/.config/colorizer/openbox/userthemes.csv";;
esac
applyscheme "$1" "$2"
while IFS="|" read -r abg abgto afg aline nbg nbgto nfg nline grad txtjust pheight pwidth handle bord bevel button fsize fname ndslim weight slant scheme_name
do
textjustify "${txtjust}"
paddingHeight "${pheight}"
paddingWidth "${pwidth}"
handlewidth "${handle}"
borderWidth "${bord}"
raised "${bevel}"
buttons "${button}"
fontsize "${fsize}"
fontfamily "${fname}"
ndslimc "${ndslim}"
fontweight "${weight}"
fontslant "${slant}"
done < <(awk 'NR == n' n=$2 "$SCHEMEFILE")
}
delscheme() {
sed -i ${1}d "$HOME/.config/colorizer/openbox/userthemes.csv"
}
mono() {
lighten=(0.92 0.8 0.65 0.45 0.28)
darken=(0.9 0.74 0.54 0.38 0.18)
if [ "${1}" == pick ];then
color=$(gpick -pso 2>/dev/null)
else
color="${1}"
fi
if [ "${#color}" == 7 ];then
for i in "${lighten[@]}"
do
pal+=("$(pastel mix -f $i "#ffffff" "$color"|pastel format hex)")
done
pal+=("$color")
for i in "${darken[@]}"
do
pal+=("$(pastel mix -f $i "$color" "#000000"|pastel format hex)")
done
else
exit 0
fi
#colorize OB
if [ "$2" == "dark" ];then
clractivebg "${pal[4]}"
clractivebgto "${pal[6]}"
activeborderColor "${pal[2]}"
activetextcolor "${pal[1]}"
clrnormalbg "${pal[9]}"
clrnormalbgto "${pal[10]}"
inactiveborderColor "${pal[8]}"
inactivetextcolor "${pal[4]}"
else #light
clractivebg "${pal[2]}"
clractivebgto "${pal[4]}"
activeborderColor "${pal[0]}"
activetextcolor "${pal[9]}"
clrnormalbg "${pal[9]}"
clrnormalbgto "${pal[10]}"
inactiveborderColor "${pal[7]}"
inactivetextcolor "${pal[5]}"
fi
openbox --reconfigure
colorizer-ob -s 2>/dev/null
}
case "$1" in
theme) theme "$2";;
reset) reset;;
resetonlycolors) resetonlycolors;;
resetMBcolors) resetMBcolors;;
borderWidth) borderWidth "$2";;
activeborderColor) activeborderColor "$2";;
inactiveborderColor) inactiveborderColor "$2";;
@ -211,15 +839,38 @@ case "$1" in
shadow) shadow "$2";;
handlewidth) handlewidth "$2";;
raised) raised "$2";;
gradient) gradient "$2";;
activehandle) activehandle "$2"
openbox --reconfigure
;;
gradient_type) gradient_type "$2";;
random_gradient) random_gradient;;
activegradient) activegradient "$2" "$3";;
gradient_reverse) gradient_reverse;;
activehandle) activehandle "$2";;
clractivebg_only) clractivebg_only "$2";; #ADVANCED - do not calculate colorTo
clractivebg) clractivebg "$2";;
clractivebgto) clractivebgto "$2";;
clrnormalbg_only) clrnormalbg_only "$2";;
clrnormalbg) clrnormalbg "$2";;
clrnormalbgto) clrnormalbgto "$2";;
activetextcolor) activetextcolor "$2";;
inactivetextcolor) inactivetextcolor "$2";;
buttons) buttons "$2";;
ndslimc) ndslimc "$2";;
activebuttonscolors) activebuttonscolors "$2";;
fontfamily) fontfamily "$2";;
fontweight) fontweight "$2";;
fontweight_inactive) fontweight_inactive "$2";;
fontslant) fontslant "$2";;
fontslant_inactive) fontslant_inactive "$2";;
fontsize) fontsize "$2";;
fontweighttoggle) fontweighttoggle;;
fontslanttoggle) fontslanttoggle;;
randomizer) randomizer;;
tweak) tweak "$2";;
mono) mono "$2" "$3";;
savetheme) savetheme "$2";;
applyscheme) applyscheme "$2" "$3";;
applytheme) applytheme "$2" "$3";;
delscheme) delscheme "$2";;
*) : ;;
esac
openbox --reconfigure

23
bin/pcmanwp 100755
View File

@ -0,0 +1,23 @@
#!/bin/bash
# pcmanfm based wallpaper chooser
# simple command for now
CNF_FILE="$HOME/.config/mabox/wallp_dirs.conf"
if [ ! -f $CNF_FILE ]; then
cat <<EOF > ${CNF_FILE}
# User wallpapers directories - one per line
# Used by "Choose wallpaper" PCmanFM wrapper
# Set wallpapers using context (right click) menu in file manager
~/wallpapers/
EOF
fi
#System wallpaper dirs
syswpdirs+=("/usr/share/backgrounds")
if [ -d "/usr/share/backgrounds/tiled" ]; then
syswpdirs+=("/usr/share/backgrounds/tiled")
fi
readarray -t wpdirs < <(grep "^[^#]" "${CNF_FILE}")
pcmanfm -n $(echo ${syswpdirs[@]} ${wpdirs[@]})

161
bin/prtctl 100755
View File

@ -0,0 +1,161 @@
#!/bin/bash
# prtctl - pyradio theme helper
# TODO start pyradio if not running
THEMERC=~/.config/pyradio/themes/mbcolors.pyradio-theme
CONF_DIR="$HOME/.config/pyradio/"
CONF_FILE="$CONF_DIR/config"
stations() {
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}
}
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() {
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() {
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}
}
pyradio_url() {
sd "^PyRadio URL .*$" "PyRadio URL $1" ${THEMERC}
}
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
# Theme Transparency
# Values are:
# 0: No transparency (default)
# 1: Theme is transparent
# 2: Obey config setting
transparency 0
EOF
}
export_theme () {
DATE=$(date +'%Y%m%d-%H-%M-%S')
cp ${THEMERC} "$HOME/.config/pyradio/themes/exported_${DATE}.pyradio-theme"
notify-send.sh -i radio "PyRadio theme exported!" "\nNew PyRadio theme created as:\n<b>exported_${DATE}.pyradio-theme</b>\n" -o " Open in editor:xdg-open ${CONF_DIR}/themes/exported_${DATE}.pyradio-theme" -o " Open Themes dir:xdg-open ${CONF_DIR}/themes"
}
#run
if [ ! -f $THEMERC ]; then
resettheme
fi
case "$1" in
stations) stations "$2" "$3";;
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";;
resettheme) resettheme;;
exp) export_theme;;
*);;
esac

23
bin/quote.sh 100755
View File

@ -0,0 +1,23 @@
#!/bin/bash
DIR="$HOME/.config/quoter"
mkdir -p "$DIR"
CNF_FILE="$DIR/quoter.cfg"
if [ ! -f $CNF_FILE ]; then
cat <<EOF > ${CNF_FILE}
quote_fontsize=12
author_fontsize=10
EOF
fi
source <(grep = $CNF_FILE)
qfsize=${quote_fontsize:-12}
afsize=${author_fontsize:-10}
export Q=$(curl -s "http://api.forismatic.com/api/1.0/?method=getQuote&format=json&lang=en" | sed 's|\\||g' )
QUOTE=$(echo $Q | jq .quoteText)
AUTOR=$(echo $Q | jq .quoteAuthor | tr -d '"')
echo "${QUOTE}|${AUTOR}" >> "${DIR}"/forismatic.txt
printf "\${font Droid Sans:size=$qfsize}\${color}"
echo ${QUOTE} | fmt -80
printf "\${font Droid Sans:size=$afsize}\${alignr}\${color0}"
echo "${AUTOR}"

109
bin/randomizer 100755
View File

@ -0,0 +1,109 @@
#!/bin/bash
# randomizer
ob () {
obtctl randomizer
}
menu () {
mb-setvar jgmenu_theme=$(basename -s .colorrc $(ls ~/.config/mabox/jgobthemes/*.colorrc | shuf -n 1))
case "$1" in
show) colorizer-menus -s;;
*):;;
esac
}
conky () {
LINES=$(tail -n +2 /usr/share/mabox-colorizer/colorschemes/conky.csv|wc -l)
N=$(( ( RANDOM % $LINES ) + 2 ))
#notify-send.sh "$LINES" "$N"
conkyctl applyscheme_all sys $N
}
wp () {
: # Może niepotrzebne tu
}
all () {
ob
conky
[[ "$1" == "show" ]] && menu show || menu
}
resetall () {
conkyctl resetcolorsall
obtctl resetMBcolors
[[ "$1" == "show" ]] && jgctl resetMBcolors show || jgctl resetMBcolors
}
pipemenu () {
me=""
[[ "$1" == "l" ]] && me="mb-jgtools places"
[[ "$1" == "c" ]] && me="colorizer -s"
#notify-send.sh "Me $me"
case "$LANG" in
pl*)
SETRANDOM="Ustaw losowy motyw dla..."
MENUS="Menu i Panele boczne"
OBWD="Dekoracja okien Openbox"
ALL="Wszystko"
ALLRESET="Resetuj wszystko"
RESET_TO_DEFAULT="Resetuj do ustawień domyślnych..."
HELP="Okno Główne i Pomoc"
;;
es*)
SETRANDOM="Set random colorscheme for..."
MENUS="Menus and Panels"
OBWD="OpenBox Window Decoration"
ALL="All above"
ALLRESET="Reset All above"
RESET_TO_DEFAULT="Reset to default settings..."
HELP="Main Window and Help"
;;
*)
SETRANDOM="Set random colorscheme for..."
MENUS="Menus and Panels"
OBWD="OpenBox Window Decoration"
ALL="All above"
ALLRESET="Reset All above"
RESET_TO_DEFAULT="Reset to default settings..."
HELP="Main Window and Help"
;;
esac
out+=("^sep($SETRANDOM)")
out+=("$MENUS,randomizer menu;$me")
out+=("$OBWD,randomizer ob;$me")
out+=("Conky,randomizer conky;$me")
out+=("^sep()")
out+=(" $ALL,randomizer all;$me")
out+=("^sep($RESET_TO_DEFAULT)")
out+=("$MENUS,jgctl resetMBcolors;$me")
out+=("$OBWD,obtctl resetMBcolors;$me")
out+=("Conky,conkyctl resetcolorsall;$me")
out+=("^sep()")
out+=("<big>󰁯</big> $ALLRESET,randomizer resetall;$me")
if [[ "$1" != "c" ]];then
out+=("^sep(Colorizer)")
out+=(" Colorizer - $HELP,ycolorizer")
out+=("Colorizer - Rootmenu,colorizer -s")
out+=("^sep(Colorizer modules)")
out+=("OpenBox,colorizer-ob -s")
out+=("Menus,colorizer-menus -s")
out+=("Conky,colorizer-conky -s")
out+=("^sep()")
out+=("Cava,colorizer-cava -s")
out+=("PyRadio,colorizer-pyradio -s")
fi
printf '%s\n' "${out[@]}"
}
case "$1" in
ob) ob;;
menu) menu "${2}";;
conky) conky;;
wp) wp;;
all) all "$2";;
resetall)resetall "$2";;
l|c|*) pipemenu "$1";;
esac

415
bin/w2theme 100755
View File

@ -0,0 +1,415 @@
#!/bin/bash
#
# colorizer - set of tools for Mabox (auto)theming
# Copyright (C) 2022-2023 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/>.
# w2theme - generate themes from wallpaper colors
WALLPALDIR="$HOME/.cache/colorizer/palettes"
mkdir -p "$WALLPALDIR"
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME}
((n++))
NAME=${NAME:${n}}
fi
if [ ! -f "$WALLPALDIR/$NAME.clr" ]; then
convert ${WALLPATH} -resize 25% -colors 16 -unique-colors txt:- |grep -v '^#'| awk '{print substr($3,1,7)}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$NAME.clr"
fi
mapfile -t w < "$WALLPALDIR/$NAME.clr"
if [[ "${#w[@]}" -lt 8 ]]; then
w+=("#2e3440" "#4c566a" "#5e81ac" "#bf616b" "#b48ead" "#a3be8c" "#ebcb8b" "#d8dee9" "#eceff4")
fi
accents=("#e93d57" "#c7162b" "#e9633a" "#e95620" "#f4a300" "#e8cc2d" "#3cd425" "#0e8420" "#00d3b7" "#18b0b0" "#3dade9" "#686b6f" "#3584e4" "#916ee4" "#b875dc" "#77216e" "#c748ba" "#e93a9a")
menu_theme () {
jgctl theme MBcolors
case "$1" in
dark) #dark bg
jgctl color_menu_bg "${w[2]}"
jgctl color_menu_bg_to "${w[1]}"
jgctl color_menu_border "${w[3]}"
jgctl color_norm_fg "${w[-2]}"
jgctl color_title_bg "${w[1]}"
jgctl color_title_fg "${w[-3]}"
jgctl color_title_border "${w[0]}"
jgctl color_sel_bg "${w[4]}"
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_menu_border "${w[-3]}"
jgctl color_norm_fg "${w[1]}"
jgctl color_title_bg "${w[-3]}"
jgctl color_title_fg "${w[1]}"
jgctl color_title_border "${w[-4]}"
jgctl color_sel_bg "${w[-5]}"
jgctl color_sel_fg "${w[0]}"
jgctl color_sel_border "${w[-4]}"
jgctl color_sep_fg "${w[-5]}"
#sleep 1
;;
esac
case "$2" in
show)
colorizer-menus -s
;;
*):;;
esac
}
conky_colors() {
source ~/.config/colorizer/colorizer.conf
case "$1" in
dark) #dark bg
conkyctl win_bgcolor_all "${w[0]}"
conkyctl default_color_all "${w[-1]}"
conkyctl color0_all "${w[-4]}"
conkyctl color1_all "${w[-5]}"
#conkyctl color2_all "${w[-5]}"
;;
*) #light bg
conkyctl win_bgcolor_all "${w[-1]}"
conkyctl default_color_all "${w[0]}"
conkyctl color0_all "${w[4]}"
conkyctl color1_all "${w[5]}"
#conkyctl color2_all "${w[6]}"
;;
esac
#bars/graphs color
#random
conkyctl color2_all "${accents[ $RANDOM % ${#accents[@]} ]}"
}
conky_colorsone () {
source ~/.config/colorizer/colorizer.conf
case "$1" in
dark) #dark bg
conkyctl win_bgcolor "${w[0]}" "${2}"
conkyctl default_color "${w[-1]}" "${2}"
conkyctl color0 "${w[-4]}" "${2}"
conkyctl color1 "${w[-5]}" "${2}"
;;
*) #light bg
conkyctl win_bgcolor "${w[-1]}" "${2}"
conkyctl default_color "${w[0]}" "${2}"
conkyctl color0 "${w[4]}" "${2}"
conkyctl color1 "${w[5]}" "${2}"
;;
esac
conkyctl color2_all "${accents[ $RANDOM % ${#accents[@]} ]}" "${2}"
}
pyradio_theme() {
case "$1" in
dark) #dark bg
prtctl stations "${w[-3]}" "${w[0]}"
prtctl active_station "${w[-1]}"
prtctl status_bar "${w[0]}" "${w[-3]}"
prtctl normal_cursor "${w[1]}" "${w[-4]}"
prtctl active_cursor "${w[2]}" "${w[-3]}"
prtctl edit_cursor "${w[2]}" "${w[-3]}"
prtctl extra_func "${w[6]}"
prtctl pyradio_url "${w[2]}"
prtctl messages_border "${w[2]}"
;;
*) # light bg
prtctl stations "${w[4]}" "${w[-1]}"
prtctl active_station "${w[0]}"
prtctl status_bar "${w[0]}" "${w[-3]}"
prtctl normal_cursor "${w[4]}" "${w[-3]}"
prtctl active_cursor "${w[2]}" "${w[-3]}"
prtctl edit_cursor "${w[2]}" "${w[-3]}"
prtctl extra_func "${w[6]}"
prtctl pyradio_url "${w[2]}"
prtctl messages_border "${w[4]}"
;;
esac
}
cava () {
case "$1" in
light) #light bottom
cavactl gradientcolors "${w[-3]}" "${w[3]}"
cavactl foregroundcolor "${w[-3]}"
cavactl reload_colors
;;
*) #dark bottom
cavactl gradientcolors "${w[3]}" "${w[-3]}"
cavactl foregroundcolor "${w[3]}"
cavactl reload_colors
;;
esac
}
accent () {
#obtctl clractivebg ${1}
#colorTo=$(pastel darken 0.2 "${1}"|pastel format hex)
#obtctl clractivebgto ${colorTo}
# JGMENU based menus, sidepanels and tools
#jgctl color_title_bg ${1}
#TITLE_FG=$(pastel textcolor ${colorTo}|pastel format hex)
#TITLE_FG=$(pastel textcolor ${1}|pastel format hex)
#notify-send.sh "title_fg $TITLE_FG" "${w[1]} ${w[-1]}"
#if [[ "${TITLE_FG}" == *"ffffff"* ]];then
#FG=${w[-2]}
#BBG=${w[1]}
#else
#FG=${w[2]}
#BBG=${w[1]}
#fi
SEL_FG=$(pastel textcolor ${1}|pastel format hex)
#jgctl color_title_fg ${FG}
#jgctl color_title_border ${BBG}
jgctl color_sel_bg ${1}
jgctl color_sel_bg 100
jgctl color_sel_fg ${SEL_FG}
}
gradient () {
source ~/.config/colorizer/colorizer.conf
#notify-send.sh "zmiennne" "${1} ${2}"
if [ "$gradient_obtheme" = "yes" ]; then
obtctl activegradient "${1}" "${2}"
fi
if [ "$gradient_menu" = "yes" ]; then
jgctl gradient "${1}" "${2}"
fi
if [ "$gradient_conkies" = "yes" ]; then
conkygradient "${1}" "${2}"
fi
}
conkygradient () {
CONKYDIR="$HOME"/.config/conky
for i in "$CONKYDIR"/*_mbcolor*; do
if [[ "$i" = *"sysinfo_graph"* ]];then
conkyctl win_bgcolor ${1} ${i}
FG_COLOR=$(pastel textcolor ${1}|pastel format hex)
if [[ "${FG_COLOR}" == *"ffffff"* ]]; then
conkyctl default_color ${w[-1]} ${i}
conkyctl color0 ${w[-2]} ${i}
conkyctl color1 ${w[-3]} ${i}
else
conkyctl default_color ${w[0]} ${i}
conkyctl color0 ${w[1]} ${i}
conkyctl color1 ${w[2]} ${i}
fi
conkyctl color2 ${2} ${i}
elif [[ "$i" = *"sysinfo_mb"* ]];then
conkyctl win_bgcolor ${2} ${i}
FG_COLOR=$(pastel textcolor ${2}|pastel format hex)
if [[ "${FG_COLOR}" == *"ffffff"* ]]; then
conkyctl default_color ${w[-1]} ${i}
conkyctl color0 ${w[-2]} ${i}
conkyctl color1 ${w[-3]} ${i}
else
conkyctl default_color ${w[0]} ${i}
conkyctl color0 ${w[1]} ${i}
conkyctl color1 ${w[2]} ${i}
fi
conkyctl color2 ${1} ${i}
elif [[ "$i" == *"logo"* ]];then
:
else
ran="$((RANDOM % 8))"
rand=$((ran + 1))
BG=$(pastel mix -f 0.${rand} ${1} ${2}|pastel format hex)
conkyctl win_bgcolor ${BG} ${i}
FG_COLOR=$(pastel textcolor ${BG}|pastel format hex)
if [[ "${FG_COLOR}" == *"ffffff"* ]]; then
conkyctl default_color ${w[-1]} ${i}
conkyctl color0 ${w[-2]} ${i}
conkyctl color1 ${w[-3]} ${i}
else
conkyctl default_color ${w[0]} ${i}
conkyctl color0 ${w[1]} ${i}
conkyctl color1 ${w[2]} ${i}
fi
fi
done
}
obtheme () {
case "$1" in
dark)
obtctl clractivebg ${w[2]}
TITLE_FG=$(pastel textcolor ${w[2]}|pastel format hex)
if [[ "$TITLE_FG" == *"ffffff"* ]];then
obtctl activetextcolor "#E5E5E5"
#obtctl activetextcolor ${w[-1]}
#obtctl activebuttonscolors ${w[-1]}
else
obtctl activetextcolor "#222222"
#obtctl activetextcolor ${w[0]}
#obtctl activebuttonscolors ${w[0]}
fi
obtctl clractivebgto ${w[4]}
obtctl clrnormalbg ${w[0]}
obtctl clrnormalbgto "$(pastel darken 0.1 "${w[0]}"|pastel format hex)"
;;
light)
obtctl clractivebg ${w[-2]}
TITLE_FG=$(pastel textcolor ${w[-2]}|pastel format hex)
if [[ "$TITLE_FG" == *"ffffff"* ]];then
obtctl activetextcolor "#E5E5E5"
#obtctl activetextcolor ${w[-1]}
#obtctl activebuttonscolors ${w[-1]}
else
obtctl activetextcolor "#222222"
#obtctl activetextcolor ${w[0]}
#obtctl activebuttonscolors ${w[0]}
fi
obtctl clractivebgto ${w[-4]}
obtctl clrnormalbg ${w[1]}
obtctl clrnormalbgto "$(pastel darken 0.1 "${w[1]}"|pastel format hex)"
;;
esac
obtctl shadow 0
}
colorize () {
source ~/.config/colorizer/colorizer.conf
# CONKY
case "$wall2themes_conky" in
dark) conky_colors dark;;
light) conky_colors light;;
*) : ;;
esac
# ACCENT_COLOR
case "$wall2themes_accent" in
dark)
obtctl theme MBcolors
accent ${w[1]}
;;
light)
obtctl theme MBcolors
accent ${w[-1]}
;;
*) : ;;
esac
# MENUS
case "$wall2themes_menu" in
dark) menu_theme dark;;
light) menu_theme light;;
*) : ;;
esac
# Openbox (TUTAJ WARUNEK)
case "$wall2themes_ob" in
dark) obtheme dark;;
light) obtheme light;;
*) : ;;
esac
# PYRADIO THEME
case "$wall2themes_pyradio" in
dark) pyradio_theme dark;;
light) pyradio_theme light;;
*) : ;;
esac
}
reverse () {
source ~/.config/colorizer/colorizer.conf
# CONKY
case "$wall2themes_conky" in
dark) conky_colors light
;;
light) conky_colors dark
;;
*) : ;;
esac
# ACCENT_COLOR
case "$wall2themes_accent" in
dark)
obtctl theme MBcolors
accent ${w[-1]}
;;
light)
obtctl theme MBcolors
accent ${w[1]}
;;
*) : ;;
esac
# MENUS
case "$wall2themes_menu" in
dark) menu_theme light;;
light) menu_theme dark;;
*) : ;;
esac
# Openbox (TUTAJ WARUNEK)
case "$wall2themes_ob" in
dark) obtheme light;;
light) obtheme dark;;
*) : ;;
esac
# PYRADIO THEME
case "$wall2themes_pyradio" in
dark) pyradio_theme light;;
light) pyradio_theme dark;;
*) : ;;
esac
}
genthumb () {
#$1 - filename with full path
NAME=${1////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME}
((n++))
NAME=${NAME:${n}}
fi
# GENERATE THUMBNAIL
THUMBDIR="$HOME/.cache/colorizer/thumbs"
mkdir -p ${THUMBDIR}
THUMB="${THUMBDIR}/${NAME}.png"
if [[ ! -f "$THUMB" ]]; then
convert ${1} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
fi
}
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" "$3";;
conky) conky_colors "$2";;
conkyone) conky_colorsone "$2" "$3";;
pyradio) pyradio_theme "$2";;
cava) cava "$2";;
accent) accent "$2";;
gradient) gradient "$2" "$3";;
colorize) colorize;;
reverse) reverse;;
genthumb)genthumb "$2";;
pin) pin;;
*) ;;
esac

10
bin/ycolorizer 100755
View File

@ -0,0 +1,10 @@
#!/bin/bash
# ycolorizer - launch Colorizer main window and Help
LNG=${LANG:0:2}
if [[ -f "/usr/share/mabox-colorizer/help/$LNG.html" ]];then
yhtml /usr/share/mabox-colorizer/help/$LNG.html 'Mabox Colorizer'
else
yhtml /usr/share/mabox-colorizer/help/en.html 'Mabox Colorizer'
fi

9
removecolorizer 100644
View File

@ -0,0 +1,9 @@
#!/bin/bash
rm ~/.config/conky/*mbcolor*
rm ~/.config/conky/images/mabox_3d.png
rm -rf ~/.config/conky/scripts
rm -rf ~/.themes/MBcolors
rm ~/.config/mabox/jgobthemes/MBcolo*

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Colorizer Menu
Comment=Mabox Colorizer
Keywords=
StartupNotify=false
Icon=colorizer
TryExec=colorizer -s
Exec=colorizer -s
Categories=Settings;
#NoDisplay=true

View File

@ -5,8 +5,8 @@ Name=Colorizer
Comment=Mabox Colorizer
Keywords=
StartupNotify=false
Icon=mbxcolors
TryExec=colorizer -s
Exec=colorizer -s
Icon=colorizer
TryExec=ycolorizer
Exec=ycolorizer
Categories=Settings;
#NoDisplay=true

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Choose wallpaper
Name[pl]=Wybierz tapetę
Comment=
Keywords=
StartupNotify=false
Icon=preferences-desktop-wallpaper
Exec=pcmanwp
Categories=Settings;
#NoDisplay=true

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

View File

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="120"
height="120"
viewBox="0 0 120 120"
version="1.1"
id="svg5"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
sodipodi:docname="colorizer.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:document-units="px"
showgrid="true"
showguides="true"
inkscape:guide-bbox="true"
inkscape:zoom="5.7916665"
inkscape:cx="4.5755397"
inkscape:cy="70.359714"
inkscape:window-width="1620"
inkscape:window-height="998"
inkscape:window-x="147"
inkscape:window-y="137"
inkscape:window-maximized="0"
inkscape:current-layer="layer1">
<sodipodi:guide
position="5.6345044,123.303"
orientation="1,0"
id="guide31" />
<sodipodi:guide
position="113.37618,122.07747"
orientation="1,0"
id="guide33" />
<sodipodi:guide
position="-24.647676,60.089955"
orientation="0,-1"
id="guide37" />
<inkscape:grid
type="xygrid"
id="grid1291" />
</sodipodi:namedview>
<defs
id="defs2" />
<g
inkscape:label="Warstwa 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="opacity:0.99;fill:#8e8e8e;stroke:none;stroke-width:4.029;stroke-opacity:1;fill-opacity:1"
id="rect1281"
width="49.365494"
height="50"
x="5.6345043"
y="5"
ry="0" />
<rect
style="opacity:0.99;fill:#83d554;stroke:none;stroke-width:4.029;stroke-opacity:1;fill-opacity:1"
id="rect1393"
width="49.365494"
height="50"
x="64.010681"
y="5"
ry="0" />
<rect
style="opacity:0.99;fill:#4e8dd7;stroke:none;stroke-width:4.029;stroke-opacity:1;fill-opacity:1"
id="rect1475"
width="49.365002"
height="50"
x="64.010689"
y="65"
ry="0" />
<rect
style="opacity:0.99;fill:#ffcd54;stroke:none;stroke-width:4.029;stroke-opacity:1;fill-opacity:1"
id="rect1477"
width="49.365494"
height="50"
x="5.6345062"
y="65"
ry="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,24 @@
#FFFFFF
#F5F6E8
#EEEEEE
#D0AD9A
#D0E2EE
#FFF79C
#FED883
#FEBE40
#EC7523
#556B2F
#F8C09D
#DD94C1
#EA676C
#432355
#311A12
#1D5C87
#3A4D5C
#143441
#0F2437
#3b3b3b
#252525
#181818
#111111
#000000

View File

@ -0,0 +1,12 @@
WINCLR | CLR | CLR0 | CLR1 | CLR2 |WINTRANS|OUTLINE|SHADES | BORD | STIP |scheme_name
#142c2c|#309552|#accdc7|#61c4bc|#E8CB2D|false|false|false|true|0|Istredd default
#282936|#e9e9f4|#ea51b2|#00f769|#ebff87|false|false|false|false|1|Dracula
#282828|#ebdbb2|#98971a|#d79921|#cc241d|false|false|false|false|1|Gruvbox Dark
#2D2A2E|#AB9DF2|#FCFCFA|#78DCE8|#A9DC76|false|false|false|false|1|Monokai Pro
#2E3440|#B48EAD|#D8DEE9|#88C0D0|#EBCB8B|false|false|false|false|1|Nord
#f8f8f8|#181415|#282828|#0e8420|#e95620|true|false|true|false|1|transparent DarkTxt
#1b1b1b|#bbc8c8|#f2f2f2|#84c747|#ebc13d|true|false|false|false|1|transparent WhiteTxt
#184956|#adbcbc|#ff665c|#84c747|#ebc13d|false|false|false|false|1|Selenized Dark
#ECE3CC|#3A4D53|#AD8900|#CC1729|#428B00|false|false|false|false|1|Selenized Light
#151718|#D6D6D6|#CD3F45|#9FCA56|#E6CD69|false|false|false|false|1|Seti
#1d1f21|#b294bb|#c5c8c6|#81a2be|#b5bd68|false|false|false|false|1|Tomorrow Nigh
1 WINCLR CLR CLR0 CLR1 CLR2 WINTRANS OUTLINE SHADES BORD STIP scheme_name
2 #142c2c #309552 #accdc7 #61c4bc #E8CB2D false false false true 0 Istredd default
3 #282936 #e9e9f4 #ea51b2 #00f769 #ebff87 false false false false 1 Dracula
4 #282828 #ebdbb2 #98971a #d79921 #cc241d false false false false 1 Gruvbox Dark
5 #2D2A2E #AB9DF2 #FCFCFA #78DCE8 #A9DC76 false false false false 1 Monokai Pro
6 #2E3440 #B48EAD #D8DEE9 #88C0D0 #EBCB8B false false false false 1 Nord
7 #f8f8f8 #181415 #282828 #0e8420 #e95620 true false true false 1 transparent DarkTxt
8 #1b1b1b #bbc8c8 #f2f2f2 #84c747 #ebc13d true false false false 1 transparent WhiteTxt
9 #184956 #adbcbc #ff665c #84c747 #ebc13d false false false false 1 Selenized Dark
10 #ECE3CC #3A4D53 #AD8900 #CC1729 #428B00 false false false false 1 Selenized Light
11 #151718 #D6D6D6 #CD3F45 #9FCA56 #E6CD69 false false false false 1 Seti
12 #1d1f21 #b294bb #c5c8c6 #81a2be #b5bd68 false false false false 1 Tomorrow Nigh

View File

@ -0,0 +1,6 @@
MBG | MBGT |MBORDER| TBG | TFG |TBORDER|NORMBG | NFG | SBG | SFG |SBORDER| SEPFG |GRADIENT|scheme_name
#383838|#222222|#eeeeee|#325a52|#d3d4bf|#579c8e|#2b303b|#dadada|#579c8e|#ffffff|#579c8e|#4f4f4f|none|Istredd
#1E1E1E|#262626|#333333|#383838|#BBBBBB|#222222|#1e1e1e|#9b9b9b|#000000|#FFCC66|#FFCC66|#363636|right|Jaskier
#d3d4bf|#d2cda1|#cdc76d|#cdc76d|#0c1d23|#c6b76b|#d3d4bf|#0c1d23|#a29d62|#060b0a|#c6b76b|#a29d62|top_right|Jaskier Light
#38373c|#424247|#2a2a2c|#2a2a2d|#d0d0ce|#151517|#2b303b|#c8c8c4|#59595a|#f8f8f8|#373739|#2a2a2c|bottom_left|GreyBird Dark
#ececea|#e0e0de|#d0d0ce|#d0d0ce|#1e1e20|#c0c0be|#2b303b|#1e1e20|#b0b0af|#151517|#c0c0be|#b0b0af|bottom_left|GreyBird Light
1 MBG MBGT MBORDER TBG TFG TBORDER NORMBG NFG SBG SFG SBORDER SEPFG GRADIENT scheme_name
2 #383838 #222222 #eeeeee #325a52 #d3d4bf #579c8e #2b303b #dadada #579c8e #ffffff #579c8e #4f4f4f none Istredd
3 #1E1E1E #262626 #333333 #383838 #BBBBBB #222222 #1e1e1e #9b9b9b #000000 #FFCC66 #FFCC66 #363636 right Jaskier
4 #d3d4bf #d2cda1 #cdc76d #cdc76d #0c1d23 #c6b76b #d3d4bf #0c1d23 #a29d62 #060b0a #c6b76b #a29d62 top_right Jaskier Light
5 #38373c #424247 #2a2a2c #2a2a2d #d0d0ce #151517 #2b303b #c8c8c4 #59595a #f8f8f8 #373739 #2a2a2c bottom_left GreyBird Dark
6 #ececea #e0e0de #d0d0ce #d0d0ce #1e1e20 #c0c0be #2b303b #1e1e20 #b0b0af #151517 #c0c0be #b0b0af bottom_left GreyBird Light

View File

@ -0,0 +1,7 @@
ABG | ABGTO | AFG | ALINE | NBG | NBGTO | NFG | NLINE | GRAD |TXTJUST|PHEIGHT|PWIDTH|HANDLE|BORD|BEVEL|BUTTONS|FSIZE|FNAME|NDSLIMC|WEIGHT|SLANT|scheme_name
#579c8e|#41756a|#ffffff|#579c8e|#383838|#2a2a2a|#898989|#292929|vertical|center|4|4|4|1|raised|tiny|11|Noto Sans|NDSLIMC|Normal|Normal|Mabox Istredd
#d2cda1|#c6b76b|#222222|#d2cda1|#0c1d23|#000000|#898989|#0c1d23|vertical|center|4|4|2|0|raised|big-12|12|Noto Sans|NLIMC|Normal|Normal|Mabox Jaskier Light
#283433|#1a231a|#E5E5E5|#283433|#0c100f|#080b08|#898989|#0c100f|horizontal|center|4|4|2|0|raised|tiny|11|Noto Sans|NLIMC|Normal|Normal|Mabox Jaskier Dark
#D9D9D9|#B6B6B6|#0F0F0F|#BDBBB9|#D9D9D9|#B4B4B4|#656565|#BFBCBB|vertical|left|2|2|1|0|raised|bold|11|Ubuntu Bold|NLIMC|Bold|Normal|Light Grey
#CE5C00|#9b4600|#E5E5E5|#CE5C00|#D3D7CF|#B4B4B4|#656565|#BFBCBB|mirrorhorizontal|center|2|2|1|0|raised|dots|11|Noto Sans|NLIMC|Normal|Normal|Orange
#F7941E|#004E8F|#E5E5E5|#F7941E|#4a2c09|#00172b|#656565|#4a2c09|mirrorhorizontal|center|4|4|1|0|raised|big-14|13|Ubuntu|NLIMC|Normal|Normal|Sky and Sea
1 ABG ABGTO AFG ALINE NBG NBGTO NFG NLINE GRAD TXTJUST PHEIGHT PWIDTH HANDLE BORD BEVEL BUTTONS FSIZE FNAME NDSLIMC WEIGHT SLANT scheme_name
2 #579c8e #41756a #ffffff #579c8e #383838 #2a2a2a #898989 #292929 vertical center 4 4 4 1 raised tiny 11 Noto Sans NDSLIMC Normal Normal Mabox Istredd
3 #d2cda1 #c6b76b #222222 #d2cda1 #0c1d23 #000000 #898989 #0c1d23 vertical center 4 4 2 0 raised big-12 12 Noto Sans NLIMC Normal Normal Mabox Jaskier Light
4 #283433 #1a231a #E5E5E5 #283433 #0c100f #080b08 #898989 #0c100f horizontal center 4 4 2 0 raised tiny 11 Noto Sans NLIMC Normal Normal Mabox Jaskier Dark
5 #D9D9D9 #B6B6B6 #0F0F0F #BDBBB9 #D9D9D9 #B4B4B4 #656565 #BFBCBB vertical left 2 2 1 0 raised bold 11 Ubuntu Bold NLIMC Bold Normal Light Grey
6 #CE5C00 #9b4600 #E5E5E5 #CE5C00 #D3D7CF #B4B4B4 #656565 #BFBCBB mirrorhorizontal center 2 2 1 0 raised dots 11 Noto Sans NLIMC Normal Normal Orange
7 #F7941E #004E8F #E5E5E5 #F7941E #4a2c09 #00172b #656565 #4a2c09 mirrorhorizontal center 4 4 1 0 raised big-14 13 Ubuntu NLIMC Normal Normal Sky and Sea

View File

@ -1,73 +0,0 @@
conky.config = {
-- WINDOW
own_window = true,
own_window_type = 'desktop',
own_window_transparent = false,
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager,sticky',
own_window_colour = '#142c2c',
own_window_class = 'Conky',
own_window_title = 'Mabox Simple Clock',
alignment = 'middle_middle',
gap_x = 0,
gap_y = 0,
-- FONTS
use_xft = true,
font = 'Cantarell:size=9',
xftalpha = 1,
override_utf8_locale = true,
-- COLORS
draw_shades = false,
default_shade_color = '#000000',
draw_outline = false,
default_outline_color = '#222222',
default_color = '#309552',
color0 = '#accdc7',
color1 = '#61c4bc',
-- BORDERS
draw_borders = true,
-- Stippled borders?
stippled_borders = 2,
-- border margins
border_inner_margin = 8,
border_outer_margin = 8,
-- border width
border_width = 1,
short_units = true,
-- MISC
-- Boolean value, if true, Conky will be forked to background when started.
background = true,
-- Adds spaces around certain objects to stop them from moving other things
-- around, this only helps if you are using a mono font
-- Options: right, left or none
use_spacer = 'none',
-- Subtract (file system) buffers from used memory?
no_buffers = true,
-- Imlib2 image cache size, in bytes. Default 4MiB Increase this value if you use
-- $image lots. Set to 0 to disable the image cache.
imlib_cache_size = 0,
-- Use the Xdbe extension? (eliminates flicker)
-- It is highly recommended to use own window with this one
-- so double buffer won't be so big.
double_buffer = true,
update_interval = 1,
};
conky.text = [[
${voffset -10}${color0}${font Cantarell:pixelsize=120}${time %H:%M}${font}${voffset -84}${offset 10}${color1}${font Cantarell:pixelsize=42}${time %d} ${voffset -15}${color0}${font Cantarell:pixelsize=22}${time %B} ${time %Y}${font}${voffset 24}${font Cantarell:pixelsize=58}${offset -148}${time %A}${font}
${voffset 10}${offset 12}${font Cantarell:pixelsize=14}${color1}HD ${offset 9}$color${fs_free /} / ${fs_size /}${offset 30}${color1}RAM ${offset 9}$color$mem / $memmax${offset 30}${color1}CPU ${offset 9}$color${cpu cpu0}%
]];

View File

@ -1,71 +0,0 @@
conky.config = {
-- WINDOW
own_window = true,
own_window_type = 'desktop',
own_window_transparent = false,
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager,sticky',
own_window_colour = '#142c2c',
own_window_class = 'Conky',
own_window_title = 'Mabox Simple Clock',
alignment = 'bottom_right',
gap_x = 30,
gap_y = 340,
-- FONTS
use_xft = true,
font = 'Cantarell:size=9',
xftalpha = 1,
override_utf8_locale = true,
-- COLORS
draw_shades = false,
default_shade_color = '#000000',
draw_outline = false,
default_outline_color = '#222222',
default_color = '#309552',
color0 = '#accdc7',
color1 = '#61c4bc',
-- BORDERS
draw_borders = true,
-- Stippled borders?
stippled_borders = 2,
-- border margins
border_inner_margin = 8,
border_outer_margin = 8,
-- border width
border_width = 1,
short_units = true,
-- MISC
-- Boolean value, if true, Conky will be forked to background when started.
background = true,
-- Adds spaces around certain objects to stop them from moving other things
-- around, this only helps if you are using a mono font
-- Options: right, left or none
use_spacer = 'none',
-- Subtract (file system) buffers from used memory?
no_buffers = true,
-- Imlib2 image cache size, in bytes. Default 4MiB Increase this value if you use
-- $image lots. Set to 0 to disable the image cache.
imlib_cache_size = 0,
-- Use the Xdbe extension? (eliminates flicker)
-- It is highly recommended to use own window with this one
-- so double buffer won't be so big.
double_buffer = true,
update_interval = 1,
};
conky.text = [[
${font Cantarell:size=100:bold}${color1}${time %k:%M}${font}
${voffset 20}${alignr}${color} $cpu% $legacymem
]];

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

View File

@ -1,70 +0,0 @@
conky.config = {
-- WINDOW
own_window = true,
own_window_type = 'desktop',
own_window_transparent = true,
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager,sticky',
own_window_colour = '#142c2c',
own_window_class = 'Conky',
own_window_title = 'Mabox Logo',
alignment = 'bottom_right',
gap_x = 20,
gap_y = 60,
minimum_height = 220,
minimum_width = 220,
-- FONTS
use_xft = true,
font = 'Cantarell:size=9',
xftalpha = 1,
override_utf8_locale = true,
-- COLORS
draw_shades = false,
default_shade_color = '#000000',
draw_outline = false,
default_outline_color = '#222222',
default_color = '#309552',
color0 = '#accdc7',
-- BORDERS
draw_borders = false,
-- Stippled borders?
stippled_borders = 2,
-- border margins
border_inner_margin = 8,
border_outer_margin = 8,
-- border width
border_width = 1,
-- MISC
-- Boolean value, if true, Conky will be forked to background when started.
background = true,
-- Adds spaces around certain objects to stop them from moving other things
-- around, this only helps if you are using a mono font
-- Options: right, left or none
use_spacer = 'none',
-- Subtract (file system) buffers from used memory?
no_buffers = true,
-- Imlib2 image cache size, in bytes. Default 4MiB Increase this value if you use
-- $image lots. Set to 0 to disable the image cache.
--imlib_cache_size = 0,
-- Use the Xdbe extension? (eliminates flicker)
-- It is highly recommended to use own window with this one
-- so double buffer won't be so big.
double_buffer = true,
update_interval = 1,
};
conky.text = [[
${image $HOME/.config/conky/images/mabox_3d.png -s 220x220}
${voffset 200}${color0}${alignc}M A B O X L I N U X
]];

View File

@ -1,84 +0,0 @@
conky.config = {
-- WINDOW
own_window = true,
own_window_type = 'desktop',
own_window_transparent = false,
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager,sticky',
own_window_colour = '#142c2c',
own_window_class = 'Conky',
own_window_title = 'Mabox Tools Conky',
alignment = 'bottom_right',
gap_x = 300,
gap_y = 60,
minimum_width = '200',
-- FONTS
use_xft = true,
font = 'Cantarell:size=9',
xftalpha = 1,
override_utf8_locale = true,
-- COLORS
draw_shades = false,
default_shade_color = '#000000',
draw_outline = false,
default_outline_color = '#222222',
default_color = '#309552',
color0 = '#accdc7',
-- BORDERS
draw_borders = true,
-- Stippled borders?
stippled_borders = 2,
-- border margins
border_inner_margin = 8,
border_outer_margin = 8,
-- border width
border_width = 1,
-- MISC
-- Boolean value, if true, Conky will be forked to background when started.
background = true,
-- Adds spaces around certain objects to stop them from moving other things
-- around, this only helps if you are using a mono font
-- Options: right, left or none
use_spacer = 'none',
-- Subtract (file system) buffers from used memory?
no_buffers = true,
-- Imlib2 image cache size, in bytes. Default 4MiB Increase this value if you use
-- $image lots. Set to 0 to disable the image cache.
imlib_cache_size = 0,
-- Use the Xdbe extension? (eliminates flicker)
-- It is highly recommended to use own window with this one
-- so double buffer won't be so big.
double_buffer = true,
update_interval = 1,
};
conky.text = [[
${color}MENUS/SIDEPANELS ${color0} ${hr 1}${voffset -2}
${color0}Main menu ${alignr}${color}super / super+spacebar
${color0}Settings menu ${alignr} ${color}super+s
${color0}Left ${alignr} ${color}ctrl+super+left
${color0}Right ${alignr} ${color}ctrl+super+right
${color0}Places ${alignr} ${color}super+.
${color}CONFIG MENUS ${color0} ${hr 1}${voffset -2}
${color0}Tint2 ${alignr}${color}super+alt+p
${color0}Conky ${alignr}${color}super+alt+k
${color0}Menu/Panels ${alignr}${color}super+alt+m
${color0}Wallpaper ${alignr}${color}super+alt+w
${color0}ScreenLocker ${alignr}${color}super+alt+l
${color}Mabox Linux Tools ${color0} ${hr 1}${voffset -2}
${color0}Command Palette ${alignr}${color}super+F1
${color0}Espanso - text expander ${alignr}${color}super+alt+e
${color0}Color Menu ${alignr}${color}super+alt+c
${color0}Colorizer ${alignr}${color}super+alt+o
]];

View File

@ -1,3 +0,0 @@
conky -c ~/.config/conky/shortcuts_mbcolor.conkyrc & sleep 1s
conky -c ~/.config/conky/sysinfo_mbcolor.conkyrc & sleep 1s
conky -c ~/.config/conky/logo_mbcolor.conkyrc & sleep 1s

View File

@ -1,68 +0,0 @@
conky.config = {
-- WINDOW
own_window = true,
own_window_type = 'desktop',
own_window_transparent = false,
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager,sticky',
own_window_colour = '#142c2c',
own_window_class = 'Conky',
own_window_title = 'Mabox Tools Conky',
alignment = 'bottom_middle',
gap_x = 0,
gap_y = 60,
minimum_width = '200',
-- FONTS
use_xft = true,
font = 'Cantarell:size=9',
xftalpha = 1,
override_utf8_locale = true,
-- COLORS
draw_shades = false,
default_shade_color = '#000000',
draw_outline = false,
default_outline_color = '#222222',
default_color = '#309552',
color0 = '#accdc7',
-- BORDERS
draw_borders = true,
-- Stippled borders?
stippled_borders = 2,
-- border margins
border_inner_margin = 8,
border_outer_margin = 8,
-- border width
border_width = 1,
-- MISC
-- Boolean value, if true, Conky will be forked to background when started.
background = true,
-- Adds spaces around certain objects to stop them from moving other things
-- around, this only helps if you are using a mono font
-- Options: right, left or none
use_spacer = 'none',
-- Subtract (file system) buffers from used memory?
no_buffers = true,
-- Imlib2 image cache size, in bytes. Default 4MiB Increase this value if you use
-- $image lots. Set to 0 to disable the image cache.
imlib_cache_size = 0,
-- Use the Xdbe extension? (eliminates flicker)
-- It is highly recommended to use own window with this one
-- so double buffer won't be so big.
double_buffer = true,
update_interval = 1,
};
conky.text = [[
${execpi 1200 $HOME/.config/conky/scripts/quote.sh}
]];

View File

@ -1,13 +0,0 @@
#!/bin/bash
DIR="$HOME/.config/quoter"
mkdir -p "$DIR"
export Q=$(curl -s "http://api.forismatic.com/api/1.0/?method=getQuote&format=json&lang=en" | sed 's|\\||g' )
QUOTE=$(echo $Q | jq .quoteText)
AUTOR=$(echo $Q | jq .quoteAuthor | tr -d '"')
echo "${QUOTE}|${AUTOR}" >> "${DIR}"/forismatic.txt
printf "\${font Droid Sans:size=18}\${color}"
echo ${QUOTE} | fmt -80
printf "\${font Droid Sans:size=12}\${alignr}\${color0}"
echo "${AUTOR}"

View File

@ -1,92 +0,0 @@
conky.config = {
-- WINDOW
own_window = true,
own_window_type = 'desktop',
own_window_transparent = false,
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager,sticky',
own_window_colour = '#142c2c',
own_window_class = 'Conky',
own_window_title = 'Mabox Shortcuts Conky Grey',
alignment = 'bottom_left',
gap_x = 30,
gap_y = 60,
minimum_width = '200',
-- FONTS
use_xft = true,
font = 'Cantarell:size=9',
xftalpha = 1,
override_utf8_locale = true,
-- COLORS
draw_shades = false,
default_shade_color = '#000000',
draw_outline = false,
default_outline_color = '#222222',
default_color = '#309552',
color0 = '#accdc7',
-- BORDERS
draw_borders = true,
-- Stippled borders?
stippled_borders = 2,
-- border margins
border_inner_margin = 8,
border_outer_margin = 8,
-- border width
border_width = 1,
-- MISC
-- Boolean value, if true, Conky will be forked to background when started.
background = true,
-- Adds spaces around certain objects to stop them from moving other things
-- around, this only helps if you are using a mono font
-- Options: right, left or none
use_spacer = 'none',
-- Subtract (file system) buffers from used memory?
no_buffers = true,
-- Imlib2 image cache size, in bytes. Default 4MiB Increase this value if you use
-- $image lots. Set to 0 to disable the image cache.
imlib_cache_size = 0,
-- Use the Xdbe extension? (eliminates flicker)
-- It is highly recommended to use own window with this one
-- so double buffer won't be so big.
double_buffer = true,
update_interval = 1,
};
conky.text = [[
${color}RUN${alignr}${color0}super = windows key${voffset -8}
${color0}${hr 1}${voffset -4}
${color0}terminal ${alignr}${color}super+t
${color0}quake-terminal ${alignr}${color}ctrl+~
${color0}file manager ${alignr}${color}super+f
${color0}web browser ${alignr}${color}super+w
${color0}text editor ${alignr}${color}super+e
${color0}galculator ${alignr}${color}super+g
${color0}volume control ${alignr}${color}super+v
${color0}toggle Picom ${alignr}${color}super+p
${color0}toggle Conky ${alignr}${color}super+c
${color0}lock screen ${alignr}${color}super+l
${color0}exit ${alignr}${color}super+x
${color}WINDOWS ${color0} ${hr 1}${voffset -2}
${color0}close ${alignr} ${color}alt+F4
${color0}iconify ${alignr} ${color}alt+F5
${color0}maximize ${alignr} ${color}alt+F6
${color0}show desktop ${alignr} ${color}super+d
${color0}un/decorate ${alignr} ${color}super+b
${color0}toggle fullscreen ${alignr} ${color}F11
${color}windows placement:
${color0} - half screen ${alignr} ${color}super+arrows
${color0} - 1/4 screen ${alignr} ${color}super+numpad[1..9]
${color}DESKTOPS ${color0} ${hr 1}${voffset -2}
${color0}go to desktop ${alignr} ${color}super+[1..4]
]];

View File

@ -1,84 +0,0 @@
conky.config = {
own_window = true,
own_window_type = 'desktop',
own_window_transparent = false,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_colour = '#142c2c',
own_window_class = 'Conky',
own_window_title = 'Mabox Sysinfo Graph Conky',
alignment = 'top_right',
gap_x = 30,
gap_y = 60,
minimum_width = '200',
use_xft = true,
font = 'Cantarell:size=9',
xftalpha = 1,
override_utf8_locale = true,
draw_shades = false,
default_shade_color = '#222222',
draw_outline = false,
default_outline_color = '#222222',
default_color = '#309552',
color0 = '#accdc7',
color1 = '#61c4bc',
color2 = '#61c4bc',
cpu_avg_samples = 2,
draw_borders = true,
stippled_borders = 2,
border_inner_margin = 8,
border_outer_margin = 8,
border_width = 1,
draw_graph_borders = true,
background = true,
no_buffers = true,
imlib_cache_size = 0,
short_units = true,
double_buffer = true,
update_interval = 1,
};
conky.text = [[
$color${font Cantarell:size=16}${time %A}$font\
${voffset -20}$alignr$color1${font Cantarell:size=38}${time %e}$font
$color${voffset -20}$color1${font Cantarell:size=18}${time %b}$font\
${voffset -3} $color${font Cantarell:size=20} ${time %Y}$font
${voffset 10}${goto 20}${color} CPU$alignr$cpu% ${voffset -24}
$color2$alignr${cpugraph 50,190 -l -t}${voffset -6}
${goto 18}$font$color0${top name 1}${alignr 4}$color${top cpu 1}%
${goto 18}$color0${top name 2}$alignr$color${top cpu 2}%
${goto 18}$color0${top name 3}$alignr$color${top cpu 3}%
${goto 18}$color0${top name 4}$alignr$color${top cpu 4}%
${goto 18}$color0${top name 5}$alignr$color${top cpu 5}%
#
${voffset 10}${goto 20}${color} RAM${alignr 4}$legacymem / $memmax ${voffset -24}
$color2$alignr${memgraph 50,190 -l -t}${voffset -6}
${goto 18}$color0${top_mem name 1}$alignr$color${top_mem mem_res 1}
${goto 18}$color0${top_mem name 2}$alignr$color${top_mem mem_res 2}
${goto 18}$color0${top_mem name 3}$alignr$color${top_mem mem_res 3}
${goto 18}$color0${top_mem name 4}$alignr$color${top_mem mem_res 4}
${goto 18}$color0${top_mem name 5}$alignr$color${top_mem mem_res 5}
#
${voffset 10}$alignr disk ${color0}${fs_used /} - ${fs_size /}
$alignr$color memory ${color0}$legacymem - $memmax
#${alignr}${color0}${font Cantarell:size=9}swap $swapmax - $swap
#
${voffset 10}$alignr${color} Mabox Linux ${execi 10000 awk -F'=' '/DISTRIB_RELEASE=/ {printf $2" "} /CODENAME/ {print $2}' /etc/lsb-release}
#
$alignr${execi 1200 whoami}@${nodename}
${alignr}${color0}uptime ${color}${uptime_short}
${alignr}${color0}${alignr}kernel ${color}${kernel}
${alignr}${color0}${alignr}arch ${color}${machine}
${alignr}${color0}${alignr}filesystem ${color}${fs_type}
#${voffset 10}${alignr}${color} available updates ${color1}${font Cantarell:bold:size=10}${execpi 1800 pamac checkupdates -aq| wc -l}${font}${color}
${alignr}${color} installed pkgs: ${color0}${execi 10000 pacman -Q | wc -l}
${alignr}${color} branch: ${color0}${execi 10000 pacman-mirrors -G}
]];

View File

@ -1,83 +0,0 @@
conky.config = {
own_window = true,
own_window_type = 'desktop',
own_window_transparent = false,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_colour = '#142c2c',
own_window_class = 'Conky',
own_window_title = 'Mabox Sysinfo Bar Conky',
alignment = 'top_right',
gap_x = 300,
gap_y = 60,
minimum_width = '200',
use_xft = true,
font = 'Cantarell:size=9',
xftalpha = 1,
override_utf8_locale = true,
draw_shades = false,
default_shade_color = '#222222',
draw_outline = false,
default_outline_color = '#222222',
default_color = '#309552',
color0 = '#accdc7',
color1 = '#61c4bc',
color2 = '#61c4bc',
cpu_avg_samples = 2,
draw_borders = true,
stippled_borders = 2,
border_inner_margin = 8,
border_outer_margin = 8,
border_width = 1,
draw_graph_borders = true,
background = true,
no_buffers = true,
imlib_cache_size = 0,
short_units = true,
double_buffer = true,
update_interval = 1,
};
conky.text = [[
$color${font Cantarell:size=16}${time %A}$font\
${voffset -20}$alignr$color1${font Cantarell:size=38}${time %e}$font
$color${voffset -20}$color1${font Cantarell:size=18}${time %b}$font\
${voffset -3} $color${font Cantarell:size=20} ${time %Y}$font
${goto 18}${color}CPU$alignr$cpu%
${voffset -2}$color2$alignr${cpubar 4,190 -l -t}${voffset -2}
${goto 18}$font$color0${top name 1}${alignr}$color${top cpu 1}%
${goto 18}$color0${top name 2}$alignr$color${top cpu 2}%
${goto 18}$color0${top name 3}$alignr$color${top cpu 3}%
${goto 18}$color0${top name 4}$alignr$color${top cpu 4}%
${goto 18}$color0${top name 5}$alignr$color${top cpu 5}%
#
${voffset 8}${goto 18}${color}RAM${alignr}$legacymem / $memmax
${voffset -2}$color2$alignr${membar 4,190 -l -t}${voffset -2}
${goto 18}$color0${top_mem name 1}$alignr$color${top_mem mem_res 1}
${goto 18}$color0${top_mem name 2}$alignr$color${top_mem mem_res 2}
${goto 18}$color0${top_mem name 3}$alignr$color${top_mem mem_res 3}
${goto 18}$color0${top_mem name 4}$alignr$color${top_mem mem_res 4}
${goto 18}$color0${top_mem name 5}$alignr$color${top_mem mem_res 5}
#
${voffset 10}$alignr disk ${color0}${fs_used /} - ${fs_size /}
$alignr$color memory ${color0}$legacymem - $memmax
#${alignr}${color0}${font Cantarell:size=9}swap $swapmax - $swap
#
${voffset 10}$alignr${color} Mabox Linux ${execi 10000 awk -F'=' '/DISTRIB_RELEASE=/ {printf $2" "} /CODENAME/ {print $2}' /etc/lsb-release}
$alignr${execi 1200 whoami}@${nodename}
${alignr}${color0}uptime ${color}${uptime_short}
${alignr}${color0}${alignr}kernel ${color}${kernel}
${alignr}${color0}${alignr}arch ${color}${machine}
${alignr}${color0}${alignr}filesystem ${color}${fs_type}
#${voffset 10}${alignr}${color} available updates ${color1}${font Cantarell:bold:size=10}${execpi 1800 pamac checkupdates -aq| wc -l}${font}${color}
${alignr}${color} installed pkgs: ${color0}${execi 10000 pacman -Q | wc -l}
${alignr}${color} branch: ${color0}${execi 10000 pacman-mirrors -G}
]];

View File

@ -1,84 +0,0 @@
conky.config = {
-- WINDOW
own_window = true,
own_window_type = 'desktop',
own_window_transparent = false,
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager,sticky',
own_window_colour = '#142c2c',
own_window_class = 'Conky',
own_window_title = 'Mabox Terminator Conky',
alignment = 'bottom_left',
gap_x = 240,
gap_y = 60,
minimum_width = '200',
-- FONTS
use_xft = true,
font = 'Cantarell:size=9',
xftalpha = 1,
override_utf8_locale = true,
-- COLORS
draw_shades = false,
default_shade_color = '#000000',
draw_outline = false,
default_outline_color = '#222222',
default_color = '#309552',
color0 = '#accdc7',
-- BORDERS
draw_borders = true,
-- Stippled borders?
stippled_borders = 2,
-- border margins
border_inner_margin = 8,
border_outer_margin = 8,
-- border width
border_width = 1,
-- MISC
-- Boolean value, if true, Conky will be forked to background when started.
background = true,
-- Adds spaces around certain objects to stop them from moving other things
-- around, this only helps if you are using a mono font
-- Options: right, left or none
use_spacer = 'none',
-- Subtract (file system) buffers from used memory?
no_buffers = true,
-- Imlib2 image cache size, in bytes. Default 4MiB Increase this value if you use
-- $image lots. Set to 0 to disable the image cache.
imlib_cache_size = 0,
-- Use the Xdbe extension? (eliminates flicker)
-- It is highly recommended to use own window with this one
-- so double buffer won't be so big.
double_buffer = true,
update_interval = 1,
};
conky.text = [[
${color}TILING TERMINAL WORKFLOW
${color}RUN ${color0}${hr 1}
${voffset -2}${color0}terminal ${alignr}${color}super+t
${color0}quake-terminal (show/hide) ${alignr}${color}ctrl+~
${color}SPLIT ${color0}${hr 1}
${voffset -2}${color0}horizontally ${alignr}${color}ctrl+shift+o
${color0}vertically ${alignr}${color}ctrl+shift+e
${color}USEFULL ACTIONS ${color0}${hr 1}
${voffset -2}${color0}change focus${alignr}${color}alt+arrows
${color0}resize active ${alignr}${color}ctrl+shift+arrows
${color0}zoom active terminal ${alignr}${color}ctrl+shift+x
${color0}fullscreen ${alignr}${color}super+enter,F11
${color0}close terminal ${alignr}${color}ctrl+shift+w
${color}FONT SIZE ${color0}${hr 1}${voffset -2}
${color0}increase ${alignr}${alignr}${color}ctrl++
${color0}decrease ${alignr}${color}ctrl+-
${color0}reset ${alignr}${color}ctrl+0
]];

View File

@ -0,0 +1,11 @@
# Put your favorite fonts families here, one per line
Autour One
Cantarell
DejaVu Serif
Droid Sans
JetBrains Mono
Noto Sans
Roboto
Ubuntu
Noto Sans Light
Source Code Pro

View File

@ -0,0 +1,362 @@
#9400D3 #4B0082 Farhan
#c84e89 #F15F79 Purple
#00F5A0 #00D9F5 Ibtesam
#F7941E #004E8F The Sky And The Sea
#72C6EF #004E8F From Ice To Fire
#FD8112 #0085CA Blue And Orange
#bf5ae0 #a811da Purple Dream
#00416A #E4E5E6 Blu
#fbed96 #abecd6 Summer Breeze
#FFE000 #799F0C Ver
#F7F8F8 #ACBB78 Ver Black
#334d50 #cbcaa5 Anwar
#799F0C #ACBB78 Reaqua
#ffe259 #ffa751 Mango
#00416A #E4E5E6 Bupe
#FFE000 #799F0C Rea
#acb6e5 #86fde8 Windy
#536976 #292E49 Royal Blue
#B79891 #94716B Copper
#9796f0 #fbc7d4 Anamnisar
#BBD2C5 #536976 Petrol
#076585 #ffffff Sky
#00467F #A5CC82 Sel
#000C40 #607D8B Afternoon
#1488CC #2B32B2 Skyline
#ec008c #fc6767 DIMIGO
#cc2b5e #753a88 Purple Love
#2193b0 #6dd5ed Sexy Blue
#e65c00 #F9D423 Blooker20
#2b5876 #4e4376 Sea Blue
#314755 #26a0da Nimvelo
#ff6e7f #bfe9ff Noon to Dusk
#e52d27 #b31217 YouTube
#603813 #b29f94 Cool Brown
#16A085 #F4D03F Harmonic Energy
#D31027 #EA384D Playing with Reds
#EDE574 #E1F5C4 Sunny Days
#02AAB0 #00CDAC Green Beach
#DA22FF #9733EE Intuitive Purple
#348F50 #56B4D3 Emerald Water
#3CA55C #B5AC49 Lemon Twist
#003973 #E5E5BE Horizon
#E55D87 #5FC3E4 Rose Water
#403B4A #E7E9BB Frozen
#F09819 #EDDE5D Mango Pulp
#FF512F #DD2476 Bloody Mary
#AA076B #61045F Aubergine
#1A2980 #26D0CE Aqua Marine
#FF512F #F09819 Sunrise
#1D2B64 #F8CDDA Purple Paradise
#4CB8C4 #3CD3AD Sea Weed
#DD5E89 #F7BB97 Pinky
#EB3349 #F45C43 Cherry
#1D976C #93F9B9 Mojito
#FF8008 #FFC837 Juicy Orange
#16222A #3A6073 Mirage
#1F1C2C #928DAB Steel Gray
#614385 #516395 Kashmir
#4776E6 #8E54E9 Electric Violet
#085078 #85D8CE Venice Blue
#2BC0E4 #EAECC6 Bora Bora
#134E5E #71B280 Moss
#5C258D #4389A2 Shroom Haze
#757F9A #D7DDE8 Mystic
#232526 #414345 Midnight City
#1CD8D2 #93EDC7 Sea Blizz
#3D7EAA #FFE47A Opa
#283048 #859398 Titanium
#24C6DC #514A9D Mantle
#DC2424 #4A569D Dracula
#ED4264 #FFEDBC Peach
#DAE2F8 #D6A4A4 Moonrise
#ECE9E6 #FFFFFF Clouds
#7474BF #348AC7 Stellar
#EC6F66 #F3A183 Bourbon
#5f2c82 #49a09d Calm Darya
#C04848 #480048 Influenza
#e43a15 #e65245 Shrimpy
#414d0b #727a17 Army
#FC354C #0ABFBC Miaka
#4b6cb7 #182848 Pinot Noir
#f857a6 #ff5858 Day Tripper
#a73737 #7a2828 Namn
#d53369 #cbad6d Blurry Beach
#e9d362 #333333 Vasily
#DE6262 #FFB88C A Lost Memory
#666600 #999966 Petrichor
#FFEEEE #DDEFBB Jonquil
#EFEFBB #D4D3DD Sirius Tamed
#c21500 #ffc500 Kyoto
#215f00 #e4e4d9 Misty Meadow
#50C9C3 #96DEDA Aqualicious
#616161 #9bc5c3 Moor
#ddd6f3 #faaca8 Almost
#5D4157 #A8CABA Forever Lost
#E6DADA #274046 Winter
#f2709c #ff9472 Nelson
#DAD299 #B0DAB9 Autumn
#D3959B #BFE6BA Candy
#00d2ff #3a7bd5 Reef
#870000 #190A05 The Strain
#B993D6 #8CA6DB Dirty Fog
#649173 #DBD5A4 Earthly
#C9FFBF #FFAFBD Virgin
#606c88 #3f4c6b Ash
#FBD3E9 #BB377D Cherryblossoms
#ADD100 #7B920A Parklife
#FF4E50 #F9D423 Dance To Forget
#F0C27B #4B1248 Starfall
#000000 #e74c3c Red Mist
#AAFFA9 #11FFBD Teal Love
#B3FFAB #12FFF7 Neon Life
#780206 #061161 Man of Steel
#9D50BB #6E48AA Amethyst
#556270 #FF6B6B Cheer Up Emo Kid
#70e1f5 #ffd194 Shore
#00c6ff #0072ff Facebook Messenger
#fe8c00 #f83600 SoundCloud
#52c234 #061700 Behongo
#485563 #29323c ServQuick
#83a4d4 #b6fbff Friday
#FDFC47 #24FE41 Martini
#abbaab #ffffff Metallic Toad
#73C8A9 #373B44 Between The Clouds
#D38312 #A83279 Crazy Orange I
#1e130c #9a8478 Hersheys
#948E99 #2E1437 Talking To Mice Elf
#360033 #0b8793 Purple Bliss
#FFA17F #00223E Predawn
#43cea2 #185a9d Endless River
#ffb347 #ffcc33 Pastel Orange at the Sun
#6441A5 #2a0845 Twitch
#ff0084 #33001b Flickr
#00bf8f #001510 Vine
#136a8a #267871 Turquoise flow
#8e9eab #eef2f3 Portrait
#7b4397 #dc2430 Virgin America
#D1913C #FFD194 Koko Caramel
#F1F2B5 #135058 Fresh Turboscent
#6A9113 #141517 Green to dark
#004FF9 #FFF94C Ukraine
#525252 #3d72b4 Curiosity Blue
#BA8B02 #181818 Dark Knight
#ee9ca7 #ffdde1 Piglet
#304352 #d7d2cc Lizard
#CCCCB2 #757519 Sage Persuasion
#2c3e50 #3498db Between Night and Day
#fc00ff #00dbde Timber
#e53935 #e35d5b Passion
#005C97 #363795 Clear Sky
#f46b45 #eea849 Master Card
#00C9FF #92FE9D Back To Earth
#673AB7 #512DA8 Deep Purple
#76b852 #8DC26F Little Leaf
#8E0E00 #1F1C18 Netflix
#FFB75E #ED8F03 Light Orange
#c2e59c #64b3f4 Green and Blue
#403A3E #BE5869 Poncho
#C02425 #F0CB35 Back to the Future
#B24592 #F15F79 Blush
#457fca #5691c8 Inbox
#6a3093 #a044ff Purplin
#eacda3 #d6ae7b Pale Wood
#fd746c #ff9068 Haikus
#114357 #F29492 Pizelex
#1e3c72 #2a5298 Joomla
#2F7336 #AA3A38 Christmas
#5614B0 #DBD65C Minnesota Vikings
#4DA0B0 #D39D38 Miami Dolphins
#5A3F37 #2C7744 Forest
#2980b9 #2c3e50 Nighthawk
#0099F7 #F11712 Superman
#834d9b #d04ed6 Suzy
#4B79A1 #283E51 Dark Skies
#000000 #434343 Deep Space
#4CA1AF #C4E0E5 Decent
#E0EAFC #CFDEF3 Colors Of Sky
#BA5370 #F4E2D8 Purple White
#ff4b1f #1fddff Ali
#f7ff00 #db36a4 Alihossein
#a80077 #66ff00 Shahabi
#1D4350 #A43931 Red Ocean
#EECDA3 #EF629F Tranquil
#16BFFD #CB3066 Transfile
#ff4b1f #ff9068 Sylvia
#FF5F6D #FFC371 Sweet Morning
#2196f3 #f44336 Politics
#00d2ff #928DAB Bright Vault
#3a7bd5 #3a6073 Solid Vault
#0B486B #F56217 Sunset
#e96443 #904e95 Grapefruit Sunset
#2C3E50 #4CA1AF Deep Sea Space
#2C3E50 #FD746C Dusk
#F00000 #DC281E Minimal Red
#141E30 #243B55 Royal
#42275a #734b6d Mauve
#000428 #004e92 Frost
#56ab2f #a8e063 Lush
#cb2d3e #ef473a Firewatch
#f79d00 #64f38c Sherbert
#f85032 #e73827 Blood Red
#fceabb #f8b500 Sun on the Horizon
#808080 #3fada8 IIIT Delhi
#ffd89b #19547b Jupiter
#bdc3c7 #2c3e50 50 Shades of Grey
#BE93C5 #7BC6CC Dania
#A1FFCE #FAFFD1 Limeade
#4ECDC4 #556270 Disco
#3a6186 #89253e Love Couple
#ef32d9 #89fffd Azure Pop
#de6161 #2657eb Nepal
#ff00cc #333399 Cosmic Fusion
#fffc00 #ffffff Snapchat
#ff7e5f #feb47b Ed's Sunset Gradient
#00c3ff #ffff1c Brady Brady Fun Fun
#f4c4f3 #fc67fa Black Rosé
#41295a #2F0743 80's Purple
#ee0979 #ff6a00 Ibiza Sunset
#F3904F #3B4371 Dawn
#67B26F #4ca2cd Mild
#3494E6 #EC6EAD Vice City
#DBE6F6 #C5796D Jaipur
#c0c0aa #1cefff Cocoaa Ice
#DCE35B #45B649 EasyMed
#E8CBC0 #636FA4 Rose Colored Lenses
#F0F2F0 #000C40 What lies Beyond
#FFAFBD #ffc3a0 Roseanna
#43C6AC #F8FFAE Honey Dew
#093028 #237A57 Under the Lake
#43C6AC #191654 The Blue Lagoon
#4568DC #B06AB3 Can You Feel The Love Tonight
#0575E6 #021B79 Very Blue
#200122 #6f0000 Love and Liberty
#44A08D #093637 Orca
#6190E8 #A7BFE8 Venice
#34e89e #0f3443 Pacific Dream
#F7971E #FFD200 Learning and Leading
#C33764 #1D2671 Celestial
#20002c #cbb4d4 Purplepine
#D66D75 #E29587 Sha la la
#30E8BF #FF8235 Mini
#B2FEFA #0ED2F7 Maldives
#4AC29A #BDFFF3 Cinnamint
#E44D26 #F16529 Html
#EB5757 #000000 Coal
#F2994A #F2C94C Sunkist
#56CCF2 #2F80ED Blue Skies
#007991 #78ffd6 Chitty Chitty Bang Bang
#000046 #1CB5E0 Visions of Grandeur
#159957 #155799 Crystal Clear
#c0392b #8e44ad Mello
#EF3B36 #FFFFFF Compare Now
#283c86 #45a247 Meridian
#CB356B #BD3F32 Alive
#36D1DC #5B86E5 Scooter
#000000 #0f9b0f Terminal
#1c92d2 #f2fcfe Telegram
#642B73 #C6426E Crimson Tide
#06beb6 #48b1bf Socialive
#d9a7c7 #fffcdc Broken Hearts
#396afc #2948ff Kimoby Is The New Blue
#C9D6FF #E2E2E2 Dull
#7F00FF #E100FF Purpink
#ff9966 #ff5e62 Orange Coral
#22c1c3 #fdbb2d Summer
#e1eec3 #f05053 Velvet Sun
#6D6027 #D3CBB8 Lithium
#74ebd5 #ACB6E5 Digital Water
#fc4a1a #f7b733 Orange Fun
#00F260 #0575E6 Rainbow Blue
#800080 #ffc0cb Pink Flavour
#CAC531 #F3F9A7 Sulphur
#3C3B3F #605C3C Selenium
#D3CCE3 #E9E4F0 Delicate
#00b09b #96c93d Ohhappiness
#fffbd5 #b20a2c Relaxing Red
#23074d #cc5333 Taran Tado
#c94b4b #4b134f Bighead
#FC466B #3F5EFB Sublime Vivid
#FC5C7D #6A82FB Sublime Light
#108dc7 #ef8e38 Pun Yeta
#11998e #38ef7d Quepal
#3E5151 #DECBA4 Sand to Blue
#bc4e9c #f80759 Shifter
#4e54c8 #8f94fb Moon Purple
#333333 #dd1818 Pure Lust
#a8c0ff #3f2b96 Slight Ocean View
#ad5389 #3c1053 eXpresso
#636363 #a2ab58 Shifty
#DA4453 #89216B Vanusa
#005AA7 #FFFDE4 Evening Night
#FFEFBA #FFFFFF Margo
#00B4DB #0083B0 Blue Raspberry
#FDC830 #F37335 Citrus Peel
#ED213A #93291E Sin City Red
#a8ff78 #78ffd6 Summer Dog
#FF416C #FF4B2B Burning Orange
#654ea3 #eaafc8 Ultra Voilet
#009FFF #ec2F4B By Design
#544a7d #ffd452 Kyoo Tah
#8360c3 #2ebf91 Kye Meh
#dd3e54 #6be585 Kyoo Pal
#659999 #f4791f Metapolis
#f12711 #f5af19 Flare
#c31432 #240b36 Witching Hour
#f953c6 #b91d73 Neuromancer
#1f4037 #99f2c8 Harvey
#8E2DE2 #4A00E0 Amin
#FF0099 #493240 Yoda
#373B44 #4286f4 Dark Ocean
#b92b27 #1565C0 Evening Sunshine
#2193b0 #6dd5ed Cool Blues
#ee9ca7 #ffdde1 Piggy Pink
#bdc3c7 #2c3e50 Grade Grey
#2A2D3E #FECB6E Zenta
#6025F5 #FF5555 Lensod
#004680 #4484BA Dark Blu Two
#7ec6bc #ebe717 Lemon Lime
#de8a41 #2ada53 Mango Papaya
#ff0000 #fdcf58 Flame
#36B1C7 #960B33 Blue Red
#1DA1F2 #009ffc Twitter
#B5B9FF #2B2C49 Blue Slate
#9FA0A8 #5C7852 Space Light Green
#DCFFBD #CC86D1 Flower
#E6AE8C #A8CECF Peach Sea
#00fff0 #0083fe Abbas
#05386b #5cdb95 Emerald Sea
#4284DB #29EAC4 Bleem
#554023 #c99846 Coffee Gold
#516b8b #056b3b Compass
#D70652 #FF025E Andreuzza's
#152331 #000000 Moonwalker
#59CDE9 #0A2A88 Hyper Blue
#81ff8a #64965e Neon Green
#d4fc79 #96e6a1 Dusty Grass
#003d4d #00c996 Visual Blue
#2E3192 #1BFFFF Ocean Blue
#D4145A #FBB03B Sanguine
#009245 #FCEE21 Luscious Lime
#662D8C #ED1E79 Purple Lake
#EE9CA7 #FFDDE1 Piglet
#614385 #516395 Kashmir
#02AABD #00CDAC Green Beach
#FF512F #DD2476 Bloody Mary
#FF5F6D #FFC371 Sweet Morning
#11998E #38EF7D Quepal
#C6EA8D #FE90AF Cactus
#EA8D8D #A890FE Yosemite
#D8B5FF #1EAE98 Antarctica
#FF61D2 #FE9090 Exotic
#BFF098 #6FD6FF Toxic
#4E65FF #92EFFD Orbit
#A9F1DF #FFBBBB No Mans
#C33764 #1D2671 Celestial
#93A5CF #E4EfE9 Clean Mirror
#868F96 #596164 Mountain Rock
#09203F #537895 Eternal Constance
#FFECD2 #FCB69F Juicy Peach
#A1C4FD #C2E9FB Winter Neva
#764BA2 #667EEA Plum Plate
#FDFCFB #E2D1C3 Everlasting Sky

View File

@ -0,0 +1,235 @@
/* W3.CSS 4.15 December 2020 by Jan Egil and Borge Refsnes */
html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}
/* Extract from normalize.css by Nicolas Gallagher and Jonathan Neal git.io/normalize */
html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}
article,aside,details,figcaption,figure,footer,header,main,menu,nav,section{display:block}summary{display:list-item}
audio,canvas,progress,video{display:inline-block}progress{vertical-align:baseline}
audio:not([controls]){display:none;height:0}[hidden],template{display:none}
a{background-color:transparent}a:active,a:hover{outline-width:0}
abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}
b,strong{font-weight:bolder}dfn{font-style:italic}mark{background:#ff0;color:#000}
small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
sub{bottom:-0.25em}sup{top:-0.5em}figure{margin:1em 40px}img{border-style:none}
code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}hr{box-sizing:content-box;height:0;overflow:visible}
button,input,select,textarea,optgroup{font:inherit;margin:0}optgroup{font-weight:bold}
button,input{overflow:visible}button,select{text-transform:none}
button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}
button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}
button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}
fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}
legend{color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto}
[type=checkbox],[type=radio]{padding:0}
[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}
[type=search]{-webkit-appearance:textfield;outline-offset:-2px}
[type=search]::-webkit-search-decoration{-webkit-appearance:none}
::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}
/* End extract */
html,body{font-family:Verdana,sans-serif;font-size:15px;line-height:1.5}html{overflow-x:hidden}
h1{font-size:36px}h2{font-size:30px}h3{font-size:24px}h4{font-size:20px}h5{font-size:18px}h6{font-size:16px}
.serif{font-family:serif}.sans-serif{font-family:sans-serif}.cursive{font-family:cursive}.monospace{font-family:monospace}
h1,h2,h3,h4,h5,h6{font-family:"Segoe UI",Arial,sans-serif;font-weight:400;margin:10px 0}.wide{letter-spacing:4px}
hr{border:0;border-top:1px solid #eee;margin:20px 0}
.image{max-width:100%;height:auto}img{vertical-align:middle}a{color:inherit}
.table,.table-all{border-collapse:collapse;border-spacing:0;width:100%;display:table}.table-all{border:1px solid #ccc}
.bordered tr,.table-all tr{border-bottom:1px solid #ddd}.striped tbody tr:nth-child(even){background-color:#f1f1f1}
.table-all tr:nth-child(odd){background-color:#fff}.table-all tr:nth-child(even){background-color:#f1f1f1}
.hoverable tbody tr:hover,.ul.hoverable li:hover{background-color:#ccc}.centered tr th,.centered tr td{text-align:center}
.table td,.table th,.table-all td,.table-all th{padding:8px 8px;display:table-cell;text-align:left;vertical-align:top}
.table th:first-child,.table td:first-child,.table-all th:first-child,.table-all td:first-child{padding-left:16px}
.btn,.button{border:none;display:inline-block;padding:8px 16px;vertical-align:middle;overflow:hidden;text-decoration:none;color:inherit;background-color:inherit;text-align:center;cursor:pointer;white-space:nowrap}
.btn:hover{box-shadow:0 8px 16px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19)}
.btn,.button{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
.disabled,.btn:disabled,.button:disabled{cursor:not-allowed;opacity:0.3}.disabled *,:disabled *{pointer-events:none}
.btn.disabled:hover,.btn:disabled:hover{box-shadow:none}
.badge,.tag{background-color:#000;color:#fff;display:inline-block;padding-left:8px;padding-right:8px;text-align:center}.badge{border-radius:50%}
.ul{list-style-type:none;padding:0;margin:0}.ul li{padding:8px 16px;border-bottom:1px solid #ddd}.ul li:last-child{border-bottom:none}
.tooltip,.display-container{position:relative}.tooltip .text{display:none}.tooltip:hover .text{display:inline-block}
.ripple:active{opacity:0.5}.ripple{transition:opacity 0s}
.input{padding:8px;display:block;border:none;border-bottom:1px solid #ccc;width:100%}
.select{padding:9px 0;width:100%;border:none;border-bottom:1px solid #ccc}
.dropdown-click,.dropdown-hover{position:relative;display:inline-block;cursor:pointer}
.dropdown-hover:hover .dropdown-content{display:block}
.dropdown-hover:first-child,.dropdown-click:hover{background-color:#ccc;color:#000}
.dropdown-hover:hover > .button:first-child,.dropdown-click:hover > .button:first-child{background-color:#ccc;color:#000}
.dropdown-content{cursor:auto;color:#000;background-color:#fff;display:none;position:absolute;min-width:160px;margin:0;padding:0;z-index:1}
.check,.radio{width:24px;height:24px;position:relative;top:6px}
.sidebar{height:100%;width:200px;background-color:#fff;position:fixed!important;z-index:1;overflow:auto}
.bar-block .dropdown-hover,.bar-block .dropdown-click{width:100%}
.bar-block .dropdown-hover .dropdown-content,.bar-block .dropdown-click .dropdown-content{min-width:100%}
.bar-block .dropdown-hover .button,.bar-block .dropdown-click .button{width:100%;text-align:left;padding:8px 16px}
.main,#main{transition:margin-left .4s}
.modal{z-index:3;display:none;padding-top:100px;position:fixed;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgb(0,0,0);background-color:rgba(0,0,0,0.4)}
.modal-content{margin:auto;background-color:#fff;position:relative;padding:0;outline:0;width:600px}
.bar{width:100%;overflow:hidden}.center .bar{display:inline-block;width:auto}
.bar .bar-item{padding:8px 16px;float:left;width:auto;border:none;display:block;outline:0}
.bar .dropdown-hover,.bar .dropdown-click{position:static;float:left}
.bar .button{white-space:normal}
.bar-block .bar-item{width:100%;display:block;padding:8px 16px;text-align:left;border:none;white-space:normal;float:none;outline:0}
.bar-block.center .bar-item{text-align:center}.block{display:block;width:100%}
.responsive{display:block;overflow-x:auto}
.container:after,.container:before,.panel:after,.panel:before,.row:after,.row:before,.row-padding:after,.row-padding:before,
.cell-row:before,.cell-row:after,.clear:after,.clear:before,.bar:before,.bar:after{content:"";display:table;clear:both}
.col,.half,.third,.twothird,.threequarter,.quarter{float:left;width:100%}
.col.s1{width:8.33333%}.col.s2{width:16.66666%}.col.s3{width:24.99999%}.col.s4{width:33.33333%}
.col.s5{width:41.66666%}.col.s6{width:49.99999%}.col.s7{width:58.33333%}.col.s8{width:66.66666%}
.col.s9{width:74.99999%}.col.s10{width:83.33333%}.col.s11{width:91.66666%}.col.s12{width:99.99999%}
@media (min-width:601px){.col.m1{width:8.33333%}.col.m2{width:16.66666%}.col.m3,.quarter{width:24.99999%}.col.m4,.third{width:33.33333%}
.col.m5{width:41.66666%}.col.m6,.half{width:49.99999%}.col.m7{width:58.33333%}.col.m8,.twothird{width:66.66666%}
.col.m9,.threequarter{width:74.99999%}.col.m10{width:83.33333%}.col.m11{width:91.66666%}.col.m12{width:99.99999%}}
@media (min-width:993px){.col.l1{width:8.33333%}.col.l2{width:16.66666%}.col.l3{width:24.99999%}.col.l4{width:33.33333%}
.col.l5{width:41.66666%}.col.l6{width:49.99999%}.col.l7{width:58.33333%}.col.l8{width:66.66666%}
.col.l9{width:74.99999%}.col.l10{width:83.33333%}.col.l11{width:91.66666%}.col.l12{width:99.99999%}}
.rest{overflow:hidden}.stretch{margin-left:-16px;margin-right:-16px}
.content,.auto{margin-left:auto;margin-right:auto}.content{max-width:980px}.auto{max-width:1140px}
.cell-row{display:table;width:100%}.cell{display:table-cell}
.cell-top{vertical-align:top}.cell-middle{vertical-align:middle}.cell-bottom{vertical-align:bottom}
.hide{display:none!important}.show-block,.show{display:block!important}.show-inline-block{display:inline-block!important}
@media (max-width:1205px){.auto{max-width:95%}}
@media (max-width:600px){.modal-content{margin:0 10px;width:auto!important}.modal{padding-top:30px}
.dropdown-hover.mobile .dropdown-content,.dropdown-click.mobile .dropdown-content{position:relative}
.hide-small{display:none!important}.mobile{display:block;width:100%!important}.bar-item.mobile,.dropdown-hover.mobile,.dropdown-click.mobile{text-align:center}
.dropdown-hover.mobile,.dropdown-hover.mobile .btn,.dropdown-hover.mobile .button,.dropdown-click.mobile,.dropdown-click.mobile .btn,.dropdown-click.mobile .button{width:100%}}
@media (max-width:768px){.modal-content{width:500px}.modal{padding-top:50px}}
@media (min-width:993px){.modal-content{width:900px}.hide-large{display:none!important}.sidebar.collapse{display:block!important}}
@media (max-width:992px) and (min-width:601px){.hide-medium{display:none!important}}
@media (max-width:992px){.sidebar.collapse{display:none}.main{margin-left:0!important;margin-right:0!important}.auto{max-width:100%}}
.top,.bottom{position:fixed;width:100%;z-index:1}.top{top:0}.bottom{bottom:0}
.overlay{position:fixed;display:none;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.5);z-index:2}
.display-topleft{position:absolute;left:0;top:0}.display-topright{position:absolute;right:0;top:0}
.display-bottomleft{position:absolute;left:0;bottom:0}.display-bottomright{position:absolute;right:0;bottom:0}
.display-middle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%)}
.display-left{position:absolute;top:50%;left:0%;transform:translate(0%,-50%);-ms-transform:translate(-0%,-50%)}
.display-right{position:absolute;top:50%;right:0%;transform:translate(0%,-50%);-ms-transform:translate(0%,-50%)}
.display-topmiddle{position:absolute;left:50%;top:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)}
.display-bottommiddle{position:absolute;left:50%;bottom:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)}
.display-container:hover .display-hover{display:block}.display-container:hover span.display-hover{display:inline-block}.display-hover{display:none}
.display-position{position:absolute}
.circle{border-radius:50%}
.round-small{border-radius:2px}.round,.round-medium{border-radius:4px}.round-large{border-radius:8px}.round-xlarge{border-radius:16px}.round-xxlarge{border-radius:32px}
.row-padding,.row-padding>.half,.row-padding>.third,.row-padding>.twothird,.row-padding>.threequarter,.row-padding>.quarter,.row-padding>.col{padding:0 8px}
.container,.panel{padding:0.01em 16px}.panel{margin-top:16px;margin-bottom:16px}
.code,.codespan{font-family:Consolas,"courier new";font-size:16px}
.code{width:auto;background-color:#fff;padding:8px 12px;border-left:4px solid #4CAF50;word-wrap:break-word}
.codespan{color:crimson;background-color:#f1f1f1;padding-left:4px;padding-right:4px;font-size:110%}
.card,.card-2{box-shadow:0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12)}
.card-4,.hover-shadow:hover{box-shadow:0 4px 10px 0 rgba(0,0,0,0.2),0 4px 20px 0 rgba(0,0,0,0.19)}
.spin{animation:spin 2s infinite linear}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}
.animate-fading{animation:fading 10s infinite}@keyframes fading{0%{opacity:0}50%{opacity:1}100%{opacity:0}}
.animate-opacity{animation:opac 0.8s}@keyframes opac{from{opacity:0} to{opacity:1}}
.animate-top{position:relative;animation:animatetop 0.4s}@keyframes animatetop{from{top:-300px;opacity:0} to{top:0;opacity:1}}
.animate-left{position:relative;animation:animateleft 0.4s}@keyframes animateleft{from{left:-300px;opacity:0} to{left:0;opacity:1}}
.animate-right{position:relative;animation:animateright 0.4s}@keyframes animateright{from{right:-300px;opacity:0} to{right:0;opacity:1}}
.animate-bottom{position:relative;animation:animatebottom 0.4s}@keyframes animatebottom{from{bottom:-300px;opacity:0} to{bottom:0;opacity:1}}
.animate-zoom {animation:animatezoom 0.6s}@keyframes animatezoom{from{transform:scale(0)} to{transform:scale(1)}}
.animate-input{transition:width 0.4s ease-in-out}.animate-input:focus{width:100%!important}
.opacity,.hover-opacity:hover{opacity:0.60}.opacity-off,.hover-opacity-off:hover{opacity:1}
.opacity-max{opacity:0.25}.opacity-min{opacity:0.75}
.greyscale-max,.grayscale-max,.hover-greyscale:hover,.hover-grayscale:hover{filter:grayscale(100%)}
.greyscale,.grayscale{filter:grayscale(75%)}.greyscale-min,.grayscale-min{filter:grayscale(50%)}
.sepia{filter:sepia(75%)}.sepia-max,.hover-sepia:hover{filter:sepia(100%)}.sepia-min{filter:sepia(50%)}
.tiny{font-size:10px!important}.small{font-size:12px!important}.medium{font-size:15px!important}.large{font-size:18px!important}
.xlarge{font-size:24px!important}.xxlarge{font-size:36px!important}.xxxlarge{font-size:48px!important}.jumbo{font-size:64px!important}
.left-align{text-align:left!important}.right-align{text-align:right!important}.justify{text-align:justify!important}.center{text-align:center!important}
.border-0{border:0!important}.border{border:1px solid #ccc!important}
.border-top{border-top:1px solid #ccc!important}.border-bottom{border-bottom:1px solid #ccc!important}
.border-left{border-left:1px solid #ccc!important}.border-right{border-right:1px solid #ccc!important}
.topbar{border-top:6px solid #ccc!important}.bottombar{border-bottom:6px solid #ccc!important}
.leftbar{border-left:6px solid #ccc!important}.rightbar{border-right:6px solid #ccc!important}
.section,.code{margin-top:16px!important;margin-bottom:16px!important}
.margin{margin:16px!important}.margin-top{margin-top:16px!important}.margin-bottom{margin-bottom:16px!important}
.margin-left{margin-left:16px!important}.margin-right{margin-right:16px!important}
.padding-small{padding:4px 8px!important}.padding{padding:8px 16px!important}.padding-large{padding:12px 24px!important}
.padding-16{padding-top:16px!important;padding-bottom:16px!important}.padding-24{padding-top:24px!important;padding-bottom:24px!important}
.padding-32{padding-top:32px!important;padding-bottom:32px!important}.padding-48{padding-top:48px!important;padding-bottom:48px!important}
.padding-64{padding-top:64px!important;padding-bottom:64px!important}
.padding-top-64{padding-top:64px!important}.padding-top-48{padding-top:48px!important}
.padding-top-32{padding-top:32px!important}.padding-top-24{padding-top:24px!important}
.left{float:left!important}.right{float:right!important}
.button:hover{color:#000!important;background-color:#ccc!important}
.transparent,.hover-none:hover{background-color:transparent!important}
.hover-none:hover{box-shadow:none!important}
/* Colors */
.amber,.hover-amber:hover{color:#000!important;background-color:#ffc107!important}
.aqua,.hover-aqua:hover{color:#000!important;background-color:#00ffff!important}
.blue,.hover-blue:hover{color:#fff!important;background-color:#2196F3!important}
.light-blue,.hover-light-blue:hover{color:#000!important;background-color:#87CEEB!important}
.brown,.hover-brown:hover{color:#fff!important;background-color:#795548!important}
.cyan,.hover-cyan:hover{color:#000!important;background-color:#00bcd4!important}
.blue-grey,.hover-blue-grey:hover,.blue-gray,.hover-blue-gray:hover{color:#fff!important;background-color:#607d8b!important}
.green,.hover-green:hover{color:#fff!important;background-color:#4CAF50!important}
.light-green,.hover-light-green:hover{color:#000!important;background-color:#8bc34a!important}
.indigo,.hover-indigo:hover{color:#fff!important;background-color:#3f51b5!important}
.khaki,.hover-khaki:hover{color:#000!important;background-color:#f0e68c!important}
.lime,.hover-lime:hover{color:#000!important;background-color:#cddc39!important}
.orange,.hover-orange:hover{color:#000!important;background-color:#ff9800!important}
.deep-orange,.hover-deep-orange:hover{color:#fff!important;background-color:#ff5722!important}
.pink,.hover-pink:hover{color:#fff!important;background-color:#e91e63!important}
.purple,.hover-purple:hover{color:#fff!important;background-color:#9c27b0!important}
.deep-purple,.hover-deep-purple:hover{color:#fff!important;background-color:#673ab7!important}
.red,.hover-red:hover{color:#fff!important;background-color:#f44336!important}
.sand,.hover-sand:hover{color:#000!important;background-color:#fdf5e6!important}
.teal,.hover-teal:hover{color:#fff!important;background-color:#009688!important}
.yellow,.hover-yellow:hover{color:#000!important;background-color:#ffeb3b!important}
.white,.hover-white:hover{color:#000!important;background-color:#fff!important}
.black,.hover-black:hover{color:#fff!important;background-color:#000!important}
.grey,.hover-grey:hover,.gray,.hover-gray:hover{color:#000!important;background-color:#9e9e9e!important}
.light-grey,.hover-light-grey:hover,.light-gray,.hover-light-gray:hover{color:#000!important;background-color:#f1f1f1!important}
.dark-grey,.hover-dark-grey:hover,.dark-gray,.hover-dark-gray:hover{color:#fff!important;background-color:#616161!important}
.pale-red,.hover-pale-red:hover{color:#000!important;background-color:#ffdddd!important}
.pale-green,.hover-pale-green:hover{color:#000!important;background-color:#ddffdd!important}
.pale-yellow,.hover-pale-yellow:hover{color:#000!important;background-color:#ffffcc!important}
.pale-blue,.hover-pale-blue:hover{color:#000!important;background-color:#ddffff!important}
.text-amber,.hover-text-amber:hover{color:#ffc107!important}
.text-aqua,.hover-text-aqua:hover{color:#00ffff!important}
.text-blue,.hover-text-blue:hover{color:#2196F3!important}
.text-light-blue,.hover-text-light-blue:hover{color:#87CEEB!important}
.text-brown,.hover-text-brown:hover{color:#795548!important}
.text-cyan,.hover-text-cyan:hover{color:#00bcd4!important}
.text-blue-grey,.hover-text-blue-grey:hover,.text-blue-gray,.hover-text-blue-gray:hover{color:#607d8b!important}
.text-green,.hover-text-green:hover{color:#4CAF50!important}
.text-light-green,.hover-text-light-green:hover{color:#8bc34a!important}
.text-indigo,.hover-text-indigo:hover{color:#3f51b5!important}
.text-khaki,.hover-text-khaki:hover{color:#b4aa50!important}
.text-lime,.hover-text-lime:hover{color:#cddc39!important}
.text-orange,.hover-text-orange:hover{color:#ff9800!important}
.text-deep-orange,.hover-text-deep-orange:hover{color:#ff5722!important}
.text-pink,.hover-text-pink:hover{color:#e91e63!important}
.text-purple,.hover-text-purple:hover{color:#9c27b0!important}
.text-deep-purple,.hover-text-deep-purple:hover{color:#673ab7!important}
.text-red,.hover-text-red:hover{color:#f44336!important}
.text-sand,.hover-text-sand:hover{color:#fdf5e6!important}
.text-teal,.hover-text-teal:hover{color:#009688!important}
.text-yellow,.hover-text-yellow:hover{color:#d2be0e!important}
.text-white,.hover-text-white:hover{color:#fff!important}
.text-black,.hover-text-black:hover{color:#000!important}
.text-grey,.hover-text-grey:hover,.text-gray,.hover-text-gray:hover{color:#757575!important}
.text-light-grey,.hover-text-light-grey:hover,.text-light-gray,.hover-text-light-gray:hover{color:#f1f1f1!important}
.text-dark-grey,.hover-text-dark-grey:hover,.text-dark-gray,.hover-text-dark-gray:hover{color:#3a3a3a!important}
.border-amber,.hover-border-amber:hover{border-color:#ffc107!important}
.border-aqua,.hover-border-aqua:hover{border-color:#00ffff!important}
.border-blue,.hover-border-blue:hover{border-color:#2196F3!important}
.border-light-blue,.hover-border-light-blue:hover{border-color:#87CEEB!important}
.border-brown,.hover-border-brown:hover{border-color:#795548!important}
.border-cyan,.hover-border-cyan:hover{border-color:#00bcd4!important}
.border-blue-grey,.hover-border-blue-grey:hover,.border-blue-gray,.hover-border-blue-gray:hover{border-color:#607d8b!important}
.border-green,.hover-border-green:hover{border-color:#4CAF50!important}
.border-light-green,.hover-border-light-green:hover{border-color:#8bc34a!important}
.border-indigo,.hover-border-indigo:hover{border-color:#3f51b5!important}
.border-khaki,.hover-border-khaki:hover{border-color:#f0e68c!important}
.border-lime,.hover-border-lime:hover{border-color:#cddc39!important}
.border-orange,.hover-border-orange:hover{border-color:#ff9800!important}
.border-deep-orange,.hover-border-deep-orange:hover{border-color:#ff5722!important}
.border-pink,.hover-border-pink:hover{border-color:#e91e63!important}
.border-purple,.hover-border-purple:hover{border-color:#9c27b0!important}
.border-deep-purple,.hover-border-deep-purple:hover{border-color:#673ab7!important}
.border-red,.hover-border-red:hover{border-color:#f44336!important}
.border-sand,.hover-border-sand:hover{border-color:#fdf5e6!important}
.border-teal,.hover-border-teal:hover{border-color:#009688!important}
.border-yellow,.hover-border-yellow:hover{border-color:#ffeb3b!important}
.border-white,.hover-border-white:hover{border-color:#fff!important}
.border-black,.hover-border-black:hover{border-color:#000!important}
.border-grey,.hover-border-grey:hover,.border-gray,.hover-border-gray:hover{border-color:#9e9e9e!important}
.border-light-grey,.hover-border-light-grey:hover,.border-light-gray,.hover-border-light-gray:hover{border-color:#f1f1f1!important}
.border-dark-grey,.hover-border-dark-grey:hover,.border-dark-gray,.hover-border-dark-gray:hover{border-color:#616161!important}
.border-pale-red,.hover-border-pale-red:hover{border-color:#ffe7e7!important}.border-pale-green,.hover-border-pale-green:hover{border-color:#e7ffe7!important}
.border-pale-yellow,.hover-border-pale-yellow:hover{border-color:#ffffcc!important}.border-pale-blue,.hover-border-pale-blue:hover{border-color:#e7ffff!important}

View File

@ -1,59 +1,852 @@
<!DOCTYPE html>
<html>
<title>W3.CSS</title>
<title>Mabox Colorizer</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<body class="w3-dark-grey">
<link rel="stylesheet" href="./css/w3.css">
<style>
@font-face{
font-family: "Symbols";
src: url("/usr/share/fonts/TTF/Symbols-2048-em Nerd Font Complete.ttf") format("truetype");
}
body{
background-color:#222222;
color: #999999;
font-size: 1.6vw !important;
font-family: 'Symbols', sans-serif;
}
.dark{background-color:#191919;}
div.fixed {
position: fixed;
top: 4px;
right: 0;
width: 400px;
}
div.fixeddown {
position: fixed;
bottom:0;
left:0;
width:20%;
}
nav button.tablink {padding:3px 8px !important;width:94%;float:right;text-align:left;border-left:4px solid transparent;}
nav button.tablink:hover {background-color:#444444 !important;color:white !important;border-left:4px solid #222222;}
nav button.bg {background-color:#222222;color:white !important;border-left:4px solid #34BE5B !important;border-radius:4px 0 0 4px;}
hr {margin:0;border: 0;height: 1px;background-image: linear-gradient(to right, rgba(105, 105, 105, 0), rgba(105, 105, 105, 0.75), rgba(105, 105, 105, 0));}
div.fixed .bar-item {margin-right:4px; border-radius:4px;}
.third {padding: 0.01em 4px;}
.button {position:relative;}
.button .right {position:absolute; top:0; right:6px;}
main div.dark .button{min-width:8vw;border-radius:2px;}
section.tab {padding-top: 0;}
section#Colorizer {padding-top: 0.01em;}
#logoheader {padding:16px 0 12px 0;background-color:#111111;border-bottom:1px solid #444444;}
#logo {width:8vw;height:8vw;}
div.fixeddown p {margin:0;}
p#links a {text-decoration:none;margin:0 4px;font-size:2.4vw !important;}
#links {background-color:#111111;border-top:1px solid #444444;}
.link {cursor:pointer;}
.bar-block .btn {width: 100px;text-align:center;}
.bar-block .btn:hover {background-color:white;color:gray;}
.dropdown-content {min-width: 20px;}
a.tag {text-decoration:none; border:none;margin-bottom: 4px;border-radius:3px; padding:1px 6px;filter: brightness(0.8);}
a.tag:hover {text-decoration:none; border:none;margin-bottom: 4px;filter: brightness(1);}
.colors a.tag {border-radius:0;border:1px solid #333333;filter: brightness(1);}
.colors a.tag:hover {border:1px solid #EEEEEE;}
.attribs a.tag {margin-left:0;margin-right:1px;border:none;border-radius:0;filter: brightness(0.8);}
.attribs a.tag:hover {margin-left:0; margin-right:1px;border:none;border-radius:0;filter: brightness(1);}
kbd {
background-color: #eee;
border-radius: 3px;
border: 1px solid #b4b4b4;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), 0 2px 0 0 rgba(255, 255, 255, 0.7) inset;
color: #333;
display: inline-block;
font-size: 0.85em;
font-weight: 700;
line-height: 1;
padding: 2px 4px;
white-space: nowrap;
}
.small {font-size: 1.5vw !important;}
.tiny {font-size: 1.25vw !important;}
h2 {font-size: 3vw !important;}
h3 {font-size: 2.4vw !important;}
h4 {font-size: 2.2vw !important;}
h5 {font-size: 2vw !important;border-bottom: 1px solid;padding-left: 1em;}
.large {width:3.2vw !important;height:2.4vw !important;font-size: 2.4vw !important;}
<div class="w3-sidebar w3-bar-block w3-dark-grey w3-card" style="width:140px">
<p></p>
<button class="w3-bar-item w3-button w3-tiny tablink" onclick="openTab(event, 'Colorizer')">Colorizer</button>
<button class="w3-bar-item w3-button w3-tiny tablink" onclick="openTab(event, 'Openbox')">Openbox Theme</button>
<button class="w3-bar-item w3-button w3-tiny tablink" onclick="openTab(event, 'Jgmenu')">Menu / Sidepanels</button>
<button class="w3-bar-item w3-button w3-tiny tablink" onclick="openTab(event, 'Conky')">Conky</button>
<button class="w3-bar-item w3-button w3-tiny tablink" onclick="openTab(event, 'Tint2')">Tint2 Panel</button>
<button class="w3-bar-item w3-button w3-tiny tablink" onclick="openTab(event, 'Icons')">Icons</button>
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(8em, 1fr));
grid-gap: .5em;
}
.grid + .grid {
margin-top: .5em;
}
.grid div {
border: 0 solid currentcolor;
border-radius: 4px;
/**min-height: 15vh;**/
padding: 1em;
/**color: #0178d4;
background-color:#191919;**/
font-size: 1em;
text-align: center;
/**display: flex;
flex-direction: column;**/
justify-content: center;
}
.gi2 {grid-column: span 2;}
.gi3 {grid-column: span 3;}
.gi4 {grid-column: span 4;}
.gi22 {
grid-column: span 2;
grid-row: span 2;
}
.gi2r{grid-row: span 2;}
.gi3r{grid-row: span 3;}
.gi4r{grid-row: span 4;}
</style>
<body>
<div class="sidebar bar-block" style="background-color:#333333;width:20%">
<div class="center" id="logoheader">
<svg id="logo" viewBox="0 0 128 128">
<polygon points="4,4 58,4 58,58 4,58" style="fill:#674EA7;stroke:white;stroke-width:4;fill-rule:nonzero;"/>
<polygon points="68,4 124,4 124,58 68,58" style="fill:#34BE5B;stroke:white;stroke-width:4;fill-rule:nonzero;"/>
<polygon points="4,68 58,68 58,124 4,124" style="fill:#FF8C00;stroke:white;stroke-width:4;fill-rule:nonzero;"/>
<polygon points="68,68 124,68 124,124 68,124" style="fill:#5e81ac;stroke:white;stroke-width:4;fill-rule:nonzero;"/>
</svg><br />
<span class="small">Colorizer</span>
</div>
<nav style="padding-top:8px;">
<button class="button small tablink bg" onclick="openTab(event, 'Colorizer')">Start</button>
<button class="button small tablink" onclick="openTab(event, 'Openbox')">Openbox Theme</button>
<button class="button small tablink" onclick="openTab(event, 'Conky')">Conky</button>
<button class="button small tablink" onclick="openTab(event, 'Jgmenu')">Menu/Sidepanels</button>
<button class="button small tablink" onclick="openTab(event, 'Tint2')">Tint2 Panel</button>
<button class="button small tablink" onclick="openTab(event, 'Wall2theme')">Wallpaper  themes</button>
<button class="button small tablink" onclick="openTab(event, 'pyradiocava')"><i>Cava, PyRadio</i></button>
<button class="button small tablink" onclick="openTab(event, 'fonts')">Fonts</i></button>
<button class="button small tablink" onclick="openTab(event, 'Terminal')">Terminal theme</button>
<button class="button small tablink" onclick="openTab(event, 'Save')">Save and Restore</button>
</nav>
<div class="fixeddown">
<div class="center small" style="margin: 0 4px 4px 2px;">
<p><a class="tag small indigo" href="run://pcmanwp"> Wallpaper...</a> <a class="tag small indigo" href="run://mbwallpaper -o"></a></p>
<p><em>dynamic menus:</em></p>
<p>
<a class="tag small purple" href="run://colorizer -s"> Colorizer</a><br />
<a class="tag small amber" href="run://colorizer-ob -s"> Openbox</a>
<a class="tag small amber" href="run://colorizer-conky -s"> Conky</a>
<a class="tag small amber" href="run://colorizer-menus -s"> Menu</a>
<a class="tag small amber" href="run://colorizer-fonts -s"> Fonts</a><br />
<a class="tag small lime" href="run://colorizer-cava -s">󰺢 Cava</a>
<a class="tag small lime" href="run://colorizer-pyradio -s"> PyRadio</a>
</p>
</div>
<p id="links" class="center black">
<a href="https://maboxlinux.org" class="tooltip"><span class="text tag small round" style="position:absolute;left:-10px;bottom:26px">Mabox Website</span></a>
<a href="https://forum.maboxlinux.org" class="tooltip"><span class="text tag small round" style="position:absolute;left:-10px;bottom:26px">Community Forum</span></a>
<a href="https://manual.maboxlinux.org/en" class="tooltip"><span class="text tag small round" style="position:absolute;left:-10px;bottom:26px">Manual</span></a>
<a href="https://ko-fi.com/maboxlinux" class="tooltip"><span style="color:red"></span><span class="text tag small round" style="position:absolute;left:-10px;bottom:26px">Donate</span></a>
</p>
</div>
</div>
<div style="margin-left:140px">
<div style="margin-left:20%;" class="small">
<section id="Colorizer" class="w3-container tab w3-display-container" style="min-height:100vh;">
<a class="w3-button w3-round w3-tiny w3-lime w3-margin w3-display-topright" href="run://colorizer -s">Launch Colorizer</a>
<div class="w3-padding w3-display-middle w3-center">
<img src="/usr/share/mabox-colorizer/img/colorizer.png" />
<h2>Mabox Colorizer</h2>
<p>a tool to easily customize your Mabox Linux Desktop</p>
<section id="Colorizer" class="container tab" style="min-height:100vh;">
<div class="display-container" style="min-height:90vh">
<img src="/usr/share/mabox-colorizer/img/colorizer.png" class="right"/>
<h2 class="center">Mabox Colorizer <span class="tiny">pre-release</span></h2>
<p class="center"><i>a set of tools to easily customize<br/>your Mabox Linux Desktop</i></p>
<p>Easily change look and feel of:
<ul>
<li><strong><span class="tag round tiny light-green link" onclick="openTab(event, 'Openbox')">Openbox theme</span></strong> (window decorations)</li>
<li><strong><span class="tag round tiny light-green link" onclick="openTab(event, 'Jgmenu')">Menu/Sidepanels</span></strong> and other <i>jgmenu-based</i> <strong>Mabox tools</strong></li>
<li><strong><span class="tag round tiny light-green link" onclick="openTab(event, 'Conky')">Conkies</span></strong></li>
<li><strong><span class="tag round tiny amber link" onclick="openTab(event, 'Wall2theme')">Generate themes</span></strong> for all above <strong>from Wallpaper colors</strong></li>
<!--<li><strong>PyRadio</strong> - Internet Radio Player</li>//-->
</ul></p>
<p class="center">  Try <strong>Randomizer</strong> to change themes quickly. You can securely reset to defaults at any time.</p>
<div class="row">
<div class="half container">
<div class="card round padding deep-purple"><span class="right xxlarge"></span><p><em>Quickly <strong>randomize</strong> <br />colorschemes for...</em></p>
<div class="bar-block grey"><a class="button bar-item tiny" href="run://randomizer ob">Openbox theme</a>
<a class="button bar-item tiny" href="run://randomizer menu show">Menu / Sidepanels</a>
<a class="button bar-item tiny" href="run://randomizer conky">Conkies</a>
<a class="button bar-item tiny hover-yellow" href="run://randomizer all show">All above</a>
</div>
</div>
</div>
<div class="half container">
<div class="card round padding grey"><span class="right xxlarge"></span><p><em><strong>Reset</strong> to defaults...<br />(restore fresh install settings)</em></p>
<div class="bar-block dark-grey"><a class="button bar-item tiny" href="run://obtctl resetMBcolors">Openbox theme</a>
<a class="button bar-item tiny" href="run://jgctl resetMBcolors show">Menu / Sidepanels</a>
<a class="button bar-item tiny" href="run://conkyctl resetcolorsall">Conkies</a>
<a class="button bar-item tiny hover-yellow" href="run://randomizer resetall show">All above</a>
</div>
</div>
</div>
</div>
<br/>
<p>Colorizer offers two modes of operation: basic and advanced.
<ul>
<li><strong>basic</strong> - you use this window - easy and fast</li>
<li><strong>advanced</strong> - using dynamically generated menus - more customization possibilities, unlimited choice of colors. Tuning.</li>
</ul>
</p>
</div>
</section>
<section id="Openbox" class="container tab" style="display:none;min-height:100vh;">
<main class="grid">
<div class="gi4 gi4r left-align"><h2>Openbox window decoration</h2>
<p>The Openbox module allows you to easily customize the appearance of window decorations.</p>
<p>It works only with special theme - <strong>MBcolors</strong> <a class="tag round green tiny" href="run://obtctl theme MBcolors">switch to MBcolors</a></p>
<p><hr /></p>
<div class="pale-green leftbar border-green">
If you need a full set of options, precise color tuning and gradients - use the advanced dynamic menu<br />
<a class="button amber" href="run://colorizer-ob -s"> Openbox</a>
</div>
<p><hr /></p>
<strong>Size</strong> <em>presets</em><br />
<a class="tag small amber" href="run://obtctl tweak tiny">tiny</a>
<a class="tag small green" href="run://obtctl tweak small">small</a>
<a class="tag small pale-red" href="run://obtctl tweak normal">normal</a>
<a class="tag small green" href="run://obtctl tweak big">big</a>
<a class="tag small amber" href="run://obtctl tweak large">large</a>
<br />
<section id="Openbox" class="w3-container tab" style="display:none;min-height:100vh;">
<a class="w3-button w3-round w3-tiny w3-lime w3-margin w3-display-topright" href="run://colorizer-ob -s">Launch OBtheme module</a>
<h2>Openbox theme</h2>
</div>
<div class="gi2 dark"><span>Generate themes...</span></div>
<div class="gi2 dark"><strong>Monochrome</strong><br /><em>pick color from screen</em><br />
<a class="button padding-small dark-grey" href="run://obtctl mono pick dark"><span class="large"></span><br />Dark</a>
<a class="button padding-small grey" href="run://obtctl mono pick light"><span class="large"></span><br />Light</a>
<br />
</div>
<div class="gi2 dark"><strong>Wallpaper colors</strong><br /><em>choose variant</em><br />
<a class="button padding-small dark-grey" href="run://w2theme ob dark show"><span class="large"></span><br />Dark</a>
<a class="button padding-small grey" href="run://w2theme ob light show"><span class="large"></span><br />Light</a>
</div>
<div class="dark">
<a class="button padding-small amber" href="run://randomizer ob"><span class="large"></span><br />Random</a>
</div>
<div class="dark">
<a class="button padding-small teal hover-red" href="run://obtctl resetMBcolors"><span class="large"></span><br /> Reset </a>
</div>
</main>
<p><hr /></p>
<div class="show-inline-block">
<div class="bar border round dark-grey">
<div class="dropdown-hover">
<button class="button small border-right"> Window Border</button>
<div class="dropdown-content bar-block border dark-grey card">
<a class="bar-item btn" href="run://obtctl borderWidth 0">0</a>
<a class="bar-item btn" href="run://obtctl borderWidth 1">1</a>
<a class="bar-item btn" href="run://obtctl borderWidth 2">2</a>
<a class="bar-item btn" href="run://obtctl borderWidth 3">3</a>
<a class="bar-item btn" href="run://obtctl borderWidth 4">4</a>
<a class="bar-item btn" href="run://obtctl borderWidth 8">8</a>
</div>
</div>
<a class="bar-item btn hover-gray border-right" href="run://obtctl borderWidth increase">+</a>
<a class="bar-item btn hover-gray" href="run://obtctl borderWidth decrease">-</a>
</div>
</div>
<div class="show-inline-block">
<div class="bar border round dark-grey">
<div class="dropdown-hover">
<button class="button small border-right"> Title Padding</button>
<div class="dropdown-content bar-block border dark-grey card">
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 0">0</a>
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 1">1</a>
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 2">2</a>
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 3">3</a>
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 4">4</a>
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 6">6</a>
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 8">8</a>
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 10">10</a>
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 12">12</a>
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 16">16</a>
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 20">20</a>
</div>
</div>
<a class="bar-item btn hover-gray border-right" href="run://obtctl paddingHeight increase">+</a>
<a class="bar-item btn hover-gray" href="run://obtctl paddingHeight decrease">-</a>
</div>
</div>
<div class="show-inline-block">
<div class="bar border round dark-grey">
<div class="dropdown-hover">
<button class="button small border-right">Title bar style</button>
<div class="dropdown-content bar-block border dark-grey card">
<a class="bar-item btn tiny" href="run://obtctl raised 1">raised</a>
<a class="bar-item btn tiny" href="run://obtctl raised 0">flat</a>
<a class="bar-item btn tiny" href="run://obtctl raised 2">sunken</a>
</div>
</div>
</div>
</div>
<div class="show-inline-block">
<div class="bar border round dark-grey">
<div class="dropdown-hover">
<button class="button small border-right">Buttons</button>
<div class="dropdown-content bar-block border dark-grey card">
<a class="bar-item btn tiny" href="run://obtctl buttons tiny"><img src="./img/tiny.png">tiny</a>
<a class="bar-item btn tiny" href="run://obtctl buttons normal"><img src="./img/normal.png">normal</a>
<a class="bar-item btn tiny" href="run://obtctl buttons bold"><img src="./img/bold.png">bold</a>
<a class="bar-item btn tiny" href="run://obtctl buttons dots"><img src="./img/dots.png">dots</a>
<a class="bar-item btn tiny" href="run://obtctl buttons big-12">big 12px</a>
<a class="bar-item btn tiny" href="run://obtctl buttons big-14">big 14px</a>
</div>
</div>
</div>
</div>
<div class="panel panel display-container">Window title
<div class="display-topright medium colors"><span class="tiny">font color:</span>
<a class="tag " style="background-color:#FFFFFF" href="run://obtctl activetextcolor #FFFFFF">&nbsp;&nbsp;</a>
<a class="tag " style="background-color:#BBBBBB" href="run://obtctl activetextcolor #BBBBBB">&nbsp;&nbsp;</a>
<a class="tag " style="background-color:#60a917" href="run://obtctl activetextcolor #60a917">&nbsp;&nbsp;</a>
<a class="tag " style="background-color:#a20025" href="run://obtctl activetextcolor #a20025">&nbsp;&nbsp;</a>
<a class="tag " style="background-color:#e3c800" href="run://obtctl activetextcolor #e3c800">&nbsp;&nbsp;</a>
<a class="tag " style="background-color:#222222" href="run://obtctl activetextcolor #333333">&nbsp;&nbsp;</a>
<a class="tag " style="background-color:#000000" href="run://obtctl activetextcolor #000000">&nbsp;&nbsp;</a>
&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
</div>
</div>
<!-- FONT FAMILY AND SIZE //-->
<div class="show-inline-block">
<div class="bar border round dark-grey">
<a class="bar-item btn hover-gray border-right" href="run://mb-setfont obtitle">font family</a>
<div class="dropdown-hover">
<button class="button small border-right">size</button>
<div class="dropdown-content bar-block border dark-grey card">
<a class="bar-item btn tiny" href="run://obtctl fontsize 8">8</a>
<a class="bar-item btn tiny" href="run://obtctl fontsize 9">9</a>
<a class="bar-item btn tiny" href="run://obtctl fontsize 10">10</a>
<a class="bar-item btn tiny" href="run://obtctl fontsize 11">11</a>
<a class="bar-item btn tiny" href="run://obtctl fontsize 12">12</a>
<a class="bar-item btn tiny" href="run://obtctl fontsize 13">13</a>
<a class="bar-item btn tiny" href="run://obtctl fontsize 14">14</a>
<a class="bar-item btn tiny" href="run://obtctl fontsize 15">15</a>
<a class="bar-item btn tiny" href="run://obtctl fontsize 16">16</a>
</div>
</div>
<a class="bar-item btn hover-gray border-right" href="run://obtctl fontsize increase">+</a>
<a class="bar-item btn hover-gray" href="run://obtctl fontsize decrease">-</a>
</div>
</div>&nbsp;
<!-- WEIGHT AND SLANT: BOLD ITALIC //-->
<div class="show-inline-block">
<div class="bar border round dark-grey">
<a class="bar-item btn hover-gray border-right" href="run://obtctl fontweighttoggle"></a>
<a class="bar-item btn hover-gray" href="run://obtctl fontslanttoggle"></a>
</div>
</div>&nbsp;
<!-- TEXT JUSTIFY //-->
<div class="show-inline-block">
<div class="bar border round dark-grey">
<a class="bar-item btn hover-gray border-right" href="run://obtctl textjustify left"></a>
<a class="bar-item btn hover-gray border-right" href="run://obtctl textjustify center"></a>
<a class="bar-item btn hover-gray" href="run://obtctl textjustify right"></a>
</div>
</div>&nbsp;
<!-- SHADOW EFFECT //-->
<div class="show-inline-block">
<div class="bar border round">
<div class="dropdown-hover dark-grey">
<button class="button small">shadow</button>
<div class="dropdown-content bar-block border dark-grey card">
<a class="bar-item btn tiny" href="run://obtctl shadow 0">no shadow</a>
<a class="bar-item btn tiny" href="run://obtctl shadow 1">dark</a>
<a class="bar-item btn tiny" href="run://obtctl shadow 2">light</a>
</div>
</div>
</div>
</div>
<div class="row margin-top">
<div class="col m5 black round">
<p class="center">Title bar color</p>
<p class="center">for active window</p>
<div class="center padding colors">
<a class="tag large" style="background-color:#DDDDDD" href="run://obtctl clractivebg #DDDDDD">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#a4c400" href="run://obtctl clractivebg #a4c400">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#60a917" href="run://obtctl clractivebg #60a917">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#008a00" href="run://obtctl clractivebg #008a00">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#00aba9" href="run://obtctl clractivebg #00aba9">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#1ba1e2" href="run://obtctl clractivebg #1ba1e2">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#3e65ff" href="run://obtctl clractivebg #3e65ff">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#0050ef" href="run://obtctl clractivebg #0050ef">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#6a00ff" href="run://obtctl clractivebg #6a00ff">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#aa00ff" href="run://obtctl clractivebg #aa00ff">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#f472d0" href="run://obtctl clractivebg #f472d0">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#d80073" href="run://obtctl clractivebg #d80073">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#a20025" href="run://obtctl clractivebg #a20025">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#e51400" href="run://obtctl clractivebg #e51400">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#fa6800" href="run://obtctl clractivebg #fa6800">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#f0a30a" href="run://obtctl clractivebg #f0a30a">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#e3c800" href="run://obtctl clractivebg #e3c800">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#825a2c" href="run://obtctl clractivebg #825a2c">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#6d8764" href="run://obtctl clractivebg #6d8764">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#647687" href="run://obtctl clractivebg #647687">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#76608a" href="run://obtctl clractivebg #76608a">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#87794e" href="run://obtctl clractivebg #87794e">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#a0522d" href="run://obtctl clractivebg #a0522d">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#222222" href="run://obtctl clractivebg #222222">&nbsp;&nbsp;</a>
<p><a class="tag dark-gray" href="run://mbclr pixelcolor obtctl clractivebg"><big></big> Pick from screen</a></p>
</div>
</div>
<div class="col m1">&nbsp;</div>
<div class="col black m6 round">
<p class="center">Gradient type</p>
<p class="center">
<a href="run://obtctl gradient_type solid"><img src="./img/solid.png"></a>
<a href="run://obtctl gradient_type vertical"><img src="./img/vertical.png"></a>
<a href="run://obtctl gradient_type horizontal"><img src="./img/horizontal.png"></a>
<a href="run://obtctl gradient_type mirrorhorizontal"><img src="./img/mirrorhorizontal.png"></a>
<a href="run://obtctl gradient_type splitvertical"><img src="./img/splitvertical.png"></a>
<a href="run://obtctl gradient_type diagonal"><img src="./img/diagonal.png"></a>
<a href="run://obtctl gradient_type crossdiagonal"><img src="./img/crossdiagonal.png"></a>
<a href="run://obtctl gradient_type pyramid"><img src="./img/pyramid.png"></a>
</p>
<p class="padding">More than 300 beautifull pre-defined gradients are available from Colorizer OBtheme menu.</p>
</div>
</div>
</section>
<section id="Jgmenu" class="container tab" style="display:none;min-height:100vh">
<main class="grid">
<div class="gi4 gi4r left-align"><h2>Menu / Side panels</h2>
<p>Menu / Side panels and numerous Mabox tools were created based on jgmenu. You can easily adapt them to your needs - both <strong>appearance</strong> and <strong>functionality</strong></p>
<br />
<p><hr /></p>
<div class="pale-red leftbar border-red">
After each change, the menu will be shown.<br />
Use <kbd>Esc</kbd> or click outside the menu to close it!
</div>
<p><hr /></p>
<div class="pale-green leftbar border-green">
If you need a full set of options, precise color tuning and transparency - use the advanced dynamic menu<br />
<a class="button small amber" href="run://colorizer-menus -s"> Menu</a>
</div>
</div>
<div class="gi2 dark"><span>Generate themes...</span></div>
<div class="gi2 dark"><strong>Monochrome</strong><br /><em>pick color from screen</em><br />
<a class="button padding-small dark-grey" href="run://jgctl mono pick dark"><span class="large"></span><br />Dark</a>
<a class="button padding-small grey" href="run://jgctl mono pick light"><span class="large"></span><br />Light</a>
<br />
</div>
<div class="gi2 dark"><strong>Wallpaper colors</strong><br /><em>choose variant</em><br />
<a class="button padding-small dark-grey" href="run://w2theme menu dark show"><span class="large"></span><br />Dark</a>
<a class="button padding-small grey" href="run://w2theme menu light show"><span class="large"></span><br />Light</a>
</div>
<div class="dark">
<a class="button padding-small amber" href="run://randomizer menu show"><span class="large"></span><br />Random</a>
</div>
<div class="dark">
<a class="button padding-small teal hover-red" href="run://jgctl resetMBcolors show"><span class="large"></span><br /> Reset </a>
</div>
</main>
<p><hr /></p>
<main class="grid" style="grid-template-columns: auto auto auto;">
<div class="dark"><strong>Menu size</strong> <em>presets</em><br />
<a class="tag small amber" href="run://jgctl tweak sizing tight menu">tight</a>
<a class="tag small pale-red" href="run://jgctl tweak sizing normal menu">normal</a>
<a class="tag small green" href="run://jgctl tweak sizing wide menu">wide</a>
</div>
<div class="gi2 gi2r attribs dark">
<strong>Padding</strong>
<p>
<a class="tag dark-grey" href="run://jgctl padding 0">0</a><a class="tag dark-grey" href="run://jgctl padding 1">1</a><a class="tag dark-grey" href="run://jgctl padding 2">2</a><a class="tag dark-grey" href="run://jgctl padding 3">3</a><a class="tag dark-grey" href="run://jgctl padding 4">4</a><a class="tag dark-grey" href="run://jgctl padding 6">6</a><a class="tag dark-grey" href="run://jgctl padding 8">8</a><a class="tag dark-grey" href="run://jgctl padding 12">12</a><a class="tag dark-grey" href="run://jgctl padding 16">16</a><a class="tag dark-grey" href="run://jgctl padding 20">20</a>
</p>
<hr />
<strong>Menu Border</strong>
<p><a class="tag dark-grey" href="run://jgctl border 0">0</a><a class="tag dark-grey" href="run://jgctl border 1">1</a><a class="tag dark-grey" href="run://jgctl border 2">2</a><a class="tag dark-grey" href="run://jgctl border 3">3</a><a class="tag dark-grey" href="run://jgctl border 4">4</a><a class="tag dark-grey" href="run://jgctl border 6">6</a><a class="tag dark-grey" href="run://jgctl border 8">8</a><a class="tag dark-grey" href="run://jgctl border 12">12</a>
</p>
<hr />
<strong>Submenu spacing</strong>
<p><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=-20">-20</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=-16">-16</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=-10">-10</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=-6">-6</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=-2">-2</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=0">0</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=1">1</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=2">2</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=4">4</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=8">8</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=12">12</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=16">16</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=20">20</a></p>
<hr />
<strong>Item height</strong>
<p><a class="tag dark-grey" href="menu://mb-setvar item_height_factor=160">80%</a><a class="tag dark-grey" href="menu://mb-setvar item_height_factor=180">90%</a><a class="tag dark-grey" href="menu://mb-setvar item_height_factor=200">100%</a><a class="tag dark-grey" href="menu://mb-setvar item_height_factor=220">110%</a><a class="tag dark-grey" href="menu://mb-setvar item_height_factor=240">120%</a><a class="tag dark-grey" href="menu://mb-setvar item_height_factor=280">140%</a></p>
</div>
<div class="dark">
<a class="tag small purple" href="run://mb-jgtools main ipc"> Main menu</a> settings<br />
<p class="dark-gray"><kbd>Super</kbd> key, <i>left-click</i> on desktop or from Mabox icon in panel</p>
<p class="left-align">
<a class="tag small purple" href="run://jgctl t_search_field"></a> Search field<br />
<a class="tag small purple" href="run://jgctl t_apps_in_submenu"></a> Apps in rootmenu (or submenu)
<a class="tag small purple" href="run://jgctl t_icons"></a> Icons<br />
</p>
<hr />
<strong>Edit commands</strong>
<p>
<a class="tag small amber" href="config://.config/mabox/favorites.csv"> on top (Favorites)</a>
<a class="tag small amber" href="config://.config/mabox/mainmenu_below_apps.csv"> on bottom</a><br /></p>
</div>
</main>
</section>
<section id="Jgmenu" class="w3-container tab" style="display:none;min-height:100vh">
<a class="w3-button w3-round w3-tiny w3-lime w3-margin w3-display-topright" href="run://colorizer-menus -s">Launch Menus module</a>
<h2>Menu / Sidepanels</h2>
<section id="Conky" class="container tab" style="display:none;min-height:100vh;">
<main class="grid">
<div class="gi4 gi4r left-align"><h2>Conky</h2>
<p>Mabox provides several Conky configurations. <i>click names below to toggle</i></p>
<p class="center">
System Info<br />
<a class="tag small teal" href="run://conkyctl toggleone sysinfo_mbcolor">Default</a>
<a class="tag small teal" href="run://conkyctl toggleone sysinfo_graph">with Graph</a>
<a class="tag small teal" href="run://conkyctl toggleone mabox_info">Mini</a><br />
<a class="tag small teal" href="run://conkyctl toggleone CPU">CPU</a>
<a class="tag small teal" href="run://conkyctl toggleone RAM">RAM</a>
<a class="tag small teal" href="run://conkyctl toggleone mount_points">Discs</a>
<a class="tag small teal" href="run://conkyctl toggleone Network">Network</a><br />
Educational</br />
<a class="tag small teal" href="run://conkyctl toggleone shortcuts_mbcolor">Shortcuts</a>
<a class="tag small teal" href="run://conkyctl toggleone PCmanFM">PCmanFM</a>
<a class="tag small teal" href="run://conkyctl toggleone tiling_terminal">Terminal</a>
<a class="tag small teal" href="run://conkyctl toggleone mabox_tools_">Mabox Tools</a><br />
Clock and others<br />
<a class="tag small teal" href="run://conkyctl toggleone clock_mbcolor">Clock</a>
<a class="tag small teal" href="run://conkyctl toggleone clock_and_date">Clock and Date</a>
<a class="tag small teal" href="run://conkyctl toggleone quoter_">Quotes</a>
<a class="tag small teal" href="run://conkyctl toggleone logo_">Logo</a>
</p>
<p><hr /></p>
<div class="pale-green leftbar border-green">
For more options use dynamic menu <a class="button amber" href="run://colorizer-conky -s"> Conky Manager & Colorizer</a>
</div>
</div>
<div class="gi2 dark"><span>Generate themes...</span></div>
<div class="gi2 dark"><strong>Monochrome</strong><br /><em>pick color from screen</em><br />
<a class="button padding-small dark-grey" href="run://conkyctl mono pick dark"><span class="large"></span><br />Dark</a>
<a class="button padding-small grey" href="run://conkyctl mono pick light"><span class="large"></span><br />Light</a>
<br />
</div>
<div class="gi2 dark"><strong>Wallpaper colors</strong><br /><em>choose variant</em><br />
<a class="button padding-small dark-grey" href="run://w2theme conky dark show"><span class="large"></span><br />Dark</a>
<a class="button padding-small grey" href="run://w2theme conky light show"><span class="large"></span><br />Light</a>
</div>
<div class="dark">
<a class="button padding-small amber" href="run://randomizer conky"><span class="large"></span><br />Random</a>
</div>
<div class="dark">
<a class="button padding-small teal hover-red" href="run://conkyctl resetcolorsall"><span class="large"></span><br /> Reset </a>
</div>
</main>
<p><hr /></p>
<p>Conky in Mabox has been equipped with additional powers not available in any other Linux distribution!</p>
<h5>Easy on screen arranging</h5>
<p>
<a class="tag small black" href="run://conkyctl makemoveableall">󰆾 Make Moveable all </a> and change Conkys position by dragging one by one. (Hold <kbd>Alt</kbd> while dragging)
</p>
<h5>Right mouse click for customization context menu</h5>
<p>Click <strong>right mouse button</strong> on any Conky for <strong>context menu</strong>, which allows you to:
<ul>
<li>apply one of the ready-made color themes for the selected Conky</li>
<li>set text colors, borders, shadow or outline effects</li>
<li>manually change the background color or make it transparent</li>
<li>disable (kill), reload or edit Conky</li>
<li>add or edit custom commands for left click (see below)</li>
</ul>
</p>
<h5>Own command(s) Launcher (or menu) on left click on Conky</h5>
<p>You can add <strong>your own commands</strong> to each Conky, which will be shown on <strong>left mouse click</strong>.</p>
<p>To edit commands, right-click on a single Conky and select -> <strong>Edit cmd...</strong> from the menu.</p>
<p>If only one command is defined, Conky will act like a launcher (icon) - firing up command immediately after left click.
If you add more commands, a menu will be shown.</p>
<p><a class="tag small teal" href="run://conkyctl toggleone sysinfo_mbcolor">Default</a> and <a class="tag small teal" href="run://conkyctl toggleone logo_">Logo</a> Conky already have predefined commands, left-click on them to see this feature in action.</p>
<p>Syntax for adding commands is very simple, see blog post: <a href="https://blog.maboxlinux.org/how-to-add-custom-commands-to-menu-and-sidepanels/">How to add custom commands to Menu and SidePanels</a></p>
<h5>Tips</h5>
<div class="panel dark-grey rightbar border-black border">
<p>Click actions on any Conky:</p>
<p><kbd>right click</kbd> to access <strong>context menu</strong></p>
<p><kbd>left click</kbd> to <strong>run command</strong> or <strong>show menu</strong> (if defined)</p>
<p><kbd>Super</kbd> + <kbd>left click</kbd> will make all Conkies moveable</p>
<p>Global shortcut:</p>
<p><kbd>Super</kbd> + <kbd>C</kbd> - <strong>toggle Conky session</strong> - start/stop all Conkies</p>
</div>
</section>
<section id="Wall2theme" class="container tab" style="display:none;min-height:100vh;">
<h2>Generating themes from wallpaper</h2>
<div class="row">
<div class="twothird">
<p>Colorizer generates a color palette based on the currently set wallpaper</p>
<p>Based on such a color palette, it is possible to use two versions of themes (dark and light) for:
<ul>
<li>OpenBox window decoration</li>
<li>Menus, Panels</li>
<li>Conky</li>
</ul>
</p>
<p>Try how it works...</p>
</div>
<div class="third">
<div class="card round padding deep-purple"><span class="right xxlarge"></span>
<p><br /><strong>Set Wallpaper</strong></p>
<div class="bar-block grey">
<a class="button bar-item tiny" href="run://pcmanwp">Select</a>
<a class="button bar-item tiny" href="run://nitrogen --random /usr/share/backgrounds --set-scaled --save">Random System Wallpaper</a>
<a class="button bar-item tiny" href="run://nitrogen --random wallpapers --set-scaled --save">Random User Wallpaper</a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="third">
<div class="card round padding dark-grey"><span class="right xxlarge"></span>
<p><br /><strong>Window decorations</strong></p>
<div class="bar-block grey">
<a class="button bar-item tiny" href="run://w2theme ob dark">Dark</a>
<a class="button bar-item tiny" href="run://w2theme ob light">Light</a>
</div>
<div class="bar-block grey" style="margin-top:1px;">
<a class="button bar-item tiny hover-green" href="run://colorizer-ob -s"><span class="right large"></span> Customize</a>
</div>
<div class="bar-block grey" style="margin-top:1px;">
<a class="button bar-item tiny hover-red" href="run://obtctl resetonlycolors"><span class="right large"></span >Reset</a>
</div>
</div>
</div>
<div class="third">
<div class="card round padding blue-gray"><span class="right xxlarge"></span>
<p><br /><strong>Menu, Panels</strong></p>
<div class="bar-block grey">
<a class="button bar-item tiny" href="run://w2theme menu dark show">Dark</a>
<a class="button bar-item tiny" href="run://w2theme menu light show">Light</a>
</div>
<div class="bar-block grey" style="margin-top:1px;">
<a class="button bar-item tiny hover-green" href="run://colorizer-menus -s"><span class="right large"></span> Customize</a>
</div>
<div class="bar-block grey" style="margin-top:1px;">
<a class="button bar-item tiny hover-red" href="run://jgctl resetMBcolors show"><span class="right large"></span>Reset</a>
</div>
</div>
</div>
<div class="third">
<div class="card round padding brown"><span class="right xxlarge"></span>
<p><br/><strong>Conky</strong></p>
<div class="bar-block grey">
<a class="button bar-item tiny" href="run://w2theme conky dark">Dark</a>
<a class="button bar-item tiny" href="run://w2theme conky light">Light</a>
</div>
<div class="bar-block grey" style="margin-top:1px;">
<a class="button bar-item tiny hover-green" href="run://colorizer-conky -s"><span class="right large"></span> Customize</a>
</div>
<div class="bar-block grey" style="margin-top:1px;">
<a class="button bar-item tiny hover-red" href="run://conkyctl resetcolorsall"><span class="right large"></span >Reset</a>
</div>
</div>
</div>
</div>
<h5>How to change wallpaper in Mabox?</h5>
<p>The recommended method is to use the context menu in the file manager.</p>
<p>Click <a class="tag small amber" href="run://pcmanwp"> Select wallpaper</a> - the file manager will be launched with all defined wallpaper directories in tabs. Use the context menu to set the selected wallpaper.
<kbd>Ctrl + 3</kbd> allows you to change the view mode to Thumbnails</p>
<p>You can define multiple directories where you store wallpapers<br />
<a class="tag small amber" href="config://.config/mabox/wallp_dirs.conf"> Configure directories</a></p>
</section>
<section id="fonts" class="container tab" style="display:none;min-height:100vh">
<div class="fixed">
<div class="bar">
<a class="button bar-item small grey hover-amber right" href="run://colorizer-fonts -s"> Fonts - dynamic menu</a>
</div>
</div>
<h2>Fonts</h2>
<p> To set fonts for Openbox window decorations, GTK, Conky and Menu/Panels...<br />
use dynamic menu <a class="button amber" href="run://colorizer-fonts -s"> Fonts</a>
</p>
</section>
<section id="pyradiocava" class="container tab" style="display:none;min-height:100vh;">
<div class="fixed">
<div class="bar">
<a class="button bar-item small grey hover-amber right" href="run://colorizer-cava -s">󰺢 Colorizer Cava</a>
</div>
</div>
<h3>Cava - Audio Visualizer</h3>
<p><strong>Cava</strong> is a bar spectrum audio visualizer for terminal.<br />
In Mabox you can easily run Cava in a transparent* terminal - which gives an interesting effect...</p>
<p><a class="tag small amber" href="run://mb-music cavastart">󰺢 Start</a>
<a class="tag small red" href="run://mb-music cavakill"> Kill</a>
<a class="tag small green" href="run://cavactl info"> Info</a> </p>
<p>*) compositor is required for transparency, toggle <a class="tag small purple" href="run://compton_toggle"> Picom</a></p>
<div class="row-padding stretch">
<div class="third center colors">
<p><strong>Color</strong></p>
<a class="tag large" style="background-color:#DDDDDD" href="run://cavactl foreground #DDDDDD">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#a4c400" href="run://cavactl foreground #a4c400">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#60a917" href="run://cavactl foreground #60a917">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#008a00" href="run://cavactl foreground #008a00">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#00aba9" href="run://cavactl foreground #00aba9">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#1ba1e2" href="run://cavactl foreground #1ba1e2">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#3e65ff" href="run://cavactl foreground #3e65ff">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#0050ef" href="run://cavactl foreground #0050ef">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#6a00ff" href="run://cavactl foreground #6a00ff">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#aa00ff" href="run://cavactl foreground #aa00ff">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#f472d0" href="run://cavactl foreground #f472d0">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#d80073" href="run://cavactl foreground #d80073">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#a20025" href="run://cavactl foreground #a20025">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#e51400" href="run://cavactl foreground #e51400">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#fa6800" href="run://cavactl foreground #fa6800">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#f0a30a" href="run://cavactl foreground #f0a30a">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#e3c800" href="run://cavactl foreground #e3c800">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#825a2c" href="run://cavactl foreground #825a2c">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#6d8764" href="run://cavactl foreground #6d8764">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#647687" href="run://cavactl foreground #647687">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#76608a" href="run://cavactl foreground #76608a">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#87794e" href="run://cavactl foreground #87794e">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#a0522d" href="run://cavactl foreground #a0522d">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#222222" href="run://cavactl foreground #222222">&nbsp;&nbsp;</a>
<p><a class="tag dark-gray" href="run://mbclr pixelcolor cavactl foreground"><big></big> Pick from screen</a></p>
</div>
<!--<div class="col m1 center">
<p>&nbsp;</p>
</div>//-->
<div class="third center dark colors">
<p><strong>Bar width (px)</strong></p>
<p>
<a class="tag dark-gray" href="run://cavactl bar_width 1">1</a>
<a class="tag dark-gray" href="run://cavactl bar_width 2">2</a>
<a class="tag dark-gray" href="run://cavactl bar_width 3">3</a>
<a class="tag dark-gray" href="run://cavactl bar_width 4">4</a>
<a class="tag dark-gray" href="run://cavactl bar_width 5">5</a>
<a class="tag dark-gray" href="run://cavactl bar_width 6">6</a>
<a class="tag dark-gray" href="run://cavactl bar_width 8">8</a>
<a class="tag dark-gray" href="run://cavactl bar_width 10">10</a>
<a class="tag dark-gray" href="run://cavactl bar_width 12">12</a>
<a class="tag dark-gray" href="run://cavactl bar_width 16">16</a>
<a class="tag dark-gray" href="run://cavactl bar_width 20">20</a>
</p>
<p><strong>Spacing (px)</strong></p>
<p>
<a class="tag dark-gray" href="run://cavactl bar_spacing 0">0</a>
<a class="tag dark-gray" href="run://cavactl bar_spacing 1">1</a>
<a class="tag dark-gray" href="run://cavactl bar_spacing 2">2</a>
<a class="tag dark-gray" href="run://cavactl bar_spacing 3">3</a>
<a class="tag dark-gray" href="run://cavactl bar_spacing 4">4</a>
<a class="tag dark-gray" href="run://cavactl bar_spacing 5">5</a>
<a class="tag dark-gray" href="run://cavactl bar_spacing 6">6</a>
<a class="tag dark-gray" href="run://cavactl bar_spacing 8">8</a>
<a class="tag dark-gray" href="run://cavactl bar_spacing 10">10</a>
<a class="tag dark-gray" href="run://cavactl bar_spacing 12">12</a>
<a class="tag dark-gray" href="run://cavactl bar_spacing 16">16</a>
</p>
</div>
<!--<div class="col m1 center">
<p>&nbsp;</p>
</div>//-->
<div class="col m4 center colors">
<p><strong>Height (px)</strong></p>
width: 100%
<p><a class="tag dark-gray" href="run://mb-music cavastart 50 full">50</a> <a class="tag dark-gray" href="run://mb-music cavastart 100 full">100</a> <a class="tag dark-gray" href="run://mb-music cavastart 200 full">200</a></p>
width: 50%
<p><a class="tag dark-gray" href="run://mb-music cavastart 50 half">50</a> <a class="tag dark-gray" href="run://mb-music cavastart 100 half">100</a> <a class="tag dark-gray" href="run://mb-music cavastart 200 half">200</a></p>
</div>
</div>
<p>Use dynamic menu <a class="tag small orange" href="run://colorizer-cava -s">󰺢 Cava</a> to fine-tune colors, use gradients.</p>
<div class="panel dark-grey rightbar border-black border" style="margin-top:-2px;">
<p><a class="tag teal" href="run://mb-music -s">󰕾 Music & Sound</a> dynamic menu can serve as basic, lightweight music player (mpv-based) you might like to try. <i>Also available from panel's volume icon - right click</i></p>
</div>
<h3>PyRadio - Internet Radio</h3>
<div class="row">
<div class="twothird">
<p>PyRadio is advanced command line internet radio player.</p>
<p>You can turn on <strong>PyRadio</strong> <kbd>super</kbd>+<kbd>r</kbd></p>
<p>Colorizer can generate pyradio themes based on palette of currently used wallpaper.</p>
<p>Use Colorizer <a class="tag small orange" href="run://colorizer-pyradio -s"> PyRadio module </a> to fine-tune colors.</p>
</div>
<div class="third">
<div class="card round padding teal"><span class="right xxlarge"></span>
<p><br /><strong>PyRadio</strong></p>
<div class="bar-block grey">
<a class="button bar-item tiny" href="run://w2theme pyradio dark">Dark</a>
<a class="button bar-item tiny" href="run://w2theme pyradio light">Bright</a>
</div>
<div class="bar-block grey" style="margin-top:1px;">
<a class="button bar-item tiny hover-green" href="run://colorizer-pyradio -s"><span class="right large"></span> Customize</a>
</div>
<div class="bar-block grey" style="margin-top:1px;">
<a class="button bar-item tiny hover-red" href="run://prtctl resettheme"><span class="right large"></span>Reset</a>
</div>
</div>
</div>
</div>
</section>
<section id="Terminal" class="container tab" style="display:none;min-height:100vh">
<div class="fixed">
<div class="bar">
<a class="button bar-item small grey hover-amber right" href="termo://theme.sh -i2"> Terminal theme selector</a>
</div>
</div>
<h2>Terminal theme</h2>
<p>Mabox comes with many terminal themes available (~400)</p>
<p>The interactive selector will help you find a suitable theme (<kbd>Enter</kbd>/<kbd>Esc</kbd> - use selected theme, <kbd>Ctrl</kbd>+<kbd>c</kbd> - cancel)</p>
<p>You can run terminal theme selector any time from cli by <strong>th</strong> alias</p>
<h5>Different colors for root and SSH sessions</h5>
<img src="img/theme.sh.webp" />
<p>To change theme for <strong>ssh</strong> and <strong>root sessions</strong> edit <tt>~/.bashrc</tt></p>
<h5>Terminator and Quake-like terminal</h5>
<p>Terminator is default terminal in Mabox. Use <kbd>super + t</kbd> to run it in normal window or <kbd>F12</kbd> to start as quake-terminal (press <kbd>F12</kbd> again to show/hide it).</p>
<p>Terminator is a tiling terminal. You can run <a class="tag small teal" href="run://conkyctl toggleone tiling_terminal">educational Conky</a> showing you some shortcuts useful when working with terminator.</p>
</section>
<section id="Tint2" class="container tab" style="display:none;min-height:100vh;">
<h2>Tint2 panel</h2>
<p>Colorizer module for Tint2 panel is not available yet - currently in <strong>active development!</strong></p>
<p class="center"><em>You can support development if you like...</em></p><p class="center"><a class="button blue hover-indigo" href="https://ko-fi.com/maboxlinux"><span class="large"> 󰅶 </span> Buy me a coffee</a></p>
<p>For now... use quite powerfull Tint2 config menu.</p>
<p><a class="button inline round small lime hover-yellow " href="run://jgtint2-pipe -s"> Tint2 configuration menu</a></p>
<section id="Conky" class="w3-container tab" style="display:none;min-height:100vh;">
<a class="w3-button w3-round w3-tiny w3-lime w3-margin w3-display-topright" href="run://colorizer-conky -s">Launch Conky module</a>
<h2>Conky</h2>
<p><a class="button inline round small lime hover-yellow" href="run://jgtint2launcher -s"> Add/Remove Launchers to panel</a></p>
</section>
<section id="Tint2" class="w3-container tab" style="display:none;min-height:100vh;">
<h2>Panel Tint2</h2>
<p>Colorizer module for Tint2 panel is not available yet - planned</p>
<p>Use quite powerfull Tint2 config menu for now.</p>
<p><a class="w3-button w3-inline w3-round w3-tiny w3-lime" href="run://jgtint2-pipe -s">tint2 config menu</a></p>
</section>
<section id="Icons" class="w3-container tab" style="display:none;min-height:100vh;">
<h2>Icons</h2>
<p>Not available yet - planned</p>
<p></p>
<section id="Save" class="container tab" style="display:none;min-height:100vh;">
<div class="fixed"><a class="button round small lime hover-yellow margin display-topright" href="run://mb-obthemes"> Theme Manager</a></div>
<h2>Save and Restore</h2>
<p>If you are satisfied with your configuration, you can save it as a meta-theme so that you can restore it later.</p>
<p>Theme Manager will save:
<ul>
<li>Openbox Theme (window decoration)</li>
<li>GTK and Icon Theme</li>
<li>Wallpaper</li>
<li>Conkies</li>
<li>Terminal theme</li>
<li>Menu / Sidepanels colors</li>
<li>Tint2 panel</li>
</ul>
</p><a class="button round small lime hover-yellow margin" href="run://mb-obthemes"> Theme Manager</a>
</section>
@ -68,10 +861,10 @@ function openTab(evt, tabName) {
}
tablinks = document.getElementsByClassName("tablink");
for (i = 0; i < x.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" w3-gray", "");
tablinks[i].className = tablinks[i].className.replace(" bg", "");
}
document.getElementById(tabName).style.display = "block";
evt.currentTarget.className += " w3-gray";
evt.currentTarget.className += " bg";
}
function myFunction() {
var input, filter, table, tr, td, i;

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1,914 @@
<!DOCTYPE html>
<html>
<title>Mabox Colorizer</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="./css/w3.css">
<style>
@font-face{
font-family: "Symbols";
src: url("/usr/share/fonts/TTF/Symbols-2048-em Nerd Font Complete.ttf") format("truetype");
}
body{
background-color:#222222;
color: #999999;
font-size: 1.6vw !important;
font-family: 'Symbols', sans-serif;
}
.dark{background-color:#191919;}
div.fixed {
position: fixed;
top: 4px;
right: 0;
width: 400px;
}
div.fixeddown {
position: fixed;
bottom:0;
left:0;
width:20%;
}
nav button.tablink {padding:3px 8px !important;width:94%;float:right;text-align:left;border-left:4px solid transparent;}
nav button.tablink:hover {background-color:#444444 !important;color:white !important;border-left:4px solid #222222;}
nav button.bg {background-color:#222222;color:white !important;border-left:4px solid #34BE5B !important;border-radius:4px 0 0 4px;}
hr {margin:0;border: 0;height: 1px;background-image: linear-gradient(to right, rgba(105, 105, 105, 0), rgba(105, 105, 105, 0.75), rgba(105, 105, 105, 0));}
div.fixed .bar-item {margin-right:4px; border-radius:4px;}
.third {padding: 0.01em 4px;}
.button {position:relative;}
.button .right {position:absolute; top:0; right:6px;}
main div.dark .button{min-width:8vw;border-radius:2px;}
section.tab {padding-top: 0;}
section#Colorizer {padding-top: 0.01em;}
#logoheader {padding:16px 0 12px 0;background-color:#111111;border-bottom:1px solid #444444;}
#logo {width:8vw;height:8vw;}
div.fixeddown p {margin:0;}
p#links a {text-decoration:none;margin:0 4px;font-size:2.4vw !important;}
#links {background-color:#111111;border-top:1px solid #444444;}
.link {cursor:pointer;}
.bar-block .btn {width: 100px;text-align:center;}
.bar-block .btn:hover {background-color:white;color:gray;}
.dropdown-content {min-width: 20px;}
a.tag {text-decoration:none; border:none;margin-bottom: 4px;border-radius:3px; padding:1px 6px;filter: brightness(0.8);}
a.tag:hover {text-decoration:none; border:none;margin-bottom: 4px;filter: brightness(1);}
.colors a.tag {border-radius:0;border:1px solid #333333;filter: brightness(1);}
.colors a.tag:hover {border:1px solid #EEEEEE;}
.attribs a.tag {margin-left:0;margin-right:1px;border:none;border-radius:0;filter: brightness(0.8);}
.attribs a.tag:hover {margin-left:0; margin-right:1px;border:none;border-radius:0;filter: brightness(1);}
kbd {
background-color: #eee;
border-radius: 3px;
border: 1px solid #b4b4b4;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), 0 2px 0 0 rgba(255, 255, 255, 0.7) inset;
color: #333;
display: inline-block;
font-size: 0.85em;
font-weight: 700;
line-height: 1;
padding: 2px 4px;
white-space: nowrap;
}
.small {font-size: 1.5vw !important;}
.tiny {font-size: 1.25vw !important;}
h2 {font-size: 3vw !important;}
h3 {font-size: 2.4vw !important;}
h4 {font-size: 2.2vw !important;}
h5 {font-size: 2vw !important;border-bottom: 1px solid;padding-left: 1em;}
.large {width:3.2vw !important;height:2.4vw !important;font-size: 2.4vw !important;}
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(8em, 1fr));
grid-gap: .5em;
}
.grid + .grid {
margin-top: .5em;
}
.grid div {
border: 0 solid currentcolor;
border-radius: 4px;
/**min-height: 15vh;**/
padding: 1em;
/**color: #0178d4;
background-color:#191919;**/
font-size: 1em;
text-align: center;
/**display: flex;
flex-direction: column;**/
justify-content: center;
}
.gi2 {grid-column: span 2;}
.gi3 {grid-column: span 3;}
.gi4 {grid-column: span 4;}
.gi22 {
grid-column: span 2;
grid-row: span 2;
}
.gi2r{grid-row: span 2;}
.gi3r{grid-row: span 3;}
.gi4r{grid-row: span 4;}
</style>
<body>
<div class="sidebar bar-block" style="background-color:#333333;width:20%">
<div class="center" id="logoheader">
<svg id="logo" viewBox="0 0 128 128">
<polygon points="4,4 58,4 58,58 4,58" style="fill:#674EA7;stroke:white;stroke-width:4;fill-rule:nonzero;"/>
<polygon points="68,4 124,4 124,58 68,58" style="fill:#34BE5B;stroke:white;stroke-width:4;fill-rule:nonzero;"/>
<polygon points="4,68 58,68 58,124 4,124" style="fill:#FF8C00;stroke:white;stroke-width:4;fill-rule:nonzero;"/>
<polygon points="68,68 124,68 124,124 68,124" style="fill:#5e81ac;stroke:white;stroke-width:4;fill-rule:nonzero;"/>
</svg><br />
<span class="small">Colorizer</span>
</div>
<nav style="padding-top:8px;">
<button class="button small tablink bg" onclick="openTab(event, 'Colorizer')">Colorizer</button>
<button class="button small tablink" onclick="openTab(event, 'Openbox')">Motyw Openbox</button>
<button class="button small tablink" onclick="openTab(event, 'Conky')">Conky</button>
<button class="button small tablink" onclick="openTab(event, 'Jgmenu')">Menu/Panele Boczne</button>
<button class="button small tablink" onclick="openTab(event, 'Tint2')">Panel Tint2</button>
<button class="button small tablink" onclick="openTab(event, 'Wall2theme')">Kolory z tapety</button>
<button class="button small tablink" onclick="openTab(event, 'pyradiocava')"><i>Cava, PyRadio</i></button>
<button class="button small tablink" onclick="openTab(event, 'fonts')">Czcionki</i></button>
<button class="button small tablink" onclick="openTab(event, 'Terminal')">Kolory Terminala</button>
<button class="button small tablink" onclick="openTab(event, 'Save')">Zapisywanie</button>
</nav>
<div class="fixeddown">
<div class="center small" style="margin: 0 4px 4px 2px;">
<p><a class="tag small indigo" href="run://pcmanwp"> Wybierz tapetę</a> <a class="tag small indigo" href="run://mbwallpaper -o"></a></p>
<p><em>dynamiczne menu</em></p>
<p>
<a class="tag small purple" href="run://colorizer -s"> Colorizer</a><br />
<a class="tag small amber" href="run://colorizer-ob -s"> Openbox</a>
<a class="tag small amber" href="run://colorizer-conky -s"> Conky</a>
<a class="tag small amber" href="run://colorizer-menus -s"> Menu</a>
<a class="tag small amber" href="run://colorizer-fonts -s"> Czcionki</a><br />
<a class="tag small lime" href="run://colorizer-cava -s">󰺢 Cava</a>
<a class="tag small lime" href="run://colorizer-pyradio -s"> PyRadio</a>
</p>
</div>
<p id="links" class="center black">
<a href="https://maboxlinux.org" class="tooltip"><span class="text tag small round" style="position:absolute;left:-10px;bottom:26px">Strona domowa Mabox</span></a>
<a href="https://forum.maboxlinux.org" class="tooltip"><span class="text tag small round" style="position:absolute;left:-10px;bottom:26px">Forum społeczności</span></a>
<a href="https://manual.maboxlinux.org/en" class="tooltip"><span class="text tag small round" style="position:absolute;left:-10px;bottom:26px">Manual</span></a>
<a href="https://ko-fi.com/maboxlinux" class="tooltip"><span style="color:red"></span><span class="text tag small round" style="position:absolute;left:-10px;bottom:26px">Wesprzyj</span></a>
</p>
</div>
</div>
<div style="margin-left:20%;" class="small">
<section id="Colorizer" class="container tab" style="min-height:100vh;">
<div class="display-container" style="min-height:90vh">
<img src="/usr/share/mabox-colorizer/img/colorizer.png" class="right"/>
<h2 class="center">Mabox Colorizer <span class="tiny">pre-release</span></h2>
<p class="center"><i>narzędzie do dostrajania motywów<br />pulpitu Mabox Linux</i></p>
<p>Z łatwością zmienisz wygląd:
<ul>
<li><strong><span class="tag round tiny light-green link" onclick="openTab(event, 'Openbox')">Motywu Openbox</span></strong> (dekoracje okien)</li>
<li><strong><span class="tag round tiny light-green link" onclick="openTab(event, 'Jgmenu')">Menu oraz Paneli bocznych</span></strong> oraz innych <i>bazujących na jgmenu</i> <strong>narzędzi Mabox</strong></li>
<li><strong><span class="tag round tiny light-green link" onclick="openTab(event, 'Conky')">Conky</span></strong></li>
<li><strong><span class="tag round tiny amber link" onclick="openTab(event, 'Wall2theme')">Generowanie motywów</span></strong> na podstawie <strong>kolorystyki tapety</strong></li>
</ul></p>
<p class="center">  Wypróbuj <strong>Randomizer</strong> - szybko zmieniaj motywy. Bezpiecznie zresetuj gdy chcesz.</p>
<div class="row">
<div class="half container">
<div class="card round padding deep-purple"><span class="right xxlarge"></span><p><em>Ustaw <strong>losowy</strong> <br />motyw kolorystyczny dla...</em></p>
<div class="bar-block grey"><a class="button bar-item tiny" href="run://randomizer ob">Dekoracje okien Openbox</a>
<a class="button bar-item tiny" href="run://randomizer menu show">Menu / Panele boczne</a>
<a class="button bar-item tiny" href="run://randomizer conky">Conky</a>
<a class="button bar-item tiny hover-yellow" href="run://randomizer all show">Wszystko co powyżej</a>
</div>
</div>
</div>
<div class="half container">
<div class="card round padding grey"><span class="right xxlarge"></span><p><em><strong>Resetuj</strong> do ustawień domyślnych...<br />(jak zaraz po instalacji)</em></p>
<div class="bar-block dark-grey"><a class="button bar-item tiny" href="run://obtctl resetMBcolors">Dekoracje okien Openbox</a>
<a class="button bar-item tiny" href="run://jgctl resetMBcolors show">Menu / Panele boczne</a>
<a class="button bar-item tiny" href="run://conkyctl resetcolorsall">Conky</a>
<a class="button bar-item tiny hover-yellow" href="run://randomizer resetall show">Wszystko co powyżej</a>
</div>
</div>
</div>
</div>
<br />
<p>Colorizer oferuje dwa tryby pracy: podstawowy i zaawansowany.
<ul>
<li><strong>podstawowy</strong> - korzystasz z tego okna - łatwo i szybko</li>
<li><strong>zaawansowany</strong> - za pomocą dynamicznie generowanych menu - większe możliwości dostosowania, nieograniczony wybór kolorów. Dopieszczanie.</li>
</ul>
</p>
</div>
</section>
<section id="Openbox" class="container tab" style="display:none;min-height:100vh;">
<main class="grid">
<div class="gi4 gi4r left-align"><h2>Openbox dekoracja okien</h2>
<p>Moduł Openbox pozwala w łatwy sposób dostosować wygląd dekoracji okien</p>
<p>Działa z motywem domyślnym MBcolors.<br /> <a class="tag round green tiny" href="run://obtctl theme MBcolors">przełącz</a> <a class="tag round green tiny" href="run://obtctl resetMBcolors">Resetuj MBcolors</a></p>
<p><hr /></p>
<div class="pale-green leftbar border-green">
Jeśli potrzebujesz więcej opcji, precyzyjnego tuningu kolorów, gradientów - użyj zaawansowanego dynamicznego menu
<a class="button amber" href="run://colorizer-ob -s"> Openbox</a>
</div>
<p><hr /></p>
<strong>Rozmiar paska tytułu</strong> <em></em><br />
<a class="tag small amber" href="run://obtctl tweak tiny">mini</a>
<a class="tag small green" href="run://obtctl tweak small">mały</a>
<a class="tag small pale-red" href="run://obtctl tweak normal">normalny</a>
<a class="tag small green" href="run://obtctl tweak big">duży</a></a>
<a class="tag small amber" href="run://obtctl tweak large">wielki</a>
<br />
</div>
<div class="gi2 dark"><span>Generuj motywy...</span></div>
<div class="gi2 dark"><strong>Monochromatyczne</strong><br /><em>pobierz kolor z ekranu</em><br />
<a class="button padding-small dark-grey" href="run://obtctl mono pick dark"><span class="large"></span><br />Ciemny</a>
<a class="button padding-small grey" href="run://obtctl mono pick light"><span class="large"></span><br />Jasny</a>
<br />
</div>
<div class="gi2 dark"><strong>Kolory z tapety</strong><br /><em>wybierz wariant</em><br />
<a class="button padding-small dark-grey" href="run://w2theme ob dark show"><span class="large"></span><br />Ciemny</a>
<a class="button padding-small grey" href="run://w2theme ob light show"><span class="large"></span><br />Jasny</a>
</div>
<div class="dark">
<a class="button padding-small amber" href="run://randomizer ob"><span class="large"></span><br />Losowy</a>
</div>
<div class="dark">
<a class="button padding-small teal hover-red" href="run://obtctl resetMBcolors"><span class="large"></span><br />Resetuj</a>
</div>
</main>
<p><hr /></p>
<div class="show-inline-block">
<div class="bar border round dark-grey">
<div class="dropdown-hover">
<button class="button small border-right"> Obramowanie</button>
<div class="dropdown-content bar-block border dark-grey card">
<a class="bar-item btn" href="run://obtctl borderWidth 0">0</a>
<a class="bar-item btn" href="run://obtctl borderWidth 1">1</a>
<a class="bar-item btn" href="run://obtctl borderWidth 2">2</a>
<a class="bar-item btn" href="run://obtctl borderWidth 3">3</a>
<a class="bar-item btn" href="run://obtctl borderWidth 4">4</a>
<a class="bar-item btn" href="run://obtctl borderWidth 8">8</a>
</div>
</div>
<a class="bar-item btn hover-gray border-right" href="run://obtctl borderWidth increase">+</a>
<a class="bar-item btn hover-gray" href="run://obtctl borderWidth decrease">-</a>
</div>
</div>
<div class="show-inline-block">
<div class="bar border round dark-grey">
<div class="dropdown-hover">
<button class="button small border-right"> Odstęp</button>
<div class="dropdown-content bar-block border dark-grey card">
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 0">0</a>
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 1">1</a>
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 2">2</a>
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 3">3</a>
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 4">4</a>
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 6">6</a>
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 8">8</a>
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 10">10</a>
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 12">12</a>
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 16">16</a>
<a class="bar-item btn tiny" href="run://obtctl paddingHeight 20">20</a>
</div>
</div>
<a class="bar-item btn hover-gray border-right" href="run://obtctl paddingHeight increase">+</a>
<a class="bar-item btn hover-gray" href="run://obtctl paddingHeight decrease">-</a>
</div>
</div>
<div class="show-inline-block">
<div class="bar border round dark-grey">
<div class="dropdown-hover">
<button class="button small border-right">Styl</button>
<div class="dropdown-content bar-block border dark-grey card">
<a class="bar-item btn tiny" href="run://obtctl raised 1">podniesiony</a>
<a class="bar-item btn tiny" href="run://obtctl raised 0">płaski</a>
<a class="bar-item btn tiny" href="run://obtctl raised 2">wklęsły</a>
</div>
</div>
</div>
</div>
<div class="show-inline-block">
<div class="bar border round dark-grey">
<div class="dropdown-hover">
<button class="button small border-right">Przyciski</button>
<div class="dropdown-content bar-block border dark-grey card">
<a class="bar-item btn tiny" href="run://obtctl buttons tiny"><img src="./img/tiny.png">tiny</a>
<a class="bar-item btn tiny" href="run://obtctl buttons normal"><img src="./img/normal.png">normal</a>
<a class="bar-item btn tiny" href="run://obtctl buttons bold"><img src="./img/bold.png">bold</a>
<a class="bar-item btn tiny" href="run://obtctl buttons dots"><img src="./img/dots.png">dots</a>
<a class="bar-item btn tiny" href="run://obtctl buttons big-12">duże 12px</a>
<a class="bar-item btn tiny" href="run://obtctl buttons big-14">duże 14px</a>
</div>
</div>
</div>
</div>
<div class="panel display-container">Tytuł okna
<div class="display-topright medium"><span class="tiny">kolor czcionki:</span>
<a class="tag " style="background-color:#FFFFFF" href="run://obtctl activetextcolor #FFFFFF">&nbsp;&nbsp;</a>
<a class="tag " style="background-color:#BBBBBB" href="run://obtctl activetextcolor #BBBBBB">&nbsp;&nbsp;</a>
<a class="tag " style="background-color:#60a917" href="run://obtctl activetextcolor #60a917">&nbsp;&nbsp;</a>
<a class="tag " style="background-color:#a20025" href="run://obtctl activetextcolor #a20025">&nbsp;&nbsp;</a>
<a class="tag " style="background-color:#e3c800" href="run://obtctl activetextcolor #e3c800">&nbsp;&nbsp;</a>
<a class="tag " style="background-color:#222222" href="run://obtctl activetextcolor #333333">&nbsp;&nbsp;</a>
<a class="tag " style="background-color:#000000" href="run://obtctl activetextcolor #000000">&nbsp;&nbsp;</a>
&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
</div>
</div>
<!-- FONT FAMILY AND SIZE //-->
<div class="show-inline-block">
<div class="bar border round dark-grey">
<a class="bar-item btn hover-gray border-right" href="run://mb-setfont obtitle">czcionka</a>
<div class="dropdown-hover">
<button class="button small border-right">rozmiar</button>
<div class="dropdown-content bar-block border dark-grey card">
<a class="bar-item btn tiny" href="run://obtctl fontsize 8">8</a>
<a class="bar-item btn tiny" href="run://obtctl fontsize 9">9</a>
<a class="bar-item btn tiny" href="run://obtctl fontsize 10">10</a>
<a class="bar-item btn tiny" href="run://obtctl fontsize 11">11</a>
<a class="bar-item btn tiny" href="run://obtctl fontsize 12">12</a>
<a class="bar-item btn tiny" href="run://obtctl fontsize 13">13</a>
<a class="bar-item btn tiny" href="run://obtctl fontsize 14">14</a>
<a class="bar-item btn tiny" href="run://obtctl fontsize 15">15</a>
<a class="bar-item btn tiny" href="run://obtctl fontsize 16">16</a>
</div>
</div>
<a class="bar-item btn hover-gray border-right" href="run://obtctl fontsize increase">+</a>
<a class="bar-item btn hover-gray" href="run://obtctl fontsize decrease">-</a>
</div>
</div>&nbsp;
<!-- WEIGHT AND SLANT: BOLD ITALIC //-->
<div class="show-inline-block">
<div class="bar border round dark-grey">
<a class="bar-item btn hover-gray border-right" href="run://obtctl fontweighttoggle"></a>
<a class="bar-item btn hover-gray" href="run://obtctl fontslanttoggle"></a>
</div>
</div>&nbsp;
<!-- TEXT JUSTIFY //-->
<div class="show-inline-block">
<div class="bar border round dark-grey">
<a class="bar-item btn hover-gray border-right" href="run://obtctl textjustify left"></a>
<a class="bar-item btn hover-gray border-right" href="run://obtctl textjustify center"></a>
<a class="bar-item btn hover-gray" href="run://obtctl textjustify right"></a>
</div>
</div>&nbsp;
<!-- SHADOW EFFECT //-->
<div class="show-inline-block">
<div class="bar border round">
<div class="dropdown-hover dark-grey">
<button class="button small">cień</button>
<div class="dropdown-content bar-block border dark-grey card">
<a class="bar-item btn tiny" href="run://obtctl shadow 0">bez cienia</a>
<a class="bar-item btn tiny" href="run://obtctl shadow 1">ciemny</a>
<a class="bar-item btn tiny" href="run://obtctl shadow 2">jasny</a>
</div>
</div>
</div>
</div>
<div class="row margin-top">
<div class="col m5 black round">
<p class="center">Kolor paska tytułu</p>
<p class="center">aktywne okno</p>
<div class="center padding">
<a class="tag large" style="background-color:#DDDDDD" href="run://obtctl clractivebg #DDDDDD">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#a4c400" href="run://obtctl clractivebg #a4c400">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#60a917" href="run://obtctl clractivebg #60a917">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#008a00" href="run://obtctl clractivebg #008a00">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#00aba9" href="run://obtctl clractivebg #00aba9">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#1ba1e2" href="run://obtctl clractivebg #1ba1e2">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#3e65ff" href="run://obtctl clractivebg #3e65ff">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#0050ef" href="run://obtctl clractivebg #0050ef">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#6a00ff" href="run://obtctl clractivebg #6a00ff">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#aa00ff" href="run://obtctl clractivebg #aa00ff">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#f472d0" href="run://obtctl clractivebg #f472d0">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#d80073" href="run://obtctl clractivebg #d80073">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#a20025" href="run://obtctl clractivebg #a20025">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#e51400" href="run://obtctl clractivebg #e51400">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#fa6800" href="run://obtctl clractivebg #fa6800">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#f0a30a" href="run://obtctl clractivebg #f0a30a">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#e3c800" href="run://obtctl clractivebg #e3c800">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#825a2c" href="run://obtctl clractivebg #825a2c">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#6d8764" href="run://obtctl clractivebg #6d8764">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#647687" href="run://obtctl clractivebg #647687">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#76608a" href="run://obtctl clractivebg #76608a">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#87794e" href="run://obtctl clractivebg #87794e">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#a0522d" href="run://obtctl clractivebg #a0522d">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#222222" href="run://obtctl clractivebg #222222">&nbsp;&nbsp;</a>
<p><a class="tag dark-gray" href="run://mbclr pixelcolor obtctl clractivebg"><big></big> Pobierz z ekranu</a></p>
</div>
</div>
<div class="col m1">&nbsp;</div>
<div class="col black m6 round">
<p class="center">Typ Gradientu</p>
<p class="center">
<a href="run://obtctl gradient_type solid"><img src="./img/solid.png"></a>
<a href="run://obtctl gradient_type vertical"><img src="./img/vertical.png"></a>
<a href="run://obtctl gradient_type horizontal"><img src="./img/horizontal.png"></a>
<a href="run://obtctl gradient_type mirrorhorizontal"><img src="./img/mirrorhorizontal.png"></a>
<a href="run://obtctl gradient_type splitvertical"><img src="./img/splitvertical.png"></a>
<a href="run://obtctl gradient_type diagonal"><img src="./img/diagonal.png"></a>
<a href="run://obtctl gradient_type crossdiagonal"><img src="./img/crossdiagonal.png"></a>
<a href="run://obtctl gradient_type pyramid"><img src="./img/pyramid.png"></a>
</p>
</div>
</div>
</section>
<section id="Jgmenu" class="container tab" style="display:none;min-height:100vh">
<main class="grid">
<div class="gi4 gi4r left-align"><h2>Menu / Panele boczne</h2>
<p>Menu / Panele boczne oraz niemała liczba narzędzi Maboxa została stworzona na bazie jgmenu. W bardzo łatwy sposób możesz je dostosować do swoich potrzeb - zarówno <strong>wygląd</strong> jak i <strong>funkcjonalność</strong></p>
<br />
<p><hr /></p>
<div class="pale-red leftbar border-red">
Po każdej zmianie menu zostanie pokazane.<br />
Użyj <kbd>Esc</kbd> albo kliknij poza menu aby je zamknąć!
</div>
<p><hr /></p>
<div class="pale-green leftbar border-green">
Jeśli potrzebujesz pełen zestaw opcji, precyzyjnego dostrajania kolorów i przezroczystości - użyj zaawansowanego dynamicznego menu<br />
<a class="button small amber" href="run://colorizer-menus -s"> Menu</a>
</div>
</div>
<div class="gi2 dark"><span>Generuj motywy...</span></div>
<div class="gi2 dark"><strong>Monochromatyczny</strong><br /><em>pobierz kolor z ekranu</em><br />
<a class="button padding-small dark-grey" href="run://jgctl mono pick dark"><span class="large"></span><br />Ciemny</a>
<a class="button padding-small grey" href="run://jgctl mono pick light"><span class="large"></span><br />Jasny</a>
<br />
</div>
<div class="gi2 dark"><strong>Kolory z tapety</strong><br /><em>wybierz wariant</em><br />
<a class="button padding-small dark-grey" href="run://w2theme menu dark show"><span class="large"></span><br />Ciemny</a>
<a class="button padding-small grey" href="run://w2theme menu light show"><span class="large"></span><br />Jasny</a>
</div>
<div class="dark">
<a class="button padding-small amber" href="run://randomizer menu show"><span class="large"></span><br />Losowy</a>
</div>
<div class="dark">
<a class="button padding-small teal hover-red" href="run://jgctl resetMBcolors show"><span class="large"></span><br />Resetuj</a>
</div>
</main>
<p><hr /></p>
<main class="grid" style="grid-template-columns: auto auto auto;">
<div class="dark"><strong>Rozmiar Menu</strong> <em></em><br />
<a class="tag small amber" href="run://jgctl tweak sizing tight menu">wąskie</a>
<a class="tag small pale-red" href="run://jgctl tweak sizing normal menu">normalne</a>
<a class="tag small green" href="run://jgctl tweak sizing wide menu">szerokie</a>
</div>
<div class="gi2 gi2r attribs dark">
<strong>Odstęp (margines)</strong>
<p>
<a class="tag dark-grey" href="run://jgctl padding 0">0</a><a class="tag dark-grey" href="run://jgctl padding 1">1</a><a class="tag dark-grey" href="run://jgctl padding 2">2</a><a class="tag dark-grey" href="run://jgctl padding 3">3</a><a class="tag dark-grey" href="run://jgctl padding 4">4</a><a class="tag dark-grey" href="run://jgctl padding 6">6</a><a class="tag dark-grey" href="run://jgctl padding 8">8</a><a class="tag dark-grey" href="run://jgctl padding 12">12</a><a class="tag dark-grey" href="run://jgctl padding 16">16</a><a class="tag dark-grey" href="run://jgctl padding 20">20</a>
</p>
<hr />
<strong>Obramowanie Menu</strong>
<p><a class="tag dark-grey" href="run://jgctl border 0">0</a><a class="tag dark-grey" href="run://jgctl border 1">1</a><a class="tag dark-grey" href="run://jgctl border 2">2</a><a class="tag dark-grey" href="run://jgctl border 3">3</a><a class="tag dark-grey" href="run://jgctl border 4">4</a><a class="tag dark-grey" href="run://jgctl border 6">6</a><a class="tag dark-grey" href="run://jgctl border 8">8</a><a class="tag dark-grey" href="run://jgctl border 12">12</a>
</p>
<hr />
<strong>Odstęp dla podmenu</strong>
<p><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=-20">-20</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=-16">-16</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=-10">-10</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=-6">-6</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=-2">-2</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=0">0</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=1">1</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=2">2</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=4">4</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=8">8</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=12">12</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=16">16</a><a class="tag dark-grey" href="menu://mb-setvar submenu_spacing=20">20</a></p>
<hr />
<strong>Wysokość elementu</strong>
<p><a class="tag dark-grey" href="menu://mb-setvar item_height_factor=160">80%</a><a class="tag dark-grey" href="menu://mb-setvar item_height_factor=180">90%</a><a class="tag dark-grey" href="menu://mb-setvar item_height_factor=200">100%</a><a class="tag dark-grey" href="menu://mb-setvar item_height_factor=220">110%</a><a class="tag dark-grey" href="menu://mb-setvar item_height_factor=240">120%</a><a class="tag dark-grey" href="menu://mb-setvar item_height_factor=280">140%</a></p>
</div>
<div class="dark">
<a class="tag small purple" href="run://mb-jgtools main ipc"> Menu główne</a> ustawienia<br />
<p class="dark-gray">Klawisz <kbd>super</kbd>, <i>lewy-klik</i> na pulpicie lub z ikony w panelu</p>
<p class="left-align">
<a class="tag small purple" href="run://jgctl t_search_field"></a> Pole wyszukiwania<br />
<a class="tag small purple" href="run://jgctl t_apps_in_submenu"></a> Aplikacje w menu gł. (lub podmenu)
<a class="tag small purple" href="run://jgctl t_icons"></a> Ikony<br />
</p>
<hr />
<strong>Edytuj komendy</strong>
<p>
<a class="tag small amber" href="config://.config/mabox/favorites.csv"> góra (Ulubione)</a>
<a class="tag small amber" href="config://.config/mabox/mainmenu_below_apps.csv"> dół</a><br /></p>
</div>
</main>
</section>
<section id="Conky" class="container tab" style="display:none;min-height:100vh;">
<main class="grid">
<div class="gi4 gi4r left-align"><h2>Conky</h2>
<p>Mabox dostarcza kilkunastu konfiguracji Conky.<br /><em>Kliknij ich nazwy poniżej aby je wypróbować.</em></p>
<p class="center">Informacje systemowe<br />
<a class="tag small teal" href="run://conkyctl toggleone sysinfo_mbcolor">Domyślne</a>
<a class="tag small teal" href="run://conkyctl toggleone sysinfo_graph">Z grafem</a>
<a class="tag small teal" href="run://conkyctl toggleone mabox_info">Mini</a><br />
<a class="tag small teal" href="run://conkyctl toggleone CPU">CPU</a>
<a class="tag small teal" href="run://conkyctl toggleone RAM">RAM</a>
<a class="tag small teal" href="run://conkyctl toggleone mount_points">Dyski</a>
<a class="tag small teal" href="run://conkyctl toggleone Network">Sieć</a><br />
Edukacyjne</br />
<a class="tag small teal" href="run://conkyctl toggleone shortcuts_mbcolor">Skróty</a>
<a class="tag small teal" href="run://conkyctl toggleone PCmanFM">PCmanFM</a>
<a class="tag small teal" href="run://conkyctl toggleone tiling_terminal">Terminal</a>
<a class="tag small teal" href="run://conkyctl toggleone mabox_tools_">Narzędzia Maboxa</a><br />
Zegary i inne<br />
<a class="tag small teal" href="run://conkyctl toggleone clock_mbcolor">Zegar</a>
<a class="tag small teal" href="run://conkyctl toggleone clock_and_date">Zegar i Data</a>
<a class="tag small teal" href="run://conkyctl toggleone quoter_">Cytaty</a>
<a class="tag small teal" href="run://conkyctl toggleone logo_">Logo</a>
</p>
<p><hr /></p>
<div class="pale-green leftbar border-green">
Użyj dynamicznego menu aby mieć dostęp do większej ilości opcji<br /> <a class="button amber" href="run://colorizer-conky -s"> Conky Manager & Colorizer</a>
</div>
</div>
<div class="gi2 dark"><span>Generuj motywy...</span></div>
<div class="gi2 dark"><strong>Monochromatyczny</strong><br /><em>Pobierz kolor z ekranu</em><br />
<a class="button padding-small dark-grey" href="run://conkyctl mono pick dark"><span class="large"></span><br />Ciemny</a>
<a class="button padding-small grey" href="run://conkyctl mono pick light"><span class="large"></span><br />Jasny</a>
<br />
</div>
<div class="gi2 dark"><strong>Kolory z tapety</strong><br /><em>wybierz wariant</em><br />
<a class="button padding-small dark-grey" href="run://w2theme conky dark show"><span class="large"></span><br />Ciemny</a>
<a class="button padding-small grey" href="run://w2theme conky light show"><span class="large"></span><br />Jasny</a>
</div>
<div class="dark">
<a class="button padding-small amber" href="run://randomizer conky"><span class="large"></span><br />Losowy</a>
</div>
<div class="dark">
<a class="button padding-small teal hover-red" href="run://conkyctl resetcolorsall"><span class="large"></span><br />Resetuj</a>
</div>
</main>
<p><hr /></p>
<!-- <div class="grid">
<div class="black">
Click <a class="tag xxxlarge black" href="run://conkyctl makemoveableall">󰆾</a>
</div>
<div class="black">
Click <a class="tag xxxlarge black" href="run://conkyctl makemoveableall">󰆾</a>
</div>
<div class="black">
Click <a class="tag xxxlarge black" href="run://conkyctl makemoveableall">󰆾</a>
</div>
</div>
<button onclick="document.getElementById('cmdmenu').style.display='block'" class="button black">Open Modal</button>
-->
<div id="cmdmenu" class="modal">
<div class="modal-content animate-top">
<header class="container amber">
<span onclick="document.getElementById('cmdmenu').style.display='none'"
class="button display-topright">&times;</span>
<h6>Modal Header</h6>
</header>
<div class="container">
<p>Some text..</p>
<p>Some text..</p>
</div>
<footer class="container amber small">
<p>Modal Footer</p>
</footer>
</div>
</div>
<p>Conky w Maboxie zostały wyposażone w dodatkowe moce... niespotykane w żadnej innej dystrybucji!</p>
<h5>Wygodne rozmieszczanie na ekranie</h5>
<p>
Kliknij <a class="tag small black" href="run://conkyctl makemoveableall">󰆾 Ustaw wszystkie</a> i rozmieść Conky jak chcesz. (Przytrzymaj <kbd>Alt</kbd> podczas przeciągania)
</p>
<h5>Menu kontekstowe do konfiguracji pod prawym kliknieciem</h5>
<p>Kliknij <strong>prawym przyciskiem myszy</strong> na dowolnym Conky, a zobaczysz <strong>menu kontekstowe</strong>. Pozwala ono w wygodny sposób:
<ul>
<li>ustawiać kolory tekstu, obramowanie, efekt cienia lub obrysu</li>
<li>zmienić ręcznie kolor tła lub ustawić przezroczystość</li>
<li>zastosować jeden z gotowych motywów kolorystycznych dla wybranego Conky - lub dla wszystkich </li>
<li>wyłączyć (zabić), przeładować lub edytować Conky</li>
</ul>
</p>
<h5>Własne polecenia (lub menu) pod lewym kliknięciem w Conky</h5>
<p>Do każdego Conky możesz dodać <strong>własne polecenia</strong>, które zostaną pokazane po kliknięciu <strong>lewym przyciskiem myszy</strong>.</p>
<p>Aby je edytować kliknij prawym przyciskiem na wybrane Conky, a następnie wybierz <strong>Edytuj własne komendy</strong></p>
<p>Jeśli zdefiniowano tylko jedno polecenie, Conky będzie działać jak launcher (ikona) - uruchami polecenie natychmiast po kliknięciu lewym przyciskiem myszy. Jeśli dodasz więcej poleceń, wyświetli się menu.</p>
<p>Conky <a class="tag small teal" href="run://conkyctl toggleone sysinfo_mbcolor">Domyślne</a> oraz <a class="tag small teal" href="run://conkyctl toggleone logo_">Logo</a> mają już predefiniowane komendy, kliknij w nie lewym przyciskiem aby zobaczyć jak to działa.</p>
<h5>Porady</h5>
<div class="panel dark-grey rightbar border-black border">
<p><kbd>Super</kbd> + <kbd>C</kbd> - szybko <strong>Włącz / Wyłącz wszystkie Conky</strong></p>
</div>
<div class="panel dark-grey leftbar border-black border">
<p><strong>Szybkie rozmieszczanie Conky na ekranie</strong></p>
<p>Aby szybko rozmieścić Conky tak jak ci pasuje, przytrzymaj klawisz <kbd>Ctrl</kbd> i kliknij w dowolne Conky. Możesz teraz (z wciśniętym klawiszem <kbd>Alt</kbd>) przeciągać Conky w dowolne miejsce na pulpicie i zapisać nowe pozycje.</p>
</div>
</section>
<section id="Wall2theme" class="container tab" style="display:none;min-height:100vh;">
<h2>Generowanie motywów z tapety</h2>
<div class="row">
<div class="twothird">
<p>Colorizer generuje paletę kolorów na bazie aktualnie ustawionej tapety</p>
<p>Na bazie takiej palety kolorów możliwe jest zastosowanie dwóch wersji motywów (ciemny i jasny) dla:
<ul>
<li>dekoracji okien OpenBox</li>
<li>Menu, Paneli </li>
<li>Conky</li>
</ul>
</p>
<p>Wypróbuj jak to działa ...</p>
</div>
<div class="third">
<div class="card round padding deep-purple"><span class="right xxlarge"></span>
<p><br /><strong>Ustaw tapetę</strong></p>
<div class="bar-block grey">
<a class="button bar-item tiny" href="run://pcmanwp">Wybierz </a>
<a class="button bar-item tiny" href="run://nitrogen --random /usr/share/backgrounds --set-scaled --save">Losowa systemowa</a>
<a class="button bar-item tiny" href="run://nitrogen --random wallpapers --set-scaled --save">Losowa użytkownika</a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="third">
<div class="card round padding dark-grey"><span class="right xxlarge"></span>
<p><br /><strong>Dekoracje okien</strong></p>
<div class="bar-block grey">
<a class="button bar-item tiny" href="run://w2theme ob dark">Ciemne</a>
<a class="button bar-item tiny" href="run://w2theme ob light">Jasne</a>
</div>
<div class="bar-block grey" style="margin-top:1px;">
<a class="button bar-item tiny hover-green" href="run://colorizer-ob -s"><span class="right large"></span> Dostosuj</a>
</div>
<div class="bar-block grey" style="margin-top:1px;">
<a class="button bar-item tiny hover-red" href="run://obtctl resetonlycolors"><span class="right large"></span>Resetuj</a>
</div>
</div>
</div>
<div class="third">
<div class="card round padding blue-gray"><span class="right xxlarge"></span>
<p><br /><strong>Menu, Panele</strong></p>
<div class="bar-block grey">
<a class="button bar-item tiny" href="run://w2theme menu dark show">Ciemne</a>
<a class="button bar-item tiny" href="run://w2theme menu light show">Jasne</a>
</div>
<div class="bar-block grey" style="margin-top:1px;">
<a class="button bar-item tiny hover-green" href="run://colorizer-menus -s"><span class="right large"></span> Dostosuj</a>
</div>
<div class="bar-block grey" style="margin-top:1px;">
<a class="button bar-item tiny hover-red" href="run://jgctl resetMBcolors show"><span class="right large"></span>Resetuj</a>
</div>
</div>
</div>
<div class="third">
<div class="card round padding brown"><span class="right xxlarge"></span>
<p><br /><strong>Conky</strong></p>
<div class="bar-block grey">
<a class="button bar-item tiny" href="run://w2theme conky dark">Ciemne</a>
<a class="button bar-item tiny" href="run://w2theme conky light">Jasne</a>
</div>
<div class="bar-block grey" style="margin-top:1px;">
<a class="button bar-item tiny hover-green" href="run://colorizer-conky -s"><span class="right large"></span> Dostosuj</a>
</div>
<div class="bar-block grey" style="margin-top:1px;">
<a class="button bar-item tiny hover-red" href="run://conkyctl resetcolorsall"><span class="right large"></span>Resetuj</a>
</div>
</div>
</div>
</div>
<h5>Jak ustawić tapetę w Maboxie?</h5>
<p>Zalecaną metodą jest korzystanie z menu kontekstowego w menadżerze plików.</p>
<p>Kliknij <a class="tag small amber" href="run://pcmanwp"> Wybierz tapetę</a> - uruchomiony zostanie menadżer plików z wszystkimi zdefiniowanymi katalogami z tapetami w kartach. Użyj menu kontekstowego aby ustawić wybraną tapetę.
<kbd>Ctrl + 3</kbd> pozwala na zmianę trybu widoku na Miniatury</p>
<p>Możesz zdefiniować wiele katalogów, w których przechowujesz tapety<br />
<a class="tag small amber" href="config://.config/mabox/wallp_dirs.conf"> Konfiguruj katalogi</a></p>
</section>
<section id="pyradiocava" class="container tab" style="display:none;min-height:100vh;">
<div class="fixed">
<div class="bar">
<a class="button bar-item small grey hover-amber right" href="run://colorizer-cava -s">󰺢 Colorizer Cava</a>
</div>
</div>
<h3>Cava - wizualizacja dźwięku</h3>
<p><strong>Cava</strong> to słupkowy wizualizator dźwięku dla terminala. <br />
W Maboxie możesz łatwo uruchomić Cava w przezroczystym* terminalu - co daje ciekawy efekt...
</p>
<p><a class="tag small amber" href="run://mb-music cavastart">󰺢 Uruchom</a>
<a class="tag small red" href="run://mb-music cavakill"> Zabij</a>
<a class="tag small green" href="run://cavactl info"> Info</a>
</p>
<p>*) dla przezroczystości wymagany jest menedżer kompozycji <a class="tag small purple" href="run://compton_toggle"> Picom</a></p>
<div class="row-padding stretch">
<div class="third center">
<p><strong>Kolor</strong></p>
<a class="tag large" style="background-color:#DDDDDD" href="run://cavactl foreground #DDDDDD">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#a4c400" href="run://cavactl foreground #a4c400">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#60a917" href="run://cavactl foreground #60a917">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#008a00" href="run://cavactl foreground #008a00">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#00aba9" href="run://cavactl foreground #00aba9">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#1ba1e2" href="run://cavactl foreground #1ba1e2">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#3e65ff" href="run://cavactl foreground #3e65ff">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#0050ef" href="run://cavactl foreground #0050ef">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#6a00ff" href="run://cavactl foreground #6a00ff">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#aa00ff" href="run://cavactl foreground #aa00ff">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#f472d0" href="run://cavactl foreground #f472d0">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#d80073" href="run://cavactl foreground #d80073">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#a20025" href="run://cavactl foreground #a20025">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#e51400" href="run://cavactl foreground #e51400">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#fa6800" href="run://cavactl foreground #fa6800">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#f0a30a" href="run://cavactl foreground #f0a30a">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#e3c800" href="run://cavactl foreground #e3c800">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#825a2c" href="run://cavactl foreground #825a2c">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#6d8764" href="run://cavactl foreground #6d8764">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#647687" href="run://cavactl foreground #647687">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#76608a" href="run://cavactl foreground #76608a">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#87794e" href="run://cavactl foreground #87794e">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#a0522d" href="run://cavactl foreground #a0522d">&nbsp;&nbsp;</a>
<a class="tag large" style="background-color:#222222" href="run://cavactl foreground #222222">&nbsp;&nbsp;</a>
<p><a class="tag dark-gray" href="run://mbclr pixelcolor cavactl foreground"><big></big> Pobierz z ekranu</a></p>
</div>
<!--<div class="col m1 center">
<p>&nbsp;</p>
</div>//-->
<div class="third center dark">
<p><strong>Szerokość słupka (px)</strong></p>
<p>
<a class="tag dark-gray" href="run://cavactl bar_width 1">1</a>
<a class="tag dark-gray" href="run://cavactl bar_width 2">2</a>
<a class="tag dark-gray" href="run://cavactl bar_width 3">3</a>
<a class="tag dark-gray" href="run://cavactl bar_width 4">4</a>
<a class="tag dark-gray" href="run://cavactl bar_width 5">5</a>
<a class="tag dark-gray" href="run://cavactl bar_width 6">6</a>
<a class="tag dark-gray" href="run://cavactl bar_width 8">8</a>
<a class="tag dark-gray" href="run://cavactl bar_width 10">10</a>
<a class="tag dark-gray" href="run://cavactl bar_width 12">12</a>
<a class="tag dark-gray" href="run://cavactl bar_width 16">16</a>
<a class="tag dark-gray" href="run://cavactl bar_width 20">20</a>
</p>
<p><strong>Odstęp (px)</strong></p>
<p>
<a class="tag dark-gray" href="run://cavactl bar_spacing 0">0</a>
<a class="tag dark-gray" href="run://cavactl bar_spacing 1">1</a>
<a class="tag dark-gray" href="run://cavactl bar_spacing 2">2</a>
<a class="tag dark-gray" href="run://cavactl bar_spacing 3">3</a>
<a class="tag dark-gray" href="run://cavactl bar_spacing 4">4</a>
<a class="tag dark-gray" href="run://cavactl bar_spacing 5">5</a>
<a class="tag dark-gray" href="run://cavactl bar_spacing 6">6</a>
<a class="tag dark-gray" href="run://cavactl bar_spacing 8">8</a>
<a class="tag dark-gray" href="run://cavactl bar_spacing 10">10</a>
<a class="tag dark-gray" href="run://cavactl bar_spacing 12">12</a>
<a class="tag dark-gray" href="run://cavactl bar_spacing 16">16</a>
</p>
</div>
<!--<div class="col m1 center">
<p>&nbsp;</p>
</div>//-->
<div class="col m4 center">
<p><strong>Wysokość (px)</strong></p>
szerokość: 100%
<p><a class="tag dark-gray" href="run://mb-music cavastart 50 full">50</a> <a class="tag dark-gray" href="run://mb-music cavastart 100 full">100</a> <a class="tag dark-gray" href="run://mb-music cavastart 200 full">200</a></p>
szerokość: 50%
<p><a class="tag dark-gray" href="run://mb-music cavastart 50 half">50</a> <a class="tag dark-gray" href="run://mb-music cavastart 100 half">100</a> <a class="tag dark-gray" href="run://mb-music cavastart 200 half">200</a></p>
</div>
</div>
<p>Użyj <a class="tag small orange" href="run://colorizer-cava -s"> 󰺢 Modułu Cava</a> aby ustawiać gradienty, dopieszczać kolory, itp.</p>
<div class="panel dark-grey rightbar border-black border" style="margin-top:-2px;">
<p><a class="tag teal" href="run://mb-music -s">󰕾 Muzyka & Dźwięk</a> to dynamiczne menu, które może służyć jako prosty i lekki odtwarzacz (bazujący na mpv). <i>Dostępny także pod prawym klikiem na ikonie dźwięku w panelu.</i></p>
</div>
<h3>PyRadio - Radio internetowe</h3>
<div class="row">
<div class="twothird">
<p>PyRadio to zaawansowany odtwarzacz radia internetowego, działający pod konsolą.</p>
<p>Możesz włączyć <strong>PyRadio</strong> skrótem <kbd>super</kbd>+<kbd>r</kbd></p>
<p>Colorizer może generować motywy pyradio na bazie palety kolorów z aktualnie ustawionej tapety.</p>
<p>Użyj <a class="tag small orange" href="run://colorizer-pyradio -s"> Modułu PyRadio</a> aby dostosować kolory.</p>
</div>
<div class="third">
<div class="card round padding teal"><span class="right xxlarge"></span>
<p><br /><strong>PyRadio</strong></p>
<div class="bar-block grey">
<a class="button bar-item tiny" href="run://w2theme pyradio dark">Ciemny</a>
<a class="button bar-item tiny" href="run://w2theme pyradio light">Jasny</a>
</div>
<div class="bar-block grey" style="margin-top:1px;">
<a class="button bar-item tiny hover-green" href="run://colorizer-pyradio -s"><span class="right large"></span> Dostosuj</a>
</div>
<div class="bar-block grey" style="margin-top:1px;">
<a class="button bar-item tiny hover-red" href="run://prtctl resettheme"><span class="right large"></span >Resetuj</a>
</div>
</div>
</div>
</div>
</section>
<section id="fonts" class="container tab" style="display:none;min-height:100vh">
<div class="fixed">
<div class="bar">
<a class="button bar-item small grey hover-amber right" href="run://colorizer-fonts -s"> Czcionki - dynamiczne menu</a>
</div>
</div>
<h2>Czcionki</h2>
<p>Użyj dynamicznego menu <a class="tag small amber" href="run://colorizer-fonts -s"> Czcionki</a> aby ustawić czcionki używane przez aplikacje GTK, Conky oraz Menu/Panele boczne</p>
</section>
<section id="Terminal" class="container tab" style="display:none;min-height:100vh">
<div class="fixed">
<div class="bar">
<a class="button bar-item small grey hover-amber right" href="termo://theme.sh -i2"> Wybierz Motyw Terminala</a>
</div>
</div>
<h2>Motyw Terminala</h2>
<p>Mabox dostarcza wiele motywów kolorystycznych dla terminali (~400)</p>
<p>Interaktywny selektor pomoże Ci znaleźć odpowiedni motyw. (<kbd>Enter</kbd>/<kbd>Esc</kbd> - użyj wybranego motywu, <kbd>Ctrl + c</kbd> - anuluj)</p>
<p>Możesz uruchomić selektor motywu terminala w dowolnym momencie z linii komend za pomocą aliasu <strong>th</strong></p>
<h5>Różne kolory dla sesji root i SSH</h5>
<img src="img/theme.sh.webp" />
<p>Aby zmienić motyw dla sesji <strong>ssh</strong> i <strong>root</strong>, edytuj <tt>~/.bashrc</tt></p>
<h5>Terminator i Quake-terminal</h5>
<p>Terminator jest domyślnym terminalem w Maboxie. Użyj <kbd>super + t</kbd>, aby uruchomić go w normalnym oknie lub <kbd>F12</kbd>, aby uruchomić jako terminal Quake (naciśnij ponownie <kbd>F12</kbd>, aby go pokazać/ukryć). </p>
<p>Terminator to terminal kafelkowy. Możesz uruchomić <a class="tag small teal" href="run://conkyctl toggleone Tiling_terminal">edukacyjne Conky</a> pokazujące kilka skrótów przydatnych podczas pracy z terminatorem.</p>
</section>
<section id="Tint2" class="container tab" style="display:none;min-height:100vh;">
<h2>Panel Tint2</h2>
<p>Moduł Tint2 Colorizera nie jest jeszcze dostępny, ale już jest opracowywany.</p>
<p class="center"><em>Możesz wspomóc jego rozwój jeśli chcesz...</em></p><p class="center"><a class="button blue hover-indigo" href="https://ko-fi.com/maboxlinux"><span class="large"> 󰅶 </span> Postaw mi kawę</a></p>
<p>Póki co, możesz użyć całkiem fajnego menu konfiguracji panelu.</p>
<p><a class="button inline round tiny lime" href="run://jgtint2-pipe -s">Menu konfiguracji Tint2</a></p>
<p><a class="button inline round tiny lime" href="run://jgtint2launcher -s">Dodaj/Usuń Programy do launchera</a></p>
</section>
<section id="Save" class="container tab" style="display:none;min-height:100vh;">
<div class="fixed">
<div class="bar">
<a class="button bar-item small grey hover-amber right" href="run://mb-obthemes">Uruchom Manadżera Motywów</a>
</div>
</div>
<h2>Zapisywanie i przywracanie</h2>
<p>Jeśli jesteś zadowolony z obecnej konfiguracji, możesz ją zapisać jako meta-motyw co pozwala ją później przywrócić.</p>
<p>Menadżer Motywów zapisuje:
<ul>
<li>Motyw Openbox (dekoracja okien)</li>
<li>Motyw GTK oraz Ikon</li>
<li>Tapetę</li>
<li>Conky</li>
<li>Motyw Terminala</li>
<li>Kolory Menu / Paneli bocznych</li>
<li>Konfigurację panelu Tint2</li>
</ul>
</p><a class="button round tiny lime margin" href="run://mb-obthemes">Uruchom Menadżera Motywów</a>
</section>
</div>
<script>
function openTab(evt, tabName) {
var i, x, tablinks;
x = document.getElementsByClassName("tab");
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablink");
for (i = 0; i < x.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" bg", "");
}
document.getElementById(tabName).style.display = "block";
evt.currentTarget.className += " bg";
}
function myFunction() {
var input, filter, table, tr, td, i;
input = document.getElementById("myInput");
filter = input.value.toUpperCase();
table = document.getElementById("myTable");
tr = table.getElementsByTagName("tr");
for (i = 0; i < tr.length; i++) {
td = tr[i].getElementsByTagName("td")[0];
if (td) {
txtValue = td.textContent || td.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
} else {
tr[i].style.display = "none";
}
}
}
}
</script>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 833 B

View File

@ -0,0 +1,13 @@
Background color,Foreground color,name
#000000,#FFFFFF,Black,White
#000000,#CCCCCC,Black,Silver
#000000,#FFFF00,Black,Yellow
#000000,#FFCC66,Black,Goldenrod
#000000,#FF9900,Black,Orange
#000000,#00FF00,Black,Green
#000000,#00FFFF,Black,Cyan
#000000,#FF00FF,Black,Magenta
#696969,#DDDDDD,,
#4c26bc,#b7dc46,,
#eaef42,#1e14c0,,
#591513,#a3e7e9,,
1 Background color,Foreground color,name
2 #000000,#FFFFFF,Black,White
3 #000000,#CCCCCC,Black,Silver
4 #000000,#FFFF00,Black,Yellow
5 #000000,#FFCC66,Black,Goldenrod
6 #000000,#FF9900,Black,Orange
7 #000000,#00FF00,Black,Green
8 #000000,#00FFFF,Black,Cyan
9 #000000,#FF00FF,Black,Magenta
10 #696969,#DDDDDD,,
11 #4c26bc,#b7dc46,,
12 #eaef42,#1e14c0,,
13 #591513,#a3e7e9,,

View File

@ -8,7 +8,7 @@ window.handle.width: 4
window.active.label.text.font: shadow=y:shadowtint=70:shadowoffset=1
window.inactive.label.text.font: shadow=y:shadowtint=20:shadowoffset=1
*.active.border.color: #292929
*.active.border.color: #EEEEEE
*.inactive.border.color: #292929
window.active.grip.bg: parentrelative

View File

@ -0,0 +1,5 @@
own_window_colour='#142c2c'
default_color='#309552'
color0='#accdc7'
color1='#61c4bc'
color2='#E8CB2D'

View File

@ -0,0 +1,5 @@
own_window_colour='#282c34'
default_color='#bbc2cf'
color0='#98be65'
color1='#c678dd'
color2='#da8548'

View File

@ -0,0 +1,5 @@
own_window_colour='#282936'
default_color='#e9e9f4'
color0='#ea51b2'
color1='#00f769'
color2='#ebff87'

View File

@ -0,0 +1,5 @@
own_window_colour='#282828'
default_color='#ebdbb2'
color0='#98971a'
color1='#d79921'
color2='#cc241d'

View File

@ -0,0 +1,5 @@
own_window_colour='#DACEA9'
default_color='#9D0006'
color0='#797410'
color1='#427B58'
color2='#076678'

View File

@ -0,0 +1,5 @@
own_window_colour='#8A1538'
default_color='#f8f8f4'
color0='#d9d9d9'
color1='#310617'
color2='#ff1f1f'

View File

@ -0,0 +1,5 @@
own_window_colour='#1e0528'
default_color='#b900b1'
color0='#ffeeff'
color1='#550068'
color2='#955ae7'

View File

@ -0,0 +1,5 @@
own_window_colour='#00222b'
default_color='#00ccff'
color0='#007a99'
color1='#99ebff'
color2='#66e0ff'

View File

@ -0,0 +1,5 @@
own_window_colour='#2b0c00'
default_color='#ff3600'
color0='#b32700'
color1='#ff9b80'
color2='#661600'

View File

@ -0,0 +1,5 @@
own_window_colour='#403500'
default_color='#ffd300'
color0='#b39500'
color1='#ffe14d'
color2='#806a00'

View File

@ -0,0 +1,5 @@
own_window_colour='#2D2A2E'
default_color='#AB9DF2'
color0='#FCFCFA'
color1='#78DCE8'
color2='#A9DC76'

View File

@ -0,0 +1,5 @@
own_window_colour='#2E3440'
default_color='#B48EAD'
color0='#D8DEE9'
color1='#88C0D0'
color2='#EBCB8B'

View File

@ -0,0 +1,5 @@
own_window_colour='#1b2b34'
default_color='#c594c5'
color0='#d8dee9'
color1='#6699cc'
color2='#99c794'

View File

@ -0,0 +1,5 @@
own_window_colour='#E1E1E1'
default_color='#C18401'
color0='#A0A1A7'
color1='#0184BD'
color2='#FAFAFA'

View File

@ -0,0 +1,5 @@
own_window_colour='#292d3e'
default_color='#c792ea'
color0='#d0d0d0'
color1='#82aaff'
color2='#ffcb6b'

View File

@ -0,0 +1,5 @@
own_window_colour='#184956'
default_color='#adbcbc'
color0='#ff665c'
color1='#84c747'
color2='#ebc13d'

View File

@ -0,0 +1,5 @@
own_window_colour='#ECE3CC'
default_color='#3A4D53'
color0='#AD8900'
color1='#CC1729'
color2='#428B00'

View File

@ -0,0 +1,5 @@
own_window_colour='#151718'
default_color='#D6D6D6'
color0='#CD3F45'
color1='#9FCA56'
color2='#E6CD69'

View File

@ -0,0 +1,5 @@
own_window_colour='#1d1f21'
default_color='#b294bb'
color0='#c5c8c6'
color1='#81a2be'
color2='#b5bd68'

View File

@ -0,0 +1,5 @@
#define close_width 12
#define close_height 12
static unsigned char close_bits[] = {
0x00, 0x00, 0x06, 0x06, 0x0e, 0x07, 0x9c, 0x03, 0xb8, 0x01, 0x70, 0x00,
0xe0, 0x00, 0xd8, 0x01, 0x9c, 0x03, 0x0e, 0x07, 0x06, 0x06, 0x00, 0x00 };

View File

@ -0,0 +1,5 @@
#define close_hover_width 12
#define close_hover_height 12
static unsigned char close_hover_bits[] = {
0x00, 0x00, 0x06, 0x06, 0x0e, 0x07, 0x9c, 0x03, 0x98, 0x01, 0x00, 0x00,
0x00, 0x00, 0x98, 0x01, 0x9c, 0x03, 0x0e, 0x07, 0x06, 0x06, 0x00, 0x00 };

View File

@ -0,0 +1,5 @@
#define close_pressed_width 12
#define close_pressed_height 12
static unsigned char close_pressed_bits[] = {
0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00 };

Some files were not shown because too many files have changed in this diff Show More