diff --git a/default_config.lua b/default_config.lua index ffdac34..008e38b 100644 --- a/default_config.lua +++ b/default_config.lua @@ -33,6 +33,7 @@ config.windowSwitcher = "rofi -show window -config " .. awful.util.getdir("confi config.volume_osd_timeout = 2 -- System resources widget +config.system_resources_widget_screens = { 1, 2 } config.system_resources_widget_refresh_interval = 1.5 -- In seconds diff --git a/rc.lua b/rc.lua index 7db466b..70d8f45 100644 --- a/rc.lua +++ b/rc.lua @@ -300,6 +300,15 @@ awful.screen.connect_for_each_screen(function(s) height = 32 }) + function matchesScreen(screens) + for _, allowedScreen in ipairs(screens) do + if allowedScreen == s.index then + return true + end + end + return false + end + -- Add widgets to the wibox s.mywibox:setup { layout = wibox.layout.align.horizontal, @@ -311,7 +320,7 @@ awful.screen.connect_for_each_screen(function(s) }, s.mytasklist, -- Middle widget { -- Right widgets - s.index == 2 and system_resources_widget.widget or nil, + matchesScreen(config.system_resources_widget_screens) and system_resources_widget.widget or nil, layout = wibox.layout.fixed.horizontal, mykeyboardlayout, wibox.widget.systray(),