From fbdfcc7efa9b12c8a78f35d3a5b803ba17dcdc98 Mon Sep 17 00:00:00 2001 From: Daniel Napora Date: Thu, 25 Jan 2024 13:01:29 +0100 Subject: [PATCH] Main window improvements --- bin/cavactl | 28 ++- bin/colorizer-cava | 14 +- bin/conkyctl | 18 +- share/mabox-colorizer/help/en.html | 256 ++++++++++++++++++------ share/mabox-colorizer/help/pl.html | 306 ++++++++++++++++++++++------- 5 files changed, 464 insertions(+), 158 deletions(-) diff --git a/bin/cavactl b/bin/cavactl index 6519497..1e4d6fb 100755 --- a/bin/cavactl +++ b/bin/cavactl @@ -67,11 +67,27 @@ 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 przesuwać lub zmieniać rozmiar tak jak każde inne okno\n\ +Przesuwanie: przytrzymaj Alt i przeciągnij\n\ +Zmiana rozmiaru: przytrzymaj Alt i przeciągnij prawym przyciskiem myszy\n\n \ +Użyj strzałek  , aby zmienić szerokość słupków" + ;; + *) + INFO_HEAD="Cava tips & tricks" + INFO_TXT="\nCava runs inside transparent window...\n\ +So you can move or resize it like any other window\n\ +Move: hold Alt and drag\n\ +Resize: hold Alt and drag with right mouse button\n\n \ +Use arrows   to change bar width" + ;; +esac +notify-send.sh -i amarok_playcount -u critical "$INFO_HEAD" "$INFO_TXT" +} case "$1" in mode) mode "$2";; @@ -85,6 +101,6 @@ case "$1" in reload_colors)reload_colors;; bar_width)bar_width "$2";; bar_spacing)bar_spacing "$2";; - + info) info;; *):;; esac diff --git a/bin/colorizer-cava b/bin/colorizer-cava index b156e1a..f66cfd4 100755 --- a/bin/colorizer-cava +++ b/bin/colorizer-cava @@ -44,12 +44,6 @@ fi case "$LANG" in pl*) INFO="Cava porady" - INFO_HEAD="Porady dla Cava" - INFO_TXT="\n1. Cava jest uruchomiona w przezroczystym oknie...\n \ -Możesz je więc przesuwać lub zmieniać rozmiar tak jak każde inne okno\n \ -Przesuwanie: przytrzymaj Alt i przeciągnij\n \ -Zmiana rozmiaru: przytrzymaj Alt i przeciągnij prawym przyciskiem myszy\n\n \ -2. Użyj strzałek  , aby zmienić szerokość słupków" COLORIZE_CAVA="Pokoloruj Cava" COLOR="Jednolity kolor" REVERSE_GRADIENT="Odwróć kolory gradientu" @@ -74,12 +68,6 @@ Możesz je więc przesuwać lub zmieniać rozmiar tak jak każde i ;; *) INFO="CaVa tips & tricks" - INFO_HEAD="Cava tips & tricks" - INFO_TXT="\n1. Cava runs inside transparent window...\n \ -So you can move or resize it like any other window\n \ -Move: hold Alt and drag\n \ -Resize: hold Alt and drag with right mouse button\n\n \ -2. Use arrows   to change bar width" COLORIZE_CAVA="Colorize Cava" COLOR="Solid Color" REVERSE_GRADIENT="Reverse gradient's colors" @@ -157,7 +145,7 @@ FGT=$(pastel textcolor ${FGC}|pastel format hex) out+=("󰑓 $RELOAD,cavactl reload;$me") out+=("󰑓 $RELOAD_COLORS,cavactl reload_colors;$me") out+=("^sep()") - out+=(" $INFO,notify-send.sh -i music -u critical '$INFO_HEAD' '$INFO_TXT'") + out+=(" $INFO,cavactl info") ### RUN diff --git a/bin/conkyctl b/bin/conkyctl index 3c0391f..e4a043d 100755 --- a/bin/conkyctl +++ b/bin/conkyctl @@ -282,6 +282,19 @@ restartone () { kill ${1} startone ${1} } +toggleone () { + if pgrep -u $USER -af "conky .*${1}" >/dev/null; then + kill "${1}" + else + CCFG=$(ls ~/.config/conky/${1}*.conkyrc) + #notify-send.sh "Conky" "$CCFG" + if test -f "$CCFG"; + then + startone "$CCFG" + fi + #conky -c "${i}" & + fi +} makemoveableall () { wmctrl -k on sd "own_window_type.*$" "own_window_type = 'normal'," ${CONKYDIR}/*mbcolor.conkyrc @@ -985,7 +998,7 @@ cmdmenu () { LINES=$(grep -Ev "^#|^$" ${CONKYDIR}/menuscripts/${name}.csv|wc -l) #notify-send.sh "$LINES" if [ ${LINES} == 0 ]; then - contextmenu + : # do nothing, was contextmenu fi if [ ${LINES} == 1 ]; then # 1 line - execute command (one line menu make no sense) @@ -1001,7 +1014,7 @@ cmdmenu () { CUSTOMCOMMANDS=". ${CONKYDIR}/menuscripts/${name}.csv" fi else - contextmenu + : # do nothing fi # otherwise build and show standalone menu with custom commands @@ -1267,6 +1280,7 @@ case "$1" in startone) startone "$2";; startall) startall;; kill) kill "$2";; + toggleone) toggleone "$2";; restartone) restartone "$2";; contextmenu) contextmenu;; cmdmenu) cmdmenu;; diff --git a/share/mabox-colorizer/help/en.html b/share/mabox-colorizer/help/en.html index 560b3e0..adab784 100644 --- a/share/mabox-colorizer/help/en.html +++ b/share/mabox-colorizer/help/en.html @@ -11,8 +11,10 @@ body{ background-color:#222222; color: #999999; +font-size: 1.6vw !important; font-family: 'Symbols', sans-serif; } +.w3-dark{background-color:#292929;} div.fixed { position: fixed; top: 4px; @@ -23,7 +25,7 @@ div.fixeddown { position: fixed; bottom:0; left:0; - width:160px; + width:20%; } div.fixed .w3-bar-item {margin-right:4px; border-radius:4px;} .w3-third {padding: 0.01em 4px;} @@ -31,8 +33,9 @@ div.fixed .w3-bar-item {margin-right:4px; border-radius:4px;} .w3-button .w3-right {position:absolute; top:0; right:6px;} section.tab {padding-top: 0;} section#Colorizer {padding-top: 0.01em;} -div.fixeddown p {margin:2px 0;} -div.fixeddown a {text-decoration:none;margin:0 2px;} +div.fixeddown p {margin:0;} +div.fixeddown p.w3-black a {text-decoration:none;margin:0 4px;} +.logo {cursor:pointer;width:6vw;height:6vw;} .link {cursor:pointer;} .w3-bar-block .w3-btn {width: 100px;text-align:center;} .w3-bar-block .w3-btn:hover {background-color:white;color:gray;} @@ -54,12 +57,20 @@ kbd { padding: 2px 4px; white-space: nowrap; } -nav button.w3-bar-item {padding:4px 12px !important;} +nav button.w3-bar-item {padding:3px 12px !important;} +.w3-small {font-size: 1.5vw !important;} +.w3-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;} +.w3-large {width:3.2vw !important;height:2.4vw !important;font-size: 2.4vw !important;} +p.w3-black a {font-size:2.4vw !important;} -
-
+
+
-
- Choose wallpaperChoose wallpaper from image context menu - Colorizer RootmenuColorizer Menu (advanced) - Openbox moduleOpenbox Window Decoration module - Menu moduleMenus (jgmenu) module - Conky moduleConky Manager & Colorizer +
+
+

