Little programs or scripts or automations you’ve created ad-hoc to solve a particular single use case

I have lots of shortcuts i make on my phone and I have one i love that detects when bluetooth accidentally or purposefully disconnects from my speaker and reconnects it and fixes a playback glitch so its back to playing properly

  • jordanlund@lemmy.world
    link
    fedilink
    arrow-up
    22
    ·
    11 days ago

    I have a lot of comic book boxes:

    I created a script that lets me query the database to return the box numbers for certain content.

    I can search by writer, artist, title, character, notes, even down to issue number.

    What I’d LIKE to do is hook it into a voice recognition system and smart lights and get it to light up the boxes “Wheel of Fortune” style. But I’m aways off that yet.

  • FancyPantsFIRE@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    11 days ago

    I built a script that runs on a raspberry pi with an nfc reader and speakers. It’s setup with nfc cards to play music for my kids. they don’t use it as much as they used to but it’s still going strong after four years!

  • chunes@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    10 days ago

    I write AHK scripts to make it possible to play certain games even though I can barely use my limbs. Often this means condensing a bunch of pointless inputs into one. Other times it means hacking controller support into a game so that I can use my preferred input devices.

    Even though I fucking hate AHK as a general language, it is easily the best language for such tasks.

  • Flames5123@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    3
    ·
    10 days ago

    I have a python script that I run on my phone to scrape a few websites and return the current food trucks at my few local breweries with the times they’re there. It makes our once/twice a week dinner selections so much easier than having to manually visit 4 websites. Some sites have been updated, and I haven’t updated my script and I need to.

  • Victor@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    11 days ago

    I basically rewrote all of polybar using eww widgets because I didn’t like how polybar was too rigid in certain aspects.

    So lots of scripts handling audio control, dark/light mode, i3 workspace switching, media control, login session management, weather widgets calling external APIs, etc. It was a whole ecosystem of tools and widgets.

    I just recently bought a new computer with an AMD GPU so I’m finally running Hyprland, and now I’m using Waybar. But I might start a project to do it all again using Astal. Who knows. Or maybe Waybar will be able to suffice. We shall see.

  • neidu3@sh.itjust.worksM
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    11 days ago

    I mostly write utilities/tools like this. Some examples from my ~/bin/ folder:

    • A script that turns caps lock off and numlock on, and remaps caps lock to compose. I have this run by cron every minute.
    • A script that saves the current buffer of my continously running screen recorder to a file. Bound to the Lenovo coilot key.
    • A half-finished script that downloads and installs the latest version of discord, as Discord and ants me to manually upgrade it every time I start it.

    Edit: OH, and on my work laptop I have a script named Fnkeyfuckery. The keyboard layout is annoying in that I have to choose between Function keys or have Home+End.
    I want my function keys AND I want home+end. Luckily I don’t need F11 and F12 very often, so I’swapped around those two with their alternate function. That way I have F1 through F10, Home and End by default, and if I hold Fn I can have F11 and F12 too. It runs on startup.

    • Victor@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      11 days ago

      script that saves the current buffer of my continously running screen recorder to a file

      Curious to know why you are continuously recording your screen. Must fill up your hard drives really quickly?

      • neidu3@sh.itjust.worksM
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        11 days ago

        Why: I case I want to show something unplanned to someone. Freak accident in a game, for example.
        Disk: It’s only keeping the latest 30 minutes in a buffer. Saving basically means copying that buffer to a different file.

        • Victor@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          10 days ago

          Ah, cool.

          Sounds kind of like the Nvidia tool for Windows.

          Speaking of which, as well as your use case, I found this tool a while ago that looks and does pretty much the same thing: “GPU Screen Recorder”, found on flathub via “com.dec05eba.gpu_screen_recorder”.

          I hope it comes to use for anyone!

          • neidu3@sh.itjust.worksM
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            10 days ago

            I based my setup around Replay Magic ReplaySorcery. I’m sure there are other packages too.

                • Victor@lemmy.world
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  edit-2
                  10 days ago

                  I read through the readme and the config file example. Looks pretty neat! I might take a look at that to see if I can use it too.

                  The last release talks about a future 1.0 release, and “experimental” stuff. But that was 4 years ago.

                  Is it inactive? 🫤

  • JackLSauce@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    11 days ago

    A “full update script” so I don’t forget a package manager. It should probably be an alias but whatever, I run the script

  • jws_shadotak@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    11 days ago

    I built a Tasker program that blocks unknown numbers if toggled and allows back-to-back calls through. It uses a Minimalistic Text widget for control.

    I also built one for background images. Every time I turn my screen off, my background changes to a new (blurry, gray) picture of my wife. Double tapping will unblur and color it. I can toggle switching if I like a particular picture.

  • JoeKrogan@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    11 days ago

    Pi and touch screen photo frame . it reads a photos dir and just sets it as the background randomly every 5 mins using “feh” and “cron”.

  • blackstampede@sh.itjust.works
    link
    fedilink
    arrow-up
    2
    ·
    10 days ago

    I recently wrote a little library that adds some neat little features to enums in Rust. It’s tiny, does one thing, and does it pretty well, I think.

  • thespcicifcocean@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    10 days ago

    Once I wrote a PowerShell script to change all the public affairs officers’ job titles to pubic affairs officers on our exchange server. I never ran it, but I could have.

  • Captain Aggravated@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    10 days ago

    One or two versions before they included it by default, I wrote a Nemo Action to launch the monitor settings dialog in the right click menu when you right click the desktop.