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

cmdline dropdown missing comma #765

Open
martinmagnusson opened this issue Sep 14, 2024 · 3 comments
Open

cmdline dropdown missing comma #765

martinmagnusson opened this issue Sep 14, 2024 · 3 comments

Comments

@martinmagnusson
Copy link

Now that v3.0.3 requires a comma before the tag in the cmdline, the behaviour of the cmdline dropdown list is inconvenient/inconsistent. The dropdown lists previous activities with tags, but without the comma, so if I select one of my previous tagged activities, I get a new activity with a category named "Category #Tag" instead of "Category" with the corresponding "Tag". The dropdown should rather have commas in the right place.

@Johann-Tree
Copy link

This is very annoying, that the dropdown doesn't have the comma. I hope this is soon to be fixed.

@storymode7
Copy link

storymode7 commented Mar 24, 2025

If you installed hamster using the package manager, .deb packages etc. then this worked for me:

  1. Open terminal
  2. Run python3 -c "import hamster.widgets.activityentry; print(hamster.widgets.activityentry.__file__)"
  3. Open the file shown
  4. Around line 314 you'll find this snippet:
            if fact.tags:
                label += " #%s" % (" #".join(fact.tags))
                suggestions[label] += days

Change label line to this:

                label += ", #%s" % (" #".join(fact.tags))

It rebuilds the cmdline using recent used tasks + category + tags. The change just adds a , before the first tag

@Johann-Tree
Copy link

@storymode7 Thanks a lot, I was able to fix this bug using your answer on my flatpak install:

  1. Stop all hamster processes
  2. Open terminal
  3. Run locate activityentry.py
  4. Open the file shown with root - on Ubuntu the path is something like /var/lib/flatpak/app/org.gnome.Hamster/x86_64/stable/3e396e9f00fe87a8bf151ee2a390aee4a815c3f7611b4cbf341c407f49e0f619/files/lib/python3.11/site-packages/hamster/widgets/activityentry.py
  5. Edit file (add comma) as shown above
  6. Remove cache files starting with activityentry in subfolder __pycache__ where activityentry.py is located
  7. Start hamster again

When the fix is that easy, I hope it is soon to be fixed in the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants