Code Monkey home page Code Monkey logo

barpyrus's People

Contributors

flocke avatar preisi avatar t-wissmann avatar the-compiler 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

barpyrus's Issues

Siji symbols not displaying in bar

I cannot get siji symbols to display properly in the bar. All I get are small squares of color where the symbols should be:
2022-09-08-221404_414x13_scrot

The font appears to be installed correctly when I check fc-list and xlsfonts. And I am using the example gruvbox_config.py from the share folder. These are, essentially, the only lines of the code that I've changed so far:

# Widget configuration:
# font = '-*-fixed-medium-*-*-*-15-*-*-*-*-*-iso10646-1'
font = '-*-fixed-medium-*-*-*-13-*-*-*-*-*-iso8859-1'
symbol_font = '-wuncon-siji-medium-r-normal-*-10-100-75-75-c-80-iso10646-1'
bar = lemonbar.Lemonbar(
    geometry=(x, y, width, height),
    font=font,
    symbol_font=symbol_font,
)

Any ideas would be appreciated, thanks!

Feature request: Only show the bar on mod key down like i3wm

For the purpose of saving some screen real estate and keep distractions away, I really like the default bar in i3wm, which is like a float frame and only show on mod key down with this setting:

bar {
    mode hide
    hidden_state hide
    modifier $mod
    workspace_buttons yes
}

The bar disappear when mod key is released. It is ideal for laptop with small screens.

TypeError because self.readlines() is None on EOF

I just got this when doing hc wmexec:

Traceback (most recent call last):
  File "/usr/bin/barpyrus", line 33, in <module>
    sys.exit(load_entry_point('barpyrus==0.0.0', 'console_scripts', 'barpyrus')())
  File "/usr/lib/python3.8/site-packages/barpyrus/mainloop.py", line 47, in main
    main_loop(bar)
  File "/usr/lib/python3.8/site-packages/barpyrus/mainloop.py", line 95, in main_loop
    x.process()
  File "/usr/lib/python3.8/site-packages/barpyrus/core.py", line 50, in process
    for line in self.readlines():
TypeError: 'NoneType' object is not iterable

This seems to happen because:

def readlines(self):
data = os.read(self.proc.stdout.fileno(), 4096).decode('utf-8')
if not data:
# EOF
return None

but the None return value isn't actually handled:

def process(self):
for line in self.readlines():
self.handle_line(line)

Not sure what the proper fix would be though - should it return [] instead?

How to change color of HLWM Tags in bar?

The custom color theme function does not seem to affect HLWMTags like it does the other elements.

gold = Theme(bg = '#ee121212', fg = '#ceaf51', padding = (3,3))
# Widget configuration:
bar = lemonbar.Lemonbar(geometry = (x,y,width,height))
bar.widget = W.ListLayout([
    W.RawLabel('%{l}'),
    gold(hlwm.HLWMTags(hc, monitor)),
    W.RawLabel('%{c}'),
    gold(hlwm.HLWMWindowTitle(hc)),
    W.RawLabel('%{r}'),
    gold(W.DateTime('%B %d, %H:%M |')),
])

1

How can the tag colors be changed?

Wrong screen geometry when using xrandr's `--same-as`

I have three screens:

  • Internal laptop screen (eDP)
  • Portable USB-C screen (DisplayPort-0)
  • External HDMI projector (HDMI-A-0)

With that, I'm trying to set up xrandr so that I have my laptop screen, and the portable screen on the left of it, mirroring what people see on the projector. Thus, I run:

xrandr --output DisplayPort-0 --left-of eDP --auto
xrandr --output HDMI-A-0 --same-as DisplayPort-0 --auto
hc detect_monitors

which leads to xrandr reporting:

eDP connected primary 1920x1080+1920+0
HDMI-A-0 connected 1920x1080+0+0
DisplayPort-0 connected 1920x1080+0+0

and hc list_monitors saying:

0: 1920x1080+1920+0 with tag "2" [FOCUS]
1: 1920x1080+0+0 with tag "1"

