mabox-pipemenus/usr/bin/jgmenusettings-pipe

171 lines
5.4 KiB
Bash
Executable File

#!/bin/bash
. $HOME/.config/mabox/mabox.conf
case $LANG in
pl*)
TITLE="Ustawienia Menu i Paneli"
ICONS="Ikony"
CIRCLE="Okrągłe ikony"
SQUARE="Kwadratowe ikony"
SHOW_ICONS="Pokaż ikony"
HIDE_ICONS="Ukryj ikony"
SIZE="Rozmiar i czcionka"
TINY="malutki"
SMALL="mały"
NORMAL="normalny"
BIG="duży"
HUGE="wielki"
FONT_FAMILY="Czcionka"
COLOR_SCHEME="Motyw kolorów"
EDIT_CURRENT="Edytuj aktywny"
FOLLOW_OB="Zgodny z motywem OpenBox"
CHOOSE="Wybierz..."
;;
es*)
TITLE="Menu/Panel lateral"
ICONS="Icons"
CIRCLE="Circle icons"
SQUARE="Square icons"
SHOW_ICONS=""
HIDE_ICONS=""
SIZE="Tamaño de Menu/Panel lateral"
TINY="Diminuto"
SMALL="Pequeño"
NORMAL="Normal"
BIG="Grande"
HUGE="Muy Grande"
FONT_FAMILY="Font Family"
COLOR_SCHEME="Color scheme"
EDIT_CURRENT="Edit current"
FOLLOW_OB="Same as OpenBox theme"
CHOOSE="Choose..."
;;
*)
TITLE="Menu settings"
ICONS="Icons"
CIRCLE="Circle icons"
SQUARE="Square icons"
SHOW_ICONS="Show icons"
HIDE_ICONS="Hide icons"
SIZE="Menu/Sidepanels Size and Font"
TINY="tiny"
SMALL="small"
NORMAL="normal"
BIG="big"
HUGE="huge"
FONT_FAMILY="Font Family"
COLOR_SCHEME="Color Scheme"
EDIT_CURRENT="Edit current"
FOLLOW_OB="Same as OpenBox theme"
CHOOSE="Choose..."
;;
esac
#out+=("^sep($TITLE)")
case $menu_font_size in
7)
t=""
;;
8)
s=""
;;
9)
n=""
;;
10)
b=""
;;
12)
h=""
;;
*)
;;
esac
out+=("^sep($SIZE)")
out+=(" $t <small><small>$TINY</small></small>,mb-setvar menu_font_size=7;mb-setvar jgmenu_item_height=14;mb-setvar jgmenu_icon_size=8;mb-setvar sep_height=1;mb-setvar item_margin_y=1; mb-jgtools settings
$s <small>$SMALL</small>,mb-setvar menu_font_size=8;mb-setvar jgmenu_item_height=16;mb-setvar jgmenu_icon_size=12;mb-setvar sep_height=2;mb-setvar item_margin_y=2;mb-jgtools settings
$n $NORMAL,mb-setvar menu_font_size=9;mb-setvar jgmenu_item_height=18;mb-setvar jgmenu_icon_size=16;mb-setvar sep_height=2;mb-setvar item_margin_y=2;mb-jgtools settings
$b <big>$BIG</big>,mb-setvar menu_font_size=10;mb-setvar jgmenu_item_height=20;mb-setvar jgmenu_icon_size=18;mb-setvar sep_height=4;mb-setvar item_margin_y=3;mb-jgtools settings
$h <big><big>$HUGE</big></big>,mb-setvar menu_font_size=12;mb-setvar jgmenu_item_height=24;mb-setvar jgmenu_icon_size=20;mb-setvar sep_height=5;mb-setvar item_margin_y=3;mb-jgtools settings")
#out+=("^sep($FONT_FAMILY)")
######### FONT FAMILY
out+=("^sep()")
out+=("$FONT_FAMILY,^checkout(fonty)")
case $menu_font_family in
Ubuntu)
ub=""
;;
"Noto Sans Light")
nol=""
;;
"Noto Sans Medium")
nom=""
;;
Jet*)
je=""
;;
Aut*)
au=""
;;
Deja*)
de=""
;;
Robo*)
ro=""
;;
Inco*)
in=""
;;
*)
;;
esac
out2+=("^tag(fonty)")
out2+=("^sep($FONT_FAMILY)")
out2+=("<span size=\"x-large\" font_family=\"Ubuntu\">$ub Ubuntu</span>,mb-setvar menu_font_family=Ubuntu;mb-jgtools settings")
out2+=("<span size=\"x-large\" font_family=\"Noto Sans Light\">$nol Noto Sans Light</span>,mb-setvar \"menu_font_family='Noto Sans Light'\";mb-jgtools settings")
out2+=("<span size=\"x-large\" font_family=\"Noto Sans Medium\">$nom Noto Sans Medium</span>,mb-setvar \"menu_font_family='Noto Sans Medium'\";mb-jgtools settings")
out2+=("<span size=\"x-large\" font_family=\"JetBrains Mono Regular\">$je JetBrains Mono Regular</span>,mb-setvar \"menu_font_family='JetBrains Mono Regular'\";mb-jgtools settings")
out2+=("<span size=\"x-large\" font_family=\"Autour One\">$au Autour One</span>,mb-setvar \"menu_font_family='Autour One'\";mb-jgtools settings")
out2+=("<span size=\"x-large\" font_family=\"DejaVu Serif\">$de DejaVu Serif</span>,mb-setvar \"menu_font_family='DejaVu Serif'\";mb-jgtools settings")
out2+=("<span size=\"x-large\" font_family=\"Roboto Light\">$ro Roboto Light</span>,mb-setvar \"menu_font_family='Roboto Light'\";mb-jgtools settings")
out2+=("<span size=\"x-large\" font_family=\"Inconsolata\">$in Inconsolata</span>,mb-setvar menu_font_family=Inconsolata;mb-jgtools settings")
########## ICONS
out+=("^sep($ICONS)")
if [ $jgmenu_use_icons == true ]; then
out+=("$HIDE_ICONS,mb-setvar jgmenu_use_icons=false;mb-jgtools settings")
else
out+=("$SHOW_ICONS,mb-setvar jgmenu_use_icons=true;mb-jgtools settings")
fi
out+=("^sep()")
out+=("$SQUARE,mb-setvar jgmenu_icon_theme=Numix-Square;mb-jgtools settings")
out+=("$CIRCLE,mb-setvar jgmenu_icon_theme=Numix-Circle;mb-jgtools settings")
########## THEMES
out+=("^sep($COLOR_SCHEME)")
out+=("$CHOOSE,^checkout(motywy)")
if [ $jgmenu_theme != obtheme ]; then
out+=("$EDIT_CURRENT: (<i>$jgmenu_theme</i>),geany $HOME/.config/mabox/jgobthemes/$jgmenu_theme.colorrc,geany")
fi
out2+=("^tag(motywy)")
out2+=("$FOLLOW_OB,mb-setvar jgmenu_theme=obtheme;mb-jgtools settings
^sep()")
for item in "$HOME"/.config/mabox/jgobthemes/*colorrc; do
theme="${item##*/}"
out2+=("${theme%.*},mb-setvar jgmenu_theme=${theme%.*};mb-jgtools settings")
done
printf '%s\n' "${out[@]}"
printf '%s\n' "${out2[@]}"