This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/dotfiles/scripts/update-gdm-monitors

24 lines
384 B
Text
Raw Normal View History

2020-04-07 04:48:09 +02:00
#!/bin/sh
# updates gdm to reflect the curent users monitors configurations
main(){
[ "$USER" = "root" ] && echo "Don't run as root" && exit 1
set -e
sudo cp ~/.config/monitors.xml /var/lib/gdm/.config/
sudo chown gdm:gdm /var/lib/gdm/.config/monitors.xml
}
if [ "$1" = "-h" ] || [ "$1" = "--help" ]
then
echo "Usage:"
echo " \$ $0"
else
main
fi