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