fix audio (hopefully last time), added new widgets(cpu/gpu/ram info), reworked the bars a bit, more stuff and fixes
@@ -8,7 +8,7 @@ local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
|
||||
return function(s, widget)
|
||||
return function(s, widgets)
|
||||
|
||||
local top_center = awful.popup {
|
||||
screen = s,
|
||||
@@ -23,16 +23,56 @@ return function(s, widget)
|
||||
end
|
||||
}
|
||||
|
||||
top_center:setup {
|
||||
nil,
|
||||
top_center:struts {
|
||||
top = 55
|
||||
}
|
||||
|
||||
local function prepare_widgets(widgets)
|
||||
local layout = {
|
||||
forced_height = 45,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
}
|
||||
for i, widget in pairs(widgets) do
|
||||
if i == 1 then
|
||||
table.insert(layout,
|
||||
{
|
||||
widget,
|
||||
margins = dpi(6),
|
||||
left = dpi(6),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
})
|
||||
elseif i == #widgets then
|
||||
table.insert(layout,
|
||||
{
|
||||
widget,
|
||||
left = dpi(3),
|
||||
right = dpi(6),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
})
|
||||
else
|
||||
table.insert(layout,
|
||||
{
|
||||
widget,
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
})
|
||||
end
|
||||
end
|
||||
return layout
|
||||
end
|
||||
|
||||
top_center:setup {
|
||||
nil,
|
||||
forced_height = 45,
|
||||
layout = wibox.layout.align.horizontal
|
||||
prepare_widgets(widgets),
|
||||
nil,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
}
|
||||
|
||||
client.connect_signal(
|
||||
|
||||
@@ -231,9 +231,13 @@ return function(screen, programs)
|
||||
fakedock:connect_signal(
|
||||
"mouse::enter",
|
||||
function()
|
||||
for index, c in ipairs(screen.clients) do
|
||||
if not c.fullscreen then
|
||||
dock_intelligent_hide:stop()
|
||||
dock.visible = true
|
||||
end
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
client.connect_signal(
|
||||
|
||||
@@ -23,6 +23,7 @@ awful.screen.connect_for_each_screen(
|
||||
require("src.modules.volume_osd")(s)
|
||||
require("src.modules.brightness_osd")(s)
|
||||
require("src.modules.titlebar")
|
||||
require("src.modules.volume_controller")(s)
|
||||
|
||||
-- Widgets
|
||||
s.battery = require("src.widgets.battery")()
|
||||
@@ -37,27 +38,25 @@ awful.screen.connect_for_each_screen(
|
||||
s.taglist = require("src.widgets.taglist")(s)
|
||||
s.tasklist = require("src.widgets.tasklist")(s)
|
||||
s.systray = require("src.widgets.systray")(s)
|
||||
|
||||
s.cpu_usage = require("src.widgets.cpu_info")("usage")
|
||||
s.cpu_temp = require("src.widgets.cpu_info")("temp")
|
||||
s.cpu_freq = require("src.widgets.cpu_info")("freq", "average")
|
||||
s.ram_info = require("src.widgets.ram_info")()
|
||||
s.gpu_usage = require("src.widgets.gpu_info")("usage")
|
||||
s.gpu_temp = require("src.widgets.gpu_info")("temp")
|
||||
-- Add more of these if statements if you want to change
|
||||
-- the modules/widgets per screen.
|
||||
-- uncomment this example and dont forget to remove/comment the other code below
|
||||
--[[ if s.index == 1 then
|
||||
if s.index == 1 then
|
||||
require("crylia_bar.left_bar")(s, { s.layoutlist, s.systray, s.taglist })
|
||||
require("crylia_bar.center_bar")(s, s.tasklist)
|
||||
require("crylia_bar.right_bar")(s, {s.date, s.clock,s.powerbutton})
|
||||
require("crylia_bar.dock")(s, user_vars.dock_programs)
|
||||
end ]]
|
||||
|
||||
--[[ if s.index == 2 then
|
||||
require("crylia_bar.left_bar")(s, {s.layoutlist, s.systray, s.taglist})
|
||||
require("crylia_bar.center_bar")(s, s.tasklist)
|
||||
require("crylia_bar.right_bar")(s, {s.battery, s.network, s.bluetooth, s.audio, s.kblayout, s.date, s.clock,s.powerbutton})
|
||||
end ]]
|
||||
-- Bars
|
||||
|
||||
require("crylia_bar.left_bar")(s, { s.layoutlist, s.systray, s.taglist })
|
||||
require("crylia_bar.center_bar")(s, s.tasklist)
|
||||
require("crylia_bar.right_bar")(s, { s.battery, s.network, s.bluetooth, s.audio, s.kblayout, s.date, s.clock, s.powerbutton })
|
||||
require("crylia_bar.center_bar")(s, { s.tasklist })
|
||||
require("crylia_bar.right_bar")(s, { s.gpu_usage, s.gpu_temp, s.cpu_usage, s.cpu_temp, s.audio, s.kblayout, s.date, s.clock, s.powerbutton })
|
||||
require("crylia_bar.dock")(s, user_vars.dock_programs)
|
||||
end
|
||||
|
||||
if s.index == 2 then
|
||||
require("crylia_bar.left_bar")(s, { s.layoutlist, s.taglist })
|
||||
require("crylia_bar.center_bar")(s, { s.tasklist })
|
||||
require("crylia_bar.right_bar")(s, { s.ram_info, s.audio, s.kblayout, s.network, s.date, s.clock, s.powerbutton })
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
@@ -27,35 +27,49 @@ return function(s, widgets)
|
||||
top = 55
|
||||
}
|
||||
|
||||
top_left:setup {
|
||||
local function prepare_widgets(widgets)
|
||||
local layout = {
|
||||
forced_height = 45,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
}
|
||||
for i, widget in pairs(widgets) do
|
||||
if i == 1 then
|
||||
table.insert(layout,
|
||||
{
|
||||
{
|
||||
widgets[1],
|
||||
widget,
|
||||
left = dpi(6),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
})
|
||||
elseif i == #widgets then
|
||||
table.insert(layout,
|
||||
{
|
||||
widgets[2],
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
widgets[3],
|
||||
widget,
|
||||
left = dpi(3),
|
||||
right = dpi(6),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
forced_height = 45,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
})
|
||||
else
|
||||
table.insert(layout,
|
||||
{
|
||||
widget,
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
})
|
||||
end
|
||||
end
|
||||
return layout
|
||||
end
|
||||
|
||||
top_left:setup {
|
||||
prepare_widgets(widgets),
|
||||
nil,
|
||||
nil,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
|
||||
@@ -22,77 +22,55 @@ return function(s, widgets)
|
||||
end
|
||||
}
|
||||
|
||||
top_right:setup {
|
||||
nil,
|
||||
nil,
|
||||
top_right:struts {
|
||||
top = 55
|
||||
}
|
||||
|
||||
local function prepare_widgets(widgets)
|
||||
local layout = {
|
||||
forced_height = 45,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
}
|
||||
for i, widget in pairs(widgets) do
|
||||
if i == 1 then
|
||||
table.insert(layout,
|
||||
{
|
||||
{
|
||||
widgets[1],
|
||||
widget,
|
||||
left = dpi(6),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
})
|
||||
elseif i == #widgets then
|
||||
table.insert(layout,
|
||||
{
|
||||
widgets[2],
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
widgets[3],
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
widgets[4],
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
widgets[5],
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
widgets[6],
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
widgets[7],
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
widgets[8],
|
||||
widget,
|
||||
left = dpi(3),
|
||||
right = dpi(6),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
forced_height = 45,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
})
|
||||
else
|
||||
table.insert(layout,
|
||||
{
|
||||
widget,
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
})
|
||||
end
|
||||
end
|
||||
return layout
|
||||
end
|
||||
|
||||
top_right:setup {
|
||||
nil,
|
||||
nil,
|
||||
prepare_widgets(widgets),
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
end
|
||||
|
||||
1
awesome/src/assets/icons/audio/headphones.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="M12,1C7,1 3,5 3,10V17A3,3 0 0,0 6,20H9V12H5V10A7,7 0 0,1 12,3A7,7 0 0,1 19,10V12H15V20H18A3,3 0 0,0 21,17V10C21,5 16.97,1 12,1Z" /></svg>
|
||||
|
After Width: | Height: | Size: 422 B |
1
awesome/src/assets/icons/audio/menu-down.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="M7,10L12,15L17,10H7Z" /></svg>
|
||||
|
After Width: | Height: | Size: 315 B |
1
awesome/src/assets/icons/audio/menu-up.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="M7,15L12,10L17,15H7Z" /></svg>
|
||||
|
After Width: | Height: | Size: 315 B |
1
awesome/src/assets/icons/audio/microphone-off.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,11C19,12.19 18.66,13.3 18.1,14.28L16.87,13.05C17.14,12.43 17.3,11.74 17.3,11H19M15,11.16L9,5.18V5A3,3 0 0,1 12,2A3,3 0 0,1 15,5V11L15,11.16M4.27,3L21,19.73L19.73,21L15.54,16.81C14.77,17.27 13.91,17.58 13,17.72V21H11V17.72C7.72,17.23 5,14.41 5,11H6.7C6.7,14 9.24,16.1 12,16.1C12.81,16.1 13.6,15.91 14.31,15.58L12.65,13.92L12,14A3,3 0 0,1 9,11V10.28L3,4.27L4.27,3Z" /></svg>
|
||||
|
After Width: | Height: | Size: 661 B |
1
awesome/src/assets/icons/audio/microphone.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="M12,2A3,3 0 0,1 15,5V11A3,3 0 0,1 12,14A3,3 0 0,1 9,11V5A3,3 0 0,1 12,2M19,11C19,14.53 16.39,17.44 13,17.93V21H11V17.93C7.61,17.44 5,14.53 5,11H7A5,5 0 0,0 12,16A5,5 0 0,0 17,11H19Z" /></svg>
|
||||
|
After Width: | Height: | Size: 476 B |
1
awesome/src/assets/icons/cpu/cpu.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="M17,17H7V7H17M21,11V9H19V7C19,5.89 18.1,5 17,5H15V3H13V5H11V3H9V5H7C5.89,5 5,5.89 5,7V9H3V11H5V13H3V15H5V17A2,2 0 0,0 7,19H9V21H11V19H13V21H15V19H17A2,2 0 0,0 19,17V15H21V13H19V11M13,13H11V11H13M15,9H9V15H15V9Z" /></svg>
|
||||
|
After Width: | Height: | Size: 505 B |
1
awesome/src/assets/icons/cpu/disk.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="M6,2H18A2,2 0 0,1 20,4V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2M12,4A6,6 0 0,0 6,10C6,13.31 8.69,16 12.1,16L11.22,13.77C10.95,13.29 11.11,12.68 11.59,12.4L12.45,11.9C12.93,11.63 13.54,11.79 13.82,12.27L15.74,14.69C17.12,13.59 18,11.9 18,10A6,6 0 0,0 12,4M12,9A1,1 0 0,1 13,10A1,1 0 0,1 12,11A1,1 0 0,1 11,10A1,1 0 0,1 12,9M7,18A1,1 0 0,0 6,19A1,1 0 0,0 7,20A1,1 0 0,0 8,19A1,1 0 0,0 7,18M12.09,13.27L14.58,19.58L17.17,18.08L12.95,12.77L12.09,13.27Z" /></svg>
|
||||
|
After Width: | Height: | Size: 754 B |
5
awesome/src/assets/icons/cpu/gpu.svg
Normal file
@@ -0,0 +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="M2,7V8.5H3V17H4.5V7C3.7,7 2.8,7 2,7M6,7V7L6,16H7V17H14V16H22V7H6M17.5,9A2.5,2.5 0 0,1 20,11.5A2.5,2.5 0 0,1 17.5,14A2.5,2.5 0 0,1 15,11.5A2.5,2.5 0 0,1 17.5,9Z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 461 B |
6
awesome/src/assets/icons/cpu/ram.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
|
||||
<g id="surface1">
|
||||
<path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 0 7.421875 L 0 9.878906 L 0.4375 9.902344 C 1.09375 9.933594 1.367188 10.148438 1.367188 10.625 C 1.367188 11.066406 1.113281 11.253906 0.472656 11.285156 L 0 11.308594 L 0 16.21875 L 1.40625 16.21875 L 1.40625 19.03125 L 9.882812 19.03125 L 9.898438 17.894531 C 9.917969 16.484375 10.011719 16.265625 10.59375 16.265625 C 11.175781 16.265625 11.269531 16.488281 11.289062 17.894531 L 11.304688 19.03125 L 22.59375 19.03125 L 22.59375 16.21875 L 24 16.21875 L 24 11.308594 L 23.527344 11.285156 C 22.890625 11.257812 22.632812 11.066406 22.632812 10.625 C 22.632812 10.148438 22.90625 9.933594 23.558594 9.902344 L 24 9.878906 L 24 4.96875 L 0 4.96875 L 0 7.421875 M 22.59375 7.472656 L 22.59375 8.566406 L 22.324219 8.699219 C 20.804688 9.4375 20.800781 11.773438 22.3125 12.5 L 22.59375 12.632812 L 22.59375 14.8125 L 1.40625 14.8125 L 1.40625 12.632812 L 1.6875 12.5 C 3.199219 11.773438 3.1875 9.386719 1.667969 8.691406 L 1.40625 8.570312 L 1.40625 6.375 L 22.59375 6.375 L 22.59375 7.472656 M 4.265625 10.59375 L 4.265625 13.40625 L 8.484375 13.40625 L 8.484375 7.78125 L 4.265625 7.78125 L 4.265625 10.59375 M 9.890625 10.59375 L 9.890625 13.40625 L 14.109375 13.40625 L 14.109375 7.78125 L 9.890625 7.78125 L 9.890625 10.59375 M 15.515625 10.59375 L 15.515625 13.40625 L 19.734375 13.40625 L 19.734375 7.78125 L 15.515625 7.78125 L 15.515625 10.59375 M 7.078125 10.59375 L 7.078125 12 L 5.671875 12 L 5.671875 9.1875 L 7.078125 9.1875 L 7.078125 10.59375 M 12.703125 10.59375 L 12.703125 12 L 11.296875 12 L 11.296875 9.1875 L 12.703125 9.1875 L 12.703125 10.59375 M 18.328125 10.59375 L 18.328125 12 L 16.921875 12 L 16.921875 9.1875 L 18.328125 9.1875 L 18.328125 10.59375 M 8.527344 16.371094 C 8.503906 16.453125 8.484375 16.769531 8.484375 17.074219 L 8.484375 17.625 L 2.8125 17.625 L 2.8125 16.21875 L 8.570312 16.21875 L 8.527344 16.371094 M 21.1875 16.921875 L 21.1875 17.625 L 12.703125 17.625 L 12.703125 17.074219 C 12.703125 16.769531 12.683594 16.453125 12.660156 16.371094 L 12.617188 16.21875 L 21.1875 16.21875 L 21.1875 16.921875 "/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
1
awesome/src/assets/icons/cpu/thermometer-high.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="M15 13V5A3 3 0 0 0 9 5V13A5 5 0 1 0 15 13M12 4A1 1 0 0 1 13 5H11A1 1 0 0 1 12 4Z" /></svg>
|
||||
|
After Width: | Height: | Size: 375 B |
1
awesome/src/assets/icons/cpu/thermometer-low.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="M15 13V5A3 3 0 0 0 9 5V13A5 5 0 1 0 15 13M12 4A1 1 0 0 1 13 5V12H11V5A1 1 0 0 1 12 4Z" /></svg>
|
||||
|
After Width: | Height: | Size: 380 B |
1
awesome/src/assets/icons/cpu/thermometer.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="M15 13V5A3 3 0 0 0 9 5V13A5 5 0 1 0 15 13M12 4A1 1 0 0 1 13 5V8H11V5A1 1 0 0 1 12 4Z" /></svg>
|
||||
|
After Width: | Height: | Size: 379 B |
@@ -0,0 +1 @@
|
||||
Lutris;Steam;Io.elementary.appcenter;Repoman;Com.github.donadigo.eddy;Sysmontask;join?action=join&confno=9992624875&confid=dXRpZD1VVElEXzM0ODYxOTgyYzg0YzQ1Y2NiYmM0YWNiMzczODNiYjgxJnVzcz1TaU1YUnNEWG5BQWNBYnRpYklBNWE0MjRDNkpBMzMyVXRUc2pCX1YxVm5JY0hWeVRybGN5WjZZS2VBa1pvNkszOXdNWEVkVE9hTU54Z3BROFZFckhPR3Y4eGo0MlB0emNCZjNRLnNlM28yNy13YWpGYy1ReXEmdGlkPTcyNjEzNGRjYWJkZTQyYTNhNzJmZjVjYjVkNTU2YTYw&browser=join?action=join&confno=9992624875&confid=dXRpZD1VVElEXzM0ODYxOTgyYzg0YzQ1Y2NiYmM0YWNiMzczODNiYjgxJnVzcz1TaU1YUnNEWG5BQWNBYnRpYklBNWE0MjRDNkpBMzMyVXRUc2pCX1YxVm5JY0hWeVRybGN5WjZZS2VBa1pvNkszOXdNWEVkVE9hTU54Z3BROFZFckhPR3Y4eGo0MlB0emNCZjNRLnNlM28yNy13YWpGYy1ReXEmdGlkPTcyNjEzNGRjYWJkZTQyYTNhNzJmZjVjYjVkNTU2YTYw&browser=Gnome-calculator;Virt-manager;Gwe;
|
||||
@@ -103,7 +103,7 @@ return function(s)
|
||||
awful.spawn.easy_async_with_shell(
|
||||
"./.config/awesome/src/scripts/vol.sh volume",
|
||||
function(stdout)
|
||||
local volume_level = stdout:gsub("\n", "")
|
||||
local volume_level = stdout:gsub("\n", ""):gsub("%%", "")
|
||||
awesome.emit_signal("widget::volume")
|
||||
volume_osd_widget.container.osd_layout.icon_slider_layout.label_value_layout.value:set_text(volume_level .. "%")
|
||||
|
||||
@@ -152,7 +152,7 @@ return function(s)
|
||||
awful.spawn.easy_async_with_shell(
|
||||
"./.config/awesome/src/scripts/vol.sh volume",
|
||||
function(stdout2)
|
||||
stdout2 = stdout2:gsub("\n", "")
|
||||
stdout2 = stdout2:gsub("%%", ""):gsub("\n", "")
|
||||
volume_osd_widget.container.osd_layout.icon_slider_layout.slider_layout.volume_slider:set_value(tonumber(stdout2))
|
||||
update_osd()
|
||||
end
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
SINK=$(LC_ALL=C pactl get-default-sink)
|
||||
|
||||
if [[ $1 == "volume" ]]
|
||||
then
|
||||
echo $(LC_ALL=C pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( 47 + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,')
|
||||
echo $(LC_ALL=C pactl get-sink-volume $SINK | awk '{print $5}')
|
||||
elif [[ $1 == "mute" ]]
|
||||
then
|
||||
echo $(LC_ALL=C pactl list sinks | grep '^[[:space:]]Mute:' | head -n $(( 47 + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,')
|
||||
echo $(LC_ALL=C pactl get-sink-mute $SINK)
|
||||
fi
|
||||
|
||||
|
||||
@@ -105,9 +105,10 @@ return function()
|
||||
"button::press",
|
||||
function()
|
||||
awesome.emit_signal("widget::volume")
|
||||
awesome.emit_signal("module::volume_osd:show", true)
|
||||
--awesome.emit_signal("module::volume_osd:show", true)
|
||||
awesome.emit_signal("module::slider:update")
|
||||
awesome.emit_signal("widget::volume_osd:rerun")
|
||||
awesome.emit_signal("volume_controller::toggle")
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
227
awesome/src/widgets/cpu_info.lua
Normal file
@@ -0,0 +1,227 @@
|
||||
---------------------------------
|
||||
-- This is the CPU Info widget --
|
||||
---------------------------------
|
||||
|
||||
-- Awesome Libs
|
||||
local awful = require("awful")
|
||||
local color = require("src.theme.colors")
|
||||
local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local naughty = require("naughty")
|
||||
local watch = awful.widget.watch
|
||||
local wibox = require("wibox")
|
||||
require("src.core.signals")
|
||||
|
||||
local icon_dir = awful.util.getdir("config") .. "src/assets/icons/cpu/"
|
||||
|
||||
--TODO: Add tooltip with more CPU and per core information
|
||||
return function(widget, clock_mode)
|
||||
|
||||
local cpu_usage_widget = wibox.widget {
|
||||
{
|
||||
{
|
||||
{
|
||||
{
|
||||
{
|
||||
id = "icon",
|
||||
widget = wibox.widget.imagebox,
|
||||
image = gears.color.recolor_image(icon_dir .. "cpu.svg", color["Grey900"]),
|
||||
resize = false
|
||||
},
|
||||
id = "icon_layout",
|
||||
widget = wibox.container.place
|
||||
},
|
||||
top = dpi(2),
|
||||
widget = wibox.container.margin,
|
||||
id = "icon_margin"
|
||||
},
|
||||
spacing = dpi(10),
|
||||
{
|
||||
id = "label",
|
||||
align = "center",
|
||||
valign = "center",
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
id = "cpu_layout",
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
id = "container",
|
||||
left = dpi(8),
|
||||
right = dpi(8),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
bg = color["Blue200"],
|
||||
fg = color["Grey900"],
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
local cpu_temp = wibox.widget {
|
||||
{
|
||||
{
|
||||
{
|
||||
{
|
||||
{
|
||||
id = "icon",
|
||||
widget = wibox.widget.imagebox,
|
||||
resize = false
|
||||
},
|
||||
id = "icon_layout",
|
||||
widget = wibox.container.place
|
||||
},
|
||||
top = dpi(2),
|
||||
widget = wibox.container.margin,
|
||||
id = "icon_margin"
|
||||
},
|
||||
spacing = dpi(10),
|
||||
{
|
||||
id = "label",
|
||||
align = "center",
|
||||
valign = "center",
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
id = "cpu_layout",
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
id = "container",
|
||||
left = dpi(8),
|
||||
right = dpi(8),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
bg = color["Green200"],
|
||||
fg = color["Grey900"],
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
local cpu_clock = wibox.widget {
|
||||
{
|
||||
{
|
||||
{
|
||||
{
|
||||
{
|
||||
id = "icon",
|
||||
widget = wibox.widget.imagebox,
|
||||
image = icon_dir .. "cpu.svg",
|
||||
resize = false
|
||||
},
|
||||
id = "icon_layout",
|
||||
widget = wibox.container.place
|
||||
},
|
||||
top = dpi(2),
|
||||
widget = wibox.container.margin,
|
||||
id = "icon_margin"
|
||||
},
|
||||
spacing = dpi(10),
|
||||
{
|
||||
id = "label",
|
||||
align = "center",
|
||||
valign = "center",
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
id = "cpu_layout",
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
id = "container",
|
||||
left = dpi(8),
|
||||
right = dpi(8),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
bg = color["Purple200"],
|
||||
fg = color["Grey900"],
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
local total_prev = 0
|
||||
local idle_prev = 0
|
||||
|
||||
watch(
|
||||
[[ cat "/proc/stat" | grep '^cpu ' ]],
|
||||
3,
|
||||
function(_, stdout)
|
||||
local user, nice, system, idle, iowait, irq, softirq, steal, guest, guest_nice =
|
||||
stdout:match("(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s")
|
||||
|
||||
local total = user + nice + system + idle + iowait + irq + softirq + steal
|
||||
|
||||
local diff_idle = idle - idle_prev
|
||||
local diff_total = total - total_prev
|
||||
local diff_usage = (1000 * (diff_total - diff_idle) / diff_total + 5) / 10
|
||||
|
||||
cpu_usage_widget.container.cpu_layout.label.text = tostring(math.floor(diff_usage)) .. "%"
|
||||
|
||||
total_prev = total
|
||||
idle_prev = idle
|
||||
collectgarbage("collect")
|
||||
end
|
||||
)
|
||||
|
||||
watch(
|
||||
[[ bash -c "sensors | grep 'Package id 0:' | awk '{print $4}'" ]],
|
||||
3,
|
||||
function(_, stdout)
|
||||
|
||||
local temp_icon
|
||||
local temp_color
|
||||
|
||||
local temp_num = tonumber(stdout:match("%d+"))
|
||||
if temp_num < 50 then
|
||||
temp_color = color["Green200"]
|
||||
temp_icon = icon_dir .. "thermometer-low.svg"
|
||||
elseif temp_num >= 50 and temp_num < 80 then
|
||||
temp_color = color["Orange200"]
|
||||
temp_icon = icon_dir .. "thermometer.svg"
|
||||
elseif temp_num >= 80 then
|
||||
temp_color = color["Red200"]
|
||||
temp_icon = icon_dir .. "thermometer-high.svg"
|
||||
end
|
||||
Hover_signal(cpu_temp, temp_color)
|
||||
cpu_temp.container.cpu_layout.icon_margin.icon_layout.icon:set_image(temp_icon)
|
||||
cpu_temp:set_bg(temp_color)
|
||||
cpu_temp.container.cpu_layout.label.text = math.floor(temp_num) .. "°C"
|
||||
end
|
||||
)
|
||||
|
||||
watch(
|
||||
[[ bash -c "cat /proc/cpuinfo | grep "MHz" | awk '{print int($4)}'" ]],
|
||||
3,
|
||||
function(_, stdout)
|
||||
local cpu_freq = {}
|
||||
|
||||
for value in stdout:gmatch("%d+") do
|
||||
table.insert(cpu_freq, value)
|
||||
end
|
||||
|
||||
local average = 0
|
||||
|
||||
if clock_mode == "average" then
|
||||
for i = 1, #cpu_freq do
|
||||
average = average + cpu_freq[i]
|
||||
end
|
||||
average = math.floor(average / #cpu_freq)
|
||||
cpu_clock.container.cpu_layout.label.text = tonumber(average) .. "Mhz"
|
||||
elseif clock_mode then
|
||||
cpu_clock.container.cpu_layout.label.text = tonumber(cpu_freq[clock_mode]) .. "Mhz"
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
Hover_signal(cpu_usage_widget, color["Blue200"])
|
||||
Hover_signal(cpu_clock, color["Purple200"])
|
||||
|
||||
if widget == "usage" then
|
||||
return cpu_usage_widget
|
||||
elseif widget == "temp" then
|
||||
return cpu_temp
|
||||
elseif widget == "freq" then
|
||||
return cpu_clock
|
||||
end
|
||||
|
||||
end
|
||||
143
awesome/src/widgets/gpu_info.lua
Normal file
@@ -0,0 +1,143 @@
|
||||
---------------------------------
|
||||
-- This is the CPU Info widget --
|
||||
---------------------------------
|
||||
|
||||
-- Awesome Libs
|
||||
local awful = require("awful")
|
||||
local color = require("src.theme.colors")
|
||||
local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local naughty = require("naughty")
|
||||
local watch = awful.widget.watch
|
||||
local wibox = require("wibox")
|
||||
require("src.core.signals")
|
||||
|
||||
local icon_dir = awful.util.getdir("config") .. "src/assets/icons/cpu/"
|
||||
|
||||
return function(widget)
|
||||
local gpu_usage_widget = wibox.widget {
|
||||
{
|
||||
{
|
||||
{
|
||||
{
|
||||
{
|
||||
id = "icon",
|
||||
widget = wibox.widget.imagebox,
|
||||
image = gears.color.recolor_image(icon_dir .. "gpu.svg", color["Grey900"]),
|
||||
resize = false
|
||||
},
|
||||
id = "icon_layout",
|
||||
widget = wibox.container.place
|
||||
},
|
||||
top = dpi(2),
|
||||
widget = wibox.container.margin,
|
||||
id = "icon_margin"
|
||||
},
|
||||
spacing = dpi(10),
|
||||
{
|
||||
id = "label",
|
||||
align = "center",
|
||||
valign = "center",
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
id = "gpu_layout",
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
id = "container",
|
||||
left = dpi(8),
|
||||
right = dpi(8),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
bg = color["Green200"],
|
||||
fg = color["Grey900"],
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
Hover_signal(gpu_usage_widget, color["Green200"])
|
||||
|
||||
local gpu_temp_widget = wibox.widget {
|
||||
{
|
||||
{
|
||||
{
|
||||
{
|
||||
{
|
||||
id = "icon",
|
||||
widget = wibox.widget.imagebox,
|
||||
image = gears.color.recolor_image(icon_dir .. "cpu.svg", color["Grey900"]),
|
||||
resize = false
|
||||
},
|
||||
id = "icon_layout",
|
||||
widget = wibox.container.place
|
||||
},
|
||||
top = dpi(2),
|
||||
widget = wibox.container.margin,
|
||||
id = "icon_margin"
|
||||
},
|
||||
spacing = dpi(10),
|
||||
{
|
||||
id = "label",
|
||||
align = "center",
|
||||
valign = "center",
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
id = "gpu_layout",
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
id = "container",
|
||||
left = dpi(8),
|
||||
right = dpi(8),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
bg = color["Blue200"],
|
||||
fg = color["Grey900"],
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
-- GPU Utilization
|
||||
watch(
|
||||
[[ bash -c "nvidia-smi -q -d UTILIZATION | grep Gpu | awk '{print $3}'"]],
|
||||
3,
|
||||
function(_, stdout)
|
||||
gpu_usage_widget.container.gpu_layout.label.text = stdout:gsub("\n", "") .. "%"
|
||||
end
|
||||
)
|
||||
|
||||
-- GPU Temperature
|
||||
watch(
|
||||
[[ bash -c "nvidia-smi -q -d TEMPERATURE | grep 'GPU Current Temp' | awk '{print $5}'"]],
|
||||
3,
|
||||
function(_, stdout)
|
||||
|
||||
local temp_icon
|
||||
local temp_color
|
||||
local temp_num = tonumber(stdout)
|
||||
|
||||
if temp_num < 50 then
|
||||
temp_color = color["Green200"]
|
||||
temp_icon = icon_dir .. "thermometer-low.svg"
|
||||
elseif temp_num >= 50 and temp_num < 80 then
|
||||
temp_color = color["Orange200"]
|
||||
temp_icon = icon_dir .. "thermometer.svg"
|
||||
elseif temp_num >= 80 then
|
||||
temp_color = color["Red200"]
|
||||
temp_icon = icon_dir .. "thermometer-high.svg"
|
||||
end
|
||||
|
||||
Hover_signal(gpu_temp_widget, temp_color)
|
||||
gpu_temp_widget.container.gpu_layout.icon_margin.icon_layout.icon:set_image(temp_icon)
|
||||
gpu_temp_widget:set_bg(temp_color)
|
||||
gpu_temp_widget.container.gpu_layout.label.text = tostring(temp_num) .. "°C"
|
||||
end
|
||||
)
|
||||
|
||||
if widget == "usage" then
|
||||
return gpu_usage_widget
|
||||
elseif widget == "temp" then
|
||||
return gpu_temp_widget
|
||||
end
|
||||
end
|
||||
73
awesome/src/widgets/ram_info.lua
Normal file
@@ -0,0 +1,73 @@
|
||||
---------------------------------
|
||||
-- This is the RAM Info widget --
|
||||
---------------------------------
|
||||
|
||||
-- Awesome Libs
|
||||
local awful = require("awful")
|
||||
local color = require("src.theme.colors")
|
||||
local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local naughty = require("naughty")
|
||||
local watch = awful.widget.watch
|
||||
local wibox = require("wibox")
|
||||
require("src.core.signals")
|
||||
|
||||
local icon_dir = awful.util.getdir("config") .. "src/assets/icons/cpu/"
|
||||
|
||||
return function()
|
||||
local ram_widget = wibox.widget {
|
||||
{
|
||||
{
|
||||
{
|
||||
{
|
||||
{
|
||||
id = "icon",
|
||||
widget = wibox.widget.imagebox,
|
||||
image = gears.color.recolor_image(icon_dir .. "ram.svg", color["Grey900"]),
|
||||
resize = false
|
||||
},
|
||||
id = "icon_layout",
|
||||
widget = wibox.container.place
|
||||
},
|
||||
top = dpi(2),
|
||||
widget = wibox.container.margin,
|
||||
id = "icon_margin"
|
||||
},
|
||||
spacing = dpi(10),
|
||||
{
|
||||
id = "label",
|
||||
align = "center",
|
||||
valign = "center",
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
id = "ram_layout",
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
id = "container",
|
||||
left = dpi(8),
|
||||
right = dpi(8),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
bg = color["Red200"],
|
||||
fg = color["Grey900"],
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
Hover_signal(ram_widget, color["Red200"])
|
||||
|
||||
watch(
|
||||
[[ bash -c "cat /proc/meminfo| grep Mem | awk '{print $2}'" ]],
|
||||
3,
|
||||
function(_, stdout)
|
||||
|
||||
local MemTotal, MemFree, MemAvailable = stdout:match("(%d+)\n(%d+)\n(%d+)\n")
|
||||
|
||||
ram_widget.container.ram_layout.label.text = tostring(string.format("%.1f", ((MemTotal - MemAvailable) / 1024 / 1024)) .. "/" .. string.format("%.1f", (MemTotal / 1024 / 1024)) .. "GB"):gsub(",", ".")
|
||||
end
|
||||
)
|
||||
|
||||
return ram_widget
|
||||
end
|
||||