Giter VIP home page Giter VIP logo

block's Introduction

block-cli

block eliminates distractions and saves you time from the command line.

demo

Mission

Spend less time on the computer and more time in the sun.

Install

Download latest binary release

To install the program, please read the instructions below:

Build from source

** important! **

  • requires go, you can install go here: go.dev
  • requires ffmpeg

git clone https://github.com/connorkuljis/block-cli.git && cd block-cli

make

make install

Block Sites (Guide)

  1. Open your /etc/hosts file

sudo vi /etc/hosts

  1. Paste an example blocklist
# --- social media
# 0.0.0.0 twitter.com
# 0.0.0.0 www.youtube.com
# 0.0.0.0 www.instagram.com
# 0.0.0.0 www.reddit.com
# 0.0.0.0 reddit.com
# 0.0.0.0 www.old.reddit.com
# 0.0.0.0 old.reddit.com
# 0.0.0.0 www.facebook.com
# ~ <-- lines below this character will be untouched by block-cli

  • The program will uncomment the lines when you start the program, and add them back in when upon exit.
  • If you have content you dont want the program to manipulate, add the following line to the hosts file.

Features:

  • πŸ™† Pomodoro-like progress bar inidicator (right in your terminal!).
    • πŸ™…Automatically block/unblock any site at the IP level during the duration of the program.
      • πŸ“¬ Alerted by a system notification when a session ends.
  • β›³ Automatically record your progress.
    • πŸ“’ Answer 'what did I get done today' by running block history.
  • σ°‘Š Capture your progress by enabling the screen recorder with -x or --screen-recorder.
    • πŸŽ₯ Compile recordings into a time-lapse.
  • Cross-platform integration for mac and linux (windows soon).
  • YAML file at ~/.config/block-cli/config.yaml
❯ block start 10 'draft emails' -x
Setting a timer for 10.0 minutes.
ESC or 'q' to exit. Press any key to pause.
 100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| (90/90, 15 it/s) [5s]

Usage

  • To see the list of commands available, run block --help

Faq

Troubleshooting Screen Recording with Ffmpeg

If you have ffmpeg on you machine you can automatically capture your screen.

To record your screen use the -x flag.

If you are having issues recording your screen, follow the checklist:

  • ensure system permissions are enabled to record your screen.
  • run $ ffmpeg -v to ensure your installation is not corrupted or missing.
  • a valid input device is configured in config.yaml
  • you have restarted your application

Configuration

  • open .config/block-cli/config.yaml

Example:

# config.yaml
ffmpegRecordingsPath: /Volumes/WD_2TB/Screen-Recordings
avfoundationDevice: "1:0"

block's People

Contributors

connorkuljis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.