however, I can't get barpyrus to show up on my laptop screen anymore: When I run either barpyrus 0 or barpyrus 1, the panel shows up on the left USB-C screen (probably picking DisplayPort and HDMI?). When I do barpyrus 2, I get:

monitor_rect: Cannot parse argument "2": No such monitor: 2
Traceback (most recent call last):
  File "/usr/bin/barpyrus", line 33, in <module>
    sys.exit(load_entry_point('barpyrus==0.0.0', 'console_scripts', 'barpyrus')())
  File "/usr/lib/python3.10/site-packages/barpyrus/mainloop.py", line 45, in main
    conf = get_user_config()
  File "/usr/lib/python3.10/site-packages/barpyrus/mainloop.py", line 39, in get_user_config
    return get_config(user_config_path())
  File "/usr/lib/python3.10/site-packages/barpyrus/mainloop.py", line 24, in get_config
    exec(code, global_vars)
  File "/home/florian/.config/barpyrus/config.py", line 309, in <module>
    bar = main()
  File "/home/florian/.config/barpyrus/config.py", line 261, in main
    x, y, monitor_w, _monitor_h = hc.monitor_rect(monitor)
  File "/usr/lib/python3.10/site-packages/barpyrus/hlwm.py", line 60, in monitor_rect
    x = int(geometry[0])
ValueError: invalid literal for int() with base 10: ''

cg.space results in AttributeError: 'LBPainter' object has no attribute 'spacing_font_width'

With:

from barpyrus import lemonbar, conky

cg = conky.ConkyGenerator(lemonbar.textpainter())
cg.space(50)

I get:

Traceback (most recent call last):
  File "/home/florian/proj/barpyrus/barpyrus.py", line 7, in <module>
    sys.exit(barpyrus.mainloop.main())
  File "/home/florian/proj/barpyrus/barpyrus/mainloop.py", line 45, in main
    conf = get_user_config()
  File "/home/florian/proj/barpyrus/barpyrus/mainloop.py", line 39, in get_user_config
    return get_config(user_config_path())
  File "/home/florian/proj/barpyrus/barpyrus/mainloop.py", line 24, in get_config
    exec(code, global_vars)
  File "/home/florian/tmp/barp.py", line 4, in <module>
    cg.space(50)
  File "/home/florian/proj/barpyrus/barpyrus/lemonbar.py", line 103, in space
    factor = self.lemonbar.spacing_font_width
  File "/home/florian/proj/barpyrus/barpyrus/conky.py", line 208, in __getattr__
    return self._painter.__getattribute__(name)
AttributeError: 'LBPainter' object has no attribute 'spacing_font_width'

which is a regression introduced in f330534 ("More spacing options").

Refresh bar

I just tried this bar with herbstluftwm and works really nice :) I've did some small tweaks and added something to display the volume status. However, it only updates quite rarely. How can I control the refresh-rate, or ideally can it be configured to refresh when for example a certain key is pressed or headphones are plugged in?

Thanks in advance!

PS, here's my battery status, I added the following to the start of conky_text:

conky_text = '%{F\\#9fbc00}%{T2}'
conky_text += '${if_match \"${exec getvolume}\" == \"off\"}\ue202$else\ue203$endif'
conky_text += '%{T-}%{F\\#989898}${exec getvolume} '

where getvolume is a script I have to retrieve the volume from amixer. Can I use the output of getvolume in a variable to not have to call it twice? For example, where does the $battery variable come from?

barpyrus does not start anymore on Arch

After an update on Arch Linux, and a subsequent re-install of barpyrus, barpyrus does not start anymore:

$ barpyrus 
Traceback (most recent call last):
  File "/usr/bin/barpyrus", line 33, in <module>
    sys.exit(load_entry_point('barpyrus==0.0.0', 'console_scripts', 'barpyrus')())
  File "/usr/bin/barpyrus", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'barpyrus'

Any help would be appreciated!

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.