Skip to content

A simple bash script to block access to time-wasting sites.

Notifications You must be signed in to change notification settings

jcromartie/gsd.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

gsd.sh: Get S#!t Done

gsd.sh is a simple bash script to improved productivity by blocking sites through modifying /etc/hosts, creating an entry pointing to 127.0.0.1 for each site in a list.

Installation

Copy gsd.sh to somewhere in your PATH. For convenience, you may wish to create an alias like this:

alias gsd="sudo -E gsd.sh"

Changes in /etc/hosts take effect immediately on Linux machines, so all GUI browser instances are killed upon execution of gsd.

Usage

Simply run the script to set your hosts file to "work mode."

sudo -E gsd.sh

To go back to "play mode" run:

sudo -E gsd.sh --play

Customizing

Just set the environment variable GSD_SITES to a list of additional sites you wish to block, like (in your .profile for example):

export GSD_SITES="store.apple.com github.com example.com"

About

A simple bash script to block access to time-wasting sites.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages