Created
July 25, 2022 18:48
-
-
Save bennylope/c1d19be08b863b7d0b809fc31b4290a0 to your computer and use it in GitHub Desktop.
Fish compatible version of productivty scripts https://gist.github.com/bennylope/dd0c723b6586ded254b3bd673a7861a3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function slacktime | |
while read line; | |
if [ (string match "*WORKTIME" "$line") ] | |
continue | |
else | |
echo $line | |
end | |
end < /etc/hosts > /tmp/hosts | |
sudo cp /tmp/hosts /etc/hosts | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function worktime | |
while read line; | |
echo "127.0.0.1 $line # WORKTIME" | |
echo "fe80::1%lo0 $line # WORKTIME" | |
echo "127.0.0.1 www.$line # WORKTIME" | |
echo "fe80::1%lo0 www.$line # WORKTIME" | |
end < $HOME/.blocked_sites | sudo tee -a /etc/hosts > /dev/null | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment