npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@rxrc/apw

v1.0.1

Published

Awesome Pulseaudio Widget

Downloads

7

Readme

Forked from mokasin/apw

Be aware that…

…this project is not developed any longer, nor do I use awesome. It still works though \o/. I am willing to merge bug fixes and improvements that do not alter the appearance or behavior. Breaking changes in this sense, I will not merge.

You are welcome to fork APW and I will add a link to it in the README. Currently known feature adding forks:

Awesome Pulseaudio Widget

Awesome Pulseaudio Widget (APW) is a little widget for Awesome WM, using the awful progressbar widget to display default's sink volume and control Pulseaudio.

It's compatible with Awesome 4.0.

First time I'm using Lua so it might be a little bit quirky.

Get it

cd $XDG_CONFIG_HOME/awesome/
git clone https://github.com/mokasin/apw.git

Use it

Just put these line to the appropriate places in $XDG_CONFIG_HOME/awesome/rc.lua.

-- Load the widget.
local APW = require("apw/widget")

-- Example: Add to wibox. Here to the right. Do it the way you like it.
right_layout:add(APW)

-- Configure the hotkeys.
awful.key({ }, "XF86AudioRaiseVolume",  APW.Up),
awful.key({ }, "XF86AudioLowerVolume",  APW.Down),
awful.key({ }, "XF86AudioMute",         APW.ToggleMute),

Customize it

Theme

Important: beautiful.init must be called before you require apw for theming to work.

Add these variables to your Beautiful theme.lua file and set them to whatever colors or gradients you wish:

--{{{ APW
theme.apw_fg_color = {type = 'linear', from = {0, 0}, to={40,0},
	stops={{0, "#CC8888"}, {.4, "#88CC88"}, {.8, "#8888CC"}}}
theme.apw_bg_color = "#333333"
theme.apw_mute_fg_color = "#CC9393"
theme.apw_mute_bg_color = "#663333"
--}}}

Directly edit widget.lua

You also can customize some properties by editing the configuration variables directly in widget.lua (for example to add a margin). It is advisable to customize the source file in a separate branch. This makes it easy to update to a new version of APW via rebasing.

Overriding hidden widget properties without directly editing widget.lua

.pulseBar and .pulse widget properies allowing to directly override some widget behavior or properties which are not customizeable by beautiful theme variables.

  local volume = require("third_party/apw/widget")
  
  -- adjust progress bar step:
  volume.pulseBar.step = 0.02
  
  -- set Scroll Lock LED on keyboard to show Mute status:
  volume.pulse.OrigToggleMute = volume.pulse.ToggleMute
  volume.pulse.ToggleMute = function(self)
      volume.pulse.OrigToggleMute(self)
      if volume.pulse.Mute then
        awful.spawn.spawn('xset led named "Scroll Lock"')
      else
        awful.spawn.spawn('xset -led named "Scroll Lock"')
      end
  end

Mixer

Right-clicking the widget launches a mixer. By default pavucontrol is used, but you may use a different mixer by calling SetMixer() on your APW object:

local APW = require("apw/widget")
APW:SetMixer("mixer_command -whatever")

Tip

In order to track changes to the volume from outside the widget, it is possible to update the widget periodically.

APWTimer = timer({ timeout = 0.5 }) -- set update interval in s
APWTimer:connect_signal("timeout", APW.Update)
APWTimer:start()

Contributing

Fork it and file a pull request. I'll look into it.