From c2deb0529289af287b955dd6e947c2d4baab7970 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Fri, 17 Jan 2025 22:37:01 -0500 Subject: [PATCH] chore: add log-out shortcut --- Cargo.lock | 12 ++++++------ .../src/pages/input/keyboard/shortcuts/mod.rs | 2 ++ .../src/pages/input/keyboard/shortcuts/system.rs | 1 + i18n/en/cosmic_settings.ftl | 1 + 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5335f53d..e3ff268c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1463,7 +1463,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#4a97b3ddd2f972cb8fdc6b7c0482596aa31a8fb8" +source = "git+https://github.com/pop-os/libcosmic#1914006cdd689491e3199d9887a715866c91d8aa" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1485,7 +1485,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#4a97b3ddd2f972cb8fdc6b7c0482596aa31a8fb8" +source = "git+https://github.com/pop-os/libcosmic#1914006cdd689491e3199d9887a715866c91d8aa" dependencies = [ "quote", "syn 1.0.109", @@ -1672,7 +1672,7 @@ dependencies = [ [[package]] name = "cosmic-settings-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-settings-daemon#747e482ca197497ee3bc5f6e9dcd23c73e592e47" +source = "git+https://github.com/pop-os/cosmic-settings-daemon#fe529ae0edda45d53f3bd3a579c3a8f77457905a" dependencies = [ "cosmic-config", "serde", @@ -3155,7 +3155,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#4a97b3ddd2f972cb8fdc6b7c0482596aa31a8fb8" +source = "git+https://github.com/pop-os/libcosmic#1914006cdd689491e3199d9887a715866c91d8aa" dependencies = [ "accesskit", "accesskit_winit", @@ -3164,7 +3164,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#4a97b3ddd2f972cb8fdc6b7c0482596aa31a8fb8" +source = "git+https://github.com/pop-os/libcosmic#1914006cdd689491e3199d9887a715866c91d8aa" dependencies = [ "bitflags 2.6.0", "bytes", @@ -3189,7 +3189,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#4a97b3ddd2f972cb8fdc6b7c0482596aa31a8fb8" +source = "git+https://github.com/pop-os/libcosmic#1914006cdd689491e3199d9887a715866c91d8aa" dependencies = [ "futures", "iced_core", diff --git a/cosmic-settings/src/pages/input/keyboard/shortcuts/mod.rs b/cosmic-settings/src/pages/input/keyboard/shortcuts/mod.rs index b788bc02..06a7f270 100644 --- a/cosmic-settings/src/pages/input/keyboard/shortcuts/mod.rs +++ b/cosmic-settings/src/pages/input/keyboard/shortcuts/mod.rs @@ -525,6 +525,7 @@ fn all_system_actions() -> &'static [Action] { Action::System(SystemAction::KeyboardBrightnessDown), Action::System(SystemAction::KeyboardBrightnessUp), Action::System(SystemAction::Launcher), + Action::System(SystemAction::LogOut), Action::System(SystemAction::LockScreen), Action::System(SystemAction::Mute), Action::System(SystemAction::MuteMic), @@ -654,6 +655,7 @@ fn localize_action(action: &Action) -> String { } SystemAction::KeyboardBrightnessUp => fl!("system-shortcut", "keyboard-brightness-up"), SystemAction::Launcher => fl!("system-shortcut", "launcher"), + SystemAction::LogOut => fl!("system-shortcut", "log-out"), SystemAction::LockScreen => fl!("system-shortcut", "lock-screen"), SystemAction::Mute => fl!("system-shortcut", "mute"), SystemAction::MuteMic => fl!("system-shortcut", "mute-mic"), diff --git a/cosmic-settings/src/pages/input/keyboard/shortcuts/system.rs b/cosmic-settings/src/pages/input/keyboard/shortcuts/system.rs index d2288e42..e36e56e6 100644 --- a/cosmic-settings/src/pages/input/keyboard/shortcuts/system.rs +++ b/cosmic-settings/src/pages/input/keyboard/shortcuts/system.rs @@ -81,6 +81,7 @@ pub const fn actions() -> &'static [Action] { Action::System(SystemAction::WorkspaceOverview), Action::System(SystemAction::WindowSwitcher), Action::System(SystemAction::WindowSwitcherPrevious), + Action::System(SystemAction::LogOut), Action::System(SystemAction::LockScreen), Action::System(SystemAction::VolumeLower), Action::System(SystemAction::VolumeRaise), diff --git a/i18n/en/cosmic_settings.ftl b/i18n/en/cosmic_settings.ftl index 8b7b685c..2282157a 100644 --- a/i18n/en/cosmic_settings.ftl +++ b/i18n/en/cosmic_settings.ftl @@ -625,6 +625,7 @@ system-shortcut = System .keyboard-brightness-down = Decrease keyboard brightness .keyboard-brightness-up = Increase keyboard brightness .launcher = Open the launcher + .log-out = Log Out .lock-screen = Lock the screen .mute = Mute audio output .mute-mic = Mutes microphone input