leftpanel upd

This commit is contained in:
Daniel Napora 2024-12-26 22:51:55 +01:00
parent dadea52c79
commit 118dc863c3

View File

@ -77,69 +77,69 @@ OSCODE=$(grep CODENAME /etc/lsb-release |cut -d '=' -f2)
mkconfigfile() { mkconfigfile() {
cat <<EOF > ${CONFIG_FILE} cat <<EOF > ${CONFIG_FILE}
position_mode = ${POSITION_MODE:-fixed} position_mode = ${POSITION_MODE:-fixed}
csv_cmd = apps csv_cmd = apps
stay_alive = 0 stay_alive = 0
hide_back_items = ${HIDE_BACK_ITEMS:-0} hide_back_items = ${HIDE_BACK_ITEMS:-0}
terminal_exec = terminator terminal_exec = terminator
terminal_args = -e terminal_args = -e
tabs = ${TABS:-220} tabs = ${TABS:-220}
menu_border = ${jgtools_border:-0} menu_border = ${jgtools_border:-0}
# MENU MARGIN # MENU MARGIN
menu_margin_x = ${menu_margin_x:-0} menu_margin_x = ${menu_margin_x:-0}
menu_margin_y = ${MENU_MARGIN_Y:-0} menu_margin_y = ${MENU_MARGIN_Y:-0}
sub_spacing = ${submenu_spacing:-0} sub_spacing = ${submenu_spacing:-0}
menu_width = ${JGWIDTH:-40} menu_width = ${JGWIDTH:-40}
menu_height_min = ${MENU_HEIGHT_MIN:-0} menu_height_min = ${MENU_HEIGHT_MIN:-0}
menu_height_max = ${MENU_HEIGHT_MAX:-0} menu_height_max = ${MENU_HEIGHT_MAX:-0}
menu_padding_top = ${MENU_PADDING_TOP:-70} menu_padding_top = ${MENU_PADDING_TOP:-70}
menu_padding_right = ${jgtools_padding:-0} menu_padding_right = ${jgtools_padding:-0}
menu_padding_bottom = ${jgtools_padding:-0} menu_padding_bottom = ${jgtools_padding:-0}
menu_padding_left = ${jgtools_padding:-0} menu_padding_left = ${jgtools_padding:-0}
menu_radius = ${MENU_RADIUS:-0} menu_radius = ${MENU_RADIUS:-0}
menu_valign = ${MENU_VALIGN:-top} menu_valign = ${MENU_VALIGN:-top}
menu_halign = ${MENU_HALIGN:-left} menu_halign = ${MENU_HALIGN:-left}
item_height = $((menu_font_size*item_height_factor/100)) item_height = $((menu_font_size*item_height_factor/100))
item_halign = ${ITEM_HALIGN:-left} item_halign = ${ITEM_HALIGN:-left}
item_padding_x = 4 item_padding_x = 4
item_margin_x = ${item_margin_x:-0} item_margin_x = ${item_margin_x:-0}
item_margin_y = ${item_margin_y:-1} item_margin_y = ${item_margin_y:-1}
item_radius = ${item_radius:-2} item_radius = ${item_radius:-2}
item_border = ${item_border:-0} item_border = ${item_border:-0}
arrow_string = ${arrow_string:-} arrow_string = ${arrow_string:-}
columns = ${COLUMNS:-1} columns = ${COLUMNS:-1}
menu_gradient_pos = ${menu_gradient_pos:-none} menu_gradient_pos = ${menu_gradient_pos:-none}
color_menu_bg = ${color_menu_bg:-#222222 80} color_menu_bg = ${color_menu_bg:-#222222 80}
color_menu_bg_to = ${color_menu_bg_to:- #000000 100} color_menu_bg_to = ${color_menu_bg_to:- #000000 100}
color_menu_border = ${color_menu_border:-#2f9b85 100} color_menu_border = ${color_menu_border:-#2f9b85 100}
color_norm_bg = ${color_norm_bg:-#000000 0} color_norm_bg = ${color_norm_bg:-#000000 0}
color_norm_fg = ${color_norm_fg:-#CCCCCC 100} color_norm_fg = ${color_norm_fg:-#CCCCCC 100}
color_sel_bg = ${color_sel_bg:-#169f6f 60} color_sel_bg = ${color_sel_bg:-#169f6f 60}
color_sel_fg = ${color_sel_fg:-#f8f8f8 100} color_sel_fg = ${color_sel_fg:-#f8f8f8 100}
color_sel_border = ${color_sel_border:-#504e65 100} color_sel_border = ${color_sel_border:-#504e65 100}
color_sep_fg = ${color_sep_fg:-#4D4D4D 100} color_sep_fg = ${color_sep_fg:-#4D4D4D 100}
color_sep_bg = ${color_sep_bg:-#169f6f 100} color_sep_bg = ${color_sep_bg:-#169f6f 100}
color_title_fg = ${color_title_fg:-#4D4D4D 100} color_title_fg = ${color_title_fg:-#4D4D4D 100}
color_title_border = ${color_title_border:-#169f6f 100} color_title_border = ${color_title_border:-#169f6f 100}
color_title_bg = ${color_title_bg:-#169f6f 100} color_title_bg = ${color_title_bg:-#169f6f 100}
color_scroll_ind = ${color_scroll_ind:-#504e65 100} color_scroll_ind = ${color_scroll_ind:-#504e65 100}
sep_markup = font='${menu_sep_font:-${jgmenu_font}}' sep_markup = font='${menu_sep_font:-${jgmenu_font}}'
sep_halign = ${sep_halign:-center} sep_halign = ${sep_halign:-center}
sep_height = ${sep_height:-5} sep_height = ${sep_height:-5}
font = ${jgmenu_font:-Noto Sans Medium 9} font = ${jgmenu_font:-Noto Sans Medium 9}
icon_size = $((icons*menu_font_size*item_height_factor/100)) icon_size = $((icons*menu_font_size*item_height_factor/100))
icon_norm_alpha = 70 icon_norm_alpha = 70
icon_sel_alpha = 100 icon_sel_alpha = 100
icon_text_spacing = $((iconmargin+8)) icon_text_spacing = $((iconmargin+8))
icon_theme = ${jgmenu_icon_theme:-Numix-Square} icon_theme = ${jgmenu_icon_theme:-Numix-Square}
EOF EOF
case $jgmenu_theme in case $jgmenu_theme in
@ -169,14 +169,14 @@ trap "rm -f ${CONFIG_FILE}" EXIT
POSITION_MODE=${1:-pointer} POSITION_MODE=${1:-pointer}
case "$1" in case "$1" in
top) top)
MENU_HALIGN=center MENU_HALIGN=center
MENU_VALIGN=top MENU_VALIGN=top
;; ;;
center) center)
MENU_HALIGN=center MENU_HALIGN=center
MENU_VALIGN=center;; MENU_VALIGN=center;;
*):;; *):;;
esac esac
MENU_MARGIN_Y=80 MENU_MARGIN_Y=80
@ -598,9 +598,9 @@ $SYSINFO,^pipe(jgsysinfo-pipe),distributor-logo-linux
${arrow_string_left} $BACK,^back() ${arrow_string_left} $BACK,^back()
^tag(mirrory) ^tag(mirrory)
$FAST <small>pacman-mirrors -f5</small>,mb-cli mirrors $FAST <small>pacman-mirrors -f5</small>,mb-cli mirrors
$ALL <small>pacman-mirrors -i -c all</small>,mb-cli mirrors_all $ALL <small>pacman-mirrors -i -c all</small>,mb-cli mirrors_all
$GEOIP <small>pacman-mirrors -i --geoip</small>,mb-cli mirrors_geo $GEOIP <small>pacman-mirrors -i --geoip</small>,mb-cli mirrors_geo
^sep() ^sep()
${arrow_string_left} $BACK,^back() ${arrow_string_left} $BACK,^back()
@ -681,12 +681,15 @@ case $LANG in
SHORTCUTS="Skróty klawiszowe" SHORTCUTS="Skróty klawiszowe"
MENUPANELS="Ustawienia Menu/Paneli" MENUPANELS="Ustawienia Menu/Paneli"
TINT2SETTINGS="Ustawienia panelu Tint2" TINT2SETTINGS="Ustawienia panelu Tint2"
PICOMSETTINGS="Ustawienia Picom"
CONKYSETTINGS="Zarządzaj Conky" CONKYSETTINGS="Zarządzaj Conky"
_COLORIZER="Mabox <b>Colorizer</b>"
SSH_CONN="Połącz po SSH" SSH_CONN="Połącz po SSH"
DESKMNGR="Desktop Session Manager" DESKMNGR="Desktop Session Manager"
DESKTOPS="Pulpity i Okna" DESKTOPS="Pulpity i Okna"
SUPERCLICK="SuperClick" SUPERCLICK="SuperClick"
WALLCHANGER="Menu Tapet" WALLCHANGER="Tapety i stylizacja pulpitu"
_MUSIC_SOUND_MENU="Music &amp; Sound menu"
LOCKSCREEN="Blokada Ekranu" LOCKSCREEN="Blokada Ekranu"
MBHELPER="Paleta komend" MBHELPER="Paleta komend"
;; ;;
@ -701,12 +704,15 @@ case $LANG in
SHORTCUTS="Atajos del teclado" SHORTCUTS="Atajos del teclado"
MENUPANELS="Menu/Paneles laterales" MENUPANELS="Menu/Paneles laterales"
TINT2SETTINGS="Tint2 panel settings" TINT2SETTINGS="Tint2 panel settings"
PICOMSETTINGS="Picom compositor settings"
CONKYSETTINGS="Conky Manager" CONKYSETTINGS="Conky Manager"
_COLORIZER="Mabox <b>Colorizer</b>"
SSH_CONN="Conexiones SSH" SSH_CONN="Conexiones SSH"
DESKMNGR="Desktop Session Manager" DESKMNGR="Desktop Session Manager"
DESKTOPS="Desktops and Windows" DESKTOPS="Desktops and Windows"
SUPERCLICK="SuperClick" SUPERCLICK="SuperClick"
WALLCHANGER="Wallpaper Menu" WALLCHANGER="Wallpaper &amp; Desktop <b>styling</b>"
_MUSIC_SOUND_MENU="Music &amp; Sound menu"
LOCKSCREEN="Screen Locker" LOCKSCREEN="Screen Locker"
MBHELPER="Cmd palette" MBHELPER="Cmd palette"
;; ;;
@ -721,12 +727,15 @@ case $LANG in
SHORTCUTS="Keyboard shortcuts" SHORTCUTS="Keyboard shortcuts"
MENUPANELS="Menu/Sidepanels settings" MENUPANELS="Menu/Sidepanels settings"
TINT2SETTINGS="Tint2 panel settings" TINT2SETTINGS="Tint2 panel settings"
PICOMSETTINGS="Picom compositor settings"
CONKYSETTINGS="Conky Manager" CONKYSETTINGS="Conky Manager"
_COLORIZER="Mabox <b>Colorizer</b>"
SSH_CONN="SSH connections" SSH_CONN="SSH connections"
DESKMNGR="Desktop Session Manager" DESKMNGR="Desktop Session Manager"
DESKTOPS="Desktops and Windows" DESKTOPS="Desktops and Windows"
SUPERCLICK="SuperClick" SUPERCLICK="SuperClick"
WALLCHANGER="Wallpaper Menu" WALLCHANGER="Wallpaper &amp; Desktop <b>styling</b>"
_MUSIC_SOUND_MENU="Music &amp; Sound menu"
LOCKSCREEN="Screen Locker" LOCKSCREEN="Screen Locker"
MBHELPER="Cmd palette" MBHELPER="Cmd palette"
;; ;;
@ -786,10 +795,10 @@ fi
#[ $places_keyspipe == true ] && keyspipe="<big></big> $SHORTCUTS,^pipe(jgkeys-pipe -r)" && pipesep="^sep($PIPEMENUS)" #[ $places_keyspipe == true ] && keyspipe="<big></big> $SHORTCUTS,^pipe(jgkeys-pipe -r)" && pipesep="^sep($PIPEMENUS)"
[ $places_sshpipe == true ] && sshpipe="<big></big> $SSH_CONN,^pipe(jgssh -r)" && pipesep="^sep($PIPEMENUS)" [ $places_sshpipe == true ] && sshpipe="<big></big> $SSH_CONN,^pipe(jgssh -r)" && pipesep="^sep($PIPEMENUS)"
[ $places_softwarepipe == true ] && softwarepipe="<big></big> $POPINSTALL,^pipe(jgsoftware-pipe -r)" && pipesep="^sep($PIPEMENUS)" [ $places_softwarepipe == true ] && softwarepipe="<big></big> $POPINSTALL,^pipe(jgsoftware-pipe -r)" && pipesep="^sep($PIPEMENUS)"
[[ $places_conkypipe == true || -z ${places_conkypipe} ]] && conkypipe="<big></big> $CONKYSETTINGS,colorizer-conky -s" && pipesep="^sep($PIPEMENUS)" [[ $places_conkypipe == true || -z ${places_conkypipe} ]] && conkypipe="<big></big> $CONKYSETTINGS,colorizer-conky -s" && pipesep="^sep($PIPEMENUS)"
[[ $places_jgdeskmngr == true || -z ${places_jgdeskmngr} ]] && jgdeskmngr="<big></big> $DESKMNGR,^pipe(jgdeskmngr -r)" && pipesep="^sep($PIPEMENUS)" [[ $places_jgdeskmngr == true || -z ${places_jgdeskmngr} ]] && jgdeskmngr="<big></big> $DESKMNGR,^pipe(jgdeskmngr -r)" && pipesep="^sep($PIPEMENUS)"
[[ $places_jgdesktops == true || -z ${places_jgdesktops} ]] && jgdesktops="<big></big> $DESKTOPS,^pipe(jgdesktops -r)" && pipesep="^sep($PIPEMENUS)" [[ $places_jgdesktops == true || -z ${places_jgdesktops} ]] && jgdesktops="<big></big> $DESKTOPS,^pipe(jgdesktops -r)" && pipesep="^sep($PIPEMENUS)"
[[ $places_jgdeskgrid == true || -z ${places_jgdeskgrid} ]] && jgdeskgrid="<big></big> $SUPERCLICK,^pipe(jgdeskgrid -r)" && pipesep="^sep($PIPEMENUS)" [[ $places_jgdeskgrid == true || -z ${places_jgdeskgrid} ]] && jgdeskgrid="<big></big> $SUPERCLICK,jgdeskgrid -s" && pipesep="^sep($PIPEMENUS)"
[[ $places_jgwallpaperchanger == true || -z ${places_jgwallpaperchanger} ]] && jgwallpaperchanger="<big></big> $WALLCHANGER,jgwallpaperchanger -s" && pipesep="^sep($PIPEMENUS)" [[ $places_jgwallpaperchanger == true || -z ${places_jgwallpaperchanger} ]] && jgwallpaperchanger="<big></big> $WALLCHANGER,jgwallpaperchanger -s" && pipesep="^sep($PIPEMENUS)"
[[ $places_jglockscreen == true || -z ${places_jglockscreen} ]] && jglockscreen="<big></big> $LOCKSCREEN,^pipe(jglockscreen -r)" && pipesep="^sep($PIPEMENUS)" [[ $places_jglockscreen == true || -z ${places_jglockscreen} ]] && jglockscreen="<big></big> $LOCKSCREEN,^pipe(jglockscreen -r)" && pipesep="^sep($PIPEMENUS)"
@ -842,16 +851,21 @@ $(gtkbookmarks)
$pipesep $pipesep
$softwarepipe $softwarepipe
$tint2pipe $tint2pipe
<big></big> $_CONFIG_FONTS,colorizer-fonts -s
$conkypipe
$jgwallpaperchanger $jgwallpaperchanger
$jglockscreen <big></big> $_CONFIG_FONTS,colorizer-fonts -s
<big></big> $PICOMSETTINGS,jgpicom-pipe -s
$conkypipe
^sep()
<big></big> $_COLORIZER,colorizer -s
^sep()
$jgdeskgrid $jgdeskgrid
$jgdesktops $jgdesktops
$jglockscreen
$jgdeskmngr $jgdeskmngr
<big></big> $_MUSIC_SOUND_MENU,mb-music -s
$sysinfopipe $sysinfopipe
$sshpipe $sshpipe
<big></big> $MBHELPER <span bgcolor="#333333" color="#d3d3d3"> <small> + F1</small> </span>,mbhelper -s #<big></big> $MBHELPER <span bgcolor="#333333" color="#d3d3d3"> <small> + F1</small> </span>,mbhelper -s
$menusettingspipe $menusettingspipe
${vboxes} ${vboxes}
@ -867,7 +881,7 @@ if [[ -n "$1" ]]
then then
POSITION_MODE=${1:-pointer} POSITION_MODE=${1:-pointer}
else else
MENU_HALIGN="center" MENU_HALIGN="center"
MENU_VALIGN="center" MENU_VALIGN="center"
fi fi
CONFIG_FILE=$(mktemp) CONFIG_FILE=$(mktemp)
@ -905,29 +919,29 @@ item_height_factor=300
mkconfigfile mkconfigfile
if pgrep -f /usr/bin/lightdm >/dev/null if pgrep -f /usr/bin/lightdm >/dev/null
then then
ALLUSERS=( $(getent passwd {1000..1010}|cut -d: -f1) ) ALLUSERS=( $(getent passwd {1000..1010}|cut -d: -f1) )
if [[ ${#ALLUSERS[@]} -gt 1 ]];then if [[ ${#ALLUSERS[@]} -gt 1 ]];then
SESSIONS=( $(dm-tool list-seats|grep UserName|cut -d"'" -f2) ) SESSIONS=( $(dm-tool list-seats|grep UserName|cut -d"'" -f2) )
SW+=("^sep()" "$SWITCHUSER,^checkout(users),system-switch-user") SW+=("^sep()" "$SWITCHUSER,^checkout(users),system-switch-user")
SW2+=("^tag(users)") SW2+=("^tag(users)")
if [[ ${#SESSIONS[@]} -gt 1 ]];then if [[ ${#SESSIONS[@]} -gt 1 ]];then
SW2+=("^sep($SWITCHTO)") SW2+=("^sep($SWITCHTO)")
for usess in "${SESSIONS[@]}";do for usess in "${SESSIONS[@]}";do
[[ "$usess" != "$USER" ]] && SW2+=("$usess, dm-tool switch-to-user $usess,system-switch-user") [[ "$usess" != "$USER" ]] && SW2+=("$usess, dm-tool switch-to-user $usess,system-switch-user")
done done
fi fi
for element in "${SESSIONS[@]}";do for element in "${SESSIONS[@]}";do
ALLUSERS=(${ALLUSERS[@]/*${element}*/}) ALLUSERS=(${ALLUSERS[@]/*${element}*/})
done done
if [[ ${#ALLUSERS[@]} -gt 0 ]];then if [[ ${#ALLUSERS[@]} -gt 0 ]];then
SW2+=("^sep($NEWSESS)") SW2+=("^sep($NEWSESS)")
for u in "${ALLUSERS[@]}";do for u in "${ALLUSERS[@]}";do
SW2+=("$u,dm-tool switch-to-user $u,system-switch-user") SW2+=("$u,dm-tool switch-to-user $u,system-switch-user")
done done
fi fi
fi fi
fi fi
#wmctrl -k on #wmctrl -k on
@ -964,7 +978,7 @@ cat <<EOF > ${MENU_ITEMS}
. $HOME/.config/mabox/exit.csv . $HOME/.config/mabox/exit.csv
$(printf '%s\n' "${SW[@]}") $(printf '%s\n' "${SW[@]}")
^sep() ^sep()
$CANCEL <small>esc</small>,exit 1,gtk-close $CANCEL <small>esc</small>,exit 1,gtk-close
$(printf '%s\n' "${SW2[@]}") $(printf '%s\n' "${SW2[@]}")
EOF EOF
CACHE_DIR="$HOME/.cache/mblogout" CACHE_DIR="$HOME/.cache/mblogout"
@ -1138,7 +1152,7 @@ cat <<EOF > ${MENU_ITEMS}
^sep() ^sep()
 $SETTINGS,^checkout(settings)  $SETTINGS,^checkout(settings)
^sep() ^sep()
 $CANCEL <small>esc</small>,exit 1  $CANCEL <small>esc</small>,exit 1
^tag(full) ^tag(full)
^sep($FULLSCR ) ^sep($FULLSCR )
 $NOW,scrot $IMG -e $VIEW  $NOW,scrot $IMG -e $VIEW
@ -1259,27 +1273,27 @@ CON='\e[?25h' #Cursor On |
#--------------------------------------------------------------------+ #--------------------------------------------------------------------+
case "$1" in case "$1" in
main) main "$2";; main) main "$2";;
right) right;; right) right;;
mblogout) mblogout "$2";; mblogout) mblogout "$2";;
settings) settings "$2";; settings) settings "$2";;
screenshot) screenshot "$2";; screenshot) screenshot "$2";;
places) places;; places) places;;
*) *)
echo -e " echo -e "
${GRN}Kolekcja narzędzi dla Mabox-a stworzonych z pomocą Jgmenu ${GRN}Kolekcja narzędzi dla Mabox-a stworzonych z pomocą Jgmenu
Użycie: Użycie:
${DEF} $(basename "$0")${YLW} [${RED} OPCJA${YLW} ] ${DEF} $(basename "$0")${YLW} [${RED} OPCJA${YLW} ]
${GRN} Opcje: ${GRN} Opcje:
${YLW} >${RED} main ${YLW} -${DEF} main menu - replaces OB menu ${YLW} >${RED} main ${YLW} -${DEF} main menu - replaces OB menu
${YLW} >${RED} settings ${YLW} -${DEF} settings menu ${YLW} >${RED} settings ${YLW} -${DEF} settings menu
${YLW} >${RED} right ${YLW} -${DEF} right panel ${YLW} >${RED} right ${YLW} -${DEF} right panel
${YLW} >${RED} places ${YLW} -${DEF} places - left sidepanel ${YLW} >${RED} places ${YLW} -${DEF} places - left sidepanel
${YLW} >${RED} mblogout ${YLW} -${DEF} run logout script ${YLW} >${RED} mblogout ${YLW} -${DEF} run logout script
${YLW} >${RED} screenshot ${YLW} -${DEF} run screenshot script ${YLW} >${RED} screenshot ${YLW} -${DEF} run screenshot script
" >&2 " >&2
exit 1 exit 1
;; ;;