doc: Document the tasklist widget.

This commit is contained in:
Emmanuel Lepage Vallee 2021-11-13 00:21:21 -08:00
parent cf2129b2fe
commit 8f71ef6dff
40 changed files with 2541 additions and 4 deletions

View File

@ -105,41 +105,65 @@ local tasklist = { mt = {} }
local instances local instances
--- The default foreground (text) color. --- The default foreground (text) color.
--
-- @DOC_wibox_awidget_tasklist_style_fg_normal_EXAMPLE@
--
-- @beautiful beautiful.tasklist_fg_normal -- @beautiful beautiful.tasklist_fg_normal
-- @tparam[opt=nil] string|pattern fg_normal -- @tparam[opt=nil] string|pattern fg_normal
-- @see gears.color -- @see gears.color
--- The default background color. --- The default background color.
--
-- @DOC_wibox_awidget_tasklist_style_bg_normal_EXAMPLE@
--
-- @beautiful beautiful.tasklist_bg_normal -- @beautiful beautiful.tasklist_bg_normal
-- @tparam[opt=nil] string|pattern bg_normal -- @tparam[opt=nil] string|pattern bg_normal
-- @see gears.color -- @see gears.color
--- The focused client foreground (text) color. --- The focused client foreground (text) color.
--
-- @DOC_wibox_awidget_tasklist_style_fg_focus_EXAMPLE@
--
-- @beautiful beautiful.tasklist_fg_focus -- @beautiful beautiful.tasklist_fg_focus
-- @tparam[opt=nil] string|pattern fg_focus -- @tparam[opt=nil] string|pattern fg_focus
-- @see gears.color -- @see gears.color
--- The focused client background color. --- The focused client background color.
--
-- @DOC_wibox_awidget_tasklist_style_bg_focus_EXAMPLE@
--
-- @beautiful beautiful.tasklist_bg_focus -- @beautiful beautiful.tasklist_bg_focus
-- @tparam[opt=nil] string|pattern bg_focus -- @tparam[opt=nil] string|pattern bg_focus
-- @see gears.color -- @see gears.color
--- The urgent clients foreground (text) color. --- The urgent clients foreground (text) color.
--
-- @DOC_wibox_awidget_tasklist_style_fg_urgent_EXAMPLE@
--
-- @beautiful beautiful.tasklist_fg_urgent -- @beautiful beautiful.tasklist_fg_urgent
-- @tparam[opt=nil] string|pattern fg_urgent -- @tparam[opt=nil] string|pattern fg_urgent
-- @see gears.color -- @see gears.color
--- The urgent clients background color. --- The urgent clients background color.
--
-- @DOC_wibox_awidget_tasklist_style_bg_urgent_EXAMPLE@
--
-- @beautiful beautiful.tasklist_bg_urgent -- @beautiful beautiful.tasklist_bg_urgent
-- @tparam[opt=nil] string|pattern bg_urgent -- @tparam[opt=nil] string|pattern bg_urgent
-- @see gears.color -- @see gears.color
--- The minimized clients foreground (text) color. --- The minimized clients foreground (text) color.
--
-- @DOC_wibox_awidget_tasklist_style_fg_minimize_EXAMPLE@
--
-- @beautiful beautiful.tasklist_fg_minimize -- @beautiful beautiful.tasklist_fg_minimize
-- @tparam[opt=nil] string|pattern fg_minimize -- @tparam[opt=nil] string|pattern fg_minimize
-- @see gears.color -- @see gears.color
--- The minimized clients background color. --- The minimized clients background color.
--
-- @DOC_wibox_awidget_tasklist_style_bg_minimize_EXAMPLE@
--
-- @beautiful beautiful.tasklist_bg_minimize -- @beautiful beautiful.tasklist_bg_minimize
-- @tparam[opt=nil] string|pattern bg_minimize -- @tparam[opt=nil] string|pattern bg_minimize
-- @see gears.color -- @see gears.color
@ -161,10 +185,16 @@ local instances
-- @tparam[opt=nil] string bg_image_minimize -- @tparam[opt=nil] string bg_image_minimize
--- Disable the tasklist client icons. --- Disable the tasklist client icons.
--
-- @DOC_wibox_awidget_tasklist_style_disable_icon_EXAMPLE@
--
-- @beautiful beautiful.tasklist_disable_icon -- @beautiful beautiful.tasklist_disable_icon
-- @tparam[opt=false] boolean tasklist_disable_icon -- @tparam[opt=false] boolean tasklist_disable_icon
--- Disable the tasklist client titles. --- Disable the tasklist client titles.
--
-- @DOC_wibox_awidget_tasklist_style_disable_task_name_EXAMPLE@
--
-- @beautiful beautiful.tasklist_disable_task_name -- @beautiful beautiful.tasklist_disable_task_name
-- @tparam[opt=false] boolean tasklist_disable_task_name -- @tparam[opt=false] boolean tasklist_disable_task_name
@ -172,6 +202,8 @@ local instances
-- --
-- See the <a href="#status_icons">Status icons</a> section for more details. -- See the <a href="#status_icons">Status icons</a> section for more details.
-- --
-- @DOC_wibox_awidget_tasklist_style_plain_task_name_EXAMPLE@
--
-- @beautiful beautiful.tasklist_plain_task_name -- @beautiful beautiful.tasklist_plain_task_name
-- @tparam[opt=false] boolean tasklist_plain_task_name -- @tparam[opt=false] boolean tasklist_plain_task_name
@ -578,6 +610,10 @@ end
--- Set the tasklist layout. --- Set the tasklist layout.
-- --
-- This can be used to change the layout based on the number of clients:
--
-- @DOC_sequences_client_tasklist_layout1_EXAMPLE@
--
-- @property base_layout -- @property base_layout
-- @tparam[opt=wibox.layout.flex.horizontal] wibox.layout base_layout -- @tparam[opt=wibox.layout.flex.horizontal] wibox.layout base_layout
-- @propemits true false -- @propemits true false
@ -585,15 +621,24 @@ end
--- The tasklist screen. --- The tasklist screen.
-- --
-- @DOC_sequences_client_tasklist_screen1_EXAMPLE@
--
-- @property screen -- @property screen
-- @tparam screen screen -- @tparam screen screen
-- @propemits true false -- @propemits true false
--- A function to narrow down the list of clients. --- A function to narrow down the list of clients.
-- --
-- @DOC_sequences_client_tasklist_custom_filter1_EXAMPLE@
--
-- @property filter -- @property filter
-- @tparam function filter -- @tparam function filter
-- @propemits true false -- @propemits true false
-- @see awful.widget.tasklist.filter.allscreen
-- @see awful.widget.tasklist.filter.alltags
-- @see awful.widget.tasklist.filter.currenttags
-- @see awful.widget.tasklist.filter.minimizedcurrenttags
-- @see awful.widget.tasklist.filter.focused
--- A function called when the tasklist is refreshed. --- A function called when the tasklist is refreshed.
-- --
@ -606,15 +651,20 @@ end
--- A template for creating the client widgets. --- A template for creating the client widgets.
-- --
-- @DOC_sequences_client_tasklist_widget_template1_EXAMPLE@
--
-- @property widget_template -- @property widget_template
-- @tparam table widget_template -- @tparam table widget_template
-- @propemits true false -- @propemits true false
--- A function to gather the clients to display. --- A function to gather the clients to display.
-- --
-- @DOC_sequences_client_tasklist_custom_source1_EXAMPLE@
--
-- @property source -- @property source
-- @tparam function source -- @tparam function source
-- @propemits true false -- @propemits true false
-- @see awful.widget.tasklist.source.all_clients
function tasklist:set_base_layout(layout) function tasklist:set_base_layout(layout)
self._private.base_layout = base.make_widget_from_value( self._private.base_layout = base.make_widget_from_value(
@ -990,8 +1040,11 @@ function tasklist.filter.currenttags(c, screen)
end end
--- Filtering function to include only the minimized clients from currently selected tags. --- Filtering function to include only the minimized clients from currently selected tags.
-- @param c The client. --
-- @param screen The screen we are drawing on. --@DOC_sequences_client_tasklist_filter_minimizedcurrenttags1_EXAMPLE@
--
-- @tparam client c The client.
-- @tparam screen screen The screen we are drawing on.
-- @return true if c is in a selected tag on screen and is minimized, false otherwise -- @return true if c is in a selected tag on screen and is minimized, false otherwise
-- @filterfunction awful.widget.tasklist.filter.minimizedcurrenttags -- @filterfunction awful.widget.tasklist.filter.minimizedcurrenttags
function tasklist.filter.minimizedcurrenttags(c, screen) function tasklist.filter.minimizedcurrenttags(c, screen)
@ -1018,8 +1071,11 @@ function tasklist.filter.minimizedcurrenttags(c, screen)
end end
--- Filtering function to include only the currently focused client. --- Filtering function to include only the currently focused client.
-- @param c The client. --
-- @param screen The screen we are drawing on. --@DOC_sequences_client_tasklist_filter_focused1_EXAMPLE@
--
-- @tparam client c The client.
-- @tparam screen screen The screen we are drawing on.
-- @return true if c is focused on screen, false otherwise -- @return true if c is focused on screen, false otherwise
-- @filterfunction awful.widget.tasklist.filter.focused -- @filterfunction awful.widget.tasklist.filter.focused
function tasklist.filter.focused(c, screen) function tasklist.filter.focused(c, screen)

View File

@ -0,0 +1,96 @@
--DOC_GEN_IMAGE --DOC_HIDE_START --DOC_NO_USAGE
local module = ...
require("ruled.client")
local awful = {
tag = require("awful.tag"),
widget = {
tasklist = require("awful.widget.tasklist")
},
button = require("awful.button"),
layout = require("awful.layout")
}
require("awful.ewmh")
local wibox = require("wibox")
screen[1]:fake_resize(0, 0, 1024, 640)
screen.fake_add(1050, 0, 1024, 640).outputs = {["eVGA1"] = {mm_height=50, mm_width=80 }} --DOC_HIDE
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, screen[1], awful.layout.suit.corner.nw)
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, screen[2], awful.layout.suit.tile.left)
local s = screen[1]
--DOC_HIDE_END
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
base_layout = wibox.widget {
spacing = 2,
layout = wibox.layout.fixed.horizontal,
},
}
--DOC_NEWLINE
--DOC_HIDE_START
local _tl = tasklist
function awful.spawn(name, args)
client.gen_fake{class = name, name = name, x = 2094, y=10, width = 60, height =50, screen=args.screen}
end
--DOC_NEWLINE
module.add_event("Spawn some clients.", function()
--DOC_HIDE_END
-- Spawn 5 clients on screen 1.
for i= 1, 5 do
awful.spawn("Client #"..i, {screen = screen[1]})
end
--DOC_NEWLINE
-- Spawn 3 clients on screen 2.
for i=1, 3 do
awful.spawn("Client #"..(5+i), {screen = screen[2]})
end
--DOC_NEWLINE
--DOC_HIDE_START
client.get()[2]:activate {}
client.get()[2].color = "#ff777733"
end)
--DOC_NEWLINE
module.display_tags()
module.display_widget(_tl, nil, 22)
module.add_event("Set the filter to allscreen.", function()
--DOC_HIDE_END
-- Set the filter to allscreen.
tasklist.filter = awful.widget.tasklist.filter.allscreen
--DOC_NEWLINE
--DOC_HIDE_START
end)
module.display_widget(_tl, nil, 22)
module.add_event("Set a custom filter function.", function()
--DOC_HIDE_END
-- Create a pointless demo filter to only have clients
-- with off numbers in the name. Because... example!
tasklist.filter = function(c, screen) -- luacheck: no unused args
return c.name:match("[13579]") and c or nil
end
--DOC_HIDE_START
end)
module.display_widget(_tl, nil, 22)
module.execute { display_screen = true , display_clients = true,
display_label = false, display_client_name = true,
display_mouse = true ,
}

