summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/window-tree.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2020-05-16 14:10:30 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2020-05-16 14:10:30 +0000
commit565144c4220108a293dac7b85b2bdc71b277e872 (patch)
tree2469c434a471f154fb1e038c90e05aa3670f5c21 /usr.bin/tmux/window-tree.c
parent606370526fe111db397b0695d93d31bc67073f3d (diff)
Tweak the default choose modes formats:
- Only show pane title if it is not default and not empty. - Add a prettier time format and use that instead of long ctime(). - Remove clutter and change the order.
Diffstat (limited to 'usr.bin/tmux/window-tree.c')
-rw-r--r--usr.bin/tmux/window-tree.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/tmux/window-tree.c b/usr.bin/tmux/window-tree.c
index 2ada0d4f400..1a590e1b709 100644
--- a/usr.bin/tmux/window-tree.c
+++ b/usr.bin/tmux/window-tree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window-tree.c,v 1.47 2020/04/22 21:01:28 nicm Exp $ */
+/* $OpenBSD: window-tree.c,v 1.48 2020/05/16 14:10:29 nicm Exp $ */
/*
* Copyright (c) 2017 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -38,13 +38,13 @@ static void window_tree_key(struct window_mode_entry *,
#define WINDOW_TREE_DEFAULT_FORMAT \
"#{?pane_format," \
"#{?pane_marked,#[reverse],}" \
- "#{pane_current_command}#{?pane_active,*,}#{?pane_marked,M,} \"#{pane_title}\"" \
+ "#{pane_current_command}#{?pane_active,*,}#{?pane_marked,M,}" \
+ "#{?#{&&:#{pane_title},#{!=:#{pane_title},#{host_short}}},: \"#{pane_title}\",}" \
"," \
"#{?window_format," \
"#{?window_marked_flag,#[reverse],}" \
- "#{window_name}#{window_flags} " \
- "(#{window_panes} panes)" \
- "#{?#{==:#{window_panes},1}, \"#{pane_title}\",}" \
+ "#{window_name}#{window_flags}" \
+ "#{?#{&&:#{==:#{window_panes},1},#{&&:#{pane_title},#{!=:#{pane_title},#{host_short}}}},: \"#{pane_title}\",}" \
"," \
"#{session_windows} windows" \
"#{?session_grouped, " \