Coder Social home page Coder Social logo

typebreak's Introduction

Typebreak

Introduction

This is a simple Qt5 app, with a frameless and half transparent window that shadows the screen for 5 (default) minutes. No mouse or keyboard blocking is implemented. It's just a window with a countdown timer. It only tells you that you've got to stop for a while, if you would like to. Otherwise it could be dismissed with ALT + F4. It's all up to you.

demo

How to Use

This program does not invoke itself. I use cron to run it every half an hour on my Linux desktop.

  1. Precompiled executable for Linux and MacOS are available under bin directory. If Linux, copy the executable to system path. If MacOS, copy to Applications.

  2. Copy & paste the following to an empty file, say cronjob.txt.

    For Linux,

    0,30 * * * * DISPLAY=:0.0 /home/gongzhitaao/.local/bin/block-qt -d 1
    

    Note the DISPLAY:0.0, reason for this could found in this thread.

    For MacOS

    */30 * * * * open -a block-qt
    

    Note that 0,30 and */30 are equivalent.

  3. In command line, type contab cronjob.txt to register this cron job. Basically it tells the system to run this program every half an hour.

Command Line Usage

This app supports some simple command line arguments, type block-qt -h to see the options.

-d, --duration <x>  Shadows the screen for <x> minutes
-h, --help          Displays this help.
-v, --version       Displays version information.

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.