diff --git a/.gitignore b/.gitignore index f0fccf8..f321da0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ nix/local.nix -nix/monitor.nix \ No newline at end of file diff --git a/README.md b/README.md index 32c587d..acbd80f 100644 --- a/README.md +++ b/README.md @@ -42,14 +42,6 @@ You need to **relogin** if you install virt-manager (libvirt) first time. $ go get -u code.dumpstack.io/tools/appvm -## Generate resolution - -By default uses 1920x1080. If you need to regenerate `appvm/nix/monitor.nix`: - - $ $GOPATH/src/code.dumpstack.io/tools/appvm/generate-resolution.sh 3840 2160 > $GOPATH/src/code.dumpstack.io/tools/appvm/nix/monitor.nix - -Autodetection is a bash-spaghetti, so you need to check results. BTW it's just a X.org monitor section. - ## Run application $ appvm start chromium --verbose diff --git a/appvm.go b/appvm.go index 5a3f11b..4a9e8cd 100644 --- a/appvm.go +++ b/appvm.go @@ -125,8 +125,8 @@ func list(l *libvirt.Libvirt) { for _, f := range files { if f.Name() != "base.nix" && - f.Name() != "local.nix" && f.Name() != "monitor.nix" && - f.Name() != "local.nix.template" && f.Name() != "monitor.nix.template" { + f.Name() != "local.nix" && + f.Name() != "local.nix.template" { fmt.Println("\t", f.Name()[0:len(f.Name())-4]) } } @@ -161,12 +161,6 @@ func prepareTemplates(appvmPath string) (err error) { } } - if _, err = os.Stat(appvmPath + "/nix/monitor.nix"); os.IsNotExist(err) { - err = copyFile(appvmPath+"/nix/monitor.nix.template", appvmPath+"/nix/monitor.nix") - if err != nil { - return - } - } return } diff --git a/generate-resolution.sh b/generate-resolution.sh deleted file mode 100755 index 7c814be..0000000 --- a/generate-resolution.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -if [[ "$1" == "" || "$2" == "" ]]; then - echo -e "Usage:\t$0 X Y" - exit 1 -fi - -MONITOR_SIZE="$(xrandr | grep mm | head -n 1 | awk '{ print $(NF-2) " " $(NF) }' | sed 's/mm//g')" -CVT="$(cvt ${1} ${2} | grep Modeline)" -echo "{" -echo " services.xserver.monitorSection = ''" -echo " " ${CVT} -echo " " Option '"PreferredMode"' $(echo ${CVT} | awk '{ print $2 }') -echo " " DisplaySize ${MONITOR_SIZE} # In millimeters -echo " '';" -echo "}" diff --git a/nix/base.nix b/nix/base.nix index 801c1c7..4bc514d 100644 --- a/nix/base.nix +++ b/nix/base.nix @@ -1,7 +1,6 @@ {pkgs, ...}: { imports = [ - ]; diff --git a/nix/monitor.nix.template b/nix/monitor.nix.template deleted file mode 100644 index 6d18d00..0000000 --- a/nix/monitor.nix.template +++ /dev/null @@ -1,6 +0,0 @@ -{ - services.xserver.monitorSection = '' - Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync - Option "PreferredMode" "1920x1080_60.00" - ''; -}