171 lines
4.7 KiB
Plaintext
171 lines
4.7 KiB
Plaintext
|
#!/bin/bash
|
||
|
JGWIDTH="322"
|
||
|
|
||
|
SCREENWIDTH=$(xdpyinfo | awk '/^ +dimensions/ {print $2}' | cut -d 'x' -f1)
|
||
|
SCREENHEIGHT=$(xdpyinfo | awk '/^ +dimensions/ {print $2}' | cut -d 'x' -f2)
|
||
|
OSNAME=$(lsb_release -d | awk '{print $2}')
|
||
|
OSVERSION=$(lsb_release -r | awk '{print $2}')
|
||
|
OSCODE=$(lsb_release -c | awk '{print $2}')
|
||
|
KERNEL=$(uname -r)
|
||
|
|
||
|
((POSX = SCREENWIDTH - JGWIDTH))
|
||
|
echo $POSX
|
||
|
|
||
|
mkconfigfile() {
|
||
|
cat <<EOF > ${CONFIG_FILE}
|
||
|
stay_alive = 0
|
||
|
hide_back_items = 0
|
||
|
terminal_exec = terminator
|
||
|
terminal_args = -e
|
||
|
tabs = 200
|
||
|
menu_margin_x = $POSX
|
||
|
menu_margin_y = 0
|
||
|
menu_width = $JGWIDTH
|
||
|
menu_height_min = $SCREENHEIGHT
|
||
|
menu_padding_top = 90
|
||
|
menu_padding_right = 10
|
||
|
menu_padding_bottom = 10
|
||
|
menu_padding_left = 10
|
||
|
menu_radius = 0
|
||
|
menu_valign = top
|
||
|
|
||
|
item_height = 20
|
||
|
item_halign = left
|
||
|
|
||
|
sep_markup = font="Noto Sans Bold 10" foreground="#FFFFFF"
|
||
|
font = Noto Sans Medium 9
|
||
|
icon_size = 0
|
||
|
|
||
|
color_menu_bg = #222222 95
|
||
|
color_menu_border = #2f9b85 100
|
||
|
color_norm_bg = #262626 80
|
||
|
color_norm_fg = #CCCCCC 100
|
||
|
color_sel_bg = #169f6f 80
|
||
|
color_sel_fg = #f8f8f8 100
|
||
|
color_sel_border = #504e65 100
|
||
|
color_sep_fg = #2f9b85 100
|
||
|
color_sep_bg = #111111 100
|
||
|
color_scroll_ind = #504e65 100
|
||
|
EOF
|
||
|
}
|
||
|
|
||
|
main() {
|
||
|
CONFIG_FILE=$(mktemp)
|
||
|
MENU_ITEMS=$(mktemp)
|
||
|
trap "rm -f ${CONFIG_FILE} ${MENU_ITEMS}" EXIT
|
||
|
mkconfigfile
|
||
|
|
||
|
cat <<EOF > ${MENU_ITEMS}
|
||
|
@icon,,10,20,48,48,4,left,top,,,/usr/share/icons/hicolor/48x48/apps/mbcc.png
|
||
|
@text,,70,10,200,20,4,left,top,#EEEEEE,#111111,<big>$OSNAME $OSVERSION $OSCODE</big>
|
||
|
@text,,70,30,200,20,4,left,top,#666666,#444444,<small>Jądro:</small> $KERNEL $HOSTTYPE
|
||
|
@text,,70,50,200,20,4,left,top,#666666,#444444,<small>$USER@$HOSTNAME</small>
|
||
|
@rect,,12,70,292,20,1,left,top,#666666,#262626,
|
||
|
@search,,12,70,292,20,4,left,top,#169f6f,#222222,""" pisz aby wyszukać"""
|
||
|
|
||
|
^sep()
|
||
|
^sep(Zarządzanie oprogramowaniem)
|
||
|
^sep()
|
||
|
Aktualizacja systemu (Pamac),pamac-manager --updates
|
||
|
Aktualizacja systemu (cli),^term(sudo pacman -Syyu)
|
||
|
Menadżer pakietów - Pamac,pamac-manager
|
||
|
Odnawianie kluczy,^term(sudo pacman -Sy archlinux-keyring manjaro-keyring mabox-keyring)
|
||
|
Ranking mirrorów,^checkout(mirrory)
|
||
|
^sep()
|
||
|
^sep(Ustawienia)
|
||
|
^sep()
|
||
|
System i sprzęt,^root(system)
|
||
|
Wygląd i zachowanie,^root(wyglad)
|
||
|
|
||
|
^sep()
|
||
|
^sep(Pomoc)
|
||
|
^sep()
|
||
|
Skróty klawiszowe,^root(shortcuts)
|
||
|
|
||
|
Miejsca,^pipe(jgmenu_run ob --cmd='obbrowser $HOME' --tag='Places'),drive-harddisk
|
||
|
Kompozytor,^pipe(jgmenu_run ob --cmd='mabox-compositor' --tag='Kompo'),compton
|
||
|
^sep()
|
||
|
^sep(Wyjście)
|
||
|
^sep()
|
||
|
Wyloguj,openbox --exit
|
||
|
Hibernuj,systemctl hibernate,
|
||
|
Rebootuj,systemctl reboot
|
||
|
Wyłącz,systemctl poweroff
|
||
|
Zablokuj ekran, betterlockscreen -l
|
||
|
|
||
|
^tag(system)
|
||
|
^sep()
|
||
|
^sep(System i sprzęt)
|
||
|
^sep()
|
||
|
^sep(Ustawienia)
|
||
|
Język i formaty,manjaro-settings-manager -m msm_locale,
|
||
|
Pakiety językowe,manjaro-settings-manager -m msm_language_packages,
|
||
|
Jądro systemowe,manjaro-settings-manager -m msm_kernel,
|
||
|
Konta użytkowników,manjaro-settings-manager -m msm_users,
|
||
|
Data i Czas,manjaro-settings-manager -m msm_timedate,
|
||
|
Ustawienia klawiatury,manjaro-settings-manager -m msm_keyboard,
|
||
|
Konfiguracja sprzętowa,manjaro-settings-manager -m msm_mhwd,
|
||
|
wróć,^back()
|
||
|
|
||
|
^tag(mirrory)
|
||
|
Wszystkie,^term(sudo pacman-mirrors -i -c all)
|
||
|
Najbliższe (wg GEOIP),term(sudo pacman-mirrors -i --geoip)
|
||
|
wróć,^back()
|
||
|
|
||
|
^tag(wyglad)
|
||
|
^sep()
|
||
|
^sep(Wygląd i zachowanie)
|
||
|
^sep()
|
||
|
Wystrój i ikony,lxappearance,
|
||
|
Wybór tapety,nitrogen,
|
||
|
Menadżer konfiguracji OpenBox,obconf,
|
||
|
wróć,^back()
|
||
|
|
||
|
|
||
|
^tag(shortcuts)
|
||
|
^sep(Uruchamianie aplikacji)
|
||
|
Terminal W+t,terminator,
|
||
|
Przeglądarka WWW W+w,exo-open --launch WebBrowser,
|
||
|
Menadżer plików W+f,exo-open --launch FileManager,
|
||
|
Edytor tekstu W+e,exo-open --launch TextEditor,
|
||
|
Kontrola głośności <span fgcolor="#222222" bgcolor="#BBBBBB" size="smaller"> W+v </span>,pavucontrol,
|
||
|
włącz/wyłącz Kompozytora <span fgcolor="#222222" bgcolor="#BBBBBB" size="smaller"> W+c </span>,compton_toggle,
|
||
|
Blokuj ekran W+l, betterlockscreen -l,
|
||
|
|
||
|
^sep(Okna)
|
||
|
^sep(Pulpity)
|
||
|
wróć,^back()
|
||
|
EOF
|
||
|
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
|
||
|
}
|
||
|
|
||
|
second() {
|
||
|
CONFIG_FILE=$(mktemp)
|
||
|
MENU_ITEMS=$(mktemp)
|
||
|
trap "rm -f ${CONFIG_FILE} ${MENU_ITEMS}" EXIT
|
||
|
mkconfigfile
|
||
|
cat <<EOF > ${MENU_ITEMS}
|
||
|
@icon,,10,50,48,48,4,left,top,,,/usr/share/icons/hicolor/48x48/apps/mbcc.png
|
||
|
@text,,70,40,200,20,4,left,top,#EEEEEE,#111111,$OSNAME $OSVERSION $OSCODE
|
||
|
@text,,70,60,200,20,4,left,top,#666666,#444444,Jądr: $OSTYPE $HOSTTYPE
|
||
|
@text,,70,80,200,20,4,left,top,#666666,#444444,$USER@$HOSTNAME
|
||
|
@search,,10,100,200,20,4,left,top,#006600,#444444,"""...pisz, aby wyszukać"""
|
||
|
^sep()
|
||
|
^sep(System i sprzęt)
|
||
|
^sep()
|
||
|
EOF
|
||
|
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
|
||
|
}
|
||
|
case "$1" in
|
||
|
main) main;;
|
||
|
*)
|
||
|
echo -e "
|
||
|
kuku
|
||
|
|
||
|
" >&2
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
exit 0
|