yegle / fava-docker

A Dockerfile for beancount-fava
MIT License
94 stars 49 forks source link

Change showCharts keyboard shorcut default: "Control+c" #17

Open larryopoly opened 2 years ago

larryopoly commented 2 years ago

Thanks for maintaining this repo. Is it possible/feasible to change the default shortcut for showing/hiding the charts? I often want copy amount or balance and have to right click and select copy versus just pressing Ctrl+c. Perhaps replacing this Alt+c would work?

I thought I could just update or comment out the code from here like so:

<button
    type="button"
    on:click={() => showCharts.update((v) => !v)}
    // use:keyboardShortcut={"Control+c"} <--- comment out this line
    class:closed={!$showCharts}
    class="toggle-chart"
  />

I'm not sure how to properly enter the docker container and access the files. Here's my docker-compose file if it makes any difference:

version: "3.7"
services:
  fava:
    image: yegle/fava
    ports:
      - 5000:5000
    volumes:
    - /path/to/beanfile:/data/
    environment:
      BEANCOUNT_FILE: /data/main.bean

Any guidance is helpful here, thanks.

yegle commented 2 years ago

It would be better to report this to the upstream.

If you are OK with building this image locally I believe you can generate a patch file, modify the Dockerfile with an extra patch step before the make step.

Insert your patch step before this make line: https://github.com/yegle/fava-docker/blob/49463a279bd70a7967abe63e0742623c30900e46/Dockerfile#L17