Code Monkey home page Code Monkey logo

thonkbar's Introduction

๐Ÿค” Thonkbar

minimalist block based lemonbar wrapper


๐Ÿ”— Instalation

From the AUR with:

aura -S thonkbar-git

or manualy with:

make install

โš™๏ธ Configure

The program reads a config file located at ~/.config/thonkbar/config.

General Bar Configs

[config]
delimiter = <delimiter>
delimiter_color = "#AARRGGBB"
font = "<font>:size=<integer>"
underline_width = <integer>
background_color = "#AARRGGBB"
foreground_color = "#AARRGGBB"
text_offset = <integer>
left_padding = <integer>
right_padding = <integer>
position = top|bottom
docking_mode = normal|force

๐Ÿ“ก Create and Update blocks

To create a block you just need to add a line in one of the following formats:

[name]
essential = True|False
side = left|right|center
cmd = <command>
update = CONTINUOUS|ONCE|<integer>
event = <command>

<command>

Can be either a command in the $PATH or a command in ~/.config/thonkbar/scripts (when prepended with scripts/) that outputs a suported block format.

essential

Using the SIGUSR2 a user can toggle the bar between showing all the blocks and showing only the blocks marked as essential. By default the blocks are marked as essential so this field can be omitted.

cmd

Can be either a command in the PATH or a command in ~/.config/thonkbar/scripts (when prepended with scripts/) that outputs a supported block format.

Commands used can output up to 3 lines:

  • text on the block
  • text color (#RRGGBB)
  • underline color (#RRGGBB)

update

Represents the script update kind/frequency. Can be any of the following:

options result
integer delay (greater than 0) between executions in seconds
"ONCE" run the script only once on start-up
"CONTINUOUS" update the block every time the script gives a new line

Optionally a block can be updated via the corresponding signal via pkill.

Useful information for each block (including the bound signal) is outputted when the bar starts.

event

Is a script that is called with the following arguments whenever a mouse click is registered on the bar.

<button handler> <button> <id>
  • <button> can be: LEFT, CENTER, RIGHT, UP or DOWN
  • <id> is the signal bound to the block (useful for updating the block after handling the button press)

Examples

  • Config file with:
    • custom delimiter character and color
    • block on the right side of the bar that displays time/date (updates every second)
    • block on the left side that listens continuously to a script located at ~/.config/thonkbar/scripts/workspaces
[config]
delimiter = "  |  "
delimiter_color = "#666666"

[uptime]
side = right
cmd = "uptime -p"
update = 60

[workspaces]
side = left
cmd = "scripts/workspaces"
update = CONTINUOUS

License

This project is licensed under the MIT License - see the LICENSE file for details

thonkbar's People

Contributors

josefilipeferreira avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ved-un

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.