From 67f41937b209b4914e6f784b108379f3d399ea09 Mon Sep 17 00:00:00 2001 From: Daniel Napora Date: Tue, 21 Jan 2020 01:20:38 +0100 Subject: [PATCH] more jgpanels --- mabox-en/Packages-Desktop | 1 + mabox-pl/Packages-Desktop | 1 + .../etc/skel/.config/mb-jgmenus/mbjgrc | 11 +++ .../etc/skel/.config/openbox/autostart | 3 + .../desktop-overlay/etc/skel/bin/mb-jglogout | 83 ++++++++++++++++ .../desktop-overlay/etc/skel/bin/mb-jgpanel | 25 +++-- .../desktop-overlay/etc/skel/bin/mb-jgplaces | 94 +++++++++++++++++++ 7 files changed, 208 insertions(+), 10 deletions(-) create mode 100644 mabox-pl/desktop-overlay/etc/skel/.config/mb-jgmenus/mbjgrc create mode 100755 mabox-pl/desktop-overlay/etc/skel/bin/mb-jglogout create mode 100755 mabox-pl/desktop-overlay/etc/skel/bin/mb-jgplaces diff --git a/mabox-en/Packages-Desktop b/mabox-en/Packages-Desktop index 74c1906..5fc0b48 100644 --- a/mabox-en/Packages-Desktop +++ b/mabox-en/Packages-Desktop @@ -275,6 +275,7 @@ mabox-keyring mabox-pipemenus mabox-utilities mabox-artwork +cornora gkrellm gkrellm-themes gkrellmlaunch diff --git a/mabox-pl/Packages-Desktop b/mabox-pl/Packages-Desktop index 7e0c53d..925eb67 100644 --- a/mabox-pl/Packages-Desktop +++ b/mabox-pl/Packages-Desktop @@ -281,6 +281,7 @@ mabox-keyring mabox-pipemenus mabox-utilities mabox-artwork +cornora gkrellm gkrellm-themes gkrellmlaunch diff --git a/mabox-pl/desktop-overlay/etc/skel/.config/mb-jgmenus/mbjgrc b/mabox-pl/desktop-overlay/etc/skel/.config/mb-jgmenus/mbjgrc new file mode 100644 index 0000000..4a419de --- /dev/null +++ b/mabox-pl/desktop-overlay/etc/skel/.config/mb-jgmenus/mbjgrc @@ -0,0 +1,11 @@ +# kolor procent nieprzeźroczystości +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" \ No newline at end of file diff --git a/mabox-pl/desktop-overlay/etc/skel/.config/openbox/autostart b/mabox-pl/desktop-overlay/etc/skel/.config/openbox/autostart index eb9b985..de22d82 100755 --- a/mabox-pl/desktop-overlay/etc/skel/.config/openbox/autostart +++ b/mabox-pl/desktop-overlay/etc/skel/.config/openbox/autostart @@ -57,3 +57,6 @@ xcape -e 'Super_L=Super_L|space' ## Betterlockscreen setup betterlockscreen_setup & + +## Hot Corners +cornora -tl "mb-jgplaces main" -tr "mb-jgpanel main" -br "mb-jglogout main" \ No newline at end of file diff --git a/mabox-pl/desktop-overlay/etc/skel/bin/mb-jglogout b/mabox-pl/desktop-overlay/etc/skel/bin/mb-jglogout new file mode 100755 index 0000000..977356f --- /dev/null +++ b/mabox-pl/desktop-overlay/etc/skel/bin/mb-jglogout @@ -0,0 +1,83 @@ +#!/bin/bash + +# Get colors from config file +. $HOME/.config/mb-jgmenus/mbjgrc + +JGWIDTH="300" + +OSNAME=$(lsb_release -d | awk '{print $2}') +OSVERSION=$(lsb_release -r | awk '{print $2}') +OSCODE=$(lsb_release -c | awk '{print $2}') +KERNEL=$(uname -r) + +mkconfigfile() { +cat < ${CONFIG_FILE} +stay_alive = 0 +hide_back_items = 0 +terminal_exec = terminator +terminal_args = -e +tabs = 200 +menu_margin_x = 0 +menu_margin_y = 0 +menu_width = $JGWIDTH +menu_height_min = 0 +menu_padding_top = 90 +menu_padding_right = 10 +menu_padding_bottom = 10 +menu_padding_left = 10 +menu_radius = 0 +menu_halign = center +menu_valign = center + +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 = $COLOR_MENU_BG +color_menu_border = $COLOR_MENU_BORDER +color_norm_bg = $COLOR_NORM_BG +color_norm_fg = $COLOR_NORM_FG +color_sel_bg = $COLOR_SEL_BG +color_sel_fg = $COLOR_SEL_FG +color_sel_border = $COLOR_SEL_BORDER +color_sep_fg = $COLOR_SEP_FG +color_sep_bg = $COLOR_SEP_BG +color_scroll_ind = $COLOR_SCROLL_IND +EOF +} + +main() { +CONFIG_FILE=$(mktemp) +MENU_ITEMS=$(mktemp) +trap "rm -f ${CONFIG_FILE} ${MENU_ITEMS}" EXIT +mkconfigfile + +cat < ${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,$OSNAME $OSVERSION $OSCODE +@text,,70,30,200,20,4,left,top,#666666,#444444,Jądro: $KERNEL $HOSTTYPE +@text,,70,50,200,20,4,left,top,#666666,#444444,$USER@$HOSTNAME + Wyloguj,openbox --exit + Uśpij,systemctl suspend + Hibernuj,systemctl hibernate + Rebootuj,systemctl reboot + Wyłącz,systemctl poweroff + Zablokuj ekran, betterlockscreen -l +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 diff --git a/mabox-pl/desktop-overlay/etc/skel/bin/mb-jgpanel b/mabox-pl/desktop-overlay/etc/skel/bin/mb-jgpanel index 19c2027..bc4e22a 100755 --- a/mabox-pl/desktop-overlay/etc/skel/bin/mb-jgpanel +++ b/mabox-pl/desktop-overlay/etc/skel/bin/mb-jgpanel @@ -1,4 +1,8 @@ #!/bin/bash + +# Get colors from config file +. $HOME/.config/mb-jgmenus/mbjgrc + JGWIDTH="322" SCREENWIDTH=$(xdpyinfo | awk '/^ +dimensions/ {print $2}' | cut -d 'x' -f1) @@ -36,16 +40,16 @@ 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 +color_menu_bg = $COLOR_MENU_BG +color_menu_border = $COLOR_MENU_BORDER +color_norm_bg = $COLOR_NORM_BG +color_norm_fg = $COLOR_NORM_FG +color_sel_bg = $COLOR_SEL_BG +color_sel_fg = $COLOR_SEL_FG +color_sel_border = $COLOR_SEL_BORDER +color_sep_fg = $COLOR_SEP_FG +color_sep_bg = $COLOR_SEP_BG +color_scroll_ind = $COLOR_SCROLL_IND EOF } @@ -88,6 +92,7 @@ Kompozytor,^pipe(jgmenu_run ob --cmd='mabox-compositor' --tag='Kompo'),compton ^sep(Wyjście) ^sep()  Wyloguj,openbox --exit + Uśpij,systemctl suspend  Hibernuj,systemctl hibernate,  Rebootuj,systemctl reboot  Wyłącz,systemctl poweroff diff --git a/mabox-pl/desktop-overlay/etc/skel/bin/mb-jgplaces b/mabox-pl/desktop-overlay/etc/skel/bin/mb-jgplaces new file mode 100755 index 0000000..b52c1d5 --- /dev/null +++ b/mabox-pl/desktop-overlay/etc/skel/bin/mb-jgplaces @@ -0,0 +1,94 @@ +#!/bin/bash + +# Get colors from config file +. $HOME/.config/mb-jgmenus/mbjgrc + +JGWIDTH="280" + +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) + + +mkconfigfile() { +cat < ${CONFIG_FILE} +stay_alive = 0 +hide_back_items = 0 +terminal_exec = terminator +terminal_args = -e +tabs = 200 +menu_margin_x = 0 +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 +nmenu_halign = left +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 = $COLOR_MENU_BG +color_menu_border = $COLOR_MENU_BORDER +color_norm_bg = $COLOR_NORM_BG +color_norm_fg = $COLOR_NORM_FG +color_sel_bg = $COLOR_SEL_BG +color_sel_fg = $COLOR_SEL_FG +color_sel_border = $COLOR_SEL_BORDER +color_sep_fg = $COLOR_SEP_FG +color_sep_bg = $COLOR_SEP_BG +color_scroll_ind = $COLOR_SCROLL_IND +EOF +} + +main() { +CONFIG_FILE=$(mktemp) +MENU_ITEMS=$(mktemp) +trap "rm -f ${CONFIG_FILE} ${MENU_ITEMS}" EXIT +mkconfigfile + +cat < ${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,$OSNAME $OSVERSION $OSCODE +@text,,70,30,200,20,4,left,top,#666666,#444444,Jądro: $KERNEL $HOSTTYPE +@text,,70,50,200,20,4,left,top,#666666,#444444,$USER@$HOSTNAME +^sep() +^sep(Szybka nawigacja) +^sep() + Katalog główny,^pipe(jgmenu_run ob --cmd='obbrowser /' + Katalog domowy,^pipe(jgmenu_run ob --cmd='obbrowser $HOME' +^sep() + $(basename $(xdg-user-dir DESKTOP)),^pipe(jgmenu_run ob --cmd="obbrowser $(xdg-user-dir DESKTOP)" + $(basename $(xdg-user-dir DOWNLOAD)),^pipe(jgmenu_run ob --cmd="obbrowser $(xdg-user-dir DOWNLOAD)" + $(basename $(xdg-user-dir TEMPLATES)),^pipe(jgmenu_run ob --cmd="obbrowser $(xdg-user-dir TEMPLATES)" + $(basename $(xdg-user-dir PUBLICSHARE)),^pipe(jgmenu_run ob --cmd="obbrowser $(xdg-user-dir PUBLICSHARE)" + $(basename $(xdg-user-dir DOCUMENTS)),^pipe(jgmenu_run ob --cmd="obbrowser $(xdg-user-dir DOCUMENTS)" + $(basename $(xdg-user-dir MUSIC)),^pipe(jgmenu_run ob --cmd="obbrowser $(xdg-user-dir MUSIC)" + $(basename $(xdg-user-dir PICTURES)),^pipe(jgmenu_run ob --cmd="obbrowser $(xdg-user-dir PICTURES)" + $(basename $(xdg-user-dir VIDEOS)),^pipe(jgmenu_run ob --cmd="obbrowser $(xdg-user-dir VIDEOS)" +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