Last active
March 2, 2022 15:32
-
-
Save tomty89/84f78aa6e34ed35addb029edef9793d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias 1920='echo Xft.dpi: 144 | xrdb; xrandr --output screen --mode 1920x1080; i3-msg restart' | |
alias 2560='echo Xft.dpi: 192 | xrdb; xrandr --output screen --mode 2560x1600; i3-msg restart' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
display="${DISPLAY/:/}" | |
case "$display" in | |
[8-9]) | |
xrandr --newmode 1920x1080 0 1920 0 0 0 1080 0 0 0 | |
xrandr --addmode screen 1920x1080 | |
;; | |
esac | |
if [ "$display" = 9 ]; then | |
xrandr --output screen --mode 1920x1080 | |
fi | |
case "$display" in | |
[1-6] | 9) | |
dpi=144 | |
;; | |
8) | |
dpi=192 | |
;; | |
esac | |
echo Xft.dpi: "$dpi" | xrdb | |
systemctl --user start x11vnc@"$display" | |
mkdir -p "$XDG_RUNTIME_DIR"/i3 && exec i3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
port=5900 | |
if [ "$1" != 8 ]; then | |
let port+="$1" | |
if [ "$port" -eq 5900 ]; then | |
port=5908 | |
fi | |
fi | |
exec x11vnc -rfbport "$port" -rfbportv6 "$port" -nevershared -forever -repeat -capslock -skip_lockkeys -skip_keycodes 187,188 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=x11vnc-%i | |
ConditionPathExists=%T/.X11-unix/X%i | |
PartOf=xvfb@%i.service | |
After=xvfb@%i.service | |
[Service] | |
Environment=DISPLAY=:%i XAUTHORITY=%t/xauthority | |
ExecStart=/usr/local/bin/x11vnc-wrapper %i | |
SuccessExitStatus=2 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Xvfb-%i | |
[Service] | |
ExecStart=/usr/bin/bash -lc 'Xvfb-start :%i -screen 0 2560x1600x24' | |
[Install] | |
WantedBy=default.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/tomty89/sx/tree/Xvfb-start