Giter Club home page Giter Club logo

gocaudices's Introduction

Go Report Card

Simple dwmblocks alternative

Gocaudices is a dwmblocks alternative written in GO using xgb.

About

I wrote this alternative to be simple, fast, and elegant. This project is never meant to exceed 100 SLOC in the base build.

How-To

First download gocaudices with: git clone https://github.com/lordrusk/gocaudices. To make sure you have all dependencies installed you can run go mod tidy. You can (re)compile with: go install

  • Configure

Gocaudices can be configured through adding blocks in the blocks.go I've left an example of a normal blocks.go config file that works with my dotfiles.

  • Shell commands

To run shell commands, add inSh: true, to the block in blocks.go.

  • Update a module

The block definition of {cmd: "volume", upSig: 10}, would be updated like kill -44 $(pidof gocaudices). A dwm volume mute keybind might look like { 0, XF86XK_AudioMute, spawn, SHCMD("pamixer -t; kill -44 $(pidof gocaudices)") },.

Patches

Patches are hosted in this repo in patches/*patch*. To apply patches: patch -p1 < path/to/patch.diff. To create a proper patch, refer to hacking. If you would like to contribute a patch or feature, create a pull request.

(Non)-Features

  • Multiple blocks can have the same update signal.

FQA -- Frequently Questioned Answers

  • Does it have bar click-ability?

    • Yes.

AWESOME BARS

dwm bars that I think are awesome! check them out and give them a star!

sysmon I would use this if I hadn't made zara

spoon I don't know much C but this is great

rsblocks I don't know much Rust, but featureful and well starred, makes me wanna get my status emoji game up to par

mblocks another great rusty bar

integrated-status-text the way god intended

gods ICONIC

dwmblocks-async Awesome! I wrote this project because dwmblocks wasn't async...and I've lived without bar clickability since...maybe should have gone with this and learned C!

Luke Smith's Dwmblocks how could I forget where it all began?

gocaudices's People

Contributors

ejv2 avatar lordrusk avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

ejv2

gocaudices's Issues

Lost on login startup

I don't know if I am confused with the readme or a problem with the script or my system,no matter running this from any veriation of .profile,autostart.sh patch for dwm with our without tsp with all of the above*
but as soon as i login and run it by myself through the terminal everythin's fine,
Just in case I also checked if I have multiple versions installed but that ain't it,im confused at this point

tsp:(helps "stabilize"baddly setup startups of programs,or thats what I have noticed in the past)

Clickable status: alternate method

Although the standard dwm patch for clickable status requires the use of BSD user signals, would it be worth programming an alternate interface and a custom dwm patch which uses some other RPC mechanism. For instance, a simple named pipe would do. We could have dwm write the index of the block into the FIFO. Then, all gocaudices has to do is have a goroutine waiting for the data (FIFOs are buffered) and send a signal over a channel when data is recieved. This would be much cleaner than all the cgo stuff you had to do for signals.

The downside of this is, obviously, that you can't use the stock dwm clickablestatus patch, but I think this could be well worth the cost of a separate patch to remove all the C signal handling.

I'll do some more research into named pipes and, if you want, start a draft PR.

Space characters not displayed

By default, the code is trimming space characters in the blocks. I've seen the function barBytesArr[b.pos] = bytes.TrimSpace(outputBytes) in line 37. However I don't know how to disable this "feature", and would like to separate the blocks using space characters.

Thanks for the software.

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.