View File

@ -0,0 +1,102 @@
--DOC_GEN_IMAGE --DOC_HIDE_START --DOC_NO_USAGE
local module = ...
require("ruled.client")
local awful = {
tag = require("awful.tag"),
widget = {
tasklist = require("awful.widget.tasklist")
},
button = require("awful.button"),
layout = require("awful.layout")
}
require("awful.ewmh")
local wibox = require("wibox")
screen[1]:fake_resize(0, 0, 1024, 640)
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, screen[1], awful.layout.suit.corner.nw)
local s = screen[1]
--DOC_HIDE_END
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
base_layout = wibox.widget {
spacing = 2,
layout = wibox.layout.fixed.horizontal,
},
}
--DOC_NEWLINE
--DOC_HIDE_START
local _tl = tasklist
function awful.spawn(name, args)
client.gen_fake{class = name, name = name, x = 2094, y=10, width = 600, height =300, screen=args.screen}
end
--DOC_NEWLINE
module.add_event("Spawn some clients.", function()
--DOC_HIDE_END
-- Spawn 5 clients on screen 1.
for i= 1, 5 do
awful.spawn("Client #"..i, {screen = screen[1]})
end
--DOC_NEWLINE
-- Make 2 clients floating.
client.get()[2].floating = true
client.get()[4].floating = true
--DOC_NEWLINE
--DOC_HIDE_START
client.get()[2]:geometry {
x = 150, y = 100,
}
client.get()[4]:geometry {
x = 300, y = 200,
}
--DOC_NEWLINE
--DOC_HIDE_START
client.get()[2]:activate {}
client.get()[2].color = "#ff777733"
end)
--DOC_NEWLINE
module.display_tags()
module.display_widget(_tl, nil, 22)
module.add_event("Set a custom source function.", function()
--DOC_HIDE_END
-- Only select the floating clients for the tasklist screen.
tasklist.source = function(screen)
local ret = {}
--DOC_NEWLINE
for _, c in ipairs(screen.clients) do
if c.floating then
table.insert(ret, c)
end
end
--DOC_NEWLINE
return ret
end
--DOC_HIDE_START
end)
module.display_widget(_tl, nil, 22)
module.execute { display_screen = true , display_clients = true,
display_label = false, display_client_name = true,
display_mouse = true ,
}

