Skip to content

Instantly share code, notes, and snippets.

@ethan-leba
ethan-leba / orgclock.md
Last active October 10, 2024 08:19
Clock out of org on laptop sleep (MacOS)

I recently started using org's clock features, however after repeatedly forgetting to clock out after closing my laptop, I decided to set up an automated clock-out on sleep.

Instructions

  1. brew install sleepwatcher (if not already installed)
  2. Create file at ~/.sleep with the following contents:
#!/usr/bin/env bash
@ethan-leba
ethan-leba / readme.org
Last active August 16, 2024 12:04
Yabai + Emacs seamless window movement

Yabai + Emacs window movement integration

This is a short guide to setting up unified window movement bindings with Yabai + SKHD and Emacs, inspired by this tmux-vim movement guide. Short video demo here.

For example, if there’s if Emacs is in focus and there’s an Emacs window to the left, then that window will be focused with the binding. Otherwise, the next application to the left will be focused. In this guide I’m using alt - HJKL, but you can substitute those with whatever you’d like.