Skip to content

Commit

Permalink
Merge pull request #29 from nathan-fiscaletti/dev
Browse files Browse the repository at this point in the history
Application version: 1.2.2, Backend version: 5.8.8
  • Loading branch information
nathan-fiscaletti authored Dec 26, 2024
2 parents 05d93a0 + 60113d0 commit 03dbaf3
Show file tree
Hide file tree
Showing 14 changed files with 108 additions and 117 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<p align="center">
<img src="./application/app-rule.png" />
<img src="./docs/app-rules.png" />
</p>

## Command Line

<p align="center">
<img src="./application/cli.png" />
</p>

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

Expand Down
2 changes: 1 addition & 1 deletion application/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
21 changes: 16 additions & 5 deletions application/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Binary file added docs/add-app-rule.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions docs/app-rules.md
Original file line number Diff line number Diff line change
@@ -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
```
Binary file added docs/app-rules.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
100 changes: 0 additions & 100 deletions docs/backend.md

This file was deleted.

Binary file added docs/create.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 26 additions & 2 deletions docs/custom-profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,46 @@ 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"
```

## 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"
```

## 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
Expand Down
Binary file added docs/export.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/import.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rule-type.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "keyboardsounds"
version = "5.8.7"
version = "5.8.8"
authors = [
{ name="Nathan Fiscaletti", email="[email protected]" },
]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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="[email protected]",
Expand Down

0 comments on commit 03dbaf3

Please sign in to comment.