The `DISPLAY` environment variable may optionally also
include a screen number after the display number: `:0.0`.
This change makes sure the display number is correctly
extracted even in this case.
---
nix-bwrap.tcl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nix-bwrap.tcl b/nix-bwrap.tcl
index 3fe88f5..8253b6c 100755
--- a/nix-bwrap.tcl+++ b/nix-bwrap.tcl
@@ -62,7 +62,7 @@ set bwrap_options [list --unshare-all --clearenv --setenv HOME $env(HOME)]
lappend bwrap_options {*}[requisites_binds $exe]
if {$params(x11) == 1} {
- set display [string trimleft $env(DISPLAY) ":"]+ regexp {:([0-9]+)(\.[0-9]+)?} $env(DISPLAY) _ display lappend bwrap_options \
--ro-bind "$env(HOME)/.Xauthority" "$env(HOME)/.Xauthority" \
--ro-bind "/tmp/.X11-unix/X$display" "/tmp/.X11-unix/X$display" \
--
2.37.2