View File

@ -0,0 +1,82 @@
--DOC_GEN_IMAGE --DOC_HIDE_START --DOC_NO_USAGE
local module = ...
require("ruled.client")
local awful = {
tag = require("awful.tag"),
widget = {
tasklist = require("awful.widget.tasklist")
},
button = require("awful.button"),
layout = require("awful.layout")
}
require("awful.ewmh")
local wibox = require("wibox")
screen[1]:fake_resize(0, 0, 1024, 640)
screen.fake_add(1050, 0, 1024, 640).outputs = {["eVGA1"] = {mm_height=50, mm_width=80 }} --DOC_HIDE
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, screen[1], awful.layout.suit.corner.nw)
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, screen[2], awful.layout.suit.tile.left)
local s = screen[1]
--DOC_HIDE_END
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
base_layout = wibox.widget {
spacing = 2,
layout = wibox.layout.fixed.horizontal,
},
}
--DOC_NEWLINE
--DOC_HIDE_START
local _tl = tasklist
function awful.spawn(name, args)
client.gen_fake{class = name, name = name, x = 2094, y=10, width = 60, height =50, screen=args.screen}
end
--DOC_NEWLINE
module.add_event("Spawn some clients.", function()
--DOC_HIDE_END
-- Spawn 5 clients on screen 1.
for i= 1, 5 do
awful.spawn("Client #"..i, {screen = screen[1]})
end
--DOC_NEWLINE
-- Spawn 3 clients on screen 2.
for i=1, 3 do
awful.spawn("Client #"..(5+i), {screen = screen[2]})
end
--DOC_NEWLINE
--DOC_HIDE_START
client.get()[2]:activate {}
client.get()[2].color = "#ff777733"
end)
--DOC_NEWLINE
module.display_tags()
module.display_widget(_tl, nil, 22)
module.add_event("Set the filter to allscreen.", function()
--DOC_HIDE_END
-- Set the filter to allscreen.
tasklist.filter = awful.widget.tasklist.filter.allscreen
--DOC_NEWLINE
--DOC_HIDE_START
end)
module.display_widget(_tl, nil, 22)
module.execute { display_screen = true , display_clients = true,
display_label = false, display_client_name = true,
display_mouse = true ,
}

