script: add update-gdm-monitors
This commit is contained in:
parent
ac4aeb4657
commit
65aa0e117e
1 changed files with 23 additions and 0 deletions
23
scripts/.local/bin/update-gdm-monitors
Executable file
23
scripts/.local/bin/update-gdm-monitors
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/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
|
||||
|
Reference in a new issue