See Preview: Icon Preview ⚛️
- Simple drawings
- Consistent style
- Based on icons from apple's icns
Left bar: show the open apps with the icons from this font. Dotfiles are released here: SoichiroYamane/dotfiles
# install dependencies
pnpm install
# - build the files
# - install the font to: $HOME/Library/Fonts/sketchybar-app-font-bg.ttf
# - install the icon map script to: $HOME/.config/sketchybar/helpers/icon_map.lua
pnpm run build:install
# same as build:install but watches changes to files in ./svgs and ./mappings and refires
pnpm run build:dev
🌕 Using SbarLua
-
Run
pnpm run build:install
to install the font and the icon map script.icon_map.lua
will be created in~/.config/sketchybar/helpers/
. -
Require the
icon_map.lua
in your configuration file.Example:
local app_icons = require("helpers.icon_map") local chatgpt = sbar.add("item", { label = { string = app_icons["ChatGPT"], font = "sketchybar-app-font-bg:Regular:18.0", },})
Contributions are welcome!
(Core method copied from Jean-Tinland/simple-bar#164 (comment))
I am using the following process to add new icons:
-
Export icon image from the installed app
- Open the Application folder in Finder
- Right-click on the app and select "Get info"
- Click on the icon and press
Cmd + C
- Open Preview and press
Cmd + N
to create a new image from the clipboard
-
Redrawing the icon in design software. I'm using Affinity Designer 2, but any tool that can export SVGs will work.
- First, set the document size to
24x24
pixels. The shape of the box icon (background) almost fits in the document size. - Redraw the icon on the image. For icon background, you can use the
assets/template.svg
file. - Export the icon as an SVG file.
- First, set the document size to
-
Optimize the SVG file using SVGOMG.
-
Add the icon to the
/svgs/
folder, using a snake_case name surrounded by colons and a.svg
extension. -
Add a file to the
/mappings/
folder using the same name but without the.svg
extension. This file indicates which app names should match the icon. The format is"App Name 1" | "App Name 2"
.