From 204c666f9101b76a6293a8062844e8b0ffc8a756 Mon Sep 17 00:00:00 2001 From: Mattias Eriksson Date: Sat, 20 Jan 2024 14:13:04 +0100 Subject: [PATCH 01/54] Add support for Primary --- src/main.rs | 20 ++++++++++++++++++++ src/terminal_box.rs | 14 +++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index aa3b12f..bbe6a28 100644 --- a/src/main.rs +++ b/src/main.rs @@ -213,6 +213,8 @@ pub enum Message { PaneResized(pane_grid::ResizeEvent), Modifiers(Modifiers), Paste(Option), + #[cfg(target_family = "unix")] + PastePrimary(Option), PasteValue(Option, String), SelectAll(Option), UseBrightBold(bool), @@ -1038,6 +1040,13 @@ impl Application for App { None => message::none(), }); } + #[cfg(target_family = "unix")] + Message::PastePrimary(entity_opt) => { + return clipboard::read_primary(move |value_opt| match value_opt { + Some(value) => message::app(Message::PasteValue(entity_opt, value)), + None => message::none(), + }); + } Message::PasteValue(entity_opt, value) => { if let Some(tab_model) = self.pane_model.active() { let entity = entity_opt.unwrap_or_else(|| tab_model.active()); @@ -1622,6 +1631,17 @@ impl Application for App { None } } + #[cfg(target_family = "unix")] + Event::Keyboard(KeyEvent::KeyPressed { + key_code: KeyCode::Insert, + modifiers, + }) => { + if modifiers == Modifiers::SHIFT { + Some(Message::PastePrimary(None)) + } else { + None + } + } Event::Keyboard(KeyEvent::KeyPressed { key_code: KeyCode::Equals, modifiers, diff --git a/src/terminal_box.rs b/src/terminal_box.rs index 6d06515..af383af 100644 --- a/src/terminal_box.rs +++ b/src/terminal_box.rs @@ -575,7 +575,7 @@ where layout: Layout<'_>, cursor_position: mouse::Cursor, _renderer: &Renderer, - _clipboard: &mut dyn Clipboard, + clipboard: &mut dyn Clipboard, shell: &mut Shell<'_, Message>, _viewport: &Rectangle, ) -> Status { @@ -977,6 +977,11 @@ where } } } + } else if let Button::Middle = button { + #[cfg(target_family = "unix")] + if let Some(value) = clipboard.read_primary() { + terminal.input_scroll(value.as_bytes().to_vec()); + } } // Update context menu state @@ -994,6 +999,13 @@ where } } Event::Mouse(MouseEvent::ButtonReleased(Button::Left)) => { + #[cfg(target_family = "unix")] + if let Some(Dragging::Buffer) = state.dragging { + let term = terminal.term.lock(); + if let Some(text) = term.selection_to_string() { + clipboard.write_primary(text); + } + } state.dragging = None; status = Status::Captured; } From e6fff76abd5c579ae4ed509ac0db063ee0ad240d Mon Sep 17 00:00:00 2001 From: Mattias Eriksson Date: Sat, 20 Jan 2024 14:27:16 +0100 Subject: [PATCH 02/54] Add missing target_family = "unix" gates --- src/key_bind.rs | 1 + src/main.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/key_bind.rs b/src/key_bind.rs index bf54cad..03b9b1f 100644 --- a/src/key_bind.rs +++ b/src/key_bind.rs @@ -61,6 +61,7 @@ pub fn key_binds() -> HashMap { bind!([Ctrl, Shift], Q, WindowClose); bind!([Ctrl, Shift], T, TabNew); bind!([Ctrl, Shift], V, Paste); + #[cfg(target_family = "unix")] bind!([Shift], Insert, PastePrimary); bind!([Ctrl, Shift], W, TabClose); diff --git a/src/main.rs b/src/main.rs index b1f6faa..55a1aa5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -174,6 +174,7 @@ pub enum Action { PaneSplitVertical, PaneToggleMaximized, Paste, + #[cfg(target_family = "unix")] PastePrimary, SelectAll, Settings, @@ -211,6 +212,7 @@ impl Action { Action::PaneSplitVertical => Message::PaneSplit(pane_grid::Axis::Vertical), Action::PaneToggleMaximized => Message::PaneToggleMaximized, Action::Paste => Message::Paste(entity_opt), + #[cfg(target_family = "unix")] Action::PastePrimary => Message::PastePrimary(entity_opt), Action::SelectAll => Message::SelectAll(entity_opt), Action::Settings => Message::ToggleContextPage(ContextPage::Settings), From 449803310ba565ada07a5f223e14d1ddd762293d Mon Sep 17 00:00:00 2001 From: Mattias Eriksson Date: Sun, 21 Jan 2024 16:56:23 +0100 Subject: [PATCH 03/54] Use terminal.paste() for middle click paste also --- src/terminal_box.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/terminal_box.rs b/src/terminal_box.rs index af383af..b1afe61 100644 --- a/src/terminal_box.rs +++ b/src/terminal_box.rs @@ -980,7 +980,7 @@ where } else if let Button::Middle = button { #[cfg(target_family = "unix")] if let Some(value) = clipboard.read_primary() { - terminal.input_scroll(value.as_bytes().to_vec()); + terminal.paste(value); } } From 45dd5aa46eac3dee6986c2226265ce33ca396ece Mon Sep 17 00:00:00 2001 From: Mattias Eriksson Date: Sun, 21 Jan 2024 21:13:13 +0100 Subject: [PATCH 04/54] Move most of the logic to main --- src/main.rs | 46 ++++++++++++++++++++++++++++++++++++++++++++- src/terminal_box.rs | 23 +++++++++++------------ 2 files changed, 56 insertions(+), 13 deletions(-) diff --git a/src/main.rs b/src/main.rs index 55a1aa5..43d1734 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,6 +13,7 @@ use cosmic::{ clipboard, event, futures::SinkExt, keyboard::{Event as KeyEvent, KeyCode, Modifiers}, + mouse::{Button as MouseButton, Event as MouseEvent}, subscription::{self, Subscription}, window, Alignment, Event, Length, Padding, Point, }, @@ -165,6 +166,8 @@ pub struct Flags { #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enum Action { Copy, + #[cfg(target_family = "unix")] + CopyPrimary, Find, PaneFocusDown, PaneFocusLeft, @@ -203,6 +206,8 @@ impl Action { pub fn message(self, entity_opt: Option) -> Message { match self { Action::Copy => Message::Copy(entity_opt), + #[cfg(target_family = "unix")] + Action::CopyPrimary => Message::CopyPrimary(entity_opt), Action::Find => Message::Find(true), Action::PaneFocusDown => Message::PaneFocusAdjacent(pane_grid::Direction::Down), Action::PaneFocusLeft => Message::PaneFocusAdjacent(pane_grid::Direction::Left), @@ -245,6 +250,7 @@ pub enum Message { AppTheme(AppTheme), Config(Config), Copy(Option), + CopyPrimary(Option), DefaultFont(usize), DefaultFontSize(usize), DefaultFontStretch(usize), @@ -257,6 +263,8 @@ pub enum Message { FindNext, FindPrevious, FindSearchValueChanged(String), + #[cfg(target_family = "unix")] + MiddleClick(pane_grid::Pane, Option), PaneClicked(pane_grid::Pane), PaneSplit(pane_grid::Axis), PaneToggleMaximized, @@ -916,6 +924,20 @@ impl Application for App { log::warn!("Failed to get focused pane"); } } + Message::CopyPrimary(entity_opt) => { + if let Some(tab_model) = self.pane_model.active() { + let entity = entity_opt.unwrap_or_else(|| tab_model.active()); + if let Some(terminal) = tab_model.data::>(entity) { + let terminal = terminal.lock().unwrap(); + let term = terminal.term.lock(); + if let Some(text) = term.selection_to_string() { + return clipboard::write_primary(text); + } + } + } else { + log::warn!("Failed to get focused pane"); + } + } Message::DefaultFont(index) => { match self.font_names.get(index) { Some(font_name) => { @@ -1050,6 +1072,17 @@ impl Application for App { Message::FindSearchValueChanged(value) => { self.find_search_value = value; } + #[cfg(target_family = "unix")] + Message::MiddleClick(pane, entity_opt) => { + self.pane_model.focus = pane; + return Command::batch([ + self.update_focus(), + clipboard::read_primary(move |value_opt| match value_opt { + Some(value) => message::app(Message::PasteValue(entity_opt, value)), + None => message::none(), + }), + ]); + } Message::Modifiers(modifiers) => { self.modifiers = modifiers; } @@ -1409,6 +1442,7 @@ impl Application for App { } let entity = tab_model.active(); + let entity_middle_click = tab_model.active(); let terminal_id = self .terminal_ids .get(&pane) @@ -1416,10 +1450,17 @@ 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), ); + #[cfg(target_family = "unix")] + { + terminal_box = terminal_box.on_middle_click(move || { + Message::MiddleClick(pane, Some(entity_middle_click)) + }); + } + let context_menu = { let terminal = terminal.lock().unwrap(); terminal.context_menu @@ -1529,6 +1570,9 @@ impl Application for App { Event::Keyboard(KeyEvent::ModifiersChanged(modifiers)) => { Some(Message::Modifiers(modifiers)) } + Event::Mouse(MouseEvent::ButtonReleased(MouseButton::Left)) => { + Some(Message::CopyPrimary(None)) + } _ => None, }), subscription::channel( diff --git a/src/terminal_box.rs b/src/terminal_box.rs index b1afe61..b5ce7fb 100644 --- a/src/terminal_box.rs +++ b/src/terminal_box.rs @@ -47,6 +47,7 @@ pub struct TerminalBox<'a, Message> { click_timing: Duration, context_menu: Option, on_context_menu: Option) -> Message + 'a>>, + on_middle_click: Option Message + 'a>>, } impl<'a, Message> TerminalBox<'a, Message> @@ -61,6 +62,7 @@ where click_timing: Duration::from_millis(500), context_menu: None, on_context_menu: None, + on_middle_click: None, } } @@ -91,6 +93,11 @@ where self.on_context_menu = Some(Box::new(on_context_menu)); self } + + pub fn on_middle_click(mut self, on_middle_click: impl Fn() -> Message + 'a) -> Self { + self.on_middle_click = Some(Box::new(on_middle_click)); + self + } } pub fn terminal_box<'a, Message>(terminal: &'a Mutex) -> TerminalBox<'a, Message> @@ -575,7 +582,7 @@ where layout: Layout<'_>, cursor_position: mouse::Cursor, _renderer: &Renderer, - clipboard: &mut dyn Clipboard, + _clipboard: &mut dyn Clipboard, shell: &mut Shell<'_, Message>, _viewport: &Rectangle, ) -> Status { @@ -977,10 +984,9 @@ where } } } - } else if let Button::Middle = button { - #[cfg(target_family = "unix")] - if let Some(value) = clipboard.read_primary() { - terminal.paste(value); + } else if button == Button::Middle { + if let Some(on_middle_click) = &self.on_middle_click { + shell.publish(on_middle_click()); } } @@ -999,13 +1005,6 @@ where } } Event::Mouse(MouseEvent::ButtonReleased(Button::Left)) => { - #[cfg(target_family = "unix")] - if let Some(Dragging::Buffer) = state.dragging { - let term = terminal.term.lock(); - if let Some(text) = term.selection_to_string() { - clipboard.write_primary(text); - } - } state.dragging = None; status = Status::Captured; } From c90b5f67e5bb65afebae1c8e67cf6e284ca97254 Mon Sep 17 00:00:00 2001 From: Mattias Eriksson Date: Mon, 22 Jan 2024 08:10:57 +0100 Subject: [PATCH 05/54] Remove conditional compilation --- src/key_bind.rs | 1 - src/main.rs | 22 ++++++---------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/key_bind.rs b/src/key_bind.rs index 03b9b1f..bf54cad 100644 --- a/src/key_bind.rs +++ b/src/key_bind.rs @@ -61,7 +61,6 @@ pub fn key_binds() -> HashMap { bind!([Ctrl, Shift], Q, WindowClose); bind!([Ctrl, Shift], T, TabNew); bind!([Ctrl, Shift], V, Paste); - #[cfg(target_family = "unix")] bind!([Shift], Insert, PastePrimary); bind!([Ctrl, Shift], W, TabClose); diff --git a/src/main.rs b/src/main.rs index 43d1734..02edb54 100644 --- a/src/main.rs +++ b/src/main.rs @@ -166,7 +166,6 @@ pub struct Flags { #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enum Action { Copy, - #[cfg(target_family = "unix")] CopyPrimary, Find, PaneFocusDown, @@ -177,7 +176,6 @@ pub enum Action { PaneSplitVertical, PaneToggleMaximized, Paste, - #[cfg(target_family = "unix")] PastePrimary, SelectAll, Settings, @@ -206,7 +204,6 @@ impl Action { pub fn message(self, entity_opt: Option) -> Message { match self { Action::Copy => Message::Copy(entity_opt), - #[cfg(target_family = "unix")] Action::CopyPrimary => Message::CopyPrimary(entity_opt), Action::Find => Message::Find(true), Action::PaneFocusDown => Message::PaneFocusAdjacent(pane_grid::Direction::Down), @@ -217,7 +214,6 @@ impl Action { Action::PaneSplitVertical => Message::PaneSplit(pane_grid::Axis::Vertical), Action::PaneToggleMaximized => Message::PaneToggleMaximized, Action::Paste => Message::Paste(entity_opt), - #[cfg(target_family = "unix")] Action::PastePrimary => Message::PastePrimary(entity_opt), Action::SelectAll => Message::SelectAll(entity_opt), Action::Settings => Message::ToggleContextPage(ContextPage::Settings), @@ -263,7 +259,6 @@ pub enum Message { FindNext, FindPrevious, FindSearchValueChanged(String), - #[cfg(target_family = "unix")] MiddleClick(pane_grid::Pane, Option), PaneClicked(pane_grid::Pane), PaneSplit(pane_grid::Axis), @@ -273,7 +268,6 @@ pub enum Message { PaneResized(pane_grid::ResizeEvent), Modifiers(Modifiers), Paste(Option), - #[cfg(target_family = "unix")] PastePrimary(Option), PasteValue(Option, String), SelectAll(Option), @@ -1072,7 +1066,6 @@ impl Application for App { Message::FindSearchValueChanged(value) => { self.find_search_value = value; } - #[cfg(target_family = "unix")] Message::MiddleClick(pane, entity_opt) => { self.pane_model.focus = pane; return Command::batch([ @@ -1134,7 +1127,6 @@ impl Application for App { None => message::none(), }); } - #[cfg(target_family = "unix")] Message::PastePrimary(entity_opt) => { return clipboard::read_primary(move |value_opt| match value_opt { Some(value) => message::app(Message::PasteValue(entity_opt, value)), @@ -1450,16 +1442,14 @@ impl Application for App { .unwrap_or_else(widget::Id::unique); match tab_model.data::>(entity) { Some(terminal) => { - let mut terminal_box = terminal_box(terminal).id(terminal_id).on_context_menu( - move |position_opt| Message::TabContextMenu(entity, position_opt), - ); - - #[cfg(target_family = "unix")] - { - terminal_box = terminal_box.on_middle_click(move || { + let terminal_box = terminal_box(terminal) + .id(terminal_id) + .on_context_menu(move |position_opt| { + Message::TabContextMenu(entity, position_opt) + }) + .on_middle_click(move || { Message::MiddleClick(pane, Some(entity_middle_click)) }); - } let context_menu = { let terminal = terminal.lock().unwrap(); From 1cec7218ea60352e14c263287a35ff04c13cda03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Karayemi=C5=9F?= <80787950+oguzkarayemis@users.noreply.github.com> Date: Sat, 16 Mar 2024 15:19:31 +0300 Subject: [PATCH 06/54] Update cosmic-term.ftl --- i18n/tr/cosmic-term.ftl | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/i18n/tr/cosmic-term.ftl b/i18n/tr/cosmic-term.ftl index 4ff0f19..61db148 100644 --- a/i18n/tr/cosmic-term.ftl +++ b/i18n/tr/cosmic-term.ftl @@ -1,5 +1,19 @@ +cosmic-terminal = COSMIC Uçbirim +new-terminal = Yeni uçbirim + # Context Pages +## About +git-description = Git commit {$hash}, {$date} + +## Color schemes +color-schemes = Renk şemaları +rename = Yeniden adlandır +export = Dışa akar +delete = Sil +import = İçe aktar +import-errors = İçe aktarma hataları + ## Profiles profiles = Profiller name = İsim @@ -8,6 +22,7 @@ tab-title = Sekme başlığı tab-title-description = Varsayılan sekme başlığını geçersiz kılar add-profile = Profil ekle new-profile = Yeni profil +make-default = Varsayılan yap ## Settings settings = Ayarlar @@ -21,6 +36,7 @@ light = Aydınlık syntax-dark = Karanlık renk şeması syntax-light = Aydınlık renk şeması default-zoom-step = Yakınlaştırma basamakları +opacity = Arkaplan saydamlığı ### Font font = Yazı tipi @@ -74,5 +90,7 @@ next-tab = Sonraki sekme previous-tab = Önceki sekme split-horizontal = Yatay böl split-vertical = Dikey böl -pane-toggle-maximize = En üste geç +pane-toggle-maximize = Tam ekrana geç +menu-color-schemes = Renk şemalaro... menu-settings = Ayarlar... +menu-about = COSMIC Uçbirim hakkında From d785a93b11551ee902034179423575c919a49ed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Karayemi=C5=9F?= <80787950+oguzkarayemis@users.noreply.github.com> Date: Sat, 16 Mar 2024 15:21:05 +0300 Subject: [PATCH 07/54] Update cosmic-term.ftl --- i18n/tr/cosmic-term.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n/tr/cosmic-term.ftl b/i18n/tr/cosmic-term.ftl index 61db148..fb498da 100644 --- a/i18n/tr/cosmic-term.ftl +++ b/i18n/tr/cosmic-term.ftl @@ -91,6 +91,6 @@ previous-tab = Önceki sekme split-horizontal = Yatay böl split-vertical = Dikey böl pane-toggle-maximize = Tam ekrana geç -menu-color-schemes = Renk şemalaro... +menu-color-schemes = Renk şemaları... menu-settings = Ayarlar... menu-about = COSMIC Uçbirim hakkında From ead520c6bd047e9fe40dfec85c9076f8971bea4e Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 18 Mar 2024 15:05:53 -0600 Subject: [PATCH 08/54] Update dependencies --- Cargo.lock | 195 +++++++++++++++++++++++++++------------------------- src/main.rs | 6 +- 2 files changed, 105 insertions(+), 96 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6b7a5fc..4abac3f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -264,9 +264,9 @@ checksum = "70033777eb8b5124a81a1889416543dddef2de240019b674c81285a2635a7e1e" [[package]] name = "anyhow" -version = "1.0.80" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "apply" @@ -390,7 +390,7 @@ dependencies = [ "async-task", "concurrent-queue", "fastrand 2.0.1", - "futures-lite 2.2.0", + "futures-lite 2.3.0", "slab", ] @@ -436,7 +436,7 @@ dependencies = [ "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.2.0", + "futures-lite 2.3.0", "parking", "polling 3.4.0", "rustix 0.38.28", @@ -484,13 +484,13 @@ dependencies = [ [[package]] name = "async-recursion" -version = "1.0.5" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" +checksum = "30c5ef0ede93efbf733c1a727f3b6b5a1060bbedd5600183e66f6e4be4af0ec5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -519,13 +519,13 @@ checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -722,7 +722,7 @@ dependencies = [ "async-task", "fastrand 2.0.1", "futures-io", - "futures-lite 2.2.0", + "futures-lite 2.3.0", "piper", "tracing", ] @@ -735,9 +735,9 @@ checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "bytemuck" -version = "1.14.3" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ef034f05691a48569bd920a96c81b9d91bbad1ab5ac7c4616c1f6ef36cb79f" +checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" dependencies = [ "bytemuck_derive", ] @@ -750,7 +750,7 @@ checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -862,9 +862,9 @@ dependencies = [ [[package]] name = "clipboard-win" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f9a0700e0127ba15d1d52dd742097f821cd9c65939303a44d970465040a297" +checksum = "d517d4b86184dbb111d3556a10f1c8a04da7428d2987bf1081602bf11c3aa9ee" dependencies = [ "error-code", ] @@ -872,8 +872,7 @@ dependencies = [ [[package]] name = "clipboard_macos" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145a7f9e9b89453bc0a5e32d166456405d389cea5b578f57f1274b1397588a95" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#c3e9e794b94a2e79419517145424dc2035a572da" dependencies = [ "objc", "objc-foundation", @@ -883,17 +882,16 @@ dependencies = [ [[package]] name = "clipboard_wayland" version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003f886bc4e2987729d10c1db3424e7f80809f3fc22dbc16c685738887cb37b8" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#c3e9e794b94a2e79419517145424dc2035a572da" dependencies = [ + "mime 0.1.0", "smithay-clipboard", ] [[package]] name = "clipboard_x11" version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4274ea815e013e0f9f04a2633423e14194e408a0576c943ce3d14ca56c50031c" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#c3e9e794b94a2e79419517145424dc2035a572da" dependencies = [ "thiserror", "x11rb", @@ -1064,7 +1062,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#ef050d5b05ea31acd2716538265fafd5b92d6cdb" +source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1081,7 +1079,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#ef050d5b05ea31acd2716538265fafd5b92d6cdb" +source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" dependencies = [ "quote", "syn 1.0.109", @@ -1090,7 +1088,7 @@ dependencies = [ [[package]] name = "cosmic-files" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-files.git#c5db063f6afc3a7f2df555ae2c70cc0237881070" +source = "git+https://github.com/pop-os/cosmic-files.git#2bc93cc3cc1906c7884dd941ab211b6bc8eca8fd" dependencies = [ "chrono", "dirs", @@ -1150,7 +1148,7 @@ dependencies = [ [[package]] name = "cosmic-text" version = "0.11.2" -source = "git+https://github.com/pop-os/cosmic-text.git#18c3d2acec5e7f64a670c6643ee3ab220bc92a89" +source = "git+https://github.com/pop-os/cosmic-text.git#b08676909f882f553ab574601b35b58276a52458" dependencies = [ "bitflags 2.4.2", "fontdb", @@ -1172,15 +1170,17 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#ef050d5b05ea31acd2716538265fafd5b92d6cdb" +source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" dependencies = [ "almost", "cosmic-config", "csscolorparser", + "dirs", "lazy_static", "palette", "ron", "serde", + "thiserror", ] [[package]] @@ -1274,7 +1274,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad291aa74992b9b7a7e88c38acbbf6ad7e107f1d90ee8775b7bc1fc3394f485c" dependencies = [ "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1314,7 +1314,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1325,7 +1325,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1376,7 +1376,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1445,7 +1445,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1535,7 +1535,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1869,7 +1869,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1994,9 +1994,9 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ "fastrand 2.0.1", "futures-core", @@ -2013,7 +2013,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2403,7 +2403,7 @@ dependencies = [ "serde", "serde_derive", "thiserror", - "toml 0.8.10", + "toml 0.8.12", "unic-langid", ] @@ -2446,7 +2446,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.52", + "syn 2.0.53", "unic-langid", ] @@ -2460,7 +2460,7 @@ dependencies = [ "i18n-config", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2489,7 +2489,7 @@ dependencies = [ [[package]] name = "iced" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#ef050d5b05ea31acd2716538265fafd5b92d6cdb" +source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" dependencies = [ "iced_accessibility", "iced_core", @@ -2499,12 +2499,13 @@ dependencies = [ "iced_winit", "image", "thiserror", + "window_clipboard", ] [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#ef050d5b05ea31acd2716538265fafd5b92d6cdb" +source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" dependencies = [ "accesskit", "accesskit_winit", @@ -2513,7 +2514,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#ef050d5b05ea31acd2716538265fafd5b92d6cdb" +source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" dependencies = [ "bitflags 1.3.2", "log", @@ -2524,13 +2525,14 @@ dependencies = [ "smol_str", "thiserror", "web-time", + "window_clipboard", "xxhash-rust", ] [[package]] name = "iced_futures" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#ef050d5b05ea31acd2716538265fafd5b92d6cdb" +source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" dependencies = [ "futures", "iced_core", @@ -2543,7 +2545,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#ef050d5b05ea31acd2716538265fafd5b92d6cdb" +source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2567,7 +2569,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#ef050d5b05ea31acd2716538265fafd5b92d6cdb" +source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2579,17 +2581,18 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#ef050d5b05ea31acd2716538265fafd5b92d6cdb" +source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" dependencies = [ "iced_core", "iced_futures", "thiserror", + "window_clipboard", ] [[package]] name = "iced_style" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#ef050d5b05ea31acd2716538265fafd5b92d6cdb" +source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" dependencies = [ "iced_core", "once_cell", @@ -2599,7 +2602,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#ef050d5b05ea31acd2716538265fafd5b92d6cdb" +source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" dependencies = [ "bytemuck", "cosmic-text", @@ -2616,7 +2619,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#ef050d5b05ea31acd2716538265fafd5b92d6cdb" +source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2635,7 +2638,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#ef050d5b05ea31acd2716538265fafd5b92d6cdb" +source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" dependencies = [ "iced_renderer", "iced_runtime", @@ -2649,7 +2652,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#ef050d5b05ea31acd2716538265fafd5b92d6cdb" +source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" dependencies = [ "iced_graphics", "iced_runtime", @@ -2984,10 +2987,11 @@ 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#ef050d5b05ea31acd2716538265fafd5b92d6cdb" +source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" dependencies = [ "apply", "ashpd 0.7.0", + "chrono", "cosmic-config", "cosmic-theme", "css-color", @@ -3230,6 +3234,14 @@ dependencies = [ "paste", ] +[[package]] +name = "mime" +version = "0.1.0" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#c3e9e794b94a2e79419517145424dc2035a572da" +dependencies = [ + "smithay-clipboard", +] + [[package]] name = "mime" version = "0.3.17" @@ -3242,7 +3254,7 @@ version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" dependencies = [ - "mime", + "mime 0.3.17", "unicase", ] @@ -3485,7 +3497,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3656,7 +3668,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3689,7 +3701,7 @@ checksum = "e8890702dbec0bad9116041ae586f84805b13eecd1d8b1df27c29998a9969d6d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3806,7 +3818,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3959,9 +3971,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -4087,9 +4099,9 @@ checksum = "3b42e27ef78c35d3998403c1d26f3efd9e135d3e5121b0a4845cc5cc27547f4f" [[package]] name = "read-fonts" -version = "0.15.6" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ea23eedb4d938031b6d4343222444608727a6aa68ec355e13588d9947ffe92" +checksum = "81c524658d3b77930a391f559756d91dbe829ab6cf4687083f615d395df99722" dependencies = [ "font-types", ] @@ -4255,7 +4267,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.52", + "syn 2.0.53", "walkdir", ] @@ -4425,7 +4437,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -4436,7 +4448,7 @@ checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -4567,9 +4579,8 @@ dependencies = [ [[package]] name = "smithay-clipboard" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c091e7354ea8059d6ad99eace06dd13ddeedbb0ac72d40a9a6e7ff790525882d" +version = "0.8.0" +source = "git+https://github.com/pop-os/smithay-clipboard?tag=pop-mime-types#cc0101c1f9ccc937a413bd3af3c0f6217f27e935" dependencies = [ "libc", "smithay-client-toolkit", @@ -4692,9 +4703,9 @@ dependencies = [ [[package]] name = "swash" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06ff4664af8923625604261c645f5c4cc610cc83c84bec74b50d76237089de7" +checksum = "9af636fb90d39858650cae1088a37e2862dab4e874a0bb49d6dfb5b2dacf0e24" dependencies = [ "read-fonts", "yazi", @@ -4714,9 +4725,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" dependencies = [ "proc-macro2", "quote", @@ -4734,14 +4745,14 @@ dependencies = [ [[package]] name = "system-deps" -version = "6.2.0" +version = "6.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2d580ff6a20c55dfb86be5f9c238f67835d0e81cbdea8bf5680e0897320331" +checksum = "e8e9199467bcbc77c6a13cc6e32a6af21721ab8c96aa0261856c4fda5a4433f0" dependencies = [ "cfg-expr", "heck", "pkg-config", - "toml 0.8.10", + "toml 0.8.12", "version-compare", ] @@ -4786,22 +4797,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -4948,14 +4959,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.10" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.6", + "toml_edit 0.22.8", ] [[package]] @@ -4991,9 +5002,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.6" +version = "0.22.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6" +checksum = "c12219811e0c1ba077867254e5ad62ee2c9c190b0d957110750ac0cda1ae96cd" dependencies = [ "indexmap", "serde", @@ -5021,7 +5032,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -5354,7 +5365,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", "wasm-bindgen-shared", ] @@ -5388,7 +5399,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5691,13 +5702,13 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window_clipboard" version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6d692d46038c433f9daee7ad8757e002a4248c20b0a3fbc991d99521d3bcb6d" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#c3e9e794b94a2e79419517145424dc2035a572da" dependencies = [ "clipboard-win", "clipboard_macos", "clipboard_wayland", "clipboard_x11", + "mime 0.1.0", "raw-window-handle 0.6.0", "thiserror", ] @@ -6088,7 +6099,7 @@ checksum = "87bf7b69bb50588d70a36e467be29d3df3e8c32580276d62eded9738c1a797aa" dependencies = [ "dirs-next", "glob", - "mime", + "mime 0.3.17", "nom", "unicase", ] @@ -6226,7 +6237,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] diff --git a/src/main.rs b/src/main.rs index 4c01b88..afa19f7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2481,10 +2481,8 @@ impl Application for App { .padding(space_xxs) .spacing(space_xxs); - tab_column = tab_column.push( - widget::cosmic_container::container(find_widget) - .layer(cosmic_theme::Layer::Primary), - ); + tab_column = tab_column + .push(widget::layer_container(find_widget).layer(cosmic_theme::Layer::Primary)); } pane_grid::Content::new(tab_column) From 16d3c118163e1ab0f7c121e6592e347122df1bb3 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 18 Mar 2024 15:50:42 -0600 Subject: [PATCH 09/54] Update dependencies --- Cargo.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4abac3f..4858393 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -872,7 +872,7 @@ dependencies = [ [[package]] name = "clipboard_macos" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#c3e9e794b94a2e79419517145424dc2035a572da" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#f65a6c303bbbd6c7bf88f9bc34421ec06d893bea" dependencies = [ "objc", "objc-foundation", @@ -882,7 +882,7 @@ dependencies = [ [[package]] name = "clipboard_wayland" version = "0.2.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#c3e9e794b94a2e79419517145424dc2035a572da" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#f65a6c303bbbd6c7bf88f9bc34421ec06d893bea" dependencies = [ "mime 0.1.0", "smithay-clipboard", @@ -891,7 +891,7 @@ dependencies = [ [[package]] name = "clipboard_x11" version = "0.4.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#c3e9e794b94a2e79419517145424dc2035a572da" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#f65a6c303bbbd6c7bf88f9bc34421ec06d893bea" dependencies = [ "thiserror", "x11rb", @@ -1088,7 +1088,7 @@ dependencies = [ [[package]] name = "cosmic-files" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-files.git#2bc93cc3cc1906c7884dd941ab211b6bc8eca8fd" +source = "git+https://github.com/pop-os/cosmic-files.git#33621a68d0293379a71ae5f01c99be8136a52829" dependencies = [ "chrono", "dirs", @@ -3237,7 +3237,7 @@ dependencies = [ [[package]] name = "mime" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#c3e9e794b94a2e79419517145424dc2035a572da" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#f65a6c303bbbd6c7bf88f9bc34421ec06d893bea" dependencies = [ "smithay-clipboard", ] @@ -5702,7 +5702,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window_clipboard" version = "0.4.1" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#c3e9e794b94a2e79419517145424dc2035a572da" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#f65a6c303bbbd6c7bf88f9bc34421ec06d893bea" dependencies = [ "clipboard-win", "clipboard_macos", From 0ecbb15de329b160f8571d7307b9e99dddac092b Mon Sep 17 00:00:00 2001 From: Eduardo Flores Date: Mon, 18 Mar 2024 19:31:28 -0700 Subject: [PATCH 10/54] refactor(menu): update menu declaration. - Updated libcosmic. - Updated menu declaration. --- src/key_bind.rs | 46 +-------------- src/main.rs | 16 +++-- src/menu.rs | 141 +++++++++++++++++--------------------------- src/terminal_box.rs | 7 +-- 4 files changed, 68 insertions(+), 142 deletions(-) diff --git a/src/key_bind.rs b/src/key_bind.rs index 6aa77e4..dab47cb 100644 --- a/src/key_bind.rs +++ b/src/key_bind.rs @@ -1,49 +1,9 @@ -use cosmic::{ - iced::keyboard::{Key, Modifiers}, - iced_core::keyboard::key::Named, -}; -use serde::{Deserialize, Serialize}; -use std::{collections::HashMap, fmt}; +use cosmic::widget::menu::key_bind::{KeyBind, Modifier}; +use cosmic::{iced::keyboard::Key, iced_core::keyboard::key::Named}; +use std::collections::HashMap; use crate::Action; -#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] -pub enum Modifier { - Super, - Ctrl, - Alt, - Shift, -} - -#[derive(Clone, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)] -pub struct KeyBind { - pub modifiers: Vec, - pub key: Key, -} - -impl KeyBind { - pub fn matches(&self, modifiers: Modifiers, key: &Key) -> bool { - key == &self.key - && modifiers.logo() == self.modifiers.contains(&Modifier::Super) - && modifiers.control() == self.modifiers.contains(&Modifier::Ctrl) - && modifiers.alt() == self.modifiers.contains(&Modifier::Alt) - && modifiers.shift() == self.modifiers.contains(&Modifier::Shift) - } -} - -impl fmt::Display for KeyBind { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - for modifier in self.modifiers.iter() { - write!(f, "{:?} + ", modifier)?; - } - match &self.key { - Key::Character(c) => write!(f, "{}", c.to_uppercase()), - Key::Named(named) => write!(f, "{:?}", named), - other => write!(f, "{:?}", other), - } - } -} - //TODO: load from config pub fn key_binds() -> HashMap { let mut key_binds = HashMap::new(); diff --git a/src/main.rs b/src/main.rs index afa19f7..a76d696 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: GPL-3.0-only use alacritty_terminal::{event::Event as TermEvent, term, term::color::Colors as TermColors, tty}; +use cosmic::widget::menu::action::MenuAction; +use cosmic::widget::menu::key_bind::KeyBind; use cosmic::{ app::{message, Command, Core, Settings}, cosmic_config::{self, ConfigSet, CosmicConfigEntry}, @@ -40,7 +42,7 @@ mod mouse_reporter; use icon_cache::IconCache; mod icon_cache; -use key_bind::{key_binds, KeyBind}; +use key_bind::key_binds; mod key_bind; mod localize; @@ -206,12 +208,14 @@ pub enum Action { ZoomReset, } -impl Action { - pub fn message(self, entity_opt: Option) -> Message { +impl MenuAction for Action { + type Message = Message; + + fn message(&self, entity_opt: Option) -> Message { match self { Action::About => Message::ToggleContextPage(ContextPage::About), Action::ColorSchemes(color_scheme_kind) => { - Message::ToggleContextPage(ContextPage::ColorSchemes(color_scheme_kind)) + Message::ToggleContextPage(ContextPage::ColorSchemes(*color_scheme_kind)) } Action::Copy => Message::Copy(entity_opt), Action::Find => Message::Find(true), @@ -223,11 +227,11 @@ impl Action { Action::PaneSplitVertical => Message::PaneSplit(pane_grid::Axis::Vertical), Action::PaneToggleMaximized => Message::PaneToggleMaximized, Action::Paste => Message::Paste(entity_opt), - Action::ProfileOpen(profile_id) => Message::ProfileOpen(profile_id), + Action::ProfileOpen(profile_id) => Message::ProfileOpen(*profile_id), Action::Profiles => Message::ToggleContextPage(ContextPage::Profiles), Action::SelectAll => Message::SelectAll(entity_opt), Action::Settings => Message::ToggleContextPage(ContextPage::Settings), - Action::ShowHeaderBar(show_headerbar) => Message::ShowHeaderBar(show_headerbar), + Action::ShowHeaderBar(show_headerbar) => Message::ShowHeaderBar(*show_headerbar), Action::TabActivate0 => Message::TabActivateJump(0), Action::TabActivate1 => Message::TabActivateJump(1), Action::TabActivate2 => Message::TabActivateJump(2), diff --git a/src/menu.rs b/src/menu.rs index 07d9546..a97dd05 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -1,13 +1,14 @@ // SPDX-License-Identifier: GPL-3.0-only +use cosmic::widget::menu::key_bind::KeyBind; +use cosmic::widget::menu::menu_tree::{menu_items, menu_root, MenuItem}; use cosmic::{ - //TODO: export in cosmic::widget iced::{ widget::{column, horizontal_rule, horizontal_space}, Alignment, Background, Length, }, iced_core::Border, - theme, + menu_button, theme, widget::{ self, menu::{ItemHeight, ItemWidth, MenuBar, MenuTree}, @@ -17,22 +18,7 @@ use cosmic::{ }; use std::collections::HashMap; -use crate::{fl, Action, ColorSchemeId, ColorSchemeKind, Config, KeyBind, Message}; - -macro_rules! menu_button { - ($($x:expr),+ $(,)?) => ( - widget::button( - widget::Row::with_children( - vec![$(Element::from($x)),+] - ) - .align_items(Alignment::Center) - ) - .height(Length::Fixed(32.0)) - .padding([4, 16]) - .width(Length::Fill) - .style(theme::Button::MenuItem) - ); -} +use crate::{fl, Action, ColorSchemeId, ColorSchemeKind, Config, Message}; pub fn context_menu<'a>( config: &Config, @@ -145,90 +131,69 @@ pub fn color_scheme_menu<'a>( } pub fn menu_bar<'a>(config: &Config, key_binds: &HashMap) -> Element<'a, Message> { - //TODO: port to libcosmic - let menu_root = |label| { - widget::button(widget::text(label)) - .padding([4, 12]) - .style(theme::Button::MenuRoot) - }; - - let menu_folder = - |label| menu_button!(widget::text(label), horizontal_space(Length::Fill), ">"); - - let find_key = |action: &Action| -> String { - for (key_bind, key_action) in key_binds.iter() { - if action == key_action { - return key_bind.to_string(); - } - } - String::new() - }; - - let menu_item = |label, action| { - let key = find_key(&action); - MenuTree::new( - menu_button!( - widget::text(label), - horizontal_space(Length::Fill), - widget::text(key) - ) - .on_press(action.message(None)), - ) - }; - let mut profile_items = Vec::with_capacity(config.profiles.len()); for (name, id) in config.profile_names() { - profile_items.push(menu_item(name, Action::ProfileOpen(id))); + profile_items.push(MenuItem::Button(name, Action::ProfileOpen(id))); } + //TODO: what to do if there are no profiles? MenuBar::new(vec![ MenuTree::with_children( menu_root(fl!("file")), - vec![ - menu_item(fl!("new-tab"), Action::TabNew), - menu_item(fl!("new-window"), Action::WindowNew), - MenuTree::new(horizontal_rule(1)), - MenuTree::with_children(menu_folder(fl!("profile")), profile_items), - menu_item(fl!("menu-profiles"), Action::Profiles), - MenuTree::new(horizontal_rule(1)), - menu_item(fl!("close-tab"), Action::TabClose), - MenuTree::new(horizontal_rule(1)), - menu_item(fl!("quit"), Action::WindowClose), - ], + menu_items( + key_binds, + vec![ + MenuItem::Button(fl!("new-tab"), Action::TabNew), + MenuItem::Button(fl!("new-window"), Action::WindowNew), + MenuItem::Divider, + MenuItem::Folder(fl!("profile"), profile_items), + MenuItem::Button(fl!("menu-profiles"), Action::Profiles), + MenuItem::Divider, + MenuItem::Button(fl!("close-tab"), Action::TabClose), + MenuItem::Divider, + MenuItem::Button(fl!("quit"), Action::WindowClose), + ], + ), ), MenuTree::with_children( menu_root(fl!("edit")), - vec![ - menu_item(fl!("copy"), Action::Copy), - menu_item(fl!("paste"), Action::Paste), - menu_item(fl!("select-all"), Action::SelectAll), - MenuTree::new(horizontal_rule(1)), - menu_item(fl!("find"), Action::Find), - ], + menu_items( + key_binds, + vec![ + MenuItem::Button(fl!("copy"), Action::Copy), + MenuItem::Button(fl!("paste"), Action::Paste), + MenuItem::Button(fl!("select-all"), Action::SelectAll), + MenuItem::Divider, + MenuItem::Button(fl!("find"), Action::Find), + ], + ), ), MenuTree::with_children( menu_root(fl!("view")), - vec![ - menu_item(fl!("zoom-in"), Action::ZoomIn), - menu_item(fl!("zoom-reset"), Action::ZoomReset), - menu_item(fl!("zoom-out"), Action::ZoomOut), - MenuTree::new(horizontal_rule(1)), - menu_item(fl!("next-tab"), Action::TabNext), - menu_item(fl!("previous-tab"), Action::TabPrev), - MenuTree::new(horizontal_rule(1)), - menu_item(fl!("split-horizontal"), Action::PaneSplitHorizontal), - menu_item(fl!("split-vertical"), Action::PaneSplitVertical), - menu_item(fl!("pane-toggle-maximize"), Action::PaneToggleMaximized), - MenuTree::new(horizontal_rule(1)), - menu_item( - fl!("menu-color-schemes"), - Action::ColorSchemes(config.color_scheme_kind()), - ), - menu_item(fl!("menu-settings"), Action::Settings), - MenuTree::new(horizontal_rule(1)), - menu_item(fl!("menu-about"), Action::About), - ], + menu_items( + key_binds, + vec![ + MenuItem::Button(fl!("zoom-in"), Action::ZoomIn), + MenuItem::Button(fl!("zoom-reset"), Action::ZoomReset), + MenuItem::Button(fl!("zoom-out"), Action::ZoomOut), + MenuItem::Divider, + MenuItem::Button(fl!("next-tab"), Action::TabNext), + MenuItem::Button(fl!("previous-tab"), Action::TabPrev), + MenuItem::Divider, + MenuItem::Button(fl!("split-horizontal"), Action::PaneSplitHorizontal), + MenuItem::Button(fl!("split-vertical"), Action::PaneSplitVertical), + MenuItem::Button(fl!("pane-toggle-maximize"), Action::PaneToggleMaximized), + MenuItem::Divider, + MenuItem::Button( + fl!("menu-color-schemes"), + Action::ColorSchemes(config.color_scheme_kind()), + ), + MenuItem::Button(fl!("menu-settings"), Action::Settings), + MenuItem::Divider, + MenuItem::Button(fl!("menu-about"), Action::About), + ], + ), ), ]) .item_height(ItemHeight::Dynamic(40)) diff --git a/src/terminal_box.rs b/src/terminal_box.rs index 6d7d823..70cdd84 100644 --- a/src/terminal_box.rs +++ b/src/terminal_box.rs @@ -5,6 +5,7 @@ use alacritty_terminal::{ selection::{Selection, SelectionType}, term::{cell::Flags, TermMode}, }; +use cosmic::widget::menu::key_bind::KeyBind; use cosmic::{ cosmic_theme::palette::{blend::Compose, WithAlpha}, iced::{ @@ -40,11 +41,7 @@ use std::{ time::{Duration, Instant}, }; -use crate::{ - key_bind::{key_binds, KeyBind}, - terminal::Metadata, - Action, Terminal, TerminalScroll, -}; +use crate::{key_bind::key_binds, terminal::Metadata, Action, Terminal, TerminalScroll}; pub struct TerminalBox<'a, Message> { terminal: &'a Mutex, From c7719b815c85805f59a00b555c500dc1117abcb6 Mon Sep 17 00:00:00 2001 From: Robert Inagaki <51520508+nuxnu@users.noreply.github.com> Date: Wed, 20 Mar 2024 13:47:59 +0900 Subject: [PATCH 11/54] Update typo --- 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 a8f59c6..400173f 100644 --- a/i18n/ja/cosmic_term.ftl +++ b/i18n/ja/cosmic_term.ftl @@ -18,7 +18,7 @@ import-errors = インポートエラー profiles = プロファイル name = 名前 command-line = コマンドライン -tab-title = タブのイトル +tab-title = タブタイトル tab-title-description = デフォルトのタブタイトルを無効にします add-profile = プロファイルを追加 new-profile = 新しいプロファイル From ab832cca19abb64d2460663199806dcd5993c38c Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 22 Mar 2024 17:01:30 -0600 Subject: [PATCH 12/54] Update control Add git to d/control --- debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/control b/debian/control index d78b815..cf75a41 100644 --- a/debian/control +++ b/debian/control @@ -4,6 +4,7 @@ Priority: optional Maintainer: Jeremy Soller Build-Depends: debhelper-compat (=13), + git, just (>= 1.13.0), pkg-config, rust-all, From 648aa30f90562ce46f5831a2dc039221c5734f52 Mon Sep 17 00:00:00 2001 From: N-Hoffmann Date: Sat, 30 Mar 2024 10:01:46 +0100 Subject: [PATCH 13/54] i18n(fr): Added French translation --- i18n/fr/cosmic_term.ftl | 96 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 i18n/fr/cosmic_term.ftl diff --git a/i18n/fr/cosmic_term.ftl b/i18n/fr/cosmic_term.ftl new file mode 100644 index 0000000..191f414 --- /dev/null +++ b/i18n/fr/cosmic_term.ftl @@ -0,0 +1,96 @@ +cosmic-terminal = Terminal COSMIC +new-terminal = Nouveau terminal + +# Context Pages + +## About +git-description = Git commit {$hash} le {$date} + +## Color schemes +color-schemes = Palettes de couleurs +rename = Renommer +export = Exporter +delete = Supprimer +import = Importer +import-errors = Importer erreurs + +## Profiles +profiles = Profils +name = Nom +command-line = Ligne de commande +tab-title = Titre de l'onglet +tab-title-description = Remplacer le titre d'onglet par défaut +add-profile = Ajouter profil +new-profile = Nouveau profil +make-default = Rendre par défaut + +## Settings +settings = Paramètres + +### Appearance +appearance = Apparence +theme = Thème +match-desktop = Assortir au bureau +dark = Sombre +light = Clair +syntax-dark = Palette de couleur sombre +syntax-light = Palette de couleur claire +default-zoom-step = Pas du zoom +opacity = Opacité de l'arrière-plan + +### Font +font = Police +advanced-font-settings = Paramètres de police avancés +default-font = Police +default-font-size = Taille de la police +default-font-stretch = Étirement de la police +default-font-weight = Graisse de caractère normale +default-dim-font-weight = Graisse de caractère légère +default-bold-font-weight = Graisse de caractère grasse +use-bright-bold = Rendre le texte en gras plus clair + +### Splits +splits = Divisions +focus-follow-mouse = Le focus de la saisie suit la souris + +### Advanced +advanced = Avancé +show-headerbar = Afficher l'en-tête +show-header-description = Révéler l'en-tête du menu contextuel. + +# Find +find-placeholder = Rechercher... +find-previous = Chercher précédent +find-next = Chercher suivant + +# Menu + +## File +file = Fichier +new-tab = Nouvel onglet +new-window = Nouvelle fenêtre +profile = Profil +menu-profiles = Profils... +close-tab = Fermer l'onglet +quit = Quitter + +## Edit +edit = Modifier +copy = Copier +paste = Coller +select-all = Sélectionner tout +find = Rechercher + +## View +view = Affichage +zoom-in = Texte plus grand +zoom-reset = Taille de texte par défaut +zoom-out = Texte plus petit +next-tab = Onglet suivant +previous-tab = Onglet précédent +split-horizontal = Diviser horizontalement +split-vertical = Diviser verticalement +pane-toggle-maximize = Maximiser l'affichage +menu-color-schemes = Palettes de couleurs... +menu-settings = Paramètres... +menu-about = À propos du terminal COSMIC... From fdf61954dee00ffff330dc21a8f155ad0c77cf9d Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 1 Apr 2024 13:26:18 -0600 Subject: [PATCH 14/54] Add FlakeHub GitHub Action --- .../workflows/flakehub-publish-rolling.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/flakehub-publish-rolling.yml diff --git a/.github/workflows/flakehub-publish-rolling.yml b/.github/workflows/flakehub-publish-rolling.yml new file mode 100644 index 0000000..0310d44 --- /dev/null +++ b/.github/workflows/flakehub-publish-rolling.yml @@ -0,0 +1,19 @@ +name: "Publish every Git push to master to FlakeHub" +on: + push: + branches: + - "master" +jobs: + flakehub-publish: + runs-on: "ubuntu-latest" + permissions: + id-token: "write" + contents: "read" + steps: + - uses: "actions/checkout@v3" + - uses: "DeterminateSystems/nix-installer-action@main" + - uses: "DeterminateSystems/flakehub-push@main" + with: + name: "pop-os/cosmic-term" + rolling: true + visibility: "public" From 69c226928f115769de335ac2214536a514ffe81d Mon Sep 17 00:00:00 2001 From: Mattias Eriksson Date: Fri, 5 Apr 2024 16:35:17 +0200 Subject: [PATCH 15/54] Bump alacritty_terminal to 0.23 --- Cargo.lock | 16 +++++++++++----- Cargo.toml | 2 +- src/main.rs | 4 ++++ src/terminal.rs | 6 ++++-- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4858393..549e586 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -126,11 +126,11 @@ dependencies = [ [[package]] name = "alacritty_terminal" -version = "0.20.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6121a8d385a114873632d785a99614ae1d324b3e38b9da8a92138c8799b50fdc" +checksum = "f6d1ea4484c8676f295307a4892d478c70ac8da1dbd8c7c10830a504b7f1022f" dependencies = [ - "base64", + "base64 0.22.0", "bitflags 2.4.2", "home", "libc", @@ -631,6 +631,12 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" + [[package]] name = "bit-set" version = "0.5.3" @@ -4235,7 +4241,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ - "base64", + "base64 0.21.7", "bitflags 2.4.2", "serde", "serde_derive", @@ -5213,7 +5219,7 @@ version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b0a51b72ab80ca511d126b77feeeb4fb1e972764653e61feac30adc161a756" dependencies = [ - "base64", + "base64 0.21.7", "log", "pico-args", "usvg-parser", diff --git a/Cargo.toml b/Cargo.toml index 769bea0..bb012c4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ rust-version = "1.71" vergen = { version = "8", features = ["git", "gitcl"] } [dependencies] -alacritty_terminal = "0.20" +alacritty_terminal = "0.23" env_logger = "0.10" hex_color = { version = "3", features = ["serde"] } indexmap = "2" diff --git a/src/main.rs b/src/main.rs index a76d696..c8d085a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1165,6 +1165,7 @@ impl App { working_directory: None, //TODO: configurable hold (keep open when child exits)? hold: false, + env: HashMap::new(), }; let tab_title_override = if !profile.tab_title.is_empty() { Some(profile.tab_title.clone()) @@ -2235,6 +2236,9 @@ impl Application for App { } } } + TermEvent::ChildExit(_error_code) => { + //Ignore this for now + }, } } Message::TermEventTx(term_event_tx) => { diff --git a/src/terminal.rs b/src/terminal.rs index 409a898..ab040ca 100644 --- a/src/terminal.rs +++ b/src/terminal.rs @@ -276,7 +276,7 @@ impl Terminal { let window_id = 0; let pty = tty::new(&options, size.into(), window_id)?; - let pty_event_loop = EventLoop::new(term.clone(), event_proxy, pty, options.hold, false); + let pty_event_loop = EventLoop::new(term.clone(), event_proxy, pty, options.hold, false)?; let notifier = Notifier(pty_event_loop.channel()); let _pty_join_handle = pty_event_loop.spawn(); @@ -876,6 +876,8 @@ impl Terminal { impl Drop for Terminal { fn drop(&mut self) { // Ensure shutdown on terminal drop - self.notifier.0.send(Msg::Shutdown); + if let Err(err) = self.notifier.0.send(Msg::Shutdown) { + log::warn!("Failed to send shutdown message on dropped terminal: {err}"); + } } } From 782bce1f011d2602dc9c78e1b1a3e020f62668ea Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 5 Apr 2024 19:27:21 -0600 Subject: [PATCH 16/54] Enable CSDs on Redox --- src/main.rs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/main.rs b/src/main.rs index c8d085a..9936f9c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -141,13 +141,6 @@ fn main() -> Result<(), Box> { let mut settings = Settings::default(); settings = settings.theme(config.app_theme.theme()); - - #[cfg(target_os = "redox")] - { - // Redox does not support resize if doing CSDs - settings = settings.client_decorations(false); - } - settings = settings.size_limits(Limits::NONE.min_width(360.0).min_height(180.0)); let flags = Flags { From 770549e93be6d07a1a49d9f771e60f3c887c8194 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 8 Apr 2024 08:44:32 -0600 Subject: [PATCH 17/54] Scroll with shift+home,end,pageup,pagedown --- src/main.rs | 2 +- src/terminal_box.rs | 28 ++++++++++++++++++++++++---- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9936f9c..e5597da 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2231,7 +2231,7 @@ impl Application for App { } TermEvent::ChildExit(_error_code) => { //Ignore this for now - }, + } } } Message::TermEventTx(term_event_tx) => { diff --git a/src/terminal_box.rs b/src/terminal_box.rs index 70cdd84..6b26101 100644 --- a/src/terminal_box.rs +++ b/src/terminal_box.rs @@ -608,8 +608,22 @@ where let escape_code = match named { Named::Insert => csi("2", "~", mod_no), Named::Delete => csi("3", "~", mod_no), - Named::PageUp => csi("5", "~", mod_no), - Named::PageDown => csi("6", "~", mod_no), + Named::PageUp => { + if modifiers.shift() { + terminal.scroll(TerminalScroll::PageUp); + None + } else { + csi("5", "~", mod_no) + } + } + Named::PageDown => { + if modifiers.shift() { + terminal.scroll(TerminalScroll::PageDown); + None + } else { + csi("6", "~", mod_no) + } + } Named::ArrowUp => { if is_app_cursor { ss3("A", mod_no) @@ -639,14 +653,20 @@ where } } Named::End => { - if is_app_cursor { + if modifiers.shift() { + terminal.scroll(TerminalScroll::Bottom); + None + } else if is_app_cursor { ss3("F", mod_no) } else { csi("F", "", mod_no) } } Named::Home => { - if is_app_cursor { + if modifiers.shift() { + terminal.scroll(TerminalScroll::Top); + None + } else if is_app_cursor { ss3("H", mod_no) } else { csi("H", "", mod_no) From 51eb4c5d0250ea1e0638d7813432900290ccc4d9 Mon Sep 17 00:00:00 2001 From: Mattias Eriksson Date: Wed, 10 Apr 2024 08:27:23 +0200 Subject: [PATCH 18/54] Adapt write_primary to libcosmic changes --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index e33e4f0..2569730 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1652,7 +1652,7 @@ impl Application for App { let terminal = terminal.lock().unwrap(); let term = terminal.term.lock(); if let Some(text) = term.selection_to_string() { - return clipboard::write_primary(text); + return Command::batch([clipboard::write_primary(text), self.update_focus()]); } } } else { From 2903b1024717af8beb5ce7ab7b3a1b7bbeeec813 Mon Sep 17 00:00:00 2001 From: FAlexei <139798315+FAlexei@users.noreply.github.com> Date: Sun, 14 Apr 2024 12:25:40 +0300 Subject: [PATCH 19/54] Russian translation update --- i18n/ru/cosmic_term.ftl | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/i18n/ru/cosmic_term.ftl b/i18n/ru/cosmic_term.ftl index 5abde5e..9c947ee 100644 --- a/i18n/ru/cosmic_term.ftl +++ b/i18n/ru/cosmic_term.ftl @@ -1,5 +1,29 @@ +cosmic-terminal = Терминал COSMIC +new-terminal = Новый терминал + # Context Pages +## About +git-description = Git-коммит {$hash} от {$date} + +## Color schemes +color-schemes = Цветовые схемы +rename = Переименовать +export = Экспортировать +delete = Удалить +import = Импортировать +import-errors = Ошибки при импорте + +## Profiles +profiles = Профили +name = Имя +command-line = Командная строка +tab-title = Заголовок вкладки +tab-title-description = Переопределить заголовок вкладки по умолчанию +add-profile = Добавить профиль +new-profile = Новый профиль +make-default = Установить по умолчанию + ## Settings settings = Параметры @@ -12,6 +36,7 @@ light = Светлая syntax-dark = Цветовая схема темная syntax-light = Цветовая схема светлая default-zoom-step = Шаги масштабирования +opacity = Прозрачность фона ### Font font = Шрифт @@ -44,6 +69,8 @@ find-next = Найти далее file = Файл new-tab = Новая вкладка new-window = Новое окно +profile = Профиль +menu-profiles = Профили... close-tab = Закрыть вкладку quit = Завершить @@ -64,4 +91,6 @@ previous-tab = Предыдущая вкладка split-horizontal = Разделение по горизонтали split-vertical = Разделение по вертикали pane-toggle-maximize = Переключить на весь экран +menu-color-schemes = Цветовые схемы... menu-settings = Параметры... +menu-about = О Терминале COSMIC... From c63e19eea37b2e39626da1b7618d79e1b17922af Mon Sep 17 00:00:00 2001 From: Mattias Eriksson Date: Fri, 12 Apr 2024 13:26:08 +0200 Subject: [PATCH 20/54] Add fallback if selected color theme is not present The fallback is the first available theme when sorted, this is to make things predictable and to get the same theme if you open the terminal multiple times --- src/main.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index e5597da..15e1ded 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1135,7 +1135,15 @@ impl App { self.pane_model.focus = pane; match &self.term_event_tx_opt { Some(term_event_tx) => { - match self.themes.get(&self.config.syntax_theme(profile_id_opt)) { + let colors = self + .themes + .get(&self.config.syntax_theme(profile_id_opt)) + .or_else(|| { + let mut keys: Vec<_> = self.themes.keys().collect(); + keys.sort_by(|a, b| (&a.0).cmp(&b.0)); + keys.first().and_then(|key| self.themes.get(key)) + }); + match colors { Some(colors) => { let current_pane = self.pane_model.focus; if let Some(tab_model) = self.pane_model.active_mut() { From 3e41d261a9d5d2284cd6ae85acde2562b8a5ccd6 Mon Sep 17 00:00:00 2001 From: Mattias Eriksson Date: Sun, 14 Apr 2024 16:48:13 +0200 Subject: [PATCH 21/54] Use COSMIC Default themes as fallback --- src/config.rs | 10 ++++++---- src/main.rs | 12 ++++++++---- src/terminal_theme.rs | 8 +++++--- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/config.rs b/src/config.rs index 1e1049a..144c3eb 100644 --- a/src/config.rs +++ b/src/config.rs @@ -14,6 +14,8 @@ use std::sync::OnceLock; use crate::fl; pub const CONFIG_VERSION: u64 = 1; +pub const COSMIC_THEME_DARK: &str = "COSMIC Dark"; +pub const COSMIC_THEME_LIGHT: &str = "COSMIC Light"; #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)] pub enum AppTheme { @@ -193,8 +195,8 @@ impl Default for Profile { Self { name: fl!("new-profile"), command: String::new(), - syntax_theme_dark: "COSMIC Dark".to_string(), - syntax_theme_light: "COSMIC Light".to_string(), + syntax_theme_dark: COSMIC_THEME_DARK.to_string(), + syntax_theme_light: COSMIC_THEME_LIGHT.to_string(), tab_title: String::new(), } } @@ -239,8 +241,8 @@ impl Default for Config { opacity: 100, profiles: BTreeMap::new(), show_headerbar: true, - syntax_theme_dark: "COSMIC Dark".to_string(), - syntax_theme_light: "COSMIC Light".to_string(), + syntax_theme_dark: COSMIC_THEME_DARK.to_string(), + syntax_theme_light: COSMIC_THEME_LIGHT.to_string(), use_bright_bold: false, default_profile: None, } diff --git a/src/main.rs b/src/main.rs index 15e1ded..d3d6633 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1138,10 +1138,14 @@ impl App { let colors = self .themes .get(&self.config.syntax_theme(profile_id_opt)) - .or_else(|| { - let mut keys: Vec<_> = self.themes.keys().collect(); - keys.sort_by(|a, b| (&a.0).cmp(&b.0)); - keys.first().and_then(|key| self.themes.get(key)) + .or_else(|| match self.config.color_scheme_kind() { + ColorSchemeKind::Dark => self + .themes + .get(&(config::COSMIC_THEME_DARK.to_string(), ColorSchemeKind::Dark)), + ColorSchemeKind::Light => self.themes.get(&( + config::COSMIC_THEME_LIGHT.to_string(), + ColorSchemeKind::Light, + )), }); match colors { Some(colors) => { diff --git a/src/terminal_theme.rs b/src/terminal_theme.rs index 329e5c2..a2e1b80 100644 --- a/src/terminal_theme.rs +++ b/src/terminal_theme.rs @@ -6,7 +6,9 @@ use hex_color::HexColor; use palette::{encoding::Srgb, rgb::Rgb as PRgb, FromColor, Okhsl}; use std::{collections::HashMap, fs}; -use crate::config::{ColorScheme, ColorSchemeAnsi, ColorSchemeKind}; +use crate::config::{ + ColorScheme, ColorSchemeAnsi, ColorSchemeKind, COSMIC_THEME_DARK, COSMIC_THEME_LIGHT, +}; // Fill missing dim/bright colors with derived values from normal ones. #[allow(dead_code)] @@ -338,11 +340,11 @@ fn cosmic_light() -> Colors { pub fn terminal_themes() -> HashMap<(String, ColorSchemeKind), Colors> { let mut themes = HashMap::new(); themes.insert( - ("COSMIC Dark".to_string(), ColorSchemeKind::Dark), + (COSMIC_THEME_DARK.to_string(), ColorSchemeKind::Dark), cosmic_dark(), ); themes.insert( - ("COSMIC Light".to_string(), ColorSchemeKind::Light), + (COSMIC_THEME_LIGHT.to_string(), ColorSchemeKind::Light), cosmic_light(), ); themes From 38d6ca4ac81baac8e3ee7c1b2e17992806620f39 Mon Sep 17 00:00:00 2001 From: Mattias Eriksson Date: Mon, 15 Apr 2024 08:10:42 +0200 Subject: [PATCH 22/54] Update swedish translation --- i18n/sv-SE/cosmic_term.ftl | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/i18n/sv-SE/cosmic_term.ftl b/i18n/sv-SE/cosmic_term.ftl index 30a14a2..445e1c1 100644 --- a/i18n/sv-SE/cosmic_term.ftl +++ b/i18n/sv-SE/cosmic_term.ftl @@ -1,9 +1,33 @@ -# Context sidor +cosmic-terminal = COSMIC Terminal +new-terminal = Ny terminal -## Settings +# Context Pages + +## Om +git-description = Git commit {$hash} på {$date} + +## Färgscheman +color-schemes = Färgscheman +rename = Byt namn +export = Exportera +delete = Ta bort +import = Importera +import-errors = Fel vid import + +## Profiler +profiles = Profiler +name = Namn +command-line = Kommandorad +tab-title = Titel på flik +tab-title-description = Åsidosätt standardtitel för flik +add-profile = Lägg till profil +new-profile = Ny profil +make-default = Gör till standard + +## Inställningar settings = Inställningar -### Appearance +### Utseende appearance = Utseende theme = Tema match-desktop = Matcha skrivbordet @@ -12,6 +36,7 @@ light = Ljust syntax-dark = Färgschema mörkt syntax-light = Färgschema ljust default-zoom-step = Zoom steg +opacity = Bakgrundens opacitet ### Teckensnitt font = Teckensnitt @@ -44,6 +69,8 @@ find-next = Hitta nästa file = Fil new-tab = Ny flik new-window = Nytt fönster +profile = Profil +menu-profiles = Profiler… close-tab = Stäng flik quit = Avsluta @@ -64,4 +91,6 @@ previous-tab = Föregående flik split-horizontal = Dela horisontellt split-vertical = Dela vertikalt pane-toggle-maximize = Växla maximerad +menu-color-schemes = Färgscheman… menu-settings = Inställningar… +menu-about = Om COSMIC Terminal… From 7c5d5440e5a560238de3666d7ead6970477a7dd6 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 19 Apr 2024 14:09:32 -0600 Subject: [PATCH 23/54] terminal: always call update_colors on set_config --- src/terminal.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/terminal.rs b/src/terminal.rs index ab040ca..ba72435 100644 --- a/src/terminal.rs +++ b/src/terminal.rs @@ -572,11 +572,14 @@ impl Terminal { } } if changed { - self.update_colors(config); update = true; } } + //TODO: this is done on every set_config because the changed boolean above does not capture + // WINDOW_BG changes + self.update_colors(config); + if update_cell_size { self.update_cell_size(); } else if update { From 519c3e28b28c6cffc088b2c36e24403616ddea85 Mon Sep 17 00:00:00 2001 From: Mattias Eriksson Date: Wed, 10 Apr 2024 08:46:09 +0200 Subject: [PATCH 24/54] Rename gruvbox color scheme to match all the others --- color-schemes/{gruvbox-dark.ron => Gruvbox Dark.ron} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename color-schemes/{gruvbox-dark.ron => Gruvbox Dark.ron} (96%) diff --git a/color-schemes/gruvbox-dark.ron b/color-schemes/Gruvbox Dark.ron similarity index 96% rename from color-schemes/gruvbox-dark.ron rename to color-schemes/Gruvbox Dark.ron index c661e3d..501d8bc 100644 --- a/color-schemes/gruvbox-dark.ron +++ b/color-schemes/Gruvbox Dark.ron @@ -1,5 +1,5 @@ ( - name: "gruvbox-dark", + name: "Gruvbox Dark", foreground: "#EBDBB2", background: "#282828", cursor: "#EBDBB2", @@ -35,4 +35,4 @@ cyan: "#547055", white: "#747474", ), -) \ No newline at end of file +) From 1d80fd355298659c65f0e0eb41dd137ed68b8331 Mon Sep 17 00:00:00 2001 From: VandaLHJ Date: Thu, 18 Apr 2024 14:43:50 +0200 Subject: [PATCH 25/54] Update cosmic_term.ftl PL Translation Added some bits to match EN --- i18n/pl/cosmic_term.ftl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/i18n/pl/cosmic_term.ftl b/i18n/pl/cosmic_term.ftl index 9b55b2e..27dc415 100644 --- a/i18n/pl/cosmic_term.ftl +++ b/i18n/pl/cosmic_term.ftl @@ -4,7 +4,7 @@ new-terminal = Nowy terminal # Context Pages ## About -git-description = Git commit {$hash} on {$date} +git-description = Git commit {$hash} z {$date} ## Color schemes color-schemes = Schemat kolorów @@ -24,7 +24,6 @@ add-profile = Dodaj profil new-profile = Nowy profil make-default = Uczyń domyślnym - ## Settings settings = Ustawienia @@ -70,6 +69,8 @@ find-next = Szukaj następny file = Plik new-tab = Nowa karta new-window = Nowe okno +profile = Profil +menu-profiles = Profile... close-tab = Zamknij kartę quit = Zamknij From f9390e556763794002194b92b1405f01aca9cc4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gunnar=20Ra=C3=9Fmann?= Date: Tue, 16 Apr 2024 00:19:09 +0200 Subject: [PATCH 26/54] i18n(de): Add German translation --- i18n/de/cosmic_term.ftl | 96 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 i18n/de/cosmic_term.ftl diff --git a/i18n/de/cosmic_term.ftl b/i18n/de/cosmic_term.ftl new file mode 100644 index 0000000..9175a46 --- /dev/null +++ b/i18n/de/cosmic_term.ftl @@ -0,0 +1,96 @@ +cosmic-terminal = COSMIC Terminal +new-terminal = Neues Terminal + +# Context Pages + +## About +git-description = Git commit {$hash} vom {$date} + +## Color schemes +color-schemes = Farbschemen +rename = Umbenennen +export = Exportieren +delete = Löschen +import = Importieren +import-errors = Importfehler + +## Profiles +profiles = Profile +name = Name +command-line = Startbefehl +tab-title = Überschrift +tab-title-description = Standard Titel des Tabs überschreiben +add-profile = Profil hinzufügen +new-profile = Neues Profil +make-default = Als Standard setzen + +## Settings +settings = Einstellungen + +### Appearance +appearance = Aussehen +theme = Thema +match-desktop = An system anpassen +dark = Dunkel +light = Hell +syntax-dark = Dunkles Farbschema +syntax-light = Helles Farbschema +default-zoom-step = Zoomstufen +opacity = Deckkraft des Hintergrundes + +### Font +font = Schrift +advanced-font-settings = Fortgeschrittene Schrifteinstellungen +default-font = Schriftart +default-font-size = Schriftgröße +default-font-stretch = Schriftbreite +default-font-weight = Normale Schriftstärke +default-dim-font-weight = Matte Schriftstärke +default-bold-font-weight = Fette Schriftstärke +use-bright-bold = Fetten Text heller darstellen + +### Splits +splits = Aufteilungen +focus-follow-mouse = Tippen folgt Maus + +### Advanced +advanced = Fortgeschritten +show-headerbar = Kopfzeile anzeigen +show-header-description = Kopfzeile kann via Rechtsklickmenü angezeigt werden + +# Find +find-placeholder = Suche... +find-previous = Vorheriges +find-next = Nächstes + +# Menu + +## File +file = Datei +new-tab = Neuer Tab +new-window = Neues Fenster +profile = Profile +menu-profiles = Profile... +close-tab = Tab schließen +quit = Beenden + +## Edit +edit = Bearbeiten +copy = Kopieren +paste = Einfügen +select-all = Alles auswählen +find = Suche + +## View +view = Ansicht +zoom-in = Schrift vergrößern +zoom-reset = Standard Schriftgröße +zoom-out = Schrift verkleinern +next-tab = Nächster Tab +previous-tab = Vorheriger Tab +split-horizontal = Horizontal aufteilen +split-vertical = Vertikal aufteilen +pane-toggle-maximize = Vollbild umschalten +menu-color-schemes = Farbthemen... +menu-settings = Einstellungen... +menu-about = Über COSMIC Terminal... From bcdacde471b5f1c2c31e1ce8bfb72d8c09234a19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gunnar=20Ra=C3=9Fmann?= Date: Tue, 16 Apr 2024 11:39:53 +0200 Subject: [PATCH 27/54] corrected spelling mistakes --- i18n/de/cosmic_term.ftl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/i18n/de/cosmic_term.ftl b/i18n/de/cosmic_term.ftl index 9175a46..5c9781e 100644 --- a/i18n/de/cosmic_term.ftl +++ b/i18n/de/cosmic_term.ftl @@ -19,7 +19,7 @@ profiles = Profile name = Name command-line = Startbefehl tab-title = Überschrift -tab-title-description = Standard Titel des Tabs überschreiben +tab-title-description = Standardtitel des Tabs überschreiben add-profile = Profil hinzufügen new-profile = Neues Profil make-default = Als Standard setzen @@ -30,7 +30,7 @@ settings = Einstellungen ### Appearance appearance = Aussehen theme = Thema -match-desktop = An system anpassen +match-desktop = An System anpassen dark = Dunkel light = Hell syntax-dark = Dunkles Farbschema @@ -69,7 +69,7 @@ find-next = Nächstes file = Datei new-tab = Neuer Tab new-window = Neues Fenster -profile = Profile +profile = Profil menu-profiles = Profile... close-tab = Tab schließen quit = Beenden @@ -84,7 +84,7 @@ find = Suche ## View view = Ansicht zoom-in = Schrift vergrößern -zoom-reset = Standard Schriftgröße +zoom-reset = Standardschriftgröße zoom-out = Schrift verkleinern next-tab = Nächster Tab previous-tab = Vorheriger Tab From bf66f3173579d5ccf93514e89e7a04a08d2c3cfd Mon Sep 17 00:00:00 2001 From: Leandro Cofre Date: Tue, 2 Apr 2024 16:00:19 +0100 Subject: [PATCH 28/54] Fix minor spanish translation issues --- i18n/es-ES/cosmic_term.ftl | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/i18n/es-ES/cosmic_term.ftl b/i18n/es-ES/cosmic_term.ftl index 4cb73da..f37ba56 100644 --- a/i18n/es-ES/cosmic_term.ftl +++ b/i18n/es-ES/cosmic_term.ftl @@ -22,7 +22,7 @@ tab-title = Título de pestaña tab-title-description = Cambiar el título por defecto de la pestaña add-profile = Añadir perfil new-profile = Nuevo perfil -make-default = Impostar como defecto +make-default = Establecer como predeterminado ## Settings settings = Ajustes @@ -31,22 +31,22 @@ settings = Ajustes appearance = Apariencia theme = Tema match-desktop = Automático -dark = Obscuro +dark = Oscuro light = Claro -syntax-dark = Esquema de color obscura -syntax-light = Esquema de color clara -default-zoom-step = Pasos de zoom -opacity = Opacidad del fondo +syntax-dark = Esquema de color oscuro +syntax-light = Esquema de color claro +default-zoom-step = Escalas de zoom +opacity = Opacidad de fondo ### Font font = Fuente -advanced-font-settings = Ajustes avanzados del fuente +advanced-font-settings = Ajustes avanzados de fuente default-font = Fuente -default-font-size = Tamaño del fuente -default-font-stretch = Anchura del fuente -default-font-weight = Peso del fuente normal -default-dim-font-weight = Peso del fuente delgado -default-bold-font-weight = Peso del fuente en negritas +default-font-size = Tamaño de fuente +default-font-stretch = Anchura de fuente +default-font-weight = Peso de fuente normal +default-dim-font-weight = Peso de fuente delgado +default-bold-font-weight = Peso de fuente en negritas use-bright-bold = Mostrar negritas en colores claros ### Splits @@ -54,9 +54,9 @@ splits = Splits focus-follow-mouse = Enfoque del tecleo sigue el ratón ### Advanced -advanced = Advanzado +advanced = Avanzado show-headerbar = Mostrar encabezado -show-header-description = Mostrar el encabezado desde el menú del clic secundario. +show-header-description = Mostrar encabezado desde el menú del clic secundario. # Find find-placeholder = Buscar... @@ -68,7 +68,7 @@ find-next = Buscar siguiente ## File file = Archivo new-tab = Nueva pestaña -new-window = Ventana nueva +new-window = Nueva ventana profile = Perfil menu-profiles = Perfiles... close-tab = Cerrar pestaña @@ -84,7 +84,7 @@ find = Buscar ## View view = Vista zoom-in = Texto más grande -zoom-reset = Tamaño por defecto del fuente +zoom-reset = Tamaño de fuente por defecto zoom-out = Texto más pequeño next-tab = Pestaña siguiente previous-tab = Pestaña previa From fa744071f886160cdfa8e226c03828958f111b75 Mon Sep 17 00:00:00 2001 From: Dominic Gerhauser Date: Sun, 14 Apr 2024 21:17:32 +0200 Subject: [PATCH 29/54] Add tty working dir and hold --- i18n/en/cosmic_term.ftl | 3 +++ src/config.rs | 6 +++++ src/main.rs | 52 +++++++++++++++++++++++++++++++++++++---- 3 files changed, 56 insertions(+), 5 deletions(-) diff --git a/i18n/en/cosmic_term.ftl b/i18n/en/cosmic_term.ftl index 15712ff..b7146b6 100644 --- a/i18n/en/cosmic_term.ftl +++ b/i18n/en/cosmic_term.ftl @@ -23,6 +23,9 @@ tab-title-description = Override the default tab title add-profile = Add profile new-profile = New profile make-default = Make default +working-directory = Working directory +hold = Hold +remain-open = Remain open after child process exits. ## Settings settings = Settings diff --git a/src/config.rs b/src/config.rs index 144c3eb..00c4e65 100644 --- a/src/config.rs +++ b/src/config.rs @@ -188,6 +188,10 @@ pub struct Profile { pub syntax_theme_light: String, #[serde(default)] pub tab_title: String, + #[serde(default)] + pub working_directory: String, + #[serde(default)] + pub hold: bool, } impl Default for Profile { @@ -198,6 +202,8 @@ impl Default for Profile { syntax_theme_dark: COSMIC_THEME_DARK.to_string(), syntax_theme_light: COSMIC_THEME_LIGHT.to_string(), tab_title: String::new(), + working_directory: String::new(), + hold: true, } } } diff --git a/src/main.rs b/src/main.rs index d3d6633..c0a1fb1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -291,7 +291,9 @@ pub enum Message { PasteValue(Option, String), ProfileCollapse(ProfileId), ProfileCommand(ProfileId, String), + ProfileDirectory(ProfileId, String), ProfileExpand(ProfileId), + ProfileHold(ProfileId, bool), ProfileName(ProfileId, String), ProfileNew, ProfileOpen(ProfileId), @@ -849,6 +851,16 @@ impl App { ]) .spacing(space_xxxs) .into(), + widget::column::with_children(vec![ + widget::text(fl!("working-directory")).into(), + widget::text_input("", &profile.working_directory) + .on_input(move |text| { + Message::ProfileDirectory(profile_id, text) + }) + .into(), + ]) + .spacing(space_xxxs) + .into(), widget::column::with_children(vec![ widget::text(fl!("tab-title")).into(), widget::text_input("", &profile.tab_title) @@ -899,11 +911,28 @@ impl App { .add( widget::settings::item::builder(fl!("make-default")).control( widget::toggler( - "".to_string(), + None, self.get_default_profile().is_some_and(|p| p == profile_id), move |t| Message::UpdateDefaultProfile((t, profile_id)), ), ), + ) + .add( + widget::row::with_children(vec![ + widget::column::with_children(vec![ + widget::text(fl!("hold")).into(), + widget::text::caption(fl!("remain-open")).into(), + ]) + .spacing(space_xxxs) + .into(), + widget::horizontal_space(Length::Fill).into(), + widget::toggler(None, profile.hold, move |t| { + Message::ProfileHold(profile_id, t) + }) + .into(), + ]) + .align_items(Alignment::Center) + .padding([0, space_s]), ); let padding = Padding { @@ -1164,12 +1193,13 @@ impl App { shell = Some(tty::Shell::new(command, args)); } } + let working_directory = (!profile.working_directory.is_empty()) + .then(|| profile.working_directory.clone().into()); + let options = tty::Options { shell, - //TODO: configurable working directory? - working_directory: None, - //TODO: configurable hold (keep open when child exits)? - hold: false, + working_directory, + hold: profile.hold, env: HashMap::new(), }; let tab_title_override = if !profile.tab_title.is_empty() { @@ -1891,9 +1921,21 @@ impl Application for App { return self.save_profiles(); } } + Message::ProfileDirectory(profile_id, text) => { + if let Some(profile) = self.config.profiles.get_mut(&profile_id) { + profile.working_directory = text; + return self.save_profiles(); + } + } Message::ProfileExpand(profile_id) => { self.profile_expanded = Some(profile_id); } + Message::ProfileHold(profile_id, hold) => { + if let Some(profile) = self.config.profiles.get_mut(&profile_id) { + profile.hold = hold; + return self.save_profiles(); + } + } Message::ProfileName(profile_id, text) => { if let Some(profile) = self.config.profiles.get_mut(&profile_id) { profile.name = text; From dcae0a4c2ec2727630a7b9356fd30d467b44b49d Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Sun, 14 Apr 2024 20:53:23 +0100 Subject: [PATCH 30/54] use inline format args (clippy::uninlined_format_args) --- src/localize.rs | 2 +- src/main.rs | 10 +++++----- src/terminal_box.rs | 14 ++++++-------- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/localize.rs b/src/localize.rs index f5c6fb9..012d25f 100644 --- a/src/localize.rs +++ b/src/localize.rs @@ -43,6 +43,6 @@ pub fn localize() { let requested_languages = i18n_embed::DesktopLanguageRequester::requested_languages(); if let Err(error) = localizer.select(&requested_languages) { - eprintln!("Error while loading language for App List {}", error); + eprintln!("Error while loading language for App List {error}"); } } diff --git a/src/main.rs b/src/main.rs index c0a1fb1..ee7935a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -75,7 +75,7 @@ fn main() -> Result<(), Box> { Ok(fork::Fork::Child) => (), Ok(fork::Fork::Parent(_child_pid)) => process::exit(0), Err(err) => { - eprintln!("failed to daemonize: {:?}", err); + eprintln!("failed to daemonize: {err:?}"); process::exit(1); } } @@ -656,7 +656,7 @@ impl App { hash = short_hash.as_str(), date = date )) - .on_press(Message::LaunchUrl(format!("{}/commits/{}", repository, hash))) + .on_press(Message::LaunchUrl(format!("{repository}/commits/{hash}"))) .padding(0) .into(), ]) @@ -1341,7 +1341,7 @@ impl Application for App { let mut font_size_names = Vec::new(); let mut font_sizes = Vec::new(); for font_size in 4..=32 { - font_size_names.push(format!("{}px", font_size)); + font_size_names.push(format!("{font_size}px")); font_sizes.push(font_size); } @@ -1597,7 +1597,7 @@ impl Application for App { Ok(ok) => ok, Err(err) => { self.color_scheme_errors - .push(format!("Failed to open {:?}: {}", path, err)); + .push(format!("Failed to open {path:?}: {err}")); continue; } }; @@ -1616,7 +1616,7 @@ impl Application for App { } Err(err) => { self.color_scheme_errors - .push(format!("Failed to parse {:?}: {}", path, err)); + .push(format!("Failed to parse {path:?}: {err}")); } } } diff --git a/src/terminal_box.rs b/src/terminal_box.rs index 6b26101..48056c4 100644 --- a/src/terminal_box.rs +++ b/src/terminal_box.rs @@ -698,8 +698,7 @@ where match named { Named::Backspace => { let code = if modifiers.control() { "\x08" } else { "\x7f" }; - terminal - .input_scroll(format!("{}{}", alt_prefix, code).as_bytes().to_vec()); + terminal.input_scroll(format!("{alt_prefix}{code}").as_bytes().to_vec()); status = Status::Captured; } Named::Enter => { @@ -728,8 +727,7 @@ where } Named::Tab => { let code = if modifiers.shift() { "\x1b[Z" } else { "\x09" }; - terminal - .input_scroll(format!("{}{}", alt_prefix, code).as_bytes().to_vec()); + terminal.input_scroll(format!("{alt_prefix}{code}").as_bytes().to_vec()); status = Status::Captured; } _ => {} @@ -1151,10 +1149,10 @@ fn calculate_modifier_number(state: &mut State) -> u8 { #[inline(always)] fn csi(code: &str, suffix: &str, modifiers: u8) -> Option> { if modifiers == 1 { - Some(format!("\x1B[{}{}", code, suffix).as_bytes().to_vec()) + Some(format!("\x1B[{code}{suffix}").as_bytes().to_vec()) } else { Some( - format!("\x1B[{};{}{}", code, modifiers, suffix) + format!("\x1B[{code};{modifiers}{suffix}") .as_bytes() .to_vec(), ) @@ -1164,8 +1162,8 @@ fn csi(code: &str, suffix: &str, modifiers: u8) -> Option> { #[inline(always)] fn ss3(code: &str, modifiers: u8) -> Option> { if modifiers == 1 { - Some(format!("\x1B\x4F{}", code).as_bytes().to_vec()) + Some(format!("\x1B\x4F{code}").as_bytes().to_vec()) } else { - Some(format!("\x1B[1;{}{}", modifiers, code).as_bytes().to_vec()) + Some(format!("\x1B[1;{modifiers}{code}").as_bytes().to_vec()) } } From 011af310d2873b173fe06937a8fd233a8f4d17f3 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Sun, 14 Apr 2024 20:58:19 +0100 Subject: [PATCH 31/54] collapse single match blocks (clippy::single_match, clippy::single_match_else) --- src/main.rs | 103 ++++++++++++++++++++++-------------------------- src/terminal.rs | 18 ++++----- 2 files changed, 57 insertions(+), 64 deletions(-) diff --git a/src/main.rs b/src/main.rs index ee7935a..1ab32de 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2326,31 +2326,28 @@ impl Application for App { } // Extra work to do to prepare context pages - match self.context_page { - ContextPage::ColorSchemes(color_scheme_kind) => { - self.color_scheme_errors.clear(); - self.color_scheme_expanded = None; - self.color_scheme_renaming = None; - self.color_scheme_tab_model = widget::segmented_button::Model::default(); - let dark_entity = self - .color_scheme_tab_model - .insert() - .text(fl!("dark")) - .data(ColorSchemeKind::Dark) - .id(); - let light_entity = self - .color_scheme_tab_model - .insert() - .text(fl!("light")) - .data(ColorSchemeKind::Light) - .id(); - self.color_scheme_tab_model - .activate(match color_scheme_kind { - ColorSchemeKind::Dark => dark_entity, - ColorSchemeKind::Light => light_entity, - }); - } - _ => {} + if let ContextPage::ColorSchemes(color_scheme_kind) = self.context_page { + self.color_scheme_errors.clear(); + self.color_scheme_expanded = None; + self.color_scheme_renaming = None; + self.color_scheme_tab_model = widget::segmented_button::Model::default(); + let dark_entity = self + .color_scheme_tab_model + .insert() + .text(fl!("dark")) + .data(ColorSchemeKind::Dark) + .id(); + let light_entity = self + .color_scheme_tab_model + .insert() + .text(fl!("light")) + .data(ColorSchemeKind::Light) + .id(); + self.color_scheme_tab_model + .activate(match color_scheme_kind { + ColorSchemeKind::Dark => dark_entity, + ColorSchemeKind::Light => light_entity, + }); } self.set_context_title(context_page.title()); @@ -2449,38 +2446,32 @@ impl Application for App { .get(&pane) .cloned() .unwrap_or_else(widget::Id::unique); - match tab_model.data::>(entity) { - Some(terminal) => { - let mut terminal_box = terminal_box(terminal) - .id(terminal_id) - .on_context_menu(move |position_opt| { - Message::TabContextMenu(pane, position_opt) - }) - .opacity(self.config.opacity_ratio()) - .padding(space_xxs); + if let Some(terminal) = tab_model.data::>(entity) { + let mut terminal_box = terminal_box(terminal) + .id(terminal_id) + .on_context_menu(move |position_opt| { + Message::TabContextMenu(pane, position_opt) + }) + .opacity(self.config.opacity_ratio()) + .padding(space_xxs); - 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 - }; - - let tab_element: Element<'_, Message> = match context_menu { - Some(point) => widget::popover(terminal_box.context_menu(point)) - .popup(menu::context_menu(&self.config, &self.key_binds, entity)) - .position(widget::popover::Position::Point(point)) - .into(), - None => terminal_box.into(), - }; - tab_column = tab_column.push(tab_element); - } - None => { - //TODO + 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 + }; + + let tab_element: Element<'_, Message> = match context_menu { + Some(point) => widget::popover(terminal_box.context_menu(point)) + .popup(menu::context_menu(&self.config, &self.key_binds, entity)) + .position(widget::popover::Position::Point(point)) + .into(), + None => terminal_box.into(), + }; + tab_column = tab_column.push(tab_element); } //Only draw find in the currently focused pane @@ -2538,6 +2529,8 @@ impl Application for App { tab_column = tab_column .push(widget::layer_container(find_widget).layer(cosmic_theme::Layer::Primary)); + } else { + // TODO } pane_grid::Content::new(tab_column) diff --git a/src/terminal.rs b/src/terminal.rs index ba72435..b7a5452 100644 --- a/src/terminal.rs +++ b/src/terminal.rs @@ -110,25 +110,25 @@ fn convert_color(colors: &Colors, color: Color) -> cosmic_text::Color { let rgb = match color { Color::Named(named_color) => match colors[named_color] { Some(rgb) => rgb, - None => match named_color { - NamedColor::Background => { + None => { + if named_color == NamedColor::Background { // Allow using an unset background return cosmic_text::Color(WINDOW_BG_COLOR.load(Ordering::SeqCst)); - } - _ => { + } else { log::warn!("missing named color {:?}", named_color); Rgb::default() } - }, + } }, Color::Spec(rgb) => rgb, - Color::Indexed(index) => match colors[index as usize] { - Some(rgb) => rgb, - None => { + Color::Indexed(index) => { + if let Some(rgb) = colors[index as usize] { + rgb + } else { log::warn!("missing indexed color {}", index); Rgb::default() } - }, + } }; cosmic_text::Color::rgb(rgb.r, rgb.g, rgb.b) } From 0811bbe18c53cce6ccb457b4f7904b33ada1c72c Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Sun, 14 Apr 2024 21:00:36 +0100 Subject: [PATCH 32/54] replace 'seach-is_some' with 'any' (clippy::search_is_some) --- src/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index 00c4e65..424859a 100644 --- a/src/config.rs +++ b/src/config.rs @@ -296,7 +296,7 @@ impl Config { let mut name = color_scheme.name.clone(); let mut copies = 1; - while color_scheme_names.iter().find(|x| x.0 == name).is_some() { + while color_scheme_names.iter().any(|x| x.0 == name) { copies += 1; name = format!("{} ({})", color_scheme.name, copies); } @@ -332,7 +332,7 @@ impl Config { let mut name = profile.name.clone(); let mut copies = 1; - while profile_names.iter().find(|x| x.0 == name).is_some() { + while profile_names.iter().any(|x| x.0 == name) { copies += 1; name = format!("{} ({})", profile.name, copies); } From e7e2ac18c8cc47d6943393865d1dffe34fbc0572 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Sun, 14 Apr 2024 21:02:01 +0100 Subject: [PATCH 33/54] remove needless 'return' statements (clippy::needless_return) --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 1ab32de..f490e85 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1260,7 +1260,7 @@ impl App { log::warn!("tried to create new tab before having event channel"); } } - return self.update_title(Some(pane)); + self.update_title(Some(pane)) } } From 4913e084928c7e370a721ea49cb0a9aef3245b85 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Sun, 14 Apr 2024 21:03:05 +0100 Subject: [PATCH 34/54] avoid cloning 'copy' types (clippy::clone_on_copy) --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index f490e85..6a370f1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1524,7 +1524,7 @@ impl Application for App { move |result| { Message::ColorSchemeExportResult( color_scheme_kind, - color_scheme_id.clone(), + color_scheme_id, result, ) }, From 4b7c0ca15a0c33dc7cfef256ed0b7056a792e013 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Sun, 14 Apr 2024 21:06:06 +0100 Subject: [PATCH 35/54] avoid manual 'try' statement (clippy::question_mark) --- src/mouse_reporter.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/mouse_reporter.rs b/src/mouse_reporter.rs index e97075b..cca5dc7 100644 --- a/src/mouse_reporter.rs +++ b/src/mouse_reporter.rs @@ -36,7 +36,7 @@ impl MouseReporter { ) -> Option> { //Buttons are handle slightly different between normal and sgr //for normal/utf8 the button release is always reported as button 3 - let Some(mut button) = (match event { + let mut button = (match event { Event::Mouse(MouseEvent::ButtonPressed(b)) => { self.button = Some(b); self.button_number(b) @@ -64,9 +64,7 @@ impl MouseReporter { .map(|b| b + 32) } _ => None, - }) else { - return None; - }; + })?; if modifiers.shift() { button += 4; @@ -127,7 +125,7 @@ impl MouseReporter { x: u32, y: u32, ) -> Option> { - let Some((button_no, event_code)) = (match event { + let (button_no, event_code) = (match event { Event::Mouse(MouseEvent::ButtonPressed(button)) => { //Button pressed is reported as button 0,1,2 and event code M self.button = Some(button); @@ -151,9 +149,7 @@ impl MouseReporter { .map(|button| (self.button_number(button).map(|b| b + 32), "M")) } _ => None, - }) else { - return None; - }; + })?; if let Some(mut button_no) = button_no { if modifiers.shift() { From d3eb8d5ad0b3d390fab5af0ce3e9667fb976a043 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Sun, 14 Apr 2024 21:08:03 +0100 Subject: [PATCH 36/54] use 'clamp' function (clippy::manual_clamp) --- src/terminal_box.rs | 2 +- src/terminal_theme.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/terminal_box.rs b/src/terminal_box.rs index 48056c4..da6e88b 100644 --- a/src/terminal_box.rs +++ b/src/terminal_box.rs @@ -364,7 +364,7 @@ where if !metadata.flags.is_empty() { let style_line_height = - (self.glyph_font_size / 10.0).max(2.0).min(16.0); + (self.glyph_font_size / 10.0).clamp(2.0, 16.0); let line_color = cosmic_text_to_iced_color(metadata.underline_color); diff --git a/src/terminal_theme.rs b/src/terminal_theme.rs index a2e1b80..8df1dff 100644 --- a/src/terminal_theme.rs +++ b/src/terminal_theme.rs @@ -55,8 +55,8 @@ impl ColorDerive { fn color_adj(rgb: Rgb, saturation_adj: f32, lightness_adj: f32) -> Rgb { let mut okhsl = Self::rgb_to_okhsl(rgb); - okhsl.saturation = (okhsl.saturation + saturation_adj).max(0.0).min(1.0); - okhsl.lightness = (okhsl.lightness + lightness_adj).max(0.0).min(1.0); + okhsl.saturation = (okhsl.saturation + saturation_adj).clamp(0.0, 1.0); + okhsl.lightness = (okhsl.lightness + lightness_adj).clamp(0.0, 1.0); Self::okhsl_to_rgb(okhsl) } From de6f48a9511519b98043f8afd35f6ba345a919da Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Sun, 14 Apr 2024 21:08:14 +0100 Subject: [PATCH 37/54] fixup --- src/terminal_box.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/terminal_box.rs b/src/terminal_box.rs index da6e88b..aec9eec 100644 --- a/src/terminal_box.rs +++ b/src/terminal_box.rs @@ -363,8 +363,7 @@ where } if !metadata.flags.is_empty() { - let style_line_height = - (self.glyph_font_size / 10.0).clamp(2.0, 16.0); + let style_line_height = (self.glyph_font_size / 10.0).clamp(2.0, 16.0); let line_color = cosmic_text_to_iced_color(metadata.underline_color); From 89174c5e0d005bc0582e6deb06269b635f36e5ce Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Sun, 14 Apr 2024 21:09:14 +0100 Subject: [PATCH 38/54] use implicit iter loops (clippy::explicit_iter_loop) --- src/config.rs | 4 ++-- src/main.rs | 6 +++--- src/menu.rs | 2 +- src/terminal_box.rs | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/config.rs b/src/config.rs index 424859a..d6a80e4 100644 --- a/src/config.rs +++ b/src/config.rs @@ -292,7 +292,7 @@ impl Config { let color_schemes = self.color_schemes(color_scheme_kind); let mut color_scheme_names = Vec::<(String, ColorSchemeId)>::with_capacity(color_schemes.len()); - for (color_scheme_id, color_scheme) in color_schemes.iter() { + for (color_scheme_id, color_scheme) in color_schemes { let mut name = color_scheme.name.clone(); let mut copies = 1; @@ -328,7 +328,7 @@ impl Config { // Get a sorted and adjusted for duplicates list of profile names and ids pub fn profile_names(&self) -> Vec<(String, ProfileId)> { let mut profile_names = Vec::<(String, ProfileId)>::with_capacity(self.profiles.len()); - for (profile_id, profile) in self.profiles.iter() { + for (profile_id, profile) in &self.profiles { let mut name = profile.name.clone(); let mut copies = 1; diff --git a/src/main.rs b/src/main.rs index 6a370f1..dc981d8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -746,7 +746,7 @@ impl App { .into(), ); - for error in self.color_scheme_errors.iter() { + for error in &self.color_scheme_errors { sections.push( widget::row::with_children(vec![ icon_cache_get("dialog-error-symbolic", 16) @@ -1592,7 +1592,7 @@ impl Application for App { self.dialog_opt = None; if let DialogResult::Open(paths) = result { self.color_scheme_errors.clear(); - for path in paths.iter() { + for path in &paths { let mut file = match fs::File::open(path) { Ok(ok) => ok, Err(err) => { @@ -1831,7 +1831,7 @@ impl Application for App { config_set!(focus_follow_mouse, focus_follow_mouse); } Message::Key(modifiers, key) => { - for (key_bind, action) in self.key_binds.iter() { + for (key_bind, action) in &self.key_binds { if key_bind.matches(modifiers, &key) { return self.update(action.message(None)); } diff --git a/src/menu.rs b/src/menu.rs index a97dd05..301987c 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -26,7 +26,7 @@ pub fn context_menu<'a>( entity: segmented_button::Entity, ) -> Element<'a, Message> { let find_key = |action: &Action| -> String { - for (key_bind, key_action) in key_binds.iter() { + for (key_bind, key_action) in key_binds { if action == key_action { return key_bind.to_string(); } diff --git a/src/terminal_box.rs b/src/terminal_box.rs index aec9eec..f2f4661 100644 --- a/src/terminal_box.rs +++ b/src/terminal_box.rs @@ -165,7 +165,7 @@ where // Calculate layout lines terminal.with_buffer(|buffer| { let mut layout_lines = 0; - for line in buffer.lines.iter() { + for line in &buffer.lines { match line.layout_opt() { Some(layout) => layout_lines += layout.len(), None => (), @@ -480,7 +480,7 @@ where view_position, metadata_set, }; - for glyph in run.glyphs.iter() { + for glyph in run.glyphs { bg_rect.update(glyph, renderer, state.is_focused); } bg_rect.fill(renderer, state.is_focused); @@ -598,7 +598,7 @@ where modifiers, .. }) if state.is_focused => { - for (key_bind, _) in self.key_binds.iter() { + for (key_bind, _) in &self.key_binds { if key_bind.matches(modifiers, &Key::Named(named)) { return Status::Captured; } @@ -741,7 +741,7 @@ where key, .. }) if state.is_focused => { - for (key_bind, _) in self.key_binds.iter() { + for (key_bind, _) in &self.key_binds { if key_bind.matches(modifiers, &key) { return Status::Captured; } From f8c23b2ef14851e2e14bfcd5007590392d0b6f0a Mon Sep 17 00:00:00 2001 From: "daniel.eades" Date: Mon, 15 Apr 2024 16:29:02 +0100 Subject: [PATCH 39/54] remove needless mut (clippy::needless_pass_by_ref_mut) --- src/terminal_box.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/terminal_box.rs b/src/terminal_box.rs index f2f4661..55dc44e 100644 --- a/src/terminal_box.rs +++ b/src/terminal_box.rs @@ -1128,7 +1128,7 @@ meta 0b100000 (32) caps_lock 0b1000000 (64) num_lock 0b10000000 (128) */ -fn calculate_modifier_number(state: &mut State) -> u8 { +fn calculate_modifier_number(state: &State) -> u8 { let mut mod_no = 0; if state.modifiers.shift() { mod_no |= 1; From e3a0d8c6dd9bc135b1bc7ea7105a052811a72e5b Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Mon, 15 Apr 2024 20:37:44 +0100 Subject: [PATCH 40/54] use dedicated method for iterating over map keys (clippy::for_kv_map) --- src/terminal_box.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/terminal_box.rs b/src/terminal_box.rs index 55dc44e..70cb854 100644 --- a/src/terminal_box.rs +++ b/src/terminal_box.rs @@ -598,7 +598,7 @@ where modifiers, .. }) if state.is_focused => { - for (key_bind, _) in &self.key_binds { + for key_bind in self.key_binds.keys() { if key_bind.matches(modifiers, &Key::Named(named)) { return Status::Captured; } @@ -741,7 +741,7 @@ where key, .. }) if state.is_focused => { - for (key_bind, _) in &self.key_binds { + for key_bind in self.key_binds.keys() { if key_bind.matches(modifiers, &key) { return Status::Captured; } From 76d166b26635d030aff01c633ba415c443389329 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Mon, 15 Apr 2024 20:44:25 +0100 Subject: [PATCH 41/54] prefer lossless conversion to cast (clippy::cast_lossless) --- src/config.rs | 2 +- src/main.rs | 10 +++++----- src/terminal_box.rs | 24 ++++++++++++------------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/config.rs b/src/config.rs index d6a80e4..ffc2a61 100644 --- a/src/config.rs +++ b/src/config.rs @@ -322,7 +322,7 @@ impl Config { } pub fn opacity_ratio(&self) -> f32 { - (self.opacity as f32) / 100.0 + f32::from(self.opacity) / 100.0 } // Get a sorted and adjusted for duplicates list of profile names and ids diff --git a/src/main.rs b/src/main.rs index dc981d8..7662314 100644 --- a/src/main.rs +++ b/src/main.rs @@ -452,9 +452,9 @@ impl App { { let color = Color::from(theme.cosmic().background.base); let bytes = color.into_rgba8(); - let data = (bytes[2] as u32) - | ((bytes[1] as u32) << 8) - | ((bytes[0] as u32) << 16) + let data = u32::from(bytes[2]) + | (u32::from(bytes[1]) << 8) + | (u32::from(bytes[0]) << 16) | 0xFF000000; terminal::WINDOW_BG_COLOR.store(data, Ordering::SeqCst); } @@ -938,8 +938,8 @@ impl App { let padding = Padding { top: 0.0, bottom: 0.0, - left: space_s as f32, - right: space_s as f32, + left: space_s.into(), + right: space_s.into(), }; profiles_section = profiles_section.add(widget::container(expanded_section).padding(padding)) diff --git a/src/terminal_box.rs b/src/terminal_box.rs index 70cb854..f4bcc7e 100644 --- a/src/terminal_box.rs +++ b/src/terminal_box.rs @@ -234,7 +234,7 @@ where let state = tree.state.downcast_ref::(); let cosmic_theme = theme.cosmic(); - let scrollbar_w = cosmic_theme.spacing.space_xxs as f32; + let scrollbar_w = f32::from(cosmic_theme.spacing.space_xxs); let view_position = layout.position() + [self.padding.left, self.padding.top].into(); let view_w = cmp::min(viewport.width as i32, layout.bounds().width as i32) @@ -271,12 +271,12 @@ where ..Default::default() }, Color::new( - background_color.r() as f32 / 255.0, - background_color.g() as f32 / 255.0, - background_color.b() as f32 / 255.0, + f32::from(background_color.r()) / 255.0, + f32::from(background_color.g()) / 255.0, + f32::from(background_color.b()) / 255.0, match self.opacity { Some(opacity) => opacity, - None => background_color.a() as f32 / 255.0, + None => f32::from(background_color.a()) / 255.0, }, ), ); @@ -322,10 +322,10 @@ where ) { let cosmic_text_to_iced_color = |color: cosmic_text::Color| { Color::new( - color.r() as f32 / 255.0, - color.g() as f32 / 255.0, - color.b() as f32 / 255.0, - color.a() as f32 / 255.0, + f32::from(color.r()) / 255.0, + f32::from(color.g()) / 255.0, + f32::from(color.b()) / 255.0, + f32::from(color.a()) / 255.0, ) }; @@ -1050,9 +1050,9 @@ fn shade(color: cosmic_text::Color, is_focused: bool) -> cosmic_text::Color { } else { let shade = 0.92; cosmic_text::Color::rgba( - (color.r() as f32 * shade) as u8, - (color.g() as f32 * shade) as u8, - (color.b() as f32 * shade) as u8, + (f32::from(color.r()) * shade) as u8, + (f32::from(color.g()) * shade) as u8, + (f32::from(color.b()) * shade) as u8, color.a(), ) } From 34cf7bf76a2a0185b532819538982ff32a3f7750 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Mon, 15 Apr 2024 20:47:12 +0100 Subject: [PATCH 42/54] use 'let/else' syntax (clippy::manual_let_else) --- src/main.rs | 5 ++--- src/terminal.rs | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 7662314..5a98350 100644 --- a/src/main.rs +++ b/src/main.rs @@ -789,9 +789,8 @@ impl App { if !self.config.profiles.is_empty() { let mut profiles_section = widget::settings::view_section(""); for (profile_name, profile_id) in self.config.profile_names() { - let profile = match self.config.profiles.get(&profile_id) { - Some(some) => some, - None => continue, + let Some(profile) = self.config.profiles.get(&profile_id) else { + continue; }; let expanded = self.profile_expanded == Some(profile_id); diff --git a/src/terminal.rs b/src/terminal.rs index b7a5452..af004bb 100644 --- a/src/terminal.rs +++ b/src/terminal.rs @@ -437,9 +437,8 @@ impl Terminal { } } - let search_regex = match &mut self.search_regex_opt { - Some(some) => some, - None => return, + let Some(search_regex) = &mut self.search_regex_opt else { + return; }; // Determine search origin From ec5c2a1991554a2ebb951119a52931b140f49931 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Mon, 15 Apr 2024 20:49:03 +0100 Subject: [PATCH 43/54] flip boolean block (clippy::if_not_else) --- src/main.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5a98350..4bb2b78 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1201,10 +1201,10 @@ impl App { hold: profile.hold, env: HashMap::new(), }; - let tab_title_override = if !profile.tab_title.is_empty() { - Some(profile.tab_title.clone()) - } else { + let tab_title_override = if profile.tab_title.is_empty() { None + } else { + Some(profile.tab_title.clone()) }; (options, tab_title_override) } @@ -1455,10 +1455,10 @@ impl Application for App { } fn on_context_drawer(&mut self) -> Command { - if !self.core.window.show_context { - self.update_focus() - } else { + if self.core.window.show_context { Command::none() + } else { + self.update_focus() } } From 9544ba9397f38870bb624f68a95ee2f80771c2ab Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Mon, 15 Apr 2024 20:52:07 +0100 Subject: [PATCH 44/54] remove needless borrows (clippy::needless_borrows_for_generic_args) --- src/main.rs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/main.rs b/src/main.rs index 4bb2b78..e51cbfc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -491,17 +491,14 @@ impl App { fn save_color_schemes(&mut self, color_scheme_kind: ColorSchemeKind) -> Command { // Optimized for just saving color_schemes if let Some(ref config_handler) = self.config_handler { - match config_handler.set( + if let Err(err) = config_handler.set( match color_scheme_kind { ColorSchemeKind::Dark => "color_schemes_dark", ColorSchemeKind::Light => "color_schemes_light", }, - &self.config.color_schemes(color_scheme_kind), + self.config.color_schemes(color_scheme_kind), ) { - Ok(()) => {} - Err(err) => { - log::error!("failed to save config: {}", err); - } + log::error!("failed to save config: {}", err); } } self.update_color_schemes(); @@ -1547,9 +1544,8 @@ impl Application for App { &color_scheme, ron::ser::PrettyConfig::new(), ) { - Ok(ron) => match fs::write(path, &ron) { - Ok(()) => {} - Err(err) => { + Ok(ron) => { + if let Err(err) = fs::write(path, ron) { log::error!( "failed to export {:?} to {:?}: {}", color_scheme_id, @@ -1557,7 +1553,7 @@ impl Application for App { err ); } - }, + } Err(err) => { log::error!( "failed to serialize color scheme {:?}: {}", From cfa00871284597b3b5ce4844c6be873e05898ddb Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Mon, 15 Apr 2024 20:54:27 +0100 Subject: [PATCH 45/54] remove no-op if statement (clippy::needless_if) --- src/main.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index e51cbfc..ab6ae8c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1181,7 +1181,6 @@ impl App { .and_then(|profile_id| self.config.profiles.get(&profile_id)) { Some(profile) => { - if !profile.tab_title.is_empty() {} let mut shell = None; if let Some(mut args) = shlex::split(&profile.command) { if !args.is_empty() { From 1eb1bd4caafb1681f1b15a4d46157b2566a8eb92 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Mon, 15 Apr 2024 21:04:46 +0100 Subject: [PATCH 46/54] minor refactoring --- src/main.rs | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/main.rs b/src/main.rs index ab6ae8c..7c20ba3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1465,15 +1465,10 @@ impl Application for App { ($name: ident, $value: expr) => { match &self.config_handler { Some(config_handler) => { - match paste::paste! { self.config.[](config_handler, $value) } { - Ok(_) => {} - Err(err) => { - log::warn!( - "failed to save config {:?}: {}", - stringify!($name), - err - ); - } + if let Err(err) = + paste::paste! { self.config.[](config_handler, $value) } + { + log::warn!("failed to save config {:?}: {}", stringify!($name), err); } } None => { @@ -1831,12 +1826,11 @@ impl Application for App { } } } - Message::LaunchUrl(url) => match open::that_detached(&url) { - Ok(()) => {} - Err(err) => { + Message::LaunchUrl(url) => { + if let Err(err) = open::that_detached(&url) { log::warn!("failed to open {:?}: {}", url, err); } - }, + } Message::Modifiers(modifiers) => { self.modifiers = modifiers; } From 1b53309d6324b1cb695ca785356a22d3eac32bb0 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Mon, 15 Apr 2024 21:05:30 +0100 Subject: [PATCH 47/54] use 'Self' keyword to refer to own type (clippy::use_self) --- src/main.rs | 72 ++++++++++++++++++++++----------------------- src/terminal_box.rs | 4 +-- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/main.rs b/src/main.rs index 7c20ba3..5225872 100644 --- a/src/main.rs +++ b/src/main.rs @@ -206,43 +206,43 @@ impl MenuAction for Action { fn message(&self, entity_opt: Option) -> Message { match self { - Action::About => Message::ToggleContextPage(ContextPage::About), - Action::ColorSchemes(color_scheme_kind) => { + Self::About => Message::ToggleContextPage(ContextPage::About), + Self::ColorSchemes(color_scheme_kind) => { Message::ToggleContextPage(ContextPage::ColorSchemes(*color_scheme_kind)) } - Action::Copy => Message::Copy(entity_opt), - Action::Find => Message::Find(true), - Action::PaneFocusDown => Message::PaneFocusAdjacent(pane_grid::Direction::Down), - Action::PaneFocusLeft => Message::PaneFocusAdjacent(pane_grid::Direction::Left), - Action::PaneFocusRight => Message::PaneFocusAdjacent(pane_grid::Direction::Right), - Action::PaneFocusUp => Message::PaneFocusAdjacent(pane_grid::Direction::Up), - Action::PaneSplitHorizontal => Message::PaneSplit(pane_grid::Axis::Horizontal), - Action::PaneSplitVertical => Message::PaneSplit(pane_grid::Axis::Vertical), - Action::PaneToggleMaximized => Message::PaneToggleMaximized, - Action::Paste => Message::Paste(entity_opt), - Action::ProfileOpen(profile_id) => Message::ProfileOpen(*profile_id), - Action::Profiles => Message::ToggleContextPage(ContextPage::Profiles), - Action::SelectAll => Message::SelectAll(entity_opt), - Action::Settings => Message::ToggleContextPage(ContextPage::Settings), - Action::ShowHeaderBar(show_headerbar) => Message::ShowHeaderBar(*show_headerbar), - Action::TabActivate0 => Message::TabActivateJump(0), - Action::TabActivate1 => Message::TabActivateJump(1), - Action::TabActivate2 => Message::TabActivateJump(2), - Action::TabActivate3 => Message::TabActivateJump(3), - Action::TabActivate4 => Message::TabActivateJump(4), - Action::TabActivate5 => Message::TabActivateJump(5), - Action::TabActivate6 => Message::TabActivateJump(6), - Action::TabActivate7 => Message::TabActivateJump(7), - Action::TabActivate8 => Message::TabActivateJump(8), - Action::TabClose => Message::TabClose(entity_opt), - Action::TabNew => Message::TabNew, - Action::TabNext => Message::TabNext, - Action::TabPrev => Message::TabPrev, - Action::WindowClose => Message::WindowClose, - Action::WindowNew => Message::WindowNew, - Action::ZoomIn => Message::ZoomIn, - Action::ZoomOut => Message::ZoomOut, - Action::ZoomReset => Message::ZoomReset, + Self::Copy => Message::Copy(entity_opt), + Self::Find => Message::Find(true), + Self::PaneFocusDown => Message::PaneFocusAdjacent(pane_grid::Direction::Down), + Self::PaneFocusLeft => Message::PaneFocusAdjacent(pane_grid::Direction::Left), + Self::PaneFocusRight => Message::PaneFocusAdjacent(pane_grid::Direction::Right), + Self::PaneFocusUp => Message::PaneFocusAdjacent(pane_grid::Direction::Up), + Self::PaneSplitHorizontal => Message::PaneSplit(pane_grid::Axis::Horizontal), + Self::PaneSplitVertical => Message::PaneSplit(pane_grid::Axis::Vertical), + Self::PaneToggleMaximized => Message::PaneToggleMaximized, + Self::Paste => Message::Paste(entity_opt), + Self::ProfileOpen(profile_id) => Message::ProfileOpen(*profile_id), + Self::Profiles => Message::ToggleContextPage(ContextPage::Profiles), + Self::SelectAll => Message::SelectAll(entity_opt), + Self::Settings => Message::ToggleContextPage(ContextPage::Settings), + Self::ShowHeaderBar(show_headerbar) => Message::ShowHeaderBar(*show_headerbar), + Self::TabActivate0 => Message::TabActivateJump(0), + Self::TabActivate1 => Message::TabActivateJump(1), + Self::TabActivate2 => Message::TabActivateJump(2), + Self::TabActivate3 => Message::TabActivateJump(3), + Self::TabActivate4 => Message::TabActivateJump(4), + Self::TabActivate5 => Message::TabActivateJump(5), + Self::TabActivate6 => Message::TabActivateJump(6), + Self::TabActivate7 => Message::TabActivateJump(7), + Self::TabActivate8 => Message::TabActivateJump(8), + Self::TabClose => Message::TabClose(entity_opt), + Self::TabNew => Message::TabNew, + Self::TabNext => Message::TabNext, + Self::TabPrev => Message::TabPrev, + Self::WindowClose => Message::WindowClose, + Self::WindowNew => Message::WindowNew, + Self::ZoomIn => Message::ZoomIn, + Self::ZoomOut => Message::ZoomOut, + Self::ZoomReset => Message::ZoomReset, } } } @@ -1387,7 +1387,7 @@ impl Application for App { let mut terminal_ids = HashMap::new(); terminal_ids.insert(pane_model.focus, widget::Id::unique()); - let mut app = App { + let mut app = Self { core, pane_model, config_handler: flags.config_handler, diff --git a/src/terminal_box.rs b/src/terminal_box.rs index f4bcc7e..8e1703c 100644 --- a/src/terminal_box.rs +++ b/src/terminal_box.rs @@ -1092,8 +1092,8 @@ pub struct State { impl State { /// Creates a new [`State`]. - pub fn new() -> State { - State { + pub fn new() -> Self { + Self { modifiers: Modifiers::empty(), click: None, dragging: None, From 5f0a0ba7260cd196e170bdefa970536e113a1c99 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Mon, 15 Apr 2024 21:10:32 +0100 Subject: [PATCH 48/54] remove unused 'self' (clippy::unused_self) --- src/mouse_reporter.rs | 16 ++++++---------- src/terminal.rs | 4 ++-- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/mouse_reporter.rs b/src/mouse_reporter.rs index cca5dc7..40ec38f 100644 --- a/src/mouse_reporter.rs +++ b/src/mouse_reporter.rs @@ -15,7 +15,7 @@ pub struct MouseReporter { } impl MouseReporter { - fn button_number(&self, button: Button) -> Option { + fn button_number(button: Button) -> Option { match button { Button::Left => Some(0), Button::Middle => Some(1), @@ -39,7 +39,7 @@ impl MouseReporter { let mut button = (match event { Event::Mouse(MouseEvent::ButtonPressed(b)) => { self.button = Some(b); - self.button_number(b) + Self::button_number(b) } Event::Mouse(MouseEvent::ButtonReleased(_b)) => { self.button = None; @@ -59,9 +59,7 @@ impl MouseReporter { //character, Cb). //For example, motion into cell x,y with button 1 down is reported as //CSI M @ CxCy ( @ = 32 + 0 (button 1) + 32 (motion indicator) ). - self.button - .and_then(|button| self.button_number(button)) - .map(|b| b + 32) + self.button.and_then(Self::button_number).map(|b| b + 32) } _ => None, })?; @@ -129,12 +127,12 @@ impl MouseReporter { Event::Mouse(MouseEvent::ButtonPressed(button)) => { //Button pressed is reported as button 0,1,2 and event code M self.button = Some(button); - Some((self.button_number(button), "M")) + Some((Self::button_number(button), "M")) } Event::Mouse(MouseEvent::ButtonReleased(button)) => { //Button pressed is reported as button 0,1,2 and event code m self.button = None; - Some((self.button_number(button), "m")) + Some((Self::button_number(button), "m")) } Event::Mouse(MouseEvent::CursorMoved { .. }) => { //Button pressed is reported as button 32 + 0,1,2 and event code M @@ -146,7 +144,7 @@ impl MouseReporter { self.last_movment_y = Some(y); } self.button - .map(|button| (self.button_number(button).map(|b| b + 32), "M")) + .map(|button| (Self::button_number(button).map(|b| b + 32), "M")) } _ => None, })?; @@ -170,7 +168,6 @@ impl MouseReporter { #[allow(clippy::too_many_arguments)] pub fn report_sgr_mouse_wheel_scroll( - &self, terminal: &Terminal, term_cell_width: f32, term_cell_height: f32, @@ -213,7 +210,6 @@ impl MouseReporter { //Emulate mouse wheel scroll with up/down arrows. Using mouse spec uses //scroll-back and scroll-forw actions, which moves whole windows like page up/page down. pub fn report_mouse_wheel_as_arrows( - &self, terminal: &Terminal, term_cell_width: f32, term_cell_height: f32, diff --git a/src/terminal.rs b/src/terminal.rs index af004bb..fb6c6a0 100644 --- a/src/terminal.rs +++ b/src/terminal.rs @@ -855,7 +855,7 @@ impl Terminal { let term_lock = self.term.lock(); let mode = term_lock.mode(); if mode.contains(TermMode::SGR_MOUSE) { - self.mouse_reporter.report_sgr_mouse_wheel_scroll( + MouseReporter::report_sgr_mouse_wheel_scroll( self, self.size().cell_width, self.size().cell_height, @@ -865,7 +865,7 @@ impl Terminal { y, ); } else { - self.mouse_reporter.report_mouse_wheel_as_arrows( + MouseReporter::report_mouse_wheel_as_arrows( self, self.size().cell_width, self.size().cell_height, From 3ccfa4509d0f3bb2e9f133b9f394876728084a98 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Mon, 15 Apr 2024 21:15:30 +0100 Subject: [PATCH 49/54] minor refactoring --- src/terminal_box.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/terminal_box.rs b/src/terminal_box.rs index 8e1703c..60e849c 100644 --- a/src/terminal_box.rs +++ b/src/terminal_box.rs @@ -166,9 +166,8 @@ where terminal.with_buffer(|buffer| { let mut layout_lines = 0; for line in &buffer.lines { - match line.layout_opt() { - Some(layout) => layout_lines += layout.len(), - None => (), + if let Some(layout) = line.layout_opt() { + layout_lines += layout.len() } } From f720e637930e8702d89e37de0a2af20b9746024b Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 26 Apr 2024 10:24:07 -0600 Subject: [PATCH 50/54] Update libcosmic --- Cargo.lock | 780 ++++++++++++++++++++++++++++++---------------------- src/main.rs | 5 +- src/menu.rs | 4 +- 3 files changed, 461 insertions(+), 328 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 549e586..6fa5a5c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "ab_glyph" -version = "0.2.23" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80179d7dd5d7e8c285d67c4a1e652972a92de7475beddfb92028c76463b13225" +checksum = "6f90148830dac590fac7ccfe78ec4a8ea404c60f75a24e16407a71f0f40de775" dependencies = [ "ab_glyph_rasterizer", "owned_ttf_parser", @@ -38,8 +38,8 @@ source = "git+https://github.com/wash2/accesskit.git?branch=winit-0.29#5f9b61c82 dependencies = [ "accesskit", "accesskit_consumer", - "icrate 0.1.0", - "objc2 0.5.0", + "icrate 0.1.2", + "objc2 0.5.1", "once_cell", ] @@ -83,7 +83,7 @@ dependencies = [ "accesskit_macos", "accesskit_unix", "accesskit_windows", - "raw-window-handle 0.6.0", + "raw-window-handle 0.6.1", "winit", ] @@ -117,9 +117,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -131,12 +131,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6d1ea4484c8676f295307a4892d478c70ac8da1dbd8c7c10830a504b7f1022f" dependencies = [ "base64 0.22.0", - "bitflags 2.4.2", + "bitflags 2.5.0", "home", "libc", "log", "miow", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "piper", "polling 3.4.0", "regex-automata", @@ -156,9 +156,9 @@ checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" [[package]] name = "allocator-api2" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "almost" @@ -173,7 +173,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee91c0c2905bae44f84bfa4e044536541df26b7703fd0888deeb9060fcc44289" dependencies = [ "android-properties", - "bitflags 2.4.2", + "bitflags 2.5.0", "cc", "cesu8", "jni", @@ -264,9 +264,9 @@ checksum = "70033777eb8b5124a81a1889416543dddef2de240019b674c81285a2635a7e1e" [[package]] name = "anyhow" -version = "1.0.81" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" [[package]] name = "apply" @@ -285,9 +285,9 @@ dependencies = [ [[package]] name = "arc-swap" -version = "1.7.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b3d0060af21e8d11a926981cc00c6c1541aa91dd64b9f881985c3da1094425f" +checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" [[package]] name = "arrayref" @@ -369,27 +369,26 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" +checksum = "136d4d23bcc79e27423727b36823d86233aad06dfea531837b038394d11e9928" dependencies = [ "concurrent-queue", - "event-listener 5.2.0", - "event-listener-strategy 0.5.0", + "event-listener 5.3.0", + "event-listener-strategy 0.5.1", "futures-core", "pin-project-lite", ] [[package]] name = "async-executor" -version = "1.8.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" +checksum = "b10202063978b3351199d68f8b22c4e47e4b1b822f8d43fd862d5ea8c006b29a" dependencies = [ - "async-lock 3.3.0", "async-task", "concurrent-queue", - "fastrand 2.0.1", + "fastrand 2.0.2", "futures-lite 2.3.0", "slab", ] @@ -484,23 +483,23 @@ dependencies = [ [[package]] name = "async-recursion" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30c5ef0ede93efbf733c1a727f3b6b5a1060bbedd5600183e66f6e4be4af0ec5" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] name = "async-signal" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +checksum = "afe66191c335039c7bb78f99dc7520b0cbb166b3a1cb33a03f53d8a1c6f2afda" dependencies = [ "async-io 2.3.2", - "async-lock 2.8.0", + "async-lock 3.3.0", "atomic-waker", "cfg-if", "futures-core", @@ -508,7 +507,7 @@ dependencies = [ "rustix 0.38.28", "signal-hook-registry", "slab", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -519,13 +518,13 @@ checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" -version = "0.1.78" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -606,15 +605,15 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", @@ -666,9 +665,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" dependencies = [ "serde", ] @@ -714,7 +713,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e58aa60e59d8dbfcc36138f5f18be5f24394d33b38b24f7fd0b1caa33095f22f" dependencies = [ "block-sys", - "objc2 0.5.0", + "objc2 0.5.1", ] [[package]] @@ -726,7 +725,7 @@ dependencies = [ "async-channel", "async-lock 3.3.0", "async-task", - "fastrand 2.0.1", + "fastrand 2.0.2", "futures-io", "futures-lite 2.3.0", "piper", @@ -735,9 +734,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.4" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" @@ -756,7 +755,7 @@ checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -767,9 +766,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "cairo-sys-rs" @@ -787,7 +786,21 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", + "log", + "polling 3.4.0", + "rustix 0.38.28", + "slab", + "thiserror", +] + +[[package]] +name = "calloop" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" +dependencies = [ + "bitflags 2.5.0", "log", "polling 3.4.0", "rustix 0.38.28", @@ -801,7 +814,19 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" dependencies = [ - "calloop", + "calloop 0.12.4", + "rustix 0.38.28", + "wayland-backend", + "wayland-client", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" +dependencies = [ + "calloop 0.13.0", "rustix 0.38.28", "wayland-backend", "wayland-client", @@ -809,12 +834,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.90" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" dependencies = [ "jobserver", "libc", + "once_cell", ] [[package]] @@ -825,9 +851,9 @@ checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" [[package]] name = "cfg-expr" -version = "0.15.7" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa50868b64a9a6fda9d593ce778849ea8715cd2a3d2cc17ffdb4a2f2f2f1961d" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" dependencies = [ "smallvec", "target-lexicon", @@ -853,9 +879,9 @@ checksum = "77e53693616d3075149f4ead59bdeecd204ac6b8192d8969757601b74bddf00f" [[package]] name = "chrono" -version = "0.4.35" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", @@ -863,14 +889,14 @@ dependencies = [ "num-traits", "pure-rust-locales", "wasm-bindgen", - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] name = "clipboard-win" -version = "5.3.0" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d517d4b86184dbb111d3556a10f1c8a04da7428d2987bf1081602bf11c3aa9ee" +checksum = "79f4473f5144e20d9aceaf2972478f06ddf687831eafeeb434fbaf0acc4144ad" dependencies = [ "error-code", ] @@ -878,7 +904,7 @@ dependencies = [ [[package]] name = "clipboard_macos" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#f65a6c303bbbd6c7bf88f9bc34421ec06d893bea" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-4#6ca3cc3d4c221d34a4c385957bd3fd8be9ad48e5" dependencies = [ "objc", "objc-foundation", @@ -888,8 +914,9 @@ dependencies = [ [[package]] name = "clipboard_wayland" version = "0.2.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#f65a6c303bbbd6c7bf88f9bc34421ec06d893bea" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-4#6ca3cc3d4c221d34a4c385957bd3fd8be9ad48e5" dependencies = [ + "dnd", "mime 0.1.0", "smithay-clipboard", ] @@ -897,7 +924,7 @@ dependencies = [ [[package]] name = "clipboard_x11" version = "0.4.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#f65a6c303bbbd6c7bf88f9bc34421ec06d893bea" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-4#6ca3cc3d4c221d34a4c385957bd3fd8be9ad48e5" dependencies = [ "thiserror", "x11rb", @@ -988,9 +1015,9 @@ dependencies = [ [[package]] name = "combine" -version = "4.6.6" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" dependencies = [ "bytes", "memchr", @@ -998,9 +1025,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] @@ -1043,9 +1070,9 @@ checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core-graphics" -version = "0.23.1" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970a29baf4110c26fedbc7f82107d42c23f7e88e404c4577ed73fe99ff85a212" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -1068,7 +1095,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" +source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1085,7 +1112,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" +source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" dependencies = [ "quote", "syn 1.0.109", @@ -1094,12 +1121,13 @@ dependencies = [ [[package]] name = "cosmic-files" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-files.git#33621a68d0293379a71ae5f01c99be8136a52829" +source = "git+https://github.com/pop-os/cosmic-files.git#49f130b8403a7c7b333691a8cfe30204c0ba3be3" dependencies = [ "chrono", "dirs", "env_logger 0.11.3", "fork", + "fs_extra", "i18n-embed", "i18n-embed-fl", "image", @@ -1108,16 +1136,18 @@ dependencies = [ "libcosmic", "log", "mime_guess", - "notify", + "notify-debouncer-full", "once_cell", "open", "paste", "rust-embed", "serde", "shlex", + "slotmap", "smol_str", "tokio", "trash", + "url", "vergen", "xdg-mime", ] @@ -1154,9 +1184,9 @@ dependencies = [ [[package]] name = "cosmic-text" version = "0.11.2" -source = "git+https://github.com/pop-os/cosmic-text.git#b08676909f882f553ab574601b35b58276a52458" +source = "git+https://github.com/pop-os/cosmic-text.git#ff5501d9a36e51c50d908413caf7632d8f7533b7" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "fontdb", "libm", "log", @@ -1176,7 +1206,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" +source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" dependencies = [ "almost", "cosmic-config", @@ -1275,12 +1305,12 @@ dependencies = [ [[package]] name = "ctor" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad291aa74992b9b7a7e88c38acbbf6ad7e107f1d90ee8775b7bc1fc3394f485c" +checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" dependencies = [ "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -1294,7 +1324,7 @@ name = "d3d12" version = "0.19.0" source = "git+https://github.com/gfx-rs/wgpu?rev=20fda69#20fda698341efbdc870b8027d6d49f5bf3f36109" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "libloading 0.8.3", "winapi", ] @@ -1320,7 +1350,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -1331,7 +1361,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -1344,7 +1374,7 @@ dependencies = [ "hashbrown", "lock_api", "once_cell", - "parking_lot_core 0.9.9", + "parking_lot_core 0.9.10", ] [[package]] @@ -1382,7 +1412,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -1451,7 +1481,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -1472,11 +1502,23 @@ dependencies = [ "const-random", ] +[[package]] +name = "dnd" +version = "0.1.0" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-4#6ca3cc3d4c221d34a4c385957bd3fd8be9ad48e5" +dependencies = [ + "bitflags 2.5.0", + "mime 0.1.0", + "raw-window-handle 0.6.1", + "smithay-client-toolkit 0.18.0", + "smithay-clipboard", +] + [[package]] name = "downcast-rs" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "drm" @@ -1484,7 +1526,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0f8a69e60d75ae7dab4ef26a59ca99f2a89d4c142089b537775ae0c198bdcde" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "bytemuck", "drm-ffi", "drm-fourcc", @@ -1519,9 +1561,9 @@ dependencies = [ [[package]] name = "either" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" [[package]] name = "enumflags2" @@ -1541,7 +1583,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -1651,9 +1693,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" +checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24" dependencies = [ "concurrent-queue", "parking", @@ -1672,11 +1714,11 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" +checksum = "332f51cb23d20b0de8458b86580878211da09bcd4503cb579c225b3d124cabb3" dependencies = [ - "event-listener 5.2.0", + "event-listener 5.3.0", "pin-project-lite", ] @@ -1713,9 +1755,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" [[package]] name = "fdeflate" @@ -1726,6 +1768,15 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "file-id" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6584280525fb2059cba3db2c04abf947a1a29a45ddae89f3870f8281704fafc9" +dependencies = [ + "windows-sys 0.48.0", +] + [[package]] name = "filetime" version = "0.2.23" @@ -1749,9 +1800,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "4556222738635b7a3417ae6130d8f52201e45a0c4d1a907f0826383adb5f85e7" dependencies = [ "crc32fast", "miniz_oxide", @@ -1830,9 +1881,12 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "font-types" -version = "0.4.3" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b7f6040d337bd44434ab21fc6509154edf2cece88b23758d9d64654c4e7730b" +checksum = "bd6784a76a9c2b136ea3b8462391e9328252e938eb706eb44d752723b4c3a533" +dependencies = [ + "bytemuck", +] [[package]] name = "fontconfig-parser" @@ -1875,7 +1929,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -1925,6 +1979,12 @@ dependencies = [ "xdg", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "fsevent-sys" version = "4.1.0" @@ -2004,7 +2064,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 2.0.1", + "fastrand 2.0.2", "futures-core", "futures-io", "parking", @@ -2019,7 +2079,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -2104,9 +2164,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" dependencies = [ "cfg-if", "libc", @@ -2234,7 +2294,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "gpu-alloc-types", ] @@ -2244,7 +2304,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", ] [[package]] @@ -2266,7 +2326,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "gpu-descriptor-types", "hashbrown", ] @@ -2277,7 +2337,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", ] [[package]] @@ -2316,9 +2376,9 @@ dependencies = [ [[package]] name = "half" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5eceaaeec696539ddaf7b333340f1af35a5aa87ae3e4f3ead0532f72affab2e" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ "cfg-if", "crunchy", @@ -2340,7 +2400,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "com", "libc", "libloading 0.8.3", @@ -2355,6 +2415,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.3.9" @@ -2428,7 +2494,7 @@ dependencies = [ "lazy_static", "locale_config", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "rust-embed", "thiserror", "unic-langid", @@ -2452,7 +2518,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.53", + "syn 2.0.60", "unic-langid", ] @@ -2466,7 +2532,7 @@ dependencies = [ "i18n-config", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -2495,8 +2561,9 @@ dependencies = [ [[package]] name = "iced" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" +source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" dependencies = [ + "dnd", "iced_accessibility", "iced_core", "iced_futures", @@ -2504,6 +2571,7 @@ dependencies = [ "iced_widget", "iced_winit", "image", + "mime 0.1.0", "thiserror", "window_clipboard", ] @@ -2511,7 +2579,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" +source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" dependencies = [ "accesskit", "accesskit_winit", @@ -2520,13 +2588,15 @@ dependencies = [ [[package]] name = "iced_core" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" +source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.5.0", + "dnd", "log", + "mime 0.1.0", "num-traits", "palette", - "raw-window-handle 0.6.0", + "raw-window-handle 0.6.1", "serde", "smol_str", "thiserror", @@ -2538,7 +2608,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" +source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" dependencies = [ "futures", "iced_core", @@ -2551,9 +2621,9 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" +source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.5.0", "bytemuck", "cosmic-text", "glam", @@ -2565,7 +2635,7 @@ dependencies = [ "log", "lyon_path", "once_cell", - "raw-window-handle 0.6.0", + "raw-window-handle 0.6.1", "rustc-hash", "thiserror", "unicode-segmentation", @@ -2575,7 +2645,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" +source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2587,8 +2657,9 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" +source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" dependencies = [ + "dnd", "iced_core", "iced_futures", "thiserror", @@ -2598,7 +2669,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" +source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" dependencies = [ "iced_core", "once_cell", @@ -2608,7 +2679,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" +source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" dependencies = [ "bytemuck", "cosmic-text", @@ -2625,9 +2696,9 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" +source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.5.0", "bytemuck", "futures", "glam", @@ -2644,8 +2715,9 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" +source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" dependencies = [ + "dnd", "iced_renderer", "iced_runtime", "iced_style", @@ -2653,13 +2725,15 @@ dependencies = [ "ouroboros", "thiserror", "unicode-segmentation", + "window_clipboard", ] [[package]] name = "iced_winit" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#01d7e46feadccf70825c3a822a566fb266d3add6" +source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" dependencies = [ + "dnd", "iced_graphics", "iced_runtime", "iced_style", @@ -2685,12 +2759,12 @@ dependencies = [ [[package]] name = "icrate" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e286f4b975ac6c054971a0600a9b76438b332edace54bff79c71c9d3adfc9772" +checksum = "3fb69199826926eb864697bddd27f73d9fddcffc004f5733131e15b465e30642" dependencies = [ "block2 0.4.0", - "objc2 0.5.0", + "objc2 0.5.1", ] [[package]] @@ -2735,9 +2809,9 @@ checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" [[package]] name = "indexmap" -version = "2.2.5" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown", @@ -2834,9 +2908,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jni" @@ -2862,9 +2936,9 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "jobserver" -version = "0.1.28" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" dependencies = [ "libc", ] @@ -2993,7 +3067,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#01d7e46feadccf70825c3a822a566fb266d3add6" +source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" dependencies = [ "apply", "ashpd 0.7.0", @@ -3044,7 +3118,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -3055,24 +3129,23 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libredox" -version = "0.0.1" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "libc", "redox_syscall 0.4.1", ] [[package]] name = "libredox" -version = "0.0.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "libc", - "redox_syscall 0.4.1", ] [[package]] @@ -3108,9 +3181,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -3174,9 +3247,9 @@ dependencies = [ [[package]] name = "lyon_tessellation" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c7c67b5bc8123b352b2e7e742b47d1f236a13fe77619433be9568fbd888e9c0" +checksum = "4470bd0b1f29eda66068ab1fd47719facda0a136b829bcca69287ed0ac40a134" dependencies = [ "float_next_after", "lyon_path", @@ -3194,9 +3267,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "memmap2" @@ -3218,9 +3291,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" dependencies = [ "autocfg", ] @@ -3231,7 +3304,7 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "block", "core-graphics-types", "foreign-types", @@ -3243,7 +3316,7 @@ dependencies = [ [[package]] name = "mime" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#f65a6c303bbbd6c7bf88f9bc34421ec06d893bea" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-4#6ca3cc3d4c221d34a4c385957bd3fd8be9ad48e5" dependencies = [ "smithay-clipboard", ] @@ -3308,7 +3381,7 @@ source = "git+https://github.com/gfx-rs/wgpu?rev=20fda69#20fda698341efbdc870b802 dependencies = [ "arrayvec 0.7.4", "bit-set", - "bitflags 2.4.2", + "bitflags 2.5.0", "codespan-reporting", "hexf-parse", "indexmap", @@ -3327,12 +3400,12 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "jni-sys", "log", "ndk-sys", "num_enum", - "raw-window-handle 0.6.0", + "raw-window-handle 0.6.1", "thiserror", ] @@ -3380,7 +3453,7 @@ version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "crossbeam-channel", "filetime", "fsevent-sys", @@ -3394,10 +3467,24 @@ dependencies = [ ] [[package]] -name = "num" -version = "0.4.1" +name = "notify-debouncer-full" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" +checksum = "49f5dab59c348b9b50cf7f261960a20e389feb2713636399cd9082cd4b536154" +dependencies = [ + "crossbeam-channel", + "file-id", + "log", + "notify", + "parking_lot 0.12.2", + "walkdir", +] + +[[package]] +name = "num" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" dependencies = [ "num-bigint", "num-complex", @@ -3503,7 +3590,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -3538,9 +3625,9 @@ dependencies = [ [[package]] name = "objc-sys" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c71324e4180d0899963fc83d9d241ac39e699609fc1025a850aadac8257459" +checksum = "da284c198fb9b7b0603f8635185e85fbd5b64ee154b1ed406d489077de2d6d60" [[package]] name = "objc2" @@ -3554,12 +3641,12 @@ dependencies = [ [[package]] name = "objc2" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a9c7f0d511a4ce26b078183179dca908171cfc69f88986fe36c5138e1834476" +checksum = "b4b25e1034d0e636cd84707ccdaa9f81243d399196b8a773946dcffec0401659" dependencies = [ "objc-sys", - "objc2-encode 4.0.0", + "objc2-encode 4.0.1", ] [[package]] @@ -3570,9 +3657,9 @@ checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" [[package]] name = "objc2-encode" -version = "4.0.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ff06a6505cde0766484f38d8479ac8e6d31c66fbc2d5492f65ca8c091456379" +checksum = "88658da63e4cc2c8adb1262902cd6af51094df0488b760d6fd27194269c0950a" [[package]] name = "objc_exception" @@ -3635,9 +3722,9 @@ dependencies = [ [[package]] name = "ordered-multimap" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4d6a8c22fc714f0c2373e6091bf6f5e9b37b1bc0b1184874b7e0a4e303d318f" +checksum = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79" dependencies = [ "dlv-list", "hashbrown", @@ -3670,11 +3757,11 @@ version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec4c6225c69b4ca778c0aea097321a64c421cf4577b331c61b229267edabb6f8" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -3707,7 +3794,7 @@ checksum = "e8890702dbec0bad9116041ae586f84805b13eecd1d8b1df27c29998a9969d6d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -3741,12 +3828,12 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" dependencies = [ "lock_api", - "parking_lot_core 0.9.9", + "parking_lot_core 0.9.10", ] [[package]] @@ -3765,15 +3852,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", + "redox_syscall 0.5.1", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.5", ] [[package]] @@ -3824,7 +3911,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -3844,9 +3931,9 @@ checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -3861,7 +3948,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" dependencies = [ "atomic-waker", - "fastrand 2.0.1", + "fastrand 2.0.2", "futures-io", ] @@ -3977,9 +4064,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] @@ -4016,9 +4103,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -4073,15 +4160,15 @@ checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" [[package]] name = "raw-window-handle" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42a9830a0e1b9fb145ebb365b8bc4ccd75f290f98c0247deafbbe2c75cefb544" +checksum = "8cc3bcbdb1ddfc11e700e62968e6b4cc9c75bb466464ad28fb61c5b2c964418b" [[package]] name = "rayon" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -4105,10 +4192,11 @@ checksum = "3b42e27ef78c35d3998403c1d26f3efd9e135d3e5121b0a4845cc5cc27547f4f" [[package]] name = "read-fonts" -version = "0.16.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81c524658d3b77930a391f559756d91dbe829ab6cf4687083f615d395df99722" +checksum = "ea75b5ec052843434d263ef7a4c31cf86db5908c729694afb1ad3c884252a1b6" dependencies = [ + "bytemuck", "font-types", ] @@ -4140,21 +4228,30 @@ dependencies = [ ] [[package]] -name = "redox_users" -version = "0.4.4" +name = "redox_syscall" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +dependencies = [ + "bitflags 2.5.0", +] + +[[package]] +name = "redox_users" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ "getrandom", - "libredox 0.0.1", + "libredox 0.1.3", "thiserror", ] [[package]] name = "regex" -version = "1.10.3" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", @@ -4175,9 +4272,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "renderdoc-sys" @@ -4242,7 +4339,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ "base64 0.21.7", - "bitflags 2.4.2", + "bitflags 2.5.0", "serde", "serde_derive", ] @@ -4273,7 +4370,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.53", + "syn 2.0.60", "walkdir", ] @@ -4329,7 +4426,7 @@ version = "0.38.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "errno", "itoa", "libc", @@ -4350,9 +4447,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" [[package]] name = "rustybuzz" @@ -4360,7 +4457,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0ae5692c5beaad6a9e22830deeed7874eae8a4e3ba4076fb48e12c56856222c" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "bytemuck", "libm", "smallvec", @@ -4407,7 +4504,7 @@ dependencies = [ "ab_glyph", "log", "memmap2", - "smithay-client-toolkit", + "smithay-client-toolkit 0.18.1", "tiny-skia", ] @@ -4428,33 +4525,33 @@ checksum = "58bf37232d3bb9a2c4e641ca2a11d83b5062066f88df7fed36c28772046d65ba" [[package]] name = "serde" -version = "1.0.197" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] name = "serde_repr" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -4506,9 +4603,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -4554,9 +4651,33 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "smithay-client-toolkit" +version = "0.18.0" +source = "git+https://github.com/smithay/client-toolkit?rev=3bed072#3bed072b966022f5f929d12f3aff089b1ace980b" +dependencies = [ + "bitflags 2.5.0", + "calloop 0.13.0", + "calloop-wayland-source 0.3.0", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix 0.38.28", + "thiserror", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] [[package]] name = "smithay-client-toolkit" @@ -4564,9 +4685,9 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "922fd3eeab3bd820d76537ce8f582b1cf951eceb5475c28500c7457d9d17f53a" dependencies = [ - "bitflags 2.4.2", - "calloop", - "calloop-wayland-source", + "bitflags 2.5.0", + "calloop 0.12.4", + "calloop-wayland-source 0.2.0", "cursor-icon", "libc", "log", @@ -4586,10 +4707,11 @@ dependencies = [ [[package]] name = "smithay-clipboard" version = "0.8.0" -source = "git+https://github.com/pop-os/smithay-clipboard?tag=pop-mime-types#cc0101c1f9ccc937a413bd3af3c0f6217f27e935" +source = "git+https://github.com/pop-os/smithay-clipboard?tag=pop-dnd-3#2f2430bec35f0adb9cb93e85e648ff8449d44dad" dependencies = [ "libc", - "smithay-client-toolkit", + "raw-window-handle 0.6.1", + "smithay-client-toolkit 0.18.0", "wayland-backend", ] @@ -4633,13 +4755,13 @@ dependencies = [ "cocoa", "core-graphics", "drm", - "fastrand 2.0.1", + "fastrand 2.0.2", "foreign-types", "js-sys", "log", "memmap2", "objc", - "raw-window-handle 0.6.0", + "raw-window-handle 0.6.1", "redox_syscall 0.4.1", "rustix 0.38.28", "tiny-xlib", @@ -4667,7 +4789,7 @@ version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", ] [[package]] @@ -4709,9 +4831,9 @@ dependencies = [ [[package]] name = "swash" -version = "0.1.13" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9af636fb90d39858650cae1088a37e2862dab4e874a0bb49d6dfb5b2dacf0e24" +checksum = "06ec889a8e0a6fcb91041996c8f1f6be0fe1a09e94478785e07c32ce2bca2d2b" dependencies = [ "read-fonts", "yazi", @@ -4731,9 +4853,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.53" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", @@ -4751,12 +4873,12 @@ dependencies = [ [[package]] name = "system-deps" -version = "6.2.1" +version = "6.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8e9199467bcbc77c6a13cc6e32a6af21721ab8c96aa0261856c4fda5a4433f0" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" dependencies = [ "cfg-expr", - "heck", + "heck 0.5.0", "pkg-config", "toml 0.8.12", "version-compare", @@ -4786,7 +4908,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" dependencies = [ "cfg-if", - "fastrand 2.0.1", + "fastrand 2.0.2", "redox_syscall 0.4.1", "rustix 0.38.28", "windows-sys 0.52.0", @@ -4803,22 +4925,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -4834,9 +4956,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.34" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", @@ -4857,9 +4979,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", @@ -4938,9 +5060,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ "backtrace", "bytes", @@ -4972,7 +5094,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.8", + "toml_edit 0.22.12", ] [[package]] @@ -5008,15 +5130,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.8" +version = "0.22.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c12219811e0c1ba077867254e5ad62ee2c9c190b0d957110750ac0cda1ae96cd" +checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.5", + "winnow 0.6.7", ] [[package]] @@ -5038,7 +5160,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -5052,9 +5174,9 @@ dependencies = [ [[package]] name = "trash" -version = "3.3.1" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c658458d46d9d5a153a3b5cdd88d8579ad50d4fb85d53961e4526c8fc7c55a57" +checksum = "6a1a7a9a17d3b004898be42be29a4c18d5a4cf008b5cdf72d69b1945dfcb158a" dependencies = [ "chrono", "libc", @@ -5093,7 +5215,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" dependencies = [ - "memoffset 0.9.0", + "memoffset 0.9.1", "tempfile", "winapi", ] @@ -5294,9 +5416,9 @@ dependencies = [ [[package]] name = "version-compare" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579a42fc0b8e0c63b76519a339be31bed574929511fa53c1a3acae26eb258f29" +checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" [[package]] name = "version_check" @@ -5310,7 +5432,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40eb22ae96f050e0c0d6f7ce43feeae26c348fc4dea56928ca81537cfaa6188b" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cursor-icon", "log", "serde", @@ -5371,7 +5493,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", "wasm-bindgen-shared", ] @@ -5405,7 +5527,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5451,7 +5573,7 @@ version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82fb96ee935c2cea6668ccb470fb7771f6215d1691746c2d896b447a00ad3f1f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "rustix 0.38.28", "wayland-backend", "wayland-scanner", @@ -5463,7 +5585,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cursor-icon", "wayland-backend", ] @@ -5485,7 +5607,7 @@ version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "wayland-backend", "wayland-client", "wayland-scanner", @@ -5497,7 +5619,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -5510,7 +5632,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -5577,9 +5699,9 @@ dependencies = [ "js-sys", "log", "naga", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "profiling", - "raw-window-handle 0.6.0", + "raw-window-handle 0.6.1", "smallvec", "static_assertions", "wasm-bindgen", @@ -5597,16 +5719,16 @@ source = "git+https://github.com/gfx-rs/wgpu?rev=20fda69#20fda698341efbdc870b802 dependencies = [ "arrayvec 0.7.4", "bit-vec", - "bitflags 2.4.2", + "bitflags 2.5.0", "cfg_aliases 0.1.1", "codespan-reporting", "indexmap", "log", "naga", "once_cell", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "profiling", - "raw-window-handle 0.6.0", + "raw-window-handle 0.6.1", "rustc-hash", "smallvec", "thiserror", @@ -5624,7 +5746,7 @@ dependencies = [ "arrayvec 0.7.4", "ash", "bit-set", - "bitflags 2.4.2", + "bitflags 2.5.0", "block", "cfg_aliases 0.1.1", "core-graphics-types", @@ -5644,10 +5766,10 @@ dependencies = [ "naga", "objc", "once_cell", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "profiling", "range-alloc", - "raw-window-handle 0.6.0", + "raw-window-handle 0.6.1", "renderdoc-sys", "rustc-hash", "smallvec", @@ -5663,16 +5785,16 @@ name = "wgpu-types" version = "0.19.0" source = "git+https://github.com/gfx-rs/wgpu?rev=20fda69#20fda698341efbdc870b8027d6d49f5bf3f36109" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "js-sys", "web-sys", ] [[package]] name = "widestring" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" [[package]] name = "winapi" @@ -5692,11 +5814,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" dependencies = [ - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -5708,14 +5830,15 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window_clipboard" version = "0.4.1" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-mime-types#f65a6c303bbbd6c7bf88f9bc34421ec06d893bea" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-4#6ca3cc3d4c221d34a4c385957bd3fd8be9ad48e5" dependencies = [ "clipboard-win", "clipboard_macos", "clipboard_wayland", "clipboard_x11", + "dnd", "mime 0.1.0", - "raw-window-handle 0.6.0", + "raw-window-handle 0.6.1", "thiserror", ] @@ -5746,7 +5869,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ "windows-core", - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -5755,7 +5878,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -5804,7 +5927,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -5839,17 +5962,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -5866,9 +5990,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -5884,9 +6008,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -5902,9 +6026,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -5920,9 +6050,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -5938,9 +6068,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -5956,9 +6086,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -5974,9 +6104,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winit" @@ -5986,9 +6116,9 @@ dependencies = [ "ahash", "android-activity", "atomic-waker", - "bitflags 2.4.2", + "bitflags 2.5.0", "bytemuck", - "calloop", + "calloop 0.12.4", "cfg_aliases 0.1.1", "core-foundation", "core-graphics", @@ -6004,11 +6134,11 @@ dependencies = [ "once_cell", "orbclient", "percent-encoding", - "raw-window-handle 0.6.0", + "raw-window-handle 0.6.1", "redox_syscall 0.3.5", "rustix 0.38.28", "sctk-adwaita", - "smithay-client-toolkit", + "smithay-client-toolkit 0.18.1", "smol_str", "unicode-segmentation", "wasm-bindgen", @@ -6036,9 +6166,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.5" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" +checksum = "14b9415ee827af173ebb3f15f9083df5a122eb93572ec28741fb153356ea2578" dependencies = [ "memchr", ] @@ -6116,7 +6246,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "dlib", "log", "once_cell", @@ -6131,9 +6261,9 @@ checksum = "054a8e68b76250b253f671d1268cb7f1ae089ec35e195b2efb2a4e9a836d0621" [[package]] name = "xml-rs" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" +checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" [[package]] name = "xmlwriter" @@ -6243,7 +6373,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] diff --git a/src/main.rs b/src/main.rs index 4454897..045ce7a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1694,7 +1694,10 @@ impl Application for App { let terminal = terminal.lock().unwrap(); let term = terminal.term.lock(); if let Some(text) = term.selection_to_string() { - return Command::batch([clipboard::write_primary(text), self.update_focus()]); + return Command::batch([ + clipboard::write_primary(text), + self.update_focus(), + ]); } } } else { diff --git a/src/menu.rs b/src/menu.rs index a97dd05..e154592 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-only use cosmic::widget::menu::key_bind::KeyBind; -use cosmic::widget::menu::menu_tree::{menu_items, menu_root, MenuItem}; +use cosmic::widget::menu::{items as menu_items, root as menu_root, Item as MenuItem}; use cosmic::{ iced::{ widget::{column, horizontal_rule, horizontal_space}, @@ -11,7 +11,7 @@ use cosmic::{ menu_button, theme, widget::{ self, - menu::{ItemHeight, ItemWidth, MenuBar, MenuTree}, + menu::{ItemHeight, ItemWidth, MenuBar, Tree as MenuTree}, segmented_button, }, Element, From 21737d380ebf45776c8fe55bf63c440f38c3942b Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sun, 28 Apr 2024 08:56:16 -0600 Subject: [PATCH 51/54] Upgrade libcosmic, downgrade serde --- Cargo.lock | 91 ++++++++++++++++++++++++++++-------------------------- Cargo.toml | 3 +- 2 files changed, 50 insertions(+), 44 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6fa5a5c..c2af48c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -375,7 +375,7 @@ checksum = "136d4d23bcc79e27423727b36823d86233aad06dfea531837b038394d11e9928" dependencies = [ "concurrent-queue", "event-listener 5.3.0", - "event-listener-strategy 0.5.1", + "event-listener-strategy 0.5.2", "futures-core", "pin-project-lite", ] @@ -388,7 +388,7 @@ checksum = "b10202063978b3351199d68f8b22c4e47e4b1b822f8d43fd862d5ea8c006b29a" dependencies = [ "async-task", "concurrent-queue", - "fastrand 2.0.2", + "fastrand 2.1.0", "futures-lite 2.3.0", "slab", ] @@ -512,9 +512,9 @@ dependencies = [ [[package]] name = "async-task" -version = "4.7.0" +version = "4.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" @@ -718,18 +718,16 @@ dependencies = [ [[package]] name = "blocking" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +checksum = "495f7104e962b7356f0aeb34247aca1fe7d2e783b346582db7f2904cb5717e88" dependencies = [ "async-channel", "async-lock 3.3.0", "async-task", - "fastrand 2.0.2", "futures-io", "futures-lite 2.3.0", "piper", - "tracing", ] [[package]] @@ -738,6 +736,12 @@ version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +[[package]] +name = "by_address" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" + [[package]] name = "bytemuck" version = "1.15.0" @@ -1095,7 +1099,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" +source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1112,7 +1116,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" +source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" dependencies = [ "quote", "syn 1.0.109", @@ -1121,7 +1125,7 @@ dependencies = [ [[package]] name = "cosmic-files" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-files.git#49f130b8403a7c7b333691a8cfe30204c0ba3be3" +source = "git+https://github.com/pop-os/cosmic-files.git#a1d11edfa5064187d1d01f70a54e52beb6a586c7" dependencies = [ "chrono", "dirs", @@ -1206,7 +1210,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" +source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" dependencies = [ "almost", "cosmic-config", @@ -1714,9 +1718,9 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332f51cb23d20b0de8458b86580878211da09bcd4503cb579c225b3d124cabb3" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ "event-listener 5.3.0", "pin-project-lite", @@ -1755,9 +1759,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "fdeflate" @@ -2064,7 +2068,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 2.0.2", + "fastrand 2.1.0", "futures-core", "futures-io", "parking", @@ -2561,7 +2565,7 @@ dependencies = [ [[package]] name = "iced" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" +source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" dependencies = [ "dnd", "iced_accessibility", @@ -2579,7 +2583,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" +source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" dependencies = [ "accesskit", "accesskit_winit", @@ -2588,7 +2592,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" +source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" dependencies = [ "bitflags 2.5.0", "dnd", @@ -2608,7 +2612,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" +source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" dependencies = [ "futures", "iced_core", @@ -2621,7 +2625,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" +source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" dependencies = [ "bitflags 2.5.0", "bytemuck", @@ -2645,7 +2649,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" +source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2657,7 +2661,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" +source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" dependencies = [ "dnd", "iced_core", @@ -2669,7 +2673,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" +source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" dependencies = [ "iced_core", "once_cell", @@ -2679,7 +2683,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" +source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" dependencies = [ "bytemuck", "cosmic-text", @@ -2696,7 +2700,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" +source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" dependencies = [ "bitflags 2.5.0", "bytemuck", @@ -2715,7 +2719,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" +source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" dependencies = [ "dnd", "iced_renderer", @@ -2731,7 +2735,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" +source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" dependencies = [ "dnd", "iced_graphics", @@ -3067,7 +3071,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#42cfdbf5856d8f343440d24771f7b1d1e0cddbb9" +source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" dependencies = [ "apply", "ashpd 0.7.0", @@ -3775,9 +3779,9 @@ dependencies = [ [[package]] name = "palette" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebfc23a4b76642983d57e4ad00bb4504eb30a8ce3c70f4aee1f725610e36d97a" +checksum = "4cbf71184cc5ecc2e4e1baccdb21026c20e5fc3dcf63028a086131b3ab00b6e6" dependencies = [ "approx", "fast-srgb8", @@ -3788,10 +3792,11 @@ dependencies = [ [[package]] name = "palette_derive" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8890702dbec0bad9116041ae586f84805b13eecd1d8b1df27c29998a9969d6d" +checksum = "f5030daf005bface118c096f510ffb781fc28f9ab6a32ab224d8631be6851d30" dependencies = [ + "by_address", "proc-macro2", "quote", "syn 2.0.60", @@ -3948,7 +3953,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" dependencies = [ "atomic-waker", - "fastrand 2.0.2", + "fastrand 2.1.0", "futures-io", ] @@ -4525,18 +4530,18 @@ checksum = "58bf37232d3bb9a2c4e641ca2a11d83b5062066f88df7fed36c28772046d65ba" [[package]] name = "serde" -version = "1.0.198" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", @@ -4755,7 +4760,7 @@ dependencies = [ "cocoa", "core-graphics", "drm", - "fastrand 2.0.2", + "fastrand 2.1.0", "foreign-types", "js-sys", "log", @@ -4908,7 +4913,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" dependencies = [ "cfg-if", - "fastrand 2.0.2", + "fastrand 2.1.0", "redox_syscall 0.4.1", "rustix 0.38.28", "windows-sys 0.52.0", @@ -5313,9 +5318,9 @@ checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" [[package]] name = "unicode-xid" diff --git a/Cargo.toml b/Cargo.toml index bb012c4..273a9c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,8 @@ open = "5.0.2" palette = { version = "0.7", features = ["serde"] } paste = "1.0" ron = "0.8" -serde = { version = "1", features = ["serde_derive"] } +#TODO: downgrading serde for better compatibility with older rust +serde = { version = "=1.0.197", features = ["serde_derive"] } shlex = "1" tokio = { version = "1", features = ["sync"] } # Internationalization From b6a07c834e1f1e57bf7b270462e6797deba1d8b8 Mon Sep 17 00:00:00 2001 From: EdenQwQ Date: Tue, 30 Apr 2024 16:35:34 +0800 Subject: [PATCH 52/54] i18n(zh_CN): add Chinese translation --- i18n/zh-CN/cosmic_term.ftl | 99 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 i18n/zh-CN/cosmic_term.ftl diff --git a/i18n/zh-CN/cosmic_term.ftl b/i18n/zh-CN/cosmic_term.ftl new file mode 100644 index 0000000..fccdbe9 --- /dev/null +++ b/i18n/zh-CN/cosmic_term.ftl @@ -0,0 +1,99 @@ +cosmic-terminal = COSMIC 终端 +new-terminal = 新建终端 + +# Context Pages + +## About +git-description = Git 提交 {$hash} 于 {$date} + +## Color schemes +color-schemes = 配色方案 +rename = 重命名 +export = 导出 +delete = 删除 +import = 导入 +import-errors = 导入错误 + +## Profiles +profiles = 配置文件 +name = 名称 +command-line = 命令行 +tab-title = 标签标题 +tab-title-description = 覆盖默认标签标题 +add-profile = 添加配置文件 +new-profile = 新建配置文件 +make-default = 设为默认配置 +working-directory = 工作目录 +hold = 保留 +remain-open = 子进程结束后保持打开 + +## Settings +settings = 设置 + +### Appearance +appearance = 外观 +theme = 主题 +match-desktop = 匹配主题颜色 +dark = 深色 +light = 浅色 +syntax-dark = 深色配色方案 +syntax-light = 浅色配色方案 +default-zoom-step = 缩放步长 +opacity = 背景不透明度 + +### Font +font = 字体 +advanced-font-settings = 高级字体设置 +default-font = 默认字体 +default-font-size = 字体大小 +default-font-stretch = 字体延伸 +default-font-weight = 普通字体粗细 +default-dim-font-weight = 淡字体粗细 +default-bold-font-weight = 粗字体粗细 +use-bright-bold = 使粗体更亮 + +### Splits +splits = 终端分割 +focus-follow-mouse = 聚焦窗口跟随鼠标 + +### Advanced +advanced = 高级 +show-headerbar = 显示标题栏 +show-header-description = 从右键菜单显示标题栏 + +# Find +find-placeholder = 查找... +find-previous = 上一个 +find-next = 下一个 + +# Menu + +## File +file = 文件 +new-tab = 新建标签页 +new-window = 新建窗口 +profile = 配置文件 +menu-profiles = 配置文件... +close-tab = 关闭标签页 +quit = 退出 + +## Edit +edit = 编辑 +copy = 复制 +paste = 粘贴 +select-all = 全选 +find = 查找 + +## View +view = 视图 +zoom-in = 放大文字 +zoom-reset = 默认文字大小 +zoom-out = 缩小文字 +next-tab = 下一个标签页 +previous-tab = 上一个标签页 +split-horizontal = 水平分割 +split-vertical = 垂直分割 +pane-toggle-maximize = 切换最大化 +menu-color-schemes = 配色方案... +menu-settings = 设置... +menu-about = 关于 COSMIC 终端... From d7869dcc44045bd1b3c0ac979d912d8342fe5115 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 1 May 2024 12:16:49 -0600 Subject: [PATCH 53/54] Update dependencies --- Cargo.lock | 194 ++++++++++++++++++++++++++++++++---------------- src/terminal.rs | 13 +++- 2 files changed, 141 insertions(+), 66 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c2af48c..a18ff34 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -130,7 +130,7 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6d1ea4484c8676f295307a4892d478c70ac8da1dbd8c7c10830a504b7f1022f" dependencies = [ - "base64 0.22.0", + "base64 0.22.1", "bitflags 2.5.0", "home", "libc", @@ -632,9 +632,9 @@ checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bit-set" @@ -838,9 +838,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.95" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" +checksum = "065a29261d53ba54260972629f9ca6bffa69bac13cd1fed61420f7fa68b9f8bd" dependencies = [ "jobserver", "libc", @@ -908,7 +908,7 @@ dependencies = [ [[package]] name = "clipboard_macos" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-4#6ca3cc3d4c221d34a4c385957bd3fd8be9ad48e5" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-5#12a1a20dde4403ee37d44a2a2575a2eeb4c1d5b4" dependencies = [ "objc", "objc-foundation", @@ -918,7 +918,7 @@ dependencies = [ [[package]] name = "clipboard_wayland" version = "0.2.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-4#6ca3cc3d4c221d34a4c385957bd3fd8be9ad48e5" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-5#12a1a20dde4403ee37d44a2a2575a2eeb4c1d5b4" dependencies = [ "dnd", "mime 0.1.0", @@ -928,7 +928,7 @@ dependencies = [ [[package]] name = "clipboard_x11" version = "0.4.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-4#6ca3cc3d4c221d34a4c385957bd3fd8be9ad48e5" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-5#12a1a20dde4403ee37d44a2a2575a2eeb4c1d5b4" dependencies = [ "thiserror", "x11rb", @@ -1099,7 +1099,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" +source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1116,7 +1116,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" +source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" dependencies = [ "quote", "syn 1.0.109", @@ -1125,7 +1125,7 @@ dependencies = [ [[package]] name = "cosmic-files" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-files.git#a1d11edfa5064187d1d01f70a54e52beb6a586c7" +source = "git+https://github.com/pop-os/cosmic-files.git#c91e0f1bff0d9e42912671c30965912a28c0684c" dependencies = [ "chrono", "dirs", @@ -1188,7 +1188,7 @@ dependencies = [ [[package]] name = "cosmic-text" version = "0.11.2" -source = "git+https://github.com/pop-os/cosmic-text.git#ff5501d9a36e51c50d908413caf7632d8f7533b7" +source = "git+https://github.com/pop-os/cosmic-text.git#2f5f2c63dabc0173adaa95d619a777454a3c39af" dependencies = [ "bitflags 2.5.0", "fontdb", @@ -1210,7 +1210,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" +source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" dependencies = [ "almost", "cosmic-config", @@ -1509,12 +1509,12 @@ dependencies = [ [[package]] name = "dnd" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-4#6ca3cc3d4c221d34a4c385957bd3fd8be9ad48e5" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-5#12a1a20dde4403ee37d44a2a2575a2eeb4c1d5b4" dependencies = [ "bitflags 2.5.0", "mime 0.1.0", "raw-window-handle 0.6.1", - "smithay-client-toolkit 0.18.0", + "smithay-client-toolkit 0.18.0 (git+https://github.com/smithay/client-toolkit?rev=3bed072)", "smithay-clipboard", ] @@ -1804,9 +1804,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.29" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4556222738635b7a3417ae6130d8f52201e45a0c4d1a907f0826383adb5f85e7" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" dependencies = [ "crc32fast", "miniz_oxide", @@ -1885,9 +1885,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "font-types" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6784a76a9c2b136ea3b8462391e9328252e938eb706eb44d752723b4c3a533" +checksum = "bdf6aa1de86490d8e39e04589bd04eb5953cc2a5ef0c25e389e807f44fd24e41" dependencies = [ "bytemuck", ] @@ -2390,9 +2390,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", "allocator-api2", @@ -2550,7 +2550,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core", + "windows-core 0.52.0", ] [[package]] @@ -2565,7 +2565,7 @@ dependencies = [ [[package]] name = "iced" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" +source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" dependencies = [ "dnd", "iced_accessibility", @@ -2583,7 +2583,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" +source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" dependencies = [ "accesskit", "accesskit_winit", @@ -2592,7 +2592,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" +source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" dependencies = [ "bitflags 2.5.0", "dnd", @@ -2612,7 +2612,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" +source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" dependencies = [ "futures", "iced_core", @@ -2625,7 +2625,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" +source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" dependencies = [ "bitflags 2.5.0", "bytemuck", @@ -2649,7 +2649,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" +source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2661,7 +2661,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" +source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" dependencies = [ "dnd", "iced_core", @@ -2673,7 +2673,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" +source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" dependencies = [ "iced_core", "once_cell", @@ -2683,7 +2683,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" +source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" dependencies = [ "bytemuck", "cosmic-text", @@ -2700,7 +2700,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" +source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" dependencies = [ "bitflags 2.5.0", "bytemuck", @@ -2719,7 +2719,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" +source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" dependencies = [ "dnd", "iced_renderer", @@ -2735,7 +2735,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9797df2b50d088c86f505b26b25b733bce5c142a" +source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" dependencies = [ "dnd", "iced_graphics", @@ -3071,7 +3071,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#9797df2b50d088c86f505b26b25b733bce5c142a" +source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" dependencies = [ "apply", "ashpd 0.7.0", @@ -3320,7 +3320,7 @@ dependencies = [ [[package]] name = "mime" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-4#6ca3cc3d4c221d34a4c385957bd3fd8be9ad48e5" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-5#12a1a20dde4403ee37d44a2a2575a2eeb4c1d5b4" dependencies = [ "smithay-clipboard", ] @@ -4197,9 +4197,9 @@ checksum = "3b42e27ef78c35d3998403c1d26f3efd9e135d3e5121b0a4845cc5cc27547f4f" [[package]] name = "read-fonts" -version = "0.19.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea75b5ec052843434d263ef7a4c31cf86db5908c729694afb1ad3c884252a1b6" +checksum = "af4749db2bd1c853db31a7ae5ee2fc6c30bbddce353ea8fedf673fed187c68c7" dependencies = [ "bytemuck", "font-types", @@ -4684,6 +4684,30 @@ dependencies = [ "xkeysym", ] +[[package]] +name = "smithay-client-toolkit" +version = "0.18.0" +source = "git+https://github.com/Smithay/client-toolkit#18070ad8e0675bdf555e6099bf90e3a92adc01b0" +dependencies = [ + "bitflags 2.5.0", + "calloop 0.13.0", + "calloop-wayland-source 0.3.0", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix 0.38.28", + "thiserror", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + [[package]] name = "smithay-client-toolkit" version = "0.18.1" @@ -4712,11 +4736,11 @@ dependencies = [ [[package]] name = "smithay-clipboard" version = "0.8.0" -source = "git+https://github.com/pop-os/smithay-clipboard?tag=pop-dnd-3#2f2430bec35f0adb9cb93e85e648ff8449d44dad" +source = "git+https://github.com/pop-os/smithay-clipboard?tag=pop-dnd-4#eefa50c3df5135d98df7f4192e2e9b07eeafe56b" dependencies = [ "libc", "raw-window-handle 0.6.1", - "smithay-client-toolkit 0.18.0", + "smithay-client-toolkit 0.18.0 (git+https://github.com/Smithay/client-toolkit)", "wayland-backend", ] @@ -4741,9 +4765,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", @@ -5076,7 +5100,7 @@ dependencies = [ "num_cpus", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.6", + "socket2 0.5.7", "tracing", "windows-sys 0.48.0", ] @@ -5179,9 +5203,9 @@ dependencies = [ [[package]] name = "trash" -version = "4.1.0" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a1a7a9a17d3b004898be42be29a4c18d5a4cf008b5cdf72d69b1945dfcb158a" +checksum = "c254b119cf49bdde3dfef21b1dc492dc8026b75566ca24aa77993eccd7cbc1b5" dependencies = [ "chrono", "libc", @@ -5190,7 +5214,7 @@ dependencies = [ "once_cell", "scopeguard", "url", - "windows 0.44.0", + "windows 0.56.0", ] [[package]] @@ -5835,7 +5859,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window_clipboard" version = "0.4.1" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-4#6ca3cc3d4c221d34a4c385957bd3fd8be9ad48e5" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-5#12a1a20dde4403ee37d44a2a2575a2eeb4c1d5b4" dependencies = [ "clipboard-win", "clipboard_macos", @@ -5847,23 +5871,14 @@ dependencies = [ "thiserror", ] -[[package]] -name = "windows" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-implement", - "windows-interface", + "windows-implement 0.48.0", + "windows-interface 0.48.0", "windows-targets 0.48.5", ] @@ -5873,7 +5888,17 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ - "windows-core", + "windows-core 0.52.0", + "windows-targets 0.52.5", +] + +[[package]] +name = "windows" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132" +dependencies = [ + "windows-core 0.56.0", "windows-targets 0.52.5", ] @@ -5886,6 +5911,18 @@ dependencies = [ "windows-targets 0.52.5", ] +[[package]] +name = "windows-core" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4698e52ed2d08f8658ab0c39512a7c00ee5fe2688c65f8c0a4f06750d729f2a6" +dependencies = [ + "windows-implement 0.56.0", + "windows-interface 0.56.0", + "windows-result", + "windows-targets 0.52.5", +] + [[package]] name = "windows-implement" version = "0.48.0" @@ -5897,6 +5934,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "windows-implement" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + [[package]] name = "windows-interface" version = "0.48.0" @@ -5908,6 +5956,26 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "windows-interface" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "windows-result" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "749f0da9cc72d82e600d8d2e44cadd0b9eedb9038f71a1c58556ac1c5791813b" +dependencies = [ + "windows-targets 0.52.5", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -6191,9 +6259,9 @@ dependencies = [ [[package]] name = "x11rb" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8f25ead8c7e4cba123243a6367da5d3990e0d3affa708ea19dce96356bd9f1a" +checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" dependencies = [ "as-raw-xcb-connection", "gethostname", @@ -6206,9 +6274,9 @@ dependencies = [ [[package]] name = "x11rb-protocol" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e63e71c4b8bd9ffec2c963173a4dc4cbde9ee96961d4fcb4429db9929b606c34" +checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" [[package]] name = "xcursor" diff --git a/src/terminal.rs b/src/terminal.rs index fb6c6a0..09a3033 100644 --- a/src/terminal.rs +++ b/src/terminal.rs @@ -21,7 +21,8 @@ use cosmic::{ widget::{pane_grid, segmented_button}, }; use cosmic_text::{ - Attrs, AttrsList, Buffer, BufferLine, CacheKeyFlags, Family, Metrics, Shaping, Weight, Wrap, + Attrs, AttrsList, Buffer, BufferLine, CacheKeyFlags, Family, LineEnding, Metrics, Shaping, + Weight, Wrap, }; use indexmap::IndexSet; use std::{ @@ -666,13 +667,18 @@ impl Terminal { while line_i >= buffer.lines.len() { buffer.lines.push(BufferLine::new( "", + LineEnding::default(), AttrsList::new(self.default_attrs), Shaping::Advanced, )); buffer.set_redraw(true); } - if buffer.lines[line_i].set_text(text.clone(), attrs_list.clone()) { + if buffer.lines[line_i].set_text( + text.clone(), + LineEnding::default(), + attrs_list.clone(), + ) { buffer.set_redraw(true); } line_i += 1; @@ -785,13 +791,14 @@ impl Terminal { while line_i >= buffer.lines.len() { buffer.lines.push(BufferLine::new( "", + LineEnding::default(), AttrsList::new(self.default_attrs), Shaping::Advanced, )); buffer.set_redraw(true); } - if buffer.lines[line_i].set_text(text, attrs_list) { + if buffer.lines[line_i].set_text(text, LineEnding::default(), attrs_list) { buffer.set_redraw(true); } line_i += 1; From 2e9264ee5c7e1420bb2e00e5c0b70f4d715af63f Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 1 May 2024 13:12:05 -0600 Subject: [PATCH 54/54] Update dependencies --- Cargo.lock | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a18ff34..c65ed70 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -908,7 +908,7 @@ dependencies = [ [[package]] name = "clipboard_macos" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-5#12a1a20dde4403ee37d44a2a2575a2eeb4c1d5b4" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-6#8a816d8f218e290041bb5ef6d3b695c38e0a53b7" dependencies = [ "objc", "objc-foundation", @@ -918,7 +918,7 @@ dependencies = [ [[package]] name = "clipboard_wayland" version = "0.2.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-5#12a1a20dde4403ee37d44a2a2575a2eeb4c1d5b4" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-6#8a816d8f218e290041bb5ef6d3b695c38e0a53b7" dependencies = [ "dnd", "mime 0.1.0", @@ -928,7 +928,7 @@ dependencies = [ [[package]] name = "clipboard_x11" version = "0.4.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-5#12a1a20dde4403ee37d44a2a2575a2eeb4c1d5b4" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-6#8a816d8f218e290041bb5ef6d3b695c38e0a53b7" dependencies = [ "thiserror", "x11rb", @@ -1099,7 +1099,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" +source = "git+https://github.com/pop-os/libcosmic.git#3927a553fba7ecf0dbd66fffaaa96836e0428973" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1116,7 +1116,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" +source = "git+https://github.com/pop-os/libcosmic.git#3927a553fba7ecf0dbd66fffaaa96836e0428973" dependencies = [ "quote", "syn 1.0.109", @@ -1125,7 +1125,7 @@ dependencies = [ [[package]] name = "cosmic-files" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-files.git#c91e0f1bff0d9e42912671c30965912a28c0684c" +source = "git+https://github.com/pop-os/cosmic-files.git#298463b80418ababe5979391fd5f1fe20df28bba" dependencies = [ "chrono", "dirs", @@ -1210,7 +1210,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" +source = "git+https://github.com/pop-os/libcosmic.git#3927a553fba7ecf0dbd66fffaaa96836e0428973" dependencies = [ "almost", "cosmic-config", @@ -1509,7 +1509,7 @@ dependencies = [ [[package]] name = "dnd" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-5#12a1a20dde4403ee37d44a2a2575a2eeb4c1d5b4" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-6#8a816d8f218e290041bb5ef6d3b695c38e0a53b7" dependencies = [ "bitflags 2.5.0", "mime 0.1.0", @@ -2565,7 +2565,7 @@ dependencies = [ [[package]] name = "iced" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" +source = "git+https://github.com/pop-os/libcosmic.git#3927a553fba7ecf0dbd66fffaaa96836e0428973" dependencies = [ "dnd", "iced_accessibility", @@ -2583,7 +2583,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" +source = "git+https://github.com/pop-os/libcosmic.git#3927a553fba7ecf0dbd66fffaaa96836e0428973" dependencies = [ "accesskit", "accesskit_winit", @@ -2592,7 +2592,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" +source = "git+https://github.com/pop-os/libcosmic.git#3927a553fba7ecf0dbd66fffaaa96836e0428973" dependencies = [ "bitflags 2.5.0", "dnd", @@ -2612,7 +2612,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" +source = "git+https://github.com/pop-os/libcosmic.git#3927a553fba7ecf0dbd66fffaaa96836e0428973" dependencies = [ "futures", "iced_core", @@ -2625,7 +2625,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" +source = "git+https://github.com/pop-os/libcosmic.git#3927a553fba7ecf0dbd66fffaaa96836e0428973" dependencies = [ "bitflags 2.5.0", "bytemuck", @@ -2649,7 +2649,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" +source = "git+https://github.com/pop-os/libcosmic.git#3927a553fba7ecf0dbd66fffaaa96836e0428973" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2661,7 +2661,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" +source = "git+https://github.com/pop-os/libcosmic.git#3927a553fba7ecf0dbd66fffaaa96836e0428973" dependencies = [ "dnd", "iced_core", @@ -2673,7 +2673,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" +source = "git+https://github.com/pop-os/libcosmic.git#3927a553fba7ecf0dbd66fffaaa96836e0428973" dependencies = [ "iced_core", "once_cell", @@ -2683,7 +2683,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" +source = "git+https://github.com/pop-os/libcosmic.git#3927a553fba7ecf0dbd66fffaaa96836e0428973" dependencies = [ "bytemuck", "cosmic-text", @@ -2700,7 +2700,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" +source = "git+https://github.com/pop-os/libcosmic.git#3927a553fba7ecf0dbd66fffaaa96836e0428973" dependencies = [ "bitflags 2.5.0", "bytemuck", @@ -2719,7 +2719,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" +source = "git+https://github.com/pop-os/libcosmic.git#3927a553fba7ecf0dbd66fffaaa96836e0428973" dependencies = [ "dnd", "iced_renderer", @@ -2735,7 +2735,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#7a964772c2970d9e6976cbc86df260931de2e83a" +source = "git+https://github.com/pop-os/libcosmic.git#3927a553fba7ecf0dbd66fffaaa96836e0428973" dependencies = [ "dnd", "iced_graphics", @@ -3071,7 +3071,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#7a964772c2970d9e6976cbc86df260931de2e83a" +source = "git+https://github.com/pop-os/libcosmic.git#3927a553fba7ecf0dbd66fffaaa96836e0428973" dependencies = [ "apply", "ashpd 0.7.0", @@ -3320,7 +3320,7 @@ dependencies = [ [[package]] name = "mime" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-5#12a1a20dde4403ee37d44a2a2575a2eeb4c1d5b4" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-6#8a816d8f218e290041bb5ef6d3b695c38e0a53b7" dependencies = [ "smithay-clipboard", ] @@ -5859,7 +5859,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window_clipboard" version = "0.4.1" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-5#12a1a20dde4403ee37d44a2a2575a2eeb4c1d5b4" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-6#8a816d8f218e290041bb5ef6d3b695c38e0a53b7" dependencies = [ "clipboard-win", "clipboard_macos",