Skip to content

Commit

Permalink
Merge pull request #21 from OpenVoiceOS/release-0.3.4a1
Browse files Browse the repository at this point in the history
Release 0.3.4a1
  • Loading branch information
JarbasAl authored Oct 17, 2024
2 parents bccb3d5 + 32a1552 commit e9cdc9c
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 14 deletions.
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Changelog

## [0.3.3a1](https://github.com/OpenVoiceOS/ovos-skill-application-launcher/tree/0.3.3a1) (2024-10-17)
## [0.3.4a1](https://github.com/OpenVoiceOS/ovos-skill-application-launcher/tree/0.3.4a1) (2024-10-17)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-skill-application-launcher/compare/V0.3.2...0.3.3a1)
[Full Changelog](https://github.com/OpenVoiceOS/ovos-skill-application-launcher/compare/V0.3.3...0.3.4a1)

**Merged pull requests:**

- fix:close\_by\_window [\#18](https://github.com/OpenVoiceOS/ovos-skill-application-launcher/pull/18) ([JarbasAl](https://github.com/JarbasAl))
- better docs and skill settings [\#20](https://github.com/OpenVoiceOS/ovos-skill-application-launcher/pull/20) ([JarbasAl](https://github.com/JarbasAl))

## [V0.3.2](https://github.com/OpenVoiceOS/ovos-skill-application-launcher/tree/V0.3.2) (2024-10-17)
## [V0.3.3](https://github.com/OpenVoiceOS/ovos-skill-application-launcher/tree/V0.3.3) (2024-10-17)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-skill-application-launcher/compare/0.3.2...V0.3.2)
[Full Changelog](https://github.com/OpenVoiceOS/ovos-skill-application-launcher/compare/0.3.3...V0.3.3)



Expand Down
38 changes: 32 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,51 @@
# <img src='https://rawgithub.com/FortAwesome/Font-Awesome/master/svgs/solid/spinner.svg' card_color='#22a7f0' width='50' height='50' style='vertical-align:bottom'/> Application Launcher

Application Launcher

## About
## About

Launch applications on the Linux desktop

The standard directories will be scanned for [.desktop files](https://wiki.archlinux.org/title/desktop_entries), application names and execution commands will be parsed from there
The standard directories will be scanned for [.desktop files](https://wiki.archlinux.org/title/desktop_entries),
application names and execution commands will be parsed from there

Scanned folders:
- /usr/share/applications/
- /usr/local/share/applications/
- ~/.local/share/applications/

## Examples
- /usr/share/applications/
- /usr/local/share/applications/
- ~/.local/share/applications/

## Examples

* "Open Volume Control"
* "Launch Firefox"
* "Close Firefox"

## Configuration Options in `settings.json`

To customize the behavior of the Application Launcher skill, you can modify the following options in the `settings.json` file:

| Option | Type | Default Value | Description |
|----------------------|------------------------|-------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|
| `aliases` | `Dict[str, List[str]]` | `{"kcalc": ["calculator"]}` | Defines application aliases. Use application names from the `.desktop` file as keys and a list of speech-friendly names as values. |
| `user_commands` | `Dict[str, str]` | `{}` | User-defined application commands. Map application names to their corresponding bash commands. |
| `thresh` | `float` | `0.85` | The threshold for string matching. Lower values will allow more lenient matches for application names. |
| `skip_categories` | `List[str]` | `["Settings", "ConsoleOnly", "Building"]` | Categories in desktop files that exclude application from being considered. |
| `skip_keywords` | `List[str]` | `[]` | Keywords in desktop files that exclude application from being considered. |
| `target_categories` | `List[str]` | `[]` | Categories in desktop files required for application to be considered. |
| `target_keywords` | `List[str]` | `[]` | Keywords in desktop files required for application to be considered. |
| `blacklist` | `List[str]` | `[]` | List of applications to ignore during scanning (application names from the `.desktop` file). |
| `require_icon` | `bool` | `True` | If set to `True`, only include applications that have an icon defined in their `.desktop` file. |
| `require_categories` | `bool` | `True` | If set to `True`, only include applications that have at least one category defined in their `.desktop` file. |
| `terminate_all` | `bool` | `False` | If `True`, will terminate all matching processes when closing applications. |
| `shell` | `bool` | `False` | If `True`, allows commands to be executed in a shell environment. |

## Category

**Productivity**

## Tags

#desktop
#desktop-launch
#desktop-launcher
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def launch_app(self, app: str) -> bool:
LOG.info(f"Matched application: {app} (command: {cmd})")
try:
# Launch the application in a new process without blocking
subprocess.Popen(shlex.split(cmd))
subprocess.Popen(shlex.split(cmd), shell=self.settings.get("shell", False))
return True
except Exception as e:
LOG.error(f"Failed to launch {app}: {e}")
Expand Down
4 changes: 2 additions & 2 deletions version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# START_VERSION_BLOCK
VERSION_MAJOR = 0
VERSION_MINOR = 3
VERSION_BUILD = 3
VERSION_ALPHA = 0
VERSION_BUILD = 4
VERSION_ALPHA = 1
# END_VERSION_BLOCK

0 comments on commit e9cdc9c

Please sign in to comment.