On Tue, 26 Jul 2011, Nicholas Marriott wrote: > Yes this is what tmux used to do, but you are forgetting konsole, > gnome-terminal, Eterm and many others. > > I would check for the XT flag in terminfo in preference. Our terminfo is > new enough that it is present. > > If setupterm() or similar has already been called by this point you can > try tigetflag("XT").
No way :( ncmpcpp does not use terminfo(3) > The other possibility is to default Config.set_window_title to off and > allow users to turn it on only when they are running on a terminal which > supports it. This is probably the better/easiest thing to do. I think I'll commit the diff below: if you want the window title, just uncomment '#enable_window_title = "yes"' in your ~/.ncmpcpp/config... Index: Makefile =================================================================== RCS file: /cvs/ports/audio/ncmpcpp/Makefile,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 Makefile --- Makefile 25 Jul 2011 20:08:23 -0000 1.1.1.1 +++ Makefile 26 Jul 2011 10:07:32 -0000 @@ -3,6 +3,7 @@ COMMENT = ncurses mpd client inspired by ncmpc DISTNAME = ncmpcpp-0.5.7 +REVISION = 0 EXTRACT_SUFX = .tar.bz2 Index: patches/patch-src_settings_cpp =================================================================== RCS file: patches/patch-src_settings_cpp diff -N patches/patch-src_settings_cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_settings_cpp 26 Jul 2011 10:07:32 -0000 @@ -0,0 +1,16 @@ +$OpenBSD$ + +Disable set_window_title by default as it causes troubles +with wscons + +--- src/settings.cpp.orig Tue Jul 26 11:49:54 2011 ++++ src/settings.cpp Tue Jul 26 11:49:31 2011 +@@ -428,7 +428,7 @@ void NcmpcppConfig::SetDefaults() + media_library_disable_two_column_mode = false; + discard_colors_if_item_is_selected = true; + store_lyrics_in_song_dir = false; +- set_window_title = true; ++ set_window_title = false; + mpd_port = 6600; + mpd_connection_timeout = 15; + crossfade_time = 5;