Created
          March 5, 2024 16:02 
        
      - 
      
- 
        Save nicolas-oliveira/52a61cdb58946abac2673985212ead7d to your computer and use it in GitHub Desktop. 
    script to manipulate font size and icons size with two monitors with different size but 1080p
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| # Absolute path to xrandr | |
| XRANDR="/usr/bin/xrandr" | |
| second_monitor_commands() { | |
| notify-send "Segundo monitor identificado!" "Configurações aplicadas automaticamente" | |
| gsettings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 40 | |
| gsettings set org.gnome.desktop.interface text-scaling-factor 0.85 | |
| } | |
| only_one_monitor_commands() { | |
| notify-send "Único monitor identificado!" "Configurações aplicadas automaticamente" | |
| gsettings set org.gnome.desktop.interface text-scaling-factor 0.94 | |
| gsettings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 48 | |
| } | |
| if [ $XDG_SESSION_TYPE == "x11" ]; then | |
| if $XRANDR | grep -q "HDMI-0 connected"; then | |
| second_monitor_commands | |
| else | |
| only_one_monitor_commands | |
| fi | |
| fi | |
| if [ $XDG_SESSION_TYPE == "wayland" ]; then | |
| if $XRANDR | grep -q "XWAYLAND1 connected"; then | |
| second_monitor_commands | |
| else | |
| only_one_monitor_commands | |
| fi | |
| fi | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment