• renzev@lemmy.worldOP
      link
      fedilink
      arrow-up
      2
      ·
      5 days ago

      You could do it in any shell by replacing touch with a function or alias that sends a note to whatever GTK subsystem is responsible for the “recents” tab before making the file. A more comprehensive way would be either using inotify or kernel-level process tracing fuckery, but I’m not smart enough for that

      • thedeadwalking4242@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        5 days ago

        True, but I was thinking the shell would be the best place. You can have with watch for file modifications preformed by the user and reach out to nautilus to update its recents. That way you don’t have to watch for all inotify events on receiving user updates, and you get all tools not just touch