Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/BenjaminOddou/alfred-folderify

πŸ“ Generate pixel-perfect macOS folder icons
https://github.com/BenjaminOddou/alfred-folderify

alfred alfred-workflow alfred5 alfred5-workflow folder folderify icons image-generator image-processing shell zsh

Last synced: about 2 months ago
JSON representation

πŸ“ Generate pixel-perfect macOS folder icons

Lists

README

        

logo-dark
logo-light

[![made with heart by Benjamin Oddou](https://img.shields.io/badge/made%20with%20%E2%99%A5%20by-benjamin%20oddou-3FAEFF.svg?style=flat)](https://github.com/BenjaminOddou)
[![saythanks](https://img.shields.io/badge/say-thanks-0182E5.svg?style=flat)](https://saythanks.io/to/BenjaminOddou)

Welcome to the Alfred Folderify repository: **An Alfred Workflow** ✨

## βœ… Prerequisites

* MacOS
* Alfred 5. Note that the [Alfred Powerpack](https://www.alfredapp.com/powerpack/) is required to use workflows.

## ⬇️ Installation

1. [Download the workflow](https://github.com/BenjaminOddou/alfred-folderify/releases/latest)
2. Double click the `.alfredworkflow` file to install

## 🏎️ Folderify

Under the hood, the icon generation is made with [folderify](https://github.com/lgarron/folderify) made by [Lucas Garron](https://github.com/lgarron).

## 🧰 Setup the workflow

### Install dependencies

#### Open the Terminal of you Mac and run the following commands

Install folderify (using [Homebrew](https://brew.sh)) :

```shell
brew install folderify
```

> Note that you have [other installation options](https://github.com/lgarron/folderify#other-installation-options) for folderify

## πŸ§™β€β™‚οΈ Invoke the workflow

There are 2 flows in this workflow :

1. The first one allows you to assign an generated icon to one or multiple folder(s). It can be triggered by writing `foldicon` keyword.
2. The second allows you to generate `mask.icns` and `mask.iconset` files from one or multiple mask(s). You can invoke this flow with the `imgicon` keyword.

You can edit these triggers (flagged with a `πŸ•ΉοΈ` symbol) in the user configuration panel.

## πŸ€– Usage of the workflow

### Setup variables

1. `πŸ“‚ Data Folder`. Set the folder path that will host output logs generated by folderify.

> Note that if you change the `Data folder` location after generating logs, you should probably move the file created along in the new folder.

2. `🎨 Color scheme` corresponds to the `--color-scheme COLOR_SCHEME` folderify argument and allows you to change the color of the icon folder (slight difference).

`πŸŒ“ Auto` : will match current system settings.

`πŸŒ‘ Dark` : --color-scheme dark will force dark mode.

![big_sur_dark](public/big_sur_dark.webp)

`πŸŒ• Light` : --color-scheme light will force light mode.

![big_sur_light](public/big_sur_light.webp)

1. `βœ‚οΈ Trim margins` corresponds to the `--no-trim` folderify argument.

`Yes πŸ‘` : checkbox is ticked, transparent margins are trimmed from all 4 sides.

![big_sur_dark](public/big_sur_dark.webp)

`No πŸ‘Ž` : checkbox is unticked, --no-trim. Keeps transparent margins from the mask.

![no_trim](public/no_trim.webp)

Here is a small schema to explain the principle :

![schema_trim](public/schema_trim.webp)

4. `πŸ“ƒ Detailed Logs` : corresponds to the `--verbose` folderify argument.

`Yes πŸ‘` : checkbox is ticked, --verbose, detailed output.

![log_detailed](public/log_detailed.webp)

`No πŸ‘Ž` : checkbox is unticked, simple output.

![log_simple](public/log_simple.webp)

1. `πŸ”« Workflow action`. Open/Reveal in finder the log file, display a post notification or do nothing.

2. `🎷 Notification sound`. Set notification sound for this workflow.

> As of version 1.4.0, this is no longer possible to generate old folder style (leopard / yosemite). You can still download v2 of folderify [here](https://pypi.org/project/folderify/).

### Modify icons folders

> Use `foldicon` to trigger this flow.

![trigger1_1](public/trigger1_1.webp)

Choose the mask that will be used for generating the new icon and press ⏎.

![trigger1_2](public/trigger1_2.webp)

### Reset icon folder

To reset a folder’s icon, open its Get Info panel then click the icon and press ⌫.

### Generate icns and iconset files

> Use `imgicon` to trigger this flow.

![trigger2_1](public/trigger2_1.webp)

### Alfred Buffer and Universal Actions

For both flows, you can use the `Alfred Buffer` to select multiple folder(s) (flow 1) or mask(s) (flow 2).

`Alfred Buffer` basic commands are :

* βŒ₯↑ to add a file to the buffer from Alfred's results.
* βŒ₯↓ to add a file and move to the next item in your list of results.
* βŒ₯← to remove the last item from the buffer.
* βŒ₯β†’ to action all items in the buffer.
* βŒ₯⌫ to remove all items from the buffer.

To know more on how to use `Alfred Buffer`, follow this [link](https://www.alfredapp.com/help/features/file-search/#file-buffer).

> Note that `Alfred Buffer` is preferred compared to the `{query}`, meaning that if you select a folder/image (by clicking on it or by pressing enter ⏎) that is not included in the buffer, **it will not be compressed**.

![alfred_buffer1](public/alfred_buffer1.webp)

![alfred_buffer2](public/alfred_buffer2.webp)

For both flows you can use the corresponding `Alfred Universal Actions` :

1. If you want to start the first flow, select one or multiple folders and select `Modify folder icon`.

![universal1](public/universal1.webp)

2. If you want to start the second flow, select one or multiple folders and select `Create folder icon from mask`.

![universal2](public/universal2.webp)

### Logs output

Check the logs of the folderify command under the `πŸ“‚ Data folder`. The log file contains the 3 parts :
1. Date and time of the workflow launch.
2. Workflow options.
3. Folderify command detailed.
4. Folderify output.

> Note that each workflow run is separated by an horizontal rule.

![log_simple](public/log_simple.webp)

## βš–οΈ License

[MIT License](LICENSE) Β© Benjamin Oddou