You are not logged in.
Hello Arch community, I have been using archlinux since 2 years now and I've always wanted to make some contribution to this great community.
https://github.com/geommer/yabar
Yabar is intended to be a better alternative to lemonbar for those who are okay with pango (Xft may be supported in the future). I liked lemonbar but its configuration is somewhat a mess and I also needed a correct rendering for arabic fonts support so I made yabar. Please have a look at yabar features and request what you think is needed to be done!
Last edited by geommer (2016-03-14 15:14:09)
Offline
Aesthetically I like this a lot. I'm currently using i3blocks but I might give this a whirl.
Offline
I just tried it and I like its configuration style. I'm using it with bspwm and have some issues to display infos from bspc subscribe.
I set up a test block like this:
test:{
exec: "~/.config/yabar/test.sh";
type: "persist";
align: "right";
fixed-size: 250;
with test.sh:
bspc subscribe node_flag | cut -d' ' -f5-
Yabar doesn't display any text from this this block. test.sh seems to work when executed in the shell outputting "private on", "private off" etc as expected.
Any tips?
Offline
I also tested it briefly, it looks nice but I need to see more example scripts of how I can use it. The great thing abt lemonbar is there are so many examples to look at for ideas.
You can like linux without becoming a fanatic!
Offline
This bar does not show its window under cwm window manager. The process is running but nothing is displayed. The bar is drawn OK under fvwm window manager or in pure X.
Offline
I just tried it and I like its configuration style. I'm using it with bspwm and have some issues to display infos from bspc subscribe.
I set up a test block like this:
test:{ exec: "~/.config/yabar/test.sh"; type: "persist"; align: "right"; fixed-size: 250;
with test.sh:
bspc subscribe node_flag | cut -d' ' -f5-
Yabar doesn't display any text from this this block. test.sh seems to work when executed in the shell outputting "private on", "private off" etc as expected.
Any tips?
Your block config looks fine to me, if it prints on terminal, it should print on the bar. Is this the only block that does not work for you? Because there was a bug (fixed now) that show no text on the bar with optimization flag -O2. Please use the git version if you install from AUR. The other AUR package is old.
Offline
I also tested it briefly, it looks nice but I need to see more example scripts of how I can use it. The great thing abt lemonbar is there are so many examples to look at for ideas.
Thank you. I first thought to add my scripts (mostly similar to i3blocks). Then I decided to add internal blocks in plain c just to make yabar less CPU intensive (e.g. avoid exec and fork just to get date from a bash script every second), currently yabar has 6 or 7 internal blocks but not yet documented in README (will be updated in the incoming couple of days).
Offline
This bar does not show its window under cwm window manager. The process is running but nothing is displayed. The bar is drawn OK under fvwm window manager or in pure X.
Thank you for reporting this. I usually test my code on bspwm and i3 but I will get cwm and try to understand what is wrong.
Offline
regitator wrote:I just tried it and I like its configuration style. I'm using it with bspwm and have some issues to display infos from bspc subscribe.
I set up a test block like this:
test:{ exec: "~/.config/yabar/test.sh"; type: "persist"; align: "right"; fixed-size: 250;
with test.sh:
bspc subscribe node_flag | cut -d' ' -f5-
Yabar doesn't display any text from this this block. test.sh seems to work when executed in the shell outputting "private on", "private off" etc as expected.
Any tips?
Your block config looks fine to me, if it prints on terminal, it should print on the bar. Is this the only block that does not work for you? Because there was a bug (fixed now) that show no text on the bar with optimization flag -O2. Please use the git version if you install from AUR. The other AUR package is old.
The other blocks and example blocks show up fine. I'm already running the git version.
It would be nice to have a debug mode where Yabar could output its content also to stdout so you can see it receives?
Offline
The other blocks and example blocks show up fine. I'm already running the git version.
It would be nice to have a debug mode where Yabar could output its content also to stdout so you can see it receives?
Maybe this block throws the text to stderr and not stdout. Yabar only consumes what is in stdout.
For a debug mode, yes, I intend to add something like that using a conditional compilation flag.
Offline
I am trying to write a python script that lists the i3 workspaces. However, I can't get it to work with yabar.
This is the script:
#!/usr/bin/env python
import i3
def print_workspaces():
workspaces = i3.get_workspaces()
outputlist=[]
for i in workspaces:
if i['focused']==True:
output = "*"+i['name']+"*"
else:
output = i['name']
outputlist.append(output)
print(" ".join(outputlist))
print_workspaces()
def list_workspaces(event, data, subscription):
if 'change' in event:
print_workspaces()
subscription = i3.Subscription(list_workspaces, 'workspace')
If I run it in the terminal, it works as expected and prints out a new line with the current workspaces, everytime I switch to a different workspace.
However, yabar only shows the initial status and does not update.
This is my yabar.conf:
bar-list: ["bar1"];
bar1: {
position: "top";
block-list: ["block1"];
block1: {
exec: "python ~/.i3/list-workspaces.py";
type: "persist";
align: "left";
justify: "left";
fixed-size: 900;
}
}
I tested if it is some problem with python with the following simple script.
i=1
while True:
print(i)
i+=1
This works as expected with yabar.
I don't understand why yabar does not pick up on the new lines in the first script?
EDIT: I found the problem. It is necessary to run the script with python -u (cf. here)
Also there is a bug with i3-py and unicode characters. It is better to use i3ipc.
Last edited by stupidus (2016-04-15 23:26:43)
Offline