Results 1 to 5 of 5

Thread: Closing a folder right after opening a file

  1. #1
    Join Date
    Apr 2020
    Beans
    22

    Closing a folder right after opening a file

    Hello Ubuntu Community,

    I wanted to ask if there is any way to program a behavior so that when I open a file, the folder that contained that file closes behind it right away.

    Any help would be appreciated, thanks!

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    21,315
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Closing a folder right after opening a file

    Why not just open the file without opening the directory?
    I must be missing something in your workflow.

    You can open most files from the program that can read that file by passing the filename in as the last option on the command. If the same file will be opened daily, just setup script. For example:
    Code:
    libreoffice "~/GTD-Todo.ods" &
    Put that into a file, name it whatever you like, chmod +x it, and now you can run it from anywhere. Depending on the DE you run, you can place a launcher on the desktop for it. I don't think gnome3 supports that, by other DEs do.

  3. #3
    Join Date
    May 2009
    Beans
    33

    Re: Closing a folder right after opening a file

    You may want to use a folder menu on your panel. It gives you a drop-down menu of any folder, and when you click a file, the menu closes and the file opens.

    Is that what you're looking for?

  4. #4
    Join Date
    Apr 2020
    Beans
    22

    Re: Closing a folder right after opening a file

    Yes sir, that is awesome, thanks!

  5. #5
    Join Date
    May 2009
    Beans
    33

    Re: Closing a folder right after opening a file

    To make it show files (not just folders), you need to type an asterisk in the File pattern box:



    (Sorry, can only screenshot the Swedish language version)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •