How to get TMux to only show windows when using choose-tree?
I recently installed the latest version of TMux and when I tried to switch between my windows (control-a w, or choose-tree) I was greeted with 3 entries instead of 2. Instead of only showing my windows TMux now insists on showing an extra session entry which 'contains' my windows.
Something I really don't need because I only use one session on my servers. And seeing 3 entries while I only have 2 windows is extremely counter-productive for me. I found the filtering options and eventually tried "#{==:#{window_index},>1}" which worked. However...
Unfortunately the filter option doesn't seem to filter the entire screen but only the entries within the session entry. While it's the session entry line I want to get rid off.
So summing up: I want to make TMux behave as it always used to, so it should show me my window entries and nothing else.
Thanks in advance.
configuration tmux
add a comment |
I recently installed the latest version of TMux and when I tried to switch between my windows (control-a w, or choose-tree) I was greeted with 3 entries instead of 2. Instead of only showing my windows TMux now insists on showing an extra session entry which 'contains' my windows.
Something I really don't need because I only use one session on my servers. And seeing 3 entries while I only have 2 windows is extremely counter-productive for me. I found the filtering options and eventually tried "#{==:#{window_index},>1}" which worked. However...
Unfortunately the filter option doesn't seem to filter the entire screen but only the entries within the session entry. While it's the session entry line I want to get rid off.
So summing up: I want to make TMux behave as it always used to, so it should show me my window entries and nothing else.
Thanks in advance.
configuration tmux
choose-tree is not the command you want. choose-window is your choice.
– Tagwint
Oct 23 '17 at 21:02
1
Incorrect. First; choose-window isn't mentioned in the manual page, second; it seems to be an internal alias for choose-tree because it behaves exactly the same.
– ShelLuser
Oct 23 '17 at 21:23
could you specify your tmux version?
– Tagwint
Oct 23 '17 at 22:02
Already did (somewhat): latest version, aka 2.6.
– ShelLuser
Oct 23 '17 at 22:36
That must be the difference. Mine is tmux 2.5, the latest for my distributive. It has select-window in man pages, bound to pfx+w, unlike select-tree bound to pfx-s. The latter behaves like you described, but the first like you want it to.
– Tagwint
Oct 23 '17 at 22:44
add a comment |
I recently installed the latest version of TMux and when I tried to switch between my windows (control-a w, or choose-tree) I was greeted with 3 entries instead of 2. Instead of only showing my windows TMux now insists on showing an extra session entry which 'contains' my windows.
Something I really don't need because I only use one session on my servers. And seeing 3 entries while I only have 2 windows is extremely counter-productive for me. I found the filtering options and eventually tried "#{==:#{window_index},>1}" which worked. However...
Unfortunately the filter option doesn't seem to filter the entire screen but only the entries within the session entry. While it's the session entry line I want to get rid off.
So summing up: I want to make TMux behave as it always used to, so it should show me my window entries and nothing else.
Thanks in advance.
configuration tmux
I recently installed the latest version of TMux and when I tried to switch between my windows (control-a w, or choose-tree) I was greeted with 3 entries instead of 2. Instead of only showing my windows TMux now insists on showing an extra session entry which 'contains' my windows.
Something I really don't need because I only use one session on my servers. And seeing 3 entries while I only have 2 windows is extremely counter-productive for me. I found the filtering options and eventually tried "#{==:#{window_index},>1}" which worked. However...
Unfortunately the filter option doesn't seem to filter the entire screen but only the entries within the session entry. While it's the session entry line I want to get rid off.
So summing up: I want to make TMux behave as it always used to, so it should show me my window entries and nothing else.
Thanks in advance.
configuration tmux
configuration tmux
asked Oct 23 '17 at 20:20
ShelLuserShelLuser
494
494
choose-tree is not the command you want. choose-window is your choice.
– Tagwint
Oct 23 '17 at 21:02
1
Incorrect. First; choose-window isn't mentioned in the manual page, second; it seems to be an internal alias for choose-tree because it behaves exactly the same.
– ShelLuser
Oct 23 '17 at 21:23
could you specify your tmux version?
– Tagwint
Oct 23 '17 at 22:02
Already did (somewhat): latest version, aka 2.6.
– ShelLuser
Oct 23 '17 at 22:36
That must be the difference. Mine is tmux 2.5, the latest for my distributive. It has select-window in man pages, bound to pfx+w, unlike select-tree bound to pfx-s. The latter behaves like you described, but the first like you want it to.
– Tagwint
Oct 23 '17 at 22:44
add a comment |
choose-tree is not the command you want. choose-window is your choice.
– Tagwint
Oct 23 '17 at 21:02
1
Incorrect. First; choose-window isn't mentioned in the manual page, second; it seems to be an internal alias for choose-tree because it behaves exactly the same.
– ShelLuser
Oct 23 '17 at 21:23
could you specify your tmux version?
– Tagwint
Oct 23 '17 at 22:02
Already did (somewhat): latest version, aka 2.6.
– ShelLuser
Oct 23 '17 at 22:36
That must be the difference. Mine is tmux 2.5, the latest for my distributive. It has select-window in man pages, bound to pfx+w, unlike select-tree bound to pfx-s. The latter behaves like you described, but the first like you want it to.
– Tagwint
Oct 23 '17 at 22:44
choose-tree is not the command you want. choose-window is your choice.
– Tagwint
Oct 23 '17 at 21:02
choose-tree is not the command you want. choose-window is your choice.
– Tagwint
Oct 23 '17 at 21:02
1
1
Incorrect. First; choose-window isn't mentioned in the manual page, second; it seems to be an internal alias for choose-tree because it behaves exactly the same.
– ShelLuser
Oct 23 '17 at 21:23
Incorrect. First; choose-window isn't mentioned in the manual page, second; it seems to be an internal alias for choose-tree because it behaves exactly the same.
– ShelLuser
Oct 23 '17 at 21:23
could you specify your tmux version?
– Tagwint
Oct 23 '17 at 22:02
could you specify your tmux version?
– Tagwint
Oct 23 '17 at 22:02
Already did (somewhat): latest version, aka 2.6.
– ShelLuser
Oct 23 '17 at 22:36
Already did (somewhat): latest version, aka 2.6.
– ShelLuser
Oct 23 '17 at 22:36
That must be the difference. Mine is tmux 2.5, the latest for my distributive. It has select-window in man pages, bound to pfx+w, unlike select-tree bound to pfx-s. The latter behaves like you described, but the first like you want it to.
– Tagwint
Oct 23 '17 at 22:44
That must be the difference. Mine is tmux 2.5, the latest for my distributive. It has select-window in man pages, bound to pfx+w, unlike select-tree bound to pfx-s. The latter behaves like you described, but the first like you want it to.
– Tagwint
Oct 23 '17 at 22:44
add a comment |
3 Answers
3
active
oldest
votes
This is working for me in tmux 2.6.1 using termite and the standard linux virtual terminal. Make sure you have the latest version of tmux, also try restarting tmux completely since changes do not always apply after reloading the config.
choose only sessions
bind-key -r -T prefix s choose-session

