Compare commits

...

15 commits

Author SHA1 Message Date
c3bd3782da yoda: unify cosmic-text via patch.crates-io + lockfile post-1.2.0 rebase
Leyoda 2026 – GPLv3
2026-07-03 15:11:11 +02:00
30b334693f fix: adapt to cosmic-theme background(transparent) accessor
Leyoda 2026 – GPLv3
2026-07-03 15:02:11 +02:00
00e4487038 chore: align about license metadata 2026-07-03 15:01:39 +02:00
cc2c274538 chore: align editor with local files stack 2026-07-03 15:01:21 +02:00
229b92c507 yoda: relocate local fork paths from ~/Devels to ~/Projets/COSMIC
Mise à jour des path= absolus (window_clipboard, dnd, mime, cosmic-text)
après consolidation des forks cosmic-* sous ~/Projets/COSMIC/.

Leyoda 2026 – GPLv3
2026-07-03 15:01:21 +02:00
cde36b1a5f yoda wayland-v5: redirect window_clipboard + cosmic-text to local forks
Propagates the [patch] blocks added in cosmic-yoterm v5 to keep the
whole yoda app family on a single Wayland-only stack. Without these,
iced_winit fails to select a window_clipboard version because our
fork exposes a `wayland` feature that upstream doesn't.

- window_clipboard → /home/lionel/Devels/window_clipboard (x11 gated
  behind opt-in feature)