View File

@ -0,0 +1,79 @@
--DOC_GEN_IMAGE --DOC_HIDE_START --DOC_NO_USAGE
local module = ...
require("ruled.client")
local awful = {
tag = require("awful.tag"),
widget = {
tasklist = require("awful.widget.tasklist")
},
button = require("awful.button"),
layout = require("awful.layout")
}
require("awful.ewmh")
local wibox = require("wibox")
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, screen[1], awful.layout.suit.corner.nw)
local s = screen[1]
--DOC_HIDE_END
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
base_layout = wibox.widget {
spacing = 2,
layout = wibox.layout.fixed.horizontal,
},
}
--DOC_NEWLINE
--DOC_HIDE_START
local _tl = tasklist
function awful.spawn(name, args)
client.gen_fake{class = name, name = name, x = 2094, y=10, width = 60, height =50, tags=args.tags}
end
--DOC_NEWLINE
module.add_event("Spawn some clients.", function()
--DOC_HIDE_END
-- Spawn 5 clients on screen 1.
for i= 1, 5 do
awful.spawn("Client #"..i, {tags = {screen[1].tags[1]}})
end
--DOC_NEWLINE
-- Spawn 3 clients on screen 2.
for i=1, 3 do
awful.spawn("Client #"..(5+i), {tags = {screen[1].tags[2]}})
end
--DOC_NEWLINE
--DOC_HIDE_START
client.get()[2]:activate {}
client.get()[2].color = "#ff777733"
end)
--DOC_NEWLINE
module.display_tags()
module.display_widget(_tl, nil, 22)
module.add_event("Set the filter to alltags.", function()
--DOC_HIDE_END
-- Set the filter to alltags.
tasklist.filter = awful.widget.tasklist.filter.alltags
--DOC_NEWLINE
--DOC_HIDE_START
end)
module.display_widget(_tl, nil, 22)
module.execute { display_screen = false, display_clients = true,
display_label = false, display_client_name = true,
display_mouse = true ,
}

View File

@ -0,0 +1,80 @@
--DOC_GEN_IMAGE --DOC_HIDE_START --DOC_NO_USAGE
local module = ...
require("ruled.client")
local awful = {
tag = require("awful.tag"),
widget = {
tasklist = require("awful.widget.tasklist")
},
button = require("awful.button"),
layout = require("awful.layout")
}
require("awful.ewmh")
local wibox = require("wibox")
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, screen[1], awful.layout.suit.corner.nw)
local s = screen[1]
--DOC_HIDE_END
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
base_layout = wibox.widget {
spacing = 2,
layout = wibox.layout.fixed.horizontal,
},
}
--DOC_NEWLINE
--DOC_HIDE_START
local _tl = tasklist
function awful.spawn(name, args)
client.gen_fake{class = name, name = name, x = 2094, y=10, width = 60, height =50, tags=args.tags}
end
--DOC_NEWLINE
module.add_event("Spawn some clients.", function()
--DOC_HIDE_END
-- Spawn 5 clients on screen 1.
for k, t in ipairs(screen[1].tags) do
for i= 1, 2 do
awful.spawn("Client #"..(k-1)*2 + i, {tags = {t}})
end
end
--DOC_NEWLINE
-- Selected some tags.
screen[1].tags[3].selected = true
screen[1].tags[5].selected = true
--DOC_NEWLINE
--DOC_HIDE_START
client.get()[2]:activate {}
client.get()[2].color = "#ff777733"
end)
--DOC_NEWLINE
module.display_tags()
module.display_widget(_tl, nil, 22)
module.add_event("Set the filter to currenttags.", function()
--DOC_HIDE_END
-- Set the filter to currenttags.
tasklist.filter = awful.widget.tasklist.filter.currenttags
--DOC_NEWLINE
--DOC_HIDE_START
end)
module.display_widget(_tl, nil, 22)
module.execute { display_screen = false, display_clients = true,
display_label = false, display_client_name = true,
display_mouse = true ,
}

View File

@ -0,0 +1,73 @@
--DOC_GEN_IMAGE --DOC_HIDE_START --DOC_NO_USAGE
local module = ...
require("ruled.client")
local awful = {
tag = require("awful.tag"),
widget = {
tasklist = require("awful.widget.tasklist")
},
button = require("awful.button"),
layout = require("awful.layout")
}
require("awful.ewmh")
local wibox = require("wibox")
screen[1]:fake_resize(0, 0, 1024, 640)
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, screen[1], awful.layout.suit.corner.nw)
local s = screen[1]
--DOC_HIDE_END
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
base_layout = wibox.widget {
spacing = 2,
layout = wibox.layout.fixed.horizontal,
},
}
--DOC_NEWLINE
--DOC_HIDE_START
local _tl = tasklist
function awful.spawn(name, args)
client.gen_fake{class = name, name = name, x = 2094, y=10, width = 60, height =50, screen=args.screen}
end
--DOC_NEWLINE
module.add_event("Spawn some clients.", function()
--DOC_HIDE_END
-- Spawn 5 clients on screen 1.
for i= 1, 5 do
awful.spawn("Client #"..i, {screen = screen[1]})
end
--DOC_NEWLINE
--DOC_HIDE_START
client.get()[2]:activate {}
client.get()[2].color = "#ff777733"
end)
--DOC_NEWLINE
module.display_tags()
module.display_widget(_tl, nil, 22)
module.add_event("Set the filter to focused.", function()
--DOC_HIDE_END
-- Set the filter to focused.
tasklist.filter = awful.widget.tasklist.filter.focused
--DOC_NEWLINE
--DOC_HIDE_START
end)
module.display_widget(_tl, nil, 22)
module.execute { display_screen = true , display_clients = true,
display_label = false, display_client_name = true,
display_mouse = true ,
}

