Git Product home page Git Product logo

goblocks's People

Contributors

bramverb avatar codesoap avatar ldaxar avatar lordrusk avatar nrocy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

goblocks's Issues

Make code more modular.

I suggest separating the necessary functions from the unnecessary ones. I.e. the built-ins such as date, cpu and memory should be separated from the rest (maybe put on a separate branch or patch). The RunCmd and Schedule functions should be part of the main package. FunctionMap should not be invoked in the main file either (it is unnecessary to call it when one for example does not want to use the builtin functions). This is all so as to make the program more suckless.

TLDR; The inclusion of the possibility to launch built-in functions is great, but should be made separate so as to better adhere to the suckless philosophy. If the user does not wish to utilise the built-in functions, he need not; if he wants to add more built-in functions, he should be able to.

Edit: it's ttecluk from reddit, we already talked about this.

Plans for clickable bar

I was wondering if you have any plans for adding support for signaling clicks to blocks and running a definable command when that happens.
I know this would also involve a patch for dwm, but I think this could be a very neat feature.

Also: I don't mind helping with it, but I also wanted to verify whether this is something you want in Goblocks?

Switch to INI for config

Thanks for the great program.

JSON is not really a config format.

  • Quoting is difficult, so are the commas
  • Escaping sucks
  • No commenting-out system

I propose INI for a config format. Here's how I'd structure the default config

[global]

separator = " | "

[weather]
updateSignal = 39
command = (sleep 5 && curl "wttr.in/London?format=3")
timer = 45m

[datetime]
prefix = ๐Ÿ—“
updateSignal = 35
command = #Date		
format = Monday 02/01/2006 15:04:05		
timer = 1s

[volume]
prefix = ๐Ÿ”Š 
updateSignal = 36
command = amixer get Master | awk ' /%/ {print $5 $6}' | head -1 | sed -e 's/][/ /g'
timer = 0
prefix = Mem: 
updateSignal = 37
command = "#Memory"
suffix = %
format = %.2f		
timer = 2s

[cpu]
prefix = CPU: 
updateSignal = 38
command = "#Cpu"
suffix = %
format = %.2f		
timer = 2s

It would be way easier to comment-out, to change and to create new blocks.

As for implementation, https://github.com/go-ini/ini looks quite good.

What do you think?

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.