Added default clienticon
parent
73881d7d05
commit
638f1efc3a
|
@ -7,6 +7,7 @@ return {
|
||||||
submenu = conf_dir .. "assets/icons/submenu.svg",
|
submenu = conf_dir .. "assets/icons/submenu.svg",
|
||||||
arch = conf_dir .. "assets/icons/arch.svg",
|
arch = conf_dir .. "assets/icons/arch.svg",
|
||||||
nix = conf_dir .. "assets/icons/nix.svg",
|
nix = conf_dir .. "assets/icons/nix.svg",
|
||||||
|
nix_grey = conf_dir .. "assets/icons/nix-grey.svg",
|
||||||
|
|
||||||
music = {
|
music = {
|
||||||
grey = {
|
grey = {
|
||||||
|
|
|
@ -0,0 +1,113 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="512"
|
||||||
|
height="512"
|
||||||
|
viewBox="0 0 480.00001 480"
|
||||||
|
id="svg2"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||||
|
sodipodi:docname="nix-grey.svg"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||||
|
<defs
|
||||||
|
id="defs4" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="1.7494491"
|
||||||
|
inkscape:cx="126.03968"
|
||||||
|
inkscape:cy="287.51908"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-width="1600"
|
||||||
|
inkscape:window-height="1696"
|
||||||
|
inkscape:window-x="1600"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
inkscape:snap-global="true"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
showguides="true" />
|
||||||
|
<metadata
|
||||||
|
id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="print-logo"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
style="display:inline"
|
||||||
|
transform="translate(-132.5822,958.04022)">
|
||||||
|
<g
|
||||||
|
id="g251"
|
||||||
|
transform="matrix(0.95674018,0,0,0.95674018,-16.993334,-33.377468)"
|
||||||
|
style="fill:#a4a4a4;fill-opacity:1">
|
||||||
|
<path
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#a4a4a4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
d="m 309.40365,-710.2521 122.19683,211.6751 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4902 -33.22946,-57.8256 z"
|
||||||
|
id="path4861"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccccccc" />
|
||||||
|
<path
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#a4a4a4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
d="m 353.50926,-797.4433 -122.21756,211.6631 -28.53477,-48.37 32.93839,-56.6875 -65.41521,-0.1719 -13.9414,-24.1698 14.23637,-24.721 93.11177,0.2939 33.46371,-57.6903 z"
|
||||||
|
id="use4863"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccccccc" />
|
||||||
|
<path
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#a4a4a4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
d="m 362.88537,-628.243 244.41439,0.012 -27.62229,48.8968 -65.56199,-0.1817 32.55876,56.7371 -13.96098,24.1585 -28.52722,0.032 -46.3013,-80.7841 -66.69317,-0.1353 z"
|
||||||
|
id="use4865"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccccccc" />
|
||||||
|
<path
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#a4a4a4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
d="m 505.14318,-720.9886 -122.19683,-211.6751 56.15706,-0.5268 32.6236,56.8692 32.85645,-56.5653 27.90237,0.011 14.29086,24.6896 -46.81047,80.4902 33.22946,57.8256 z"
|
||||||
|
id="use4867"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccccccc" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cccccccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path4873"
|
||||||
|
d="m 309.40365,-710.2521 122.19683,211.6751 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4902 -33.22946,-57.8256 z"
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#a4a4a4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cccccccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="use4875"
|
||||||
|
d="m 451.3364,-803.53264 -244.4144,-0.012 27.62229,-48.89685 65.56199,0.18175 -32.55875,-56.73717 13.96097,-24.15851 28.52722,-0.0315 46.3013,80.78414 66.69317,0.13524 z"
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#a4a4a4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cccccccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="use4877"
|
||||||
|
d="m 460.87178,-633.8425 122.21757,-211.66304 28.53477,48.37003 -32.93839,56.68751 65.4152,0.1718 13.9414,24.1698 -14.23636,24.7211 -93.11177,-0.294 -33.46371,57.6904 z"
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#a4a4a4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 7.8 KiB |
|
@ -15,6 +15,7 @@ config.keymap_popup = { enabled = true }
|
||||||
|
|
||||||
config.core = {
|
config.core = {
|
||||||
wallpaper = "/home/assets/wallpapers/Themed/Stellaris/Gigapixel/City.png",
|
wallpaper = "/home/assets/wallpapers/Themed/Stellaris/Gigapixel/City.png",
|
||||||
|
default_clienticon = "nix_grey"
|
||||||
--
|
--
|
||||||
-- Dynamic: a table of files and times
|
-- Dynamic: a table of files and times
|
||||||
-- {file = "path", start_time = {hour, minute}}
|
-- {file = "path", start_time = {hour, minute}}
|
||||||
|
|
|
@ -64,7 +64,10 @@ tasklist.make = function(screen)
|
||||||
fill_vertical = true,
|
fill_vertical = true,
|
||||||
{
|
{
|
||||||
id = "clienticon",
|
id = "clienticon",
|
||||||
widget = awful.widget.clienticon,
|
-- Don't use awesomewm's stock clienticon.
|
||||||
|
-- using a raw imagebox lets us handle nil icons...
|
||||||
|
-- also, see th call to awesome.preferred_icon_size in rc.lua.
|
||||||
|
widget = wibox.widget.imagebox,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
margins = beautiful.dpi(3),
|
margins = beautiful.dpi(3),
|
||||||
|
@ -79,8 +82,24 @@ tasklist.make = function(screen)
|
||||||
-- The create callback is only called once, when the task indicator
|
-- The create callback is only called once, when the task indicator
|
||||||
-- is created.
|
-- is created.
|
||||||
create_callback = function(self, c, index, objects)
|
create_callback = function(self, c, index, objects)
|
||||||
|
|
||||||
-- Set indicator icon
|
-- Set indicator icon
|
||||||
self:get_children_by_id("clienticon")[1].client = c
|
if c.icon == nil then
|
||||||
|
self:get_children_by_id("clienticon")[1].image = beautiful.icons[config.core.default_clienticon]
|
||||||
|
else
|
||||||
|
self:get_children_by_id("clienticon")[1].image = c.icon
|
||||||
|
end
|
||||||
|
self:get_children_by_id("clienticon")[1]:emit_signal("widget::redraw_needed")
|
||||||
|
|
||||||
|
|
||||||
|
-- Update top color
|
||||||
|
if c == client.focus then
|
||||||
|
self:get_children_by_id("top_tab")[1].bg = "#2DA0DA"
|
||||||
|
elseif c.minimized then
|
||||||
|
self:get_children_by_id("top_tab")[1].bg = beautiful.color.bar.hover_bg --beautiful.color.transparent
|
||||||
|
else
|
||||||
|
self:get_children_by_id("top_tab")[1].bg = "#2DA0DA77"
|
||||||
|
end
|
||||||
|
|
||||||
-- Change background when mouse is over widget
|
-- Change background when mouse is over widget
|
||||||
self:connect_signal("mouse::enter", function(result)
|
self:connect_signal("mouse::enter", function(result)
|
||||||
|
@ -106,7 +125,13 @@ tasklist.make = function(screen)
|
||||||
update_callback = function(self, c, index, objects)
|
update_callback = function(self, c, index, objects)
|
||||||
|
|
||||||
-- Update indicator icon
|
-- Update indicator icon
|
||||||
self:get_children_by_id("clienticon")[1].client = c
|
if c.icon == nil then
|
||||||
|
self:get_children_by_id("clienticon")[1].image = beautiful.icons[config.core.default_clienticon]
|
||||||
|
else
|
||||||
|
self:get_children_by_id("clienticon")[1].image = c.icon
|
||||||
|
end
|
||||||
|
self:get_children_by_id("clienticon")[1]:emit_signal("widget::redraw_needed")
|
||||||
|
|
||||||
|
|
||||||
-- Update top color
|
-- Update top color
|
||||||
if c == client.focus then
|
if c == client.focus then
|
||||||
|
|
8
rc.lua
8
rc.lua
|
@ -20,7 +20,6 @@ end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- A "relative require" hack. Does the same thing as `require`,
|
-- A "relative require" hack. Does the same thing as `require`,
|
||||||
-- But takes a relative path.
|
-- But takes a relative path.
|
||||||
-- Called with req_rel(..., "module")
|
-- Called with req_rel(..., "module")
|
||||||
|
@ -42,6 +41,13 @@ local keys = require("core.keybinds")
|
||||||
local buttons = {}
|
local buttons = {}
|
||||||
|
|
||||||
|
|
||||||
|
-- Preferred client icon size, in pixels.
|
||||||
|
-- Set this to bar height, since that's the largest icon we'll ever draw.
|
||||||
|
-- This fixes the icon size given by client.icon. Client.icon give the smallest size by default.
|
||||||
|
awesome.set_preferred_icon_size(beautiful.dpi(config.core.bar_height))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Bind first 5 shortcuts to Mod + #.
|
-- Bind first 5 shortcuts to Mod + #.
|
||||||
local i = 0
|
local i = 0
|
||||||
for k, v in pairs(config.core.bar_shortcuts) do
|
for k, v in pairs(config.core.bar_shortcuts) do
|
||||||
|
|
Loading…
Reference in New Issue