Git Product home page Git Product logo

conky-compiler's Introduction

.conkyrc compiler

Free-form conky layout

Conky is a great tool, but its text-flow positioning model makes it really hard to do anything beyond a single-column vertical layout. However, it gives you the low-level tools to do better, assuming you can predict where it will put things. The conkyrc compiler does this and gives you two modifications that make it possible to use flexible spatial positioning:

  1. It removes all vertical space produced by line breaks.
  2. It introduces a positioning command, @x,y, that supports either absolute or relative coordinates.

x and y each take the form \+?-?\d+, where a + prefix indicates a relative movement (the last set position is always the base, so unfortunately you can't have relative movements that are parameterized on text width).

Usage

$ ./conkyc conkyrc > ~/.conkyrc
$ DPI=112 LINE_SPACING=1.4 ./conkyc conkyrc > ~/.conkyrc

DPI and, more rarely, LINE_SPACING, may need to be tuned depending on your display settings.

See the included conkyrc for a fairly complete example (it's the one I used for the screenshot).

Bugs

  • Fails miserably if you use conky's conditionals in certain ways.
  • Some edge cases that happen if you change font sizes in the middle your conkyrc. (These can usually be worked around by some relative adjustment.)
  • conkyc loses track of vertical space if you draw graphs/bars taller than the tallest font's line height. Ideally it would look for such commands and figure this out.

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.