A status bar for dwm written in Go
In order to add a new applet, add a new Applet struct to Applets inapplets/applets.go.Applets are rendered on to the status bar by order (The top applet on the leftand the bottom applet on the right).The Applet struct has a field functionwhich is a go function that takes in a bunch of arguments of any type and returnsa string. The returned string get rendered. To add a shell command applet use thecmdApplet function. Use the audio applet as an example.
If you want to change the server port, change the port constant in api/api.go
To add a new command, go to api/commands.go and add a command struct to thecommands map. the command struct contains 2 field argCount andfunction. function is a function that takes a slice of strings and returnsan error, it will be called on command execution. argCount is the length ofthe args slice expected by function. The length will be checked beforefunction is called so no need to check for that in function.
In order to change the frequency of status bar refresh change the sleepTimeconstant.
In order to communicate with the status bar send commands to localhost : portCommands start with the name of the command and then a list of arguments seperatedby spaces. After sneding the command send a newline. After that you should reciveeither an error or a success message.
I am a linux user so rhstatus only works on linux and it was only tested on arch