Giter Site home page Giter Site logo

new_file_finder_style's Introduction

New File - Finder Style

This is an Alfred workflow that makes a new text file in the style of the Mac Finder.

This version requires Alfred 5

It works with three commands:

  1. New File
  2. nf
  3. ⌘ ⌥ N

These will each create a text file in the front most open folder or on the Finder desktop.

It follows Finder rules.

The default name of the file is “untitled”.

⌘ ⌥ N can not take a parameter so the file will be created, with it’s name “untitled” selected. Just start typing to change it.

New File & nf can take a name as an optional parameter. So nf magnum opus.txt will create a file name “magnum opus.txt”.

If you make a file with a name that is already in use in that folder the name will be appended with “ 2”, then “ 3” and so on.

It respects your file extension while dealing with duplicates. So if “magnum opus.txt” exists then “magnum opus 2.txt” will be created.

Hint: Because the file is selected in the Finder ⌘↓ will open the file in it’s default app.

Animated Gif of the workflow in progress

Layout of workflow.

New File Finder Style also has an external trigger. This allows the workflow to be triggered from Applescript. With the trigger ID of trigger.nf from the workflow ID of com.buttergut.nf

tell application id "com.runningwithcrayons.Alfred"
	run trigger "trigger.nf" in workflow "com.buttergut.nf" with argument "test"
end tell

Hint: I used this to make the New File Button in the Finder. Just drop the “with argument...” bit at the end of the line and it defaults to “untitled”.

You can take a look at the button here: New File Finder Button

New File Finder button

new_file_finder_style's People

Contributors

ciidub avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.