For when self-control isn't enough: lock down your shell from distractions!
Go to file
Audrey 8640f56437 a bit of safety 2026-10-02 13:36:59 -07:00
firefox-plugin ok well one day this will stop being so stupid 2026-09-25 21:35:06 -07:00
.gitignore HERE WE GO 2026-09-25 16:33:21 -07:00
LICENSE Initial commit 2025-11-13 12:09:38 -07:00
README.md docs 2026-09-26 13:21:25 -07:00
app-watch.sh HERE WE GO 2026-09-25 16:33:21 -07:00
cwdcontrol.sh a bit of safety 2026-10-02 13:36:59 -07:00
package.nix ok well one day this will stop being so stupid 2026-09-25 21:35:06 -07:00

README.md

cwdcontrol

For when self-control isn't enough, try cwdcontrol!

This script will prevent you from working in directories, websites, or apps based on a time expression.

Dependencies

Either systemd or cronie. The shell integration will work with bash or zsh. The browser extension will work with firefox. The window management will work with sway.

You need at least jq and libnotify I think. Probably more?

Configuration

Configuration is read from $XDG_CONFIG_HOME/cwdcontrol/config.sh, along with the dirs in $XDG_CONFIG_DIRS. This is a shell script which will be called with the cwdcontrol.sh functions sourced. You want to use cwdcontrol-disallow. Check its usage.

Shell integration

Put this in your startup scripts:

. cwdcontrol.sh hook

Sway integration

Run app-watch.sh as a systemd user service, or maybe just launch it from your sway config. This will require cwdcontrol.sh to be on $PATH as cwdcontrol.

Firefox integration

There's a browser extension and a native messaging component to make it work. Figure it out!!!!!!! This will require cwdcontrol.sh to be on $PATH as cwdcontrol.

Overrides

Run cwdcontrol-override MINUTES in a shell with the hooks loaded or cwdcontrol override MINUTES from the executable on $PATH.