]> git.notmuchmail.org Git - sup/commitdiff
set icon title as well as window title when running under X
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Wed, 26 Mar 2008 16:10:17 +0000 (09:10 -0700)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Wed, 26 Mar 2008 16:10:17 +0000 (09:10 -0700)
Based on a patch by Marcus Williams.

lib/sup/buffer.rb

index d40a6267d193cb01905c38efbf38bfad581463ba..dc0f001b5f26b2e28463f77ce29a0ad6df102612 100644 (file)
@@ -263,7 +263,11 @@ EOS
         get_status_and_title @focus_buf # must be called outside of the ncurses lock
       end
 
-    print "\033]2;#{title}\07" if title && @in_x
+    if title && @in_x
+      ## http://rtfm.etla.org/xterm/ctlseq.html (see Operating System Controls)
+      print "\033]2;#{title}\07" # window
+      print "\033]0;#{title}\07" # icon title
+    end
 
     Ncurses.mutex.lock unless opts[:sync] == false