Comments (5)
One way to handle this is to instantiate the widget only once, out of awful.screen.connect_for_each_screen
loop.
local myvolume = volume_widget()
from awesome-wm-widgets.
I just noticed that it does update correctly on my secondary display (I am using a dual monitor setup). The displayed value in the statusbar on my primary display stays at the initial value.
from awesome-wm-widgets.
I think this is due to the pactl-widget storing the volume widget it's using in a single variable across all instances. volume
at https://github.com/streetturtle/awesome-wm-widgets/blob/master/pactl-widget/volume.lua#L27 has its property widget
set to a value returned by the volume-widget and later referenced in volume:toggle()
. But this will have been overwritten by the later call of the module.
from awesome-wm-widgets.
My solution is to place the widget only in the primary screen (in fact, all the widgets are in the primary screen) :
local weather_widget = require("awesome-wm-widgets.weather-widget.weather")
…
awful.screen.connect_for_each_screen(function(s)
…
local weather_wdg = nil
if s == screen.primary then
audio_wdg = {
layout = awful.widget.only_on_screen,
screen = screen.primary, -- Only display on primary screen
volume_widget{ }
}
end
…
-- Add widgets to the wibox
s.mywibox:setup {
layout = wibox.layout.align.horizontal,
{ -- Left widgets
…
},
s.mytasklist, -- Middle widget
{ -- Right widgets
audio_wdg,
…
s.mylayoutbox,
},
}
end
from awesome-wm-widgets.
For people follows this default rc.lua file,
Any widgets defined within callback of screen.connect_signal("request::desktop_decoration")
should be shared across screens, such as the textclock
widget, while the promptbox
is not.
-- Create a textclock widget
mytextclock = wibox.widget.textclock()
-- @DOC_FOR_EACH_SCREEN@
screen.connect_signal("request::desktop_decoration", function(s)
-- Each screen has its own tag table.
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[1])
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
end)
from awesome-wm-widgets.
Related Issues (20)
- Consider using wttr.in for weather widget HOT 2
- Weather widget does not work, but there are 0 errors
- volume-widget: Mixer selection
- pactl-widget: No way to set limit on max volume HOT 2
- brightness_widget: incorrect brightnessctl command for getting current brightness level HOT 1
- Change color font on the spotify-widget Widget HOT 3
- cpu widget gets placed off screen sometimes HOT 1
- Install dir not found
- README.md installation info is missing HOT 2
- Are there any plans to support hibernate in logout popup? HOT 1
- scripts
- Batteryarc shows battery warning when battery is fully charged
- [Calendar] `focus_date_bg` and `focus_date_fg` broken after updating to last commits HOT 4
- apt widget not working because icon does not show in bar HOT 3
- calendar-widget: 'today' day is not set when opening the calendar
- Battery widget doesn't handle well two batteries
- OpenWeatherMap API 2.5 deprecation HOT 6
- Typo in logout-popup-widget
- Volume widget seems to malfunction after upgrading pavucontrol to v6.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from awesome-wm-widgets.