Still the same problem:

~$ nwg-panel                                
pylsa module not found, will try amixer
Copying '/home/empty/.config/nwg-panel/icons_light/window-close-symbolic.svg'
Copying '/home/empty/.config/nwg-panel/icons_dark/window-close-symbolic.svg'
Copying '/home/empty/.config/nwg-panel/executors/au.sh', marking executable
Running on sway
Traceback (most recent call last):
  File "/usr/bin/nwg-panel", line 33, in <module>
    sys.exit(load_entry_point('nwg-panel==0.1.2', 'gui_scripts', 'nwg-panel')())
  File "/usr/lib/python3.8/site-packages/nwg_panel/main.py", line 348, in main
    cc = Controls(panel["controls-settings"], panel["position"], panel["controls"],
  File "/usr/lib/python3.8/site-packages/nwg_panel/modules/controls.py", line 73, in __init__
    self.popup_window = PopupWindow(position, alignment, settings, width, monitor=monitor, icons_path=self.icons_path)
  File "/usr/lib/python3.8/site-packages/nwg_panel/modules/controls.py", line 340, in __init__
TypeError: Argument 1 does not allow None as a value

Both alsa-utils and py3-pyalsaaudio are installed, current APKBUILD:

pkgdesc="GTK3-based panel for sway window manager"
depends="alsa-utils gtk+3.0 gtk-layer-shell light playerctl python3 py3-gobject3 py3-i3ipc py3-netifaces py3-pyalsaaudio py3-psutil upower"
makedepends="py3-setuptools py3-wheel"
options="!check" # no tests

package() {
        python setup.py install --root="$pkgdir" --optimize=1
        install -D -t "pkgdir"/usr/share/pixmaps nwg-panel.svg
        install -D -t "pkgdir"/usr/share/applications nwg-panel-config.desktop

sha512sums="261083ed85ee2be6d303e234a5b849bebcc35cdcda440d0d577b05d02df3f2e57dc78b67618668faa6595832f7b06cef7c5100b254d6391f7238ad4698b159c6  nwg-panel-0.1.2.tar.gz"

At least on Arch, python-pyalsaaudio does not provide the pyalsa python module. The python-pyalsa package is necessary.

We still should be able to use amixer as fallback, but it’s not safe: the output happens to vary between systems, and my parser may be useless on Alpine. Could you show me what amixer sget Master prints in you terminal?

Okay, it doesn’t look like the pyalsa module is available in the Alpine repositories. I can probably package it up if it’s really needed though.


~$ amixer sget Master
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 74
  Mono: Playback 26 [35%] [-48.00dB] [on]

I don’t use PulseAudio in this system and I have the analogue output set as the default via /etc/modprobe.d/alsa.conf:

options snd-hda-intel index=1

This would be the safest solution.

As the line that starts with Mono: is empty on my laptop, my simple paser uses the line with Front Left:, which is absent from your output. Additionally it returns volume value as None, instead of 0, and it crashes the code. The latter will be fixed in a minute, but we still need a better way to parse the amixer output, until pyalsa is available. I’ll try to improve the parser.

@Head_on_a_Stick Could you please try building from the v0.1.3 pre-release? I hope this to parse the amixer output better on your machine. Even if not, it should return 0, instead of crashing the program.

And we have lift off:


It looks fantastic (just like GNOME) and the slider controls for volume & brightness both work but the volume slider shows as muted when it isn’t.

Some problems with the text visibility but I may be able to fix that by tweaking the configuration.

EDIT: the reboot & shutdown stuff seems to be via systemctl, which won’t work in Alpine (for obvious reasons).

1 Like

Top @Head_on_a_Stick

This is just a sample menu, put whatever you want there. E.g. I don’t really need the “Exit” menu at all.

Hmmm… I haven’t noticed [-48.00dB] in your output. Should be:

switch = "on" in line.split()[5]

instead of:

switch = "on" in line.split()[4]

I’ll fix it.

I’m still working on 0.1.3, so the pre-release will be replaced. As soon as some config to the Scratchpad module is ready.

1 Like

Add color: #eeeeee in style.css:

/* Top panel in sample config uses this name */
#panel-top {
    background: #101010

/* Bottom panel in sample config uses this name */
#panel-bottom {
    background: #3b4559

In panel settings the “CSS name” field determines which #name to use - if at all.

v0.1.3 pre-released once again, together with the Scratchpad module.

@Head_on_a_Stick It would be great if you had a minute to give it a try, before a regular release.

It won’t launch now:

~$ nwg-panel                                               
pylsa module not found, will try amixer
Running on sway
Traceback (most recent call last):
  File "/usr/bin/nwg-panel", line 33, in <module>
    sys.exit(load_entry_point('nwg-panel==0.1.3', 'gui_scripts', 'nwg-panel')())
  File "/usr/lib/python3.8/site-packages/nwg_panel/main.py", line 327, in main
    instantiate_content(panel, left_box, panel["modules-left"], icons_path=icons_path)
  File "/usr/lib/python3.8/site-packages/nwg_panel/main.py", line 110, in instantiate_content
    container.pack_start(workspaces, False, False, panel["items-padding"])
KeyError: 'items-padding'

Shit, I removed a wrong key, but forgot to check if the proper one exists. Thanks! Will fix when I’m back at my desk.

@Head_on_a_Stick It should be alright now.

Azote and nwg-panel-config in the scratchpad:


v0.1.3 released

AUR updated.

1 Like

Hard at work @nwg

1 Like

The Scratchpad module was simple. All the code fits vertically in my new vertical display. :slight_smile: Next two things I’d like to add will be much more difficult.


lol, take it easy mate ! You work too hard in there !


v0.1.4 released

New dependency: python-psutil instead of upower / acpi.


Top again @nwg

I’ve just added icon support (light and dark) to gopsuinfo. It turns out to be twice as much resources-friendly as the psuinfo script written in python. All you need to build is Go installed in your system. Use the Makefile - description in README.