a guest Jan 7th, 2019 386 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- # Script to switch second monitor off or back on again
- # sterky was here...
- # Check if second display (DP-2) is enabled
- check=$(nvidia-settings -q dpys | grep DP-2 | grep enabled)
- # Switch display config
- if [ -z "$check" ]; then
- # If disabled - notify and enable second screen
- nvidia-settings --assign CurrentMetaMode="DP-4: 2560x1440_165 +0+0, DP-2: 2560x1440_165 +2560+0"
- notify-send "Dualscreen - enabled" -t 4000 -i messagebox_info
- # If enabled - notify and disable second screen
- nvidia-settings --assign CurrentMetaMode="DP-4: 2560x1440_165 +0+0"
- notify-send "Dualscreen - disabled" -t 4000 -i messagebox_info
RAW Paste Data