Advanced (dynamic menus)

+

+  Colorizer +  Openbox +  Conky +  Menu +  Fonts
+ 󰺢 Cava +  PyRadio +

-

Mabox Website Community Forum @@ -88,7 +105,7 @@ nav button.w3-bar-item {padding:4px 12px !important;}

-
+
@@ -105,7 +122,7 @@ nav button.w3-bar-item {padding:4px 12px !important;}
  • Generate themes for all above from Wallpaper colors
  • -

     Try Randomizer to change themes quickly. You can securely reset to defaults at any time New!

    +

     Try Randomizer to change themes quickly. You can securely reset to defaults at any time.

    Quickly randomize
    colorschemes for...

    @@ -149,15 +166,15 @@ nav button.w3-bar-item {padding:4px 12px !important;}
    -

    Quickly set...

    +

    Set window decoration

    Customize... @@ -235,7 +252,7 @@ nav button.w3-bar-item {padding:4px 12px !important;}
    -
    Window title +
    Window title
    font color:       @@ -300,7 +317,7 @@ nav button.w3-bar-item {padding:4px 12px !important;}
    -
    Title bar color
    +

    Title bar color

    for active window

       @@ -327,16 +344,12 @@ nav button.w3-bar-item {padding:4px 12px !important;}          +

    Pick from screen

    -

    Note!
    - Changing the background color will also set:
    - - border color to the same color
    - - BGCOLOR_TO color for a subtle gradient -

     
    -
    Gradient type
    +

    Gradient type

    @@ -368,15 +381,15 @@ nav button.w3-bar-item {padding:4px 12px !important;}

    -

    Quickly set...

    +

    Set menu theme...

    Customize... @@ -394,31 +407,43 @@ nav button.w3-bar-item {padding:4px 12px !important;} @@ -465,7 +509,7 @@ You can add your own commands to each Conky, which will be show


    Set Wallpaper

    @@ -523,6 +567,16 @@ You can add your own commands to each Conky, which will be show
    +

    Terminal theme

    Mabox comes with many terminal themes available (~400)

    -

    The interactive selector will help you find a suitable theme
    ( Enter/Esc - use selected theme, Ctrl+c - cancel)

    +

    The interactive selector will help you find a suitable theme (Enter/Esc - use selected theme, Ctrl+c - cancel)

    You can run terminal theme selector any time from cli by th alias

    -

    Different colors for root and SSH sessions

    To change theme for ssh and root sessions edit ~/.bashrc

    +
    Terminator - default terminal in Mabox
    - -