GithubHelp home page GithubHelp logo

Comments (5)

schodet avatar schodet commented on September 21, 2024 2

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.

janpeterd avatar janpeterd commented on September 21, 2024 1

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.

dyfrgi avatar dyfrgi commented on September 21, 2024

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.

pivaldi avatar pivaldi commented on September 21, 2024

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.

IIlllllII avatar IIlllllII commented on September 21, 2024

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)

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.