~mil/f_scripts

2344f048ff3020a52f885239c676d89344ec268c — Miles Alan 8 months ago 10435e9 dev-f_xorg
f_xorg: Use fbvncm fork, switch to i3, don't run fbvnc in loop
1 files changed, 6 insertions(+), 10 deletions(-)

M scripts/f_xorg
M scripts/f_xorg => scripts/f_xorg +6 -10
@@ 1,6 1,6 @@
#!/usr/bin/env osh
shopt -s strict:all
DEP="fbvnc xvfb x11vnc xdpyinfo spectrwm xclock gedit firefox"
DEP="fbvncm xvfb x11vnc i3wm xclock firefox gedit"
DEC="Run an arbitrary Xorg application via VNC and view in the framebuffer"
DOC="
  f_xorg allows you to run an arbitrary Xorg application in Xvfb along


@@ 12,9 12,8 @@ DOC="
"
VAR="
  F_XORG_APPS='xclock gedit firefox'
  F_XORG_FBPRATIO='2 / 3'
  F_XORG_YRES='1440'
  F_XORG_XRES='720'
  F_XORG_WMCMD='mkdir -p  ~/.config/i3; cp -r /etc/i3/config ~/.config/i3/config; i3'
  F_XORG_RES='720x960'
"

runbg() {


@@ 25,9 24,8 @@ runbg() {
  export DISPLAY=$DISPLAY
  pkill Xvfb
  pkill x11vnc
  pkill dwm
  pkill X
  Xvfb -screen 0 720x960x24 $DISPLAY >&2 2>/dev/null &
  Xvfb -screen 0 "${F_XORG_RES}x24" $DISPLAY >&2 2>/dev/null &

  while ! xdpyinfo -display "${DISPLAY}" >&2 2>/dev/null; do
	echo "Waiting for X server to become available"


@@ 35,7 33,7 @@ runbg() {
  done

  x11vnc -many -forever -ncache 1 >&2 2>/dev/null &
  spectrwm >&2 2>/dev/null &
  eval "$F_XORG_WMCMD" &
  "$CMD" >&2 2>/dev/null &
}



@@ 52,9 50,7 @@ run() {
    echo "Waiting for VNC server to become available"
    sleep 1
  done
  while true; do
    fbvnc
  done
  fbvncm
}

main() {