• Stars
    star
    397
  • Rank 105,050 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 7 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

My Phoenix setup. Powerful, easy to customize, tuned for web development, adds a space switcher.

Phoenix

My Phoenix setup. Powerful, easy to customize, tuned for web development, adds a space switcher.

Installation

This configuration uses a remap of the Caps Lock key to something more useful: the Hyper key (basically just Ctrl + Alt + Cmd combined into one key) if used in combination with other keys, otherwise it gets mapped to F18, which is used to trigger the space switcher. If you prefer you may skip these remap steps while you try the configuration, but if you usually have many spaces opened I highly recommend you not to miss out the awesome space switcher, for which this hack is a requirement.

  1. Install Phoenix
  2. Install Karabiner Elements via its dmg
  3. Replace Caps Lock with Hyper/F18 using this Karabiner Elements configuration (if the link doesn't work copy and paste this in a browser: karabiner://karabiner/assets/complex_modifications/import?url=https%3A%2F%2Fraw.githubusercontent.com%2Ffabiospampinato%2Fphoenix%2Fmaster%2Fconfig%2Fkarabiner.json)
  4. $ mkdir ~/.config
  5. $ cd ~/.config
  6. $ git clone [email protected]:fabiospampinato/phoenix.git
  7. Restart Phoenix
  8. Enjoy!

Customization

To disable specific features, just comment out their correspondent require call in phoenix.js.

To tweak some numbers, simply edit constants.js.

Changing the specific shortcut used to trigger an action is pretty trivial.

Don't forget to make a PR if you fixed something or implemented something cool :)

Shortcuts

Sides

Sides

Shortcut Description
⇪ + ↑ Move window to the top side
⇪ + → Move window to the right side
⇪ + ↓ Move window to the bottom side
⇪ + ← Move window to the left side

Corners

Corners

Shortcut Description
⇪ + Q Move window to the top-left corner
⇪ + W Move window to the top-right corner
⇪ + S Move window to the bottom-right corner
⇪ + A Move window to the bottom-left corner

Halves

Halves

Shortcut Description
⇪ + [ Move window to the 1st half
⇪ + ] Move window to the 2nd half

Thirds

Thirds

Shortcut Description
⇪ + 1 Move window to the 1st column
⇪ + 2 Move window to the 2nd column
⇪ + 3 Move window to the 3rd column

Sixths

Sixths

Shortcut Description
⇪ + Shift + Q Move window to the 1st sixth
⇪ + Shift + W Move window to the 2nd sixth
⇪ + Shift + E Move window to the 3rd sixth
⇪ + Shift + A Move window to the 4th sixth
⇪ + Shift + S Move window to the 5th sixth
⇪ + Shift + D Move window to the 6th sixth

Center

Center

Shortcut Description
⇪ + X Center the window
⇪ + Shift + X Center the window and set its dimensions to 1280x800

Grow

Grow

Shortcut Description
⇪ + Shift + ↑ Grow window from the top
⇪ + Shift + → Grow window from the right
⇪ + Shift + ↓ Grow window from the bottom
⇪ + Shift + ← Grow window from the left

Expand

Expand

Shortcut Description
⇪ + Space Toggle window expansion to fill the space
⇪ + Shift + Space Toggle window expansion to fullscreen

Focus or Open

Focus or Open

Shortcut Description
⇪ + ` Focus to or open Notable
⇪ + C Focus to or open Chrome
⇪ + D Focus to or open Chrome Developer Tools
⇪ + V Focus to or open Visual Studio Code
⇪ + F Focus to or open Finder
⇪ + T Focus to or open Terminal
⇪ + G Focus to or open GitTower

Spaces

Spaces

In order to make this work you have to open System Preferences -> Keyboard -> Shortcuts -> Mission Control and bind all Switch to Desktop [NUMBER] actions to Ctrl + Alt + Cmd + Shift + [NUMBER]. There are actions up to the 9th desktop, but they may not be shown to you if you have less then 9 desktops currently open.

Note: If you don't need wrapping support, you should just remap the Move left/right a space actions under System Preferences -> Keyboard -> Shortcuts -> Mission Control.

Shortcut Description
⇪ + Tab Switch to the next space
⇪ + Shift + Tab Switch to the previous space

Applications Icons

Applications Icons

Shortcut Description
⇪ + I For each window in the current space show an icon indicating its position
⇪ + Shift + I Display the current date and time

Reload Phoenix

Reload Phoenix

Shortcut Description
⇪ + Shift + P Reload Phoenix

Pause/Resume Application

Pause/Resume Application

This can be used for saving battery, pausing single-player games etc.

Shortcut Description
⇪ + F8 Pause or resume the current application

Quit Application

Quit Application

Did you ever close 3+ Chrome windows instead of a single tab by mistake? Fear no more! Now in order to quit an app you have to trigger ⌘Q twice in a short timeframe. Stop wasting 10$ for something so basic.

Shortcut Description
⌘Q ⌘Q Quit application

Split View

//TODO: Unfortunately there's no API available for doing this at the moment, that's a shame given that I would have finally found a use for the § key, it looks like 2 S => Side-by-Side :D

Shortcut Description
⇪ + § If there are only 2 windows in the current space put them in split view

Mouse

Snapping

Snapping

Drag a window to an edge or corner to snap it into place.

Magic

Chrome

If it gets opened, positionate it to the left side.

Chrome Developer Tools

If it gets opened, positionate it to the bottom-right corner, and shrink Visual Studio Code's height a bit, so that the console will be visible.

If it gets closed, restore Visual Studio Code's height.

Terminal/iTerm2/Finder

If one of these apps' windows gets opened, positionate it to bottom-left corner.

Visual Studio Code

If it gets opened, positionate it to the right side.

Space Switcher

Space Switcher

This is the truly great addition to what was already available on the internet.

It combines Phoenix, Alfred and alfred-spaces-workflow into the space switcher macOS deserves but never had, always just a double Hyper ( ) away.

This is how it works:

  • It uses Phoenix to compile a list of your spaces
  • It tries to guess a name for those spaces, by default that would be the name of the folder opened in the Visual Studio Code instance present in that space (get_space_name.js)
  • Refreshes the list and those guessed names when necessary
  • Listens for the double Hyper ( ) shortcut
  • Opens Alfred and triggers alfred-spaces-workflow
  • Which reads the list of spaces compiled with Phoenix and displays it to you
  • Now just select a space to switch to

In order to make this work you have to open System Preferences -> Keyboard -> Shortcuts -> Mission Control and bind all Switch to Desktop [NUMBER] actions to Ctrl + Alt + Cmd + Shift + [NUMBER]. There are actions up to the 9th desktop, but they may not be shown to you if you have less then 9 desktops currently open.

Note: There's no API available for retrieving windows from other spaces, therefor other spaces' guessed names won't be refreshed until you visit them. The very first time you load Phoenix you might want to switch the focus to all of them, one by one, to have their names updated.

License

MIT © Fabio Spampinato

More Repositories

1

cash

An absurdly small jQuery alternative for modern browsers.
JavaScript
6,410
star
2

cliflix

Watch anything instantaneously, just write its name.
TypeScript
1,492
star
3

vscode-todo-plus

Manage todo lists with ease. Powerful, easy to use and customizable.
TypeScript
843
star
4

autogit

Define commands, using plugins, to execute across all your repositories.
TypeScript
471
star
5

bump

Bump updates the project's version, updates/creates the changelog, makes the bump commit, tags the bump commit and makes the release to GitHub. Opinionated but configurable.
TypeScript
393
star
6

noty

Autosaving sticky note with support for multiple notes without needing multiple windows.
TypeScript
337
star
7

store

A beautifully-simple framework-agnostic modern state management library.
TypeScript
227
star
8

tiny-bin

A library for building tiny and beautiful command line apps.
TypeScript
175
star
9

atomically

Write files atomically and reliably.
JavaScript
146
star
10

template

A super-simple way to create new projects based on templates.
TypeScript
131
star
11

flimsy

A single-file <1kb min+gzip simplified implementation of the reactive core of Solid, optimized for clean code.
TypeScript
130
star
12

vscode-highlight

Advanced text highlighter based on regexes. Useful for todos, annotations etc.
TypeScript
126
star
13

vscode-terminals

An extension for setting-up multiple terminals at once, or just running some commands.
TypeScript
110
star
14

shosho

A modern and powerful shortcuts management library.
TypeScript
87
star
15

picorpc

A tiny RPC library and spec, inspired by JSON-RPC 2.0 and tRPC.
TypeScript
84
star
16

overstated

React state management library that's delightful to use, without sacrificing performance or scalability.
TypeScript
82
star
17

vscode-monokai-night

A complete, dark and minimalistic Monokai-inspired theme.
HTML
74
star
18

vscode-open-in-github

Open the current project or file in github.com.
TypeScript
72
star
19

enex-dump

Dump the content of .enex files, preserving attachements, some metadata and optionally converting notes to Markdown.
JavaScript
71
star
20

shortcuts

Super performant and feature rich shortcuts management library.
TypeScript
66
star
21

watcher

The file system watcher that strives for perfection, with no native dependencies and optional rename detection support.
JavaScript
65
star
22

vscode-projects-plus

An extension for managing projects. Feature rich, customizable, automatically finds your projects.
TypeScript
64
star
23

svelto

Modular front end framework for modern browsers, with battery included: 100+ widgets and tools.
JavaScript
60
star
24

icon-font-buildr

Build custom icon fonts, it supports remote and local icons sources.
TypeScript
51
star
25

pastebin-monitor

A simple Pastebin monitor which looks for interesting things and saves them to disk.
Python
50
star
26

vscode-commands

Trigger arbitrary commands from the statusbar. Supports passing arguments!
TypeScript
50
star
27

monorepo

The homepage for all my repositories.
49
star
28

rssa

RSS-Anything, get updates about anything you can reach with an url. Like RSS, but for anything.
TypeScript
49
star
29

proxy-watcher

A library that recursively watches an object for mutations via Proxies and tells you which paths changed.
JavaScript
46
star
30

banal

On-demand bundle analyzer, powered by esbuild.
HTML
42
star
31

template-vscode-extension

A template for starting a new vscode extension quickly.
TypeScript
37
star
32

khroma

A collection of functions for manipulating CSS colors, inspired by SASS.
JavaScript
36
star
33

lande

A tiny neural network for natural language detection.
TypeScript
33
star
34

awesome-autogit

Curated list of resources for autogit.
27
star
35

vscode-projects-plus-todo-plus

Bird's-eye view over your projects, view all your todo files aggregated into one.
TypeScript
27
star
36

vscode-diff

Diff 2 opened files with ease. Because running `code --diff path1 path2` is too slow.
TypeScript
26
star
37

termux-env

My super-quick-to-setup Termux environment.
Lua
26
star
38

zeptomatch

An absurdly small glob matcher that packs a punch.
JavaScript
24
star
39

worktank

A simple isomorphic library for executing functions inside WebWorkers or Node Threads pools.
TypeScript
23
star
40

alfred-spaces-workflow

Alfred workflow that, used in conjunction with my Phoenix setup, gives you a spaces switcher.
23
star
41

vscode-markdown-todo

Manage todo lists inside markdown files with ease.
TypeScript
22
star
42

noren

A minimal HTTP server with good developer-experience and performance, for Node and beyond.
TypeScript
21
star
43

pollex

A tiny polling-based filesystem watcher that tries to be efficient.
TypeScript
21
star
44

vscode-debug-launcher

Start debugging, without having to define any tasks or launch configurations, even from the terminal.
TypeScript
20
star
45

gitman

A simple yet powerful opinionated tool for managing GitHub repositories.
TypeScript
19
star
46

tiny-sqlite3

A tiny cross-platform client for SQLite3, with precompiled binaries as the only third-party dependencies.
JavaScript
19
star
47

vscode-statusbar-debugger

Adds a debugger to the statusbar, less intrusive than the default floating one.
TypeScript
19
star
48

pacco

A bundler for modular and extensible web projects.
JavaScript
18
star
49

vscode-github-notifications-bell

A secure, customizable, statusbar bell that notifies you about notifications on github.
TypeScript
18
star
50

vscode-bump

Bump your project's version and update the changelog. Opinionated but configurable.
TypeScript
16
star
51

monex

Execute a script and restart it whenever it crashes or a watched file changes.
TypeScript
15
star
52

vscode-open-in-application

Open an arbitrary file in its default app, or the app you want.
TypeScript
15
star
53

tiny-encryptor

A tiny opinionated isomorphic library for encrypting and decrypting with ease.
JavaScript
14
star
54

awesome-template

Curated list of templates for Template.
14
star
55

jsonc-simple-parser

A simple JSON parser that supports comments and optional trailing commas.
JavaScript
14
star
56

secret

The simplest command to encrypt/decrypt a file, useful for committing encrypted ".env" files to version control, among other things.
TypeScript
14
star
57

dettle

A tiny fully-featured debounce and throttle implementation.
TypeScript
13
star
58

specialist

A library that helps you write tiny, fast, bundled and beautiful CLI apps that can automatically check for updates.
JavaScript
13
star
59

zstandard-wasm

A fast and small port of Zstandard to WASM. (Decompress-only for now).
C
13
star
60

is

The definitive collection of is* functions for runtime type checking. Lodash-compatible, tree-shakable, with types.
JavaScript
12
star
61

base256-encoding

Base256 encoding, the most memory-efficient encoding possible in JavaScript.
JavaScript
12
star
62

zeptoid

A tiny isomorphic fast function for generating a cryptographically random hex string.
TypeScript
11
star
63

vscode-browser-refresh

Refresh the browser with a ⌘R, right from Code. No need to switch focus to it.
TypeScript
10
star
64

tiny-levenshtein

A tiny implementation of the Levenshtein edit distance algorithm.
TypeScript
10
star
65

json-sorted-stringify

Alternative JSON.stringify function with sorted keys, so the output is stable.
JavaScript
10
star
66

huffy

A tiny compression library based on Huffman coding.
TypeScript
10
star
67

amuchina

A work-in-progress HTML sanitizer that strives for: performance like window.Sanitizer, readiness like DOMPurify, and ability to run in a WebWorker like neither of those.
TypeScript
10
star
68

scex

A simple runner for npm scripts that can execute multiple scripts, in serial or in parallel.
TypeScript
10
star
69

toygrad

A toy library for building simple neural networks which can be serialized to compact JSON.
TypeScript
10
star
70

vscode-optimize-images

Optimize one or all the images in your project using your favorite app.
TypeScript
9
star
71

crypto-puzzle

Basically a proof-of-work generator, this library makes cryptographic puzzles that are arbitrarily expensive to solve.
TypeScript
9
star
72

vscode-open-in-terminal

Adds a few commands for opening the current project in Terminal.
TypeScript
9
star
73

strid

Get a unique string identifier for any input value.
JavaScript
9
star
74

paketo

A tiny library for importing your package.json, with proper types!
TypeScript
9
star
75

grammex

A tiny PEG-like system for building language grammars with regexes.
JavaScript
9
star
76

tsex

A little CLI for making TypeScript packages, cleanly and effortlessly.
TypeScript
9
star
77

tiny-parse-argv

A tiny function for parsing process.argv, a modern rewrite of a sensible subset of minimist.
JavaScript
9
star
78

css-simple-minifier

A CSS minifier that's tiny and very fast.
JavaScript
8
star
79

vscode-open-multiple-files

Open all files in a folder at once, optionally filtering by a glob.
TypeScript
8
star
80

path-prop

Fast library for manipulating plain objects using paths.
JavaScript
8
star
81

react-router-static

A dead simple static router for React. Useful for multi-window Electron applications.
TypeScript
8
star
82

base128-encoding

Base128 encoding, the intersection of latin1 and utf-8, which is basically ASCII, the most memory-efficient string encoding that can be written to disk as utf-8 without ballooning in size.
TypeScript
8
star
83

noop-tag

A noop template literal tag, useful for syntax highlighting hints.
JavaScript
7
star
84

vscode-no-unsupported

An extension for removing [Unsupported] from the titlebar
TypeScript
7
star
85

tiny-webcrypto

A tiny isomorphic WebCrypto object, it just gives you the native one the current platform provides.
TypeScript
7
star
86

csv-simple-parser

A simple, fast and configurable CSV parser.
JavaScript
7
star
87

performance-interval

A precise implementation of setInterval that supports sub-millisecond intervals.
TypeScript
7
star
88

json-archive

Simple archive format based on JSON.
TypeScript
7
star
89

alfred-eject-workflow

Alfred workflow for ejecting mounted drives.
7
star
90

tiny-jsonc

An absurdly small JSONC parser.
JavaScript
7
star
91

chrome-window-session

Save each window as a separate session, automatically.
TypeScript
6
star
92

template-electron

A template for starting a new electron app quickly.
TypeScript
6
star
93

electron-about

Simple standalone about window for Electron.
TypeScript
6
star
94

bob-wasm

A port of Svgbob to WASM.
TypeScript
6
star
95

benchloop

Simple benchmarking library with a pretty output.
TypeScript
6
star
96

worktank-loader

WebPack plugin for WorkTank which enables you to execute whole files in a worker pool, transparently.
TypeScript
6
star
97

html-segmentator

A small library for splitting an HTML string into its top-level sections. Based on html5parser.
TypeScript
6
star
98

vscode-git-history

View or diff against previous versions of the current file.
TypeScript
6
star
99

uint8-concat

Concatenate mutiple Uint8Arrays super efficiently.
JavaScript
6
star
100

tiny-updater

The smallest update notifier for NPM packages, useful for CLI apps.
TypeScript
6
star