places updated
This commit is contained in:
parent
18bee5aa2e
commit
2b62f6da40
@ -5,6 +5,7 @@
|
||||
|
||||
JGWIDTH="322"
|
||||
|
||||
[ $(pidof picom) ] && RADIUS="12"
|
||||
|
||||
SCREENWIDTH=$(xdpyinfo | awk '/^ +dimensions/ {print $2}' | cut -d 'x' -f1)
|
||||
|
||||
@ -89,7 +90,17 @@ CONFIG_FILE=$(mktemp)
|
||||
MENU_ITEMS=$(mktemp)
|
||||
trap "rm -f ${CONFIG_FILE} ${MENU_ITEMS}" EXIT
|
||||
|
||||
((POSX = SCREENWIDTH - JGWIDTH))
|
||||
#Liczba onitorów
|
||||
#xrandr --listmonitors | grep Monitors |awk '{print $2}'
|
||||
|
||||
#Pozycja myszy
|
||||
#xdotool getmouselocation | awk '{print $1}'|cut -d ':' -f2
|
||||
|
||||
#WIDTH1 i WIDTH2
|
||||
#{ read WIDTH1; read WIDTH2; } <<< "$(xrandr --current | grep '*' | uniq | awk '{print $0}' | cut -d 'x' -f1)"no to jest wszystko co potrzeba
|
||||
|
||||
POSX=$((SCREENWIDTH - JGWIDTH))
|
||||
echo "JGWIDTH: $JGWIDTH SCREENWIDTH: $SCREENWIDTH POSX: $POSX"
|
||||
|
||||
MENU_HEIGHT_MIN=$(xdpyinfo | awk '/^ +dimensions/ {print $2}' | cut -d 'x' -f2)
|
||||
|
||||
@ -223,31 +234,30 @@ cat <<EOF > ${MENU_ITEMS}
|
||||
@text,,70,50,200,20,4,left,top,#666666,#444444,<small>$USER@$HOSTNAME</small>
|
||||
|
||||
^sep(Szybka nawigacja)
|
||||
Katalog główny,^pipe(jgmenu_run ob --cmd='obbrowser /'
|
||||
Katalog domowy,^pipe(jgmenu_run ob --cmd='mabox-places-pipemenu'
|
||||
|
||||
$(basename $(xdg-user-dir DESKTOP)),^pipe(jgmenu_run ob --cmd="mabox-places-pipemenu $(xdg-user-dir DESKTOP)"
|
||||
$(basename $(xdg-user-dir DOWNLOAD)),^pipe(jgmenu_run ob --cmd="mabox-places-pipemenu $(xdg-user-dir DOWNLOAD)"
|
||||
$(basename $(xdg-user-dir TEMPLATES)),^pipe(jgmenu_run ob --cmd="mabox-places-pipemenu $(xdg-user-dir TEMPLATES)"
|
||||
$(basename $(xdg-user-dir PUBLICSHARE)),^pipe(jgmenu_run ob --cmd="mabox-places-pipemenu $(xdg-user-dir PUBLICSHARE)"
|
||||
$(basename $(xdg-user-dir DOCUMENTS)),^pipe(jgmenu_run ob --cmd="mabox-places-pipemenu $(xdg-user-dir DOCUMENTS)"
|
||||
$(basename $(xdg-user-dir MUSIC)),^pipe(jgmenu_run ob --cmd="mabox-places-pipemenu $(xdg-user-dir MUSIC)"
|
||||
$(basename $(xdg-user-dir PICTURES)),^pipe(jgmenu_run ob --cmd="mabox-places-pipemenu $(xdg-user-dir PICTURES)"
|
||||
$(basename $(xdg-user-dir VIDEOS)),^pipe(jgmenu_run ob --cmd="'mabox-places-pipemenu' $(xdg-user-dir VIDEOS)"
|
||||
Katalog główny,^pipe(jgmenu_run ob --cmd='obbrowser /')
|
||||
Katalog domowy,^pipe(jgmenu_run ob --cmd='mabox-places-pipemenu')
|
||||
|
||||
$(basename $(xdg-user-dir DESKTOP)),^pipe(places $(xdg-user-dir DESKTOP))
|
||||
$(basename $(xdg-user-dir DOWNLOAD)),^pipe(places $(xdg-user-dir DOWNLOAD))
|
||||
$(basename $(xdg-user-dir TEMPLATES)),^pipe(places $(xdg-user-dir TEMPLATES))
|
||||
$(basename $(xdg-user-dir PUBLICSHARE)),^pipe(places $(xdg-user-dir PUBLICSHARE))
|
||||
$(basename $(xdg-user-dir DOCUMENTS)),^pipe(places $(xdg-user-dir DOCUMENTS))
|
||||
$(basename $(xdg-user-dir MUSIC)),^pipe(places $(xdg-user-dir MUSIC))
|
||||
$(basename $(xdg-user-dir PICTURES)),^pipe(places $(xdg-user-dir PICTURES))
|
||||
$(basename $(xdg-user-dir VIDEOS)),^pipe(places $(xdg-user-dir VIDEOS))
|
||||
^sep(Zakładki)
|
||||
^sep()
|
||||
|
||||
<big></big> Wyszukiwarka plików, fsearch
|
||||
EOF
|
||||
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
|
||||
}
|
||||
|
||||
mblogout() {
|
||||
|
||||
CONFIG_FILE=$(mktemp)
|
||||
MENU_ITEMS=$(mktemp)
|
||||
trap "rm -f ${CONFIG_FILE} ${MENU_ITEMS}" EXIT
|
||||
|
||||
trap "rm -f ${CONFIG_FILE} ${MENU_ITEMS};wmctrl -k off" EXIT
|
||||
xdotool
|
||||
#Lokalne zmienne;
|
||||
JGWIDTH="340"
|
||||
MENU_HALIGN="center"
|
||||
@ -256,17 +266,19 @@ MENU_PADDING_TOP=213
|
||||
TABS="280"
|
||||
ITEM_HEIGHT="30"
|
||||
FONT="Noto Sans Medium 11"
|
||||
MENU_RADIUS=10
|
||||
THUMB="$(DISPLAY=:0 scrot -t 340x213 -o /tmp/mblogout.png -e 'echo $m')"
|
||||
MENU_RADIUS=${RADIUS:-0}
|
||||
|
||||
|
||||
mkconfigfile
|
||||
|
||||
|
||||
wmctrl -k on
|
||||
THUMB="$(DISPLAY=:0 scrot -t 340x213 -o /tmp/mblogout.png -e 'echo $m')"
|
||||
cat <<EOF > ${MENU_ITEMS}
|
||||
@icon,,0,0,340,100,4,left,top,,,$THUMB
|
||||
@icon,,10,20,48,48,4,left,top,,,/usr/share/icons/hicolor/48x48/apps/mbcc.png
|
||||
@text,,120,150,220,20,4,left,top,#EEEEEE,#111111,$OSNAME $OSVERSION <sup> $OSCODE</sup>
|
||||
@text,,120,170,240,20,4,left,top,#009900,#444444,<small>Jądro: $KERNEL $HOSTTYPE</small>
|
||||
@text,,120,190,200,20,4,left,top,#DDDDDD,#DDDDDD,<small>$USER@$HOSTNAME</small>
|
||||
@text,,180,170,220,20,4,left,top,#EEEEEE,#111111,$OSNAME $OSVERSION <sup> $OSCODE</sup>
|
||||
@text,,180,190,200,20,4,left,top,#DDDDDD,#DDDDDD,<small>$USER@$HOSTNAME</small>
|
||||
^sep(Wylogować?)
|
||||
Wyloguj,openbox --exit
|
||||
Uśpij,systemctl suspend
|
||||
@ -277,6 +289,7 @@ cat <<EOF > ${MENU_ITEMS}
|
||||
^sep()
|
||||
Anuluj <small>esc</small>,exit 1
|
||||
EOF
|
||||
|
||||
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
|
||||
}
|
||||
|
||||
@ -293,7 +306,7 @@ MENU_VALIGN="center"
|
||||
TABS="280"
|
||||
ITEM_HEIGHT="25"
|
||||
FONT="Noto Sans Medium 10"
|
||||
MENU_RADIUS=10
|
||||
MENU_RADIUS=${RADIUS:-0}
|
||||
|
||||
IMG="$(xdg-user-dir PICTURES)/Mabox_%Y-%m-%d-%H:%M:%s.png"
|
||||
VIEW="'viewnior $IMG'"
|
||||
|
38
bin/places
Executable file
38
bin/places
Executable file
@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Inspired by the {a,b}l-places-pipemenu scripts found in
|
||||
# ArchLabs and BunsenLabs
|
||||
#
|
||||
|
||||
: ${JGMENU_RESOURCE_OPENER=xdg-open}
|
||||
|
||||
path=${1:-$HOME}
|
||||
path=${path%/}
|
||||
|
||||
test -d "$path" || { echo "$0: '$path' is not a directory" >&2 ; exit 1 ; }
|
||||
|
||||
for i in $path/*
|
||||
do
|
||||
test -e "$i" || continue
|
||||
shortname=${i##*/}
|
||||
if test -d "$i"
|
||||
then
|
||||
directories_menu="${directories_menu}
|
||||
${shortname},^pipe(places '${path}/${shortname}')"
|
||||
else
|
||||
files_menu="$files_menu
|
||||
${shortname},${JGMENU_RESOURCE_OPENER} ${path}/${shortname}"
|
||||
fi
|
||||
done
|
||||
printf "%b\n" "^sep(${path})"
|
||||
printf "%b\n" "Browse here...,${JGMENU_RESOURCE_OPENER} ${path}"
|
||||
printf "%b\n" "^sep()"
|
||||
printf "%b\n" "^sep(Katalogi)"
|
||||
printf "%b\n" "${directories_menu}"
|
||||
printf "%b\n" "^sep(Katalogi)"
|
||||
printf "%b\n" "${files_menu}"
|
||||
|
||||
if test -z "${directories_menu}" && test -z "${files_menu}"
|
||||
then
|
||||
printf "%b\n" '<empty>'
|
||||
fi
|
Loading…
Reference in New Issue
Block a user