[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/4] dtas-console: set X11 terminal title iff DISPLAY is set
From: |
Eric Wong |
Subject: |
Re: [PATCH 3/4] dtas-console: set X11 terminal title iff DISPLAY is set |
Date: |
Tue, 11 Jan 2022 17:29:59 +0000 |
James Rowe <jnrowe@gmail.com> wrote:
> * Eric Wong (e@80x24.org) wrote:
> > +set_title = ENV['DISPLAY'] ? $stdout : nil
>
> Perhaps consider testing for $WAYLAND_DISPLAY too?
>
> Use case: If, like me, you're running a wayland compositor without Xwayland
> support then $DISPLAY won't be set.
Does the following work for you?
[btw, please reply-to-all, since subscription is optional and it avoids
nongnu.org being a SPOF, thanks]
-------8<------
diff --git a/bin/dtas-console b/bin/dtas-console
index 0e762bd..7a7ed6c 100755
--- a/bin/dtas-console
+++ b/bin/dtas-console
@@ -26,7 +26,7 @@
c = DTAS::UNIXClient.new
cur = YAML.load(c.req('current'))
readable = [ se, w, $stdin ]
-set_title = ENV['DISPLAY'] ? $stdout : nil
+set_title = (ENV['DISPLAY'] || ENV['WAYLAND_DISPLAY']) ? $stdout : nil
# current rg mode
rg_mode = DTAS::RGState::RG_MODE.keys.unshift("off")
[PATCH 4/4] dtas-console: add 'i' toggle to show comments (metadata), Eric Wong, 2022/01/07
[PATCH 5/4] splitfx: fix track_zpad with integer arg, Eric Wong, 2022/01/07
[PATCH 6/4] doc: drop ordered map from examples, Eric Wong, 2022/01/07