more fixes

master
Daniel Napora 2020-02-17 17:14:08 +01:00
parent 398e669870
commit a7ac01194b
2 changed files with 36 additions and 10 deletions

View File

@ -1,7 +1,21 @@
#!/usr/bin/env bash
# Read a directory to an array and sort it directories first.
case $LANG in
pl*)
DIRECTORIES="Katalogi"
FILES="Pliki"
OPENDIR="Otwórz w menadżerze plików"
OPENTERM="Otwórz w terminalu"
;;
*)
DIRECTORIES="Directories"
FILES="Files"
OPENDIR="Open filemanager here"
OPENTERM="Open terminal here"
;;
esac
: ${JGMENU_RESOURCE_OPENER=xdg-open}
DIRECTORY=${1:-$HOME}
@ -20,13 +34,13 @@
done
printf "%b\n" "^sep(<small><i>${DIRECTORY:-/}</i></small>)"
printf "%b\n" " Otwórz w menadżerze plików,${JGMENU_RESOURCE_OPENER} \"${DIRECTORY:-/}\""
printf "%b\n" " Otwórz w terminalu,terminator --working-directory=\"${DIRECTORY:-/}\""
printf "%b\n" " $OPENDIR,${JGMENU_RESOURCE_OPENER} \"${DIRECTORY:-/}\""
printf "%b\n" " $OPENTERM,terminator --working-directory=\"${DIRECTORY:-/}\""
if [ ${#dirs[@]} -ne 0 ]; then
printf "%b\n" "^sep(Katalogi)"
printf "%b\n" "^sep($DIRECTORIES)"
printf '%s\n' "${dirs[@]}"
fi
if [ ${#files[@]} -ne 0 ]; then
printf "%b\n" "^sep(Pliki)"
printf "%b\n" "^sep($FILES)"
printf '%s\n' "${files[@]}"
fi

View File

@ -8,6 +8,7 @@ case $jgmenu_theme in
export color_norm_fg="#FFFFFF"
;;
obtheme)
export color_title_fg="#FFFFFF"
ob_file=$HOME/.config/openbox/rc.xml
[[ -f $ob_file ]] && wm_theme=$(awk '/<theme>/ {while (getline n) {if (match(n, /<name>/)){l=n; exit}}} END {split(l, a, "[<>]"); print a[3]}' "$ob_file")
while read -r a b c
@ -16,7 +17,7 @@ case $jgmenu_theme in
done < $HOME/.config/mabox/jgobthemes/$wm_theme.colorrc
;;
*)
export color_norm_fg="#FFFFF"
export color_norm_fg="#FFFFFF"
;;
esac
echo "BG$color_menu_bg"
@ -96,12 +97,12 @@ color_sel_border = ${color_sel_border:-#504e65 100}
color_sep_fg = ${color_sep_fg:-#4D4D4D 100}
color_sep_bg = ${color_sep_bg:-#262626 100}
color_title_fg = ${color_title_fg:-#4D4D4D 100}
color_title_border = ${color_title_border:-#504e65 100}
color_title_border = ${color_title_border:-#169f6f 100}
color_title_bg = ${color_title_bg:-#262626 100}
color_scroll_ind = ${COLOR_SCROLL_IND:-#504e65 100}
sep_markup = weight="bold" foreground="${color_title_fg% *}"
sep_markup = weight="bold" foreground="${color_title_fg% *:-#FFFFFF}"
font = ${font:-Noto Sans Medium 9}
icon_size = ${ICON_SIZE:-0}
EOF
@ -147,7 +148,7 @@ mkconfigfile
cat <<EOF > ${MENU_ITEMS}
@icon,,225,10,48,48,4,left,top,,,/usr/share/icons/hicolor/48x48/apps/distributor-logo-mabox.png
@text,,20,10,200,20,4,left,top,${color_norm_fg% *},#111111,<big>$OSNAME $OSVERSION</big> <sup> $OSCODE</sup>
@text,,20,10,200,20,4,left,top,${color_title_fg% *},#111111,<big>$OSNAME $OSVERSION</big> <sup> $OSCODE</sup>
@text,,20,30,200,20,4,left,top,#666666,#444444,<small>$USER@$HOSTNAME</small>
@text,,20,50,200,20,4,left,top,#666666,#444444,
#@rect,,40,70,262,20,0,left,top,#666666,#262626,
@ -199,11 +200,13 @@ 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,
^sep()
 wróć,^back()
^tag(mirrory)
Wszystkie,^term(sudo pacman-mirrors -i -c all)
Najbliższe (wg GEOIP),term(sudo pacman-mirrors -i --geoip)
^sep()
 wróć,^back()
^tag(wyglad)
@ -221,6 +224,7 @@ Panele Tint2,^pipe(jgmenu_run ob --cmd=mabox-tint2-pipemenu)
Kompozytor,^pipe(jgmenu_run ob --cmd='mabox-compositor' --tag='Kompo'),compton
^sep(Predefiniowane konfiguracje pulpitu)
Menadżer schematów,mb-obthemes
^sep()
 wróć,^back()
^tag(weblinks)
@ -237,8 +241,16 @@ Forum Manjaro PL,exo-open --launch WebBrowser https://forum.manjaro.pl
^sep(ArchLinux)
ArchWiki,exo-open --launch WebBrowser https://wiki.archlinux.org/
^sep(Openbox)
Strona domowa OpenBox,exo-open --launch WebBrowser http://openbox.org/wiki/Help:Contents
OpenBox na ArchWiki,exo-open --launch WebBrowser https://wiki.archlinux.org/index.php/Openbox
OpenBox na ArchWiki PL,exo-open --launch WebBrowser https://wiki.archlinux.org/index.php/Openbox_(Polski)
^sep(Dokumentacja Tint2)
Tint2 na ArchWiki,exo-open --launch WebBrowser https://wiki.archlinux.org/index.php/Tint2
^sep(Dokumentacja Conky)
Dokumantacja Conky,exo-open --launch WebBrowser http://conky.sourceforge.net/documentation.html
Conky na Github,exo-open --launch WebBrowser https://github.com/brndnmtthws/conky/wiki
Conky na ArchWiki,exo-open --launch WebBrowser https://wiki.archlinux.org/index.php/Conky
^sep()
 wróć,^back()
EOF
@ -260,7 +272,7 @@ mkconfigfile
cat <<EOF > ${MENU_ITEMS}
@icon,,10,10,48,48,4,left,top,,,/usr/share/icons/hicolor/48x48/apps/mbcc.png
@icon,,40,$(expr $MENU_HEIGHT_MIN - 96),143,96,4,left,top,,,$HOME/.config/mabox/tux.svg
@text,,70,10,200,20,4,left,top,${color_norm_fg% *},#111111,<big>$OSNAME $OSVERSION</big> <sup> $OSCODE</sup>
@text,,70,10,200,20,4,left,top,${color_title_fg% *},#111111,<big>$OSNAME $OSVERSION</big> <sup> $OSCODE</sup>
@text,,70,30,200,20,4,left,top,#666666,#444444,<small>$USER@$HOSTNAME</small>
@text,,70,50,200,20,4,left,top,#666666,#444444,