Merge branch 'master' of https://github.com/Kirottu/anyrun
This commit is contained in:
13
plugins/applications/README.md
Normal file
13
plugins/applications/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Applications
|
||||
|
||||
## Desktop Actions
|
||||
|
||||
To enable desktop actions support, set `desktop_actions` in the applications plugin config
|
||||
file to `true` like so:
|
||||
|
||||
`<anyrun config directory>/applications.ron`:
|
||||
```ron
|
||||
Config(
|
||||
desktop_actions: true,
|
||||
)
|
||||
```
|
@@ -31,11 +31,15 @@ impl DesktopEntry {
|
||||
let mut line = None;
|
||||
let mut new_sections = Vec::new();
|
||||
|
||||
for section in sections.iter() {
|
||||
for (i, section) in sections.iter().enumerate() {
|
||||
if let Some(line) = line {
|
||||
let mut section = section.to_vec();
|
||||
section.insert(0, line);
|
||||
section.pop();
|
||||
|
||||
// Only pop the last redundant entry if it isn't the last item
|
||||
if i < sections.len() - 1 {
|
||||
section.pop();
|
||||
}
|
||||
new_sections.push(section);
|
||||
}
|
||||
line = Some(section.last().unwrap_or(&""));
|
||||
|
Reference in New Issue
Block a user