diff options
author | lassulus <git@lassul.us> | 2023-09-07 12:26:31 +0200 |
---|---|---|
committer | lassulus <git@lassul.us> | 2023-09-07 12:40:43 +0200 |
commit | 2e5167de1560ad0d7b8e294c72e1913f694160c2 (patch) | |
tree | b618daa9f125650e9276bae7848f854c48d6c95e /lass/5pkgs/super-vnc/default.nix | |
parent | 6a3a423dad19264c0c42821c7676e85ecc122d21 (diff) |
lass: migrate awayriplass
Diffstat (limited to 'lass/5pkgs/super-vnc/default.nix')
-rw-r--r-- | lass/5pkgs/super-vnc/default.nix | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/lass/5pkgs/super-vnc/default.nix b/lass/5pkgs/super-vnc/default.nix deleted file mode 100644 index ce0e3aaa7..000000000 --- a/lass/5pkgs/super-vnc/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ pkgs, lib }: let - - quoteChar = c: - if c == "\n" then "'\n'" - else c; - quote = x: if x == "" then "''" else lib.stringAsChars quoteChar x; - -in pkgs.writers.writeDashBin "super-vnc" '' - PATH=${lib.makeBinPath (with pkgs; [ - xorg.xrandr gnugrep coreutils xorg.xorgserver gnused openssh gawk tightvnc - ])} - remote=$1 - res_x=$(xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f1) - res_y=$(xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f2) - export modeline="$(gtf "$res_x" "$res_y" 60 | sed -n 's/.*Modeline "\([^" ]\+\)" \(.*\)/\1 \2/p')" - export name="$(echo "$modeline" | sed 's/\([^ ]\+\) .*/\1/')" - export vncline="''${res_x}x''${res_y}+0+0" - - if [ -z "$modeline" -o -z "$name" ]; then - echo "Error! modeline=$modeline name=$name" - exit 1 - fi - - echo $modeline - - # TODO user random highport - ssh "$remote" -L 5900:localhost:55900 bash <<EOF -set -x -export DISPLAY=:0 -export output=\$(xrandr | grep disconnected | tail -1 | cut -d' ' -f1) -xrandr --newmode $modeline -xrandr --verbose --addmode "\$output" "$name" -xrandr --output "\$output" --off -xrandr --verbose --output "\$output" --mode "$name" --right-of "\$(xrandr | grep primary | cut -d ' ' -f1)" -EOF - sleep 2 - vncviewer localhost:55900 -'' |