l5-scale-the-screen 869 Bytes
Newer Older
Joao Azevedo's avatar
Joao Azevedo committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/bin/bash

function usage()
{
  echo "Usage: $0, or just press the Scale the Screen Icon in the app tray"
  exit 0
}

case "$1" in
   --help|-h|-?)
     usage
   ;;
esac

15
DISPLAY=$(wlr-randr | head -n 1 | awk '{print $1}')
Joao Azevedo's avatar
Joao Azevedo committed
16 17

yad --title scale_screen --form \
18 19 20 21 22
  --field='Default dpi (2x scale)':fbtn "wlr-randr --output $DISPLAY --scale 2" \
  --field='Low dpi (1.75x scale)!window-restore-symbolic':fbtn "wlr-randr --output $DISPLAY --scale 1.75" \
  --field='Medium dpi (1.5x scale)!window-minimize-symbolic':fbtn "wlr-randr --output $DISPLAY --scale 1.5" \
  --field='High dpi (1.25x scale)!window-maximize-symbolic':fbtn "wlr-randr --output $DISPLAY --scale 1.25" \
  --field='Max dpi (1x scale)!view-fullscreen-symbolic':fbtn "wlr-randr --output $DISPLAY --scale 1" \
Joao Azevedo's avatar
Joao Azevedo committed
23 24
  --field='Restart Phosh':fbtn "sudo systemctl restart phosh" \
  --button='Close!gtk-cancel':1