mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Merge branch 'master' of https://github.com/LazyStability/kitty
This commit is contained in:
@@ -55,6 +55,8 @@ easily swap between them, kitty has you covered. You can use the
|
|||||||
map f7>h goto_session ~/path/to/hot/hot.kitty-session
|
map f7>h goto_session ~/path/to/hot/hot.kitty-session
|
||||||
# Browse and select from the list of known projects defined via goto_session commands
|
# Browse and select from the list of known projects defined via goto_session commands
|
||||||
map f7>/ goto_session
|
map f7>/ goto_session
|
||||||
|
# Browse and select from the list of active projects defined via goto_session commands
|
||||||
|
map f7>/ goto_session --active-only [=no]
|
||||||
# Same as above, but the sessions are listed alphabetically instead of by most recent
|
# Same as above, but the sessions are listed alphabetically instead of by most recent
|
||||||
map f7>/ goto_session --sort-by=alphabetical
|
map f7>/ goto_session --sort-by=alphabetical
|
||||||
# Browse session files inside a directory and pick one
|
# Browse session files inside a directory and pick one
|
||||||
|
|||||||
@@ -538,6 +538,9 @@ def choose_session_from_map(
|
|||||||
|
|
||||||
def choose_session(boss: BossType, opts: GotoSessionOptions) -> None:
|
def choose_session(boss: BossType, opts: GotoSessionOptions) -> None:
|
||||||
all_known_sessions = get_all_known_sessions()
|
all_known_sessions = get_all_known_sessions()
|
||||||
|
if opts.active_only:
|
||||||
|
all_active_sessions = boss.all_loaded_session_names
|
||||||
|
all_known_sessions = {name: all_known_sessions[name] for name in all_active_sessions if name in all_known_sessions}
|
||||||
choose_session_from_map(boss, opts, all_known_sessions, _('Select a session to activate'))
|
choose_session_from_map(boss, opts, all_known_sessions, _('Select a session to activate'))
|
||||||
|
|
||||||
|
|
||||||
@@ -575,6 +578,11 @@ def goto_session_options() -> str:
|
|||||||
choices=recent,alphabetical
|
choices=recent,alphabetical
|
||||||
default=recent
|
default=recent
|
||||||
When interactively choosing sessions from a list, how to sort the list.
|
When interactively choosing sessions from a list, how to sort the list.
|
||||||
|
|
||||||
|
|
||||||
|
--active-only
|
||||||
|
type=bool-set
|
||||||
|
Only consider active sessions.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user