- cosmic-text → /home/lionel/Devels/cosmic-text (EAW terminal_cells +
  upstream PR#503 applied)
2026-07-03 15:01:21 +02:00
6effc415e1 yoda: rewire onto libcosmic-yoda + leyoda/cosmic-files paths
- libcosmic git dep replaced by libcosmic-yoda = { path = ../libcosmic }
- cosmic-files git dep replaced by path = ../cosmic-files (leyoda fork)
- winit feature dropped from libcosmic-yoda deps, wayland added
- feature refs libcosmic/* -> libcosmic-yoda/*
- [patch] block for pop-os/libcosmic removed

Installed at /usr/bin/cosmic-edit. Pre-yoda binary kept as
/usr/bin/cosmic-edit.pre-yoda-fork.
2026-07-03 15:01:21 +02:00
Votre Nom
2600c6d38a Cargo.toml: patch libcosmic via local path for dev builds
Activates the [patch.'https://github.com/pop-os/libcosmic'] override
pointing at ../libcosmic, enabling local development against a
patched libcosmic checkout (e.g. to pick up
WindowControlsPosition / macOS-style window controls).

This branch is intentionally dev-local: do NOT merge upstream.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-07-03 15:01:06 +02:00
Nathan Rowe
dfcef22632 Save file to recents on save 2026-06-30 15:58:35 -04:00
Jeremy Soller
495f52cd5b Epoch 1.2.0 version update
Generated by cosmic-epoch scripts/version-update.sh
2026-06-30 13:37:33 -06:00
Hojjat
eae9127fbe fix: add alt_clipboard bindings 2026-06-25 14:06:11 +02:00
Jeremy Soller
6ce200c84b Epoch 1.1.0 version update
Generated by cosmic-epoch scripts/version-update.sh
2026-06-23 10:24:19 -06:00
Michael Aaron Murphy
b6627523f9 fix: add application/x-zerosize mime type association 2026-06-17 19:08:10 -04:00
Jeremy Soller
00a76ee709 Epoch 1.0.16 version update
Generated by cosmic-epoch scripts/version-update.sh
2026-06-09 11:29:30 -06:00
Jeremy Soller
bf217ab250 Epoch 1.0.15 version update
Generated by cosmic-epoch scripts/version-update.sh
2026-06-02 11:46:28 -06:00
8 changed files with 495 additions and 720 deletions

1090
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
[package]
name = "cosmic-edit"
version = "1.0.14"
version = "1.2.0"
authors = ["Jeremy Soller <jeremy@system76.com>"]
edition = "2024"
license = "GPL-3.0-only"
@ -33,7 +33,7 @@ i18n-embed-fl = "0.10"
rust-embed = "8"
[dependencies.cosmic-files]
git = "https://github.com/pop-os/cosmic-files.git"
path = "../cosmic-files"
default-features = false
[dependencies.cosmic-syntax-theme]
@ -43,11 +43,12 @@ git = "https://github.com/pop-os/cosmic-syntax-theme.git"
version = "0.19"
features = ["syntect", "vi"]
[dependencies.libcosmic]
git = "https://github.com/pop-os/libcosmic.git"
# Yoda fork.
[dependencies.libcosmic-yoda]
path = "../libcosmic"
default-features = false
#TODO: a11y feature crashes file choser dialog
features = ["about", "multi-window", "tokio", "winit", "surface-message"]
features = ["about", "multi-window", "tokio", "wayland", "surface-message"]
[target.'cfg(unix)'.dependencies]
fork = "0.2"
@ -57,16 +58,24 @@ xdgen = "0.1"
[features]
default = ["dbus-config", "gvfs", "wgpu", "wayland"]
dbus-config = ["libcosmic/dbus-config"]
dbus-config = ["libcosmic-yoda/dbus-config"]
gvfs = ["cosmic-files/gvfs"]
wgpu = ["libcosmic/wgpu", "cosmic-files/wgpu"]
wayland = ["libcosmic/wayland", "cosmic-files/wayland"]
wgpu = ["libcosmic-yoda/wgpu", "cosmic-files/wgpu"]
wayland = ["libcosmic-yoda/wayland", "cosmic-files/wayland"]
[profile.release-with-debug]
inherits = "release"
debug = true
# [patch.'https://github.com/pop-os/libcosmic']
# libcosmic = { git = "https://github.com/pop-os/libcosmic//" }
# cosmic-config = { git = "https://github.com/pop-os/libcosmic//" }
# cosmic-theme = { git = "https://github.com/pop-os/libcosmic//" }
[patch.crates-io]
onig = { git = "https://github.com/rust-onig/rust-onig.git", branch = "main" }
onig_sys = { git = "https://github.com/rust-onig/rust-onig.git", branch = "main" }
# Yoda: unify cosmic-text with the local checkout used by libcosmic/iced/glyphon.
cosmic-text = { path = "../cosmic-text" }
# Yoda wayland cut v5: redirect window_clipboard to the local fork
# (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" }

24
debian/changelog vendored
View file

@ -1,3 +1,27 @@
cosmic-edit (1.2.0) noble; urgency=medium
* Epoch 1.2.0 version update
-- Jeremy Soller <jeremy@system76.com> Tue, 30 Jun 2026 12:20:53 -0600
cosmic-edit (1.1.0) noble; urgency=medium
* Epoch 1.1.0 version update
-- Jeremy Soller <jeremy@system76.com> Tue, 23 Jun 2026 08:47:04 -0600
cosmic-edit (1.0.16) noble; urgency=medium
* Epoch 1.0.16 version update
-- Jeremy Soller <jeremy@system76.com> Tue, 09 Jun 2026 10:25:21 -0600
cosmic-edit (1.0.15) noble; urgency=medium
* Epoch 1.0.15 version update
-- Jeremy Soller <jeremy@system76.com> Tue, 02 Jun 2026 11:02:06 -0600
cosmic-edit (1.0.14) noble; urgency=medium
* Epoch 1.0.14 version update

View file

@ -5,7 +5,7 @@ Exec=cosmic-edit %F
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/plain;
MimeType=text/plain;application/x-zerosize;
Icon=com.system76.CosmicEdit
Categories=COSMIC;Utility;TextEditor;
Keywords=Text;Editor;

View file

@ -26,6 +26,9 @@ pub fn key_binds() -> HashMap<KeyBind, Action> {
bind!([Ctrl], Key::Character("f".into()), Find);
bind!([Ctrl], Key::Character("h".into()), FindAndReplace);
bind!([Ctrl], Key::Character("v".into()), Paste);
bind!([Shift], Key::Named(Named::Insert), Paste);
bind!([Ctrl], Key::Named(Named::Insert), Copy);
bind!([Shift], Key::Named(Named::Delete), Cut);
bind!([Ctrl], Key::Character("t".into()), NewFile);
bind!([Ctrl], Key::Character("n".into()), NewWindow);
bind!([Ctrl], Key::Character("o".into()), OpenFileDialog);

View file

@ -691,13 +691,7 @@ impl App {
return Some(NewTab::Exists(entity));
}
// Add to recent files, ensuring only one entry
self.config_state.recent_files.retain(|x| x != &canonical);
self.config_state
.recent_files
.push_front(canonical.to_path_buf());
self.config_state.recent_files.truncate(10);
self.save_config_state();
self.add_to_recents(&canonical);
let mut tab = EditorTab::new(&self.config);
tab.open(canonical);
@ -707,6 +701,15 @@ impl App {
}
}
fn add_to_recents(&mut self, canonical: &PathBuf) {
self.config_state.recent_files.retain(|x| x != canonical);
self.config_state
.recent_files
.push_front(canonical.to_path_buf());
self.config_state.recent_files.truncate(10);
self.save_config_state();
}
fn update_config(&mut self) -> Task<Message> {
//TODO: provide iterator over data
let entities: Vec<_> = self.tab_model.iter().collect();
@ -1455,6 +1458,7 @@ impl Application for App {
.author("System76")
.comments(fl!("comment"))
.license("GPL-3.0-only")
.license_url("https://spdx.org/licenses/GPL-3.0-only")
.developers([("Jeremy Soller", "jeremy@system76.com")])
.links([
(fl!("repository"), "https://github.com/pop-os/cosmic-edit"),
@ -2586,11 +2590,18 @@ impl Application for App {
let entity = entity_opt.unwrap_or_else(|| self.tab_model.active());
if let Some(Tab::Editor(tab)) = self.tab_model.data_mut::<Tab>(entity) {
if tab.path_opt.is_none() {
return self.update(Message::SaveAsDialog(Some(entity)));
match tab.path_opt.clone() {
Some(path) => {
title_opt = Some(tab.title());
tab.save();
if let Ok(canonical) = fs::canonicalize(&path) {
self.add_to_recents(&canonical);
}
}
None => {
return self.update(Message::SaveAsDialog(Some(entity)));
}
}
title_opt = Some(tab.title());
tab.save();
}
if let Some(title) = title_opt {
self.tab_model.text_set(self.tab_model.active(), title);
@ -2601,10 +2612,17 @@ impl Application for App {
let entities: Vec<_> = self.tab_model.iter().collect();
for entity in entities {
if let Some(Tab::Editor(tab)) = self.tab_model.data_mut::<Tab>(entity) {
if tab.path_opt.is_none() {
log::warn!("{} has no path when doing save all", tab.title());
match tab.path_opt.clone() {
Some(path) => {
tab.save();
if let Ok(canonical) = fs::canonicalize(&path) {
self.add_to_recents(&canonical);
}
}
None => {
log::warn!("{} has no path when doing save all", tab.title());
}
}
tab.save();
}
}
return self.update_dialogs();
@ -2648,6 +2666,11 @@ impl Application for App {
tab.path_opt = Some(paths.remove(0));
title_opt = Some(tab.title());
tab.save();
if let Some(path) = tab.path_opt.clone() {
if let Ok(canonical) = fs::canonicalize(&path) {
self.add_to_recents(&canonical);
}
}
}
if let Some(title) = title_opt {
self.tab_model.text_set(entity, title);

View file

@ -121,7 +121,7 @@ pub fn context_menu<'a>(
entity: segmented_button::Entity,
) -> Element<'a, Message> {
fn key_style(theme: &cosmic::Theme) -> TextStyle {
let mut color = theme.cosmic().background.component.on;
let mut color = theme.cosmic().background(false).component.on;
color.alpha *= 0.75;
TextStyle {
color: Some(color.into()),
@ -160,7 +160,7 @@ pub fn context_menu<'a>(
//TODO: move style to libcosmic
.style(|theme| {
let cosmic = theme.cosmic();
let component = &cosmic.background.component;
let component = &cosmic.background(false).component;
widget::container::Style {
icon_color: Some(component.on.into()),
text_color: Some(component.on.into()),

View file

@ -825,7 +825,7 @@ where
let scrollbar_color = if pressed {
// pressed_state_color, 0.5
cosmic_theme
.background
.background(false)
.component
.pressed
.without_alpha()
@ -834,7 +834,7 @@ where
} else if hover {
// hover_state_color, 0.2
cosmic_theme
.background
.background(false)
.component
.hover
.without_alpha()
@ -921,7 +921,7 @@ where
let scrollbar_color = if pressed {
// pressed_state_color, 0.5
cosmic_theme
.background
.background(false)
.component
.pressed
.without_alpha()
@ -930,7 +930,7 @@ where
} else if hover {
// hover_state_color, 0.2
cosmic_theme
.background
.background(false)
.component
.hover
.without_alpha()