Giter VIP home page Giter VIP logo

boox's Introduction

boox

This project has been superseded by bento

details

boox is a screen region and point/window selection tool with formattable output similar to crud, hacksaw, or slop. Like these other tools, boox draws the selection using a window.

You can click on a window without dragging to select the geometry of that window, and the selection border will snap to windows you hover over. You can also right click to cancel the selection.

Modifier keys change how selection works in various ways:

  • SHIFT: Keeps the selection size constant and instead moves the whole selection region around with your mouse
  • CONTROL: Resize from the center of the selection instead of the top left
  • ALT: Lock the selection to a specific axis (whichever you move in first), stacks with other modifiers

If you run with -p you will select a point/window.

flags/configuration

Region selection output format can be configured with the -f flag or with the BOOX_SELECTION_FORMAT environment variable, to format output, use a string with %x, %y, %w, and %h to fill in the selection region values, you can also use %i for the window ID if the you selected a whole window by clicking it rather than dragging a selection, otherwise %i will just output 0. For example, to get the same output as crud you'd run boox -f 'W=%w\nH=%h\nX=%x\nY=%y\nG=%wx%h+%x+%y'. The default output is %wx%h+%x+%y.

For point selection format you can still use -f or you can use the BOOX_POINT_FORMAT environment variable. All the formatting options are the same, though %w and %h will always be 0. The default output is %x %y.

Border size can be configured with the -b flag or the BOOX_BORDER_SIZE environment variable, e.g. boox -b 4

Border color can be configured with the -c flag or the BOOX_BORDER_COLOR environment variable, the value should be a hex color value without the #, e.g. boox -c ff0000

Normally when the mouse pointer is already captured, boox will silently exit with an error, but you can use the -w flag to make it wait until it can capture the pointer

You can restrict the selection to a specific window with the -r flag. Valid values are root (default), current (the current active window as determined by _NET_ACTIVE_WINDOW), and a specific window ID. A pattern you may find useful is boox -r $(boox -p -f '%i') to first select what window you want the selection to be restricted to then start the actual selection

Some flags can also have their default values changed in src/config.h

todo (maybe)

  • Aspect ratio selection mode
  • Grid selection mode, split the screen into a grid of rows and columns and snap the selection to grid cells, with optional padding between cells and at the edges of the screen
  • Start a selection with the initial values being that of a window
  • Keyboard control for selection, arrow keys/hjkl for moving the pointer, enter and/or space to start and finish the selection, alt to move by single pixel distances rather than jumping larger distances, shift and control work as they already do
  • Abstract platform backend to make it easier to implement other backends in the future
  • Wayland backend

boox's People

Contributors

banchouboo avatar

Stargazers

 avatar Ashtrath avatar Hana avatar contribuewwt avatar sammyette avatar  avatar ElKowar avatar Brandon Dowdy avatar Kainoa Kanter avatar Luca Tagliavini avatar sophie avatar yemou avatar  avatar

Watchers

James Cloos avatar  avatar

boox's Issues

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.