Code Monkey home page Code Monkey logo

bar's Introduction

NAME

bar - bar ain't recursive

SYNOPSIS

bar [-h | -g widthxheight+x+y | -b | -d | -f font | -p | -u pixel | -B color | -F color]

DESCRIPTION

bar is a lightweight bar entirely based on XCB. Provides full UTF-8 support, basic formatting, RandR and Xinerama support and EWMH compliance without wasting your precious memory.

OPTIONS

-h

Display the help and exit.

-g widthxheight+x+y

Set the window geometry. If a parameter is omitted it's filled with the default value. If the y parameter is specified along with the -b switch then the position is relative to the bottom of the screen.

-b

Dock the bar at the bottom of the screen.

-d

Force docking without asking the window manager. This is needed if the window manager isn't EWMH compliant.

-f font

Comma separated list of fonts, bar supports a maximum of five fonts (the limit can be tweaked by changing the MAX_FONT_COUNT parameter in the source).

-p

Make bar permanent, don't exit after the standard input is closed.

-u pixel

Sets the underline width in pixels. The default is 1.

-B color

Set the background color of the bar. color might be either in hex format (#aarrggbb) or in the symbolic name format (eg. white, indianred, darkgray). If no compositor such as compton or xcompmgr is running the alpha channel is silently ignored.

-F color

Set the foreground color of the bar. Accepts the same color formats as -B.

FORMATTING

bar provides a screenrc-inspired formatting syntax to allow full customization at runtime. Every formatting block is opened with %{ and closed by } and accepts the following commands, the parser tries it's best to handle malformed input.

R

Swap the current background and foreground colors.

l

Aligns the following text to the left side of the screen.

c

Aligns the following text to the center of the screen.

r

Aligns the following text to the right side of the screen.

Bcolor

Set the text background color. The parameter color can be - or a color in one of the formats mentioned before. The special value - resets the color to the default one.

Fcolor

Set the text foreground color. The parameter color can be - or a color in one of the formats mentioned before. The special value - resets the color to the default one.

Tindex

Set the font used to draw the following text. The parameter index is a 1-based index of the font list supplied to bar. Any other value (for example -) resets bar to normal behaviour (matching the first font that can be used for that character). If the selected font can't be used to draw a character, bar will fall back to normal behaviour for that character.

Ucolor

Set the text underline color. The parameter color can be - or a color in one of the formats mentioned before. The special value - resets the color to the default one.

Abutton:command:

Create a clickable area starting from the current position, when the area is clicked command is executed. The area is closed when a A token, not followed by : is encountered.

Eg. %{A:reboot:} Click here to reboot %{A}

The button field is optional, it defaults to the left button, and it's a number ranging from 1 to 5 which maps to the left, middle, right, scroll up and scroll down movements. Your mileage may vary.

Nested clickable areas can trigger different commands.

Eg. %{A:reboot:}%{A3:halt:} Left click to reboot, right click to shutdown %{A}%{A}

Sdir

Change the monitor bar is rendering to. dir can be either

+/-

Next/previous monitor.

f/l

First/last monitor.

0-9

Nth monitor.

Attribute modifiers

+attribute

Set the attribute attribute for the following text.

-attribute

Unset the attribute attribute for the following text.

!attribute

Toggle the attribute attribute for the following text.

Where attribute is one of the following

o

Draw a line over the text.

u

Draw a line under the text.

OUTPUT

Clicking on an area makes bar output the command to stdout, followed by a newline, allowing the user to pipe it into a script, execute it or simply ignore it. Simple and powerful, that's it.

WWW

git repository

AUTHOR

2012-2014 (C) The Lemon Man

Xinerama support was kindly contributed by Stebalien

RandR support was kindly contributed by jvvv

Clickable areas support was heavily based off u-ra contribution

bar's People

Contributors

lemonboy avatar jvvv avatar otommod avatar graboy avatar c00kiemon5ter avatar bill-kolokithas avatar boblehest avatar flannelhead avatar sprocklem avatar stebalien avatar andornaut avatar rootcoma avatar

Watchers

James Cloos avatar Noah Hradek 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.