Skip to content

alex-moon/ban

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Self-imposed ban

A lightweight Bash script to help you block yourself from using time-wasting or distracting commands until a specified date with optional reasons and friendly reminders.

Perfect for wofi/bemenu/fuzzel/etc. users trying to wrestle some of their headspace back from distractions.

Install

Simply download the ban script into your ~/bin directory or any directory in your $PATH and make it executable.

mkdir -p ~/bin
curl -o ~/bin/ban https://raw.githubusercontent.com/alex-moon/ban/refs/heads/main/ban
chmod +x ~/bin/ban

Usage

When you ban a command, attempting to run it will result in a friendly reminder that you have banned it, along with any reasons you provide, and a date the ban will be lifted. Reasons and expiration dates are both optional - if the date is not provided, the ban will expire 40 days from now.

# these are all valid commands:
ban steam
ban steam 'I have been spending too much time playing games'
ban steam 'I have been spending too much time playing games' 2025-08-20

To unban a command, simply remove the command from your ~/.bans directory:

rm ~/.bans/steam

To see a list of all your current bans, simply index the ~/.bans directory:

ls ~/.bans

Uninstall

To uninstall the ban script, simply remove the ban file from your ~/bin directory and delete the ~/.bans directory.

rm ~/bin/ban
rm -rf ~/.bans

Contributing

Contributions are welcome! If you have suggestions for improvements or new features, please open an issue or submit a pull request.

About

ban

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages