This is my personal Phoenix configuration, written in TypeScript and forked from mafredri's config.
This config provides per-monitor virtual desktops. I use it with my laptop monitor + an external monitor. It's a reimplementation of my xmonad setup at work.
- Use
modKey + Left/Right
to select a monitor - Use
modKey + 1-9
to select a workspace - Use
modKeyShift + 1-9
to move windows between workspaces - Extra windows on a workspace are stacked to the side. Press
modKey + r
to cycle through the windows on a workspace.
This setup allows you assign your apps to workspaces, and quickly retrieve them wherever you're looking. And if you have a lot of Chrome windows like I do, you can just cycle through them to find the right one.
modKey + 1-9
Select workspacemodKeyShift + 1-9
Move focused window to workspacemodKey + Left/Right
Select left/right monitormodKeyShift + Left/Right
Move active window to left/right monitormodKey + r
Spin windows on current workspacemodKeyShift + r
Spin workspaces across monitorsmodKey + h/l
Decrease/increase the main area sizemodKey + up/down/j/k
Focus next/previous window on current workspacemodKey + return
Add focused window to current workspacemodKeyShift + return
Add all stray windows of focused app to current workspace (good for collecting apps on first run)modKey + backspace
Remove focused window from workspacemodKeyShift + c
Close focused windowmodKeyShift + space
Rerender current layout. Useful if you drag around windows and can't figure out what belongs where. Or if things go haywire.modKey + a
Enable/disable auto-adding windows to current workspace (janky).modKey + m
Enable/disable focus follow mouse (janky).
The definition of modKey
and modKeyShift
can be found in src/config.ts. Otherwise modify keys in phoenix.ts.
The active monitor is defined by the mouse position.
Focus follows the mouse but can be turned off temporarily by holding modKey
or permanently in config.ts.
Some apps do random things on focus, like focusing all their windows. This whole thing is a bit janky. You might need custom hacks to get a good experience =( But it mostly works. Rerendering or mashing modKey + Up/Down
fixes a lot of issues.
Weird interaction with holding down keys to show accented letters. Run defaults write -g ApplePressAndHoldEnabled -bool false
and reboot to disable.
git clone https://github.com/nik3daz/spin2win.git
cd spin2win
ln -s `pwd`/out/phoenix.js ~/.phoenix.js
git clone https://github.com/nik3daz/spin2win.git
cd spin2win
yarn install
yarn run build
The TypeScript compiler and Webpack will produce out/phoenix.js
that can be used as Phoenix configuration.
For development, yarn start
will run Webpack in watch-mode. The window manager state is stored across reloads for better continuous development. Comment out the loadState() call if things get borked.
In a terminal, run:
$ log stream --process Phoenix
Anything logged via logger (import log from './logger';
) will show up as human friendly output in the terminal. Phoenix.log
can also be used, but it only supports strings, much of the heavy lifting is already done by logger to create a similar experience to console.log
in the browser.
You can also read about Attaching to Web Inspector for Debugging in the Phoenix wiki. This gives access to true console.log
and ability to use debugger
statements in your code.