next and previous tag

This commit is contained in:
Łukasz Pankowski 2023-02-16 10:04:52 +01:00
parent be8e3dfda2
commit f8ca94f93c

View File

@ -80,6 +80,13 @@ fn raw_key_bindings() -> HashMap<String, Box<dyn KeyEventHandler<RustConn>>> {
"C-M-t" => focus_or_spawn("thunderbird", "thunderbird"), "C-M-t" => focus_or_spawn("thunderbird", "thunderbird"),
"M-S-q" => exit(), "M-S-q" => exit(),
"M-i" => modify_with(|cs| cs.current_tag().parse::<i32>().map_or((), |i| cs.focus_tag((i - 1).to_string()))),
"M-o" => modify_with(|cs| cs.current_tag().parse::<i32>().map_or((), |i| cs.focus_tag((i + 1).to_string()))),
"M-S-i" => modify_with(|cs| cs.current_tag().parse::<i32>().map_or((), |i| cs.move_focused_to_tag((i - 1).to_string()))),
"M-S-o" => modify_with(|cs| cs.current_tag().parse::<i32>().map_or((), |i| cs.move_focused_to_tag((i + 1).to_string()))),
"M-C-i" => modify_with(|cs| cs.current_tag().parse::<i32>().map_or((), |i| cs.pull_tag_to_screen((i - 1).to_string()))),
"M-C-o" => modify_with(|cs| cs.current_tag().parse::<i32>().map_or((), |i| cs.pull_tag_to_screen((i + 1).to_string()))),
// Switch theme // Switch theme
"M-S-F6" => key_handler(move |_, _| { "M-S-F6" => key_handler(move |_, _| {
theme = if theme == "dark" { "light" } else { "dark" }; theme = if theme == "dark" { "light" } else { "dark" };