26 lines
908 B
Bash
Executable File
26 lines
908 B
Bash
Executable File
#!/bin/sh
|
|
# À lancer sur la machine distante (par scripts/test-remote.sh) : ouvre Sway dans une fenêtre de
|
|
# la session Xorg en cours, avec show-me en mode hôte dedans.
|
|
# Usage : remote-host.sh ADRESSE_DU_SERVEUR
|
|
set -eu
|
|
DIR=$(dirname "$(readlink -f "$0")")
|
|
SERVER=${1:?adresse du serveur attendue, par exemple ws://127.0.0.1:7878}
|
|
export DISPLAY=${DISPLAY:-:0}
|
|
unset WAYLAND_DISPLAY
|
|
CFG=$(mktemp)
|
|
trap 'rm -f "$CFG"' EXIT
|
|
cat > "$CFG" <<CFGEOF
|
|
xwayland disable
|
|
output * bg #2b5278 solid_color
|
|
default_border pixel 2
|
|
# Raccourcis actifs quand la fenêtre Sway a le focus.
|
|
bindsym F9 exec $DIR/show-me toggle
|
|
bindsym F10 exec $DIR/show-me clear --all
|
|
bindsym F11 exec $DIR/show-me mode manual
|
|
bindsym F12 exec $DIR/show-me mode auto 5
|
|
bindsym Escape exec $DIR/show-me quit, exit
|
|
exec foot
|
|
exec $DIR/show-me run --server $SERVER --room test --name Distant --host
|
|
CFGEOF
|
|
WLR_BACKENDS=x11 exec sway -c "$CFG"
|