Also only show tag change visual feedback on the selected screen unless we are switching all of them
This commit is contained in:
parent
c3bbc15ba4
commit
c675f0e8be
|
@ -91,22 +91,31 @@ function workspace_grid:on_tag_selected(t)
|
||||||
-- This is the tag we are leaving
|
-- This is the tag we are leaving
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
for i = 1, screen.count() do
|
|
||||||
s = screen[i]
|
|
||||||
icon_path = "icons/workspace_" .. self.rows .. "x" .. self.columns .. "_" .. t.index .. ".svg"
|
icon_path = "icons/workspace_" .. self.rows .. "x" .. self.columns .. "_" .. t.index .. ".svg"
|
||||||
notification = naughty.notify({
|
notification_config = {
|
||||||
icon = script_path() .. icon_path,
|
icon = script_path() .. icon_path,
|
||||||
icon_size = self.icon_size,
|
icon_size = self.icon_size,
|
||||||
margin = 0,
|
margin = 0,
|
||||||
position = self.position,
|
position = self.position,
|
||||||
preset = naughty.config.presets.normal,
|
preset = naughty.config.presets.normal,
|
||||||
replaces_id = s.workspace_notification_id,
|
|
||||||
screen = i,
|
|
||||||
text = nil,
|
text = nil,
|
||||||
timeout = 1,
|
timeout = 1,
|
||||||
})
|
}
|
||||||
|
if self.switch_all_screens then
|
||||||
|
for i = 1, screen.count() do
|
||||||
|
s = screen[i]
|
||||||
|
notification_config.screen = i
|
||||||
|
notification_config.replaces_id = s.workspace_notification_id
|
||||||
|
notification = naughty.notify(notification_config)
|
||||||
s.workspace_notification_id = notification.id
|
s.workspace_notification_id = notification.id
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
focused_screen = awful.screen.focused()
|
||||||
|
notification_config.screen = focused_screen.index
|
||||||
|
notification_config.replaces_id = focused_screen.workspace_notification_id
|
||||||
|
notification = naughty.notify(notification_config)
|
||||||
|
focused_screen.workspace_notification_id = notification.id
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return setmetatable(workspace_grid, { __call = workspace_grid.new,})
|
return setmetatable(workspace_grid, { __call = workspace_grid.new,})
|
||||||
|
|
Loading…
Reference in New Issue