|
|
||
|---|---|---|
| firefox-plugin | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
| app-watch.sh | ||
| cwdcontrol.sh | ||
| package.nix | ||
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.