• 2 Posts
  • 16 Comments
Joined 5 years ago
cake
Cake day: June 7th, 2020

help-circle
  • rxxrc@lemmy.mltoLinux@lemmy.mlhook sh script to libnotify
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    3 months ago

    Libnotify backends are D-Bus services, which isn’t really something you’d want to implement in a shell script. Going by some source code I just found, it looks pretty straightforward to do in Python, so that’s one option.

    The easier option would be to use an existing notification daemon that lets you disable the default GUI and specify a script to run as a hook, but I don’t actually know of any like that.



  • Is there a reason you can’t use the generic CSV format?

    Regardless, I have tested and it doesn’t look like those IDs are used during import. Import works perfectly fine with a Zipfile containing an unencrypted JSON file, as formatted by ProtonPass export, with all those base64 strings (itemId, itemUuid, shareId) removed or blanked out:

    JSON example
    {
      "encrypted": false,
      "userId": "",
      "vaults": {
        "": {
          "name": "test",
          "description": "",
          "display": {
            "color": 0,
            "icon": 0
          },
          "items": [
            {
              "data": {
                "metadata": {
                  "name": "test-login",
                  "note": ""
                },
                "extraFields": [],
                "type": "login",
                "content": {
                  "itemEmail": "",
                  "password": "password",
                  "urls": [],
                  "totpUri": "",
                  "passkeys": [],
                  "itemUsername": "username"
                }
              },
              "state": 1,
              "aliasEmail": null,
              "contentFormatVersion": 6,
              "createTime": 1733128994,
              "modifyTime": 1733128994,
              "pinned": false
            }
          ]
        }
      },
      "version": "1.25.0"
    }
    

    When re-exporting those imported values, they have new IDs even when you include the old IDs from the original export, so they’re obviously not being used. My guess is they’re just some sort of random UUID.




  • I’m on Wayland these days, but if you happen to be using X11 this is the homebrew solution I used to use:

    xdotool type --delay 50 "$(xclip -o -sel c)"
    

    The --delay argument specifies the delay in milliseconds between keystrokes; if you go too low on that it tends to break things.

    Interested to see what solrize comes up with because this method definitely has drawbacks – no way to interrupt it and if you accidentally paste something large it takes a long time to finish due to the forced delays.

    I’ve never really had the need for a Wayland version, but I don’t see why subbing ydotool for xdotool and wl-paste for xclip wouldn’t work.







  • rxxrc@lemmy.mlto196@lemmy.blahaj.zonePoorly socialized rule
    link
    fedilink
    arrow-up
    37
    arrow-down
    1
    ·
    7 months ago

    Are we really so far down the “obligatory memetic envelope because apparently just stating opinions isn’t socially acceptable any more” slope that we’ve dropped past “can’t stop thinking about x lmao” and on to “i was talking to my sister and, get this, i said x”?




  • This is honestly quite mild by website bloat standards. If that’s really the entirety of their Javascript it’s already way smaller than e.g. Medium or what this blog post considers “slightly bloated”. The fact that it’s in one file in 13 lines is also very standard. It makes no difference to the parser whether there are newlines or not, and removing them will in fact be saving bytes.

    I’m guessing the performance issues with the site are more to do with how it’s coded. If it’s really bad for what sounds like a simple use case it might even be a cryptominer or something. A lot of those “random utility as a service” sites are.