choose only windows in current session
bind-key -r -T prefix w run-shell 'tmux choose-tree -Nwf"##{==:##{session_name},#{session_name}}"'

choose both session and windows
bind-key -r -T prefix S choose-window

Neither of this solves the problem because although you can only choose windows in the current session the session bar is still displayed. You still have 3 lines with only 2 open windows. And that's what I'm trying to get rid off.
– ShelLuser
Oct 26 '17 at 22:03
Thanks for this! I'd also like to not have the session name displayed, but limiting windows to the current session is much better for my use case than the default.
– Henrik N
Mar 14 '18 at 12:04
@ShelLuser I don't think there's a way to do that. According to the documentation as of tmux 2.6 you cannot nest filters together. You're just going to have to settle for having the session name showing + the session's windows.
– Zypps987
Mar 16 '18 at 5:28
I'm removing this again because the up/down arrow keys don't seem to work well in the list of windows. A lot of the time I press an arrow key and nothing happens.
– Henrik N
Mar 22 '18 at 8:46
@HenrikN make sure you have xterm-keys on in your tmux config.
– Zypps987
Apr 5 '18 at 2:37
|
show 1 more comment
This works for me.
https://github.com/tmux/tmux/issues/1115
bind-key -r -T prefix w run-shell 'tmux choose-tree -Nwf"##{==:##{session_name},#{session_name}}"'
Thanks but all that does is put the focus on the current window, but it doesn't get rid of the first session line. So if you just start TMux and have 1 active window you still see 2 entries in the window selection ('choose tree').
– ShelLuser
Oct 24 '17 at 21:19
add a comment |
There was a significant rewrite of the choose mode in tmux 2.6 (https://raw.githubusercontent.com/tmux/tmux/2.6/CHANGES).
The option to start choose-tree with the sessions collapsed is choose-tree -s.
New contributor
eurico is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f400009%2fhow-to-get-tmux-to-only-show-windows-when-using-choose-tree%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is working for me in tmux 2.6.1 using termite and the standard linux virtual terminal. Make sure you have the latest version of tmux, also try restarting tmux completely since changes do not always apply after reloading the config.
choose only sessions
bind-key -r -T prefix s choose-session

choose only windows in current session
bind-key -r -T prefix w run-shell 'tmux choose-tree -Nwf"##{==:##{session_name},#{session_name}}"'

choose both session and windows
bind-key -r -T prefix S choose-window

Neither of this solves the problem because although you can only choose windows in the current session the session bar is still displayed. You still have 3 lines with only 2 open windows. And that's what I'm trying to get rid off.
– ShelLuser
Oct 26 '17 at 22:03
Thanks for this! I'd also like to not have the session name displayed, but limiting windows to the current session is much better for my use case than the default.
– Henrik N
Mar 14 '18 at 12:04
@ShelLuser I don't think there's a way to do that. According to the documentation as of tmux 2.6 you cannot nest filters together. You're just going to have to settle for having the session name showing + the session's windows.
– Zypps987
Mar 16 '18 at 5:28
I'm removing this again because the up/down arrow keys don't seem to work well in the list of windows. A lot of the time I press an arrow key and nothing happens.
– Henrik N
Mar 22 '18 at 8:46
@HenrikN make sure you have xterm-keys on in your tmux config.
– Zypps987
Apr 5 '18 at 2:37
|
show 1 more comment
This is working for me in tmux 2.6.1 using termite and the standard linux virtual terminal. Make sure you have the latest version of tmux, also try restarting tmux completely since changes do not always apply after reloading the config.
choose only sessions
bind-key -r -T prefix s choose-session

choose only windows in current session
bind-key -r -T prefix w run-shell 'tmux choose-tree -Nwf"##{==:##{session_name},#{session_name}}"'

choose both session and windows
bind-key -r -T prefix S choose-window

Neither of this solves the problem because although you can only choose windows in the current session the session bar is still displayed. You still have 3 lines with only 2 open windows. And that's what I'm trying to get rid off.
– ShelLuser
Oct 26 '17 at 22:03
Thanks for this! I'd also like to not have the session name displayed, but limiting windows to the current session is much better for my use case than the default.
– Henrik N
Mar 14 '18 at 12:04
@ShelLuser I don't think there's a way to do that. According to the documentation as of tmux 2.6 you cannot nest filters together. You're just going to have to settle for having the session name showing + the session's windows.
– Zypps987
Mar 16 '18 at 5:28
I'm removing this again because the up/down arrow keys don't seem to work well in the list of windows. A lot of the time I press an arrow key and nothing happens.
– Henrik N
Mar 22 '18 at 8:46
@HenrikN make sure you have xterm-keys on in your tmux config.
– Zypps987
Apr 5 '18 at 2:37
|
show 1 more comment
This is working for me in tmux 2.6.1 using termite and the standard linux virtual terminal. Make sure you have the latest version of tmux, also try restarting tmux completely since changes do not always apply after reloading the config.
choose only sessions
bind-key -r -T prefix s choose-session

choose only windows in current session
bind-key -r -T prefix w run-shell 'tmux choose-tree -Nwf"##{==:##{session_name},#{session_name}}"'

choose both session and windows
bind-key -r -T prefix S choose-window

This is working for me in tmux 2.6.1 using termite and the standard linux virtual terminal. Make sure you have the latest version of tmux, also try restarting tmux completely since changes do not always apply after reloading the config.
choose only sessions
bind-key -r -T prefix s choose-session

choose only windows in current session
bind-key -r -T prefix w run-shell 'tmux choose-tree -Nwf"##{==:##{session_name},#{session_name}}"'

choose both session and windows
bind-key -r -T prefix S choose-window

answered Oct 26 '17 at 9:45
Zypps987Zypps987
612
612
Neither of this solves the problem because although you can only choose windows in the current session the session bar is still displayed. You still have 3 lines with only 2 open windows. And that's what I'm trying to get rid off.
– ShelLuser
Oct 26 '17 at 22:03
Thanks for this! I'd also like to not have the session name displayed, but limiting windows to the current session is much better for my use case than the default.
– Henrik N
Mar 14 '18 at 12:04
@ShelLuser I don't think there's a way to do that. According to the documentation as of tmux 2.6 you cannot nest filters together. You're just going to have to settle for having the session name showing + the session's windows.
– Zypps987
Mar 16 '18 at 5:28
I'm removing this again because the up/down arrow keys don't seem to work well in the list of windows. A lot of the time I press an arrow key and nothing happens.
– Henrik N
Mar 22 '18 at 8:46
@HenrikN make sure you have xterm-keys on in your tmux config.
– Zypps987
Apr 5 '18 at 2:37
|
show 1 more comment
Neither of this solves the problem because although you can only choose windows in the current session the session bar is still displayed. You still have 3 lines with only 2 open windows. And that's what I'm trying to get rid off.
– ShelLuser
Oct 26 '17 at 22:03
Thanks for this! I'd also like to not have the session name displayed, but limiting windows to the current session is much better for my use case than the default.
– Henrik N
Mar 14 '18 at 12:04
@ShelLuser I don't think there's a way to do that. According to the documentation as of tmux 2.6 you cannot nest filters together. You're just going to have to settle for having the session name showing + the session's windows.
– Zypps987
Mar 16 '18 at 5:28
I'm removing this again because the up/down arrow keys don't seem to work well in the list of windows. A lot of the time I press an arrow key and nothing happens.
– Henrik N
Mar 22 '18 at 8:46
@HenrikN make sure you have xterm-keys on in your tmux config.
– Zypps987
Apr 5 '18 at 2:37
Neither of this solves the problem because although you can only choose windows in the current session the session bar is still displayed. You still have 3 lines with only 2 open windows. And that's what I'm trying to get rid off.
– ShelLuser
Oct 26 '17 at 22:03
Neither of this solves the problem because although you can only choose windows in the current session the session bar is still displayed. You still have 3 lines with only 2 open windows. And that's what I'm trying to get rid off.
– ShelLuser
Oct 26 '17 at 22:03
Thanks for this! I'd also like to not have the session name displayed, but limiting windows to the current session is much better for my use case than the default.
– Henrik N
Mar 14 '18 at 12:04
Thanks for this! I'd also like to not have the session name displayed, but limiting windows to the current session is much better for my use case than the default.
– Henrik N
Mar 14 '18 at 12:04
@ShelLuser I don't think there's a way to do that. According to the documentation as of tmux 2.6 you cannot nest filters together. You're just going to have to settle for having the session name showing + the session's windows.
– Zypps987
Mar 16 '18 at 5:28
@ShelLuser I don't think there's a way to do that. According to the documentation as of tmux 2.6 you cannot nest filters together. You're just going to have to settle for having the session name showing + the session's windows.
– Zypps987
Mar 16 '18 at 5:28
I'm removing this again because the up/down arrow keys don't seem to work well in the list of windows. A lot of the time I press an arrow key and nothing happens.
– Henrik N
Mar 22 '18 at 8:46
I'm removing this again because the up/down arrow keys don't seem to work well in the list of windows. A lot of the time I press an arrow key and nothing happens.
– Henrik N
Mar 22 '18 at 8:46
@HenrikN make sure you have xterm-keys on in your tmux config.
– Zypps987
Apr 5 '18 at 2:37
@HenrikN make sure you have xterm-keys on in your tmux config.
– Zypps987
Apr 5 '18 at 2:37
|
show 1 more comment
This works for me.
https://github.com/tmux/tmux/issues/1115
bind-key -r -T prefix w run-shell 'tmux choose-tree -Nwf"##{==:##{session_name},#{session_name}}"'
Thanks but all that does is put the focus on the current window, but it doesn't get rid of the first session line. So if you just start TMux and have 1 active window you still see 2 entries in the window selection ('choose tree').
– ShelLuser
Oct 24 '17 at 21:19
add a comment |
This works for me.
https://github.com/tmux/tmux/issues/1115
bind-key -r -T prefix w run-shell 'tmux choose-tree -Nwf"##{==:##{session_name},#{session_name}}"'
Thanks but all that does is put the focus on the current window, but it doesn't get rid of the first session line. So if you just start TMux and have 1 active window you still see 2 entries in the window selection ('choose tree').
– ShelLuser
Oct 24 '17 at 21:19
add a comment |
This works for me.
https://github.com/tmux/tmux/issues/1115
bind-key -r -T prefix w run-shell 'tmux choose-tree -Nwf"##{==:##{session_name},#{session_name}}"'
This works for me.
https://github.com/tmux/tmux/issues/1115
bind-key -r -T prefix w run-shell 'tmux choose-tree -Nwf"##{==:##{session_name},#{session_name}}"'
answered Oct 24 '17 at 10:32
Zypps987Zypps987
612
612
Thanks but all that does is put the focus on the current window, but it doesn't get rid of the first session line. So if you just start TMux and have 1 active window you still see 2 entries in the window selection ('choose tree').
– ShelLuser
Oct 24 '17 at 21:19
add a comment |
Thanks but all that does is put the focus on the current window, but it doesn't get rid of the first session line. So if you just start TMux and have 1 active window you still see 2 entries in the window selection ('choose tree').
– ShelLuser
Oct 24 '17 at 21:19
Thanks but all that does is put the focus on the current window, but it doesn't get rid of the first session line. So if you just start TMux and have 1 active window you still see 2 entries in the window selection ('choose tree').
– ShelLuser
Oct 24 '17 at 21:19
Thanks but all that does is put the focus on the current window, but it doesn't get rid of the first session line. So if you just start TMux and have 1 active window you still see 2 entries in the window selection ('choose tree').
– ShelLuser
Oct 24 '17 at 21:19
add a comment |
There was a significant rewrite of the choose mode in tmux 2.6 (https://raw.githubusercontent.com/tmux/tmux/2.6/CHANGES).
The option to start choose-tree with the sessions collapsed is choose-tree -s.
New contributor
eurico is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
There was a significant rewrite of the choose mode in tmux 2.6 (https://raw.githubusercontent.com/tmux/tmux/2.6/CHANGES).
The option to start choose-tree with the sessions collapsed is choose-tree -s.
New contributor
eurico is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
There was a significant rewrite of the choose mode in tmux 2.6 (https://raw.githubusercontent.com/tmux/tmux/2.6/CHANGES).
The option to start choose-tree with the sessions collapsed is choose-tree -s.
New contributor
eurico is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
There was a significant rewrite of the choose mode in tmux 2.6 (https://raw.githubusercontent.com/tmux/tmux/2.6/CHANGES).
The option to start choose-tree with the sessions collapsed is choose-tree -s.
New contributor
eurico is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
eurico is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered 46 mins ago
euricoeurico
1
1
New contributor
eurico is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
eurico is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
eurico is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f400009%2fhow-to-get-tmux-to-only-show-windows-when-using-choose-tree%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
choose-tree is not the command you want. choose-window is your choice.
– Tagwint
Oct 23 '17 at 21:02
1
Incorrect. First; choose-window isn't mentioned in the manual page, second; it seems to be an internal alias for choose-tree because it behaves exactly the same.
– ShelLuser
Oct 23 '17 at 21:23
could you specify your tmux version?
– Tagwint
Oct 23 '17 at 22:02
Already did (somewhat): latest version, aka 2.6.
– ShelLuser
Oct 23 '17 at 22:36
That must be the difference. Mine is tmux 2.5, the latest for my distributive. It has select-window in man pages, bound to pfx+w, unlike select-tree bound to pfx-s. The latter behaves like you described, but the first like you want it to.
– Tagwint
Oct 23 '17 at 22:44