Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- find_hdmi_output() {
- local hdmi_output
- hdmi_output=$(xrandr | grep " connected" | grep "HDMI" | awk '{print $1}')
- echo "$hdmi_output"
- }
- adjust_hdmi_scale() {
- local hdmi_output="$1"
- local horizontal_scale=100
- local vertical_scale=100
- if [ -n "$hdmi_output" ]; then
- # Aplique as configurações de escala
- xrandr --output "$hdmi_output" --scale ${horizontal_scale}x${vertical_scale}
- # Se necessário, ajuste a posição da tela
- xrandr --output "$hdmi_output" --pos 0x0
- echo "Escala ajustada para ${horizontal_scale}x${vertical_scale} na saída $hdmi_output"
- exit 1
- fi
- echo "Nenhuma saída HDMI encontrada."
- }
- main() {
- local hdmi_output
- hdmi_output=$(find_hdmi_output)
- adjust_hdmi_scale "$hdmi_output"
- }
- main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement