tryung to fix multimonitor behaviuor
This commit is contained in:
parent
2b62f6da40
commit
4f6edc2236
@ -92,14 +92,27 @@ trap "rm -f ${CONFIG_FILE} ${MENU_ITEMS}" EXIT
|
||||
|
||||
#Liczba onitorów
|
||||
#xrandr --listmonitors | grep Monitors |awk '{print $2}'
|
||||
if [ $(xrandr --listmonitors | grep Monitors |awk '{print $2}') -gt "1" ]
|
||||
then
|
||||
{ read WIDTH1; read WIDTH2; } <<< "$(xrandr --current | grep '*' | uniq | awk '{print $0}' | cut -d 'x' -f1)"
|
||||
MOUSEPOS=$(xdotool getmouselocation | awk '{print $1}'|cut -d ':' -f2)
|
||||
if [ "$MOUSEPOS" -gt "$WIDTH1" ]
|
||||
then
|
||||
POSX=$((WIDTH2 - JGWIDTH))
|
||||
else
|
||||
POSX=$((WIDTH1 - JGWIDTH))
|
||||
fi
|
||||
else
|
||||
POSX=$((SCREENWIDTH - JGWIDTH))
|
||||
fi
|
||||
|
||||
#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
|
||||
#{ read WIDTH1; read WIDTH2; } <<< "$(xrandr --current | grep '*' | uniq | awk '{print $0}' | cut -d 'x' -f1)"
|
||||
|
||||
|
||||
POSX=$((SCREENWIDTH - JGWIDTH))
|
||||
echo "JGWIDTH: $JGWIDTH SCREENWIDTH: $SCREENWIDTH POSX: $POSX"
|
||||
|
||||
MENU_HEIGHT_MIN=$(xdpyinfo | awk '/^ +dimensions/ {print $2}' | cut -d 'x' -f2)
|
||||
@ -354,30 +367,29 @@ MENU_ITEMS=$(mktemp)
|
||||
trap "rm -f ${CONFIG_FILE} ${MENU_ITEMS}" EXIT
|
||||
|
||||
#Lokalne zmienne;
|
||||
JGWIDTH="500"
|
||||
JGWIDTH="300"
|
||||
MENU_HALIGN="center"
|
||||
MENU_VALIGN="center"
|
||||
MENU_HEIGHT_MIN="210"
|
||||
MENU_HEIGHT_MAX="210"
|
||||
#MENU_HEIGHT_MAX="210"
|
||||
TABS="280"
|
||||
ITEM_HEIGHT="50"
|
||||
FONT="Noto Sans Medium 12"
|
||||
COLUMNS="2"
|
||||
COLUMNS="1"
|
||||
|
||||
mkconfigfile
|
||||
|
||||
cat <<EOF > ${MENU_ITEMS}
|
||||
@icon,,10,20,48,48,4,left,top,,,/usr/share/icons/hicolor/48x48/apps/mbcc.png
|
||||
@text,,70,10,220,20,4,left,top,#EEEEEE,#111111,$OSNAME $OSVERSION <sup> $OSCODE</sup>
|
||||
@text,,70,30,240,20,4,left,top,#666666,#444444,<small>Jądro: $KERNEL $HOSTTYPE</small>
|
||||
@text,,70,50,200,20,4,left,top,#666666,#444444,<small>$USER@$HOSTNAME</small>
|
||||
@text,,70,30,240,20,4,left,top,#666666,#444444,<small>$USER@$HOSTNAME</small>
|
||||
@text,,70,50,200,20,4,left,top,#666666,#444444,<i>Panele dla Maboxa</i>
|
||||
|
||||
Szybka nawigacja,mb-jgtools places
|
||||
coś tu będzie,
|
||||
System panel,mb-jgtools right
|
||||
Wylogowanie,mb-jgtools mblogout
|
||||
Menu główne,mb-jgtools main
|
||||
Zrzuty ekranu,mb-jgtools screenshot
|
||||
|
||||
Wylogowanie,mb-jgtools mblogout
|
||||
EOF
|
||||
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user