You are not logged in.

#201 2014-08-11 06:00:31

xKISAMEx
Member
From: USA
Registered: 2011-09-23
Posts: 26

Re: bar - Lightweight xcb-based bar

If I (manually) start bar I get a repeating message of:

error: Connection refused
error: Connection refused
error: Connection refused
error: Connection refused

It works perfectly fine from what I can tell just curious as to what the message means/how to fix it.

Offline

#202 2014-10-31 23:54:15

angelic_sedition
Member
Registered: 2014-01-20
Posts: 124
Website

Re: bar - Lightweight xcb-based bar

Anyone have any recommendations for Japanese fonts to use with bar?

Offline

#203 2014-11-13 12:54:06

easysid
Member
From: India
Registered: 2013-01-01
Posts: 256

Re: bar - Lightweight xcb-based bar

Some of the fonts that I am using do not display space character in bar. Here's an image : http://i.imgur.com/YBxoz6T.png
As you can see, profont and tewi are fine, but most of artwiz fonts have an issue.
Any ideas?

Offline

#204 2014-11-18 22:40:54

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: bar - Lightweight xcb-based bar

Sorry for the delay!
The bug has just been fixed, thanks for reporting it smile

Offline

#205 2015-03-07 12:29:08

Stalafin
Member
From: Berlin, Germany
Registered: 2007-10-26
Posts: 617

Re: bar - Lightweight xcb-based bar

I have a pretty high dpi on my screen, and apart from increasing the font size, I don't seem to be able to do anything for bar to have more legible fonts. I have set my native DPI in Xorg.conf.d (ignored by bar), and also in .Xresources for Xft.* (also ignored, since bar doesn't use xft). Any ideas?

Offline

#206 2015-03-14 13:12:46

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: bar - Lightweight xcb-based bar

@Stalafin, I'm looking into this, thanks for reporting.

As a general head-up, I'm happy to announce that bar is now called 'lemonbar', so ask the AUR package mantainers for an updated PKGBUILD (and maybe ask for a 'lemonbar' package in your favourite distro).
A 1.1 release is planned in the following days (1 year after the first 1.0 release), stay tuna!

Offline

#207 2015-04-23 10:19:37

klaus
Member
From: Brazil
Registered: 2013-03-09
Posts: 42

Re: bar - Lightweight xcb-based bar

My bar was looking sexy... until I had to try terminusmod out. I tried mkfontdir, mkfontscale, fc-cache -rf, I have xset +fp and xset fp rehash, but it just won't load the font. Apparently stlarch had to name it with a comma in between, tried quoting, escaping, double escaping... anyone has any idea how to make this work?

Offline

#208 2015-04-23 21:10:04

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: bar - Lightweight xcb-based bar

Fixed in the latest commit, thanks for reporting.

Offline

#209 2015-04-24 07:18:14

klaus
Member
From: Brazil
Registered: 2013-03-09
Posts: 42

Re: bar - Lightweight xcb-based bar

TheLemonMan wrote:

Fixed in the latest commit, thanks for reporting.

Just updated lemonbar and it's working, thanks! I didn't think this was a bug though, I still can't load the font on urxvt.

Offline

#210 2015-04-30 03:50:31

Axioen
Member
Registered: 2014-09-25
Posts: 11

Re: bar - Lightweight xcb-based bar

Bar had no problems finding fonts in xfontsel strings, but once I updated to lemonbar, I was unable to find fonts regardless of what I tried. I'm probably just being stupid. I've tried

 -f "DejaVu Sans-10" 

and

 -f "-benis-lemon-medium-r-normal--10-110-75-75-m-50-iso8859-1" 

which worked with bar. Any ideas?

Offline

#211 2015-04-30 17:21:24

klaus
Member
From: Brazil
Registered: 2013-03-09
Posts: 42

Re: bar - Lightweight xcb-based bar

Axioen wrote:

Bar had no problems finding fonts in xfontsel strings, but once I updated to lemonbar, I was unable to find fonts regardless of what I tried. I'm probably just being stupid. I've tried

 -f "DejaVu Sans-10" 

and

 -f "-benis-lemon-medium-r-normal--10-110-75-75-m-50-iso8859-1" 

which worked with bar. Any ideas?

