Skip to content

Commit

Permalink
Small adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
dynobo committed May 15, 2020
1 parent 9e32118 commit 8f822fa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
26 changes: 12 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

The tool can be started by `python -m keyhint` or simply `keyhint`. But as the **keyhint** displays hints based on the currently active window, you probably want to configure a **global hotkey** to trigger it on demand.

Based on the **process name** and **window title**, different sets of hints can be displayed.
Based on the **process name** and **window title** of the active window, different sets of hints are displayed.

_Screenshots of some hints:_

Expand All @@ -27,37 +27,35 @@ _Screenshots of some hints:_

### Look & Behavior

You can configure colors, font and closing behavior by modifying

`<CONFIG_PATH>/keyhint/config.yaml`
- You can configure colors, font and closing behavior by modifying the file<br>
`<CONFIG_PATH>/keyhint/config.yaml`

### Hints

You can also configure the hints to show for different applications by modifying or adding section in

`<CONFIG_PATH>/keyhint/hints.yaml`
- You can also configure the hints to show for different applications by modifying or adding section in the file<br>
`<CONFIG_PATH>/keyhint/hints.yaml`

The shown hints are selected by going through all sections from top to bottom and comparing the value of `regex_process` with the process name of the active window and the value of `regex_title` with the title of the active window. The first section, where both values are found, gets displayed.
- The hints to display are selected by going through all sections from top to bottom and comparing the value of `regex_process` with the process name of the active window and the value of `regex_title` with the title of the active window. The first section, where both values are found, gets displayed.

(Both of those `regex_` values are interpreted as **case insensitive regular expressions**!)
- Both of those `regex_` values are interpreted as **case insensitive regular expressions**.)

### Notes

The `<CONFIG_PATH>` can be different from system to system, on Linux it's usually `~/.config`, on Windows it should be `C:\Users\<YOURNAME>\AppData\Roaming`.
- The `<CONFIG_PATH>` can be different from system to system. On Linux it's usually `~/.config`, on Windows it should be `C:\Users\<YOURNAME>\AppData\Roaming`.

You can reset configuration or hints to the shipped version by deleting the `yaml` files from the configuration folder.
- You can **reset configuration or hints** to the shipped version by deleting the `yaml` files from the configuration folder.

## Tips

**Differentiate Websites:**

For showing different browser-hints depending on the current website, you might want to use a browser extension like "[Add URL To Window Title](https://addons.mozilla.org/en-US/firefox/addon/add-url-to-window-title/)" and then configure the sections in `hints.yaml` to look for the URL in the window title.
- For showing different browser-hints depending on the current website, you might want to use a browser extension like "[Add URL To Window Title](https://addons.mozilla.org/en-US/firefox/addon/add-url-to-window-title/)" and then configure the sections in `hints.yaml` to look for the URL in the window title.

**Differentiate Multi Platform:**

Sometimes the hints you want to show are the same for e.g. Linux and Windows. In that case, you might want to set e.g. `regex_process: firefox.*` to match with `Firefox` (Linux) as well as with `Firefox.exe` (Windows).
- Sometimes the hints you want to show are the same for e.g. Linux and Windows. In that case, you might want to set e.g. `regex_process: firefox.*` to match with `Firefox` (Linux) as well as with `Firefox.exe` (Windows).

If you want to show different hints for the same tool depending on the platform, use two sections, one with `regex_process: firefox(?!\.exe)` (Linux) and one with `regex_process: firefox\.exe` (Windows).
- If you want to show different hints for the same tool depending on the platform, use two sections, one with `regex_process: firefox(?!\.exe)` (Linux) and one with `regex_process: firefox\.exe` (Windows).

## Contribute

Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
setup(
name="keyhint",
version=keyhint.__version__,
description="_Display context-sensitive keyboard shortcuts or other hints on Linux and Windows",
description="Display context-sensitive keyboard shortcuts or"
+ " other hints on Linux and Windows",
keywords="shortcuts keybindings hints helper reminder",
long_description=readme,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 8f822fa

Please sign in to comment.