Custom tasklist filter
This commit is contained in:
parent
5dc7127fdd
commit
e526d2f962
|
@ -29,10 +29,6 @@ local task_list = require("widgets.task-list")
|
|||
-- ===================================================================
|
||||
|
||||
local top_panel = {}
|
||||
local task_lists = {layout = wibox.layout.fixed.horizontal}
|
||||
awful.screen.connect_for_each_screen(function(s)
|
||||
table.insert(task_lists, task_list.create(s))
|
||||
end)
|
||||
|
||||
local updates_indicator = wibox.widget{
|
||||
{
|
||||
|
@ -98,8 +94,8 @@ top_panel.create = function(s)
|
|||
panel:setup {
|
||||
expand = "none",
|
||||
layout = wibox.layout.align.horizontal,
|
||||
task_lists,
|
||||
wibox.widget{},
|
||||
task_list.create(s),
|
||||
nil,
|
||||
{
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
pl(wibox.widget{}, theme.bg_normal .. "00", theme.top_panel_powerline),
|
||||
|
|
|
@ -157,15 +157,14 @@ require("awesomewm-vim-tmux-navigator") {
|
|||
|
||||
local handle_single_win = function(focused)
|
||||
local hide = focused.maximized or focused.fullscreen
|
||||
|
||||
for i, c in ipairs(client.get()) do
|
||||
if not c.floating and c.screen == focused.screen then
|
||||
c.hidden = hide
|
||||
c.minimized = hide
|
||||
end
|
||||
end
|
||||
|
||||
focused.hidden = false
|
||||
focused.minimized = false
|
||||
end
|
||||
|
||||
client.connect_signal("property::fullscreen", handle_single_win)
|
||||
--
|
||||
-- client.connect_signal("property::fullscreen", handle_single_win)
|
||||
client.connect_signal("property::maximized", handle_single_win)
|
||||
|
|
|
@ -197,10 +197,26 @@ local tasklist_buttons = awful.util.table.join(
|
|||
)
|
||||
|
||||
|
||||
local filter = function(c, _)
|
||||
local tags = c.screen.tags
|
||||
for _, t in ipairs(tags) do
|
||||
if t.selected then
|
||||
local ctags = c:tags()
|
||||
for _, v in ipairs(ctags) do
|
||||
if v == t then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
task_list.create = function(s)
|
||||
return awful.widget.tasklist(
|
||||
s,
|
||||
awful.widget.tasklist.filter.currenttags,
|
||||
filter,
|
||||
tasklist_buttons,
|
||||
{},
|
||||
list_update,
|
||||
|
|
Loading…
Reference in New Issue