View File

@ -0,0 +1,82 @@
--DOC_GEN_IMAGE --DOC_HIDE_START --DOC_NO_USAGE
local module = ...
require("ruled.client")
local awful = {
tag = require("awful.tag"),
widget = {
tasklist = require("awful.widget.tasklist")
},
button = require("awful.button"),
layout = require("awful.layout")
}
require("awful.ewmh")
local wibox = require("wibox")
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, screen[1], awful.layout.suit.corner.nw)
local s = screen[1]
--DOC_HIDE_END
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
base_layout = wibox.widget {
spacing = 2,
layout = wibox.layout.fixed.horizontal,
},
}
--DOC_NEWLINE
--DOC_HIDE_START
local _tl = tasklist
function awful.spawn(name, args)
client.gen_fake{
class = name, name = name, x = 2094, y=10, width = 60, height =50, tags=args.tags, minimized=args.minimized
}
end
--DOC_NEWLINE
module.add_event("Spawn some clients.", function()
--DOC_HIDE_END
-- Spawn 5 clients on screen 1.
for k, t in ipairs(screen[1].tags) do
for i= 1, 2 do
awful.spawn("Client #"..(k-1)*2 + i, {tags = {t}, minimized = i == 1})
end
end
--DOC_NEWLINE
-- Selected some tags.
screen[1].tags[3].selected = true
screen[1].tags[5].selected = true
--DOC_NEWLINE
--DOC_HIDE_START
client.get()[2]:activate {}
client.get()[2].color = "#ff777733"
end)
--DOC_NEWLINE
module.display_tags()
module.display_widget(_tl, nil, 22)
module.add_event("Set the filter to minimizedcurrenttags.", function()
--DOC_HIDE_END
-- Set the filter to minimizedcurrenttags.
tasklist.filter = awful.widget.tasklist.filter.minimizedcurrenttags
--DOC_NEWLINE
--DOC_HIDE_START
end)
module.display_widget(_tl, nil, 22)
module.execute { display_screen = false, display_clients = true,
display_label = false, display_client_name = true,
display_mouse = true ,
}

View File

@ -0,0 +1,117 @@
--DOC_GEN_IMAGE --DOC_HIDE_START --DOC_NO_USAGE
local module = ...
require("ruled.client")
local awful = {
tag = require("awful.tag"),
widget = {
tasklist = require("awful.widget.tasklist")
},
button = require("awful.button")
}
require("awful.ewmh")
local wibox = require("wibox")
screen[1]:fake_resize(0, 0, 800, 480)
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, screen[1])
local s = screen[1]
--DOC_HIDE_END
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
base_layout = wibox.widget {
spacing = 2,
layout = wibox.layout.fixed.horizontal,
},
buttons = {
awful.button({ }, 1, function (c)
c:activate {
context = "tasklist",
action = "toggle_minimization"
}
end),
awful.button({ }, 3, function() awful.menu.client_list { theme = { width = 250 } } end),
awful.button({ }, 4, function() awful.client.focus.byidx(-1) end),
awful.button({ }, 5, function() awful.client.focus.byidx( 1) end),
},
}
--DOC_NEWLINE
tasklist:connect_signal("property::count", function(self)
local count = self.count
--DOC_NEWLINE
if count > 5 and not self.is_grid then
self.base_layout = wibox.widget {
forced_num_rows = 2,
homogeneous = true,
expand = true,
spacing = 2,
layout = wibox.layout.grid.horizontal
}
--DOC_NEWLINE
self.is_grid = true
elseif count <= 5 and self.is_grid then
self.base_layout = wibox.widget {
spacing = 2,
layout = wibox.layout.fixed.horizontal
}
--DOC_NEWLINE
self.is_grid = false
end
end)
--DOC_NEWLINE
--DOC_HIDE_START
local _tl = tasklist
function awful.spawn(name)
client.gen_fake{class = name, name = name, x = 2094, y=10, width = 60, height =50, screen=screen[1]}
end
--DOC_NEWLINE
module.add_event("Spawn 5 clients.", function()
--DOC_HIDE_END
-- Spawn 5 clients.
for i=1, 5 do
awful.spawn("Client #"..i)
end
--DOC_NEWLINE
--DOC_HIDE_START
client.get()[2]:activate {}
client.get()[2].color = "#ff777733"
end)
--DOC_NEWLINE
module.display_widget(_tl, nil, 22)
module.add_event("Spawn another client.", function()
--DOC_HIDE_END
-- Spawn another client.
awful.spawn("Client #6")
--DOC_NEWLINE
--DOC_HIDE_START
end)
module.display_widget(_tl, nil, 44)
module.add_event("Kill 3 clients.", function()
--DOC_HIDE_END
-- Kill 3 clients.
for _=1, 3 do
client.get()[1]:kill()
end
--DOC_HIDE_START
end)
module.display_widget(_tl, nil, 22)
module.execute { display_screen = true , display_clients = true,
display_label = false, display_client_name = true,
display_mouse = true ,
}

View File

@ -0,0 +1,87 @@
--DOC_GEN_IMAGE --DOC_HIDE_START --DOC_NO_USAGE
local module = ...
require("ruled.client")
local awful = {
tag = require("awful.tag"),
widget = {
tasklist = require("awful.widget.tasklist")
},
layout = require("awful.layout"),
button = require("awful.button")
}
require("awful.ewmh")
screen[1]:fake_resize(0, 0, 1024, 640)
screen.fake_add(1050, 0, 1024, 640).outputs = {["eVGA1"] = {mm_height=50, mm_width=80 }} --DOC_HIDE
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, screen[1], awful.layout.suit.corner.nw)
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, screen[2], awful.layout.suit.tile.left)
--DOC_HIDE_END
local tasklist = awful.widget.tasklist {
screen = screen[1],
filter = awful.widget.tasklist.filter.currenttags,
buttons = {
awful.button({ }, 1, function (c)
c:activate {
context = "tasklist",
action = "toggle_minimization"
}
end),
awful.button({ }, 3, function() awful.menu.client_list { theme = { width = 250 } } end),
awful.button({ }, 4, function() awful.client.focus.byidx(-1) end),
awful.button({ }, 5, function() awful.client.focus.byidx( 1) end),
},
}
--DOC_NEWLINE
--DOC_HIDE_START
local _tl = tasklist
function awful.spawn(name, args)
client.gen_fake{class = name, name = name, x = 2094, y=10, width = 60, height =50, screen=args.screen}
end
--DOC_NEWLINE
module.add_event("Spawn some clients.", function()
--DOC_HIDE_END
-- Spawn 5 clients on screen 1.
for i= 1, 5 do
awful.spawn("Client #"..i, {screen = screen[1]})
end
--DOC_NEWLINE
-- Spawn 3 clients on screen 2.
for i=1, 3 do
awful.spawn("Client #"..(5+i), {screen = screen[2]})
end
--DOC_NEWLINE
--DOC_HIDE_START
client.get()[2]:activate {}
client.get()[2].color = "#ff777733"
end)
module.display_tags()
--DOC_NEWLINE
module.display_widget(_tl, nil, 22)
module.add_event("Change the tasklist screen.", function()
--DOC_HIDE_END
-- Change the tastlist screen.
tasklist.screen = screen[2]
--DOC_NEWLINE
--DOC_HIDE_START
end)
module.display_widget(_tl, nil, 22)
module.execute { display_screen = true , display_clients = true,
display_label = false , display_client_name = true,
display_mouse = true ,
}

View File

@ -0,0 +1,89 @@
--DOC_GEN_IMAGE --DOC_HIDE_START --DOC_NO_USAGE
local module = ...
require("ruled.client")
local awful = {
tag = require("awful.tag"),
widget = {
tasklist = require("awful.widget.tasklist")
},
button = require("awful.button")
}
require("awful.ewmh")
local wibox = require("wibox")
screen[1]:fake_resize(0, 0, 800, 480)
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, screen[1])
local s = screen[1]
--DOC_HIDE_END
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
base_layout = wibox.widget {
spacing = 2,
layout = wibox.layout.fixed.horizontal,
},
}
--DOC_NEWLINE
--DOC_HIDE_START
local _tl = tasklist
function awful.spawn(name)
client.gen_fake{class = name, name = name, x = 2094, y=10, width = 60, height =50, screen=screen[1]}
end
--DOC_NEWLINE
module.add_event("Spawn 5 clients.", function()
-- Spawn 5 clients.
for i=1, 5 do
awful.spawn("Client #"..i)
end
client.get()[2]:activate {}
client.get()[2].color = "#ff777733"
end)
--DOC_NEWLINE
module.display_widget(_tl, nil, 22)
module.add_event("Change the widget template.", function()
--DOC_HIDE_END
-- Change the widget template.
tasklist.widget_template = {
{
{
{
{
id = "icon_role",
widget = wibox.widget.imagebox,
},
margins = 2,
widget = wibox.container.margin,
},
{
id = "text_role",
widget = wibox.widget.textbox,
},
layout = wibox.layout.fixed.horizontal,
},
left = 10,
right = 10,
widget = wibox.container.margin
},
id = "background_role",
widget = wibox.container.background,
}
--DOC_NEWLINE
--DOC_HIDE_START
end)
module.display_widget(_tl, nil, 22)
module.execute { display_screen = true , display_clients = true,
display_label = false, display_client_name = true,
display_mouse = true ,
}

View File

@ -0,0 +1,39 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 3 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
--DOC_HIDE_END
for _, value in ipairs { "left", "center", "right" } do
beautiful.tasklist_align = value
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
base_layout = wibox.layout.flex.horizontal
}
tasklist._do_tasklist_update_now()
tasklist.forced_width = 600
parent:add(_memento(tasklist, 600, 22, nil, true)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,64 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local gears = { color = require("gears.color") }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
local grad = gears.color {
type = "linear",
from = { 0, 0 },
to = { 0, 22 },
stops = {
{ 0, "#ff0000" },
{ 1, "#0000ff" },
}
}
--DOC_NEWLINE
for _, col in ipairs { "#ff0000", "#00ff00", "#0000ff", grad } do
beautiful.tasklist_bg_focus = col
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 22)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,64 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local gears = { color = require("gears.color") }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
local grad = gears.color {
type = "linear",
from = { 0, 0 },
to = { 0, 22 },
stops = {
{ 0, "#ff0000" },
{ 1, "#0000ff" },
}
}
--DOC_NEWLINE
for _, col in ipairs { "#ff0000", "#00ff00", "#0000ff", grad } do
beautiful.tasklist_bg_minimize = col
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 22)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,64 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local gears = { color = require("gears.color") }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
local grad = gears.color {
type = "linear",
from = { 0, 0 },
to = { 0, 22 },
stops = {
{ 0, "#ff0000" },
{ 1, "#0000ff" },
}
}
--DOC_NEWLINE
for _, col in ipairs { "#ff0000", "#00ff00", "#0000ff", grad } do
beautiful.tasklist_bg_normal = col
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 22)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,64 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local gears = { color = require("gears.color") }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
local grad = gears.color {
type = "linear",
from = { 0, 0 },
to = { 0, 22 },
stops = {
{ 0, "#ff0000" },
{ 1, "#0000ff" },
}
}
--DOC_NEWLINE
for _, col in ipairs { "#ff0000", "#00ff00", "#0000ff", grad } do
beautiful.tasklist_bg_urgent = col
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 22)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,38 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 3 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
--DOC_HIDE_END
for _, value in ipairs { true, false } do
beautiful.tasklist_disable_icon = value
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 22)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,39 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 3 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
--DOC_HIDE_END
for _, value in ipairs { true, false } do
beautiful.tasklist_disable_task_name = value
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 22)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,51 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
for _, col in ipairs { "#ff0000", "#00ff00", "#0000ff" } do
beautiful.tasklist_fg_focus = col
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 22)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,51 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
for _, col in ipairs { "#ff0000", "#00ff00", "#0000ff" } do
beautiful.tasklist_fg_minimize = col
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 22)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,51 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
for _, col in ipairs { "#ff0000", "#00ff00", "#0000ff" } do
beautiful.tasklist_fg_normal = col
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 22)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,51 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
for _, col in ipairs { "#ff0000", "#00ff00", "#0000ff" } do
beautiful.tasklist_fg_urgent = col
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 22)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,51 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
for _, font in ipairs { "sans 8", "sans 10 bold", "sans 12 italic" } do
beautiful.tasklist_font = font
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 22)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,51 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
for _, font in ipairs { "sans 8", "sans 10 bold", "sans 12 italic" } do
beautiful.tasklist_font_focus = font
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 22)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,51 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
for _, font in ipairs { "sans 8", "sans 10 bold", "sans 12 italic" } do
beautiful.tasklist_font_minimized = font
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 22)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,51 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
for _, font in ipairs { "sans 8", "sans 10 bold", "sans 12 italic" } do
beautiful.tasklist_font_urgent = font
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 22)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,45 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 3 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[1].floating = true
client.get()[2].sticky = true
--DOC_HIDE_END
for _, value in ipairs { true, false } do
beautiful.tasklist_plain_task_name = value
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 22)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,51 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local gears = { shape = require("gears.shape") }
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 3 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
--DOC_HIDE_END
beautiful.tasklist_spacing = 5
--DOC_NEWLINE
local function customized(cr, width, height)
return gears.shape.parallelogram(cr, width, height, width - height)
end
--DOC_NEWLINE
for _, shape in ipairs { gears.shape.rounded_rect, gears.shape.octogon, gears.shape.hexagon, customized } do
beautiful.tasklist_shape = shape
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 22)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,58 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local gears = { shape = require("gears.shape"), color = require("gears.color") }
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 3 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
--DOC_HIDE_END
beautiful.tasklist_spacing = 5
beautiful.tasklist_shape = gears.shape.rounded_rect
beautiful.tasklist_shape_border_width = 2
--DOC_NEWLINE
local grad = gears.color {
type = "linear",
from = { 0, 0 },
to = { 0, 22 },
stops = {
{ 0, "#ff0000" },
{ 1, "#0000ff" },
}
}
--DOC_NEWLINE
for _, col in ipairs { "#ff0000", "#00ff00", "#0000ff", grad } do
beautiful.tasklist_shape_border_color = col
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 32)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,71 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local gears = { shape = require("gears.shape"), color = require("gears.color") }
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
beautiful.tasklist_spacing = 5
beautiful.tasklist_shape = gears.shape.rounded_rect
beautiful.tasklist_shape_border_width = 2
--DOC_NEWLINE
local grad = gears.color {
type = "linear",
from = { 0, 0 },
to = { 0, 22 },
stops = {
{ 0, "#ff0000" },
{ 1, "#0000ff" },
}
}
--DOC_NEWLINE
for _, col in ipairs { "#ff0000", "#00ff00", "#0000ff", grad } do
beautiful.tasklist_shape_border_color_minimized = col
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 32)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,71 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local gears = { shape = require("gears.shape"), color = require("gears.color") }
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
beautiful.tasklist_spacing = 5
beautiful.tasklist_shape = gears.shape.rounded_rect
beautiful.tasklist_shape_border_width = 2
--DOC_NEWLINE
local grad = gears.color {
type = "linear",
from = { 0, 0 },
to = { 0, 22 },
stops = {
{ 0, "#ff0000" },
{ 1, "#0000ff" },
}
}
--DOC_NEWLINE
for _, col in ipairs { "#ff0000", "#00ff00", "#0000ff", grad } do
beautiful.tasklist_shape_border_color_urgent = col
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 32)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,46 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local gears = { shape = require("gears.shape") }
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 3 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
--DOC_HIDE_END
beautiful.tasklist_spacing = 5
beautiful.tasklist_shape = gears.shape.rounded_rect
--DOC_NEWLINE
for _, bw in ipairs { 0, 2, 4, 6 } do
beautiful.tasklist_shape_border_width = bw
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 32)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,57 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local gears = { shape = require("gears.shape"), color = require("gears.color") }
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
beautiful.tasklist_spacing = 5
beautiful.tasklist_shape = gears.shape.rounded_rect
--DOC_NEWLINE
for _, bw in ipairs { 0, 2, 4, 6 } do
beautiful.tasklist_shape_border_width_minimized = bw
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 32)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,58 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local gears = { shape = require("gears.shape"), color = require("gears.color") }
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
beautiful.tasklist_spacing = 5
beautiful.tasklist_shape = gears.shape.rounded_rect
--DOC_NEWLINE
for _, bw in ipairs { 0, 2, 4, 6 } do
beautiful.tasklist_shape_border_width_urgent = bw
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 32)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,63 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local gears = { shape = require("gears.shape") }
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
beautiful.tasklist_spacing = 5
--DOC_NEWLINE
local function customized(cr, width, height)
return gears.shape.parallelogram(cr, width, height, width - height)
end
--DOC_NEWLINE
for _, shape in ipairs { gears.shape.rounded_rect, gears.shape.octogon, gears.shape.hexagon, customized } do
beautiful.tasklist_shape_focus = shape
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 22)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,58 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local gears = { shape = require("gears.shape") }
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
beautiful.tasklist_spacing = 5
beautiful.tasklist_shape = gears.shape.rounded_rect
--DOC_NEWLINE
for _, bw in ipairs { 0, 2, 4, 6 } do
beautiful.tasklist_shape_border_width_focus = bw
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 32)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,71 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local gears = { shape = require("gears.shape"), color = require("gears.color") }
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
beautiful.tasklist_spacing = 5
beautiful.tasklist_shape = gears.shape.rounded_rect
beautiful.tasklist_shape_border_width = 2
--DOC_NEWLINE
local grad = gears.color {
type = "linear",
from = { 0, 0 },
to = { 0, 22 },
stops = {
{ 0, "#ff0000" },
{ 1, "#0000ff" },
}
}
--DOC_NEWLINE
for _, col in ipairs { "#ff0000", "#00ff00", "#0000ff", grad } do
beautiful.tasklist_shape_border_color_focus = col
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 32)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,63 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local gears = { shape = require("gears.shape") }
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
beautiful.tasklist_spacing = 5
--DOC_NEWLINE
local function customized(cr, width, height)
return gears.shape.parallelogram(cr, width, height, width - height)
end
--DOC_NEWLINE
for _, shape in ipairs { gears.shape.rounded_rect, gears.shape.octogon, gears.shape.hexagon, customized } do
beautiful.tasklist_shape_minimized = shape
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 22)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,63 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local gears = { shape = require("gears.shape") }
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 5 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
client.get()[1].name = "Client 1# (floating)"
client.get()[2].name = "Client 2# (sticky)"
client.get()[3].name = "Client 3# (focus)"
client.get()[4].name = "Client 4# (urgent)"
client.get()[5].name = "Client 5# (minimized)"
client.get()[1].floating = true
client.get()[2].sticky = true
client.get()[4].urgent = true
client.get()[5].minimized = true
client.focus = client.get()[3]
--DOC_HIDE_END
beautiful.tasklist_spacing = 5
--DOC_NEWLINE
local function customized(cr, width, height)
return gears.shape.parallelogram(cr, width, height, width - height)
end
--DOC_NEWLINE
for _, shape in ipairs { gears.shape.rounded_rect, gears.shape.octogon, gears.shape.hexagon, customized } do
beautiful.tasklist_shape_focus = shape
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 22)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -0,0 +1,39 @@
--DOC_HIDE_START
--DOC_GEN_IMAGE
local parent = ...
local beautiful = require("beautiful")
local wibox = require("wibox")
local awful = { widget = { tasklist = require("awful.widget.tasklist") } }
local t_real = require("awful.tag").add("Test", {screen=screen[1]})
local s = screen[1]
parent.spacing = 5
beautiful.tasklist_fg_focus = "#000000"
for i=1, 3 do
client.gen_fake{
class = "client",
name = "Client #"..i,
icon = beautiful.awesome_icon,
tags = {t_real}
}
end
--DOC_HIDE_END
for _, spacing in ipairs { 0, 4, 8, 12 } do
beautiful.tasklist_spacing = spacing
--DOC_HIDE_START
local tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = wibox.layout.fixed.horizontal
}
tasklist._do_tasklist_update_now()
parent:add(_memento(tasklist, nil, 22)) --luacheck: globals _memento
--DOC_HIDE_END
end
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80