-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[𝚫] (penrose): added xephyr.sh for testing
- Loading branch information
1 parent
5ff3084
commit df4f837
Showing
3 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
result | ||
result-bin | ||
dist-newstyle | ||
__pycache__ |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
# Run an example build of penrose in an embeded Xephyr session. | ||
# | ||
# This is intended to be run via the `run-embeded` makefile target | ||
# which will also handle compilation of the examples themselves. | ||
# You will need to have the xephyr utility installed on your system | ||
# for this script to run: | ||
# https://wiki.archlinux.org/title/Xephyr | ||
# | ||
# usage: | ||
# EXAMPLE=with_layout_transformers APP=st make run-embeded | ||
# | ||
CUR_DIR="$(dirname $(readlink -f $0))" | ||
SCREEN_SIZE=${SCREEN_SIZE:-800x600} | ||
XDISPLAY=${XDISPLAY:-:1} | ||
EXAMPLE=${EXAMPLE:-orcinus-wm} | ||
APP=${APP:-st} | ||
|
||
touch $CUR_DIR/../xephyr.log | ||
|
||
Xephyr +extension RANDR -screen ${SCREEN_SIZE} ${XDISPLAY} -ac & | ||
XEPHYR_PID=$! | ||
|
||
sleep 1 | ||
env DISPLAY=${XDISPLAY} "$CUR_DIR/result-bin/bin/$EXAMPLE" 2>&1 $CUR_DIR/xephyr.log & | ||
WM_PID=$! | ||
|
||
trap "kill $XEPHYR_PID && kill $WM_PID && rm $CUR_DIR/xephyr.log" SIGINT SIGTERM exit | ||
|
||
env DISPLAY=${XDISPLAY} ${APP} & | ||
|
||
tail -f $CUR_DIR/../xephyr.log | ||
|
||
wait $WM_PID | ||
kill $XEPHYR_PID |