Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #by xpander
- # Define toggle file
- TOGGLE=$HOME/.toggle_output
- # Define output name and target positions
- POSITION_1=2560,1440
- POSITION_2=2560,0
- # Check current position using kscreen-doctor
- CURRENT_POSITION=$(kscreen-doctor -o | grep "Output:" -A 6 | grep -m1 "Geometry:" | awk '{print $3}')
- echo $CURRENT_POSITION
- # Toggle position
- if [ ! -e $TOGGLE ]; then
- touch $TOGGLE
- # Set to position 2560,1440
- kscreen-doctor output.1.position.$POSITION_1
- echo "Position set to: $POSITION_1"
- else
- rm $TOGGLE
- # Set to position 2560,0
- kscreen-doctor output.1.position.$POSITION_2
- echo "Position set to: $POSITION_2"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement