panik
21
awesome/theme/crylia/Tools/IconHandler.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
------------------------------
|
||||
-- This is the audio widget --
|
||||
------------------------------
|
||||
|
||||
function GetIcon(theme, c)
|
||||
if theme and c then
|
||||
local clientName = string.lower(c.class) .. ".svg"
|
||||
local resolutions = {"128x128", "96x96", "64x64", "48x48", "42x42", "32x32", "24x24", "16x16"}
|
||||
local home = os.getenv("HOME")
|
||||
for i, res in ipairs(resolutions) do
|
||||
local iconDir = home .. "/.icons/" .. theme .. "/" .. res .."/apps/"
|
||||
local ioStream = io.open(iconDir .. clientName, "r")
|
||||
if ioStream ~= nil then
|
||||
return iconDir .. clientName
|
||||
else
|
||||
return c:get_icon(1)
|
||||
end
|
||||
end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
@@ -1 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M12,19.2C9.5,19.2 7.29,17.92 6,16C6.03,14 10,12.9 12,12.9C14,12.9 17.97,14 18,16C16.71,17.92 14.5,19.2 12,19.2M12,5A3,3 0 0,1 15,8A3,3 0 0,1 12,11A3,3 0 0,1 9,8A3,3 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z" /></svg>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
|
||||
<path d="M12,19.2C9.5,19.2 7.29,17.92 6,16C6.03,14 10,12.9 12,12.9C14,12.9 17.97,14 18,16C16.71,17.92 14.5,19.2 12,19.2M12,5A3,3 0 0,1 15,8A3,3 0 0,1 12,11A3,3 0 0,1 9,8A3,3 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z" fill="#212121" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 549 B After Width: | Height: | Size: 572 B |
@@ -1 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z" /></svg>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
|
||||
<path d="M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z" fill="#212121" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 530 B After Width: | Height: | Size: 553 B |
@@ -1 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M16,17V14H9V10H16V7L21,12L16,17M14,2A2,2 0 0,1 16,4V6H14V4H5V20H14V18H16V20A2,2 0 0,1 14,22H5A2,2 0 0,1 3,20V4A2,2 0 0,1 5,2H14Z" /></svg>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
|
||||
<path d="M16,17V14H9V10H16V7L21,12L16,17M14,2A2,2 0 0,1 16,4V6H14V4H5V20H14V18H16V20A2,2 0 0,1 14,22H5A2,2 0 0,1 3,20V4A2,2 0 0,1 5,2H14Z" fill="#212121" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 423 B After Width: | Height: | Size: 446 B |
@@ -1 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z" /></svg>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
|
||||
<path d="M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z" fill="#212121" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 505 B After Width: | Height: | Size: 528 B |
@@ -1 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13" /></svg>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
|
||||
<path d="M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13" fill="#212121" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 508 B After Width: | Height: | Size: 531 B |
@@ -1 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M18.73,18C15.4,21.69 9.71,22 6,18.64C2.33,15.31 2.04,9.62 5.37,5.93C6.9,4.25 9,3.2 11.27,3C7.96,6.7 8.27,12.39 12,15.71C13.63,17.19 15.78,18 18,18C18.25,18 18.5,18 18.73,18Z" /></svg>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
|
||||
<path d="M18.73,18C15.4,21.69 9.71,22 6,18.64C2.33,15.31 2.04,9.62 5.37,5.93C6.9,4.25 9,3.2 11.27,3C7.96,6.7 8.27,12.39 12,15.71C13.63,17.19 15.78,18 18,18C18.25,18 18.5,18 18.73,18Z" fill="#212121" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 468 B After Width: | Height: | Size: 491 B |
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M3 3h18v2H3z"/></svg>
|
||||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M10,21V19H6.41L10.91,14.5L9.5,13.09L5,17.59V14H3V21H10M14.5,10.91L19,6.41V10H21V3H14V5H17.59L13.09,9.5L14.5,10.91Z" /></svg>
|
||||
|
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 409 B |
1
awesome/theme/crylia/assets/icons/titlebar/stick.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M4.08,11.92L12,4L19.92,11.92L18.5,13.33L13,7.83V22H11V7.83L5.5,13.33L4.08,11.92M12,4H22V2H2V4H12Z" /></svg>
|
||||
|
After Width: | Height: | Size: 392 B |
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M19.5,3.09L15,7.59V4H13V11H20V9H16.41L20.91,4.5L19.5,3.09M4,13V15H7.59L3.09,19.5L4.5,20.91L9,16.41V20H11V13H4Z" /></svg>
|
||||
|
After Width: | Height: | Size: 405 B |
1
awesome/theme/crylia/assets/icons/titlebar/unstick.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M19.92,12.08L12,20L4.08,12.08L5.5,10.67L11,16.17V2H13V16.17L18.5,10.66L19.92,12.08M12,20H2V22H22V20H12Z" /></svg>
|
||||
|
After Width: | Height: | Size: 398 B |
@@ -8,7 +8,7 @@ local layout_path = Theme_path .. "assets/layout/"
|
||||
-- Here are the icons for the layouts defined, if you want to add more layouts go to main/layouts.lua
|
||||
Theme.layout_floating = gears.color.recolor_image(layout_path .. "floating.svg", color.color["Grey900"])
|
||||
Theme.layout_tile = gears.color.recolor_image(layout_path .. "tile.svg", color.color["Grey900"])
|
||||
Theme.layout_dwindle = gears.color.recolor_image(layout_path .. "dwindle.svg", color.color["Grey900"])
|
||||
Theme.layout_fairh = gears.color.recolor_image(layout_path .. "fairh.svg", color.color["Grey900"])
|
||||
Theme.layout_fullscreen = gears.color.recolor_image(layout_path .. "fullscreen.svg", color.color["Grey900"])
|
||||
Theme.layout_max = gears.color.recolor_image(layout_path .. "max.svg", color.color["Grey900"])
|
||||
--Theme.layout_dwindle = gears.color.recolor_image(layout_path .. "dwindle.svg", color.color["Grey900"])
|
||||
--Theme.layout_fairh = gears.color.recolor_image(layout_path .. "fairh.svg", color.color["Grey900"])
|
||||
--Theme.layout_fullscreen = gears.color.recolor_image(layout_path .. "fullscreen.svg", color.color["Grey900"])
|
||||
--Theme.layout_max = gears.color.recolor_image(layout_path .. "max.svg", color.color["Grey900"])
|
||||
@@ -9,13 +9,11 @@ local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
|
||||
local naughty = require("naughty")
|
||||
|
||||
-- Icon directory path
|
||||
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/brightness/"
|
||||
|
||||
-- TODO: fix backlight keys and osd not working correctly
|
||||
return function ()
|
||||
return function (s)
|
||||
|
||||
local brightness_osd_widget = wibox.widget{
|
||||
{
|
||||
@@ -150,5 +148,63 @@ return function ()
|
||||
)
|
||||
|
||||
update_slider()
|
||||
return brightness_osd_widget
|
||||
|
||||
local brightness_container = awful.popup{
|
||||
widget = wibox.container.background,
|
||||
ontop = true,
|
||||
bg = color.color["Grey900"],
|
||||
stretch = false,
|
||||
visible = false,
|
||||
placement = function (c) awful.placement.bottom_right(c, {margins = dpi(10)}) end,
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end
|
||||
}
|
||||
|
||||
local hide_brightness_osd = gears.timer{
|
||||
timeout = 1,
|
||||
autostart = true,
|
||||
callback = function ()
|
||||
brightness_container.visible = false
|
||||
end
|
||||
}
|
||||
|
||||
brightness_container:setup{
|
||||
brightness_osd_widget,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
}
|
||||
|
||||
awesome.connect_signal(
|
||||
"widget::brightness_osd:rerun",
|
||||
function ()
|
||||
if hide_brightness_osd.started then
|
||||
hide_brightness_osd:again()
|
||||
else
|
||||
hide_brightness_osd:start()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
awesome.connect_signal(
|
||||
"module::brightness_osd:show",
|
||||
function ()
|
||||
brightness_container.visible = true
|
||||
end
|
||||
)
|
||||
|
||||
brightness_container:connect_signal(
|
||||
"mouse::enter",
|
||||
function ()
|
||||
brightness_container.visible = true
|
||||
hide_brightness_osd:stop()
|
||||
end
|
||||
)
|
||||
|
||||
brightness_container:connect_signal(
|
||||
"mouse::leave",
|
||||
function ()
|
||||
brightness_container.visible = true
|
||||
hide_brightness_osd:again()
|
||||
end
|
||||
)
|
||||
end
|
||||
@@ -4,12 +4,13 @@
|
||||
|
||||
-- Awesome Libs
|
||||
|
||||
local awful = require("awful")
|
||||
local wibox = require("wibox")
|
||||
local gears = require("gears")
|
||||
local dpi = require("beautiful").xresources.apply_dpi
|
||||
local color = require("theme.crylia.colors")
|
||||
|
||||
return function ()
|
||||
return function (s)
|
||||
local styles = {}
|
||||
|
||||
styles.month = {
|
||||
@@ -118,5 +119,63 @@ return function ()
|
||||
end
|
||||
}
|
||||
|
||||
return calendar_osd_widget
|
||||
local calendar_osd_container = awful.popup{
|
||||
widget = wibox.container.background,
|
||||
ontop = true,
|
||||
bg = color.color["Grey900"],
|
||||
stretch = false,
|
||||
visible = false,
|
||||
placement = function (c)awful.placement.top_right(c, {margins = {right = dpi(100),top = dpi(60)}})end,
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end
|
||||
}
|
||||
|
||||
local hide_osd = gears.timer{
|
||||
timeout = 0.25,
|
||||
autostart = true,
|
||||
callback = function ()
|
||||
calendar_osd_container.visible = false
|
||||
end
|
||||
}
|
||||
|
||||
calendar_osd_container:setup{
|
||||
calendar_osd_widget,
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
|
||||
calendar_osd_container:connect_signal(
|
||||
"mouse::enter",
|
||||
function ()
|
||||
calendar_osd_container.visible = true
|
||||
hide_osd:stop()
|
||||
end
|
||||
)
|
||||
|
||||
calendar_osd_container:connect_signal(
|
||||
"mouse::leave",
|
||||
function ()
|
||||
calendar_osd_container.visible = false
|
||||
hide_osd:stop()
|
||||
end
|
||||
)
|
||||
|
||||
awesome.connect_signal(
|
||||
"widget::calendar_osd:stop",
|
||||
function ()
|
||||
calendar_osd_container.visible = true
|
||||
hide_osd:stop()
|
||||
end
|
||||
)
|
||||
|
||||
awesome.connect_signal(
|
||||
"widget::calendar_osd:rerun",
|
||||
function ()
|
||||
if hide_osd.started then
|
||||
hide_osd:again()
|
||||
else
|
||||
hide_osd:start()
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
@@ -8,23 +8,25 @@ local color = require("theme.crylia.colors")
|
||||
local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
local naughty = require("naughty")
|
||||
require("Main.Signals")
|
||||
|
||||
-- Icon directory path
|
||||
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/powermenu/"
|
||||
|
||||
return function ()
|
||||
return function (s)
|
||||
|
||||
-- Profile picture imagebox
|
||||
local profile_picture = wibox.widget {
|
||||
image = icondir .. "defaultpfp.svg",
|
||||
resize = true,
|
||||
forced_height = dpi(200),
|
||||
clip_shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 30)
|
||||
gears.shape.rounded_rect(cr, dpi(width), dpi(height), 30)
|
||||
end,
|
||||
widget = wibox.widget.imagebox
|
||||
}
|
||||
|
||||
-- Username textbox
|
||||
local profile_name = wibox.widget {
|
||||
align = 'center',
|
||||
valign = 'center',
|
||||
@@ -33,6 +35,9 @@ return function ()
|
||||
widget = wibox.widget.textbox
|
||||
}
|
||||
|
||||
-- Get the profile script from /var/lib/AccountsService/icons/${USER}
|
||||
-- and copy it to the assets folder
|
||||
-- TODO: If the user doesnt have AccountsService look into $HOME/.faces
|
||||
local update_profile_picture = function ()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[=[
|
||||
@@ -69,9 +74,11 @@ return function ()
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
update_profile_picture()
|
||||
local namestyle = "userhost"
|
||||
|
||||
-- Will determin the display style
|
||||
local namestyle = RC.vars.namestyle
|
||||
-- Get the full username(if set) and the username + hostname
|
||||
local update_user_name = function()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[=[
|
||||
@@ -98,6 +105,7 @@ return function ()
|
||||
end
|
||||
update_user_name()
|
||||
|
||||
-- Universal Button widget
|
||||
local button = function(name, icon, bg_color, callback)
|
||||
local item = wibox.widget{
|
||||
{
|
||||
@@ -105,7 +113,10 @@ return function ()
|
||||
{
|
||||
{
|
||||
{
|
||||
--image = gears.color.recolor_image(icon, color.color["Grey900"]),
|
||||
-- TODO: using gears.color to recolor a SVG will make it look super low res
|
||||
-- currently I recolor it in the .svg file directly, but later implement
|
||||
-- a better way to recolor a SVG
|
||||
-- image = gears.color.recolor_image(icon, color.color["Grey900"]),
|
||||
image = icon,
|
||||
resize = true,
|
||||
forced_height = dpi(30),
|
||||
@@ -133,7 +144,8 @@ return function ()
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 10)
|
||||
end,
|
||||
widget = wibox.container.background
|
||||
widget = wibox.container.background,
|
||||
id = 'background'
|
||||
},
|
||||
spacing = dpi(0),
|
||||
layout = wibox.layout.align.vertical
|
||||
@@ -149,6 +161,7 @@ return function ()
|
||||
return item
|
||||
end
|
||||
|
||||
-- Create the power menu actions
|
||||
local suspend_command = function()
|
||||
awful.spawn.easy_async_with_shell("dm-tool lock & systemctl suspend")
|
||||
awesome.emit_signal("module::powermenu:hide")
|
||||
@@ -173,12 +186,21 @@ return function ()
|
||||
awesome.emit_signal("module::powermenu:hide")
|
||||
end
|
||||
|
||||
-- Create the buttons with their command and name etc
|
||||
local shutdown_button = button("Shutdown", icondir .. "shutdown.svg", color.color["Blue200"], shutdown_command)
|
||||
local reboot_button = button("Reboot", icondir .. "reboot.svg", color.color["Red200"], reboot_command)
|
||||
local suspend_button = button("Suspend", icondir .. "suspend.svg", color.color["Yellow200"], suspend_command)
|
||||
local logout_button = button("Logout", icondir .. "logout.svg", color.color["Green200"], logout_command)
|
||||
local lock_button = button("Lock", icondir .. "lock.svg", color.color["Orange200"], lock_command)
|
||||
|
||||
-- Signals to change color on hover
|
||||
hover_signal(shutdown_button.background, color.color["Blue200"])
|
||||
hover_signal(reboot_button.background, color.color["Red200"])
|
||||
hover_signal(suspend_button.background, color.color["Yellow200"])
|
||||
hover_signal(logout_button.background, color.color["Green200"])
|
||||
hover_signal(lock_button.background, color.color["Orange200"])
|
||||
|
||||
-- The powermenu widget
|
||||
local powermenu = wibox.widget {
|
||||
layout = wibox.layout.align.vertical,
|
||||
expand = "none",
|
||||
@@ -239,5 +261,60 @@ return function ()
|
||||
},
|
||||
nil
|
||||
}
|
||||
return powermenu
|
||||
|
||||
-- Container for the widget, covers the entire screen
|
||||
local powermenu_container = wibox{
|
||||
widget = powermenu,
|
||||
screen = s,
|
||||
type = "splash",
|
||||
visible = false,
|
||||
ontop = true,
|
||||
bg = "#21212188",
|
||||
height = s.geometry.height,
|
||||
width = s.geometry.width,
|
||||
x = s.geometry.x,
|
||||
y = s.geometry.y
|
||||
}
|
||||
|
||||
-- Close on rightclick
|
||||
powermenu_container:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
3,
|
||||
function ()
|
||||
awesome.emit_signal("module::powermenu:hide")
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
-- Close on Escape
|
||||
local powermenu_keygrabber = awful.keygrabber{
|
||||
autostart = false,
|
||||
stop_event = 'release',
|
||||
keypressed_callback = function (self, mod, key, command)
|
||||
if key == 'Escape' then
|
||||
awesome.emit_signal("module::powermenu:hide")
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
-- Signals
|
||||
awesome.connect_signal(
|
||||
"module::powermenu:show",
|
||||
function()
|
||||
powermenu_container.visible = false
|
||||
powermenu_container.visible = true
|
||||
powermenu_keygrabber:start()
|
||||
end
|
||||
)
|
||||
|
||||
awesome.connect_signal(
|
||||
"module::powermenu:hide",
|
||||
function()
|
||||
powermenu_keygrabber:stop()
|
||||
powermenu_container.visible = false
|
||||
end
|
||||
)
|
||||
end
|
||||
@@ -8,6 +8,10 @@ local color = require("theme.crylia.colors")
|
||||
local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
require("Main.Signals")
|
||||
|
||||
-- Icon directory path
|
||||
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/titlebar/"
|
||||
|
||||
awful.titlebar.enable_tooltip = true
|
||||
awful.titlebar.fallback_name = 'Client'
|
||||
@@ -56,8 +60,27 @@ local create_click_events = function (c)
|
||||
return buttons
|
||||
end
|
||||
|
||||
local createresize_click_events = function (c)
|
||||
local buttons = gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
function ()
|
||||
c:activate { context = 'titlebar', action = 'mouse_resize' }
|
||||
end
|
||||
)
|
||||
)
|
||||
return buttons
|
||||
end
|
||||
|
||||
local create_titlebar = function (c, bg, size)
|
||||
awful.titlebar(c, { position = "left", bg = bg, size = size }) : setup {
|
||||
local titlebar = awful.titlebar(c, {
|
||||
position = "left",
|
||||
bg = bg,
|
||||
size = size
|
||||
})
|
||||
|
||||
titlebar : setup {
|
||||
{
|
||||
{
|
||||
{
|
||||
@@ -66,7 +89,8 @@ local create_titlebar = function (c, bg, size)
|
||||
bg = color.color["Red200"],
|
||||
shape = function (cr, height, width)
|
||||
gears.shape.rounded_rect(cr, width, height, 4)
|
||||
end
|
||||
end,
|
||||
id = "closebutton"
|
||||
},
|
||||
{
|
||||
awful.titlebar.widget.maximizedbutton(c),
|
||||
@@ -74,7 +98,8 @@ local create_titlebar = function (c, bg, size)
|
||||
bg = color.color["Yellow200"],
|
||||
shape = function (cr, height, width)
|
||||
gears.shape.rounded_rect(cr, width, height, 4)
|
||||
end
|
||||
end,
|
||||
id = "maximizebutton"
|
||||
},
|
||||
{
|
||||
awful.titlebar.widget.minimizebutton(c),
|
||||
@@ -82,21 +107,34 @@ local create_titlebar = function (c, bg, size)
|
||||
bg = color.color["Green200"],
|
||||
shape = function (cr, height, width)
|
||||
gears.shape.rounded_rect(cr, width, height, 4)
|
||||
end
|
||||
end,
|
||||
id = "minimizebutton"
|
||||
},
|
||||
spacing = dpi(10),
|
||||
layout = wibox.layout.fixed.vertical
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
id = "spacing"
|
||||
},
|
||||
margins = dpi(8),
|
||||
widget = wibox.container.margin
|
||||
widget = wibox.container.margin,
|
||||
id = "margin"
|
||||
},
|
||||
{
|
||||
buttons = create_click_events(c),
|
||||
layout = wibox.layout.flex.vertical
|
||||
},
|
||||
nil,
|
||||
layout = wibox.layout.align.vertical
|
||||
{
|
||||
{
|
||||
widget = awful.widget.clienticon(c)
|
||||
},
|
||||
margins = dpi(5),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
layout = wibox.layout.align.vertical,
|
||||
id = "main"
|
||||
}
|
||||
hover_signal(titlebar.main.margin.spacing.closebutton, color.color["Red200"])
|
||||
hover_signal(titlebar.main.margin.spacing.maximizebutton, color.color["Yellow200"])
|
||||
hover_signal(titlebar.main.margin.spacing.minimizebutton, color.color["Green200"])
|
||||
end
|
||||
|
||||
local create_titlebar_dialog = function(c, bg, size)
|
||||
@@ -134,8 +172,55 @@ local create_titlebar_dialog = function(c, bg, size)
|
||||
}
|
||||
end
|
||||
|
||||
local create_titlebar_borderhack = function (c, bg, position)
|
||||
local borderhack = awful.titlebar(c, {
|
||||
position = position,
|
||||
bg = bg,
|
||||
size = "2"
|
||||
})
|
||||
borderhack : setup {
|
||||
{
|
||||
bg = bg,
|
||||
widget = wibox.container.background
|
||||
},
|
||||
{
|
||||
buttons = createresize_click_events(c),
|
||||
layout = wibox.layout.flex.vertical
|
||||
},
|
||||
nil,
|
||||
layout = wibox.layout.align.vertical
|
||||
}
|
||||
|
||||
local old_wibox, old_cursor
|
||||
borderhack:connect_signal(
|
||||
"mouse::enter",
|
||||
function ()
|
||||
local w = mouse.current_client
|
||||
if w then
|
||||
old_cursor, old_wibox = w.cursor, w
|
||||
w.cursor = "hand1"
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
borderhack:connect_signal(
|
||||
"mouse::leave",
|
||||
function ()
|
||||
if old_wibox then
|
||||
old_wibox.cursor = old_cursor
|
||||
old_wibox = nil
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
local draw_titlebar = function (c)
|
||||
if c.type == 'normal' then
|
||||
if c.type == 'normal' and not c.requests_no_titlebar then
|
||||
create_titlebar_borderhack(c, "#121212AA", "right")
|
||||
create_titlebar_borderhack(c, "#121212AA", "top")
|
||||
create_titlebar_borderhack(c, "#121212AA", "bottom")
|
||||
|
||||
if c.class == 'Firefox' then
|
||||
create_titlebar(c, '#121212AA', 35)
|
||||
elseif c.name == "Steam" then
|
||||
@@ -150,16 +235,47 @@ local draw_titlebar = function (c)
|
||||
elseif c.type == 'dialog' then
|
||||
create_titlebar_dialog(c, '#121212AA', 35)
|
||||
elseif c.type == 'modal' then
|
||||
create_titlebar(c, '#121212AA', 35)
|
||||
else
|
||||
create_titlebar_borderhack(c, "#121212AA", "right")
|
||||
create_titlebar_borderhack(c, "#121212AA", "top")
|
||||
create_titlebar_borderhack(c, "#121212AA", "bottom")
|
||||
create_titlebar_borderhack(c, "#121212AA", "left")
|
||||
end
|
||||
end
|
||||
|
||||
client.connect_signal(
|
||||
"property::maximized",
|
||||
function (c)
|
||||
if c.maximized then
|
||||
Theme.titlebar_maximized_button_normal = icondir .. "unmaximize.svg"
|
||||
Theme.titlebar_maximized_button_active = icondir .. "unmaximize.svg"
|
||||
Theme.titlebar_maximized_button_inactive = icondir .. "unmaximize.svg"
|
||||
elseif not c.minimized then
|
||||
Theme.titlebar_maximized_button_normal = icondir .. "maximize.svg"
|
||||
Theme.titlebar_maximized_button_active = icondir .. "maximize.svg"
|
||||
Theme.titlebar_maximized_button_inactive = icondir .. "maximize.svg"
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
client.connect_signal(
|
||||
"request::titlebars",
|
||||
function (c)
|
||||
if c.maximized then
|
||||
Theme.titlebar_maximized_button_normal = icondir .. "unmaximize.svg"
|
||||
Theme.titlebar_maximized_button_active = icondir .. "unmaximize.svg"
|
||||
Theme.titlebar_maximized_button_inactive = icondir .. "unmaximize.svg"
|
||||
elseif not c.minimized then
|
||||
Theme.titlebar_maximized_button_normal = icondir .. "maximize.svg"
|
||||
Theme.titlebar_maximized_button_active = icondir .. "maximize.svg"
|
||||
Theme.titlebar_maximized_button_inactive = icondir .. "maximize.svg"
|
||||
end
|
||||
draw_titlebar(c)
|
||||
if not c.floating then
|
||||
if not c.floating or c.maximized then
|
||||
awful.titlebar.hide(c, 'left')
|
||||
awful.titlebar.hide(c, 'right')
|
||||
awful.titlebar.hide(c, 'top')
|
||||
awful.titlebar.hide(c, 'bottom')
|
||||
end
|
||||
end
|
||||
)
|
||||
@@ -167,14 +283,23 @@ client.connect_signal(
|
||||
client.connect_signal(
|
||||
'property::floating',
|
||||
function (c)
|
||||
if c.floating then
|
||||
if c.floating and not c.maximized then
|
||||
if c.class == "Steam" then
|
||||
awful.titlebar.hide(c, 'left')
|
||||
awful.titlebar.hide(c, 'right')
|
||||
awful.titlebar.hide(c, 'top')
|
||||
awful.titlebar.hide(c, 'bottom')
|
||||
else
|
||||
awful.titlebar.show(c, 'left')
|
||||
awful.titlebar.show(c, 'right')
|
||||
awful.titlebar.show(c, 'top')
|
||||
awful.titlebar.show(c, 'bottom')
|
||||
end
|
||||
else
|
||||
awful.titlebar.hide(c, 'left')
|
||||
awful.titlebar.hide(c, 'right')
|
||||
awful.titlebar.hide(c, 'top')
|
||||
awful.titlebar.hide(c, 'bottom')
|
||||
end
|
||||
end
|
||||
)
|
||||
@@ -13,7 +13,7 @@ local wibox = require("wibox")
|
||||
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/audio/"
|
||||
|
||||
-- Returns the volume_osd
|
||||
return function ()
|
||||
return function (s)
|
||||
|
||||
local volume_osd_widget = wibox.widget{
|
||||
{
|
||||
@@ -163,5 +163,63 @@ return function ()
|
||||
)
|
||||
|
||||
update_slider()
|
||||
return volume_osd_widget
|
||||
|
||||
local volume_container = awful.popup{
|
||||
widget = wibox.container.background,
|
||||
ontop = true,
|
||||
bg = color.color["Grey900"],
|
||||
stretch = false,
|
||||
visible = false,
|
||||
placement = function (c) awful.placement.bottom_right(c, {margins = dpi(10)}) end,
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end
|
||||
}
|
||||
|
||||
local hide_volume_osd = gears.timer{
|
||||
timeout = 2,
|
||||
autostart = true,
|
||||
callback = function ()
|
||||
volume_container.visible = false
|
||||
end
|
||||
}
|
||||
|
||||
volume_container:setup{
|
||||
volume_osd_widget,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
}
|
||||
|
||||
awesome.connect_signal(
|
||||
"module::volume_osd:show",
|
||||
function ()
|
||||
volume_container.visible = true
|
||||
end
|
||||
)
|
||||
|
||||
volume_container:connect_signal(
|
||||
"mouse::enter",
|
||||
function ()
|
||||
volume_container.visible = true
|
||||
hide_volume_osd:stop()
|
||||
end
|
||||
)
|
||||
|
||||
volume_container:connect_signal(
|
||||
"mouse::leave",
|
||||
function ()
|
||||
volume_container.visible = true
|
||||
hide_volume_osd:again()
|
||||
end
|
||||
)
|
||||
|
||||
awesome.connect_signal(
|
||||
"widget::volume_osd:rerun",
|
||||
function ()
|
||||
if hide_volume_osd.started then
|
||||
hide_volume_osd:again()
|
||||
else
|
||||
hide_volume_osd:start()
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
@@ -66,3 +66,5 @@ Theme.notification_icon_size = dpi(40)
|
||||
Theme.titlebar_close_button_normal = icondir .. "close.svg"
|
||||
Theme.titlebar_maximized_button_normal = icondir .. "maximize.svg"
|
||||
Theme.titlebar_minimize_button_normal = icondir .. "minimize.svg"
|
||||
Theme.titlebar_maximized_button_active = icondir .. "maximize.svg"
|
||||
Theme.titlebar_maximized_button_inactive = icondir .. "maximize.svg"
|
||||
@@ -8,6 +8,7 @@ local color = require("theme.crylia.colors")
|
||||
local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
require("Main.Signals")
|
||||
|
||||
-- Icon directory path
|
||||
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/audio/"
|
||||
@@ -98,43 +99,15 @@ return function ()
|
||||
end
|
||||
|
||||
-- Signals
|
||||
local old_wibox, old_cursor, old_bg
|
||||
audio_widget:connect_signal(
|
||||
"mouse::enter",
|
||||
function ()
|
||||
old_bg = audio_widget.bg
|
||||
audio_widget.bg = color.color["Yellow200"] .. "dd"
|
||||
local w = mouse.current_wibox
|
||||
if w then
|
||||
old_cursor, old_wibox = w.cursor, w
|
||||
w.cursor = "hand1"
|
||||
end
|
||||
end
|
||||
)
|
||||
hover_signal(audio_widget, color.color["Yellow200"])
|
||||
|
||||
audio_widget:connect_signal(
|
||||
"button::press",
|
||||
function ()
|
||||
awesome.emit_signal("widget::volume")
|
||||
awesome.emit_signal("module::volume_osd:show", true)
|
||||
audio_widget.bg = color.color["Yellow200"] .. "bb"
|
||||
end
|
||||
)
|
||||
|
||||
audio_widget:connect_signal(
|
||||
"button::release",
|
||||
function ()
|
||||
audio_widget.bg = color.color["Yellow200"] .. "dd"
|
||||
end
|
||||
)
|
||||
|
||||
audio_widget:connect_signal(
|
||||
"mouse::leave",
|
||||
function ()
|
||||
audio_widget.bg = old_bg
|
||||
if old_wibox then
|
||||
old_wibox.cursor = old_cursor
|
||||
old_wibox = nil
|
||||
end
|
||||
awesome.emit_signal("module::slider:update")
|
||||
awesome.emit_signal("widget::volume_osd:rerun")
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ local gears = require("gears")
|
||||
local naughty = require("naughty")
|
||||
local watch = awful.widget.watch
|
||||
local wibox = require("wibox")
|
||||
require("Main.Signals")
|
||||
|
||||
-- Icon directory path
|
||||
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/battery/"
|
||||
@@ -165,45 +166,7 @@ return function ()
|
||||
)
|
||||
end
|
||||
|
||||
local old_wibox, old_cursor, old_bg
|
||||
battery_widget:connect_signal(
|
||||
"mouse::enter",
|
||||
function ()
|
||||
old_bg = battery_widget.bg
|
||||
battery_widget.bg = color.color["Purple200"] .. "dd"
|
||||
local w = mouse.current_wibox
|
||||
if w then
|
||||
old_cursor, old_wibox = w.cursor, w
|
||||
w.cursor = "hand1"
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
-- Signals
|
||||
battery_widget:connect_signal(
|
||||
"button::press",
|
||||
function ()
|
||||
battery_widget.bg = color.color["Purple200"] .. "bb"
|
||||
end
|
||||
)
|
||||
|
||||
battery_widget:connect_signal(
|
||||
"button::release",
|
||||
function ()
|
||||
battery_widget.bg = color.color["Purple200"] .. "dd"
|
||||
end
|
||||
)
|
||||
|
||||
battery_widget:connect_signal(
|
||||
"mouse::leave",
|
||||
function ()
|
||||
battery_widget.bg = old_bg
|
||||
if old_wibox then
|
||||
old_wibox.cursor = old_cursor
|
||||
old_wibox = nil
|
||||
end
|
||||
end
|
||||
)
|
||||
hover_signal(battery_widget, color.color["Purple200"])
|
||||
|
||||
battery_widget:connect_signal(
|
||||
'button::press',
|
||||
|
||||
@@ -8,6 +8,7 @@ local color = require("theme.crylia.colors")
|
||||
local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
require("Main.Signals")
|
||||
|
||||
-- Icon directory path
|
||||
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/bluetooth/"
|
||||
@@ -90,44 +91,7 @@ return function ()
|
||||
}
|
||||
|
||||
-- Signals
|
||||
local old_wibox, old_cursor, old_bg
|
||||
bluetooth_widget:connect_signal(
|
||||
"mouse::enter",
|
||||
function ()
|
||||
old_bg = bluetooth_widget.bg
|
||||
bluetooth_widget.bg = color.color["Blue200"] .. "dd"
|
||||
local w = mouse.current_wibox
|
||||
if w then
|
||||
old_cursor, old_wibox = w.cursor, w
|
||||
w.cursor = "hand1"
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
bluetooth_widget:connect_signal(
|
||||
"button::press",
|
||||
function ()
|
||||
bluetooth_widget.bg = color.color["Blue200"] .. "bb"
|
||||
end
|
||||
)
|
||||
|
||||
bluetooth_widget:connect_signal(
|
||||
"button::release",
|
||||
function ()
|
||||
bluetooth_widget.bg = color.color["Blue200"] .. "dd"
|
||||
end
|
||||
)
|
||||
|
||||
bluetooth_widget:connect_signal(
|
||||
"mouse::leave",
|
||||
function ()
|
||||
bluetooth_widget.bg = old_bg
|
||||
if old_wibox then
|
||||
old_wibox.cursor = old_cursor
|
||||
old_wibox = nil
|
||||
end
|
||||
end
|
||||
)
|
||||
hover_signal(bluetooth_widget, color.color["Blue200"])
|
||||
|
||||
bluetooth_widget:connect_signal(
|
||||
"button::press",
|
||||
|
||||
@@ -8,6 +8,7 @@ local color = require("theme.crylia.colors")
|
||||
local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
require("Main.Signals")
|
||||
|
||||
-- Icon directory path
|
||||
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/clock/"
|
||||
@@ -71,45 +72,7 @@ return function ()
|
||||
end
|
||||
}
|
||||
|
||||
-- Signals
|
||||
local old_wibox, old_cursor, old_bg
|
||||
clock_widget:connect_signal(
|
||||
"mouse::enter",
|
||||
function ()
|
||||
old_bg = clock_widget.bg
|
||||
clock_widget.bg = color.color["Orange200"] .. "dd"
|
||||
local w = mouse.current_wibox
|
||||
if w then
|
||||
old_cursor, old_wibox = w.cursor, w
|
||||
w.cursor = "hand1"
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
clock_widget:connect_signal(
|
||||
"button::press",
|
||||
function ()
|
||||
clock_widget.bg = color.color["Orange200"] .. "bb"
|
||||
end
|
||||
)
|
||||
|
||||
clock_widget:connect_signal(
|
||||
"button::release",
|
||||
function ()
|
||||
clock_widget.bg = color.color["Orange200"] .. "dd"
|
||||
end
|
||||
)
|
||||
|
||||
clock_widget:connect_signal(
|
||||
"mouse::leave",
|
||||
function ()
|
||||
clock_widget.bg = old_bg
|
||||
if old_wibox then
|
||||
old_wibox.cursor = old_cursor
|
||||
old_wibox = nil
|
||||
end
|
||||
end
|
||||
)
|
||||
hover_signal(clock_widget, color.color["Orange200"])
|
||||
|
||||
return clock_widget
|
||||
end
|
||||
@@ -8,6 +8,7 @@ local color = require("theme.crylia.colors")
|
||||
local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
require("Main.Signals")
|
||||
|
||||
-- Icon directory path
|
||||
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/date/"
|
||||
@@ -71,32 +72,12 @@ return function ()
|
||||
}
|
||||
|
||||
-- Signals
|
||||
local old_wibox, old_cursor, old_bg
|
||||
hover_signal(date_widget, color.color["Teal200"])
|
||||
|
||||
date_widget:connect_signal(
|
||||
"mouse::enter",
|
||||
function ()
|
||||
awesome.emit_signal("widget::calendar_osd:stop", true)
|
||||
old_bg = date_widget.bg
|
||||
date_widget.bg = color.color["Teal200"] .. "dd"
|
||||
local w = mouse.current_wibox
|
||||
if w then
|
||||
old_cursor, old_wibox = w.cursor, w
|
||||
w.cursor = "hand1"
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
date_widget:connect_signal(
|
||||
"button::press",
|
||||
function ()
|
||||
date_widget.bg = color.color["Teal200"] .. "bb"
|
||||
end
|
||||
)
|
||||
|
||||
date_widget:connect_signal(
|
||||
"button::release",
|
||||
function ()
|
||||
date_widget.bg = color.color["Teal200"] .. "dd"
|
||||
end
|
||||
)
|
||||
|
||||
@@ -104,11 +85,6 @@ return function ()
|
||||
"mouse::leave",
|
||||
function ()
|
||||
awesome.emit_signal("widget::calendar_osd:rerun", true)
|
||||
date_widget.bg = old_bg
|
||||
if old_wibox then
|
||||
old_wibox.cursor = old_cursor
|
||||
old_wibox = nil
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ local color = require("theme.crylia.colors")
|
||||
local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
require("Main.Signals")
|
||||
|
||||
-- Icon directory path
|
||||
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/kblayout/"
|
||||
@@ -76,43 +77,12 @@ return function ()
|
||||
end
|
||||
|
||||
-- Signals
|
||||
local old_wibox, old_cursor, old_bg
|
||||
kblayout_widget:connect_signal(
|
||||
"mouse::enter",
|
||||
function ()
|
||||
old_bg = kblayout_widget.bg
|
||||
kblayout_widget.bg = color.color["Green200"] .. "dd"
|
||||
local w = mouse.current_wibox
|
||||
if w then
|
||||
old_cursor, old_wibox = w.cursor, w
|
||||
w.cursor = "hand1"
|
||||
end
|
||||
end
|
||||
)
|
||||
hover_signal(kblayout_widget, color.color["Green200"])
|
||||
|
||||
kblayout_widget:connect_signal(
|
||||
"button::press",
|
||||
function ()
|
||||
set_kblayout()
|
||||
kblayout_widget.bg = color.color["Green200"] .. "bb"
|
||||
end
|
||||
)
|
||||
|
||||
kblayout_widget:connect_signal(
|
||||
"button::release",
|
||||
function ()
|
||||
kblayout_widget.bg = color.color["Green200"] .. "dd"
|
||||
end
|
||||
)
|
||||
|
||||
kblayout_widget:connect_signal(
|
||||
"mouse::leave",
|
||||
function ()
|
||||
kblayout_widget.bg = old_bg
|
||||
if old_wibox then
|
||||
old_wibox.cursor = old_cursor
|
||||
old_wibox = nil
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ local color = require("theme.crylia.colors")
|
||||
local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
require("Main.Signals")
|
||||
|
||||
-- Returns the layoutbox widget
|
||||
return function ()
|
||||
|
||||
local layout = wibox.widget{
|
||||
{
|
||||
awful.widget.layoutbox(),
|
||||
@@ -27,42 +27,12 @@ return function ()
|
||||
}
|
||||
|
||||
-- Signals
|
||||
local old_wibox, old_cursor, old_bg
|
||||
layout:connect_signal(
|
||||
"mouse::enter",
|
||||
function ()
|
||||
old_bg = layout.bg
|
||||
layout.bg = color.color["LightBlue200"] .. "dd"
|
||||
local w = mouse.current_wibox
|
||||
if w then
|
||||
old_cursor, old_wibox = w.cursor, w
|
||||
w.cursor = "hand1"
|
||||
end
|
||||
end
|
||||
)
|
||||
hover_signal(layout, color.color["LightBlue200"])
|
||||
|
||||
layout:connect_signal(
|
||||
"button::press",
|
||||
function ()
|
||||
layout.bg = color.color["LightBlue200"] .. "bb"
|
||||
end
|
||||
)
|
||||
|
||||
layout:connect_signal(
|
||||
"button::release",
|
||||
function ()
|
||||
layout.bg = color.color["LightBlue200"] .. "dd"
|
||||
end
|
||||
)
|
||||
|
||||
layout:connect_signal(
|
||||
"mouse::leave",
|
||||
function ()
|
||||
layout.bg = old_bg
|
||||
if old_wibox then
|
||||
old_wibox.cursor = old_cursor
|
||||
old_wibox = nil
|
||||
end
|
||||
awful.layout.inc(-1)
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local naughty = require("naughty")
|
||||
local wibox = require("wibox")
|
||||
require("Main.Signals")
|
||||
|
||||
-- Icon directory path
|
||||
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/network/"
|
||||
@@ -126,7 +127,7 @@ return function ()
|
||||
network_notify(message, title, app_name, icon)
|
||||
end
|
||||
|
||||
local update_wireless_data = function (strength, healthy)
|
||||
local update_wireless_data = function (healthy)
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[ iw dev ]] .. interfaces.wlan_interface .. [[ link ]],
|
||||
function (stdout)
|
||||
@@ -158,10 +159,10 @@ return function ()
|
||||
awesome.emit_signal("system::network_connected")
|
||||
end
|
||||
icon = icon .. '-' .. tostring(strength)
|
||||
update_wireless_data(wifi_strength_rounded, true)
|
||||
update_wireless_data(true)
|
||||
else
|
||||
icon = icon .. "-" .. tostring(strength)
|
||||
update_wireless_data(wifi_strength_rounded, false)
|
||||
update_wireless_data(false)
|
||||
end
|
||||
network_widget.container.network_layout.spacing = dpi(8)
|
||||
network_widget.container.network_layout.icon_margin.icon_layout.icon:set_image(gears.color.recolor_image(icondir .. icon .. ".svg", color.color["Grey900"]))
|
||||
@@ -323,44 +324,7 @@ return function ()
|
||||
}
|
||||
|
||||
-- Signals
|
||||
local old_wibox, old_cursor, old_bg
|
||||
network_widget:connect_signal(
|
||||
"mouse::enter",
|
||||
function ()
|
||||
old_bg = network_widget.bg
|
||||
network_widget.bg = color.color["Red200"] .. "dd"
|
||||
local w = mouse.current_wibox
|
||||
if w then
|
||||
old_cursor, old_wibox = w.cursor, w
|
||||
w.cursor = "hand1"
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
network_widget:connect_signal(
|
||||
"button::press",
|
||||
function ()
|
||||
network_widget.bg = color.color["Red200"] .. "bb"
|
||||
end
|
||||
)
|
||||
|
||||
network_widget:connect_signal(
|
||||
"button::release",
|
||||
function ()
|
||||
network_widget.bg = color.color["Red200"] .. "dd"
|
||||
end
|
||||
)
|
||||
|
||||
network_widget:connect_signal(
|
||||
"mouse::leave",
|
||||
function ()
|
||||
network_widget.bg = old_bg
|
||||
if old_wibox then
|
||||
old_wibox.cursor = old_cursor
|
||||
old_wibox = nil
|
||||
end
|
||||
end
|
||||
)
|
||||
hover_signal(network_widget, color.color["Red200"])
|
||||
|
||||
network_widget:connect_signal(
|
||||
"button::press",
|
||||
|
||||
@@ -9,6 +9,7 @@ local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local naughty = require("naughty")
|
||||
local wibox = require("wibox")
|
||||
require("Main.Signals")
|
||||
|
||||
-- Icon directory path
|
||||
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/power/"
|
||||
@@ -50,44 +51,12 @@ return function ()
|
||||
}
|
||||
|
||||
-- Signals
|
||||
local old_wibox, old_cursor, old_bg
|
||||
power_widget:connect_signal(
|
||||
"mouse::enter",
|
||||
function ()
|
||||
old_bg = power_widget.bg
|
||||
power_widget.bg = color.color["Red200"] .. "dd"
|
||||
local w = mouse.current_wibox
|
||||
if w then
|
||||
old_cursor, old_wibox = w.cursor, w
|
||||
w.cursor = "hand1"
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
power_widget:connect_signal(
|
||||
"button::press",
|
||||
function ()
|
||||
power_widget.bg = color.color["Red200"] .. "bb"
|
||||
end
|
||||
)
|
||||
hover_signal(power_widget, color.color["Red200"])
|
||||
|
||||
power_widget:connect_signal(
|
||||
"button::release",
|
||||
function ()
|
||||
power_widget.bg = color.color["Red200"] .. "dd"
|
||||
awesome.emit_signal("module::powermenu:show")
|
||||
--awful.spawn("rofi -show power-menu -modi 'power-menu:~/.config/rofi/rofi-power-menu --choices=shutdown/reboot/logout/lockscreen' -theme ~/.config/rofi/powermenu/powermenu.rasi")
|
||||
end
|
||||
)
|
||||
|
||||
power_widget:connect_signal(
|
||||
"mouse::leave",
|
||||
function ()
|
||||
power_widget.bg = old_bg
|
||||
if old_wibox then
|
||||
old_wibox.cursor = old_cursor
|
||||
old_wibox = nil
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@ local awful = require("awful")
|
||||
local gears = require("gears")
|
||||
local dpi = require("beautiful").xresources.apply_dpi
|
||||
local color = require("theme.crylia.colors")
|
||||
local naughty = require("naughty")
|
||||
local naughty =require("naughty")
|
||||
require("theme.crylia.Tools.IconHandler")
|
||||
|
||||
local list_update = function (widget, buttons, label, data, objects)
|
||||
widget:reset()
|
||||
@@ -102,32 +103,27 @@ local list_update = function (widget, buttons, label, data, objects)
|
||||
end
|
||||
|
||||
for _, client in ipairs(object:clients()) do
|
||||
if client.icon then
|
||||
tag_label_margin:set_right(0)
|
||||
local icon = wibox.widget{
|
||||
tag_label_margin:set_right(0)
|
||||
local icon = wibox.widget{
|
||||
{
|
||||
id = "icon_container",
|
||||
{
|
||||
id = "icon_container",
|
||||
{
|
||||
id = "icon",
|
||||
resize = true,
|
||||
widget = wibox.widget.imagebox
|
||||
},
|
||||
widget = wibox.container.place
|
||||
id = "icon",
|
||||
resize = true,
|
||||
widget = wibox.widget.imagebox
|
||||
},
|
||||
tag_icon,
|
||||
forced_width = dpi(33),
|
||||
margins = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
}
|
||||
icon.icon_container.icon:set_image(client:get_icon(1))
|
||||
tag_widget.widget_margin.container:setup({
|
||||
icon,
|
||||
layout = wibox.layout.align.horizontal
|
||||
})
|
||||
else
|
||||
tag_icon_margin:set_margins(0)
|
||||
tag_icon:set_forced_width(0)
|
||||
end
|
||||
widget = wibox.container.place
|
||||
},
|
||||
tag_icon,
|
||||
forced_width = dpi(33),
|
||||
margins = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
}
|
||||
icon.icon_container.icon:set_image(GetIcon("Papirus", client))
|
||||
tag_widget.widget_margin.container:setup({
|
||||
icon,
|
||||
layout = wibox.layout.align.horizontal
|
||||
})
|
||||
end
|
||||
|
||||
local old_wibox, old_cursor, old_bg
|
||||
@@ -135,7 +131,6 @@ local list_update = function (widget, buttons, label, data, objects)
|
||||
"mouse::enter",
|
||||
function ()
|
||||
old_bg = tag_widget.bg
|
||||
--naughty.notify({title = tostring(old_bg)})
|
||||
if object == awful.screen.focused().selected_tag then
|
||||
tag_widget.bg = '#dddddd' .. 'dd'
|
||||
else
|
||||
|
||||
@@ -3,7 +3,6 @@ local wibox = require('wibox')
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
local gears = require('gears')
|
||||
local color = require('theme.crylia.colors')
|
||||
local naughty = require("naughty")
|
||||
|
||||
local list_update = function (widget, buttons, label, data, objects)
|
||||
widget:reset()
|
||||
@@ -111,11 +110,7 @@ local list_update = function (widget, buttons, label, data, objects)
|
||||
task_title:set_text('')
|
||||
end
|
||||
|
||||
if icon then
|
||||
task_icon.icon:set_image(object:get_icon(1))
|
||||
else
|
||||
task_icon_margin:set_margins(0)
|
||||
end
|
||||
task_icon.icon:set_image(GetIcon("Papirus", object))
|
||||
|
||||
widget:add(task_widget)
|
||||
widget:set_spacing(dpi(6))
|
||||
@@ -192,14 +187,10 @@ return function(s)
|
||||
if c == client.focus then
|
||||
c.minimized = true
|
||||
else
|
||||
-- Without this, the following
|
||||
-- :isvisible() makes no sense
|
||||
c.minimized = false
|
||||
if not c:isvisible() and c.first_tag then
|
||||
c.first_tag:view_only()
|
||||
end
|
||||
-- This will also un-minimize
|
||||
-- the client, if needed
|
||||
c:emit_signal('request::activate')
|
||||
c:raise()
|
||||
end
|
||||
|
||||