octopus improvement
This commit is contained in:
parent
82f6d1c2e3
commit
68c06e6aeb
1 changed files with 24 additions and 20 deletions
|
@ -3,6 +3,10 @@
|
|||
#OCTOPUS=~/Programmation/Utils/octopus.sh
|
||||
#This octopus handles all the actions like volume up, refresh status bar, etc..
|
||||
|
||||
SNU=1
|
||||
VGA=VGA$SNU
|
||||
LVDS=LVDS$SNU
|
||||
|
||||
if [ $# -lt 1 ]
|
||||
then
|
||||
echo "Usage : $0 [vol up|vol down|refresh|monitor extern|monitor laptop|monitor dual...]"
|
||||
|
@ -62,30 +66,30 @@ case $1 in
|
|||
"monitor")
|
||||
case $2 in
|
||||
"extern")
|
||||
xrandr --output LVDS1 --off \
|
||||
--output VGA1 --auto --rotate normal
|
||||
xrandr --output $LVDS --off \
|
||||
--output $VGA --auto --rotate normal
|
||||
;;
|
||||
"laptop")
|
||||
xrandr --output LVDS1 --auto --rotate normal \
|
||||
--output VGA1 --off
|
||||
xrandr --output $LVDS --auto --rotate normal \
|
||||
--output $VGA --off
|
||||
;;
|
||||
"dual")
|
||||
xrandr --output LVDS1 --auto --rotate normal \
|
||||
--output VGA1 --auto --rotate normal \
|
||||
--right-of LVDS1
|
||||
xrandr --output $LVDS --auto --rotate normal \
|
||||
--output $VGA --auto --rotate normal \
|
||||
--right-of $LVDS
|
||||
;;
|
||||
"programming")
|
||||
xrandr --output VGA1 --auto --rotate left \
|
||||
--output LVDS1 --off
|
||||
xrandr --output $VGA --auto --rotate left \
|
||||
--output $LVDS --off
|
||||
;;
|
||||
"pdfpc")
|
||||
xrandr --output LVDS1 --auto --rotate normal \
|
||||
--output VGA1 --auto --rotate normal \
|
||||
--left-of LVDS1
|
||||
xrandr --output $LVDS --auto --rotate normal \
|
||||
--output $VGA --auto --rotate normal \
|
||||
--left-of $LVDS
|
||||
;;
|
||||
"clone")
|
||||
xrandr --output LVDS1 --auto \
|
||||
--output VGA1 --auto --same-as LVDS1
|
||||
xrandr --output $LVDS --auto \
|
||||
--output $VGA --auto --same-as $LVDS
|
||||
;;
|
||||
"off")
|
||||
xset dpms force off
|
||||
|
@ -136,12 +140,12 @@ case $1 in
|
|||
;;
|
||||
|
||||
"init-all")
|
||||
# xrandr | grep "VGA2 disconnected" > /dev/null
|
||||
# if [ $? -eq 0 ]; then
|
||||
# $0 monitor laptop
|
||||
# else
|
||||
# $0 monitor extern
|
||||
# fi
|
||||
xrandr | grep "$VGA disconnected" > /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
$0 monitor laptop
|
||||
else
|
||||
$0 monitor extern
|
||||
fi
|
||||
|
||||
sudo killall dhcpcd
|
||||
$0 init-wifi &
|
||||
|
|
Loading…
Reference in a new issue