just another script I wrote for myself. It's very convenient if you're playing on a laptop with external monitor.
It's pretty much self explanatory but if you have any questions, feel free to ask.
Requirements: crudini and xdotool.
Code: Select all
#! /bin/bash
character="Allamu_Giladren"
resx=1366
resy=768
extresx=1220
extresy=685
if xrandr | grep "HDMI1 connected" > /dev/null; then
crudini --set ~/.config/openmw/settings.cfg "Video" "fullscreen" false
crudini --set ~/.config/openmw/settings.cfg "Video" "Screen" 1
crudini --set ~/.config/openmw/settings.cfg "Video" "resolution x" $extresx
crudini --set ~/.config/openmw/settings.cfg "Video" "resolution y" $extresy
xdotool mousemove $((resx + extresx / 2)) $((extresy / 2))
else
crudini --set ~/.config/openmw/settings.cfg "Video" "fullscreen" true
crudini --set ~/.config/openmw/settings.cfg "Video" "Screen" 0
crudini --set ~/.config/openmw/settings.cfg "Video" "resolution x" $resx
crudini --set ~/.config/openmw/settings.cfg "Video" "resolution y" $resy
xdotool mousemove $((resx / 2)) $((resy / 2))
fi
openmw \
--skip-menu \
--load-savegame ~/.local/share/openmw/saves/$character/Quicksave.omwsave