What package and version are you using? Is there any error output?

Offline

#212 2015-05-07 17:22:16

Axioen
Member
Registered: 2014-09-25
Posts: 11

Re: bar - Lightweight xcb-based bar

klaus wrote:

What package and version are you using? Is there any error output?

I cloned the git just a couple days ago.

The only output is

Could not load font "font name here"

as it fails with any font I try. All of said fonts work fine when using bar which I still have installed.

So, lemonbar WORKS, but its just using an ugly default font.

Last edited by Axioen (2015-05-07 17:33:59)

Offline

#213 2015-05-10 10:39:16

zidhuss
Member
Registered: 2015-02-26
Posts: 2

Re: bar - Lightweight xcb-based bar

I'm having trouble with getting more than one font working on lemonbar. I had them working just fine on bar but now whatever I do I can't get it to work. Here is my panel script and the panel config where I define the fonts.

http://ix.io/isT

http://ix.io/isV

It shows terminess just fine when that's the only font, and the same goes for stlarch, but as soon as I use both of them together it reverts back to the default font. What am I doing wrong?

Offline

#214 2015-05-10 11:01:58

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: bar - Lightweight xcb-based bar

@Axioen

Did you do the usual xset dance ?

@zidhuss

That was changed in a recent commit, you now have to specify each font separatedly

Offline

#215 2015-05-13 14:42:33

doggone
Member
Registered: 2013-06-19
Posts: 50

Re: bar - Lightweight xcb-based bar

xKISAMEx wrote:

If I (manually) start bar I get a repeating message of:

error: Connection refused
error: Connection refused
error: Connection refused
error: Connection refused

It works perfectly fine from what I can tell just curious as to what the message means/how to fix it.

Looks like an mpc error. Do you call mpc in your bar script?

Offline

#216 2015-05-22 01:10:19

Svenstaro
Administrator
From: Germany
Registered: 2008-11-19
Posts: 388

Re: bar - Lightweight xcb-based bar

Heads-up: I just cleaned up the AUR and merged all old packages to follow the new upstream name.

@TheLemonMan: Xft support would be extremely appreciated. bar is almost unusable on my HiDPI display.

Last edited by Svenstaro (2015-05-22 01:10:40)

Offline

#217 2015-10-26 01:51:12

demure
Member
Registered: 2015-10-09
Posts: 4
Website

Re: bar - Lightweight xcb-based bar

Anyone else still having a lemonbar font issue, like Axioen was?

Offline

#218 2015-11-08 18:39:42

rednaX
Member
Registered: 2015-11-08
Posts: 1

Re: bar - Lightweight xcb-based bar

@demure: I'm having the same problem as @Axioen.

I have done the usual, mkfontdir, mkfontscale, fc-cache -rf, xset +fp and xset fp rehash. One of the fonts im trying to use is FontAwesome, which I have stored for local user, and even tried moving it to shared. I have it stored in $HOME/.local/share/fonts as stated on archwiki. Running "fc-list | grep awesome" shows path to both of them, and i still get "Could not load font fontname".

Hope anyone can help.

Last edited by rednaX (2015-11-08 18:44:10)

Offline

#219 2015-11-13 19:18:15

Shinryuu
Member
From: /dev/urandom
Registered: 2010-02-27
Posts: 339

Re: bar - Lightweight xcb-based bar

bar is life, bar is love.

Offline

#220 2016-02-26 14:01:35

easysid
Member
From: India
Registered: 2013-01-01
Posts: 256

Re: bar - Lightweight xcb-based bar

When can we expect lemonbar in official repos? Bspwm has been there for quite some time, and even compton got added recently. lemonbar is probably the most popular choice with bspwm, so it makes sense for it to be in official repos.

Offline

#221 2016-05-22 21:49:53

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: bar - Lightweight xcb-based bar

I have been moving back to Openbox from i3  (No reason, just want something different).  I have become rather attached to the i3 panel and missed it sad

So, i fired up lemonbar and wrote me some python and got something that looks like this:
http://i.imgur.com/uA64XWB.jpg

The desktops on the left are clickable and will pull the appropriate desktop up.

Here is the Python:

#! /usr/bin/python
import time
import netifaces 
import subprocess
import threading

