Mac users
How many times did you try to create a txt or md file inside you finder app and could not do that?
do you know any app that add these options or should I build it myself
Commit
8c3e0e7
i use shortcuts that runs this apple script. it infers the current folder of the focused finder window, defaults to desktop if no window is open or they are minimized. you can also right click finder > services > your shortcut
applescript
tell application "System Events" set frontAppName to name of first process whose frontmost is true end tell tell application "Finder" -- If Finder is in focus but has no windows, target the desktop if frontAppName is "Finder" and (count of windows) is 0 then set currentFolder to (path to desktop folder) as alias else try set currentFolder to (the target of the front window) as alias on error set currentFolder to (path to desktop folder) as alias end try end if end tell -- Generate a unique filename and write it silently set targetPath to POSIX path of currentFolder set finalPath to targetPath & "untitled.txt" tell application "System Events" set counter to 2 repeat while (exists file finalPath) set finalPath to targetPath & "untitled " & counter & ".txt" set counter to counter + 1 end repeat -- Create the blank file without opening or focusing Finder do shell script "touch " & quoted form of finalPath end tell
commit 8c3e0e7
nice way
I built my own Find our extension now that will add a new menu with all files/.dot that I could ever need.