Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize shortcut button bar #7

Open
tibortiz opened this issue Dec 13, 2024 · 2 comments
Open

Customize shortcut button bar #7

tibortiz opened this issue Dec 13, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@tibortiz
Copy link

I'm able to create my own filter with query and key-binding but the bottom seems harcoded with the default filters (all, mine, opened). And only the key-binding like m,a or o are working if I'm setting stuff it's not working

Example:

    "filters": {
      "test": {
        "key": "t",
        "filter": "tag: \"test*\"",
        "description": "Display test"
      },

In that situation, the key 't' didn't work but if I'm using replacing the "mine" alert and assign 'm' key it's working with my filter
And as described above, the status is static even if I'm editing filter name in the config

@pslestang
Copy link
Member

First of all you can customize keybindings for filters and actions (ack, unack, tag, untag, ....) so you have to take care that the keybinding you want to set does not overlap one of the default keybinding already present in configuration file.
't' keybinding is already used by 'tag' action so it may explain why you think it does not work.

If you really want to use 't' keybinding set the 'tag' action keybinding to something else and your filter should work as expected.

    "keybindings": {
      "ack": "a",
      "unack": "U",
      "close": "c",
      "tag": "e",
      "untag": "T",
      "refresh": "r",
      "next_page": "right",
      "previous_page": "left",
      "open_in_webbrowser": "ctrl+w",
      "focus_on_alerts_list": "f5",
      "focus_on_alert_details": "f6",
      "focus_on_alert_notes": "f7",
      "palette": "ctrl+p"
    },
    "filters": {
      "test": {
        "key": "t",
        "filter": "tag: \"test*\"",
        "description": "Display test"
    },

You can have a look to textual source code for keybinding combinations available:
https://github.com/Textualize/textual/blob/main/src/textual/keys.py

and for a short explanation:
https://textual.textualize.io/guide/input/#key

@pslestang pslestang added the bug Something isn't working label Dec 13, 2024
@tibortiz
Copy link
Author

The issue is probably to be due to the usage a dedicated configuration file with tygenie -c config_file
The app seems to overwrite values with the default config file content

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants