I have a job where a part of our job is to write comments on some entries. Such as if we have edited it. This same string can get quite repetitive. Writing out initials followed by the current date. It would be amazing to have a script so each time you press a shortcut command, this script will fire and type out in the looks of "ABC YYYY-MM-DD: ". Making that process simpler. I’m quite new to Linux and thought maybe the community has some ideas. (We aren’t allowed to install any type of software due to security purposes. So if something already comes pre-baked within Ubuntu, would be quite neat! :P)

  • Ferk@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    2 days ago

    Personaly I use KeepassXC autotype functionality for this kind of thing (since I’m already using it as a password manager anyway)… I have entries that are just notes and then have the autotype command be: {NOTES}{ENTER} so it types the content of the note and presses enter.

    The nice thing is that I can leverage the autotype dialogs from Keepass so I just need to remember 1 shortcut and it will open a dialog showing different Note options based on the title of the window I’m in. It also works across platforms (which is great if at work you still need to use Windows). However, Wayland is still not supported well.

    I haven’t tried to use date/time placeholders, but in theory, they are suported in the keepass documentation (no idea if keepassXC in particular supports them): https://keepass.info/help/base/placeholders.html (check out the {CMD:/CommandLine/Options/} placeholder that lets you run arbitrary commands and optionally have their output replace the placeholder, which is very powerful)

    In the auto-type docs they also have placeholders that even allow you to add delays, switch active windows, and press all kind of key combinations. Again, I’ve not tested if all of that works in KeepassXC but if not you can always use the official keepass app.