yoda: rebase onto libcosmic-yoda via path deps + macOS controls toggle
Fresh rewiring from upstream master (78644a3) — the previous attempt on051f4f9was 137 commits behind and hit API drift (cosmic::iced_futures, Subscription::run_with_id). Upstream master uses the newer API (cosmic::iced::stream + Subscription::run_with) which our libcosmic-yoda already supports. Yoda wiring: - [workspace.dependencies.libcosmic] (git pop-os) -> libcosmic-yoda { path, wayland } - cosmic-config + iced_winit workspace deps -> path to libcosmic-yoda submodule - [patch.pop-os/libcosmic] redirects transitive cosmic-config + cosmic-theme + iced_futures + iced_winit to our local paths so the graph resolves to a single copy (cosmic-bg/comp/idle/panel configs unify cleanly against master) - subscriptions/sound + page + cosmic-settings inner Cargo.toml: libcosmic -> libcosmic-yoda (workspace + direct variants) - winit feature dropped from libcosmic-yoda deps (our fork is Wayland-only) Cherry-picked from leyoda/local/window-controls-position @52ce463: - cosmic-settings/src/pages/desktop/window_management.rs — macOS toggle UI - i18n/en + fr/cosmic_settings.ftl — translations Installed at /usr/bin/cosmic-settings (yoda build, 78 MB). Pre-yoda pacman version kept at /usr/bin/cosmic-settings.pre-yoda-fork.
This commit is contained in:
parent
f19da76129
commit
553c05e2f0
8 changed files with 337 additions and 416 deletions
653
Cargo.lock
generated
653
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
58
Cargo.toml
58
Cargo.toml
|
|
@ -7,39 +7,41 @@ resolver = "3"
|
||||||
rust-version = "1.93"
|
rust-version = "1.93"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
cosmic-randr = { git = "https://github.com/pop-os/cosmic-randr" }
|
cosmic-randr = { path = "../cosmic-randr/lib" }
|
||||||
tokio = { version = "1.49.0", features = ["macros"] }
|
tokio = { version = "1.49.0", features = ["macros"] }
|
||||||
iced_winit = { git = "https://github.com/pop-os/libcosmic", default-features = false }
|
# Yoda fork: direct path dep on iced_winit in libcosmic-yoda's submodule.
|
||||||
|
iced_winit = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/winit", default-features = false }
|
||||||
|
|
||||||
[workspace.dependencies.libcosmic]
|
# Yoda fork — libcosmic-yoda by path, replaces upstream git dep.
|
||||||
|
[workspace.dependencies.libcosmic-yoda]
|
||||||
features = [
|
features = [
|
||||||
"dbus-config",
|
"dbus-config",
|
||||||
"desktop",
|
"desktop",
|
||||||
"multi-window",
|
"multi-window",
|
||||||
"winit",
|
"wayland",
|
||||||
"tokio",
|
"tokio",
|
||||||
"qr_code",
|
"qr_code",
|
||||||
]
|
]
|
||||||
git = "https://github.com/pop-os/libcosmic"
|
path = "/home/lionel/Projets/COSMIC/libcosmic"
|
||||||
|
|
||||||
[workspace.dependencies.cosmic-config]
|
[workspace.dependencies.cosmic-config]
|
||||||
git = "https://github.com/pop-os/libcosmic"
|
path = "/home/lionel/Projets/COSMIC/libcosmic/cosmic-config"
|
||||||
|
|
||||||
[workspace.dependencies.cosmic-bg-config]
|
[workspace.dependencies.cosmic-bg-config]
|
||||||
git = "https://github.com/pop-os/cosmic-bg"
|
path = "../cosmic-bg/config"
|
||||||
|
|
||||||
[workspace.dependencies.cosmic-comp-config]
|
[workspace.dependencies.cosmic-comp-config]
|
||||||
git = "https://github.com/pop-os/cosmic-comp"
|
path = "../cosmic-comp/cosmic-comp-config"
|
||||||
features = ["output"]
|
features = ["output"]
|
||||||
|
|
||||||
[workspace.dependencies.cosmic-idle-config]
|
[workspace.dependencies.cosmic-idle-config]
|
||||||
git = "https://github.com/pop-os/cosmic-idle"
|
path = "../cosmic-idle/cosmic-idle-config"
|
||||||
|
|
||||||
[workspace.dependencies.cosmic-panel-config]
|
[workspace.dependencies.cosmic-panel-config]
|
||||||
git = "https://github.com/pop-os/cosmic-panel"
|
path = "../cosmic-panel/cosmic-panel-config"
|
||||||
|
|
||||||
[workspace.dependencies.cosmic-randr-shell]
|
[workspace.dependencies.cosmic-randr-shell]
|
||||||
git = "https://github.com/pop-os/cosmic-randr"
|
path = "../cosmic-randr/shell"
|
||||||
|
|
||||||
[workspace.dependencies.sctk]
|
[workspace.dependencies.sctk]
|
||||||
version = "0.20"
|
version = "0.20"
|
||||||
|
|
@ -63,25 +65,31 @@ debug = true
|
||||||
# cosmic-text = { git = "https://github.com/pop-os/cosmic-text//", rev = "b017d7c" }
|
# cosmic-text = { git = "https://github.com/pop-os/cosmic-text//", rev = "b017d7c" }
|
||||||
|
|
||||||
[patch.'https://github.com/pop-os/cosmic-protocols']
|
[patch.'https://github.com/pop-os/cosmic-protocols']
|
||||||
cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols//", rev = "d0e95be" }
|
cosmic-protocols = { path = "../cosmic-protocols" }
|
||||||
cosmic-client-toolkit = { git = "https://github.com/pop-os/cosmic-protocols//", rev = "d0e95be" }
|
cosmic-client-toolkit = { path = "../cosmic-protocols/client-toolkit" }
|
||||||
|
|
||||||
# [patch.'https://github.com/pop-os/cosmic-settings-daemon']
|
# [patch.'https://github.com/pop-os/cosmic-settings-daemon']
|
||||||
# cosmic-settings-config = { git = "https://github.com/pop-os/cosmic-settings-daemon//", branch = "input_nobuild" }
|
# cosmic-settings-config = { git = "https://github.com/pop-os/cosmic-settings-daemon//", branch = "input_nobuild" }
|
||||||
|
|
||||||
# For development and testing purposes
|
# Yoda fork: redirect every transitive dep that asks for pop-os/libcosmic
|
||||||
# [patch.'https://github.com/pop-os/libcosmic']
|
# (cosmic-bg-config, cosmic-comp-config, cosmic-idle-config, cosmic-panel-config,
|
||||||
# libcosmic = { path = "../libcosmic" }
|
# cosmic-settings-config, cosmic-settings-daemon-config) to our local paths so
|
||||||
# cosmic-config = { path = "../libcosmic/cosmic-config" }
|
# the whole graph resolves against a single cosmic-config / cosmic-theme / iced_*.
|
||||||
# cosmic-theme = { path = "../libcosmic/cosmic-theme" }
|
[patch.'https://github.com/pop-os/libcosmic']
|
||||||
# iced_futures = { path = "../libcosmic/iced/futures" }
|
cosmic-config = { path = "/home/lionel/Projets/COSMIC/libcosmic/cosmic-config" }
|
||||||
# iced_winit = { path = "../libcosmic/iced/winit" }
|
cosmic-theme = { path = "/home/lionel/Projets/COSMIC/libcosmic/cosmic-theme" }
|
||||||
|
iced_futures = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/futures" }
|
||||||
|
iced_winit = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/winit" }
|
||||||
|
|
||||||
# libcosmic = { git = "https://github.com/pop-os/libcosmic//" }
|
[patch.'https://github.com/pop-os/cosmic-text.git']
|
||||||
# cosmic-config = { git = "https://github.com/pop-os/libcosmic//" }
|
cosmic-text = { path = "../cosmic-text" }
|
||||||
# cosmic-theme = { git = "https://github.com/pop-os/libcosmic//" }
|
|
||||||
# iced_futures = { git = "https://github.com/pop-os/libcosmic//" }
|
# Yoda wayland cut v5: redirect window_clipboard to the local fork
|
||||||
# iced_winit = { git = "https://github.com/pop-os/libcosmic//" }
|
# (x11 gated behind opt-in feature).
|
||||||
|
[patch.'https://forge.aditua.com/leyoda/window_clipboard.git']
|
||||||
|
window_clipboard = { path = "/home/lionel/Projets/COSMIC/window_clipboard" }
|
||||||
|
dnd = { path = "/home/lionel/Projets/COSMIC/window_clipboard/dnd" }
|
||||||
|
mime = { path = "/home/lionel/Projets/COSMIC/window_clipboard/mime" }
|
||||||
|
|
||||||
# [patch.'https://github.com/pop-os/dbus-settings-bindings']
|
# [patch.'https://github.com/pop-os/dbus-settings-bindings']
|
||||||
# cosmic-dbus-networkmanager = { path = "../dbus-settings-bindings/networkmanager" }
|
# cosmic-dbus-networkmanager = { path = "../dbus-settings-bindings/networkmanager" }
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ image = { version = "0.25", default-features = false, features = [
|
||||||
indexmap = "2.13.0"
|
indexmap = "2.13.0"
|
||||||
itertools = "0.14.0"
|
itertools = "0.14.0"
|
||||||
itoa = "1.0.17"
|
itoa = "1.0.17"
|
||||||
libcosmic.workspace = true
|
libcosmic-yoda.workspace = true
|
||||||
iced_winit.workspace = true
|
iced_winit.workspace = true
|
||||||
locale1 = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true }
|
locale1 = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true }
|
||||||
sysinfo = { version = "=0.38.0", optional = true }
|
sysinfo = { version = "=0.38.0", optional = true }
|
||||||
|
|
@ -187,12 +187,12 @@ page-window-management = ["cosmic-comp-config", "dep:cosmic-settings-config"]
|
||||||
page-workspaces = ["cosmic-comp-config"]
|
page-workspaces = ["cosmic-comp-config"]
|
||||||
|
|
||||||
# Other features
|
# Other features
|
||||||
a11y = ["libcosmic/a11y"]
|
a11y = ["libcosmic-yoda/a11y"]
|
||||||
ashpd = ["dep:ashpd"]
|
ashpd = ["dep:ashpd"]
|
||||||
cosmic-comp-config = ["dep:cosmic-comp-config"]
|
cosmic-comp-config = ["dep:cosmic-comp-config"]
|
||||||
dbus-config = ["libcosmic/dbus-config", "cosmic-config/dbus"]
|
dbus-config = ["libcosmic-yoda/dbus-config", "cosmic-config/dbus"]
|
||||||
single-instance = ["libcosmic/single-instance"]
|
single-instance = ["libcosmic-yoda/single-instance"]
|
||||||
test = []
|
test = []
|
||||||
wayland = ["libcosmic/wayland", "dep:cosmic-panel-config", "dep:cosmic-randr", "iced_winit/cctk"]
|
wayland = ["libcosmic-yoda/wayland", "dep:cosmic-panel-config", "dep:cosmic-randr", "iced_winit/cctk"]
|
||||||
wgpu = ["libcosmic/wgpu"]
|
wgpu = ["libcosmic-yoda/wgpu"]
|
||||||
xdg-portal = ["ashpd", "libcosmic/xdg-portal"]
|
xdg-portal = ["ashpd", "libcosmic-yoda/xdg-portal"]
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ pub enum Message {
|
||||||
ShowActiveWindowHint(bool),
|
ShowActiveWindowHint(bool),
|
||||||
ShowMaximizeButton(bool),
|
ShowMaximizeButton(bool),
|
||||||
ShowMinimizeButton(bool),
|
ShowMinimizeButton(bool),
|
||||||
|
WindowControlsPositionStart(bool),
|
||||||
SetEdgeSnapThreshold(u32),
|
SetEdgeSnapThreshold(u32),
|
||||||
Surface(surface::Action),
|
Surface(surface::Action),
|
||||||
}
|
}
|
||||||
|
|
@ -173,6 +174,19 @@ impl Page {
|
||||||
.set_show_minimize(&config, value);
|
.set_show_minimize(&config, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Message::WindowControlsPositionStart(left) => {
|
||||||
|
if let Ok(config) = cosmic::config::CosmicTk::config() {
|
||||||
|
let position = if left {
|
||||||
|
cosmic::widget::WindowControlsPosition::Start
|
||||||
|
} else {
|
||||||
|
cosmic::widget::WindowControlsPosition::End
|
||||||
|
};
|
||||||
|
let _res = cosmic::config::COSMIC_TK
|
||||||
|
.write()
|
||||||
|
.unwrap()
|
||||||
|
.set_window_controls_position(&config, position);
|
||||||
|
}
|
||||||
|
}
|
||||||
Message::ShowActiveWindowHint(value) => {
|
Message::ShowActiveWindowHint(value) => {
|
||||||
self.show_active_hint = value;
|
self.show_active_hint = value;
|
||||||
if let Err(err) = self.comp_config.set("active_hint", value) {
|
if let Err(err) = self.comp_config.set("active_hint", value) {
|
||||||
|
|
@ -270,6 +284,7 @@ pub fn window_controls() -> Section<crate::pages::Message> {
|
||||||
maximize = fl!("window-controls", "maximize");
|
maximize = fl!("window-controls", "maximize");
|
||||||
minimize = fl!("window-controls", "minimize");
|
minimize = fl!("window-controls", "minimize");
|
||||||
active_window_hint = fl!("window-controls", "active-window-hint");
|
active_window_hint = fl!("window-controls", "active-window-hint");
|
||||||
|
position_start = fl!("window-controls", "position-start");
|
||||||
});
|
});
|
||||||
|
|
||||||
Section::default()
|
Section::default()
|
||||||
|
|
@ -292,6 +307,13 @@ pub fn window_controls() -> Section<crate::pages::Message> {
|
||||||
settings::item::builder(&descriptions[minimize])
|
settings::item::builder(&descriptions[minimize])
|
||||||
.toggler(cosmic::config::show_minimize(), Message::ShowMinimizeButton),
|
.toggler(cosmic::config::show_minimize(), Message::ShowMinimizeButton),
|
||||||
)
|
)
|
||||||
|
.add(settings::item::builder(&descriptions[position_start]).toggler(
|
||||||
|
matches!(
|
||||||
|
cosmic::config::window_controls_position(),
|
||||||
|
cosmic::widget::WindowControlsPosition::Start
|
||||||
|
),
|
||||||
|
Message::WindowControlsPositionStart,
|
||||||
|
))
|
||||||
.apply(Element::from)
|
.apply(Element::from)
|
||||||
.map(crate::pages::Message::WindowManagement)
|
.map(crate::pages::Message::WindowManagement)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
1
i18n/en/cosmic_settings.ftl
vendored
1
i18n/en/cosmic_settings.ftl
vendored
|
|
@ -484,6 +484,7 @@ window-controls = Window controls
|
||||||
.maximize = Show maximize button
|
.maximize = Show maximize button
|
||||||
.minimize = Show minimize button
|
.minimize = Show minimize button
|
||||||
.active-window-hint = Show active window hint
|
.active-window-hint = Show active window hint
|
||||||
|
.position-start = Place buttons on the left (macOS style)
|
||||||
|
|
||||||
focus-navigation = Focus navigation
|
focus-navigation = Focus navigation
|
||||||
.focus-follows-cursor = Focus follows cursor
|
.focus-follows-cursor = Focus follows cursor
|
||||||
|
|
|
||||||
1
i18n/fr/cosmic_settings.ftl
vendored
1
i18n/fr/cosmic_settings.ftl
vendored
|
|
@ -322,6 +322,7 @@ window-controls = Contrôles des fenêtres
|
||||||
.maximize = Afficher le bouton maximiser
|
.maximize = Afficher le bouton maximiser
|
||||||
.minimize = Afficher le bouton minimiser
|
.minimize = Afficher le bouton minimiser
|
||||||
.active-window-hint = Afficher l'indice de la fenêtre active
|
.active-window-hint = Afficher l'indice de la fenêtre active
|
||||||
|
.position-start = Placer les boutons à gauche (style macOS)
|
||||||
focus-navigation = Navigation par le focus
|
focus-navigation = Navigation par le focus
|
||||||
.focus-follows-cursor = Le focus suit le curseur
|
.focus-follows-cursor = Le focus suit le curseur
|
||||||
.focus-follows-cursor-delay = Délai de suivi du focus en ms
|
.focus-follows-cursor-delay = Délai de suivi du focus en ms
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ edition = "2024"
|
||||||
derive_setters = "0.1.9"
|
derive_setters = "0.1.9"
|
||||||
regex = "1.12.3"
|
regex = "1.12.3"
|
||||||
slotmap = "1.1.1"
|
slotmap = "1.1.1"
|
||||||
libcosmic = { workspace = true }
|
libcosmic-yoda = { workspace = true }
|
||||||
downcast-rs = "2.0.2"
|
downcast-rs = "2.0.2"
|
||||||
url = "2.5.8"
|
url = "2.5.8"
|
||||||
slab = "0.4.12"
|
slab = "0.4.12"
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ publish = true
|
||||||
cosmic-pipewire = { path = "../../crates/cosmic-pipewire" }
|
cosmic-pipewire = { path = "../../crates/cosmic-pipewire" }
|
||||||
futures = "0.3.32"
|
futures = "0.3.32"
|
||||||
intmap = "3.1.3"
|
intmap = "3.1.3"
|
||||||
libcosmic = { git = "https://github.com/pop-os/libcosmic", default-features = false }
|
libcosmic-yoda = { path = "/home/lionel/Projets/COSMIC/libcosmic", default-features = false }
|
||||||
numtoa = "1.0.0-alpha1"
|
numtoa = "1.0.0-alpha1"
|
||||||
rustix = "1.1.3"
|
rustix = "1.1.3"
|
||||||
tokio = { version = "1.49.0", features = ["process", "rt", "time"] }
|
tokio = { version = "1.49.0", features = ["process", "rt", "time"] }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue