tasklist: add/use a single icon for "maximized"
This provides more space in the tasklist, because it will typically only use a single icon for maximized clients, instead of three (maximized_vertical, maximized_horizontal and floating). Fixes https://awesome.naquadah.org/bugs/index.php?do=details&task_id=1252
This commit is contained in:
parent
a64f8b1385
commit
4ee144188e
|
@ -50,15 +50,20 @@ local function tasklist_label(c, args)
|
||||||
local sticky = args.sticky or theme.tasklist_sticky or "▪"
|
local sticky = args.sticky or theme.tasklist_sticky or "▪"
|
||||||
local ontop = args.ontop or theme.tasklist_ontop or '⌃'
|
local ontop = args.ontop or theme.tasklist_ontop or '⌃'
|
||||||
local floating = args.floating or theme.tasklist_floating or '✈'
|
local floating = args.floating or theme.tasklist_floating or '✈'
|
||||||
|
local maximized = args.maximized or theme.tasklist_maximized or '<b>+</b>'
|
||||||
local maximized_horizontal = args.maximized_horizontal or theme.tasklist_maximized_horizontal or '⬌'
|
local maximized_horizontal = args.maximized_horizontal or theme.tasklist_maximized_horizontal or '⬌'
|
||||||
local maximized_vertical = args.maximized_vertical or theme.tasklist_maximized_vertical or '⬍'
|
local maximized_vertical = args.maximized_vertical or theme.tasklist_maximized_vertical or '⬍'
|
||||||
|
|
||||||
if not theme.tasklist_plain_task_name then
|
if not theme.tasklist_plain_task_name then
|
||||||
if c.sticky then name = name .. sticky end
|
if c.sticky then name = name .. sticky end
|
||||||
if c.ontop then name = name .. ontop end
|
if c.ontop then name = name .. ontop end
|
||||||
if client.floating.get(c) then name = name .. floating end
|
if c.maximized then
|
||||||
if c.maximized_horizontal then name = name .. maximized_horizontal end
|
name = name .. maximized
|
||||||
if c.maximized_vertical then name = name .. maximized_vertical end
|
else
|
||||||
|
if c.maximized_horizontal then name = name .. maximized_horizontal end
|
||||||
|
if c.maximized_vertical then name = name .. maximized_vertical end
|
||||||
|
if client.floating.get(c) then name = name .. floating end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if c.minimized then
|
if c.minimized then
|
||||||
|
@ -120,19 +125,22 @@ end
|
||||||
-- update. @see awful.widget.common.
|
-- update. @see awful.widget.common.
|
||||||
-- @param base_widget Optional container widget for tag widgets. Default
|
-- @param base_widget Optional container widget for tag widgets. Default
|
||||||
-- is wibox.layout.flex.horizontal().
|
-- is wibox.layout.flex.horizontal().
|
||||||
-- bg_normal The background color for unfocused client.
|
-- <ul>
|
||||||
-- fg_normal The foreground color for unfocused client.
|
-- <li><code>bg_normal</code> The background color for unfocused client.</li>
|
||||||
-- bg_focus The background color for focused client.
|
-- <li><code>fg_normal</code> The foreground color for unfocused client.</li>
|
||||||
-- fg_focus The foreground color for focused client.
|
-- <li><code>bg_focus</code> The background color for focused client.</li>
|
||||||
-- bg_urgent The background color for urgent clients.
|
-- <li><code>fg_focus</code> The foreground color for focused client.</li>
|
||||||
-- fg_urgent The foreground color for urgent clients.
|
-- <li><code>bg_urgent</code> The background color for urgent clients.</li>
|
||||||
-- bg_minimize The background color for minimized clients.
|
-- <li><code>fg_urgent</code> The foreground color for urgent clients.</li>
|
||||||
-- fg_minimize The foreground color for minimized clients.
|
-- <li><code>bg_minimize</code> The background color for minimized clients.</li>
|
||||||
-- floating Symbol to use for floating clients.
|
-- <li><code>fg_minimize</code> The foreground color for minimized clients.</li>
|
||||||
-- ontop Symbol to use for ontop clients.
|
-- <li><code>floating</code> Symbol to use for floating clients.</li>
|
||||||
-- maximized_horizontal Symbol to use for clients that have been horizontally maximized.
|
-- <li><code>ontop</code> Symbol to use for ontop clients.</li>
|
||||||
-- maximized_vertical Symbol to use for clients that have been vertically maximized.
|
-- <li><code>maximized</code> Symbol to use for clients that have been maximized (vertically and horizontally).</li>
|
||||||
-- font The font.
|
-- <li><code>maximized_horizontal</code> Symbol to use for clients that have been horizontally maximized.</li>
|
||||||
|
-- <li><code>maximized_vertical</code> Symbol to use for clients that have been vertically maximized.</li>
|
||||||
|
-- <li><code>font</code> The font.</li>
|
||||||
|
-- </ul>
|
||||||
function tasklist.new(screen, filter, buttons, style, update_function, base_widget)
|
function tasklist.new(screen, filter, buttons, style, update_function, base_widget)
|
||||||
local uf = update_function or common.list_update
|
local uf = update_function or common.list_update
|
||||||
local w = base_widget or flex.horizontal()
|
local w = base_widget or flex.horizontal()
|
||||||
|
|
Loading…
Reference in New Issue