-
Couldn't load subscription status.
- Fork 103
Support launching app in terminal #718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
src/desktop.rs
Outdated
| if !arg.starts_with('%') { | ||
| cmd.arg(arg); | ||
| let mut cmd = if terminal { | ||
| let mut cmd = std::process::Command::new("cosmic-term"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if cosmic-term is not installed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I'll try to come up with something. I see that cosmic-files handles this. And I assume the code for command + t also handles this but I haven't found that yet.
65f4422 to
2b7d171
Compare
2b415c9 to
b450653
Compare
b450653 to
97e501d
Compare
- Get terminal setting from desktop file - Launch app in terminal if set
- Add optional language sorter parameter to MimeAppCache::reload() - Use mime_app::exec_term_command in desktop::spawn_desktop_exec() - Add function mime_app::exec_term_to_command() to get exec command using terminal with fallback - Use this in MimeApp::command() - Use this in desktop::spawn_desktop_exec()
97e501d to
55ad8f9
Compare
| [target.'cfg(unix)'.dependencies] | ||
| freedesktop-icons = { package = "cosmic-freedesktop-icons", git = "https://github.com/pop-os/freedesktop-icons" } | ||
| freedesktop-desktop-entry = { version = "0.5.1", optional = true } | ||
| freedesktop_entry_parser = "1.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parsing of desktop entries is already provided by freedesktop-desktop-entry in the line above.
This supports pop-os/cosmic-epoch#735
Requires: pop-os/cosmic-term#380