From d6946d40bd8f92c937e4cfe89dc41fea1a05c8ff Mon Sep 17 00:00:00 2001 From: Mohammad AlSaleh Date: Sun, 21 Jan 2024 20:46:56 +0300 Subject: [PATCH 01/23] Fix tab skip rendering Replace '\t' with a space in text buffers, as tab skip/stop is handled by `alacritty_terminal`. Also, sending a tab to the shaper causes issues, as fonts either have no tab codepoint, or worse, some do, with the glyph produced being anyone's guess. Some may render a tab to some random character like '0'. Fixes #73. Signed-off-by: Mohammad AlSaleh --- src/terminal.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/terminal.rs b/src/terminal.rs index 5785767..63a9e8c 100644 --- a/src/terminal.rs +++ b/src/terminal.rs @@ -633,7 +633,8 @@ impl Terminal { buffer.set_redraw(true); } - if buffer.lines[line_i].set_text(text.clone(), attrs_list.clone()) { + // Tab skip/stop is handled by alacritty_terminal + if buffer.lines[line_i].set_text(text.replace('\t', " "), attrs_list.clone()) { buffer.set_redraw(true); } line_i += 1; From c749a02df85f6bb1c734ba946d6da290015aa21e Mon Sep 17 00:00:00 2001 From: Mattias Eriksson Date: Mon, 22 Jan 2024 16:35:23 +0100 Subject: [PATCH 02/23] Add Focus Follows Mouse --- Cargo.toml | 4 ++-- i18n/en/cosmic_term.ftl | 1 + src/config.rs | 2 ++ src/main.rs | 23 ++++++++++++++++++++++- src/terminal_box.rs | 22 ++++++++++++++++++++++ 5 files changed, 49 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3675f0b..e764e50 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,10 +24,10 @@ palette = "0.7" git = "https://github.com/pop-os/cosmic-text.git" [dependencies.libcosmic] -git = "https://github.com/pop-os/libcosmic.git" +#git = "https://github.com/pop-os/libcosmic.git" default-features = false features = ["tokio", "winit"] -#path = "../libcosmic" +path = "../libcosmic" [features] default = ["wgpu"] diff --git a/i18n/en/cosmic_term.ftl b/i18n/en/cosmic_term.ftl index de8681a..76badf6 100644 --- a/i18n/en/cosmic_term.ftl +++ b/i18n/en/cosmic_term.ftl @@ -2,6 +2,7 @@ ## Settings settings = Settings +focus-follow-mouse = Focus Follow Mouse ### Appearance appearance = Appearance diff --git a/src/config.rs b/src/config.rs index ed855b5..d2c4680 100644 --- a/src/config.rs +++ b/src/config.rs @@ -43,6 +43,7 @@ pub struct Config { pub use_bright_bold: bool, pub syntax_theme_dark: String, pub syntax_theme_light: String, + pub focus_follow_mouse: bool, } impl Default for Config { @@ -60,6 +61,7 @@ impl Default for Config { use_bright_bold: false, syntax_theme_dark: "COSMIC Dark".to_string(), syntax_theme_light: "COSMIC Light".to_string(), + focus_follow_mouse: false, } } } diff --git a/src/main.rs b/src/main.rs index 498b2c6..f892ff5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -260,6 +260,7 @@ pub enum Message { PaneDragged(pane_grid::DragEvent), PaneResized(pane_grid::ResizeEvent), Modifiers(Modifiers), + MouseEnter(pane_grid::Pane), Paste(Option), PasteValue(Option, String), SelectAll(Option), @@ -284,6 +285,7 @@ pub enum Message { ZoomIn, ZoomOut, ZoomReset, + FocusFollowMouse(bool), } #[derive(Clone, Copy, Debug, Eq, PartialEq)] @@ -637,6 +639,10 @@ impl App { .add( widget::settings::item::builder(fl!("show-headerbar")) .toggler(self.config.show_headerbar, Message::ShowHeaderBar), + ) + .add( + widget::settings::item::builder(fl!("focus-follow-mouse")) + .toggler(self.config.focus_follow_mouse, Message::FocusFollowMouse), ); widget::settings::view_column(vec![settings_view.into()]).into() @@ -1047,6 +1053,10 @@ impl Application for App { Message::Modifiers(modifiers) => { self.modifiers = modifiers; } + Message::MouseEnter(pane) => { + self.pane_model.focus = pane; + return self.update_focus(); + } Message::PaneClicked(pane) => { self.pane_model.focus = pane; return self.update_title(Some(pane)); @@ -1125,6 +1135,12 @@ impl Application for App { return self.save_config(); } } + Message::FocusFollowMouse(focus_follow_mouse) => { + if focus_follow_mouse != self.config.focus_follow_mouse { + self.config.focus_follow_mouse = focus_follow_mouse; + return self.save_config(); + } + } Message::SystemThemeModeChange(_theme_mode) => { return self.update_config(); } @@ -1403,10 +1419,15 @@ impl Application for App { .unwrap_or_else(widget::Id::unique); match tab_model.data::>(entity) { Some(terminal) => { - let terminal_box = terminal_box(terminal).id(terminal_id).on_context_menu( + let mut terminal_box = terminal_box(terminal).id(terminal_id).on_context_menu( move |position_opt| Message::TabContextMenu(entity, position_opt), ); + if self.config.focus_follow_mouse { + terminal_box = + terminal_box.on_mouse_enter(move || Message::MouseEnter(pane)); + } + let context_menu = { let terminal = terminal.lock().unwrap(); terminal.context_menu diff --git a/src/terminal_box.rs b/src/terminal_box.rs index 6d06515..9cb80e2 100644 --- a/src/terminal_box.rs +++ b/src/terminal_box.rs @@ -47,6 +47,8 @@ pub struct TerminalBox<'a, Message> { click_timing: Duration, context_menu: Option, on_context_menu: Option) -> Message + 'a>>, + on_mouse_enter: Option Message + 'a>>, + mouse_inside_boundary: Option, } impl<'a, Message> TerminalBox<'a, Message> @@ -61,6 +63,8 @@ where click_timing: Duration::from_millis(500), context_menu: None, on_context_menu: None, + on_mouse_enter: None, + mouse_inside_boundary: None, } } @@ -91,6 +95,11 @@ where self.on_context_menu = Some(Box::new(on_context_menu)); self } + + pub fn on_mouse_enter(mut self, on_mouse_enter: impl Fn() -> Message + 'a) -> Self { + self.on_mouse_enter = Some(Box::new(on_mouse_enter)); + self + } } pub fn terminal_box<'a, Message>(terminal: &'a Mutex) -> TerminalBox<'a, Message> @@ -998,6 +1007,19 @@ where status = Status::Captured; } Event::Mouse(MouseEvent::CursorMoved { .. }) => { + if let Some(on_mouse_enter) = &self.on_mouse_enter { + let mouse_is_inside = cursor_position.position_in(layout.bounds()).is_some(); + if let Some(known_is_inside) = self.mouse_inside_boundary { + if mouse_is_inside != known_is_inside { + if mouse_is_inside { + shell.publish(on_mouse_enter()); + } + self.mouse_inside_boundary = Some(mouse_is_inside); + } + } else { + self.mouse_inside_boundary = Some(mouse_is_inside); + } + } if let Some(dragging) = &state.dragging { if let Some(p) = cursor_position.position() { let x = (p.x - layout.bounds().x) - self.padding.left; From 67c5683131421544cc67412b964ef8bced292aca Mon Sep 17 00:00:00 2001 From: Mattias Eriksson Date: Mon, 22 Jan 2024 16:40:38 +0100 Subject: [PATCH 03/23] Revert accidentally committed Cargo.toml change --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e764e50..3675f0b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,10 +24,10 @@ palette = "0.7" git = "https://github.com/pop-os/cosmic-text.git" [dependencies.libcosmic] -#git = "https://github.com/pop-os/libcosmic.git" +git = "https://github.com/pop-os/libcosmic.git" default-features = false features = ["tokio", "winit"] -path = "../libcosmic" +#path = "../libcosmic" [features] default = ["wgpu"] From f378bb5fdddd464dbc45fef22b732fd716111e5b Mon Sep 17 00:00:00 2001 From: Mattias Eriksson Date: Mon, 22 Jan 2024 19:51:07 +0100 Subject: [PATCH 04/23] Add alt key control characters --- src/terminal_box.rs | 100 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 96 insertions(+), 4 deletions(-) diff --git a/src/terminal_box.rs b/src/terminal_box.rs index 9cb80e2..cc9b97e 100644 --- a/src/terminal_box.rs +++ b/src/terminal_box.rs @@ -634,6 +634,10 @@ where terminal.input_scroll(b"\x1B[1;5H".as_slice()); status = Status::Captured; } + KeyCode::Insert => { + terminal.input_scroll(b"\x1B[2;5~".as_slice()); + status = Status::Captured; + } KeyCode::Delete => { terminal.input_scroll(b"\x1B[3;5~".as_slice()); status = Status::Captured; @@ -696,10 +700,98 @@ where } _ => (), }, - (_, _, true, _) => { - // Ignore alt keys - //TODO: alt keys for control characters - } + // Handle alt keys + (_, _, true, _) => match key_code { + KeyCode::Up => { + terminal.input_scroll(b"\x1B[1;3A".as_slice()); + status = Status::Captured; + } + KeyCode::Down => { + terminal.input_scroll(b"\x1B[1;3B".as_slice()); + status = Status::Captured; + } + KeyCode::Right => { + terminal.input_scroll(b"\x1B[1;3C".as_slice()); + status = Status::Captured; + } + KeyCode::Left => { + terminal.input_scroll(b"\x1B[1;3D".as_slice()); + status = Status::Captured; + } + KeyCode::End => { + terminal.input_scroll(b"\x1B[1;3F".as_slice()); + status = Status::Captured; + } + KeyCode::Home => { + terminal.input_scroll(b"\x1B[1;3H".as_slice()); + status = Status::Captured; + } + KeyCode::Insert => { + terminal.input_scroll(b"\x1B[2;3~".as_slice()); + status = Status::Captured; + } + KeyCode::Delete => { + terminal.input_scroll(b"\x1B[3;3~".as_slice()); + status = Status::Captured; + } + KeyCode::PageUp => { + terminal.input_scroll(b"\x1B[5;3~".as_slice()); + status = Status::Captured; + } + KeyCode::PageDown => { + terminal.input_scroll(b"\x1B[6;3~".as_slice()); + status = Status::Captured; + } + KeyCode::F1 => { + terminal.input_scroll(b"\x1B[1;3P".as_slice()); + status = Status::Captured; + } + KeyCode::F2 => { + terminal.input_scroll(b"\x1B1;3Q".as_slice()); + status = Status::Captured; + } + KeyCode::F3 => { + terminal.input_scroll(b"\x1B1;3R".as_slice()); + status = Status::Captured; + } + KeyCode::F4 => { + terminal.input_scroll(b"\x1B1;3S".as_slice()); + status = Status::Captured; + } + KeyCode::F5 => { + terminal.input_scroll(b"\x1B[15;3~".as_slice()); + status = Status::Captured; + } + KeyCode::F6 => { + terminal.input_scroll(b"\x1B[17;3~".as_slice()); + status = Status::Captured; + } + KeyCode::F7 => { + terminal.input_scroll(b"\x1B[18;3~".as_slice()); + status = Status::Captured; + } + KeyCode::F8 => { + terminal.input_scroll(b"\x1B[19;3~".as_slice()); + status = Status::Captured; + } + KeyCode::F9 => { + terminal.input_scroll(b"\x1B[20;3~".as_slice()); + status = Status::Captured; + } + KeyCode::F10 => { + terminal.input_scroll(b"\x1B[21;3~".as_slice()); + status = Status::Captured; + } + KeyCode::F11 => { + terminal.input_scroll(b"\x1B[23;3~".as_slice()); + status = Status::Captured; + } + KeyCode::F12 => { + terminal.input_scroll(b"\x1B[24;3~".as_slice()); + status = Status::Captured; + } + _ => (), + }, // Handle shift keys (_, _, _, true) => match key_code { KeyCode::End => { From cb26aedfa22ea036dd67f71cc90e0718d1457d7b Mon Sep 17 00:00:00 2001 From: Mohammad AlSaleh Date: Thu, 25 Jan 2024 13:45:53 +0300 Subject: [PATCH 05/23] Disable window content container and set style on pane grid container * Presumably, the TODO about window resizing interfering with scrolling is not applicable anymore with the existence of padding from the pane grid container. So, set `core.window.content_container` to false. * Pane grid container didn't follow the selected theme. So, set style on it to fix that. Signed-off-by: Mohammad AlSaleh --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index f892ff5..eb67985 100644 --- a/src/main.rs +++ b/src/main.rs @@ -717,8 +717,7 @@ impl Application for App { /// Creates the application, and optionally emits command on initialize. fn init(mut core: Core, flags: Self::Flags) -> (Self, Command) { - //TODO: fix window resizing interfering with scrolling when not using content container - //core.window.content_container = false; + core.window.content_container = false; core.window.show_headerbar = flags.config.show_headerbar; // Update font name from config @@ -1520,6 +1519,7 @@ impl Application for App { .width(Length::Fill) .height(Length::Fill) .padding(space_xxs) + .style(style::Container::Background) .into() } From 41e95fc188cbd7862dca0f11405f7ff38cf633d2 Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Fri, 26 Jan 2024 16:31:00 +0100 Subject: [PATCH 06/23] feat: tab pagination and text overlap fix --- Cargo.lock | 388 +++++++++++++++++++++++++++++++++++++---------------- Cargo.toml | 1 - 2 files changed, 276 insertions(+), 113 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4ad8a82..39e6f0c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -97,17 +97,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "ahash" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - [[package]] name = "ahash" version = "0.8.7" @@ -452,6 +441,18 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "atk-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + [[package]] name = "atomic-waker" version = "1.1.2" @@ -616,9 +617,9 @@ checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bytemuck" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +checksum = "ed2490600f404f2b94c167e31d3ed1d5f3c225a0f3b80230053b3e0b7b962bd9" dependencies = [ "bytemuck_derive", ] @@ -646,6 +647,16 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +[[package]] +name = "cairo-sys-rs" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" +dependencies = [ + "libc", + "system-deps", +] + [[package]] name = "calloop" version = "0.10.6" @@ -696,6 +707,16 @@ dependencies = [ "libc", ] +[[package]] +name = "cfg-expr" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6100bc57b6209840798d95cb2775684849d332f7bd788db2a8c8caf7ef82a41a" +dependencies = [ + "smallvec", + "target-lexicon", +] + [[package]] name = "cfg-if" version = "1.0.0" @@ -810,6 +831,26 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "const-random" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aaf16c9c2c612020bcfd042e170f6e32de9b9d75adb5277cdbbd2e2c8c8299a" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom", + "once_cell", + "tiny-keccak", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -866,22 +907,24 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" dependencies = [ "atomicwrites", "cosmic-config-derive", - "dirs 5.0.1", + "dirs", "iced_futures", + "known-folders", "notify", "once_cell", "ron", "serde", + "xdg", ] [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" dependencies = [ "quote", "syn 1.0.109", @@ -911,7 +954,7 @@ dependencies = [ [[package]] name = "cosmic-text" version = "0.10.0" -source = "git+https://github.com/pop-os/cosmic-text.git#db1530c4ec14bcbb290f9c971d8a6197c90e189a" +source = "git+https://github.com/pop-os/cosmic-text.git#e0ae465f918cd1cffca3a8239547dcf8166d3f77" dependencies = [ "bitflags 2.4.2", "fontdb", @@ -933,7 +976,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" dependencies = [ "almost", "cosmic-config", @@ -1097,7 +1140,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.14.3", + "hashbrown", "lock_api", "once_cell", "parking_lot_core 0.9.9", @@ -1142,33 +1185,13 @@ dependencies = [ "crypto-common", ] -[[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys 0.3.7", -] - [[package]] name = "dirs" version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ - "dirs-sys 0.4.1", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", + "dirs-sys", ] [[package]] @@ -1211,9 +1234,12 @@ dependencies = [ [[package]] name = "dlv-list" -version = "0.3.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" +checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f" +dependencies = [ + "const-random", +] [[package]] name = "downcast-rs" @@ -1545,11 +1571,11 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fontconfig-parser" -version = "0.5.3" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "674e258f4b5d2dcd63888c01c68413c51f565e8af99d2f7701c7b81d79ef41c4" +checksum = "6a595cb550439a117696039dfc69830492058211b771a2a165379f2a1a53d84d" dependencies = [ - "roxmltree 0.18.1", + "roxmltree", ] [[package]] @@ -1560,7 +1586,7 @@ checksum = "98b88c54a38407f7352dd2c4238830115a6377741098ffd1f997c813d0e088a6" dependencies = [ "fontconfig-parser", "log", - "memmap2 0.9.3", + "memmap2 0.9.4", "slotmap", "tinyvec", "ttf-parser", @@ -1638,11 +1664,11 @@ dependencies = [ [[package]] name = "freedesktop-icons" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9d46a9ae065c46efb83854bb10315de6d333bb6f4526ebe320c004dab7857e" +checksum = "b5339cbd60b2ff6b95ef212ab96bc80bf1a9dff2821b9966c417cdfae2808796" dependencies = [ - "dirs 4.0.0", + "dirs", "once_cell", "rust-ini", "thiserror", @@ -1776,6 +1802,36 @@ dependencies = [ "slab", ] +[[package]] +name = "gdk-pixbuf-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gdk-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2" +dependencies = [ + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "pkg-config", + "system-deps", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -1835,6 +1891,19 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +[[package]] +name = "gio-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", + "winapi", +] + [[package]] name = "gl_generator" version = "0.14.0" @@ -1852,6 +1921,16 @@ version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5418c17512bdf42730f9032c74e1ae39afc408745ebb2acf72fbc4691c17945" +[[package]] +name = "glib-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" +dependencies = [ + "libc", + "system-deps", +] + [[package]] name = "glow" version = "0.13.1" @@ -1884,6 +1963,17 @@ dependencies = [ "wgpu", ] +[[package]] +name = "gobject-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + [[package]] name = "gpu-alloc" version = "0.6.0" @@ -1925,7 +2015,7 @@ checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" dependencies = [ "bitflags 2.4.2", "gpu-descriptor-types", - "hashbrown 0.14.3", + "hashbrown", ] [[package]] @@ -1943,6 +2033,24 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df00eed8d1f0db937f6be10e46e8072b0671accb504cf0f959c5c52c679f5b9" +[[package]] +name = "gtk-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722" +dependencies = [ + "atk-sys", + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "system-deps", +] + [[package]] name = "guillotiere" version = "0.6.2" @@ -1963,22 +2071,13 @@ dependencies = [ "crunchy", ] -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.7", -] - [[package]] name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.7", + "ahash", "allocator-api2", ] @@ -2109,7 +2208,7 @@ dependencies = [ [[package]] name = "iced" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" dependencies = [ "iced_accessibility", "iced_core", @@ -2124,7 +2223,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" dependencies = [ "accesskit", "accesskit_winit", @@ -2133,7 +2232,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" dependencies = [ "bitflags 1.3.2", "instant", @@ -2149,7 +2248,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" dependencies = [ "futures", "iced_core", @@ -2162,7 +2261,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2185,7 +2284,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2198,7 +2297,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" dependencies = [ "iced_core", "iced_futures", @@ -2208,7 +2307,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" dependencies = [ "iced_core", "once_cell", @@ -2218,7 +2317,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" dependencies = [ "bytemuck", "cosmic-text", @@ -2236,7 +2335,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2256,7 +2355,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" dependencies = [ "iced_renderer", "iced_runtime", @@ -2270,7 +2369,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" dependencies = [ "iced_graphics", "iced_runtime", @@ -2331,7 +2430,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown", ] [[package]] @@ -2472,6 +2571,15 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" +[[package]] +name = "known-folders" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4397c789f2709d23cfcb703b316e0766a8d4b17db2d47b0ab096ef6047cae1d8" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "kqueue" version = "1.0.8" @@ -2521,7 +2629,7 @@ source = "git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox_0.2. [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" dependencies = [ "apply", "ashpd", @@ -2543,6 +2651,7 @@ dependencies = [ "iced_winit", "lazy_static", "palette", + "rfd", "slotmap", "taffy", "thiserror", @@ -2648,7 +2757,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2994eeba8ed550fd9b47a0b38f0242bc3344e496483c6180b69139cc2fa5d1d7" dependencies = [ - "hashbrown 0.14.3", + "hashbrown", ] [[package]] @@ -2729,9 +2838,9 @@ dependencies = [ [[package]] name = "memmap2" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45fd3a57831bf88bc63f8cebc0cf956116276e97fef3966103e96416209f7c92" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" dependencies = [ "libc", ] @@ -3166,12 +3275,12 @@ dependencies = [ [[package]] name = "ordered-multimap" -version = "0.4.3" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" +checksum = "a4d6a8c22fc714f0c2373e6091bf6f5e9b37b1bc0b1184874b7e0a4e303d318f" dependencies = [ "dlv-list", - "hashbrown 0.12.3", + "hashbrown", ] [[package]] @@ -3241,6 +3350,18 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "pango-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + [[package]] name = "parking" version = "2.2.0" @@ -3357,18 +3478,18 @@ checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" dependencies = [ "proc-macro2", "quote", @@ -3495,9 +3616,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.76" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -3649,9 +3770,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", @@ -3661,9 +3782,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", @@ -3699,6 +3820,30 @@ dependencies = [ "usvg", ] +[[package]] +name = "rfd" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0d8ab342bcc5436e04d3a4c1e09e17d74958bfaddf8d5fad6f85607df0f994f" +dependencies = [ + "ashpd", + "block", + "dispatch", + "glib-sys", + "gobject-sys", + "gtk-sys", + "js-sys", + "log", + "objc", + "objc-foundation", + "objc_id", + "raw-window-handle", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-sys 0.48.0", +] + [[package]] name = "rgb" version = "0.8.37" @@ -3720,15 +3865,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "roxmltree" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "862340e351ce1b271a378ec53f304a5558f7db87f3769dc655a8f6ecbb68b302" -dependencies = [ - "xmlparser", -] - [[package]] name = "roxmltree" version = "0.19.0" @@ -3771,9 +3907,9 @@ dependencies = [ [[package]] name = "rust-ini" -version = "0.18.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" +checksum = "3e0698206bcb8882bf2a9ecb4c1e7785db57ff052297085a6efd4fe42302068a" dependencies = [ "cfg-if", "ordered-multimap", @@ -4051,7 +4187,7 @@ dependencies = [ "cursor-icon", "libc", "log", - "memmap2 0.9.3", + "memmap2 0.9.4", "rustix 0.38.28", "thiserror", "wayland-backend", @@ -4110,7 +4246,7 @@ dependencies = [ "foreign-types 0.5.0", "js-sys", "log", - "memmap2 0.9.3", + "memmap2 0.9.4", "objc", "raw-window-handle", "redox_syscall 0.4.1", @@ -4228,6 +4364,19 @@ dependencies = [ "libc", ] +[[package]] +name = "system-deps" +version = "6.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2d580ff6a20c55dfb86be5f9c238f67835d0e81cbdea8bf5680e0897320331" +dependencies = [ + "cfg-expr", + "heck", + "pkg-config", + "toml 0.8.8", + "version-compare", +] + [[package]] name = "taffy" version = "0.3.11" @@ -4239,6 +4388,12 @@ dependencies = [ "slotmap", ] +[[package]] +name = "target-lexicon" +version = "0.12.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" + [[package]] name = "tempfile" version = "3.9.0" @@ -4292,6 +4447,15 @@ dependencies = [ "weezl", ] +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + [[package]] name = "tiny-skia" version = "0.8.4" @@ -4646,7 +4810,7 @@ dependencies = [ "imagesize", "kurbo", "log", - "roxmltree 0.19.0", + "roxmltree", "simplecss", "siphasher", "svgtypes", @@ -4693,6 +4857,12 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +[[package]] +name = "version-compare" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579a42fc0b8e0c63b76519a339be31bed574929511fa53c1a3acae26eb258f29" + [[package]] name = "version_check" version = "0.9.4" @@ -5007,9 +5177,9 @@ dependencies = [ [[package]] name = "weezl" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" +checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] name = "wgpu" @@ -5554,12 +5724,6 @@ version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" -[[package]] -name = "xmlparser" -version = "0.13.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" - [[package]] name = "xmlwriter" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 3675f0b..5964f20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,6 @@ git = "https://github.com/pop-os/cosmic-text.git" git = "https://github.com/pop-os/libcosmic.git" default-features = false features = ["tokio", "winit"] -#path = "../libcosmic" [features] default = ["wgpu"] From 39ac4ae05c404ec4634fe0cd000521ee8beacaa8 Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Fri, 26 Jan 2024 23:44:02 +0100 Subject: [PATCH 07/23] fix: hoverable paginated tab buttons, and alignment fix --- Cargo.lock | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 39e6f0c..7cb21b6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -907,7 +907,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" +source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -924,7 +924,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" +source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" dependencies = [ "quote", "syn 1.0.109", @@ -976,7 +976,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" +source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" dependencies = [ "almost", "cosmic-config", @@ -2208,7 +2208,7 @@ dependencies = [ [[package]] name = "iced" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" +source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" dependencies = [ "iced_accessibility", "iced_core", @@ -2223,7 +2223,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" +source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" dependencies = [ "accesskit", "accesskit_winit", @@ -2232,7 +2232,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" +source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" dependencies = [ "bitflags 1.3.2", "instant", @@ -2248,7 +2248,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" +source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" dependencies = [ "futures", "iced_core", @@ -2261,7 +2261,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" +source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2284,7 +2284,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" +source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2297,7 +2297,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" +source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" dependencies = [ "iced_core", "iced_futures", @@ -2307,7 +2307,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" +source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" dependencies = [ "iced_core", "once_cell", @@ -2317,7 +2317,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" +source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" dependencies = [ "bytemuck", "cosmic-text", @@ -2335,7 +2335,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" +source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2355,7 +2355,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" +source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" dependencies = [ "iced_renderer", "iced_runtime", @@ -2369,7 +2369,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" +source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" dependencies = [ "iced_graphics", "iced_runtime", @@ -2629,7 +2629,7 @@ source = "git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox_0.2. [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#d5b2a2e87cacf83843fc676cabeae7f84a8a8774" +source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" dependencies = [ "apply", "ashpd", @@ -4033,18 +4033,18 @@ checksum = "58bf37232d3bb9a2c4e641ca2a11d83b5062066f88df7fed36c28772046d65ba" [[package]] name = "serde" -version = "1.0.195" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.195" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", @@ -5629,9 +5629,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.5.34" +version = "0.5.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" +checksum = "1931d78a9c73861da0134f453bb1f790ce49b2e30eba8410b4b79bac72b46a2d" dependencies = [ "memchr", ] From 7b5c128f55a98f49b75bab5ed2648aae2179aacd Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Sat, 27 Jan 2024 02:43:11 +0100 Subject: [PATCH 08/23] fix: next tab button misalignment in split panes --- Cargo.lock | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7cb21b6..ffc7668 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -907,7 +907,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -924,7 +924,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "quote", "syn 1.0.109", @@ -976,7 +976,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "almost", "cosmic-config", @@ -2208,7 +2208,7 @@ dependencies = [ [[package]] name = "iced" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "iced_accessibility", "iced_core", @@ -2223,7 +2223,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "accesskit", "accesskit_winit", @@ -2232,7 +2232,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "bitflags 1.3.2", "instant", @@ -2248,7 +2248,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "futures", "iced_core", @@ -2261,7 +2261,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2284,7 +2284,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2297,7 +2297,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "iced_core", "iced_futures", @@ -2307,7 +2307,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "iced_core", "once_cell", @@ -2317,7 +2317,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "bytemuck", "cosmic-text", @@ -2335,7 +2335,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2355,7 +2355,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "iced_renderer", "iced_runtime", @@ -2369,7 +2369,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "iced_graphics", "iced_runtime", @@ -2629,7 +2629,7 @@ source = "git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox_0.2. [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#135770a16d928e42601420bddfd9056e9300eb26" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "apply", "ashpd", From ff1ba5b12ed53211d1e67b5c5f960e1ada0a5abe Mon Sep 17 00:00:00 2001 From: Mattias Eriksson Date: Sun, 28 Jan 2024 19:01:26 +0100 Subject: [PATCH 09/23] Add Alt Backspace --- src/terminal_box.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/terminal_box.rs b/src/terminal_box.rs index cc9b97e..5a038f0 100644 --- a/src/terminal_box.rs +++ b/src/terminal_box.rs @@ -790,6 +790,10 @@ where terminal.input_scroll(b"\x1B[24;3~".as_slice()); status = Status::Captured; } + KeyCode::Backspace => { + terminal.input_scroll(b"\x1B\x7F".as_slice()); + status = Status::Captured; + } _ => (), }, // Handle shift keys From a249d7d0e1d9d21bbc6d025914124ff830fb4381 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 29 Jan 2024 09:47:06 -0700 Subject: [PATCH 10/23] Set MSRV to 1.71 --- Cargo.lock | 110 ++++++++++++++++++++++++------------------------ Cargo.toml | 1 + src/terminal.rs | 4 +- 3 files changed, 59 insertions(+), 56 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ffc7668..d61d03f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -341,9 +341,9 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb41eb19024a91746eba0773aa5e16036045bbf45733766661099e182ea6a744" +checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65" dependencies = [ "async-lock 3.3.0", "cfg-if", @@ -412,7 +412,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" dependencies = [ - "async-io 2.3.0", + "async-io 2.3.1", "async-lock 2.8.0", "atomic-waker", "cfg-if", @@ -694,7 +694,7 @@ dependencies = [ "calloop 0.12.4", "rustix 0.38.28", "wayland-backend", - "wayland-client 0.31.1", + "wayland-client 0.31.2", ] [[package]] @@ -907,7 +907,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" +source = "git+https://github.com/pop-os/libcosmic.git#1291a48d4d62f1da5ca178292a3ce0082204d8d4" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -924,7 +924,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" +source = "git+https://github.com/pop-os/libcosmic.git#1291a48d4d62f1da5ca178292a3ce0082204d8d4" dependencies = [ "quote", "syn 1.0.109", @@ -976,7 +976,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" +source = "git+https://github.com/pop-os/libcosmic.git#1291a48d4d62f1da5ca178292a3ce0082204d8d4" dependencies = [ "almost", "cosmic-config", @@ -2208,7 +2208,7 @@ dependencies = [ [[package]] name = "iced" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" +source = "git+https://github.com/pop-os/libcosmic.git#1291a48d4d62f1da5ca178292a3ce0082204d8d4" dependencies = [ "iced_accessibility", "iced_core", @@ -2223,7 +2223,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" +source = "git+https://github.com/pop-os/libcosmic.git#1291a48d4d62f1da5ca178292a3ce0082204d8d4" dependencies = [ "accesskit", "accesskit_winit", @@ -2232,7 +2232,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" +source = "git+https://github.com/pop-os/libcosmic.git#1291a48d4d62f1da5ca178292a3ce0082204d8d4" dependencies = [ "bitflags 1.3.2", "instant", @@ -2248,7 +2248,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" +source = "git+https://github.com/pop-os/libcosmic.git#1291a48d4d62f1da5ca178292a3ce0082204d8d4" dependencies = [ "futures", "iced_core", @@ -2261,7 +2261,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" +source = "git+https://github.com/pop-os/libcosmic.git#1291a48d4d62f1da5ca178292a3ce0082204d8d4" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2284,7 +2284,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" +source = "git+https://github.com/pop-os/libcosmic.git#1291a48d4d62f1da5ca178292a3ce0082204d8d4" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2297,7 +2297,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" +source = "git+https://github.com/pop-os/libcosmic.git#1291a48d4d62f1da5ca178292a3ce0082204d8d4" dependencies = [ "iced_core", "iced_futures", @@ -2307,7 +2307,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" +source = "git+https://github.com/pop-os/libcosmic.git#1291a48d4d62f1da5ca178292a3ce0082204d8d4" dependencies = [ "iced_core", "once_cell", @@ -2317,7 +2317,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" +source = "git+https://github.com/pop-os/libcosmic.git#1291a48d4d62f1da5ca178292a3ce0082204d8d4" dependencies = [ "bytemuck", "cosmic-text", @@ -2335,7 +2335,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" +source = "git+https://github.com/pop-os/libcosmic.git#1291a48d4d62f1da5ca178292a3ce0082204d8d4" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2355,7 +2355,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" +source = "git+https://github.com/pop-os/libcosmic.git#1291a48d4d62f1da5ca178292a3ce0082204d8d4" dependencies = [ "iced_renderer", "iced_runtime", @@ -2369,7 +2369,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" +source = "git+https://github.com/pop-os/libcosmic.git#1291a48d4d62f1da5ca178292a3ce0082204d8d4" dependencies = [ "iced_graphics", "iced_runtime", @@ -2425,9 +2425,9 @@ checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "433de089bd45971eecf4668ee0ee8f4cec17db4f8bd8f7bc3197a6ce37aa7d9b" dependencies = [ "equivalent", "hashbrown", @@ -2629,7 +2629,7 @@ source = "git+https://gitlab.redox-os.org/redox-os/liblibc.git?branch=redox_0.2. [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" +source = "git+https://github.com/pop-os/libcosmic.git#1291a48d4d62f1da5ca178292a3ce0082204d8d4" dependencies = [ "apply", "ashpd", @@ -2753,9 +2753,9 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lru" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2994eeba8ed550fd9b47a0b38f0242bc3344e496483c6180b69139cc2fa5d1d7" +checksum = "db2c024b41519440580066ba82aab04092b333e09066a5eb86c7c4890df31f22" dependencies = [ "hashbrown", ] @@ -3328,9 +3328,9 @@ dependencies = [ [[package]] name = "palette" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2e2f34147767aa758aa649415b50a69eeb46a67f9dc7db8011eeb3d84b351dc" +checksum = "3d38e6e5ca1612e2081cc31188f08c3cba630ce4ba44709a153f1a0f38d678f2" dependencies = [ "approx", "fast-srgb8", @@ -3341,9 +3341,9 @@ dependencies = [ [[package]] name = "palette_derive" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7db010ec5ff3d4385e4f133916faacd9dad0f6a09394c92d825b3aed310fa0a" +checksum = "e05d1c929301fee6830dafa764341118829b2535c216b0571e3821ecac5c885b" dependencies = [ "proc-macro2", "quote", @@ -3640,9 +3640,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" +checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" dependencies = [ "memchr", ] @@ -4191,12 +4191,12 @@ dependencies = [ "rustix 0.38.28", "thiserror", "wayland-backend", - "wayland-client 0.31.1", + "wayland-client 0.31.2", "wayland-csd-frame", - "wayland-cursor 0.31.0", - "wayland-protocols 0.31.0", + "wayland-cursor 0.31.1", + "wayland-protocols 0.31.2", "wayland-protocols-wlr", - "wayland-scanner 0.31.0", + "wayland-scanner 0.31.1", "xkeysym", ] @@ -4254,7 +4254,7 @@ dependencies = [ "tiny-xlib", "wasm-bindgen", "wayland-backend", - "wayland-client 0.31.1", + "wayland-client 0.31.2", "wayland-sys 0.31.1", "web-sys", "windows-sys 0.48.0", @@ -4998,13 +4998,13 @@ dependencies = [ [[package]] name = "wayland-backend" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19152ddd73f45f024ed4534d9ca2594e0ef252c1847695255dae47f34df9fbe4" +checksum = "9d50fa61ce90d76474c87f5fc002828d81b32677340112b4ef08079a9d459a40" dependencies = [ "cc", "downcast-rs", - "nix 0.26.4", + "rustix 0.38.28", "scoped-tls", "smallvec", "wayland-sys 0.31.1", @@ -5028,14 +5028,14 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.1" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca7d52347346f5473bf2f56705f360e8440873052e575e55890c4fa57843ed3" +checksum = "82fb96ee935c2cea6668ccb470fb7771f6215d1691746c2d896b447a00ad3f1f" dependencies = [ "bitflags 2.4.2", - "nix 0.26.4", + "rustix 0.38.28", "wayland-backend", - "wayland-scanner 0.31.0", + "wayland-scanner 0.31.1", ] [[package]] @@ -5074,12 +5074,12 @@ dependencies = [ [[package]] name = "wayland-cursor" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44aa20ae986659d6c77d64d808a046996a932aa763913864dc40c359ef7ad5b" +checksum = "71ce5fa868dd13d11a0d04c5e2e65726d0897be8de247c0c5a65886e283231ba" dependencies = [ - "nix 0.26.4", - "wayland-client 0.31.1", + "rustix 0.38.28", + "wayland-client 0.31.2", "xcursor", ] @@ -5097,14 +5097,14 @@ dependencies = [ [[package]] name = "wayland-protocols" -version = "0.31.0" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e253d7107ba913923dc253967f35e8561a3c65f914543e46843c88ddd729e21c" +checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4" dependencies = [ "bitflags 2.4.2", "wayland-backend", - "wayland-client 0.31.1", - "wayland-scanner 0.31.0", + "wayland-client 0.31.2", + "wayland-scanner 0.31.1", ] [[package]] @@ -5115,9 +5115,9 @@ checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" dependencies = [ "bitflags 2.4.2", "wayland-backend", - "wayland-client 0.31.1", - "wayland-protocols 0.31.0", - "wayland-scanner 0.31.0", + "wayland-client 0.31.2", + "wayland-protocols 0.31.2", + "wayland-scanner 0.31.1", ] [[package]] @@ -5133,9 +5133,9 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb8e28403665c9f9513202b7e1ed71ec56fde5c107816843fb14057910b2c09c" +checksum = "63b3a62929287001986fb58c789dce9b67604a397c15c611ad9f747300b6c283" dependencies = [ "proc-macro2", "quick-xml", diff --git a/Cargo.toml b/Cargo.toml index 5964f20..5d8514e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ name = "cosmic-term" version = "0.1.0" edition = "2021" +rust-version = "1.71" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/terminal.rs b/src/terminal.rs index 63a9e8c..419979e 100644 --- a/src/terminal.rs +++ b/src/terminal.rs @@ -634,7 +634,9 @@ impl Terminal { } // Tab skip/stop is handled by alacritty_terminal - if buffer.lines[line_i].set_text(text.replace('\t', " "), attrs_list.clone()) { + if buffer.lines[line_i] + .set_text(text.replace('\t', " "), attrs_list.clone()) + { buffer.set_redraw(true); } line_i += 1; From 516451871fa49046a5fe8a36835e03666cf4ba68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthew=20Fallah=20=28=E3=83=9E=E3=82=B7=E3=83=A5=E3=83=BC?= =?UTF-8?q?=E3=83=BB=E3=83=95=E3=82=A1=E3=83=A9=E3=83=BC=29?= <107450287+moi-cest-matthew@users.noreply.github.com> Date: Fri, 26 Jan 2024 13:16:42 -1000 Subject: [PATCH 11/23] Added japanese translation Started japanese translation --- i18n/ja/cosmic_term.ftl | 50 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 i18n/ja/cosmic_term.ftl diff --git a/i18n/ja/cosmic_term.ftl b/i18n/ja/cosmic_term.ftl new file mode 100644 index 0000000..9ffdf3f --- /dev/null +++ b/i18n/ja/cosmic_term.ftl @@ -0,0 +1,50 @@ +# Context Pages + +## Settings +settings = 設定 + +### Appearance +appearance = 外観 +theme = テーマ +match-desktop = デスクトップに合わす +dark = 暗い +light = 明かり +syntax-dark = 暗いシンタックス +syntax-light = 明かりシンタックス +advanced-font-settings = 詳細なフォント設定 +default-font = デフォルトフォント +default-font-stretch = デフォルトのフォント幅 +default-font-weight = デフォルトのフォントの太さ +default-dim-font-weight = デフォルトの暗いフォントの太さ +default-bold-font-weight = デフォルトの太字の太さ +use-bright-bold = 太字を明るい色で表示する +default-font-size = デフォルトのフォントサイズ +default-zoom-step = + +# Find +find-placeholder = 検索... +find-previous = 前を検索 +find-next = 次を検索 + +# Menu + +## File +file = ファイル +new-tab = 新しいタブ +new-window = 新しいウィンドウ +close-tab = タブを閉じる +quit = 終了 + +## Edit +edit = 編集 +copy = コピー +paste = 貼り付け +select-all = すべて選択 +find = 検索 + +## View +view = 表示 +menu-settings = 設定... + +# Context menu +show-headerbar = ヘッダーバーを表す From 87bc923f0af9072ae65cfadc10530397c8f4e0c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthew=20Fallah=20=28=E3=83=9E=E3=82=B7=E3=83=A5=E3=83=BC?= =?UTF-8?q?=E3=83=BB=E3=83=95=E3=82=A1=E3=83=A9=E3=83=BC=29?= <107450287+moi-cest-matthew@users.noreply.github.com> Date: Fri, 26 Jan 2024 13:22:09 -1000 Subject: [PATCH 12/23] Oops forgot default zoom step --- i18n/ja/cosmic_term.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n/ja/cosmic_term.ftl b/i18n/ja/cosmic_term.ftl index 9ffdf3f..f10f2ab 100644 --- a/i18n/ja/cosmic_term.ftl +++ b/i18n/ja/cosmic_term.ftl @@ -19,7 +19,7 @@ default-dim-font-weight = デフォルトの暗いフォントの太さ default-bold-font-weight = デフォルトの太字の太さ use-bright-bold = 太字を明るい色で表示する default-font-size = デフォルトのフォントサイズ -default-zoom-step = +default-zoom-step =ズームの間隔 # Find find-placeholder = 検索... From 8d7d074933239c3855fafdde6f56a10c72c953ba Mon Sep 17 00:00:00 2001 From: Mattias Eriksson Date: Tue, 30 Jan 2024 08:59:19 +0100 Subject: [PATCH 13/23] Add support for Mouse Events --- src/main.rs | 1 + src/mouse_reporter.rs | 197 ++++++++++++++++++++++++++++ src/terminal.rs | 39 +++++- src/terminal_box.rs | 297 ++++++++++++++++++++++++------------------ 4 files changed, 404 insertions(+), 130 deletions(-) create mode 100644 src/mouse_reporter.rs diff --git a/src/main.rs b/src/main.rs index eb67985..f1a5c4f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -32,6 +32,7 @@ use tokio::sync::mpsc; use config::{AppTheme, Config, CONFIG_VERSION}; mod config; +mod mouse_reporter; use icon_cache::IconCache; mod icon_cache; diff --git a/src/mouse_reporter.rs b/src/mouse_reporter.rs new file mode 100644 index 0000000..77c2a6d --- /dev/null +++ b/src/mouse_reporter.rs @@ -0,0 +1,197 @@ +use cosmic::{ + iced::mouse::{Event as MouseEvent, ScrollDelta}, + iced::{keyboard::Modifiers, mouse::Button, Event}, +}; + +use crate::terminal::Terminal; + +const SCROLL_SPEED: u32 = 3; + +#[derive(Default)] +pub struct MouseReporter { + last_movment_x: Option, + last_movment_y: Option, + button: Option