diff --git a/README.md b/README.md index 8115404..dada934 100644 --- a/README.md +++ b/README.md @@ -66,21 +66,19 @@ Read more about creating and editing profiles [here](./docs/custom-profiles.md). ## Application Rules -Keyboard Sounds supports application rules in which you can control the behavior of the sound daemon based on the currently running applications. Read more about application rules [here](./docs/backend.md#managing-application-rules-windows-only) +Keyboard Sounds supports application rules in which you can control the behavior of the sound daemon based on the currently running applications. + +Read more about application rules [here](./docs/app-rules.md).

- +

## Command Line -

- -

- Keyboard Sounds has a comprehensive backend that can be used to manage the daemon, application rules, and profiles. This backend can be accessed via the command line interface (CLI) in your terminal application. -Read more about backend usage [here](./docs/backend.md). +Run `kbs --help` to see a list of available commands. ## Uninstalling diff --git a/application/package.json b/application/package.json index ae76c5e..ce372e0 100644 --- a/application/package.json +++ b/application/package.json @@ -1,7 +1,7 @@ { "name": "kbs-electron", "productName": "Keyboard Sounds", - "version": "1.2.1", + "version": "1.2.2", "description": "https://keyboardsounds.net/", "main": ".webpack/main", "repository": { diff --git a/application/src/main.js b/application/src/main.js index b8b7fe7..bd62283 100644 --- a/application/src/main.js +++ b/application/src/main.js @@ -311,11 +311,22 @@ app.whenReady().then(() => { // Create a system tray icon and context menu for the application. tray = new Tray(AppIcon); const contextMenu = Menu.buildFromTemplate([ - { label: 'Quit', type: 'normal', click: () => { - kbs.exec('stop').finally(() => { - process.exit(0); - }); - }}, + { + label: 'Create Profile', + type: 'normal', + click: () => { + kbs.showEditorWindow(); + }, + }, + { + label: 'Quit', + type: 'normal', + click: () => { + kbs.exec('stop').finally(() => { + process.exit(0); + }); + }, + }, ]); tray.setToolTip(APP_NAME); tray.setContextMenu(contextMenu); diff --git a/docs/add-app-rule.png b/docs/add-app-rule.png new file mode 100644 index 0000000..3dfb98e Binary files /dev/null and b/docs/add-app-rule.png differ diff --git a/docs/app-rules.md b/docs/app-rules.md new file mode 100644 index 0000000..a2e186c --- /dev/null +++ b/docs/app-rules.md @@ -0,0 +1,58 @@ +# Keyboard Sounds: Application Rules + +![Application Rules](./app-rules.png) + +**⚠️ Application Rules are only available on Windows** + +## Index + +- [Rule Types](#rule-types) +- [Add and Remove Rules](#add-and-remove-rules) +- [Set the global rule](#set-the-global-rule) + +## Rule Types + +![Rule Types](./rule-type.png) + +- `enable` - Enable sound effects for the application. +- `disable` - Disable sound effects for the application. +- `exclusive` - Only play sound effects for the application. + +> The global rule can only be set to `enable` or `disable`. By default, the global rule is set to `enable`. + +## Add and Remove Rules + +### In Application + +You can add and remove rules in the Application Rules section of the application. + +![Add and Remove Rules](./add-app-rule.png) + +### From the Command Line + +```bash +# Add a rule to disable sound effects for an application +$ kbs add-rule -r disable -a "C:\Program Files\MyApp\MyApp.exe" + +# Remove a rule for an application +$ kbs remove-rule -a "C:\Program Files\MyApp\MyApp.exe" +``` + +## List Rules + +```bash +# List the currently loaded rules +$ kbs list-rules +``` + +## Set the global rule + +> The global rule is used as the fallback for any application that does not have a specific rule set. By default, it is set to `enable`. + +```bash +# Set the global rule to disable +$ kbs set-global-rule -r disable + +# Retrieve the current global rule +$ kbs get-global-rule +``` \ No newline at end of file diff --git a/docs/app-rules.png b/docs/app-rules.png new file mode 100644 index 0000000..6147bf2 Binary files /dev/null and b/docs/app-rules.png differ diff --git a/docs/backend.md b/docs/backend.md deleted file mode 100644 index 932943b..0000000 --- a/docs/backend.md +++ /dev/null @@ -1,100 +0,0 @@ -# Keyboard Sounds: Command Line - -Keyboard Sounds has a comprehensive backend that can be used to manage the daemon, application rules, and profiles. This backend can be accessed via the command line interface (CLI) in your terminal application. - -## Index - -- [Managing the Daemon](#manage-the-daemon) -- [Manage Profiles](#manage-profiles) -- [Managing Application Rules (Windows Only)](#managing-application-rules-windows-only) - -## Manage the Daemon - -**Start or reconfigure the daemon** - -```bash -# Start with default volume of 100% -$ kbs start - -# Start or reconfigure with a volume of 50% -$ kbs start -v 50 - -# Start or reconfigure with a specific profile -$ kbs start -p typewriter -``` - -**Check the current status of the daemon** - -```bash -$ kbs status -``` - -**Stop the daemon if it is running** - -```bash -$ kbs stop -``` - -## Manage Profiles - -```bash -# Create a new profile -$ kbs new -n "My Profile" - -# Export an existing profile -$ kbs export-profile -n "My Profile" -o "My Profile.zip" - -# List downloadable profiles -$ kbs list-profiles --remote - -# List installed profiles -$ kbs list-profiles - -# Download a profile -$ kbs download-profile -n myprofile - -# Import a profile -$ kbs add-profile -z ./my-profile.zip - -# Remove a profile -$ kbs remove-profile -n myprofile -``` - -## Managing Application Rules (Windows Only) - -Keyboard Sounds supports the ability to enable or disable the typing sound effects for specific applications. You can also set a global rule that will be used for all applications that do not have a specific rule set. - -**⚠️ Application Rules are only available on Windows** - -### Rule Types - -- `enable` - Enable sound effects for the application. -- `disable` - Disable sound effects for the application. -- `exclusive` - Only play sound effects for the application. - -> The global rule can only be set to `enable` or `disable`. By default, the global rule is set to `enable`. - -### Examples - -```bash -# Add a rule to disable sound effects for an application -$ kbs add-rule -r disable -a "C:\Program Files\MyApp\MyApp.exe" - -# Remove a rule for an application -$ kbs remove-rule -a "C:\Program Files\MyApp\MyApp.exe" - -# List the currently loaded rules -$ kbs list-rules -``` - -### Set the global rule - -> The global rule is used as the fallback for any application that does not have a specific rule set. By default, it is set to `enable`. - -```bash -# Set the global rule to disable -$ kbs set-global-rule -r disable - -# Retrieve the current global rule -$ kbs get-global-rule -``` \ No newline at end of file diff --git a/docs/create.png b/docs/create.png new file mode 100644 index 0000000..fc13bba Binary files /dev/null and b/docs/create.png differ diff --git a/docs/custom-profiles.md b/docs/custom-profiles.md index 4a8fc56..2bb27c9 100644 --- a/docs/custom-profiles.md +++ b/docs/custom-profiles.md @@ -15,7 +15,15 @@ Keyboard Sounds comes bundled with eleven built-in sound profiles and supports c ## Importing a profile -Profiles can be imported from a ZIP file using the [`add-profile`](./backend.md#manage-profiles) action. +### In Application + +To import a profile in the application, use the "Import" button in the Profiles section. + +![Import](./import.png) + +### From the Command Line + +Profiles can be imported from a ZIP file using the `add-profile` action. ```bash $ kbs add-profile -z "./my-profile.zip" @@ -23,7 +31,15 @@ $ kbs add-profile -z "./my-profile.zip" ## Exporting an existing profile -Profiles can be exported from the command line using the [`export-profile`](./backend.md#manage-profiles) action. +### In Application + +To export a profile in the application, use the "Export" button in the Profiles section. + +![Export](./export.png) + +### From the Command Line + +Profiles can be exported from the command line using the `export-profile` action. ```bash $ kbs export-profile -n my-profile -o "./my-profile.zip" @@ -31,6 +47,14 @@ $ kbs export-profile -n my-profile -o "./my-profile.zip" ## Creating a new Profile +### Using the Editor + +To create a new profile using the editor, use the "Create" button in the Profiles section of the application. + +![Create](./create.png) + +### From the Command Line + Create a new profile using the following command: ```bash diff --git a/docs/export.png b/docs/export.png new file mode 100644 index 0000000..7659029 Binary files /dev/null and b/docs/export.png differ diff --git a/docs/import.png b/docs/import.png new file mode 100644 index 0000000..5228cd8 Binary files /dev/null and b/docs/import.png differ diff --git a/docs/rule-type.png b/docs/rule-type.png new file mode 100644 index 0000000..b6a5e0c Binary files /dev/null and b/docs/rule-type.png differ diff --git a/pyproject.toml b/pyproject.toml index 6436f1a..b2e5f4b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "keyboardsounds" -version = "5.8.7" +version = "5.8.8" authors = [ { name="Nathan Fiscaletti", email="nate.fiscaletti@gmail.com" }, ] diff --git a/setup.py b/setup.py index 5d61fbc..25b031c 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="keyboardsounds", - version="5.8.7", + version="5.8.8", description="Adds the ability to play sounds while typing on any system.", author="Nathan Fiscaletti", author_email="nate.fiscaletti@gmail.com",