color={'default': '%{F-}',
       'red'    : '%{F#ffff4040}',
       'green'  : '%{F#ff40ff40}',
       'blue'   : '%{F#ff4040ff}',
       'yellow' : '${F#ffffff40}'
      }

Background = '#60000000'
Font="DejaVu Sans"
Size=10
networks=['wlo1','eno1']

proc=None

def Offset(x,edge='c'):
    return "%%{%s}%%{O%s}"%(edge,x)

def Get():
    while True:
        x=proc.stdout.readline().decode()
        subprocess.call(['wmctrl','-s',x])

def Wireless(offset):
    with open ("/proc/net/wireless", "r") as myfile:
        try:
            s=(myfile.readlines()[2]).split()
        except IndexError:
            s=('','','0','---')
        finally:
            return "%sQual: %s%%; %sdB"%(Offset(offset),s[2],s[3])

def Desktops(offset):

    # Set up the desktops on the left.  Enumerate the desktops, color the one we are on red.  They
    # can each be clicked and will return their number in stdout of lemonbar
    
    desks=subprocess.check_output(["xprop", "-root", "_NET_CURRENT_DESKTOP", "_NET_NUMBER_OF_DESKTOPS"]).decode().split('\n')
    s=['%{l}']
    for i in range(1,int (desks[1][-1:])+1):
        if int(desks[0][-1:]) == i-1:
            c='red'
        else:
            c='default'
        s.append("%s%%{A:%i:}%i %%{A}"%(color[c],i-1,i))
        s.append(color['default'])
    return ''.join(s)

def NetAddresses(offset):
    s=[]
    for net in networks:
        try:
            ip = netifaces.ifaddresses(net)[2][0]
            addr= "%s%s%s"%(color['green'],ip['addr'],color['default'])
        except KeyError:
            addr= "%sNo Address%s"%(color['red'],color['default'])
        s.append("%s%s:%s"%(Offset(offset),net,addr))
        offset = offset - 300
    return ''.join(s)
        
def Battery(offset):
    # Next the battery state
    s=[]
    with open ("/sys/class/power_supply/BAT0/status", "r") as myfile:
        s.append("%s%s"%(Offset(offset),myfile.readlines()[0][:-1]))
    with open ("/sys/class/power_supply/BAT0/capacity", "r") as myfile:
        bat = int(myfile.readlines()[0][:-1])
        c='green'
        if bat<50: c='yellow'
        if bat<25: c='red'
        s.append("%sBat:%s%s%%%s"%(Offset(offset-150),color[c],bat,color['default']))
        return ''.join(s)
    
def Temperature(offset):
    with open ("/sys/class/thermal/thermal_zone0/temp", "r") as myfile:
        temp = int(myfile.readlines()[0][:-1])/1000
        c='green'
        if temp > 80 : c='red'
        return "%sTemp:%s%sC%%{F-}"%(Offset(offset),color[c],temp)

def Time(offset):
    return "%%{r}%s\n"%time.ctime()

def main():

    global proc 
    # Launch lemonbar

    args = ["lemonbar", "-p", "-b", "-B%s" % Background, "-f%s:size=%i"%(Font,Size)]
    proc=subprocess.Popen(args,stdin=subprocess.PIPE, stdout=subprocess.PIPE)

    # Handle inbound stuff in a separate thread.
    t = threading.Thread(target=Get)
    t.daemon = True
    t.start()

    decoderRing = [ (Desktops , None),
                    (Wireless,1350),
                    (NetAddresses,1050),
                    (Battery,500),
                    (Temperature,150),
                    (Time,None)
                  ]
    while True:
        message=[x[0](x[1]) for x in decoderRing]

        # Send it.  Don't forget to pull the handle or it won't go...
        proc.stdin.write("".join(message).encode())
        proc.stdin.flush()
        time.sleep(1)


if __name__ == "__main__":
    main()

    

I run this a bit differently than most lemonbar applications.  This code will instantiatelemonbar and attach to its stdin and stdout.

Just run lemon.py.   It requires  time, netifaces, subprocess, and threading.   I think netifaces is the only non-default dependency.

Edit:  Updated screen shot and code with wifi quality

Last edited by ewaller (2016-05-23 00:03:38)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB