This commit is contained in:
VincentKnightTesting 2022-04-25 09:51:27 -05:00
parent 0bd393476c
commit 0cc6886341
106 changed files with 9737 additions and 2631 deletions

View file

@ -20,4 +20,6 @@ start /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
# load X colors
start xrdb $HOME/.Xresources
start xwallpaper --zoom ~/Pictures/city-topview.png
# network manager
start nm-applet
start optimus-manager-qt

View file

@ -9,57 +9,50 @@ local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
-- Check if awesome encountered an error during startup and fell back to
-- another config (This code will only ever execute for the fallback config)
naughty.connect_signal("request::display_error", function(message, startup)
naughty.notification {
urgency = "critical",
title = "Oops, an error happened" ..
(startup and " during startup!" or "!"),
message = message
}
naughty.notification({
urgency = "critical",
title = "Oops, an error happened" .. (startup and " during startup!" or "!"),
message = message,
})
end)
client.connect_signal("request::manage", function(c)
-- Add missing icon to client
if not c.icon then
local icon = gears.surface(beautiful.awesome_logo)
c.icon = icon._native
icon:finish()
end
-- Add missing icon to client
if not c.icon then
local icon = gears.surface(beautiful.awesome_logo)
c.icon = icon._native
icon:finish()
end
-- Set the windows at the slave,
if awesome.startup and not c.size_hints.user_position and
not c.size_hints.program_position then
-- Prevent clients from being unreachable after screen count changes.
awful.placement.no_offscreen(c)
end
-- Set the windows at the slave,
if awesome.startup and not c.size_hints.user_position and not c.size_hints.program_position then
-- Prevent clients from being unreachable after screen count changes.
awful.placement.no_offscreen(c)
end
end)
-- Enable sloppy focus, so that focus follows mouse.
client.connect_signal("mouse::enter", function(c)
c:emit_signal("request::activate", "mouse_enter", {raise = false})
c:emit_signal("request::activate", "mouse_enter", { raise = false })
end)
client.connect_signal("focus",
function(c) c.border_color = beautiful.border_focus end)
client.connect_signal("unfocus",
function(c) c.border_color = beautiful.border_normal end)
-- Hide all windows when a splash is shown
awesome.connect_signal("widgets::splash::visibility", function(vis)
local t = screen.primary.selected_tag
if vis then
for idx, c in ipairs(t:clients()) do c.hidden = true end
else
for idx, c in ipairs(t:clients()) do c.hidden = false end
end
local t = screen.primary.selected_tag
if vis then
for idx, c in ipairs(t:clients()) do
c.hidden = true
end
else
for idx, c in ipairs(t:clients()) do
c.hidden = false
end
end
end)
--Bling
----------
@ -68,29 +61,24 @@ local bling = require("module.bling")
bling.module.flash_focus.enable()
-- Tag Preview
bling.widget.tag_preview.enable {
show_client_content = false,
placement_fn = function(c)
awful.placement.top_left(c, {
margins = {
top = 99,
left = beautiful.wibar_width + 55
}
})
end,
scale = 0.15,
honor_padding = true,
honor_workarea = false,
background_widget = wibox.widget {
-- image = beautiful.wallpaper,
-- horizontal_fit_policy = "fit",
-- vertical_fit_policy = "fit",
-- widget = wibox.widget.imagebox
bg = beautiful.wibar_bg,
widget = wibox.container.bg
}
}
require('ui.widgets.window_switcher').enable()
bling.widget.tag_preview.enable({
show_client_content = false,
placement_fn = function(c)
awful.placement.top(c, {
margins = {
top = dpi(80),
},
})
end,
scale = 0.20,
honor_padding = true,
honor_workarea = false,
background_widget = wibox.widget({
-- image = beautiful.wallpaper,
-- horizontal_fit_policy = "fit",
-- vertical_fit_policy = "fit",
-- widget = wibox.widget.imagebox
bg = beautiful.darker_bg,
widget = wibox.container.bg,
}),
})

View file

@ -17,13 +17,6 @@ local bling = require("module.bling")
local machi = require("module.layout-machi")
beautiful.layout_machi = machi.get_icon()
-- This is to slave windows' positions in floating layout
require("module.savefloats")
-- Better mouse resizing on tiled
require("module.better-resize")
-- Desktop
-------------
@ -35,36 +28,45 @@ local equal = bling.layout.equalarea
local deck = bling.layout.deck
machi.editor.nested_layouts = {
["0"] = deck,
["1"] = awful.layout.suit.spiral,
["2"] = awful.layout.suit.fair,
["3"] = awful.layout.suit.fair.horizontal
["0"] = deck,
["1"] = awful.layout.suit.spiral,
["2"] = awful.layout.suit.fair,
["3"] = awful.layout.suit.fair.horizontal,
}
-- Set the layouts
tag.connect_signal("request::default_layouts", function()
awful.layout.append_default_layouts({
awful.layout.suit.tile, awful.layout.suit.floating, centered, mstab,
horizontal, machi.default_layout, equal, deck
})
awful.layout.append_default_layouts({
awful.layout.suit.tile,
awful.layout.suit.floating,
centered,
mstab,
horizontal,
machi.default_layout,
equal,
deck,
})
end)
-- Screen Padding and Tags
screen.connect_signal("request::desktop_decoration", function(s)
-- Screen padding
screen[s].padding = {left = dpi(40), right = dpi(15), top = dpi(15), bottom = dpi(15)}
-- Each screen has its own tag table.
awful.tag({"1", "2", "3", "4", "5"}, s, awful.layout.layouts[1])
-- Screen padding
screen[s].padding = { left = dpi(10), right = dpi(10), top = dpi(20), bottom = dpi(10) }
-- -- Each screen has its own tag table.
awful.tag({ "1", "2", "3", "4", "5" }, s, awful.layout.layouts[1])
end)
-- Wallpapers
-- set wallpapers
awful.screen.connect_for_each_screen(function(s)
-- gears.wallpaper.maximized(beautiful.wallpaper, s, false, nil)
gears.wallpaper.set(beautiful.xcolor8)
gears.wallpaper.maximized(
gears.surface.load_uncached(gfs.get_configuration_dir() .. "theme/assets/wallpaper.jpg"),
s,
false,
nil
)
end)
-- Set Tile Wallpaper
-- Set tile wallpaper
-- bling.module.tiled_wallpaper("", s, {
-- fg = beautiful.lighter_bg,
-- bg = beautiful.xbackground,
@ -76,10 +78,7 @@ end)
-- zickzack = true
-- })
-- Stuff
-----------
-- Import configuration stuff
require("configuration.keys")
require("configuration.ruled")
require("configuration.extras")

View file

@ -2,14 +2,7 @@
local gears = require("gears")
local awful = require("awful")
local hotkeys_popup = require("awful.hotkeys_popup")
-- Theme handling library
local beautiful = require("beautiful")
-- Theme library
local beautiful = require("beautiful")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local gfs = require("gears.filesystem")
-- Notifications library
local naughty = require("naughty")
@ -24,18 +17,6 @@ local machi = require("module.layout-machi")
-- Helpers
local helpers = require("helpers")
-- GALLANT FUNCTION
local function run_once(cmd)
local findme = cmd
local firstspace = cmd:find(' ')
if firstspace then findme = cmd:sub(0, firstspace - 1) end
awful.spawn.with_shell(string.format(
'pgrep -u $USER -x %s > /dev/null || (%s)',
findme, cmd), false)
end
-- Default modkey.
modkey = "Mod4"
alt = "Mod1"
@ -44,387 +25,340 @@ shift = "Shift"
-- Launcher
awful.keyboard.append_global_keybindings({
awful.key({modkey}, "Return", function()
awful.spawn(terminal)
end,
{description = "open terminal", group = "launcher"}),
awful.key({modkey}, "d", function()
awful.spawn(launcher)
end,
{description = "open applications menu", group = "launcher"}),
awful.key({modkey, shift}, "d", function()
dashboard_toggle()
end,
{description = "toggle dashboard", group = "launcher"}),
awful.key({modkey}, "f", function()
awful.spawn(file_manager)
end,
{description = "open file manager", group = "launcher"}),
awful.key({modkey}, "w", function()
awful.spawn.with_shell(browser)
end,
{description = "open web browser", group = "launcher"}),
awful.key({modkey}, "x", function()
awful.spawn.with_shell("xcolor-pick")
end,
{description = "open color-picker", group = "launcher"})
awful.key({ modkey }, "Return", function()
awful.spawn(terminal)
end, { description = "open terminal", group = "launcher" }),
awful.key({ modkey, shift }, "f", function()
awful.spawn(file_manager)
end, { description = "open file manager", group = "launcher" }),
awful.key({ modkey, shift }, "w", function()
awful.spawn.with_shell(browser)
end, { description = "open web browser", group = "launcher" }),
awful.key({ modkey, shift }, "x", function()
awful.spawn.with_shell("xcolor-pick")
end, { description = "open color picker", group = "launcher" }),
awful.key({ modkey, shift }, "d", function()
central_panel:toggle()
end, { description = "toggle dashboard", group = "launcher" }),
awful.key({ modkey, shift }, "t", function()
systray_toggle()
end, { description = "toggle systray", group = "launcher" }),
})
-- Client and Tabs Bindings
awful.keyboard.append_global_keybindings({
awful.key({alt}, "a", function()
bling.module.tabbed.pick_with_dmenu()
end,
{description = "pick client to add to tab group", group = "tabs"}),
awful.key({alt}, "s", function()
bling.module.tabbed.iter()
end,
{description = "iterate through tabbing group", group = "tabs"}),
awful.key({alt}, "d", function()
bling.module.tabbed.pop()
end,
{description = "remove focused client from tabbing group",group = "tabs"}),
awful.key({modkey}, "Down", function()
awful.client.focus.bydirection("down")
bling.module.flash_focus.flashfocus(client.focus)
end,
{description = "focus down", group = "client"}),
awful.key({modkey}, "Up", function()
awful.client.focus.bydirection("up")
bling.module.flash_focus.flashfocus(client.focus)
end,
{description = "focus up", group = "client"}),
awful.key({modkey}, "Left", function()
awful.client.focus.bydirection("left")
bling.module.flash_focus.flashfocus(client.focus)
end,
{description = "focus left", group = "client"}),
awful.key({modkey}, "Right", function()
awful.client.focus.bydirection("right")
bling.module.flash_focus.flashfocus(client.focus)
end,
{description = "focus right", group = "client"}),
awful.key({modkey}, "j", function()
awful.client.focus.byidx(1)
end,
{description = "focus next by index", group = "client"}),
awful.key({modkey}, "k", function()
awful.client.focus.byidx(-1)
end,
{description = "focus previous by index", group = "client"}),
awful.key({modkey, "Shift"}, "j", function()
awful.client.swap.byidx(1)
end,
{description = "swap with next client by index", group = "client"}),
awful.key({modkey, "Shift"}, "k", function()
awful.client.swap.byidx(-1)
end,
{description = "swap with previous client by index", group = "client"}),
awful.key({modkey}, "u",
awful.client.urgent.jumpto,
{description = "jump to urgent client", group = "client"}),
awful.key({alt}, "Tab", function()
awesome.emit_signal("bling::window_switcher::turn_on")
end,
{description = "window switcher", group = "client"})
awful.key({ alt }, "a", function()
bling.module.tabbed.pick_with_dmenu()
end, { description = "pick client to add to tab group", group = "tabs" }),
awful.key({ alt }, "s", function()
bling.module.tabbed.iter()
end, { description = "iterate through tabbing group", group = "tabs" }),
awful.key({ alt }, "d", function()
bling.module.tabbed.pop()
end, { description = "remove focused client from tabbing group", group = "tabs" }),
awful.key({ modkey }, "Down", function()
awful.client.focus.bydirection("down")
bling.module.flash_focus.flashfocus(client.focus)
end, { description = "focus down", group = "client" }),
awful.key({ modkey }, "Up", function()
awful.client.focus.bydirection("up")
bling.module.flash_focus.flashfocus(client.focus)
end, { description = "focus up", group = "client" }),
awful.key({ modkey }, "Left", function()
awful.client.focus.bydirection("left")
bling.module.flash_focus.flashfocus(client.focus)
end, { description = "focus left", group = "client" }),
awful.key({ modkey }, "Right", function()
awful.client.focus.bydirection("right")
bling.module.flash_focus.flashfocus(client.focus)
end, { description = "focus right", group = "client" }),
awful.key({ modkey }, "j", function()
awful.client.focus.byidx(1)
end, { description = "focus next by index", group = "client" }),
awful.key({ modkey }, "k", function()
awful.client.focus.byidx(-1)
end, { description = "focus previous by index", group = "client" }),
awful.key({ modkey, shift }, "j", function()
awful.client.swap.byidx(1)
end, { description = "swap with next client by index", group = "client" }),
awful.key({ modkey, shift }, "k", function()
awful.client.swap.byidx(-1)
end, { description = "swap with previous client by index", group = "client" }),
awful.key({ modkey }, "u", awful.client.urgent.jumpto, { description = "jump to urgent client", group = "client" }),
awful.key({ alt }, "Tab", function()
awesome.emit_signal("bling::window_switcher::turn_on")
end, { description = "window switcher", group = "client" }),
})
-- Hotkeys
awful.keyboard.append_global_keybindings({
-- Brightness Control
awful.key({}, "XF86MonBrightnessUp", function()
awful.spawn("brightnessctl set 5%+ -q")
end,
{description = "increase brightness", group = "hotkeys"}),
awful.key({}, "XF86MonBrightnessDown", function()
awful.spawn("brightnessctl set 5%- -q")
end,
{description = "decrease brightness", group = "hotkeys"}),
-- Brightness Control
awful.key({}, "XF86MonBrightnessUp", function()
awful.spawn("brightnessctl set 5%+ -q")
end, { description = "increase brightness", group = "hotkeys" }),
awful.key({}, "XF86MonBrightnessDown", function()
awful.spawn("brightnessctl set 5%- -q")
end, { description = "decrease brightness", group = "hotkeys" }),
-- Volume control
awful.key({}, "XF86AudioRaiseVolume", function()
helpers.volume_control(5)
end,
{description = "increase volume", group = "hotkeys"}),
awful.key({}, "XF86AudioLowerVolume", function()
helpers.volume_control(-5)
end,
{description = "decrease volume", group = "hotkeys"}),
awful.key({}, "XF86AudioMute", function()
helpers.volume_control(0)
end,
{description = "mute volume", group = "hotkeys"}),
-- Volume control
awful.key({}, "XF86AudioRaiseVolume", function()
helpers.volume_control(5)
end, { description = "increase volume", group = "hotkeys" }),
awful.key({}, "XF86AudioLowerVolume", function()
helpers.volume_control(-5)
end, { description = "decrease volume", group = "hotkeys" }),
awful.key({}, "XF86AudioMute", function()
helpers.volume_control(0)
end, { description = "mute volume", group = "hotkeys" }),
-- Music
awful.key({}, "XF86AudioPlay", function()
run_once("mpc toggle")
end,
{description = "toggle music", group = "hotkeys"}),
-- Music
awful.key({}, "XF86AudioPlay", function()
playerctl:play_pause()
end, { description = "toggle music", group = "hotkeys" }),
awful.key({}, "XF86AudioPause", function()
run_once("mpc toggle")
end,
{description = "fuck you awesomeWM", group = "hotkeys"}),
awful.key({}, "XF86AudioPrev", function()
playerctl:previous()
end, { description = "previous music", group = "hotkeys" }),
awful.key({}, "XF86AudioPrev", function()
playerctl:previous()
end,
{description = "previous music", group = "hotkeys"}),
awful.key({}, "XF86AudioNext", function()
playerctl:next()
end, { description = "next music", group = "hotkeys" }),
awful.key({}, "XF86AudioNext", function()
run_once("mpc next")
end,
{description = "next music", group = "hotkeys"}),
-- Screenshots
awful.key({}, "Print", function()
awful.spawn.with_shell("screensht full")
end, { description = "take a full screenshot", group = "hotkeys" }),
-- Screenshots
awful.key({}, "Print", function()
awful.spawn.with_shell("screensht full")
end,
{description = "take a full screenshot", group = "hotkeys"}),
awful.key({ alt }, "Print", function()
awful.spawn.with_shell("screensht area")
end, { description = "take a area screenshot", group = "hotkeys" }),
awful.key({alt, shift}, "s", function()
awful.spawn.with_shell("wackysnap area")
end,
{description = "take a area screenshot", group = "hotkeys"}),
-- Lockscreen
awful.key({modkey, ctrl}, "l", function()
lock_screen_show()
end,
{description = "lock screen", group = "hotkeys"})
-- Lockscreen
awful.key({ modkey, ctrl }, "l", function()
lock_screen_show()
end, { description = "lock screen", group = "hotkeys" }),
})
-- Awesome stuff
awful.keyboard.append_global_keybindings({
awful.key({modkey}, "F1",
hotkeys_popup.show_help,
{description = "show help", group = "awesome"}),
awful.key({modkey, ctrl}, "r",
awesome.restart,
{description = "reload awesome", group = "awesome"}),
awful.key({modkey, ctrl}, "q",
awesome.quit,
{description = "quit awesome", group = "awesome"})
awful.key({ modkey }, "F1", hotkeys_popup.show_help, { description = "show help", group = "awesome" }),
awful.key({ modkey, ctrl }, "r", awesome.restart, { description = "reload awesome", group = "awesome" }),
awful.key({ modkey, ctrl }, "q", awesome.quit, { description = "quit awesome", group = "awesome" }),
})
-- Layout Machi
awful.keyboard.append_global_keybindings({
awful.key({modkey}, ".", function()
machi.default_editor.start_interactive()
end,
{description = "edit the current layout if it is a machi layout", group = "layout"}),
awful.key({modkey}, "/", function()
machi.switcher.start(client.focus)
end,
{description = "switch between windows for a machi layout", group = "layout"})
awful.key({ modkey }, ".", function()
machi.default_editor.start_interactive()
end, { description = "edit the current layout if it is a machi layout", group = "layout" }),
awful.key({ modkey }, "/", function()
machi.switcher.start(client.focus)
end, { description = "switch between windows for a machi layout", group = "layout" }),
})
awful.keyboard.append_global_keybindings({
-- Screen
awful.key({modkey, "Control"}, "j", function()
awful.screen.focus_relative(1)
end,
{description = "focus the next screen", group = "screen"}),
awful.key({modkey, "Control"}, "k", function()
awful.screen.focus_relative(-1)
end,
{description = "focus the previous screen", group = "screen"}),
-- Screen
awful.key({ modkey, "Control" }, "j", function()
awful.screen.focus_relative(1)
end, { description = "focus the next screen", group = "screen" }),
awful.key({ modkey, "Control" }, "k", function()
awful.screen.focus_relative(-1)
end, { description = "focus the previous screen", group = "screen" }),
-- Layout
awful.key({modkey}, "l", function()
awful.tag.incmwfact(0.05)
end,
{description = "increase master width factor", group = "layout"}),
awful.key({modkey}, "h", function()
awful.tag.incmwfact(-0.05)
end,
{description = "decrease master width factor", group = "layout"}),
awful.key({modkey, "Shift"}, "h", function()
awful.tag.incnmaster(1, nil, true)
end,
{description = "increase the number of master clients", group = "layout"}),
awful.key({modkey, "Shift"}, "l", function()
awful.tag.incnmaster(-1, nil, true)
end,
{description = "decrease the number of master clients", group = "layout"}),
awful.key({modkey, "Control"}, "h", function()
awful.tag.incncol(1, nil, true)
end,
{description = "increase the number of columns", group = "layout"}),
awful.key({modkey, "Control"}, "l", function()
awful.tag.incncol(-1, nil, true)
end,
{description = "decrease the number of columns", group = "layout"}),
awful.key({modkey}, "space", function()
awful.layout.inc(1)
end,
{description = "select next layout", group = "layout"}),
awful.key({modkey, "Shift"}, "space", function()
awful.layout.inc(-1)
end,
{description = "select previous layout", group = "layout"}),
-- Layout
awful.key({ modkey }, "l", function()
awful.tag.incmwfact(0.05)
end, { description = "increase master width factor", group = "layout" }),
awful.key({ modkey }, "h", function()
awful.tag.incmwfact(-0.05)
end, { description = "decrease master width factor", group = "layout" }),
awful.key({ modkey, shift }, "h", function()
awful.tag.incnmaster(1, nil, true)
end, { description = "increase the number of master clients", group = "layout" }),
awful.key({ modkey, shift }, "l", function()
awful.tag.incnmaster(-1, nil, true)
end, { description = "decrease the number of master clients", group = "layout" }),
awful.key({ modkey, "Control" }, "h", function()
awful.tag.incncol(1, nil, true)
end, { description = "increase the number of columns", group = "layout" }),
awful.key({ modkey, "Control" }, "l", function()
awful.tag.incncol(-1, nil, true)
end, { description = "decrease the number of columns", group = "layout" }),
awful.key({ modkey }, "space", function()
awful.layout.inc(1)
end, { description = "select next layout", group = "layout" }),
awful.key({ modkey, shift }, "space", function()
awful.layout.inc(-1)
end, { description = "select previous layout", group = "layout" }),
-- Tag
awful.key({ modkey, alt}, "Left",
awful.tag.viewprev,
{description = "view previous", group = "tag"}),
awful.key({ modkey, alt}, "Right",
awful.tag.viewnext,
{description = "view next", group = "tag"}),
awful.key({ modkey}, "Escape",
awful.tag.history.restore,
{description = "go back", group = "tag"}),
-- Tag
awful.key({ modkey, alt }, "Left", awful.tag.viewprev, { description = "view previous", group = "tag" }),
awful.key({ modkey, alt }, "Right", awful.tag.viewnext, { description = "view next", group = "tag" }),
awful.key({ modkey }, "Escape", awful.tag.history.restore, { description = "go back", group = "tag" }),
-- Set Layout
awful.key({modkey, "Control"}, "w", function()
awful.layout.set(awful.layout.suit.max)
end,
{description = "set max layout", group = "tag"}),
awful.key({modkey}, "s", function()
awful.layout.set(awful.layout.suit.tile)
end,
{description = "set tile layout", group = "tag"}),
awful.key({modkey, shift}, "s", function()
awful.layout.set(awful.layout.suit.floating)
end,
{description = "set floating layout", group = "tag"}),
-- Set Layout
awful.key({ modkey, "Control" }, "w", function()
awful.layout.set(awful.layout.suit.max)
end, { description = "set max layout", group = "tag" }),
awful.key({ modkey }, "s", function()
awful.layout.set(awful.layout.suit.tile)
end, { description = "set tile layout", group = "tag" }),
awful.key({ modkey, shift }, "s", function()
awful.layout.set(awful.layout.suit.floating)
end, { description = "set floating layout", group = "tag" }),
--Client
awful.key({modkey, "Control"}, "n", function()
local c = awful.client.restore()
-- Focus restored client
if c then
c:emit_signal("request::activate", "key.unminimize", {raise = true})
end
end,
{description = "restore minimized", group = "client"})
--Client
awful.key({ modkey, "Control" }, "n", function()
local c = awful.client.restore()
-- Focus restored client
if c then
c:emit_signal("request::activate", "key.unminimize", { raise = true })
end
end, { description = "restore minimized", group = "client" }),
})
-- Client management keybinds
client.connect_signal("request::default_keybindings", function()
awful.keyboard.append_client_keybindings({
awful.key({modkey, "Shift"}, "f", function(c)
c.fullscreen = not c.fullscreen
c:raise()
end,
{description = "toggle fullscreen", group = "client"}),
awful.key({modkey}, "q", function(c)
c:kill()
end,
{description = "close", group = "client"}),
awful.key({modkey, "Control"}, "space",
awful.client.floating.toggle,
{description = "toggle floating", group = "client"}),
awful.key({modkey, "Control"}, "Return", function(c)
c:swap(awful.client.getmaster())
end,
{description = "move to master", group = "client"}),
awful.key({modkey}, "o", function(c)
c:move_to_screen() end,
{description = "move to screen", group = "client"}),
awful.key({modkey, shift}, "b", function(c)
c.floating = not c.floating
c.width = 400
c.height = 200
awful.placement.bottom_right(c)
c.sticky = not c.sticky
end,
{description = "toggle keep on top", group = "client"}),
awful.keyboard.append_client_keybindings({
awful.key({ modkey }, "f", function(c)
c.fullscreen = not c.fullscreen
c:raise()
end, { description = "toggle fullscreen", group = "client" }),
awful.key({ modkey }, "q", function(c)
c:kill()
end, { description = "close", group = "client" }),
-- Kill all visible clients for the current tag
awful.key({ modkey, shift }, "q", function()
local clients = awful.screen.focused().clients
for _, c in pairs(clients) do
c:kill()
end
end, { description = "kill all visible clients for the current tag", group = "client" }),
awful.key(
{ modkey, "Control" },
"space",
awful.client.floating.toggle,
{ description = "toggle floating", group = "client" }
),
awful.key({ modkey, "Control" }, "Return", function(c)
c:swap(awful.client.getmaster())
end, { description = "move to master", group = "client" }),
awful.key({ modkey }, "o", function(c)
c:move_to_screen()
end, { description = "move to screen", group = "client" }),
awful.key({ modkey, shift }, "b", function(c)
c.floating = not c.floating
c.width = 400
c.height = 200
awful.placement.bottom_right(c)
c.sticky = not c.sticky
end, { description = "toggle keep on top", group = "client" }),
awful.key({modkey}, "n", function(c)
-- The client currently has the input focus, so it cannot be
-- minimized, since minimized clients can't have the focus.
c.minimized = true
end, {description = "minimize", group = "client"}),
awful.key({modkey}, "m", function(c)
c.maximized = not c.maximized
c:raise()
end, {description = "(un)maximize", group = "client"}),
awful.key({modkey, "Control"}, "m", function(c)
c.maximized_vertical = not c.maximized_vertical
c:raise()
end, {description = "(un)maximize vertically", group = "client"}),
awful.key({modkey, "Shift"}, "m", function(c)
c.maximized_horizontal = not c.maximized_horizontal
c:raise()
end, {description = "(un)maximize horizontally", group = "client"}),
awful.key({ modkey }, "n", function(c)
-- The client currently has the input focus, so it cannot be
-- minimized, since minimized clients can't have the focus.
c.minimized = true
end, { description = "minimize", group = "client" }),
awful.key({ modkey }, "m", function(c)
c.maximized = not c.maximized
c:raise()
end, { description = "(un)maximize", group = "client" }),
awful.key({ modkey, "Control" }, "m", function(c)
c.maximized_vertical = not c.maximized_vertical
c:raise()
end, { description = "(un)maximize vertically", group = "client" }),
awful.key({ modkey, shift }, "m", function(c)
c.maximized_horizontal = not c.maximized_horizontal
c:raise()
end, { description = "(un)maximize horizontally", group = "client" }),
-- On the fly padding change
awful.key({modkey, shift}, "=",
function() helpers.resize_padding(5) end,
{description = "add padding", group = "screen"}),
awful.key({modkey, shift}, "-",
function() helpers.resize_padding(-5) end,
{description = "subtract padding", group = "screen"}),
-- On the fly padding change
awful.key({ modkey, shift }, "=", function()
helpers.resize_padding(5)
end, { description = "add padding", group = "screen" }),
awful.key({ modkey, shift }, "-", function()
helpers.resize_padding(-5)
end, { description = "subtract padding", group = "screen" }),
-- On the fly useless gaps change
awful.key({modkey}, "=", function() helpers.resize_gaps(5) end,
{description = "add gaps", group = "screen"}),
-- On the fly useless gaps change
awful.key({ modkey }, "=", function()
helpers.resize_gaps(5)
end, { description = "add gaps", group = "screen" }),
awful.key({modkey}, "-", function() helpers.resize_gaps(-5) end,
{description = "subtract gaps", group = "screen"}),
-- Single tap: Center client
-- Double tap: Center client + Floating + Resize
awful.key({modkey}, "c", function(c)
awful.placement.centered(c, {
honor_workarea = true,
honor_padding = true
})
helpers.single_double_tap(nil, function()
helpers.float_and_resize(c, screen_width * 0.25,
screen_height * 0.28)
end)
end)
})
awful.key({ modkey }, "-", function()
helpers.resize_gaps(-5)
end, { description = "subtract gaps", group = "screen" }),
-- Single tap: Center client
-- Double tap: Center client + Floating + Resize
awful.key({ modkey }, "c", function(c)
awful.placement.centered(c, {
honor_workarea = true,
honor_padding = true,
})
helpers.single_double_tap(nil, function()
helpers.float_and_resize(c, screen_width * 0.25, screen_height * 0.28)
end)
end),
})
end)
-- Num row keybinds
awful.keyboard.append_global_keybindings({
awful.key {
modifiers = {modkey},
keygroup = "numrow",
description = "only view tag",
group = "tag",
on_press = function(index)
local screen = awful.screen.focused()
local tag = screen.tags[index]
if tag then tag:view_only() end
end
}, awful.key {
modifiers = {modkey, "Control"},
keygroup = "numrow",
description = "toggle tag",
group = "tag",
on_press = function(index)
local screen = awful.screen.focused()
local tag = screen.tags[index]
if tag then awful.tag.viewtoggle(tag) end
end
}, awful.key {
modifiers = {modkey, "Shift"},
keygroup = "numrow",
description = "move focused client to tag",
group = "tag",
on_press = function(index)
if client.focus then
local tag = client.focus.screen.tags[index]
if tag then client.focus:move_to_tag(tag) end
end
end
}, awful.key {
modifiers = {modkey, "Control", "Shift"},
keygroup = "numrow",
description = "toggle focused client on tag",
group = "tag",
on_press = function(index)
if client.focus then
local tag = client.focus.screen.tags[index]
if tag then client.focus:toggle_tag(tag) end
end
end
}
awful.key({
modifiers = { modkey },
keygroup = "numrow",
description = "only view tag",
group = "tag",
on_press = function(index)
local screen = awful.screen.focused()
local tag = screen.tags[index]
if tag then
tag:view_only()
end
end,
}),
awful.key({
modifiers = { modkey, "Control" },
keygroup = "numrow",
description = "toggle tag",
group = "tag",
on_press = function(index)
local screen = awful.screen.focused()
local tag = screen.tags[index]
if tag then
awful.tag.viewtoggle(tag)
end
end,
}),
awful.key({
modifiers = { modkey, shift },
keygroup = "numrow",
description = "move focused client to tag",
group = "tag",
on_press = function(index)
if client.focus then
local tag = client.focus.screen.tags[index]
if tag then
client.focus:move_to_tag(tag)
end
end
end,
}),
awful.key({
modifiers = { modkey, "Control", shift },
keygroup = "numrow",
description = "toggle focused client on tag",
group = "tag",
on_press = function(index)
if client.focus then
local tag = client.focus.screen.tags[index]
if tag then
client.focus:toggle_tag(tag)
end
end
end,
}),
})
-- Mouse bindings on desktop
@ -432,44 +366,42 @@ awful.keyboard.append_global_keybindings({
awful.mouse.append_global_mousebindings({
-- Left click
awful.button({}, 1, function()
naughty.destroy_all_notifications()
if mymainmenu then
mymainmenu:hide()
end
end),
-- Left click
awful.button({}, 1, function()
naughty.destroy_all_notifications()
if mymainmenu then
mymainmenu:hide()
end
end),
-- Middle click
awful.button({}, 2, function()
dashboard_toggle()
end),
-- Middle click
awful.button({}, 2, function()
central_panel:toggle()
end),
-- Right click
awful.button({}, 3, function()
mymainmenu:toggle()
end),
-- Side key
awful.button({}, 4, awful.tag.viewprev),
awful.button({}, 5, awful.tag.viewnext)
-- Right click
awful.button({}, 3, function()
mymainmenu:toggle()
end),
-- Side key
awful.button({}, 4, awful.tag.viewprev),
awful.button({}, 5, awful.tag.viewnext),
})
-- Mouse buttons on the client
--------------------------------
client.connect_signal("request::default_mousebindings", function()
awful.mouse.append_client_mousebindings({
awful.button({}, 1, function(c)
c:activate{context = "mouse_click"}
end),
awful.button({modkey}, 1, function(c)
c:activate{context = "mouse_click", action = "mouse_move"}
end),
awful.button({modkey}, 3, function(c)
c:activate{context = "mouse_click", action = "mouse_resize"}
end)
})
awful.mouse.append_client_mousebindings({
awful.button({}, 1, function(c)
c:activate({ context = "mouse_click" })
end),
awful.button({ modkey }, 1, function(c)
c:activate({ context = "mouse_click", action = "mouse_move" })
end),
awful.button({ modkey }, 3, function(c)
c:activate({ context = "mouse_click", action = "mouse_resize" })
end),
})
end)

View file

@ -8,41 +8,89 @@ local helpers = require("helpers")
-- Create a launcher widget and a main menu
awful.screen.connect_for_each_screen(function(s)
-- Submenu
awesomemenu = {
{
"Hotkeys",
function()
hotkeys_popup.show_help(nil, awful.screen.focused())
end,
},
{ "Manual", terminal .. " -e man awesome" },
{ "Edit Config", editor .. " " .. awesome.conffile },
{ "Restart", awesome.restart },
{
"Quit",
function()
awesome.quit()
end,
},
}
-- Submenu
awesomemenu = {
{"Hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end},
{"Manual", terminal .. " start man awesome"},
{"Edit Config", editor .. " " .. awesome.conffile},
{"Restart", awesome.restart},
{"Quit", function() awesome.quit() end}
}
-- Powermenu
powermenu = {
{"Power OFF", function() awful.spawn.with_shell("systemctl poweroff") end},
{"Reboot", function() awful.spawn.with_shell("systemctl reboot") end},
{"Suspend", function()
lock_screen_show()
awful.spawn.with_shell("systemctl suspend")
end},
{"Lock Screen", function() lock_screen_show() end}
}
-- Mainmenu
mymainmenu = awful.menu({
items = {
{"Terminal", function() awful.spawn.with_shell(terminal) end},
{"Code Editor", function() awful.spawn.with_shell(vscode) end},
{"File Manager", function() awful.spawn.with_shell(file_manager) end},
{"Web Browser", function() awful.spawn.with_shell(browser) end},
{"Music", function() awful.spawn.with_shell(music_client) end},
{"AwesomeWM", awesomemenu, beautiful.awesome_logo},
{"Power Menu", powermenu}
}
})
mymainmenu.wibox.shape = helpers.rrect(beautiful.border_radius)
-- Powermenu
powermenu = {
{
"Power OFF",
function()
awful.spawn.with_shell("systemctl poweroff")
end,
},
{
"Reboot",
function()
awful.spawn.with_shell("systemctl reboot")
end,
},
{
"Suspend",
function()
lock_screen_show()
awful.spawn.with_shell("systemctl suspend")
end,
},
{
"Lock Screen",
function()
lock_screen_show()
end,
},
}
-- Mainmenu
mymainmenu = awful.menu({
items = {
{
"Terminal",
function()
awful.spawn.with_shell(terminal)
end,
},
{
"Code Editor",
function()
awful.spawn.with_shell(vscode)
end,
},
{
"File Manager",
function()
awful.spawn.with_shell(file_manager)
end,
},
{
"Web Browser",
function()
awful.spawn.with_shell(browser)
end,
},
{
"Music",
function()
awful.spawn.with_shell(music_client)
end,
},
{ "AwesomeWM", awesomemenu, beautiful.awesome_logo },
{ "Power Menu", powermenu },
},
})
end)

View file

@ -19,156 +19,139 @@ local screen_width = awful.screen.focused().geometry.width
local screen_height = awful.screen.focused().geometry.height
ruled.client.connect_signal("request::rules", function()
-- Global
ruled.client.append_rule({
id = "global",
rule = {},
properties = {
focus = awful.client.focus.filter,
raise = true,
size_hints_honor = false,
screen = awful.screen.preferred,
titlebars_enabled = beautiful.titlebar_enabled,
placement = awful.placement.no_overlap + awful.placement.no_offscreen,
},
})
-- Global
ruled.client.append_rule {
id = "global",
rule = {},
properties = {
focus = awful.client.focus.filter,
raise = true,
size_hints_honor = false,
screen = awful.screen.preferred,
titlebars_enabled = beautiful.titlebar_enabled,
placement = awful.placement.no_overlap+awful.placement.no_offscreen
}
}
-- Tasklist order
ruled.client.append_rule({
id = "tasklist_order",
rule = {},
properties = {},
callback = awful.client.setslave,
})
-- Tasklist order
ruled.client.append_rule {
id = "tasklist_order",
rule = {},
properties = {},
callback = awful.client.setslave
}
-- Titlebar rules
ruled.client.append_rule({
id = "titlebars",
rule_any = {
class = {
"discord",
"Spotify",
"Org.gnome.Nautilus",
},
type = {
"splash",
},
name = {
"^discord.com is sharing your screen.$", -- Discord (running in browser) screen sharing popup
},
},
properties = {
titlebars_enabled = false,
},
})
-- Titlebar rules
ruled.client.append_rule {
id = "titlebars",
rule_any = {
class = {
"discord",
"Spotify",
"firefox",
"Org.gnome.Nautilus"
},
type = {
"splash"
},
name = {
"^discord.com is sharing your screen.$" -- Discord (running in browser) screen sharing popup
}
},
properties = {
titlebars_enabled = false
}
}
-- Float
ruled.client.append_rule({
id = "floating",
rule_any = {
instance = {
"Devtools", -- Firefox devtools
},
class = {
"Lxappearance",
"Nm-connection-editor",
},
name = {
"Event Tester", -- xev
},
role = {
"AlarmWindow",
"pop-up",
"GtkFileChooserDialog",
"conversation",
},
type = {
"dialog",
},
},
properties = { floating = true, placement = helpers.centered_client_placement },
})
-- Float
ruled.client.append_rule {
id = "floating",
rule_any = {
instance = {
"Devtools", -- Firefox devtools
},
class = {
"Lxappearance",
"Nm-connection-editor",
},
name = {
"Event Tester", -- xev
},
role = {
"AlarmWindow",
"pop-up",
"GtkFileChooserDialog",
"conversation",
},
type = {
"dialog",
}
},
properties = { floating = true, placement = helpers.centered_client_placement }
}
-- Centered
ruled.client.append_rule({
id = "centered",
rule_any = {
type = {
"dialog",
},
class = {
-- "discord",
},
role = {
"GtkFileChooserDialog",
"conversation",
},
},
properties = { placement = helpers.centered_client_placement },
})
-- Centered
ruled.client.append_rule {
id = "centered",
rule_any = {
type = {
"dialog",
},
class = {
-- "discord",
},
role = {
"GtkFileChooserDialog",
"conversation",
}
},
properties = { placement = helpers.centered_client_placement },
}
-- Music clients (usually a terminal running ncmpcpp)
-- Music clients (usually a terminal running ncmpcpp)
ruled.client.append_rule {
rule_any = {
class = {
"music"
},
instance = {
"music"
}
},
properties = {
floating = false
}
}
-- Image viewers
ruled.client.append_rule({
rule_any = {
class = {
"feh",
"imv",
},
},
properties = {
floating = true,
width = screen_width * 0.7,
height = screen_height * 0.75,
},
callback = function(c)
awful.placement.centered(c, { honor_padding = true, honor_workarea = true })
end,
})
-- Image viewers
ruled.client.append_rule {
rule_any = {
class = {
"feh",
"imv"
}
},
properties = {
floating = true,
width = screen_width * 0.7,
height = screen_height * 0.75
},
callback = function (c)
awful.placement.centered(c,{honor_padding = true, honor_workarea=true})
end
}
-- Mpv
ruled.client.append_rule({
rule = { class = "mpv" },
properties = {},
callback = function(c)
-- make it floating, ontop and move it out of the way if the current tag is maximized
if awful.layout.get(awful.screen.focused()) == awful.layout.suit.floating then
c.floating = true
c.ontop = true
c.width = screen_width * 0.30
c.height = screen_height * 0.35
awful.placement.bottom_right(c, {
honor_padding = true,
honor_workarea = true,
margins = { bottom = beautiful.useless_gap * 2, right = beautiful.useless_gap * 2 },
})
awful.titlebar.hide(c, beautiful.titlebar_pos)
end
-- Mpv
ruled.client.append_rule {
rule = { class = "mpv" },
properties = {},
callback = function (c)
-- make it floating, ontop and move it out of the way if the current tag is maximized
if awful.layout.get(awful.screen.focused()) == awful.layout.suit.floating then
c.floating = true
c.ontop = true
c.width = screen_width * 0.30
c.height = screen_height * 0.35
awful.placement.bottom_right(c, {
honor_padding = true,
honor_workarea = true,
margins = { bottom = beautiful.useless_gap * 2, right = beautiful.useless_gap * 2 }
})
awful.titlebar.hide(c, beautiful.titlebar_pos)
end
-- restore `ontop` after fullscreen is disabled
c:connect_signal("property::fullscreen", function ()
if not c.fullscreen then
c.ontop = true
end
end)
end
}
-- restore `ontop` after fullscreen is disabled
c:connect_signal("property::fullscreen", function()
if not c.fullscreen then
c.ontop = true
end
end)
end,
})
end)

File diff suppressed because it is too large Load diff

View file

@ -1,127 +1,129 @@
local capi = {
client = client,
mouse = mouse,
screen = screen,
mousegrabber = mousegrabber
client = client,
mouse = mouse,
screen = screen,
mousegrabber = mousegrabber,
}
local awful = require("awful")
local function mouse_resize_handler(m, c)
awful.client.incwfact(0, c) -- needed to fix normalization at start
local start = m(capi.mouse.coords())
local x, y = start.x, start.y
local wa = m(c.screen.workarea)
local idx = awful.client.idx(c)
local c_above, c_below
local idx_above, idx_below
local wfact_above, wfact_below
local jump_to = {x = x, y = y}
local move_mwfact = false
awful.client.incwfact(0, c) -- needed to fix normalization at start
local start = m(capi.mouse.coords())
local x, y = start.x, start.y
local wa = m(c.screen.workarea)
local idx = awful.client.idx(c)
local c_above, c_below
local idx_above, idx_below
local wfact_above, wfact_below
local jump_to = { x = x, y = y }
local move_mwfact = false
do
local g = m(c:geometry())
do
local g = m(c:geometry())
local v_border = 0.2 * g.height
local v_border = 0.2 * g.height
if idx.idx > 1 and y >= g.y and y <= g.y + v_border then
-- we are near the top edge of the window
c_above = awful.client.next(-1, c)
c_below = c
jump_to.y = g.y
idx_above = idx.idx - 1
idx_below = idx.idx
elseif idx.idx < (idx.num) and y >= g.y + g.height - v_border then
-- we are near the bottom edge of the window
c_above = c
c_below = awful.client.next(1, c)
idx_above = idx.idx
idx_below = idx.idx + 1
jump_to.y = g.y + g.height
end
if idx.idx > 1 and y >= g.y and y <= g.y + v_border then
-- we are near the top edge of the window
c_above = awful.client.next(-1, c)
c_below = c
jump_to.y = g.y
idx_above = idx.idx - 1
idx_below = idx.idx
elseif idx.idx < idx.num and y >= g.y + g.height - v_border then
-- we are near the bottom edge of the window
c_above = c
c_below = awful.client.next(1, c)
idx_above = idx.idx
idx_below = idx.idx + 1
jump_to.y = g.y + g.height
end
local mw_split = wa.x + wa.width *
c.screen.selected_tag.master_width_factor
local mw_split = wa.x + wa.width * c.screen.selected_tag.master_width_factor
if math.abs(mw_split - x) > wa.width / 6 then
move_mwfact = false
else
move_mwfact = true
jump_to.x = mw_split
end
end
if math.abs(mw_split - x) > wa.width / 6 then
move_mwfact = false
else
move_mwfact = true
jump_to.x = mw_split
end
end
if idx_above then
local t = c.screen.selected_tag
local data = t.windowfact or {}
local colfact = data[idx.col] or {}
wfact_above = colfact[idx_above] or 1
wfact_below = colfact[idx_below] or 1
end
if idx_above then
local t = c.screen.selected_tag
local data = t.windowfact or {}
local colfact = data[idx.col] or {}
wfact_above = colfact[idx_above] or 1
wfact_below = colfact[idx_below] or 1
end
if idx_above and move_mwfact then
cursor = "cross"
elseif idx_above then
cursor = m({y = "sb_v_double_arrow", x = "sb_h_double_arrow"}).y
elseif move_mwfact then
cursor = m({y = "sb_v_double_arrow", x = "sb_h_double_arrow"}).x
else
return false
end
if idx_above and move_mwfact then
cursor = "cross"
elseif idx_above then
cursor = m({ y = "sb_v_double_arrow", x = "sb_h_double_arrow" }).y
elseif move_mwfact then
cursor = m({ y = "sb_v_double_arrow", x = "sb_h_double_arrow" }).x
else
return false
end
capi.mouse.coords(m(jump_to))
capi.mouse.coords(m(jump_to))
capi.mousegrabber.run(function(_mouse)
if not c.valid then return false end
capi.mousegrabber.run(function(_mouse)
if not c.valid then
return false
end
local pressed = false
for _, v in ipairs(_mouse.buttons) do
if v then
pressed = true
break
end
end
local pressed = false
for _, v in ipairs(_mouse.buttons) do
if v then
pressed = true
break
end
end
_mouse = m(_mouse)
_mouse = m(_mouse)
if pressed then
if move_mwfact then
c.screen.selected_tag.master_width_factor =
math.min(math.max((_mouse.x - wa.x) / wa.width, 0.01), 0.99)
end
if pressed then
if move_mwfact then
c.screen.selected_tag.master_width_factor = math.min(math.max((_mouse.x - wa.x) / wa.width, 0.01), 0.99)
end
if idx_above then
local factor_delta = (_mouse.y - jump_to.y) / wa.height
if idx_above then
local factor_delta = (_mouse.y - jump_to.y) / wa.height
if factor_delta < 0 then
factor_delta = math.max(factor_delta, -(wfact_above - 0.05))
else
factor_delta = math.min(factor_delta, wfact_below - 0.05)
end
if factor_delta < 0 then
factor_delta = math.max(factor_delta, -(wfact_above - 0.05))
else
factor_delta = math.min(factor_delta, wfact_below - 0.05)
end
local t = c.screen.selected_tag
local data = t.windowfact or {}
local colfact = data[idx.col] or {}
colfact[idx_above] = wfact_above + factor_delta
colfact[idx_below] = wfact_below - factor_delta
awful.client.incwfact(0, c_above) -- just in case
end
return true
else
return false
end
end, cursor)
local t = c.screen.selected_tag
local data = t.windowfact or {}
local colfact = data[idx.col] or {}
colfact[idx_above] = wfact_above + factor_delta
colfact[idx_below] = wfact_below - factor_delta
awful.client.incwfact(0, c_above) -- just in case
end
return true
else
return false
end
end, cursor)
return true
return true
end
awful.layout.suit.tile.mouse_resize_handler =
function(c) return mouse_resize_handler(function(x) return x end, c) end
awful.layout.suit.tile.bottom.mouse_resize_handler =
function(c)
return mouse_resize_handler(function(q)
return {x = q.y, y = q.x, width = q.height, height = q.width}
end, c)
end
awful.layout.suit.tile.mouse_resize_handler = function(c)
return mouse_resize_handler(function(x)
return x
end, c)
end
awful.layout.suit.tile.bottom.mouse_resize_handler = function(c)
return mouse_resize_handler(function(q)
return { x = q.y, y = q.x, width = q.height, height = q.width }
end, c)
end
-- local old_coords = mouse.coords

View file

@ -0,0 +1,296 @@
local wibox = require("wibox")
local beautiful = require("beautiful")
local awful = require("awful")
local gears = require("gears")
local chel = require("module.dock_helpers").color
local rubato = require("module.rubato")
local dpi = beautiful.xresources.apply_dpi
local function init(s, h, o, shape, pinneds)
--local function init(args)
--[[ if args.screen == nil then return end
-- local s = args.screen
-- local h = args.height or dpi(50)
-- local o = args.offset or 0
-- local shape = args.shape or gears.shape.rectangle
-- local pinneds = args.pinneds or nil]]
-- tasklist creation {{{
local tasklist = awful.widget.tasklist({
screen = s,
source = function()
local ret = {}
for _, t in ipairs(s.tags) do
gears.table.merge(ret, t:clients())
end
return ret
end, --sorts clients in order of their tags
filter = awful.widget.tasklist.filter.alltags,
forced_height = h,
style = {
shape = shape,
},
layout = {
layout = wibox.layout.fixed.horizontal,
},
widget_template = {
{
{
nil,
{
{
awful.widget.clienticon,
widget = wibox.container.place,
halign = "center",
valign = "center",
},
widget = wibox.container.margin,
margins = h / 10,
},
{
{
wibox.widget.base.make_widget(),
forced_height = h / 10,
forced_width = h / 10,
id = "status",
bg = beautiful.dock_focused_bg,
shape = shape,
widget = wibox.container.background,
},
widget = wibox.container.place, --so the bg widget doesnt get stretched
},
layout = wibox.layout.align.vertical,
},
id = "bg",
widget = wibox.container.background,
bg = beautiful.dock_bg,
shape = shape,
},
widget = wibox.container.margin,
margins = h / 10,
forced_height = h,
forced_width = h,
create_callback = function(self, c, _, _)
local function hover(p, t) --so gc can collect all the timed objects that are flying around
local on_hover = rubato.timed({
intro = 0.02,
outro = 0.02,
duration = 0.2,
rate = 30,
pos = p,
subscribed = function(pos)
self:get_children_by_id("bg")[1].bg = chel.col_shift(beautiful.dock_bg, pos)
end,
})
on_hover.target = t
end
self:connect_signal("mouse::enter", function()
hover(0, 20)
end)
self:connect_signal("mouse::leave", function()
hover(20, 0)
end)
self:add_button(awful.button({
modifiers = {},
button = 1,
on_press = function()
if not c.active then
c:activate({
context = "through_dock",
switch_to_tag = true,
})
else
c.minimized = true
end
end,
}))
end,
update_callback = function(self, c, _, _) --praying to the gc that this is getting cleared properly, didnt show problems in testing
collectgarbage("collect")
local status_w = rubato.timed({
intro = 0.02,
outro = 0.02,
duration = 0.1,
rate = 30,
pos = self:get_children_by_id("status")[1].forced_width,
subscribed = function(pos)
self:get_children_by_id("status")[1].forced_width = pos
end,
})
local bg_col = beautiful.dock_focused_bg
local bg_focus_col = beautiful.dock_accent
local sh_r, sh_g, sh_b, _ = chel.col_diff(bg_col, bg_focus_col)
local status_c = rubato.timed({
intro = 0.04,
outro = 0.04,
duration = 0.2,
rate = 30,
pos = 0,
subscribed = function(pos)
self:get_children_by_id("status")[1].bg = chel.col_shift(
bg_col,
math.floor(pos * (255 * sh_r)),
math.floor((sh_g * 255) * pos),
math.floor((sh_b * 255) * pos)
)
end,
})
--this here sets width and colors depending on the status of the client a widget in the tasklist represents
if c.active then
status_w.target = h / 2
status_c.target = 1
elseif c.minimized then
status_w.target = h / 10
status_c.target = 0
else
status_w.target = h / 3
status_c.target = 0
end
end,
},
})
-- }}}
-- the funny desktop starters {{{
local pinned_apps = pinneds and { layout = wibox.layout.fixed.horizontal } or nil
if pinneds then
for _, p in ipairs(pinneds) do
pinned_apps[#pinned_apps + 1] = wibox.widget({
{
{
nil,
{
{
{
widget = wibox.widget.imagebox,
image = p.icon,
resize = true,
},
margins = dpi(5),
widget = wibox.container.margin,
},
widget = wibox.container.place,
halign = "center",
valign = "center",
},
{
{
wibox.widget.base.make_widget(),
forced_height = h / 10,
forced_width = h / 10,
id = "status",
shape = shape,
widget = wibox.container.background,
},
widget = wibox.container.place, --so the bg widget doesnt get stretched
halign = "center",
},
layout = wibox.layout.align.vertical,
},
widget = wibox.container.background,
shape = shape,
id = "bg",
buttons = awful.button({}, 1, function()
awful.spawn.easy_async(p.start_cmd)
end),
},
widget = wibox.container.margin,
margins = h / 10,
forced_width = h,
forced_height = h,
})
local self = pinned_apps[#pinned_apps]
local function hover(po, t) --so gc can collect all the timed objects that are flying around
local on_hover = rubato.timed({
intro = 0.02,
outro = 0.02,
duration = 0.2,
rate = 30,
pos = po,
subscribed = function(pos)
self:get_children_by_id("bg")[1].bg = chel.col_shift(beautiful.dock_bg, pos)
end,
})
on_hover.target = t
end
self:connect_signal("mouse::enter", function()
hover(0, 20)
end)
self:connect_signal("mouse::leave", function()
hover(20, 0)
end)
self:add_button(
awful.button({ --this is very hacky. Please do NOT COPY if you are looking for suggestions on how to implement this
modifiers = {},
button = 1,
on_press = function() end,
})
)
end
end
-- }}}
local dock_box = awful.popup({
ontop = true,
screen = s,
x = s.geometry.x + s.geometry.width / 2,
y = s.geometry.y + s.geometry.height - (h + o),
shape = shape,
widget = {
{
{
{
pinned_apps,
tasklist,
layout = wibox.layout.fixed.horizontal,
},
widget = wibox.container.margin,
margin = dpi(5),
},
widget = wibox.container.background,
bg = beautiful.dock_bg,
shape = shape,
},
widget = wibox.container.place,
halign = "center",
},
})
dock_box:connect_signal("property::width", function() --for centered placement, wanted to keep the offset
dock_box.x = s.geometry.x + s.geometry.width / 2 - dock_box.width / 2
end)
local autohideanim = rubato.timed({
intro = 0.3,
outro = 0.1,
duration = 0.4,
pos = 0,
rate = 60,
easing = rubato.quadratic,
subscribed = function(pos)
dock_box.y = s.geometry.y + s.geometry.height - ((pos * h) + o)
dock_box.opacity = pos
end,
})
local autohidetimer = gears.timer({
timeout = 1,
single_shot = true,
callback = function()
autohideanim.target = 0
end,
})
dock_box:connect_signal("mouse::leave", function()
autohidetimer:again()
end)
dock_box:connect_signal("mouse::enter", function()
autohideanim.target = 1
autohidetimer:stop()
end)
return dock_box
end
return {
init = init,
}

View file

@ -0,0 +1,87 @@
local gears = require("gears")
--typesafe function overloader (copied from lua-users.org) {{{
--source: http://lua-users.org/wiki/OverloadedFunctions
local function overloaded()
local fns = {}
local mt = {}
local function oerror()
return error("Invalid argument types to overloaded function")
end
function mt:__call(...)
local arg = {...}
local default = self.default
local signature = {}
for i,arg in ipairs {...} do
signature[i] = type(arg)
end
signature = table.concat(signature, ",")
return (fns[signature] or self.default)(...)
end
function mt:__index(key)
local signature = {}
local function __newindex(self, key, value)
print(key, type(key), value, type(value))
signature[#signature+1] = key
fns[table.concat(signature, ",")] = value
print("bind", table.concat(signature, ", "))
end
local function __index(self, key)
print("I", key, type(key))
signature[#signature+1] = key
return setmetatable({}, { __index = __index, __newindex = __newindex })
end
return __index(self, key)
end
function mt:__newindex(key, value)
fns[key] = value
end
return setmetatable({ default = oerror }, mt)
end
--}}}
local function dec_hex(IN)
local B,K,OUT,I,D=16,"0123456789ABCDEF","",0
while IN>0 do
I=I+1
IN,D=math.floor(IN/B),(IN%B)+1
OUT=string.sub(K,D,D)..OUT
end
return #OUT == 2 and OUT or "0" .. OUT
end
-- color helpers {{{
local color = {}
color.col_shift = overloaded()
color.col_shift.string.number = function(c, s)
local r,g,b,o = gears.color.parse_color(c)
return "#" .. dec_hex(r*255+s)
.. dec_hex(g*255+s)
.. dec_hex(b*255+s)
.. dec_hex(o*255)
end
color.col_shift.string.number.number.number = function(c,sr,sg,sb)
local r,g,b,o = gears.color.parse_color(c)
return "#" .. dec_hex(r*255+sr)
.. dec_hex(g*255+sg)
.. dec_hex(b*255+sb)
.. dec_hex(o*255)
end
color.col_shift.string.number.number.number.number = function(c,sr,sg,sb,so)
local r,g,b,o = gears.color.parse_color(c)
return "#" .. dec_hex(r*255+sr)
.. dec_hex(g*255+sg)
.. dec_hex(b*255+sb)
.. dec_hex(o*255+so)
end
color.col_diff = function(f, s)
local fr, fg, fb, fo = gears.color.parse_color(f)
local sr, sg, sb, so = gears.color.parse_color(s)
return sr-fr,sg-fg,sb-fb,so-fo
end
--}}}
return {
color = color
}

View file

@ -0,0 +1,185 @@
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local helpers = require("helpers")
local lock_screen = require("module.lockscreen")
lock_screen.init()
-- Icons
local icon_font = "icomoon bold 45"
local poweroff_text_icon = ""
local reboot_text_icon = ""
local suspend_text_icon = ""
local exit_text_icon = ""
local lock_text_icon = ""
local button_bg = beautiful.xbackground
local button_size = dpi(120)
-- Commands
local poweroff_command = function()
awful.spawn.with_shell("systemctl poweroff")
awesome.emit_signal("module::exit_screen:hide")
end
local reboot_command = function()
awful.spawn.with_shell("systemctl reboot")
awesome.emit_signal("module::exit_screen:hide")
end
local suspend_command = function()
awesome.emit_signal("module::exit_screen:hide")
lock_screen_show()
awful.spawn.with_shell("systemctl suspend")
end
local exit_command = function()
awesome.quit()
end
local lock_command = function()
awesome.emit_signal("module::exit_screen:hide")
lock_screen_show()
end
-- Helpers
local create_button = function(symbol, hover_color, text, command)
local icon = wibox.widget({
forced_height = button_size,
forced_width = button_size,
align = "center",
valign = "center",
font = icon_font,
markup = helpers.colorize_text(symbol, beautiful.xforeground .. 55),
widget = wibox.widget.textbox(),
})
local button = wibox.widget({
{
nil,
icon,
expand = "none",
layout = wibox.layout.align.horizontal,
},
forced_height = button_size,
forced_width = button_size,
border_width = dpi(8),
border_color = button_bg,
shape = helpers.rrect(dpi(20)),
bg = button_bg,
widget = wibox.container.background,
})
button:buttons(gears.table.join(awful.button({}, 1, function()
command()
end)))
button:connect_signal("mouse::enter", function()
icon.markup = helpers.colorize_text(icon.text, hover_color)
button.border_color = hover_color
end)
button:connect_signal("mouse::leave", function()
icon.markup = helpers.colorize_text(icon.text, beautiful.xforeground .. 55)
button.border_color = beautiful.widget_border_color
end)
helpers.add_hover_cursor(button, "hand1")
return button
end
-- Create the buttons
local poweroff = create_button(poweroff_text_icon, beautiful.xcolor1, "Poweroff", poweroff_command)
local reboot = create_button(reboot_text_icon, beautiful.xcolor2, "Reboot", reboot_command)
local suspend = create_button(suspend_text_icon, beautiful.xcolor3, "Suspend", suspend_command)
local exit = create_button(exit_text_icon, beautiful.xcolor4, "Exit", exit_command)
local lock = create_button(lock_text_icon, beautiful.xcolor5, "Lock", lock_command)
local create_exit_screen = function(s)
s.exit_screen = wibox({
screen = s,
type = "splash",
visible = false,
ontop = true,
bg = beautiful.transparent,
fg = beautiful.fg_normal,
height = s.geometry.height,
width = s.geometry.width,
x = s.geometry.x,
y = s.geometry.y,
})
s.exit_screen:buttons(gears.table.join(
awful.button({}, 2, function()
awesome.emit_signal("module::exit_screen:hide")
end),
awful.button({}, 3, function()
awesome.emit_signal("module::exit_screen:hide")
end)
))
s.exit_screen:setup({
nil,
{
nil,
{
poweroff,
reboot,
suspend,
exit,
lock,
spacing = dpi(50),
layout = wibox.layout.fixed.horizontal,
},
expand = "none",
layout = wibox.layout.align.horizontal,
},
expand = "none",
layout = wibox.layout.align.vertical,
})
end
screen.connect_signal("request::desktop_decoration", function(s)
create_exit_screen(s)
end)
screen.connect_signal("removed", function(s)
create_exit_screen(s)
end)
local exit_screen_grabber = awful.keygrabber({
auto_start = true,
stop_event = "release",
keypressed_callback = function(self, mod, key, command)
if key == "s" then
suspend_command()
elseif key == "e" then
exit_command()
elseif key == "l" then
lock_command()
elseif key == "p" then
poweroff_command()
elseif key == "r" then
reboot_command()
elseif key == "Escape" or key == "q" or key == "x" then
awesome.emit_signal("module::exit_screen:hide")
end
end,
})
awesome.connect_signal("module::exit_screen:show", function()
for s in screen do
s.exit_screen.visible = false
end
awful.screen.focused().exit_screen.visible = true
exit_screen_grabber:start()
end)
awesome.connect_signal("module::exit_screen:hide", function()
exit_screen_grabber:stop()
for s in screen do
s.exit_screen.visible = false
end
end)

View file

@ -0,0 +1,12 @@
local gears = require("gears")
local dock = require("module.dock")
dock.init(screen.primary, 50, 5, gears.shape.rounded_rect)
require("module.bling")
require("module.rubato")
require("module.layout-machi")
require("module.better-resize")
require("module.exit-screen")
require("module.tooltip")
require("module.savefloats")
require("module.window_switcher").enable()

View file

@ -0,0 +1,18 @@
local awful = require("awful")
local gfs = require("gears.filesystem")
local lock_screen = {}
local config_dir = gfs.get_configuration_dir()
package.cpath = package.cpath .. ";" .. config_dir .. "module/lockscreen/lib/?.so;"
lock_screen.init = function()
local pam = require("liblua_pam")
lock_screen.authenticate = function(password)
return pam.auth_current_user(password)
-- return password == "awesome"
end
require("module.lockscreen.lockscreen")
end
return lock_screen

Binary file not shown.

View file

@ -0,0 +1,410 @@
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
-- Theme handling library
local beautiful = require("beautiful")
-- Widget library
local wibox = require("wibox")
-- Helpers
local helpers = require("helpers")
-- Lock
local lock_screen = require("module.lockscreen")
-- Word Clock Lock Screen
----------------
local lock_screen_symbol = helpers.colorize_text("󰍁", beautiful.accent)
local lock_screen_fail_symbol = helpers.colorize_text("󱙲", beautiful.accent)
local lock_animation_icon = wibox.widget({
-- Set forced size to prevent flickering when the icon rotates
forced_height = dpi(80),
forced_width = dpi(80),
font = beautiful.icon_font_name .. "40",
align = "center",
valign = "center",
widget = wibox.widget.textbox(lock_screen_symbol),
})
local some_textbox = wibox.widget.textbox()
lock_screen_box = wibox({ visible = false, ontop = true, type = "splash", screen = screen.primary })
awful.placement.maximize(lock_screen_box)
lock_screen_box.bg = beautiful.transparent
lock_screen_box.fg = beautiful.xforeground
-- Add lockscreen to each screen
awful.screen.connect_for_each_screen(function(s)
if s == screen.primary then
s.mylockscreen = lock_screen_box
else
s.mylockscreen = helpers.screen_mask(s, beautiful.darker_bg)
end
end)
local function set_visibility(v)
for s in screen do
s.mylockscreen.visible = v
end
end
-- Widgets
-------------
local char =
"I T L I S A S A M P M A C Q U A R T E R D C T W E N T Y F I V E X H A L F S T E N F T O P A S T E R U N I N E O N E S I X T H R E E F O U R F I V E T W O E I G H T E L E V E N S E V E N T W E L V E T E N S E O C L O C K"
local pos_map = {
["it"] = { 1, 2 },
["is"] = { 4, 5 },
["a"] = { 12, 12 },
["quarter"] = { 14, 20 },
["twenty"] = { 23, 28 },
["five"] = { 29, 32 },
["half"] = { 34, 37 },
["ten"] = { 39, 41 },
["past"] = { 45, 48 },
["to"] = { 43, 44 },
["1"] = { 56, 58 },
["2"] = { 75, 77 },
["3"] = { 62, 66 },
["4"] = { 67, 70 },
["5"] = { 71, 74 },
["6"] = { 59, 61 },
["7"] = { 89, 93 },
["8"] = { 78, 82 },
["9"] = { 52, 55 },
["10"] = { 100, 102 },
["11"] = { 83, 88 },
["12"] = { 94, 99 },
["oclock"] = { 105, 110 },
}
local char_map = {
["it"] = {},
["is"] = {},
["a"] = {},
["quarter"] = {},
["twenty"] = {},
["five"] = {},
["half"] = {},
["ten"] = {},
["past"] = {},
["to"] = {},
["1"] = {},
["2"] = {},
["3"] = {},
["4"] = {},
["5"] = {},
["6"] = {},
["7"] = {},
["8"] = {},
["9"] = {},
["10"] = {},
["11"] = {},
["12"] = {},
["oclock"] = {},
}
local reset_map = { 4, 12, 14, 23, 29, 34, 39, 43, 45, 52, 56, 59, 62, 67, 71, 75, 78, 83, 89, 94, 100, 105 }
function split_str(s, delimiter)
result = {}
for match in (s .. delimiter):gmatch("(.-)" .. delimiter) do
table.insert(result, match)
end
return result
end
local time_char = split_str(char, " ")
local time = wibox.widget({
forced_num_cols = 11,
spacing = beautiful.useless_gap,
layout = wibox.layout.grid,
})
local function create_text_widget(index, w)
local text_widget = wibox.widget({
id = "t" .. index,
markup = w,
font = beautiful.font_name .. "bold 18",
align = "center",
valign = "center",
forced_width = dpi(25),
forced_height = dpi(30),
widget = wibox.widget.textbox,
})
time:add(text_widget)
return text_widget
end
local var_count = 0
for i, m in pairs(time_char) do
local text = helpers.colorize_text(m, beautiful.accent .. "55")
var_count = var_count + 1
local create_dummy_text = true
for j, k in pairs(pos_map) do
if i >= pos_map[j][1] and i <= pos_map[j][2] then
char_map[j][var_count] = create_text_widget(i, text)
create_dummy_text = false
end
for _, n in pairs(reset_map) do
if i == n then
var_count = 1
end
end
end
if create_dummy_text then
create_text_widget(i, text)
end
end
local function activate_word(w)
for i, m in pairs(char_map[w]) do
local text = m.text
m.markup = helpers.colorize_text(text, beautiful.accent)
end
end
local function deactivate_word(w)
for i, m in pairs(char_map[w]) do
local text = m.text
m.markup = helpers.colorize_text(text, beautiful.accent .. "55")
end
end
local function reset_time()
for j, k in pairs(char_map) do
deactivate_word(j)
end
activate_word("it")
activate_word("is")
end
gears.timer({
timeout = 1,
call_now = true,
autostart = true,
callback = function()
local time = os.date("%I" .. ":%M")
local h, m = time:match("(%d+):(%d+)")
local min = tonumber(m)
local hour = tonumber(h)
reset_time()
if min >= 0 and min <= 2 or min >= 58 and min <= 59 then
activate_word("oclock")
elseif min >= 3 and min <= 7 or min >= 53 and min <= 57 then
activate_word("five")
elseif min >= 8 and min <= 12 or min >= 48 and min <= 52 then
activate_word("ten")
elseif min >= 13 and min <= 17 or min >= 43 and min <= 47 then
activate_word("a")
activate_word("quarter")
elseif min >= 18 and min <= 22 or min >= 38 and min <= 42 then
activate_word("twenty")
elseif min >= 23 and min <= 27 or min >= 33 and min <= 37 then
activate_word("twenty")
activate_word("five")
elseif min >= 28 and min <= 32 then
activate_word("half")
end
if min >= 3 and min <= 32 then
activate_word("past")
elseif min >= 33 and min <= 57 then
activate_word("to")
end
local hh
if min >= 0 and min <= 30 then
hh = hour
else
hh = hour + 1
end
if hh > 12 then
hh = hh - 12
end
activate_word(tostring(hh))
end,
})
-- Lock animation
local lock_animation_widget_rotate = wibox.container.rotate()
local arc = function()
return function(cr, width, height)
gears.shape.arc(cr, width, height, dpi(5), 0, math.pi / 2, true, true)
end
end
local lock_animation_arc = wibox.widget({
shape = arc(),
bg = "#00000000",
forced_width = dpi(100),
forced_height = dpi(100),
widget = wibox.container.background,
})
local lock_animation = {
{
lock_animation_arc,
widget = lock_animation_widget_rotate,
},
lock_animation_icon,
layout = wibox.layout.stack,
}
-- Lock helper functions
local characters_entered = 0
local function reset()
characters_entered = 0
lock_animation_icon.markup = lock_screen_symbol
lock_animation_widget_rotate.direction = "north"
lock_animation_arc.bg = "#00000000"
end
local function fail()
characters_entered = 0
lock_animation_icon.markup = lock_screen_fail_symbol
lock_animation_widget_rotate.direction = "north"
lock_animation_arc.bg = "#00000000"
end
local animation_colors = {
-- Rainbow sequence =)
beautiful.xcolor1,
beautiful.xcolor5,
beautiful.xcolor4,
beautiful.xcolor6,
beautiful.xcolor2,
beautiful.xcolor3,
}
local animation_directions = { "north", "west", "south", "east" }
-- Function that "animates" every key press
local function key_animation(char_inserted)
local color
local direction = animation_directions[(characters_entered % 4) + 1]
if char_inserted then
color = animation_colors[(characters_entered % 6) + 1]
lock_animation_icon.markup = lock_screen_symbol
else
if characters_entered == 0 then
reset()
else
color = beautiful.accent .. "55"
end
end
lock_animation_arc.bg = color
lock_animation_widget_rotate.direction = direction
end
-- Get input from user
local function grab_password()
awful.prompt.run({
hooks = {
-- Custom escape behaviour: Do not cancel input with Escape
-- Instead, this will just clear any input received so far.
{
{},
"Escape",
function(_)
reset()
grab_password()
end,
},
-- Fix for Control+Delete crashing the keygrabber
{
{ "Control" },
"Delete",
function()
reset()
grab_password()
end,
},
},
keypressed_callback = function(mod, key, cmd)
-- Only count single character keys (thus preventing
-- "Shift", "Escape", etc from triggering the animation)
if #key == 1 then
characters_entered = characters_entered + 1
key_animation(true)
elseif key == "BackSpace" then
if characters_entered > 0 then
characters_entered = characters_entered - 1
end
key_animation(false)
end
end,
exe_callback = function(input)
-- Check input
if lock_screen.authenticate(input) then
-- YAY
reset()
set_visibility(false)
else
-- NAY
fail()
grab_password()
end
end,
textbox = some_textbox,
})
end
function lock_screen_show()
set_visibility(true)
grab_password()
end
lock_screen_box:setup({
-- Horizontal centering
nil,
{
-- Vertical centering
nil,
{
{
{
helpers.vertical_pad(dpi(10)),
time,
lock_animation,
spacing = dpi(50),
layout = wibox.layout.fixed.vertical,
},
bottom = dpi(60),
right = dpi(60),
left = dpi(60),
widget = wibox.container.margin,
},
shape = helpers.rrect(beautiful.border_radius),
bg = beautiful.darker_bg,
widget = wibox.container.background,
},
expand = "none",
layout = wibox.layout.align.vertical,
},
expand = "none",
layout = wibox.layout.align.horizontal,
})

View file

@ -1,43 +1,46 @@
local awful = require("awful")
local function rel(screen, win)
return {
x = (win.x - screen.x) / screen.width,
y = (win.y - screen.y) / screen.height,
width = win.width / screen.width,
aspect = win.height / win.width
}
return {
x = (win.x - screen.x) / screen.width,
y = (win.y - screen.y) / screen.height,
width = win.width / screen.width,
aspect = win.height / win.width,
}
end
local function unrel(s, rel)
return rel and {
x = s.x + s.width * rel.x,
y = s.y + s.height * rel.y,
width = s.width * rel.width,
height = rel.aspect * s.width * rel.width
}
return rel
and {
x = s.x + s.width * rel.x,
y = s.y + s.height * rel.y,
width = s.width * rel.width,
height = rel.aspect * s.width * rel.width,
}
end
local stored = {}
local function forget(c) stored[c] = nil end
local function forget(c)
stored[c] = nil
end
local floating = awful.layout.suit.floating
function remember(c)
if floating == awful.layout.get(c.screen) or c.floating then
stored[c.window] = rel(c.screen.geometry, c:geometry())
end
if floating == awful.layout.get(c.screen) or c.floating then
stored[c.window] = rel(c.screen.geometry, c:geometry())
end
end
function restore(c)
local s = stored[c.window]
if s then
c:geometry(unrel(c.screen.geometry, stored[c.window]))
return true
else
return false
end
local s = stored[c.window]
if s then
c:geometry(unrel(c.screen.geometry, stored[c.window]))
return true
else
return false
end
end
client.connect_signal("manage", remember)
@ -45,11 +48,11 @@ client.connect_signal("property::geometry", remember)
client.connect_signal("unmanage", forget)
tag.connect_signal("property::layout", function(t)
if floating == awful.layout.get(t.screen) then
for _, c in ipairs(t:clients()) do
c:geometry(unrel(t.screen.geometry, stored[c.window]))
end
end
if floating == awful.layout.get(t.screen) then
for _, c in ipairs(t:clients()) do
c:geometry(unrel(t.screen.geometry, stored[c.window]))
end
end
end)
return restore

View file

@ -0,0 +1,226 @@
local gears = require("gears")
local awful = require("awful")
local beautiful = require("beautiful")
local wibox = require("wibox")
local helpers = require("helpers")
local function create_boxed_widget(widget_to_be_boxed, width, height, inner_pad)
local box_container = wibox.container.background()
box_container.bg = beautiful.tooltip_widget_bg
box_container.forced_height = height
box_container.forced_width = width
box_container.shape = helpers.rrect(beautiful.tooltip_box_border_radius)
local inner = dpi(0)
if inner_pad then
inner = beautiful.tooltip_box_margin
end
local boxed_widget = wibox.widget({
-- Add margins
{
-- Add background color
{
-- The actual widget goes here
widget_to_be_boxed,
margins = inner,
widget = wibox.container.margin,
},
widget = box_container,
},
margins = beautiful.tooltip_gap / 2,
color = "#FF000000",
widget = wibox.container.margin,
})
return boxed_widget
end
-- Tooltip widgets
---------------------
awful.screen.connect_for_each_screen(function(s)
-- Battery
-------------
local cute_battery_face = require("ui.widgets.cute-battery-face")
-- Date
----------
local date_day = wibox.widget({
font = beautiful.font_name .. "bold 10",
format = helpers.colorize_text("%A", beautiful.xforeground),
align = "center",
valign = "center",
widget = wibox.widget.textclock,
})
local date_month = wibox.widget({
font = beautiful.font_name .. "bold 14",
format = "%d %B %Y",
align = "center",
valign = "center",
widget = wibox.widget.textclock,
})
local date = wibox.widget({
date_day,
nil,
date_month,
layout = wibox.layout.align.vertical,
})
-- Separator
---------------
local separator = wibox.widget({
{
bg = beautiful.accent,
shape = helpers.rrect(dpi(5)),
forced_width = dpi(3),
widget = wibox.container.background,
},
right = dpi(5),
widget = wibox.container.margin,
})
-- Analog clock
------------------
local analog_clock = require("ui.widgets.analog-clock")
-- Wifi
----------
local wifi_status_icon = wibox.widget({
markup = "󰤫",
font = beautiful.icon_font_name .. "14",
valign = "center",
align = "center",
widget = wibox.widget.textbox,
})
local wifi = wibox.widget({
wifi_status_icon,
forced_width = dpi(30),
forced_height = dpi(30),
bg = beautiful.tooltip_bg,
shape = gears.shape.circle,
widget = wibox.container.background,
})
local wifi_status = false
awesome.connect_signal("signal::network", function(status, ssid)
wifi_status = status
awesome.emit_signal("widget::network")
end)
awesome.connect_signal("widget::network", function()
local w, fill_color
if wifi_status == true then
w = "󰤨"
fill_color = beautiful.xcolor2
else
w = "󰤭"
fill_color = beautiful.xcolor1
end
wifi.shape_border_color = fill_color
wifi_status_icon.markup = helpers.colorize_text(w, fill_color)
end)
-- UpTime
------------
local uptime_label = wibox.widget({
font = beautiful.font_name .. "medium 9",
markup = helpers.colorize_text("Uptime", beautiful.accent),
valign = "center",
widget = wibox.widget.textbox,
})
local uptime_text = wibox.widget({
font = beautiful.font_name .. "bold 13",
markup = helpers.colorize_text("-", beautiful.accent),
valign = "center",
widget = wibox.widget.textbox,
})
awesome.connect_signal("signal::uptime", function(uptime_value)
uptime_text.markup = uptime_value
end)
local uptime_container = wibox.widget({
separator,
{
uptime_label,
nil,
uptime_text,
layout = wibox.layout.align.vertical,
},
{
wifi,
layout = wibox.layout.align.vertical,
},
layout = wibox.layout.align.horizontal,
})
-- Widget
------------
local uptime_boxed = create_boxed_widget(uptime_container, dpi(170), dpi(50), true)
local analog_clock_boxed = create_boxed_widget(analog_clock, dpi(110), dpi(110), true)
-- Tooltip setup
-------------------
s.stats_tooltip = wibox({
type = "dock",
screen = s,
height = beautiful.tooltip_height,
width = beautiful.tooltip_width,
bg = beautiful.transparent,
ontop = true,
visible = false,
})
awful.placement.top_right(s.stats_tooltip, {
margins = {
top = beautiful.useless_gap * 16,
bottom = beautiful.useless_gap * 6,
left = beautiful.useless_gap * 6,
right = beautiful.useless_gap * 6,
},
})
s.stats_tooltip:setup({
{
{
{
{
date,
{
analog_clock_boxed,
nil,
cute_battery_face,
expand = "none",
layout = wibox.layout.fixed.horizontal,
},
layout = wibox.layout.fixed.vertical,
},
layout = wibox.layout.fixed.horizontal,
},
{
uptime_boxed,
layout = wibox.layout.fixed.horizontal,
},
layout = wibox.layout.fixed.vertical,
},
margins = beautiful.tooltip_gap,
widget = wibox.container.margin,
},
shape = helpers.rrect(beautiful.tooltip_border_radius),
bg = beautiful.tooltip_bg,
widget = wibox.container.background,
})
end)
function tooltip_toggle()
local s = awful.screen.focused()
s.stats_tooltip.visible = not s.stats_tooltip.visible
end

View file

@ -0,0 +1,390 @@
local cairo = require("lgi").cairo
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
local helpers = require("helpers")
local window_switcher_first_client -- The client that was focused when the window_switcher was activated
local window_switcher_minimized_clients = {} -- The clients that were minimized when the window switcher was activated
local window_switcher_grabber
local get_num_clients = function()
local minimized_clients_in_tag = 0
local matcher = function(c)
return awful.rules.match(c, {
minimized = true,
skip_taskbar = false,
hidden = false,
first_tag = awful.screen.focused().selected_tag,
})
end
for c in awful.client.iterate(matcher) do
minimized_clients_in_tag = minimized_clients_in_tag + 1
end
return minimized_clients_in_tag + #awful.screen.focused().clients
end
local window_switcher_hide = function(window_switcher_box)
-- Add currently focused client to history
if client.focus then
local window_switcher_last_client = client.focus
awful.client.focus.history.add(window_switcher_last_client)
-- Raise client that was focused originally
-- Then raise last focused client
if window_switcher_first_client and window_switcher_first_client.valid then
window_switcher_first_client:raise()
window_switcher_last_client:raise()
end
end
-- Minimize originally minimized clients
local s = awful.screen.focused()
for _, c in pairs(window_switcher_minimized_clients) do
if c and c.valid and not (client.focus and client.focus == c) then
c.minimized = true
end
end
-- Reset helper table
window_switcher_minimized_clients = {}
-- Resume recording focus history
awful.client.focus.history.enable_tracking()
-- Stop and hide window_switcher
awful.keygrabber.stop(window_switcher_grabber)
window_switcher_box.visible = false
window_switcher_box.widget = nil
collectgarbage("collect")
end
local function draw_widget(
type,
background,
border_width,
border_radius,
border_color,
clients_spacing,
client_icon_horizontal_spacing,
client_width,
client_height,
client_margins,
thumbnail_margins,
thumbnail_scale,
name_margins,
name_valign,
name_forced_width,
name_font,
name_normal_color,
name_focus_color,
icon_valign,
icon_width,
mouse_keys
)
local tasklist_widget = awful.widget.tasklist({
screen = awful.screen.focused(),
filter = awful.widget.tasklist.filter.currenttags,
buttons = mouse_keys,
style = {
font = beautiful.font_name .. "medium 9",
fg_normal = beautiful.xforeground,
fg_focus = beautiful.accent,
},
layout = {
layout = wibox.layout.flex.horizontal,
max_widget_size = dpi(300),
spacing = dpi(10),
},
widget_template = {
widget = wibox.container.background,
bg = beautiful.lighter_bg,
shape = helpers.rrect(beautiful.border_radius),
id = "bg_role",
forced_width = dpi(450),
create_callback = function(self, c, _, __)
local content = gears.surface(c.content)
local cr = cairo.Context(content)
local x, y, w, h = cr:clip_extents()
local img = cairo.ImageSurface.create(cairo.Format.ARGB32, w - x, h - y)
cr = cairo.Context(img)
cr:set_source_surface(content, 0, 0)
cr.operator = cairo.Operator.SOURCE
cr:paint()
self:get_children_by_id("thumbnail")[1].image = gears.surface.load(img)
end,
{
{
{
{
{
horizontal_fit_policy = "auto",
vertical_fit_policy = "auto",
id = "thumbnail",
clip_shape = helpers.rrect(dpi(6)),
widget = wibox.widget.imagebox,
},
margins = dpi(0),
widget = wibox.container.margin,
},
halign = "center",
valign = "center",
widget = wibox.container.place,
},
{
{
{
widget = awful.widget.clienticon,
},
forced_width = dpi(30),
valign = "center",
widget = wibox.container.place,
},
{
{
forced_width = dpi(200),
valign = "center",
id = "text_role",
widget = wibox.widget.textbox,
},
left = dpi(10),
right = dpi(10),
widget = wibox.container.margin,
},
layout = wibox.layout.align.horizontal,
},
layout = wibox.layout.flex.vertical,
},
left = dpi(20),
right = dpi(20),
top = dpi(20),
widget = wibox.container.margin,
},
},
})
return wibox.widget({
{
{
tasklist_widget,
margins = dpi(300),
widget = wibox.container.margin,
},
halign = "center",
content_fill_horizontal = true,
widget = wibox.container.place,
},
bg = "#00000000",
widget = wibox.container.background,
})
end
local enable = function(opts)
local opts = opts or {}
local type = opts.type or "thumbnail"
local background = beautiful.window_switcher_widget_bg or "#00000000"
local border_width = beautiful.window_switcher_widget_border_width or dpi(3)
local border_radius = beautiful.window_switcher_widget_border_radius or dpi(6)
local border_color = beautiful.window_switcher_widget_border_color or "#ffffff"
local clients_spacing = beautiful.window_switcher_clients_spacing or dpi(20)
local client_icon_horizontal_spacing = beautiful.window_switcher_client_icon_horizontal_spacing or dpi(5)
local client_width = beautiful.window_switcher_client_width or dpi(type == "thumbnail" and 150 or 500)
local client_height = beautiful.window_switcher_client_height or dpi(type == "thumbnail" and 250 or 50)
local client_margins = beautiful.window_switcher_client_margins or dpi(10)
local thumbnail_margins = beautiful.window_switcher_thumbnail_margins or dpi(5)
local thumbnail_scale = beautiful.thumbnail_scale or false
local name_margins = beautiful.window_switcher_name_margins or dpi(10)
local name_valign = beautiful.window_switcher_name_valign or "center"
local name_forced_width = beautiful.window_switcher_name_forced_width or dpi(type == "thumbnail" and 200 or 550)
local name_font = beautiful.window_switcher_name_font or beautiful.font_name .. "medium 10"
local name_normal_color = beautiful.window_switcher_name_normal_color or beautiful.xforeground
local name_focus_color = beautiful.window_switcher_name_focus_color or beautiful.accent
local icon_valign = beautiful.window_switcher_icon_valign or "center"
local icon_width = beautiful.window_switcher_icon_width or dpi(40)
local hide_window_switcher_key = opts.hide_window_switcher_key or "Escape"
local select_client_key = opts.select_client_key or 1
local minimize_key = opts.minimize_key or "n"
local unminimize_key = opts.unminimize_key or "N"
local kill_client_key = opts.kill_client_key or "q"
local cycle_key = opts.cycle_key or "Tab"
local previous_key = opts.previous_key or "Left"
local next_key = opts.next_key or "Right"
local vim_previous_key = opts.vim_previous_key or "h"
local vim_next_key = opts.vim_next_key or "l"
local scroll_previous_key = opts.scroll_previous_key or 4
local scroll_next_key = opts.scroll_next_key or 5
local window_switcher_box = wibox({
bg = "#00000000",
visible = false,
ontop = true,
type = "splash",
screen = awful.screen.focused(),
widget = wibox.container.background, -- A dummy widget to make awful.popup not scream
widget = {
{
draw_widget(),
margins = dpi(10),
widget = wibox.container.margin,
},
shape_border_width = beautiful.widget_border_width,
shape_border_color = beautiful.widget_border_color,
bg = "#00000000",
shape = helpers.rrect(dpi(6)),
widget = wibox.container.background,
},
})
awful.placement.maximize(window_switcher_box)
local mouse_keys = gears.table.join(
awful.button({
modifiers = { "Any" },
button = select_client_key,
on_press = function(c)
client.focus = c
end,
}),
awful.button({
modifiers = { "Any" },
button = scroll_previous_key,
on_press = function()
awful.client.focus.byidx(-1)
end,
}),
awful.button({
modifiers = { "Any" },
button = scroll_next_key,
on_press = function()
awful.client.focus.byidx(1)
end,
})
)
local keyboard_keys = {
[hide_window_switcher_key] = function()
window_switcher_hide(window_switcher_box)
end,
[minimize_key] = function()
if client.focus then
client.focus.minimized = true
end
end,
[unminimize_key] = function()
if awful.client.restore() then
client.focus = awful.client.restore()
end
end,
[kill_client_key] = function()
if client.focus then
client.focus:kill()
end
end,
[cycle_key] = function()
awful.client.focus.byidx(1)
end,
[previous_key] = function()
awful.client.focus.byidx(1)
end,
[next_key] = function()
awful.client.focus.byidx(-1)
end,
[vim_previous_key] = function()
awful.client.focus.byidx(1)
end,
[vim_next_key] = function()
awful.client.focus.byidx(-1)
end,
}
window_switcher_box:connect_signal("property::width", function()
if window_switcher_box.visible and get_num_clients() == 0 then
window_switcher_hide(window_switcher_box)
end
end)
window_switcher_box:connect_signal("property::height", function()
if window_switcher_box.visible and get_num_clients() == 0 then
window_switcher_hide(window_switcher_box)
end
end)
awesome.connect_signal("bling::window_switcher::turn_on", function()
local number_of_clients = get_num_clients()
if number_of_clients == 0 then
return
end
-- Store client that is focused in a variable
window_switcher_first_client = client.focus
-- Stop recording focus history
awful.client.focus.history.disable_tracking()
-- Go to previously focused client (in the tag)
awful.client.focus.history.previous()
-- Track minimized clients
-- Unminimize them
-- Lower them so that they are always below other
-- originally unminimized windows
local clients = awful.screen.focused().selected_tag:clients()
for _, c in pairs(clients) do
if c.minimized then
table.insert(window_switcher_minimized_clients, c)
c.minimized = false
c:lower()
end
end
-- Start the keygrabber
window_switcher_grabber = awful.keygrabber.run(function(_, key, event)
if event == "release" then
-- Hide if the modifier was released
-- We try to match Super or Alt or Control since we do not know which keybind is
-- used to activate the window switcher (the keybind is set by the user in keys.lua)
if key:match("Super") or key:match("Alt") or key:match("Control") then
window_switcher_hide(window_switcher_box)
end
-- Do nothing
return
end
-- Run function attached to key, if it exists
if keyboard_keys[key] then
keyboard_keys[key]()
end
end)
window_switcher_box.widget = draw_widget(
type,
background,
border_width,
border_radius,
border_color,
clients_spacing,
client_icon_horizontal_spacing,
client_width,
client_height,
client_margins,
thumbnail_margins,
thumbnail_scale,
name_margins,
name_valign,
name_forced_width,
name_font,
name_normal_color,
name_focus_color,
icon_valign,
icon_width,
mouse_keys
)
window_switcher_box.visible = true
end)
end
return { enable = enable }

View file

@ -1,51 +1,60 @@
pcall(require, "luarocks.loader")
--[[
_____ __ _ __ _____ _____ _____ _______ _____
| | | | | ___| ___| | | ___|
| - | | | | ___|___ | | | | | | ___|
|__|__|_______|_____|_____|_____|__|_|__|_____|
~ AestheticArch ~
rxyhn
============== @author rxyhn ==================
======== https://github.com/rxyhn =============
--]]
pcall(require, "luarocks.loader")
-- Standard awesome library
local gfs = require("gears.filesystem")
local awful = require("awful")
-- Theme handling library
local beautiful = require("beautiful")
dpi = beautiful.xresources.apply_dpi
beautiful.init(gfs.get_configuration_dir() .. "theme/theme.lua")
-- Default Applications
-- 🎨 Themes
themes = {
"day", -- [1] 🌕 Beautiful Light Colorscheme
"night", -- [2] 🌑 Aesthetic Dark Colorscheme
}
theme = themes[2]
-- ===================================================================
-- 🌊 Default Applications
terminal = "kitty"
editor = "emacs -nw"
vscode = "emacs -nw"
editor = "nvim"
vscode = "code"
browser = "firefox"
launcher = "rofi -show drun -theme " .. os.getenv("HOME") .. "/.config/awesome/theme/rofi.rasi"
web_search_cmd = "xdg-open https://google.com/search?q="
file_manager = "nautilus"
music_client = "kitty --class music byobu"
music_client = terminal .. " --class music -e ncmpcpp"
-- Weather API
-- 🌏 Weather API
openweathermap_key = "" -- API Key
openweathermap_city_id = "" -- City ID
weather_units = "metric" -- Unit
-- Global Vars
weather_units = "metric"
-- ===================================================================
-- 📚 Library
local gfs = require("gears.filesystem")
local awful = require("awful")
local beautiful = require("beautiful")
dpi = beautiful.xresources.apply_dpi
-- ===================================================================
-- 🌟 Load theme
local theme_dir = gfs.get_configuration_dir() .. "theme/" .. theme .. "/"
beautiful.init(theme_dir .. "theme.lua")
-- ===================================================================
-- 🖥 Get screen geometry
screen_width = awful.screen.focused().geometry.width
screen_height = awful.screen.focused().geometry.height
-- Autostart
-- ===================================================================
-- 🚀 Launch Autostart
awful.spawn.with_shell(gfs.get_configuration_dir() .. "configuration/autostart")
-- Import Configuration
-- ===================================================================
-- 🤖 Import Configuration & module
require("configuration")
-- Import Daemons and Widgets
require("module")
-- ===================================================================
-- ✨ Import Daemons, UI & Widgets
require("signal")
require("ui")
-- Garbage Collector Settings
-- ===================================================================
-- 🗑 Garbage Collector Settings
collectgarbage("setpause", 110)
collectgarbage("setstepmul", 1000)

View file

@ -18,42 +18,51 @@ local charger_script = [[
-- First get battery file path
-- If there are multiple, only get the first one
-- TODO support multiple batteries
awful.spawn.easy_async_with_shell("sh -c 'out=\"$(find /sys/class/power_supply/BAT?/capacity)\" && (echo \"$out\" | head -1) || false' ", function (battery_file, _, __, exit_code)
-- No battery file found
if not (exit_code == 0) then
return
end
-- Periodically get battery info
awful.widget.watch("cat "..battery_file, update_interval, function(_, stdout)
-- awful.widget.watch("check-battery", update_interval, function(_, stdout)
awesome.emit_signal("signal::battery", tonumber(stdout))
end)
end)
awful.spawn.easy_async_with_shell(
'sh -c \'out="$(find /sys/class/power_supply/BAT?/capacity)" && (echo "$out" | head -1) || false\' ',
function(battery_file, _, __, exit_code)
-- No battery file found
if not (exit_code == 0) then
return
end
-- Periodically get battery info
awful.widget.watch("cat " .. battery_file, update_interval, function(_, stdout)
-- awful.widget.watch("check-battery", update_interval, function(_, stdout)
awesome.emit_signal("signal::battery", tonumber(stdout))
end)
end
)
-- First get charger file path
awful.spawn.easy_async_with_shell("sh -c 'out=\"$(find /sys/class/power_supply/*/online)\" && (echo \"$out\" | head -1) || false' ", function (charger_file, _, __, exit_code)
-- No charger file found
if not (exit_code == 0) then
return
end
-- Then initialize function that emits charger info
local emit_charger_info = function()
awful.spawn.easy_async_with_shell("cat "..charger_file, function (out)
local status = tonumber(out) == 1
awesome.emit_signal("signal::charger", status)
end)
end
awful.spawn.easy_async_with_shell(
'sh -c \'out="$(find /sys/class/power_supply/*/online)" && (echo "$out" | head -1) || false\' ',
function(charger_file, _, __, exit_code)
-- No charger file found
if not (exit_code == 0) then
return
end
-- Then initialize function that emits charger info
local emit_charger_info = function()
awful.spawn.easy_async_with_shell("cat " .. charger_file, function(out)
local status = tonumber(out) == 1
awesome.emit_signal("signal::charger", status)
end)
end
-- Run once to initialize widgets
emit_charger_info()
-- Run once to initialize widgets
emit_charger_info()
-- Kill old acpi_listen process
awful.spawn.easy_async_with_shell("ps x | grep \"acpi_listen\" | grep -v grep | awk '{print $1}' | xargs kill", function ()
-- Update charger status with each line printed
awful.spawn.with_line_callback(charger_script, {
stdout = function(_)
emit_charger_info()
end
})
end)
end)
-- Kill old acpi_listen process
awful.spawn.easy_async_with_shell(
"ps x | grep \"acpi_listen\" | grep -v grep | awk '{print $1}' | xargs kill",
function()
-- Update charger status with each line printed
awful.spawn.with_line_callback(charger_script, {
stdout = function(_)
emit_charger_info()
end,
})
end
)
end
)

View file

@ -16,23 +16,26 @@ local brightness_script = [[
"]]
local emit_brightness_info = function()
awful.spawn.with_line_callback(brightness_script, {
stdout = function(line)
percentage = math.floor(tonumber(line))
awesome.emit_signal("signal::brightness", percentage)
end
})
awful.spawn.with_line_callback(brightness_script, {
stdout = function(line)
percentage = math.floor(tonumber(line))
awesome.emit_signal("signal::brightness", percentage)
end,
})
end
-- Run once to initialize widgets
emit_brightness_info()
-- Kill old inotifywait process
awful.spawn.easy_async_with_shell("ps x | grep \"inotifywait -e modify /sys/class/backlight\" | grep -v grep | awk '{print $1}' | xargs kill", function ()
-- Update brightness status with each line printed
awful.spawn.with_line_callback(brightness_subscribe_script, {
stdout = function(_)
emit_brightness_info()
end
})
end)
awful.spawn.easy_async_with_shell(
"ps x | grep \"inotifywait -e modify /sys/class/backlight\" | grep -v grep | awk '{print $1}' | xargs kill",
function()
-- Update brightness status with each line printed
awful.spawn.with_line_callback(brightness_subscribe_script, {
stdout = function(_)
emit_brightness_info()
end,
})
end
)

View file

@ -11,8 +11,8 @@ local cpu_idle_script = [[
-- Periodically get cpu info
awful.widget.watch(cpu_idle_script, update_interval, function(widget, stdout)
-- local cpu_idle = stdout:match('+(.*)%.%d...(.*)%(')
local cpu_idle = stdout
cpu_idle = string.gsub(cpu_idle, '^%s*(.-)%s*$', '%1')
awesome.emit_signal("signal::cpu", 100 - tonumber(cpu_idle))
-- local cpu_idle = stdout:match('+(.*)%.%d...(.*)%(')
local cpu_idle = stdout
cpu_idle = string.gsub(cpu_idle, "^%s*(.-)%s*$", "%1")
awesome.emit_signal("signal::cpu", 100 - tonumber(cpu_idle))
end)

View file

@ -10,16 +10,16 @@ local update_interval = 180 -- every 3 minutes
-- Use /dev/sdxY according to your setup
local disk_script = [[
bash -c "
df -kH -B 1MB /dev/sda7 | tail -1 | awk '{printf \"%d@%d\", $4, $3}'
df -kH -B 1MB /dev/sda3 | tail -1 | awk '{printf \"%d@%d\", $4, $3}'
"
]]
-- Periodically get disk space info
awful.widget.watch(disk_script, update_interval, function(_, stdout)
-- Get `available` and `used` instead of `used` and `total`,
-- since the total size reported by the `df` command includes
-- the 5% storage reserved for `root`, which is misleading.
local available = tonumber(stdout:match('^(.*)@')) / 1000
local used = tonumber(stdout:match('@(.*)$')) / 1000
awesome.emit_signal("signal::disk", used, used + available)
-- Get `available` and `used` instead of `used` and `total`,
-- since the total size reported by the `df` command includes
-- the 5% storage reserved for `root`, which is misleading.
local available = tonumber(stdout:match("^(.*)@")) / 1000
local used = tonumber(stdout:match("@(.*)$")) / 1000
awesome.emit_signal("signal::disk", used, used + available)
end)

View file

@ -1,8 +1,11 @@
require("signal.battery")
require("signal.brightness")
require("signal.volume")
require("signal.cpu")
require("signal.ram")
require("signal.weather")
require("signal.disk")
require("signal.network")
require("signal.playerctl")
require("signal.ram")
require("signal.todo")
require("signal.uptime")
require("signal.volume")
require("signal.weather")

View file

@ -13,15 +13,14 @@ local network_script = [[
-- Periodically get cpu info
awful.widget.watch(network_script, update_interval, function(_, stdout)
-- local network = stdout:match('+(.*)%.%d...(.*)%(')
local net_ssid = stdout
local net_status = true
-- local network = stdout:match('+(.*)%.%d...(.*)%(')
local net_ssid = stdout
local net_status = true
if net_ssid == "" then
net_status = false
end
if net_ssid == "" then
net_status = false
end
net_ssid = string.gsub(net_ssid, '^%s*(.-)%s*$', '%1')
awesome.emit_signal("signal::network", net_status, net_ssid)
net_ssid = string.gsub(net_ssid, "^%s*(.-)%s*$", "%1")
awesome.emit_signal("signal::network", net_status, net_ssid)
end)

View file

@ -5,12 +5,12 @@ local naughty = require("naughty")
local playerctl = require("module.bling").signal.playerctl.lib()
playerctl:connect_signal("metadata", function(_, title, artist, album_path, album, new, player_name)
if new == true then
naughty.notify ({
app_name = 'Music',
title = title,
text = artist,
image = album_path
})
end
if new == true then
naughty.notify({
app_name = "Music",
title = title,
text = artist,
image = album_path,
})
end
end)

View file

@ -16,8 +16,8 @@ local ram_script = [[
-- Periodically get ram info
awful.widget.watch(ram_script, update_interval, function(widget, stdout)
local available = stdout:match('(.*)@@')
local total = stdout:match('@@(.*)@')
local used = tonumber(total) - tonumber(available)
awesome.emit_signal("signal::ram", used, tonumber(total))
local available = stdout:match("(.*)@@")
local total = stdout:match("@@(.*)@")
local used = tonumber(total) - tonumber(available)
awesome.emit_signal("signal::ram", used, tonumber(total))
end)

View file

@ -5,7 +5,7 @@
-- undone (integer)
local awful = require("awful")
local todo_file_path = os.getenv("TODO_PATH")
local todo_file_path = "~/.config/awesome/"
-- Subscribe to todo changes
-- Requires inotify-tools
@ -23,26 +23,28 @@ local todo_script = [[
"]]
local emit_todo_info = function()
awful.spawn.with_line_callback(todo_script, {
stdout = function(line)
local done = tonumber(line:match('(.*)@@'))
local undone = tonumber(line:match('@@(.*)'))
local total = undone + done
awesome.emit_signal("signal::todo", total, done, undone)
end
})
awful.spawn.with_line_callback(todo_script, {
stdout = function(line)
local done = tonumber(line:match("(.*)@@"))
local undone = tonumber(line:match("@@(.*)"))
local total = undone + done
awesome.emit_signal("signal::todo", total, done, undone)
end,
})
end
-- Run once to initialize widgets
emit_todo_info()
-- Kill old inotifywait process
awful.spawn.easy_async_with_shell("ps x | grep \"inotifywait -e modify " .. todo_file_path .. "\" | grep -v grep | awk '{print $1}' | xargs kill", function ()
-- Update todo status with each line printed
awful.spawn.with_line_callback(todo_subscribe_script, {
stdout = function(_)
emit_todo_info()
end
})
end)
awful.spawn.easy_async_with_shell(
'ps x | grep "inotifywait -e modify ' .. todo_file_path .. "\" | grep -v grep | awk '{print $1}' | xargs kill",
function()
-- Update todo status with each line printed
awful.spawn.with_line_callback(todo_subscribe_script, {
stdout = function(_)
emit_todo_info()
end,
})
end
)

View file

@ -40,9 +40,8 @@ local update_interval = 60
-- Periodically get uptime info
awful.widget.watch(uptime_script, update_interval, function(_, stdout)
local uptime_value = stdout
local uptime_value = stdout
uptime_value = string.gsub(uptime_value, '^%s*(.-)%s*$', '%1')
awesome.emit_signal("signal::uptime", uptime_value)
uptime_value = string.gsub(uptime_value, "^%s*(.-)%s*$", "%1")
awesome.emit_signal("signal::uptime", uptime_value)
end)

View file

@ -7,30 +7,31 @@ local awful = require("awful")
local volume_old = -1
local muted_old = -1
local function emit_volume_info()
-- Get volume info of the currently active sink
-- The currently active sink has a star `*` in front of its index
-- In the output of `pacmd list-sinks`, lines +7 and +11 after "* index:"
-- contain the volume level and muted state respectively
-- This is why we are using `awk` to print them.
awful.spawn.easy_async_with_shell(
"pacmd list-sinks | awk '/\\* index: /{nr[NR+7];nr[NR+11]}; NR in nr'",
function(stdout)
local volume = stdout:match('(%d+)%% /')
local muted = stdout:match('muted:(%s+)[yes]')
local muted_int = muted and 1 or 0
local volume_int = tonumber(volume)
-- Only send signal if there was a change
-- We need this since we use `pactl subscribe` to detect
-- volume events. These are not only triggered when the
-- user adjusts the volume through a keybind, but also
-- through `pavucontrol` or even without user intervention,
-- when a media file starts playing.
if volume_int ~= volume_old or muted_int ~= muted_old then
awesome.emit_signal("signal::volume", volume_int, muted)
volume_old = volume_int
muted_old = muted_int
end
end)
-- Get volume info of the currently active sink
-- The currently active sink has a star `*` in front of its index
-- In the output of `pacmd list-sinks`, lines +7 and +11 after "* index:"
-- contain the volume level and muted state respectively
-- This is why we are using `awk` to print them.
awful.spawn.easy_async_with_shell(
"pacmd list-sinks | awk '/\\* index: /{nr[NR+7];nr[NR+11]}; NR in nr'",
function(stdout)
local volume = stdout:match("(%d+)%% /")
local muted = stdout:match("muted:(%s+)[yes]")
local muted_int = muted and 1 or 0
local volume_int = tonumber(volume)
-- Only send signal if there was a change
-- We need this since we use `pactl subscribe` to detect
-- volume events. These are not only triggered when the
-- user adjusts the volume through a keybind, but also
-- through `pavucontrol` or even without user intervention,
-- when a media file starts playing.
if volume_int ~= volume_old or muted_int ~= muted_old then
awesome.emit_signal("signal::volume", volume_int, muted)
volume_old = volume_int
muted_old = muted_int
end
end
)
end
-- Run once to initialize widgets
@ -42,15 +43,18 @@ local volume_script = [[
LANG=C pactl subscribe 2> /dev/null | grep --line-buffered \"Event 'change' on sink #\"
"]]
-- Kill old pactl subscribe processes
awful.spawn.easy_async({
"pkill", "--full", "--uid", os.getenv("USER"), "^pactl subscribe"
}, function ()
-- Run emit_volume_info() with each line printed
awful.spawn.with_line_callback(volume_script, {
stdout = function(line) emit_volume_info() end
})
"pkill",
"--full",
"--uid",
os.getenv("USER"),
"^pactl subscribe",
}, function()
-- Run emit_volume_info() with each line printed
awful.spawn.with_line_callback(volume_script, {
stdout = function(line)
emit_volume_info()
end,
})
end)

View file

@ -13,7 +13,7 @@ local city_id = openweathermap_city_id
local units = weather_units
-- Don't update too often, because your requests might get blocked for 24 hours
local update_interval = 1200
local temp_file = "/tmp/awesomewm-signal-weather-"..city_id.."-"..units
local temp_file = "/tmp/awesomewm-signal-weather-" .. city_id .. "-" .. units
local sun_icon = ""
local moon_icon = ""
@ -27,34 +27,34 @@ local mist_icon = ""
local whatever_icon = ""
local weather_icons = {
["01d"] = { icon = sun_icon, color = beautiful.xcolor3 },
["01n"] = { icon = moon_icon, color = beautiful.xcolor4 },
["02d"] = { icon = dcloud_icon, color = beautiful.xcolor3 },
["02n"] = { icon = ncloud_icon, color = beautiful.xcolor6 },
["03d"] = { icon = cloud_icon, color = beautiful.xforeground },
["03n"] = { icon = cloud_icon, color = beautiful.xforeground },
["04d"] = { icon = cloud_icon, color = beautiful.xforeground },
["04n"] = { icon = cloud_icon, color = beautiful.xforeground },
["09d"] = { icon = rain_icon, color = beautiful.xcolor4 },
["09n"] = { icon = rain_icon, color = beautiful.xcolor4 },
["10d"] = { icon = rain_icon, color = beautiful.xcolor4 },
["10n"] = { icon = rain_icon, color = beautiful.xcolor4 },
["11d"] = { icon = storm_icon, color = beautiful.xforeground },
["11n"] = { icon = storm_icon, color = beautiful.xforeground },
["13d"] = { icon = snow_icon, color = beautiful.xcolor6 },
["13n"] = { icon = snow_icon, color = beautiful.xcolor6 },
["40d"] = { icon = mist_icon, color = beautiful.xcolor5 },
["40n"] = { icon = mist_icon, color = beautiful.xcolor5 },
["50d"] = { icon = mist_icon, color = beautiful.xcolor5 },
["50n"] = { icon = mist_icon, color = beautiful.xcolor5 },
["_"] = { icon = whatever_icon, color = beautiful.xcolor2 },
["01d"] = { icon = sun_icon, color = beautiful.xcolor3 },
["01n"] = { icon = moon_icon, color = beautiful.xcolor4 },
["02d"] = { icon = dcloud_icon, color = beautiful.xcolor3 },
["02n"] = { icon = ncloud_icon, color = beautiful.xcolor6 },
["03d"] = { icon = cloud_icon, color = beautiful.xforeground },
["03n"] = { icon = cloud_icon, color = beautiful.xforeground },
["04d"] = { icon = cloud_icon, color = beautiful.xforeground },
["04n"] = { icon = cloud_icon, color = beautiful.xforeground },
["09d"] = { icon = rain_icon, color = beautiful.xcolor4 },
["09n"] = { icon = rain_icon, color = beautiful.xcolor4 },
["10d"] = { icon = rain_icon, color = beautiful.xcolor4 },
["10n"] = { icon = rain_icon, color = beautiful.xcolor4 },
["11d"] = { icon = storm_icon, color = beautiful.xforeground },
["11n"] = { icon = storm_icon, color = beautiful.xforeground },
["13d"] = { icon = snow_icon, color = beautiful.xcolor6 },
["13n"] = { icon = snow_icon, color = beautiful.xcolor6 },
["40d"] = { icon = mist_icon, color = beautiful.xcolor5 },
["40n"] = { icon = mist_icon, color = beautiful.xcolor5 },
["50d"] = { icon = mist_icon, color = beautiful.xcolor5 },
["50n"] = { icon = mist_icon, color = beautiful.xcolor5 },
["_"] = { icon = whatever_icon, color = beautiful.xcolor2 },
}
local weather_details_script = [[
bash -c '
KEY="]]..key..[["
CITY="]]..city_id..[["
UNITS="]]..units..[["
KEY="]] .. key .. [["
CITY="]] .. city_id .. [["
UNITS="]] .. units .. [["
weather=$(curl -sf "http://api.openweathermap.org/data/2.5/weather?APPID=$KEY&id=$CITY&units=$UNITS")
@ -70,31 +70,30 @@ local weather_details_script = [[
']]
helpers.remote_watch(weather_details_script, update_interval, temp_file, function(stdout)
local icon_code = string.sub(stdout, 1, 3)
local weather_details = string.sub(stdout, 5)
weather_details = string.gsub(weather_details, '^%s*(.-)%s*$', '%1')
-- Replace "-0" with "0" degrees
weather_details = string.gsub(weather_details, '%-0', '0')
-- Capitalize first letter of the description
weather_details = weather_details:sub(1,1):upper()..weather_details:sub(2)
local description = weather_details:match('(.*)@@')
local temperature = weather_details:match('@@(.*)')
local icon
local color
local weather_icon
local icon_code = string.sub(stdout, 1, 3)
local weather_details = string.sub(stdout, 5)
weather_details = string.gsub(weather_details, "^%s*(.-)%s*$", "%1")
-- Replace "-0" with "0" degrees
weather_details = string.gsub(weather_details, "%-0", "0")
-- Capitalize first letter of the description
weather_details = weather_details:sub(1, 1):upper() .. weather_details:sub(2)
local description = weather_details:match("(.*)@@")
local temperature = weather_details:match("@@(.*)")
local icon
local color
local weather_icon
if icon_code == "..." then
-- Remove temp_file to force an update the next time
awful.spawn.with_shell("rm "..temp_file)
icon = weather_icons['_'].icon
color = weather_icons['_'].color
weather_icon = helpers.colorize_text(icon, color)
awesome.emit_signal("signal::weather", 999, "Weather unavailable", weather_icon)
else
icon = weather_icons[icon_code].icon
color = weather_icons[icon_code].color
weather_icon = helpers.colorize_text(icon, color)
awesome.emit_signal("signal::weather", tonumber(temperature), description, weather_icon)
end
if icon_code == "..." then
-- Remove temp_file to force an update the next time
awful.spawn.with_shell("rm " .. temp_file)
icon = weather_icons["_"].icon
color = weather_icons["_"].color
weather_icon = helpers.colorize_text(icon, color)
awesome.emit_signal("signal::weather", 999, "Weather unavailable", weather_icon)
else
icon = weather_icons[icon_code].icon
color = weather_icons[icon_code].color
weather_icon = helpers.colorize_text(icon, color)
awesome.emit_signal("signal::weather", tonumber(temperature), description, weather_icon)
end
end)

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="138pt" height="138pt" viewBox="0 0 138 138" version="1.1">
<defs>
<image id="image6" width="575" height="575" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAj8AAAI/CAYAAACYrLg3AAAABmJLR0QA/wD/AP+gvaeTAAAKbUlEQVR4nO3ZMWpVURhG0XPlOQAlWDoBRyA4i6diYTIAY2o7MZ1gaUYQERszhwwkVlqa1kKC18ZaBSVHs9eCW9+vOmz4l+3u03UAAPyhZRmH74+PXsze8SvXZg8AALhM4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEjZnH/cuT57BEDdzdufHy7reDt7BxRsTk9fXMweAVC3fbx/MZZl9gxIcPYCAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgJTN/d39R7NHANStY9ydvQEqNutY3s0eAQBwWZy9AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApGxmD4C/4OsY49PsETDRjR8f8BvED1fB2cmbozuzR8As292DwzHW57N3wP/C2QsASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJCymT0A/tQ6llvbvYOXs3fAGOP85Pj1q9kjgJ8TP/z3lrHujHU8m70DxhhnYwzxA/84Zy8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBlsyzjcPYIgCthHV8e7D25d+m/XcaHsXrL+Qd8G6ezJwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwxXwHRgAynlp5OKEAAAAASUVORK5CYII="/>
</defs>
<g id="surface2">
<use xlink:href="#image6" transform="matrix(0.24,0,0,0.24,0,0)"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.1 KiB

View file

@ -0,0 +1,119 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
width="135.46667mm"
height="135.46666mm"
viewBox="0 0 135.46668 135.46666"
version="1.1"
id="svg8">
<defs
id="defs2" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
transform="translate(-20.39957,-63.899563)">
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:20.1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1;opacity:1"
d="M 50.568359 78.638672 C 42.116879 78.638672 35.138672 85.616879 35.138672 94.068359 L 35.138672 169.19727 C 35.138672 177.64875 42.116879 184.62891 50.568359 184.62891 L 125.69727 184.62891 C 134.14875 184.62891 141.12891 177.64875 141.12891 169.19727 L 141.12891 94.068359 C 141.12891 85.616879 134.14875 78.638672 125.69727 78.638672 L 50.568359 78.638672 z M 50.568359 89.845703 L 125.69727 89.845703 C 128.13295 89.845703 129.91992 91.632673 129.91992 94.068359 L 129.91992 169.19727 C 129.91992 171.63295 128.13295 173.41992 125.69727 173.41992 L 50.568359 173.41992 C 48.132673 173.41992 46.345703 171.63295 46.345703 169.19727 L 46.345703 94.068359 C 46.345703 91.632673 48.132673 89.845703 50.568359 89.845703 z "
id="rect841" />
<path
id="path29116"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6.05197;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:20.1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000"
d="M 172.57617 0.00390625 C 167.67701 0.00390625 163.25547 0.046599262 160.03516 0.12109375 C 158.425 0.15851107 157.12345 0.20178656 156.17383 0.25390625 C 155.69902 0.27998499 155.31958 0.30214963 154.9707 0.34179688 C 154.79628 0.36145042 154.64828 0.37637281 154.37305 0.43945312 C 154.23543 0.4708232 154.08019 0.49321452 153.7168 0.66015625 C 153.62594 0.70188223 153.52132 0.75784023 153.39062 0.83789062 C 153.25993 0.91797881 152.91988 1.1974802 152.91797 1.1992188 C 152.91606 1.2009725 152.29979 1.9806644 152.29883 1.9824219 C 152.29787 1.9841831 151.92969 3.4337818 151.92969 3.4355469 L 151.92969 67.539062 C 151.92969 67.540828 152.29785 68.984567 152.29883 68.986328 C 152.29979 68.988086 152.91606 69.77559 152.91797 69.777344 C 152.91988 69.779097 153.25993 70.050771 153.39062 70.130859 C 153.52132 70.210948 153.62594 70.266868 153.7168 70.308594 C 154.0802 70.475535 154.23542 70.497776 154.37305 70.529297 C 154.64831 70.592377 154.79626 70.605157 154.9707 70.625 C 155.31959 70.664647 155.69902 70.694662 156.17383 70.720703 C 157.12345 70.772823 158.425 70.816249 160.03516 70.853516 C 163.25547 70.928048 167.67701 70.972656 172.57617 70.972656 C 177.47534 70.972656 181.89883 70.928048 185.11914 70.853516 C 186.7293 70.816098 188.0289 70.772823 188.97852 70.720703 C 189.45332 70.694624 189.83471 70.664647 190.18359 70.625 C 190.35802 70.605346 190.50601 70.592377 190.78125 70.529297 C 190.91886 70.497927 191.07411 70.475535 191.4375 70.308594 C 191.52836 70.266868 191.63102 70.21091 191.76172 70.130859 C 191.89241 70.050771 192.23247 69.779082 192.23438 69.777344 C 192.23628 69.77559 192.85451 68.988086 192.85547 68.986328 C 192.85642 68.984567 193.22461 67.540828 193.22461 67.539062 L 193.22461 3.4355469 C 193.22461 3.4337818 192.85645 1.9841831 192.85547 1.9824219 C 192.85451 1.9806644 192.23628 1.2009725 192.23438 1.1992188 C 192.23247 1.197465 191.89241 0.91794102 191.76172 0.83789062 C 191.63102 0.75780244 191.52836 0.70188223 191.4375 0.66015625 C 191.0741 0.49321452 190.91887 0.47097438 190.78125 0.43945312 C 190.50599 0.37637281 190.35803 0.36163939 190.18359 0.34179688 C 189.83471 0.30214963 189.45332 0.27998499 188.97852 0.25390625 C 188.0289 0.20178656 186.7293 0.15835989 185.11914 0.12109375 C 181.89883 0.046599262 177.47534 0.00390625 172.57617 0.00390625 z "
transform="matrix(0.26458333,0,0,0.26458333,20.39957,63.899563)" />
<path
id="path29110"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6.05197;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:20.1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000"
d="M 256 0.00390625 C 251.10084 0.00390625 246.67735 0.046599262 243.45703 0.12109375 C 241.84687 0.15851107 240.54727 0.20178656 239.59766 0.25390625 C 239.12285 0.27998499 238.74341 0.30214963 238.39453 0.34179688 C 238.22011 0.36145042 238.07211 0.37637281 237.79688 0.43945312 C 237.65926 0.4708232 237.50207 0.49321452 237.13867 0.66015625 C 237.04781 0.70188223 236.94515 0.75784023 236.81445 0.83789062 C 236.68376 0.91797881 236.3437 1.1974802 236.3418 1.1992188 C 236.33989 1.2009725 235.72166 1.9806644 235.7207 1.9824219 C 235.71975 1.9841831 235.35156 3.4337818 235.35156 3.4355469 L 235.35156 67.539062 C 235.35156 67.540828 235.71972 68.984567 235.7207 68.986328 C 235.72166 68.988086 236.33989 69.77559 236.3418 69.777344 C 236.3437 69.779097 236.68376 70.050771 236.81445 70.130859 C 236.94515 70.210948 237.04781 70.266868 237.13867 70.308594 C 237.50207 70.475535 237.65925 70.497776 237.79688 70.529297 C 238.07214 70.592377 238.22009 70.605157 238.39453 70.625 C 238.74342 70.664647 239.12285 70.694662 239.59766 70.720703 C 240.54727 70.772823 241.84687 70.816249 243.45703 70.853516 C 246.67735 70.928048 251.10084 70.972656 256 70.972656 C 260.89917 70.972656 265.3207 70.928048 268.54102 70.853516 C 270.15117 70.816098 271.45273 70.772823 272.40234 70.720703 C 272.87715 70.694624 273.25659 70.664647 273.60547 70.625 C 273.77989 70.605346 273.92789 70.592377 274.20312 70.529297 C 274.34074 70.497927 274.49793 70.475535 274.86133 70.308594 C 274.95219 70.266868 275.05485 70.21091 275.18555 70.130859 C 275.31624 70.050771 275.6563 69.779082 275.6582 69.777344 C 275.66011 69.77559 276.27639 68.988086 276.27734 68.986328 C 276.2783 68.984567 276.64648 67.540828 276.64648 67.539062 L 276.64648 3.4355469 C 276.64648 3.4337818 276.27833 1.9841831 276.27734 1.9824219 C 276.27639 1.9806644 275.66011 1.2009725 275.6582 1.1992188 C 275.6563 1.197465 275.31624 0.91794102 275.18555 0.83789062 C 275.05485 0.75780244 274.95219 0.70188223 274.86133 0.66015625 C 274.49793 0.49321452 274.34075 0.47097438 274.20312 0.43945312 C 273.92786 0.37637281 273.77991 0.36163939 273.60547 0.34179688 C 273.25658 0.30214963 272.87715 0.27998499 272.40234 0.25390625 C 271.45273 0.20178656 270.15117 0.15835989 268.54102 0.12109375 C 265.3207 0.046599262 260.89917 0.00390625 256 0.00390625 z "
transform="matrix(0.26458333,0,0,0.26458333,20.39957,63.899563)" />
<path
id="path29104"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6.05197;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:20.1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000"
d="M 339.42188 0.00390625 C 334.5227 0.00390625 330.10117 0.046599262 326.88086 0.12109375 C 325.27071 0.15851107 323.96918 0.20178656 323.01953 0.25390625 C 322.54475 0.27998499 322.16526 0.30214963 321.81641 0.34179688 C 321.64179 0.36145042 321.49394 0.37637281 321.21875 0.43945312 C 321.08118 0.4708232 320.92583 0.49321452 320.5625 0.66015625 C 320.47179 0.70188223 320.36672 0.75784023 320.23633 0.83789062 C 320.10556 0.91797881 319.76556 1.1974802 319.76367 1.1992188 C 319.76174 1.2009725 319.14551 1.9806644 319.14453 1.9824219 C 319.14359 1.9841831 318.77539 3.4337818 318.77539 3.4355469 L 318.77539 67.539062 C 318.77539 67.540828 319.1434 68.984567 319.14453 68.986328 C 319.14551 68.988086 319.76174 69.77559 319.76367 69.777344 C 319.76556 69.779097 320.10556 70.050771 320.23633 70.130859 C 320.3671 70.210948 320.47179 70.266868 320.5625 70.308594 C 320.92609 70.475535 321.08114 70.497776 321.21875 70.529297 C 321.4939 70.592377 321.64194 70.605157 321.81641 70.625 C 322.16526 70.664647 322.54475 70.694662 323.01953 70.720703 C 323.96918 70.772823 325.27071 70.816249 326.88086 70.853516 C 330.10117 70.928048 334.5227 70.972656 339.42188 70.972656 C 344.32105 70.972656 348.74454 70.928048 351.96484 70.853516 C 353.575 70.816098 354.87461 70.772823 355.82422 70.720703 C 356.29904 70.694624 356.67846 70.664647 357.02734 70.625 C 357.20196 70.605346 357.3518 70.592377 357.62695 70.529297 C 357.76453 70.497927 357.91988 70.475535 358.2832 70.308594 C 358.37391 70.266868 358.47703 70.21091 358.60742 70.130859 C 358.73819 70.050771 359.07819 69.779082 359.08008 69.777344 C 359.08197 69.77559 359.70023 68.988086 359.70117 68.986328 C 359.70215 68.984567 360.07031 67.540828 360.07031 67.539062 L 360.07031 3.4355469 C 360.07031 3.4337818 359.70231 1.9841831 359.70117 1.9824219 C 359.70023 1.9806644 359.08197 1.2009725 359.08008 1.1992188 C 359.07819 1.197465 358.73819 0.91794102 358.60742 0.83789062 C 358.47665 0.75780244 358.37391 0.70188223 358.2832 0.66015625 C 357.91961 0.49321452 357.7646 0.47097438 357.62695 0.43945312 C 357.3518 0.37637281 357.20181 0.36163939 357.02734 0.34179688 C 356.67849 0.30214963 356.29904 0.27998499 355.82422 0.25390625 C 354.87461 0.20178656 353.575 0.15835989 351.96484 0.12109375 C 348.74454 0.046599262 344.32105 0.00390625 339.42188 0.00390625 z "
transform="matrix(0.26458333,0,0,0.26458333,20.39957,63.899563)" />
<path
id="path29098"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6.05197;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:20.1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000"
d="M 339.42188 441.02734 C 334.5227 441.02734 330.10117 441.07007 326.88086 441.14453 C 325.27071 441.18233 323.96918 441.233 323.01953 441.28516 C 322.54475 441.31161 322.16526 441.33531 321.81641 441.375 C 321.64179 441.3939 321.49394 441.40872 321.21875 441.4707 C 321.08118 441.50094 320.92583 441.52435 320.5625 441.69141 C 320.47179 441.73336 320.36672 441.78901 320.23633 441.86914 C 320.10556 441.94927 319.76556 442.22114 319.76367 442.22266 C 319.76174 442.22439 319.14551 443.01193 319.14453 443.01367 C 319.14359 443.01545 318.77539 444.45725 318.77539 444.45898 L 318.77539 508.56445 C 318.77539 508.56623 319.1434 510.0158 319.14453 510.01758 C 319.14551 510.01932 319.76174 510.80686 319.76367 510.80859 C 319.76556 510.81037 320.10556 511.08236 320.23633 511.16211 C 320.3671 511.24224 320.47179 511.29789 320.5625 511.33984 C 320.92609 511.5069 321.08114 511.5288 321.21875 511.56055 C 321.4939 511.62366 321.64194 511.6366 321.81641 511.65625 C 322.16526 511.69594 322.54475 511.72002 323.01953 511.74609 C 323.96918 511.79825 325.27071 511.84187 326.88086 511.87891 C 330.10117 511.95336 334.5227 512.00391 339.42188 512.00391 C 344.32105 512.00391 348.74454 511.95336 351.96484 511.87891 C 353.575 511.84111 354.87461 511.79787 355.82422 511.74609 C 356.29904 511.71964 356.67846 511.69556 357.02734 511.65625 C 357.20196 511.63735 357.3518 511.62253 357.62695 511.56055 C 357.76453 511.53031 357.91988 511.5069 358.2832 511.33984 C 358.37391 511.29827 358.47703 511.24224 358.60742 511.16211 C 358.73819 511.08198 359.07819 510.81011 359.08008 510.80859 C 359.08197 510.80686 359.70023 510.01932 359.70117 510.01758 C 359.70215 510.0158 360.07031 508.56623 360.07031 508.56445 L 360.07031 444.45898 C 360.07031 444.45725 359.70231 443.01545 359.70117 443.01367 C 359.70023 443.01193 359.08197 442.22439 359.08008 442.22266 C 359.07819 442.22088 358.73819 441.94889 358.60742 441.86914 C 358.47665 441.78901 358.37391 441.73336 358.2832 441.69141 C 357.91961 441.52435 357.7646 441.50245 357.62695 441.4707 C 357.3518 441.40759 357.20181 441.39465 357.02734 441.375 C 356.67849 441.33531 356.29904 441.31123 355.82422 441.28516 C 354.87461 441.233 353.575 441.18157 351.96484 441.14453 C 348.74454 441.07007 344.32105 441.02734 339.42188 441.02734 z "
transform="matrix(0.26458333,0,0,0.26458333,20.39957,63.899563)" />
<path
id="path29092"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6.05197;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:20.1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000"
d="M 256 441.02734 C 251.10084 441.02734 246.67735 441.07007 243.45703 441.14453 C 241.84687 441.18233 240.54727 441.233 239.59766 441.28516 C 239.12285 441.31161 238.74341 441.33531 238.39453 441.375 C 238.22011 441.3939 238.07211 441.40872 237.79688 441.4707 C 237.65926 441.50094 237.50207 441.52435 237.13867 441.69141 C 237.04781 441.73336 236.94515 441.78901 236.81445 441.86914 C 236.68376 441.94927 236.3437 442.22114 236.3418 442.22266 C 236.33989 442.22439 235.72166 443.01193 235.7207 443.01367 C 235.71975 443.01545 235.35156 444.45725 235.35156 444.45898 L 235.35156 508.56445 C 235.35156 508.56623 235.71972 510.0158 235.7207 510.01758 C 235.72166 510.01932 236.33989 510.80686 236.3418 510.80859 C 236.3437 510.81037 236.68376 511.08236 236.81445 511.16211 C 236.94515 511.24224 237.04781 511.29789 237.13867 511.33984 C 237.50207 511.5069 237.65925 511.5288 237.79688 511.56055 C 238.07214 511.62366 238.22009 511.6366 238.39453 511.65625 C 238.74342 511.69594 239.12285 511.72002 239.59766 511.74609 C 240.54727 511.79825 241.84687 511.84187 243.45703 511.87891 C 246.67735 511.95336 251.10084 512.00391 256 512.00391 C 260.89917 512.00391 265.3207 511.95336 268.54102 511.87891 C 270.15117 511.84111 271.45273 511.79787 272.40234 511.74609 C 272.87715 511.71964 273.25659 511.69556 273.60547 511.65625 C 273.77989 511.63735 273.92789 511.62253 274.20312 511.56055 C 274.34074 511.53031 274.49793 511.5069 274.86133 511.33984 C 274.95219 511.29827 275.05485 511.24224 275.18555 511.16211 C 275.31624 511.08198 275.6563 510.81011 275.6582 510.80859 C 275.66011 510.80686 276.27639 510.01932 276.27734 510.01758 C 276.2783 510.0158 276.64648 508.56623 276.64648 508.56445 L 276.64648 444.45898 C 276.64648 444.45725 276.27833 443.01545 276.27734 443.01367 C 276.27639 443.01193 275.66011 442.22439 275.6582 442.22266 C 275.6563 442.22088 275.31624 441.94889 275.18555 441.86914 C 275.05485 441.78901 274.95219 441.73336 274.86133 441.69141 C 274.49793 441.52435 274.34075 441.50245 274.20312 441.4707 C 273.92786 441.40759 273.77991 441.39465 273.60547 441.375 C 273.25658 441.33531 272.87715 441.31123 272.40234 441.28516 C 271.45273 441.233 270.15117 441.18157 268.54102 441.14453 C 265.3207 441.07007 260.89917 441.02734 256 441.02734 z "
transform="matrix(0.26458333,0,0,0.26458333,20.39957,63.899563)" />
<path
id="path29086"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6.05197;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:20.1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000"
d="M 172.57812 444.05469 C 162.81737 444.05469 154.95898 444.23492 154.95898 444.46094 L 154.95898 508.56641 C 154.95898 508.79227 162.81737 508.97461 172.57812 508.97461 C 182.33888 508.97461 190.19531 508.79242 190.19531 508.56641 L 190.19531 444.46094 C 190.19531 444.23507 182.33888 444.05469 172.57812 444.05469 z "
transform="matrix(0.26458333,0,0,0.26458333,20.39957,63.899563)" />
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:20.1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000"
d="m 66.060547,199.36719 c 1.296237,0 2.466318,-0.0135 3.318359,-0.0332 0.426021,-0.01 0.770232,-0.0214 1.021485,-0.0351 0.125626,-0.007 0.226051,-0.013 0.318359,-0.0234 0.04615,-0.005 0.08538,-0.009 0.158203,-0.0254 0.03641,-0.008 0.07768,-0.0144 0.173828,-0.0586 0.02404,-0.011 0.05136,-0.0257 0.08594,-0.0469 0.03458,-0.0212 0.124495,-0.0933 0.125,-0.0937 5.04e-4,-4.6e-4 0.163809,-0.20852 0.164062,-0.20898 2.53e-4,-4.7e-4 0.09766,-0.3843 0.09766,-0.38477 V 181.4962 c 0,-4.6e-4 -0.0974,-0.38234 -0.09766,-0.38281 -2.53e-4,-4.6e-4 -0.163558,-0.20852 -0.164062,-0.20898 -5.05e-4,-4.7e-4 -0.09042,-0.0726 -0.125,-0.0937 -0.03458,-0.0212 -0.0619,-0.0358 -0.08594,-0.0469 -0.09615,-0.0442 -0.137415,-0.0502 -0.173828,-0.0586 -0.07283,-0.0167 -0.112049,-0.0202 -0.158203,-0.0254 -0.09231,-0.0105 -0.192733,-0.0165 -0.318359,-0.0234 -0.251253,-0.0138 -0.595464,-0.0273 -1.021485,-0.0371 -0.852041,-0.0197 -2.022122,-0.0312 -3.318359,-0.0312 -1.296237,0 -2.466318,0.0115 -3.318359,0.0312 -0.426021,0.01 -0.770232,0.0233 -1.021485,0.0371 -0.125626,0.007 -0.226051,0.0129 -0.318359,0.0234 -0.04615,0.005 -0.08538,0.009 -0.158203,0.0254 -0.03641,0.008 -0.07768,0.0144 -0.173829,0.0586 -0.02404,0.0111 -0.05136,0.0257 -0.08594,0.0469 -0.03458,0.0212 -0.124495,0.0933 -0.125,0.0937 -5.05e-4,4.6e-4 -0.163809,0.20852 -0.164063,0.20898 -2.53e-4,4.7e-4 -0.09766,0.38235 -0.09766,0.38281 v 16.96094 c 0,4.7e-4 0.0974,0.3843 0.09766,0.38477 2.54e-4,4.6e-4 0.163558,0.20852 0.164063,0.20898 5.05e-4,4.7e-4 0.09042,0.0726 0.125,0.0937 0.03458,0.0212 0.0619,0.0358 0.08594,0.0469 0.09615,0.0442 0.137415,0.0502 0.173829,0.0586 0.07283,0.0167 0.112049,0.0202 0.158203,0.0254 0.09231,0.0105 0.192733,0.0165 0.318359,0.0234 0.251253,0.0138 0.595464,0.0253 1.021485,0.0351 0.852041,0.0197 2.022122,0.0332 3.318359,0.0332 z m 0,-1.60157 c -1.286295,0 -2.44812,-0.012 -3.28125,-0.0312 -0.248929,-0.006 -0.396419,-0.0127 -0.580078,-0.0195 v -15.47461 c 0.183659,-0.007 0.331149,-0.0138 0.580078,-0.0195 0.83313,-0.0193 1.994955,-0.0312 3.28125,-0.0312 1.286295,0 2.448119,0.012 3.28125,0.0312 0.248929,0.006 0.396419,0.0127 0.580078,0.0195 v 15.47461 c -0.183659,0.007 -0.331149,0.0138 -0.580078,0.0195 -0.833131,0.0193 -1.994955,0.0312 -3.28125,0.0312 z"
id="path29088" />
<path
id="path29080"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6.05197;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:20.1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000"
d="M 444.45898 151.92969 C 444.45725 151.92969 443.01545 152.29769 443.01367 152.29883 C 443.01193 152.29981 442.22439 152.91799 442.22266 152.91992 C 442.22088 152.92181 441.94889 153.25985 441.86914 153.39062 C 441.78901 153.5214 441.73336 153.62609 441.69141 153.7168 C 441.52435 154.08001 441.50245 154.23543 441.4707 154.37305 C 441.40759 154.6482 441.39465 154.79628 441.375 154.9707 C 441.33531 155.31955 441.31123 155.69904 441.28516 156.17383 C 441.233 157.12347 441.18157 158.425 441.14453 160.03516 C 441.07007 163.25546 441.02734 167.677 441.02734 172.57617 C 441.02734 177.47531 441.07007 181.89879 441.14453 185.11914 C 441.18233 186.72929 441.233 188.03086 441.28516 188.98047 C 441.31161 189.45529 441.33531 189.83471 441.375 190.18359 C 441.3939 190.35783 441.40872 190.5061 441.4707 190.78125 C 441.50094 190.91882 441.52435 191.07417 441.69141 191.4375 C 441.73336 191.52821 441.78901 191.63133 441.86914 191.76172 C 441.94927 191.89249 442.22114 192.23245 442.22266 192.23438 C 442.22439 192.23626 443.01193 192.85452 443.01367 192.85547 C 443.01545 192.85641 444.45725 193.22461 444.45898 193.22461 L 508.56445 193.22461 C 508.56623 193.22461 510.0158 192.8566 510.01758 192.85547 C 510.01932 192.85452 510.80686 192.23626 510.80859 192.23438 C 510.81037 192.23245 511.08236 191.89249 511.16211 191.76172 C 511.24224 191.63095 511.29789 191.52821 511.33984 191.4375 C 511.5069 191.07391 511.5288 190.9189 511.56055 190.78125 C 511.62366 190.5061 511.6366 190.35802 511.65625 190.18359 C 511.69594 189.83474 511.72002 189.45529 511.74609 188.98047 C 511.79825 188.03086 511.84187 186.72929 511.87891 185.11914 C 511.95336 181.89879 512.00391 177.47531 512.00391 172.57617 C 512.00391 167.677 511.95336 163.25546 511.87891 160.03516 C 511.84111 158.425 511.79787 157.12347 511.74609 156.17383 C 511.71964 155.69904 511.69556 155.31959 511.65625 154.9707 C 511.63735 154.79647 511.62253 154.6482 511.56055 154.37305 C 511.53031 154.23547 511.5069 154.08012 511.33984 153.7168 C 511.29827 153.62609 511.24224 153.52102 511.16211 153.39062 C 511.08198 153.25985 510.81011 152.92181 510.80859 152.91992 C 510.80686 152.91799 510.01932 152.29981 510.01758 152.29883 C 510.0158 152.29788 508.56623 151.92969 508.56445 151.92969 L 444.45898 151.92969 z "
transform="matrix(0.26458333,0,0,0.26458333,20.39957,63.899563)" />
<path
id="path29074"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6.05197;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:20.1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000"
d="M 444.45898 235.35156 C 444.45725 235.35156 443.01545 235.72152 443.01367 235.72266 C 443.01193 235.7236 442.22439 236.33991 442.22266 236.3418 C 442.22088 236.34372 441.94889 236.68368 441.86914 236.81445 C 441.78901 236.94522 441.73336 237.04796 441.69141 237.13867 C 441.52435 237.50226 441.50245 237.65922 441.4707 237.79688 C 441.40759 238.07202 441.39465 238.22011 441.375 238.39453 C 441.33531 238.74338 441.31123 239.12283 441.28516 239.59766 C 441.233 240.54726 441.18157 241.84688 441.14453 243.45703 C 441.07007 246.67734 441.02734 251.10086 441.02734 256 C 441.02734 260.89917 441.07007 265.32071 441.14453 268.54102 C 441.18233 270.15117 441.233 271.4527 441.28516 272.40234 C 441.31161 272.87713 441.33531 273.25658 441.375 273.60547 C 441.3939 273.7797 441.40872 273.92798 441.4707 274.20312 C 441.50094 274.3407 441.52435 274.498 441.69141 274.86133 C 441.73336 274.95204 441.78901 275.05515 441.86914 275.18555 C 441.94927 275.31632 442.22114 275.65631 442.22266 275.6582 C 442.22439 275.66013 443.01193 276.27636 443.01367 276.27734 C 443.01545 276.27829 444.45725 276.64648 444.45898 276.64648 L 508.56445 276.64648 C 508.56623 276.64648 510.0158 276.2781 510.01758 276.27734 C 510.01932 276.27636 510.80686 275.66013 510.80859 275.6582 C 510.81037 275.65631 511.08236 275.31632 511.16211 275.18555 C 511.24224 275.05478 511.29789 274.95204 511.33984 274.86133 C 511.5069 274.49812 511.5288 274.34074 511.56055 274.20312 C 511.62366 273.92798 511.6366 273.77989 511.65625 273.60547 C 511.69594 273.25662 511.72002 272.87713 511.74609 272.40234 C 511.79825 271.4527 511.84187 270.15117 511.87891 268.54102 C 511.95336 265.32071 512.00391 260.89917 512.00391 256 C 512.00391 251.10086 511.95336 246.67734 511.87891 243.45703 C 511.84111 241.84688 511.79787 240.54726 511.74609 239.59766 C 511.71964 239.12283 511.69556 238.74342 511.65625 238.39453 C 511.63735 238.2203 511.62253 238.07202 511.56055 237.79688 C 511.53031 237.6593 511.5069 237.502 511.33984 237.13867 C 511.29827 237.04796 511.24224 236.94485 511.16211 236.81445 C 511.08198 236.68368 510.81011 236.34372 510.80859 236.3418 C 510.80686 236.33991 510.01932 235.7236 510.01758 235.72266 C 510.0158 235.72171 508.56623 235.35156 508.56445 235.35156 L 444.45898 235.35156 z "
transform="matrix(0.26458333,0,0,0.26458333,20.39957,63.899563)" />
<path
id="path29068"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6.05197;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:20.1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000"
d="M 444.45898 318.77539 C 444.45725 318.77539 443.01545 319.1434 443.01367 319.14453 C 443.01193 319.14551 442.22439 319.76174 442.22266 319.76367 C 442.22088 319.76556 441.94889 320.10556 441.86914 320.23633 C 441.78901 320.3671 441.73336 320.47179 441.69141 320.5625 C 441.52435 320.92609 441.50245 321.08114 441.4707 321.21875 C 441.40759 321.4939 441.39465 321.64194 441.375 321.81641 C 441.33531 322.16526 441.31123 322.54475 441.28516 323.01953 C 441.233 323.96918 441.18157 325.27071 441.14453 326.88086 C 441.07007 330.10117 441.02734 334.5227 441.02734 339.42188 C 441.02734 344.32105 441.07007 348.74454 441.14453 351.96484 C 441.18233 353.575 441.233 354.87461 441.28516 355.82422 C 441.31161 356.29904 441.33531 356.67846 441.375 357.02734 C 441.3939 357.20196 441.40872 357.3518 441.4707 357.62695 C 441.50094 357.76453 441.52435 357.91988 441.69141 358.2832 C 441.73336 358.37391 441.78901 358.47703 441.86914 358.60742 C 441.94927 358.73819 442.22114 359.07819 442.22266 359.08008 C 442.22439 359.08197 443.01193 359.70023 443.01367 359.70117 C 443.01545 359.70215 444.45725 360.07031 444.45898 360.07031 L 508.56445 360.07031 C 508.56623 360.07031 510.0158 359.70231 510.01758 359.70117 C 510.01932 359.70023 510.80686 359.08197 510.80859 359.08008 C 510.81037 359.07819 511.08236 358.73819 511.16211 358.60742 C 511.24224 358.47665 511.29789 358.37391 511.33984 358.2832 C 511.5069 357.91999 511.5288 357.7646 511.56055 357.62695 C 511.62366 357.3518 511.6366 357.20181 511.65625 357.02734 C 511.69594 356.67849 511.72002 356.29904 511.74609 355.82422 C 511.79825 354.87461 511.84187 353.575 511.87891 351.96484 C 511.95336 348.74454 512.00391 344.32105 512.00391 339.42188 C 512.00391 334.5227 511.95336 330.10117 511.87891 326.88086 C 511.84111 325.27071 511.79787 323.96918 511.74609 323.01953 C 511.71964 322.54475 511.69556 322.16526 511.65625 321.81641 C 511.63735 321.64179 511.62253 321.49394 511.56055 321.21875 C 511.53031 321.08118 511.5069 320.92583 511.33984 320.5625 C 511.29827 320.47179 511.24224 320.36672 511.16211 320.23633 C 511.08198 320.10556 510.81011 319.76556 510.80859 319.76367 C 510.80686 319.76174 510.01932 319.14551 510.01758 319.14453 C 510.0158 319.14359 508.56623 318.77539 508.56445 318.77539 L 444.45898 318.77539 z "
transform="matrix(0.26458333,0,0,0.26458333,20.39957,63.899563)" />
<path
id="path29062"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6.05197;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:20.1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000"
d="M 3.4355469 318.77539 C 3.4337818 318.77539 1.9841831 319.1434 1.9824219 319.14453 C 1.9806644 319.14551 1.2009725 319.76174 1.1992188 319.76367 C 1.197465 319.76556 0.91797881 320.10556 0.83789062 320.23633 C 0.75780244 320.3671 0.70188223 320.47179 0.66015625 320.5625 C 0.49321452 320.92609 0.47687156 321.08114 0.4453125 321.21875 C 0.38223219 321.4939 0.3616016 321.64194 0.34179688 321.81641 C 0.30214963 322.16526 0.27998499 322.54475 0.25390625 323.01953 C 0.20178656 323.96918 0.15835989 325.27071 0.12109375 326.88086 C 0.046599262 330.10117 0.00390625 334.5227 0.00390625 339.42188 C 0.00390625 344.32105 0.046599262 348.74454 0.12109375 351.96484 C 0.15851107 353.575 0.20178656 354.87461 0.25390625 355.82422 C 0.27998499 356.29904 0.30214963 356.67846 0.34179688 357.02734 C 0.36145042 357.20196 0.38223219 357.3518 0.4453125 357.62695 C 0.47668258 357.76453 0.49321452 357.91988 0.66015625 358.2832 C 0.70188223 358.37391 0.75784023 358.47703 0.83789062 358.60742 C 0.91797881 358.73819 1.1974802 359.07819 1.1992188 359.08008 C 1.2009725 359.08197 1.9787113 359.70023 1.9804688 359.70117 C 1.98223 359.70215 3.4337818 360.07031 3.4355469 360.07031 L 67.539062 360.07031 C 67.540828 360.07031 68.984567 359.70231 68.986328 359.70117 C 68.988086 359.70023 69.77559 359.08197 69.777344 359.08008 C 69.779097 359.07819 70.050771 358.73819 70.130859 358.60742 C 70.210948 358.47665 70.266868 358.37391 70.308594 358.2832 C 70.475535 357.91999 70.497776 357.7646 70.529297 357.62695 C 70.592377 357.3518 70.605157 357.20181 70.625 357.02734 C 70.664647 356.67849 70.694662 356.29904 70.720703 355.82422 C 70.772823 354.87461 70.816249 353.575 70.853516 351.96484 C 70.92801 348.74454 70.972656 344.32105 70.972656 339.42188 C 70.972656 334.5227 70.92801 330.10117 70.853516 326.88086 C 70.816098 325.27071 70.772823 323.96918 70.720703 323.01953 C 70.694624 322.54475 70.664647 322.16526 70.625 321.81641 C 70.605346 321.64179 70.592377 321.49394 70.529297 321.21875 C 70.497927 321.08118 70.475535 320.92583 70.308594 320.5625 C 70.266868 320.47179 70.21091 320.36672 70.130859 320.23633 C 70.050771 320.10556 69.779082 319.76556 69.777344 319.76367 C 69.77559 319.76174 68.988086 319.14551 68.986328 319.14453 C 68.984567 319.14359 67.540828 318.77539 67.539062 318.77539 L 3.4355469 318.77539 z "
transform="matrix(0.26458333,0,0,0.26458333,20.39957,63.899563)" />
<path
id="path29056"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6.05197;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:20.1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000"
d="M 3.4355469 235.35156 C 3.4337818 235.35156 1.9841831 235.72152 1.9824219 235.72266 C 1.9806644 235.7236 1.2009725 236.33991 1.1992188 236.3418 C 1.197465 236.34372 0.91797881 236.68368 0.83789062 236.81445 C 0.75780244 236.94522 0.70188223 237.04796 0.66015625 237.13867 C 0.49321452 237.50226 0.47687156 237.65922 0.4453125 237.79688 C 0.38223219 238.07202 0.3616016 238.22011 0.34179688 238.39453 C 0.30214963 238.74338 0.27998499 239.12283 0.25390625 239.59766 C 0.20178656 240.54726 0.15835989 241.84688 0.12109375 243.45703 C 0.046599262 246.67734 0.00390625 251.10086 0.00390625 256 C 0.00390625 260.89917 0.046599262 265.32071 0.12109375 268.54102 C 0.15851107 270.15117 0.20178656 271.4527 0.25390625 272.40234 C 0.27998499 272.87713 0.30214963 273.25658 0.34179688 273.60547 C 0.36145042 273.7797 0.38223219 273.92798 0.4453125 274.20312 C 0.47668258 274.3407 0.49321452 274.498 0.66015625 274.86133 C 0.70188223 274.95204 0.75784023 275.05515 0.83789062 275.18555 C 0.91797881 275.31632 1.1974802 275.65631 1.1992188 275.6582 C 1.2009725 275.66013 1.9787113 276.27636 1.9804688 276.27734 C 1.98223 276.27829 3.4337818 276.64648 3.4355469 276.64648 L 67.539062 276.64648 C 67.540828 276.64648 68.984567 276.2781 68.986328 276.27734 C 68.988086 276.27636 69.77559 275.66013 69.777344 275.6582 C 69.779097 275.65631 70.050771 275.31632 70.130859 275.18555 C 70.210948 275.05478 70.266868 274.95204 70.308594 274.86133 C 70.475535 274.49812 70.497776 274.34074 70.529297 274.20312 C 70.592377 273.92798 70.605157 273.77989 70.625 273.60547 C 70.664647 273.25662 70.694662 272.87713 70.720703 272.40234 C 70.772823 271.4527 70.816249 270.15117 70.853516 268.54102 C 70.92801 265.32071 70.972656 260.89917 70.972656 256 C 70.972656 251.10086 70.92801 246.67734 70.853516 243.45703 C 70.816098 241.84688 70.772823 240.54726 70.720703 239.59766 C 70.694624 239.12283 70.664647 238.74342 70.625 238.39453 C 70.605346 238.2203 70.592377 238.07202 70.529297 237.79688 C 70.497927 237.6593 70.475535 237.502 70.308594 237.13867 C 70.266868 237.04796 70.21091 236.94485 70.130859 236.81445 C 70.050771 236.68368 69.779082 236.34372 69.777344 236.3418 C 69.77559 236.33991 68.988086 235.7236 68.986328 235.72266 C 68.984567 235.72171 67.540828 235.35156 67.539062 235.35156 L 3.4355469 235.35156 z "
transform="matrix(0.26458333,0,0,0.26458333,20.39957,63.899563)" />
<path
id="path29050"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6.05197;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:20.1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000"
d="M 3.4355469 151.92969 C 3.4337818 151.92969 1.9841831 152.29769 1.9824219 152.29883 C 1.9806644 152.29981 1.2009725 152.91799 1.1992188 152.91992 C 1.197465 152.92181 0.91797881 153.25985 0.83789062 153.39062 C 0.75780244 153.5214 0.70188223 153.62609 0.66015625 153.7168 C 0.49321452 154.08001 0.47687156 154.23543 0.4453125 154.37305 C 0.38223219 154.6482 0.3616016 154.79628 0.34179688 154.9707 C 0.30214963 155.31955 0.27998499 155.69904 0.25390625 156.17383 C 0.20178656 157.12347 0.15835989 158.425 0.12109375 160.03516 C 0.046599262 163.25546 0.00390625 167.677 0.00390625 172.57617 C 0.00390625 177.47531 0.046599262 181.89879 0.12109375 185.11914 C 0.15851107 186.72929 0.20178656 188.03086 0.25390625 188.98047 C 0.27998499 189.45529 0.30214963 189.83471 0.34179688 190.18359 C 0.36145042 190.35783 0.38223219 190.5061 0.4453125 190.78125 C 0.47668258 190.91882 0.49321452 191.07417 0.66015625 191.4375 C 0.70188223 191.52821 0.75784023 191.63133 0.83789062 191.76172 C 0.91797881 191.89249 1.1974802 192.23245 1.1992188 192.23438 C 1.2009725 192.23626 1.9787113 192.85452 1.9804688 192.85547 C 1.98223 192.85641 3.4337818 193.22461 3.4355469 193.22461 L 67.539062 193.22461 C 67.540828 193.22461 68.984567 192.8566 68.986328 192.85547 C 68.988086 192.85452 69.77559 192.23626 69.777344 192.23438 C 69.779097 192.23245 70.050771 191.89249 70.130859 191.76172 C 70.210948 191.63095 70.266868 191.52821 70.308594 191.4375 C 70.475535 191.07391 70.497776 190.9189 70.529297 190.78125 C 70.592377 190.5061 70.605157 190.35802 70.625 190.18359 C 70.664647 189.83474 70.694662 189.45529 70.720703 188.98047 C 70.772823 188.03086 70.816249 186.72929 70.853516 185.11914 C 70.92801 181.89879 70.972656 177.47531 70.972656 172.57617 C 70.972656 167.677 70.92801 163.25546 70.853516 160.03516 C 70.816098 158.425 70.772823 157.12347 70.720703 156.17383 C 70.694624 155.69904 70.664647 155.31959 70.625 154.9707 C 70.605346 154.79647 70.592377 154.6482 70.529297 154.37305 C 70.497927 154.23547 70.475535 154.08012 70.308594 153.7168 C 70.266868 153.62609 70.21091 153.52102 70.130859 153.39062 C 70.050771 153.25985 69.779082 152.92181 69.777344 152.91992 C 69.77559 152.91799 68.988086 152.29981 68.986328 152.29883 C 68.984567 152.29788 67.540828 151.92969 67.539062 151.92969 L 3.4355469 151.92969 z "
transform="matrix(0.26458333,0,0,0.26458333,20.39957,63.899563)" />
<path
id="path29044"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8.06423;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:20.1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000"
d="M 178.68945 134.11719 C 168.38151 134.11719 159.08039 134.20194 152.32812 134.33203 C 148.95199 134.39708 146.2168 134.4718 144.27539 134.56055 C 143.30468 134.60492 142.54129 134.64826 141.91992 134.70703 C 141.60924 134.73651 141.35322 134.76323 140.98242 134.83398 C 140.79704 134.86951 140.60775 134.88978 140.15625 135.0625 C 139.9305 135.14886 139.63083 135.24388 139.10742 135.64453 C 138.97657 135.74469 138.83798 135.86771 138.67969 136.0293 C 138.5214 136.19087 138.17874 136.64689 138.17773 136.64844 C 138.17572 136.6515 137.51953 138.86022 137.51953 138.86328 L 137.51953 239.98828 C 137.51953 239.99138 138.17572 242.20006 138.17773 242.20312 C 138.17874 242.20467 138.52139 242.66073 138.67969 242.82227 C 138.83797 242.98403 138.97657 243.11461 139.10742 243.21484 C 139.63083 243.61551 139.9305 243.71051 140.15625 243.79688 C 140.60775 243.9696 140.79702 243.99024 140.98242 244.02539 C 141.35323 244.09607 141.60924 244.12286 141.91992 244.15234 C 142.54129 244.21093 143.30468 244.25423 144.27539 244.29883 C 146.2168 244.38765 148.95199 244.46234 152.32812 244.52734 C 159.08039 244.65736 168.38151 244.73437 178.68945 244.73438 L 200.16992 244.73438 C 210.47787 244.73438 219.77898 244.65736 226.53125 244.52734 C 229.90738 244.46234 232.64257 244.38727 234.58398 244.29883 C 235.55469 244.25461 236.31027 244.2113 236.93164 244.15234 C 237.24232 244.12211 237.49834 244.09607 237.86914 244.02539 C 238.05453 243.99137 238.24576 243.9696 238.69727 243.79688 C 238.92302 243.71032 239.22074 243.61547 239.74414 243.21484 C 239.87499 243.11469 240.02138 242.98373 240.17969 242.82227 C 240.33797 242.66088 240.68063 242.20467 240.68164 242.20312 C 240.68366 242.20006 241.33984 239.99138 241.33984 239.98828 L 241.33984 138.86328 C 241.33984 138.86022 240.68366 136.6515 240.68164 136.64844 C 240.68063 136.64689 240.33798 136.19087 240.17969 136.0293 C 240.0214 135.86772 239.87501 135.7447 239.74414 135.64453 C 239.22074 135.24388 238.92302 135.14885 238.69727 135.0625 C 238.24576 134.88981 238.05454 134.86936 237.86914 134.83398 C 237.49833 134.76323 237.24232 134.73644 236.93164 134.70703 C 236.31027 134.64822 235.55469 134.60488 234.58398 134.56055 C 232.64257 134.47184 229.90738 134.39708 226.53125 134.33203 C 219.77898 134.20194 210.47787 134.11719 200.16992 134.11719 L 178.68945 134.11719 z "
transform="matrix(0.26458333,0,0,0.26458333,20.39957,63.899563)" />
<path
id="path29038"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8.06423;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:20.1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000"
d="M 311.82812 134.11719 C 301.52018 134.11719 292.22102 134.20194 285.46875 134.33203 C 282.09262 134.39708 279.36329 134.4718 277.42188 134.56055 C 276.45117 134.60492 275.68778 134.64826 275.06641 134.70703 C 274.75573 134.73651 274.4997 134.76323 274.12891 134.83398 C 273.94352 134.86951 273.75424 134.88978 273.30273 135.0625 C 273.07698 135.14886 272.77731 135.24388 272.25391 135.64453 C 272.12306 135.74469 271.97666 135.86771 271.81836 136.0293 C 271.66007 136.19087 271.31742 136.64689 271.31641 136.64844 C 271.31439 136.6515 270.66016 138.86022 270.66016 138.86328 L 270.66016 239.98828 C 270.66016 239.99138 271.31439 242.20006 271.31641 242.20312 C 271.31742 242.20467 271.66007 242.66073 271.81836 242.82227 C 271.97665 242.98403 272.12304 243.11461 272.25391 243.21484 C 272.77731 243.61551 273.07698 243.71051 273.30273 243.79688 C 273.75424 243.9696 273.94351 243.99024 274.12891 244.02539 C 274.49972 244.09607 274.75573 244.12286 275.06641 244.15234 C 275.68778 244.21093 276.45117 244.25423 277.42188 244.29883 C 279.36329 244.38765 282.09262 244.46234 285.46875 244.52734 C 292.22102 244.65736 301.52018 244.73437 311.82812 244.73438 L 333.31055 244.73438 C 343.61849 244.73438 352.9196 244.65736 359.67188 244.52734 C 363.04801 244.46234 365.78318 244.38727 367.72461 244.29883 C 368.69531 244.25461 369.45869 244.2113 370.08008 244.15234 C 370.39076 244.12211 370.64681 244.09607 371.01758 244.02539 C 371.20315 243.99137 371.39229 243.9696 371.84375 243.79688 C 372.06939 243.71032 372.36915 243.61547 372.89258 243.21484 C 373.02335 243.11469 373.16203 242.98373 373.32031 242.82227 C 373.47867 242.66088 373.82125 242.20467 373.82227 242.20312 C 373.82427 242.20006 374.47852 239.99138 374.47852 239.98828 L 374.47852 138.86328 C 374.47852 138.86022 373.82427 136.6515 373.82227 136.64844 C 373.82125 136.64689 373.47871 136.19087 373.32031 136.0293 C 373.16195 135.86772 373.02327 135.7447 372.89258 135.64453 C 372.36915 135.24388 372.0695 135.14885 371.84375 135.0625 C 371.39225 134.88981 371.203 134.86936 371.01758 134.83398 C 370.64681 134.76323 370.39076 134.73644 370.08008 134.70703 C 369.45869 134.64822 368.69531 134.60488 367.72461 134.56055 C 365.78318 134.47184 363.04801 134.39708 359.67188 134.33203 C 352.9196 134.20194 343.61849 134.11719 333.31055 134.11719 L 311.82812 134.11719 z "
transform="matrix(0.26458333,0,0,0.26458333,20.39957,63.899563)" />
<path
id="path29032"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8.06423;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:20.1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000"
d="M 178.68945 267.26367 C 168.38151 267.26367 159.08039 267.34069 152.32812 267.4707 C 148.95199 267.53571 146.2168 267.61235 144.27539 267.70117 C 143.30468 267.74539 142.54129 267.7887 141.91992 267.84766 C 141.60924 267.87789 141.35322 267.90198 140.98242 267.97266 C 140.79704 268.00667 140.60775 268.03626 140.15625 268.20898 C 139.9305 268.29554 139.63083 268.39234 139.10742 268.79297 C 138.97657 268.89313 138.83798 269.01417 138.67969 269.17578 C 138.5214 269.33755 138.17874 269.79533 138.17773 269.79688 C 138.17572 269.79997 137.51953 272.00862 137.51953 272.01172 L 137.51953 373.13477 C 137.51953 373.13786 138.17572 375.34651 138.17773 375.34961 C 138.17874 375.35116 138.52139 375.80913 138.67969 375.9707 C 138.83797 376.13247 138.97657 376.25351 139.10742 376.35352 C 139.63083 376.75418 139.9305 376.85114 140.15625 376.9375 C 140.60775 377.11022 140.79702 377.13087 140.98242 377.16602 C 141.35323 377.23669 141.60924 377.26154 141.91992 377.29102 C 142.54129 377.34998 143.30468 377.39485 144.27539 377.43945 C 146.2168 377.52827 148.95199 377.61077 152.32812 377.67578 C 159.08039 377.8058 168.38151 377.88281 178.68945 377.88281 L 200.16992 377.88281 C 210.47787 377.88281 219.77898 377.8058 226.53125 377.67578 C 229.90738 377.61077 232.64257 377.52827 234.58398 377.43945 C 235.55469 377.39523 236.31027 377.34998 236.93164 377.29102 C 237.24232 377.26078 237.49834 377.23669 237.86914 377.16602 C 238.05453 377.132 238.24576 377.10985 238.69727 376.9375 C 238.92302 376.85095 239.22074 376.75415 239.74414 376.35352 C 239.87499 376.25336 240.02138 376.13232 240.17969 375.9707 C 240.33797 375.80894 240.68063 375.35116 240.68164 375.34961 C 240.68366 375.34651 241.33984 373.13786 241.33984 373.13477 L 241.33984 272.01172 C 241.33984 272.00862 240.68366 269.79997 240.68164 269.79688 C 240.68063 269.79533 240.33798 269.33736 240.17969 269.17578 C 240.0214 269.0144 239.87501 268.89298 239.74414 268.79297 C 239.22074 268.3923 238.92302 268.29535 238.69727 268.20898 C 238.24576 268.03626 238.05454 268.00818 237.86914 267.97266 C 237.49833 267.90198 237.24232 267.87714 236.93164 267.84766 C 236.31027 267.7887 235.55469 267.74382 234.58398 267.69922 C 232.64257 267.6104 229.90738 267.53609 226.53125 267.4707 C 219.77898 267.34069 210.47787 267.26367 200.16992 267.26367 L 178.68945 267.26367 z "
transform="matrix(0.26458333,0,0,0.26458333,20.39957,63.899563)" />
<path
id="path29026"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8.06423;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:20.1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000"
d="M 311.82812 267.26367 C 301.52018 267.26367 292.22102 267.34069 285.46875 267.4707 C 282.09262 267.53571 279.36329 267.61235 277.42188 267.70117 C 276.45117 267.74539 275.68778 267.7887 275.06641 267.84766 C 274.75573 267.87789 274.4997 267.90198 274.12891 267.97266 C 273.94352 268.00667 273.75424 268.03626 273.30273 268.20898 C 273.07698 268.29554 272.77731 268.39234 272.25391 268.79297 C 272.12306 268.89313 271.97666 269.01417 271.81836 269.17578 C 271.66007 269.33755 271.31742 269.79533 271.31641 269.79688 C 271.31439 269.79997 270.66016 272.00862 270.66016 272.01172 L 270.66016 373.13477 C 270.66016 373.13786 271.31439 375.34651 271.31641 375.34961 C 271.31742 375.35116 271.66007 375.80913 271.81836 375.9707 C 271.97665 376.13247 272.12304 376.25351 272.25391 376.35352 C 272.77731 376.75418 273.07698 376.85114 273.30273 376.9375 C 273.75424 377.11022 273.94351 377.13087 274.12891 377.16602 C 274.49972 377.23669 274.75573 377.26154 275.06641 377.29102 C 275.68778 377.34998 276.45117 377.39485 277.42188 377.43945 C 279.36329 377.52827 282.09262 377.61077 285.46875 377.67578 C 292.22102 377.8058 301.52018 377.88281 311.82812 377.88281 L 333.31055 377.88281 C 343.61849 377.88281 352.9196 377.8058 359.67188 377.67578 C 363.04801 377.61077 365.78318 377.52827 367.72461 377.43945 C 368.69531 377.39523 369.45869 377.34998 370.08008 377.29102 C 370.39076 377.26078 370.64681 377.23669 371.01758 377.16602 C 371.20315 377.132 371.39229 377.10985 371.84375 376.9375 C 372.06939 376.85095 372.36915 376.75415 372.89258 376.35352 C 373.02335 376.25336 373.16203 376.13232 373.32031 375.9707 C 373.47867 375.80894 373.82125 375.35116 373.82227 375.34961 C 373.82427 375.34651 374.47852 373.13786 374.47852 373.13477 L 374.47852 272.01172 C 374.47852 272.00862 373.82427 269.79997 373.82227 269.79688 C 373.82125 269.79533 373.47871 269.33736 373.32031 269.17578 C 373.16195 269.0144 373.02327 268.89298 372.89258 268.79297 C 372.36915 268.3923 372.0695 268.29535 371.84375 268.20898 C 371.39225 268.03626 371.203 268.00818 371.01758 267.97266 C 370.64681 267.90198 370.39076 267.87714 370.08008 267.84766 C 369.45869 267.7887 368.69531 267.74382 367.72461 267.69922 C 365.78318 267.6104 363.04801 267.53609 359.67188 267.4707 C 352.9196 267.34069 343.61849 267.26367 333.31055 267.26367 L 311.82812 267.26367 z "
transform="matrix(0.26458333,0,0,0.26458333,20.39957,63.899563)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 63 KiB

View file

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
width="512"
height="512"
viewBox="0 0 135.46667 135.46666"
version="1.1"
id="svg8">
<defs
id="defs2" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
transform="translate(-97.188524,-105.34864)">
<path
id="path28985"
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:14.7584;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;stop-color:#000000"
d="M 94.982422 0.00390625 C 71.389288 0.00390625 52.167969 19.22515 52.167969 42.818359 L 52.167969 469.18164 C 52.167969 492.77485 71.389288 511.99609 94.982422 511.99609 L 417.00977 511.99609 C 440.60294 511.99609 459.83203 492.77485 459.83203 469.18164 L 459.83203 42.818359 C 459.83203 19.22515 440.60294 0.00390625 417.00977 0.00390625 L 94.982422 0.00390625 z M 103.41992 26.378906 L 103.43555 26.378906 L 103.47852 26.378906 A 7.3799441 7.3799441 0 0 0 103.49414 26.378906 C 114.44906 26.379095 123.16782 35.095858 123.16797 46.050781 C 123.16782 57.005742 114.44906 65.732271 103.49414 65.732422 C 92.539218 65.732308 83.814604 57.005742 83.814453 46.050781 C 83.814567 35.125528 92.496785 26.420972 103.41992 26.378906 z M 413.34961 26.378906 L 413.35547 26.378906 L 413.4082 26.378906 A 7.3799441 7.3799441 0 0 0 413.42383 26.378906 C 424.37875 26.379095 433.09555 35.095858 433.0957 46.050781 C 433.09555 57.005742 424.37879 65.732271 413.42383 65.732422 C 402.46891 65.732271 393.74234 57.005742 393.74219 46.050781 C 393.7423 35.123033 402.42296 26.416966 413.34961 26.378906 z M 255.41406 46.908203 L 255.44336 46.908203 C 255.62251 46.907863 255.80301 46.907863 255.98242 46.908203 A 7.3799441 7.3799441 0 0 0 255.99805 46.908203 C 339.83991 46.907901 407.65261 114.71286 407.65234 198.55469 C 407.65072 272.74674 354.23776 334.18996 283.28125 347.15234 L 331.39258 300.47852 C 332.24874 299.74599 333.05963 298.95914 333.79492 298.10547 A 7.3799441 7.3799441 0 0 0 333.86133 298.02539 A 7.3799441 7.3799441 0 0 0 335.3457 295.25781 A 7.3799441 7.3799441 0 0 0 335.35352 295.24219 C 338.14757 290.79829 339.69829 285.67049 338.91797 280.41211 A 7.3799441 7.3799441 0 0 0 338.91797 280.4043 C 337.75648 272.59462 332.49555 265.97275 325.15234 263.07227 L 325.14453 263.07227 C 323.26973 262.33257 321.30165 261.84605 319.29688 261.63867 A 7.3799441 7.3799441 0 0 0 316.45508 261.9043 C 311.92513 262.0294 307.53283 263.28586 303.86914 266.00977 L 303.87695 265.93555 L 303.32422 266.29688 C 303.30532 266.31199 303.27709 266.31301 303.25781 266.32812 A 7.3799441 7.3799441 0 0 0 303.21875 266.36523 L 193.99023 336.69922 C 139.611 312.28434 104.34488 258.39655 104.34375 198.55469 C 104.34292 114.94016 171.804 47.230143 255.41406 46.908203 z M 195.58398 353.21875 C 211.37814 359.38505 227.98929 362.71767 244.87891 363.85742 L 150.21484 455.70312 A 7.3799441 7.3799441 0 0 0 149.55078 456.43945 C 148.01357 458.39453 146.25577 460.16375 144.30859 461.71094 C 130.41127 472.74927 110.42096 470.45607 99.382812 456.55859 C 88.344475 442.66131 90.637682 422.67096 104.53516 411.63281 C 106.47001 410.09609 108.57465 408.78603 110.81055 407.73438 A 7.3799441 7.3799441 0 0 0 111.66602 407.26172 L 195.58398 353.21875 z M 413.34961 449.44922 L 413.35742 449.44922 L 413.4082 449.44922 A 7.3799441 7.3799441 0 0 0 413.42383 449.44922 C 424.37879 449.44941 433.09555 458.1759 433.0957 469.13086 C 433.09555 480.08578 424.37875 488.80258 413.42383 488.80273 C 402.46891 488.80258 393.74433 480.08578 393.74414 469.13086 C 393.74425 458.20307 402.42292 449.48728 413.34961 449.44922 z "
transform="matrix(0.26458333,0,0,0.26458333,97.188524,105.34864)" />
<path
id="path3541"
style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:5.14248;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.996354"
d="m 178.30981,157.88318 a 13.388833,13.388833 0 0 1 -13.38884,13.38883 13.388833,13.388833 0 0 1 -13.38883,-13.38883 13.388833,13.388833 0 0 1 13.38883,-13.38883 13.388833,13.388833 0 0 1 13.38884,13.38883 z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.6 KiB

View file

@ -0,0 +1,14 @@
-- Icons directory
local dir = os.getenv("HOME") .. "/.config/awesome/theme/assets/icons/"
return {
-- notifs
notification = dir .. "notification.svg",
notification_bell = dir .. "notification_bell.svg",
-- system
ram = dir .. "ram.svg",
cpu = dir .. "cpu.svg",
temp = dir .. "temp.svg",
disk = dir .. "disk.svg",
}

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24" y="0"/><path d="M22,6.98V16c0,1.1-0.9,2-2,2H6l-4,4V4c0-1.1,0.9-2,2-2h10.1C14.04,2.32,14,2.66,14,3c0,2.76,2.24,5,5,5 C20.13,8,21.16,7.61,22,6.98z M16,3c0,1.66,1.34,3,3,3s3-1.34,3-3s-1.34-3-3-3S16,1.34,16,3z"/></g></svg>

After

Width:  |  Height:  |  Size: 398 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M241.1 253.9c-27.87-76.61 4.999-160.6 73.75-199.7c-8.5-5.621-17.5-10.5-27.5-14.12C218.1 14.91 142.5 50.66 117.3 119.8C116.5 121.9 102.6 160.3 101.9 162.4c-29.12 80.11-66.37 94.36-87.37 104.1c-20.12 10.37-19.5 40.62 2.1 48.87l243.2 88.49c8.498-19.12 19.5-45.49-3.25-108.1L241.1 253.9zM138.1 444.2c27.62 10 57.5-.3723 73.74-23.25l-115.4-41.99C94.26 406.9 110.4 434.1 138.1 444.2zM501.9 476.2c27.62-10.12 43.87-37.24 41.62-65.24l-115.4 41.99C444.4 475.7 474.2 486.2 501.9 476.2zM625.6 299.4c-20.1-10.62-58.37-24.88-87.37-104.1c-.875-2.125-14.75-40.5-15.5-42.62c-19.75-54.07-70.87-87.74-125.3-87.74c-15.16 0-30.58 2.63-45.65 8.126C282.6 97.25 246.9 173.8 272.1 242.1c.75 2.121 14.75 40.37 15.62 42.62c29.12 80.11 9.625 114.9 .5 136.6c-7.615 17.7 6.032 37.05 24.27 37.05c3.018 0 6.157-.5301 9.351-1.682l300.6-109.4C642.1 340.7 647.3 310.6 625.6 299.4zM347.6 397.2c6.029-28.89 6.381-69.96-15-128.8c-1.322-3.484-14.19-38.64-15.34-41.85c-7.807-21.41-6.805-44.57 2.82-65.22c9.625-20.64 26.71-36.3 48.15-44.09c9.461-3.449 19.29-5.199 29.21-5.199c35.72 0 67.97 22.58 80.07 55.69c.1152 .3281 12.21 33.92 15.63 42.98c21.12 58.35 47.69 89.47 70.92 107.7L347.6 397.2z"/></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
width="512"
height="512"
viewBox="0 0 135.46665 135.46666"
version="1.1"
id="svg8">
<defs
id="defs2" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
transform="translate(-41.959401,-104.53265)">
<path
id="rect2797"
style="fill:#bebebe;stroke:none;stroke-width:5.15738;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1"
d="m 44.980973,124.18393 c -1.674062,0 -3.021573,1.34811 -3.021573,3.02222 v 25.76855 h 11.126853 v 15.21271 H 41.9594 v 25.76854 c 0,1.67411 1.347511,3.02166 3.021573,3.02166 H 174.4045 c 1.67406,0 3.02157,-1.34755 3.02157,-3.02166 V 168.18741 H 166.29922 V 152.9747 h 11.12685 v -25.76855 c 0,-1.67411 -1.34751,-3.02222 -3.02157,-3.02222 z m 54.614309,16.53587 h 20.194908 v 39.23222 H 99.595282 Z m 33.342818,0.24487 h 20.19435 v 39.23221 H 132.9381 Z m -66.68507,0.24541 H 86.447383 V 180.4423 H 66.25303 Z M 41.9594,206.94822 v 13.39982 h 38.147229 v -13.39982 z m 46.011537,0 v 13.39982 h 89.455133 v -13.39982 z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
width="512"
height="512"
viewBox="0 0 135.46666 135.46666"
version="1.1"
id="svg8">
<defs
id="defs2" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
transform="translate(-138.42136,-135.52244)">
<rect
style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="rect3946"
width="25.197727"
height="10.353477"
x="224.39203"
y="157.66037"
ry="0" />
<rect
style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="rect3946-4"
width="25.197727"
height="10.353477"
x="224.39203"
y="196.35707"
ry="0" />
<rect
style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="rect3946-0"
width="25.197727"
height="10.353477"
x="224.39203"
y="177.00871"
ry="0" />
<path
style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1.99147;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 175.80143,188.71482 h 39.99936"
id="path3979" />
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;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;vector-effect:none;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;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;stop-color:#000000;stop-opacity:1"
d="m 195.80167,135.52237 c -11.70926,0 -21.20899,9.67772 -21.20899,21.45704 v 53.49804 c 0,0.73309 0.16286,1.41297 0.23438,2.125 -7.53192,6.25262 -12.10747,15.42396 -12.10742,25.30469 -6e-5,18.22002 14.86201,33.08174 33.08203,33.08203 18.22026,7e-5 33.08209,-14.86176 33.08203,-33.08203 4e-5,-9.8798 -4.5768,-19.05013 -12.10742,-25.30273 0.0715,-0.71258 0.23437,-1.39378 0.23437,-2.12696 v -53.49804 c 0,-11.77932 -9.49972,-21.45704 -21.20898,-21.45704 z m 0,8.54297 c 7.05777,0 12.66601,5.65394 12.66601,12.91407 v 53.49804 c 0,0.99364 -0.11184,1.95917 -0.32031,2.89649 a 4.2716821,4.2716821 0 0 0 1.7207,4.42578 c 6.56699,4.59422 10.4727,12.09292 10.47266,20.10742 4e-5,13.60353 -10.93553,24.54106 -24.53906,24.54102 -13.60335,-2.2e-4 -24.53911,-10.93768 -24.53907,-24.54102 -4e-5,-8.01449 3.90372,-15.5132 10.47071,-20.10742 a 4.2716821,4.2716821 0 0 0 1.72265,-4.42578 c -0.20873,-0.93853 -0.32226,-1.90403 -0.32226,-2.89649 v -53.49804 c 0,-7.26013 5.6102,-12.91407 12.66797,-12.91407 z"
id="path4018" />
<path
id="rect944"
style="fill:#d5d5d5;fill-opacity:1;stroke:none;stroke-width:14.0305;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 182.82949,188.91164 v 27.40003 a 24.97855,24.97855 0 0 0 -12.00679,21.34615 24.97855,24.97855 0 0 0 24.97815,24.9787 24.97855,24.97855 0 0 0 24.9787,-24.9787 24.97855,24.97855 0 0 0 -12.0068,-21.34615 v -27.40003 z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

View file

@ -0,0 +1,284 @@
-- Standard awesome library
local gears = require("gears")
local gfs = require("gears.filesystem")
-- Theme handling library
local themes_path = gfs.get_themes_dir()
local theme = dofile(themes_path .. "default/theme.lua")
local theme_assets = require("beautiful.theme_assets")
local xresources = require("beautiful.xresources")
local xrdb = xresources.get_current_theme()
-- Helpers
local helpers = require("helpers")
-- Beautiful Day Theme
--------------------------
-- Catppuccin Dawn Colorscheme
local color_palette = {
rosewater = "#DC907F",
flamingo = "#DD7878",
pink = "#EC83D0",
mauve = "#9247ED",
red = "#BB0D33",
maroon = "#E63B4A",
peach = "#FE640B",
yellow = "#E49320",
green = "#53A947",
teal = "#23979F",
sky = "#04A5E5",
blue = "#3474EE",
sapphire = "#209FB5",
lavender = "#7287FD",
white = "#575279",
gray2 = "#696486",
gray1 = "#7B7794",
gray0 = "#8E89A1",
black5 = "#A09BAE",
black4 = "#B2AEBC",
black0 = "#C4C0C9",
black3 = "#D7D2D6",
black1 = "#E9E5E4",
black2 = "#FBF7F1",
}
theme.xbackground = color_palette.black2
theme.xforeground = color_palette.white
theme.xcolor0 = color_palette.gray0
theme.xcolor1 = color_palette.red
theme.xcolor2 = color_palette.green
theme.xcolor3 = color_palette.yellow
theme.xcolor4 = color_palette.blue
theme.xcolor5 = color_palette.mauve
theme.xcolor6 = color_palette.pink
theme.xcolor7 = color_palette.white
theme.xcolor8 = color_palette.gray1
theme.xcolor9 = color_palette.maroon
theme.xcolor10 = color_palette.teal
theme.xcolor11 = color_palette.peach
theme.xcolor12 = color_palette.sky
theme.xcolor13 = color_palette.lavender
theme.xcolor14 = color_palette.flamingo
theme.xcolor15 = color_palette.white
theme.darker_bg = color_palette.black1
theme.lighter_bg = color_palette.black3
theme.dashboard_fg = color_palette.gray2
theme.transparent = "#00000000"
-- PFP
theme.pfp = gears.surface.load_uncached(gfs.get_configuration_dir() .. "theme/assets/pfp.png")
-- Awesome Logo
theme.awesome_logo = gears.surface.load_uncached(gfs.get_configuration_dir() .. "theme/assets/icons/awesome_logo.svg")
-- Fonts
theme.font_name = "Iosevka Nerd Font Mono "
theme.font = theme.font_name .. "8"
theme.icon_font_name = "Material Design Icons Desktop "
theme.icon_font = theme.icon_font_name .. "18"
theme.font_taglist = theme.icon_font_name .. "16"
theme.prompt_font = theme.font_name .. "Bold 10"
-- Background Colors
theme.bg_dark = theme.darker_bg
theme.bg_normal = theme.xbackground
theme.bg_focus = theme.xbackground
theme.bg_urgent = theme.xbackground
theme.bg_minimize = theme.xbackground
theme.bg_secondary = theme.darker_bg
theme.bg_accent = theme.lighter_bg
-- Accent colors
theme.accent = theme.xcolor6
theme.hover_effect = theme.accent .. "44"
-- Foreground Colors
theme.fg_normal = theme.xforeground
theme.fg_focus = theme.xforeground
theme.fg_urgent = theme.xcolor1
theme.fg_minimize = theme.xcolor0
-- Borders
theme.border_width = dpi(0)
theme.oof_border_width = dpi(0)
theme.border_normal = theme.darker_bg
theme.border_focus = theme.darker_bg
theme.widget_border_width = dpi(2)
theme.widget_border_color = theme.darker_bg
-- Radius
theme.border_radius = dpi(10)
theme.client_radius = theme.border_radius
theme.dashboard_radius = theme.border_radius
theme.widget_radius = theme.border_radius
-- Titlebars
theme.titlebar_enabled = true
theme.titlebar_bg = theme.xbackground
theme.titlebar_fg = theme.xforeground
-- Music
theme.music_bg = theme.xbackground
theme.music_bg_accent = theme.darker_bg
theme.music_accent = theme.lighter_bg
-- Pop up notifications
theme.pop_size = dpi(190)
theme.pop_bg = theme.xbackground
theme.pop_vol_color = theme.accent
theme.pop_brightness_color = theme.accent
theme.pop_bar_bg = theme.accent .. "44"
theme.pop_fg = theme.xforeground
theme.pop_border_radius = theme.border_radius
-- Tooltip
theme.tooltip_bg = theme.darker_bg
theme.tooltip_widget_bg = theme.xbackground
theme.tooltip_height = dpi(245)
theme.tooltip_width = dpi(200)
theme.tooltip_gap = dpi(10)
theme.tooltip_box_margin = dpi(10)
theme.tooltip_border_radius = theme.border_radius
theme.tooltip_box_border_radius = theme.widget_radius
-- Edge snap
theme.snap_bg = theme.xcolor8
theme.snap_shape = helpers.rrect(0)
-- Prompts
theme.prompt_bg = theme.transparent
theme.prompt_fg = theme.xforeground
-- Dashboard
theme.dashboard_bg = theme.darker_bg
theme.dashboard_box_bg = theme.xbackground
theme.dashboard_box_fg = theme.dashboard_fg
-- Control center
theme.control_center_radius = dpi(20)
theme.control_center_widget_radius = theme.border_radius
theme.control_center_bg = theme.darker_bg
theme.control_center_widget_bg = theme.xbackground
theme.control_center_button_bg = theme.lighter_bg
-- Playerctl
theme.playerctl_ignore = { "firefox", "qutebrowser", "chromium", "brave" }
theme.playerctl_player = { "spotify", "mpd", "%any" }
theme.playerctl_update_on_activity = true
theme.playerctl_position_update_interval = 1
-- Mainmenu
theme.menu_font = theme.font_name .. "medium 10"
theme.menu_height = dpi(30)
theme.menu_width = dpi(150)
theme.menu_bg_normal = theme.xbackground
theme.menu_bg_focus = theme.lighter_bg
theme.menu_fg_normal = theme.xforeground
theme.menu_fg_focus = theme.accent
theme.menu_border_width = dpi(0)
theme.menu_border_color = theme.xcolor0
theme.menu_submenu = "» "
theme.menu_submenu_icon = nil
-- Hotkeys Pop Up
theme.hotkeys_bg = theme.xbackground
theme.hotkeys_fg = theme.xforeground
theme.hotkeys_modifiers_fg = theme.xforeground
theme.hotkeys_font = theme.font_name .. "11"
theme.hotkeys_description_font = theme.font_name .. "9"
theme.hotkeys_shape = helpers.rrect(theme.border_radius)
theme.hotkeys_group_margin = dpi(40)
-- Layout List
theme.layoutlist_border_color = theme.lighter_bg
theme.layoutlist_border_width = theme.border_width
theme.layoutlist_shape_selected = helpers.rrect(dpi(10))
theme.layoutlist_bg_selected = theme.lighter_bg
-- Recolor Layout icons:
theme = theme_assets.recolor_layout(theme, theme.xforeground)
-- Gaps
theme.useless_gap = dpi(5)
-- Wibar
theme.wibar_bg = theme.darker_bg
theme.wibar_widget_bg = theme.xbackground
-- Dock
theme.dock_bg = theme.wibar_bg
theme.dock_focused_bg = theme.lighter_bg
theme.dock_accent = theme.accent
-- Systray
theme.systray_icon_spacing = dpi(15)
theme.bg_systray = theme.wibar_bg
theme.systray_icon_size = dpi(15)
theme.systray_max_rows = 2
-- Tabs
theme.mstab_bar_height = dpi(60)
theme.mstab_bar_padding = dpi(0)
theme.mstab_border_radius = theme.border_radius
theme.tabbar_disable = true
theme.tabbar_style = "modern"
theme.tabbar_bg_focus = theme.lighter_bg
theme.tabbar_bg_normal = theme.darker_bg
theme.tabbar_fg_focus = theme.xforeground
theme.tabbar_fg_normal = theme.xcolor0
theme.tabbar_position = "bottom"
theme.tabbar_AA_radius = 0
theme.tabbar_size = 40
theme.mstab_bar_ontop = true
-- Notifications
theme.notification_spacing = dpi(20)
theme.notification_border_radius = theme.border_radius
theme.notification_border_width = dpi(0)
-- Notif center
theme.notif_center_radius = theme.border_radius
theme.notif_center_box_radius = theme.notif_center_radius / 2
theme.notif_center_notifs_bg = theme.xbackground
theme.notif_center_notifs_bg_accent = theme.darker_bg
theme.notif_center_notifs_accent = theme.lighter_bg
-- Swallowing
theme.dont_swallow_classname_list = {
"firefox",
"gimp",
"Google-chrome",
"Thunar",
}
-- Layout Machi
theme.machi_switcher_border_color = theme.darker_bg
theme.machi_switcher_border_opacity = 0.25
theme.machi_editor_border_color = theme.darker_bg
theme.machi_editor_border_opacity = 0.25
theme.machi_editor_active_opacity = 0.25
-- Tag Preview
theme.tag_preview_client_border_radius = dpi(6)
theme.tag_preview_client_opacity = 0.1
theme.tag_preview_client_bg = theme.xbackground
theme.tag_preview_client_border_color = theme.darker_bg
theme.tag_preview_client_border_width = theme.widget_border_width
theme.tag_preview_widget_border_radius = theme.border_radius
theme.tag_preview_widget_bg = theme.xbackground
theme.tag_preview_widget_border_color = theme.widget_border_color
theme.tag_preview_widget_border_width = theme.widget_border_width * 0
theme.tag_preview_widget_margin = dpi(10)
-- Task Preview
theme.task_preview_widget_border_radius = dpi(10)
theme.task_preview_widget_bg = theme.xbackground
theme.task_preview_widget_border_color = theme.widget_border_color
theme.task_preview_widget_border_width = theme.widget_border_width * 0
theme.task_preview_widget_margin = dpi(15)
theme.fade_duration = 250
return theme

View file

@ -0,0 +1,281 @@
-- Standard awesome library
local gears = require("gears")
local gfs = require("gears.filesystem")
-- Theme handling library
local themes_path = gfs.get_themes_dir()
local theme = dofile(themes_path .. "default/theme.lua")
local theme_assets = require("beautiful.theme_assets")
local xresources = require("beautiful.xresources")
local xrdb = xresources.get_current_theme()
-- Helpers
local helpers = require("helpers")
-- Aesthetic Night Theme
---------------------------
-- Rxyhn's Catppuccin Colorscheme
local color_palette = {
rosewater = "#F5E0DC", -- Rosewater
flamingo = "#F2CDCD", -- Flamingo
mauve = "#DDB6F2", -- Mauve
pink = "#F5C2E7", -- Pink
red = "#F28FAD", -- Red
maroon = "#E8A2AF", -- Maroon
peach = "#F8BD96", -- Peach
yellow = "#FAE3B0", -- Yellow
green = "#ABE9B3", -- Green
blue = "#96CDFB", -- Blue
sky = "#89DCEB", -- Sky
teal = "#B5E8E0", -- Teal
lavender = "#C9CBFF", -- Lavender
white = "#c5c8c9",
black0 = "#0d1416",
black1 = "#111719",
black2 = "#131a1c",
black3 = "#192022",
black4 = "#202729",
gray0 = "#363D3E",
gray1 = "#4A5051",
gray2 = "#5C6262",
}
theme.xbackground = color_palette.black2
theme.xforeground = color_palette.white
theme.xcolor0 = color_palette.gray0
theme.xcolor1 = color_palette.red
theme.xcolor2 = color_palette.green
theme.xcolor3 = color_palette.yellow
theme.xcolor4 = color_palette.blue
theme.xcolor5 = color_palette.mauve
theme.xcolor6 = color_palette.pink
theme.xcolor7 = color_palette.white
theme.xcolor8 = color_palette.gray1
theme.xcolor9 = color_palette.maroon
theme.xcolor10 = color_palette.teal
theme.xcolor11 = color_palette.peach
theme.xcolor12 = color_palette.sky
theme.xcolor13 = color_palette.lavender
theme.xcolor14 = color_palette.flamingo
theme.xcolor15 = color_palette.white
theme.darker_bg = color_palette.black0
theme.lighter_bg = color_palette.black3
theme.dashboard_fg = color_palette.gray2
theme.transparent = "#00000000"
-- PFP
theme.pfp = gears.surface.load_uncached(gfs.get_configuration_dir() .. "theme/assets/pfp.png")
-- Awesome Logo
theme.awesome_logo = gears.surface.load_uncached(gfs.get_configuration_dir() .. "theme/assets/icons/awesome_logo.svg")
-- Fonts
theme.font_name = "Iosevka Nerd Font Mono "
theme.font = theme.font_name .. "8"
theme.icon_font_name = "Material Design Icons Desktop "
theme.icon_font = theme.icon_font_name .. "18"
theme.font_taglist = theme.icon_font_name .. "16"
theme.prompt_font = theme.font_name .. "Bold 10"
-- Background Colors
theme.bg_dark = theme.darker_bg
theme.bg_normal = theme.xbackground
theme.bg_focus = theme.xbackground
theme.bg_urgent = theme.xbackground
theme.bg_minimize = theme.xbackground
theme.bg_secondary = theme.darker_bg
theme.bg_accent = theme.lighter_bg
-- Accent colors
theme.accent = theme.xcolor4
theme.hover_effect = theme.accent .. "44"
-- Foreground Colors
theme.fg_normal = theme.xforeground
theme.fg_focus = theme.accent
theme.fg_urgent = theme.xcolor1
theme.fg_minimize = theme.xcolor0
-- Borders
theme.border_width = dpi(0)
theme.oof_border_width = dpi(0)
theme.border_normal = theme.darker_bg
theme.border_focus = theme.darker_bg
theme.widget_border_width = dpi(2)
theme.widget_border_color = theme.darker_bg
-- Radius
theme.border_radius = dpi(10)
theme.client_radius = theme.border_radius
theme.dashboard_radius = theme.border_radius
theme.widget_radius = theme.border_radius
-- Titlebars
theme.titlebar_enabled = true
theme.titlebar_bg = theme.xbackground
theme.titlebar_fg = theme.xforeground
-- Music
theme.music_bg = theme.xbackground
theme.music_bg_accent = theme.darker_bg
theme.music_accent = theme.lighter_bg
-- Pop up
theme.pop_size = dpi(190)
theme.pop_bg = theme.xbackground
theme.pop_vol_color = theme.accent
theme.pop_brightness_color = theme.accent
theme.pop_bar_bg = theme.accent .. "44"
theme.pop_fg = theme.xforeground
theme.pop_border_radius = theme.border_radius
-- Tooltip
theme.tooltip_bg = theme.darker_bg
theme.tooltip_widget_bg = theme.xbackground
theme.tooltip_height = dpi(245)
theme.tooltip_width = dpi(200)
theme.tooltip_gap = dpi(10)
theme.tooltip_box_margin = dpi(10)
theme.tooltip_border_radius = theme.border_radius
theme.tooltip_box_border_radius = theme.widget_radius
-- Edge snap
theme.snap_bg = theme.xcolor8
theme.snap_shape = helpers.rrect(0)
-- Prompts
theme.prompt_bg = theme.transparent
theme.prompt_fg = theme.xforeground
-- Dashboard
theme.dashboard_bg = theme.darker_bg
theme.dashboard_box_bg = theme.lighter_bg
theme.dashboard_box_fg = theme.dashboard_fg
-- Control center
theme.control_center_radius = dpi(20)
theme.control_center_widget_radius = theme.border_radius
theme.control_center_bg = theme.darker_bg
theme.control_center_widget_bg = theme.xbackground
theme.control_center_button_bg = theme.lighter_bg
-- Playerctl
theme.playerctl_ignore = { "firefox", "qutebrowser", "chromium", "brave" }
theme.playerctl_player = { "spotify", "mpd", "%any" }
theme.playerctl_update_on_activity = true
theme.playerctl_position_update_interval = 1
-- Mainmenu
theme.menu_font = theme.font_name .. "medium 10"
theme.menu_height = dpi(30)
theme.menu_width = dpi(150)
theme.menu_bg_normal = theme.xbackground
theme.menu_bg_focus = theme.lighter_bg
theme.menu_fg_normal = theme.xforeground
theme.menu_fg_focus = theme.accent
theme.menu_border_width = dpi(0)
theme.menu_border_color = theme.xcolor0
theme.menu_submenu = "» "
theme.menu_submenu_icon = nil
-- Hotkeys Pop Up
theme.hotkeys_bg = theme.xbackground
theme.hotkeys_fg = theme.xforeground
theme.hotkeys_modifiers_fg = theme.xforeground
theme.hotkeys_font = theme.font_name .. "11"
theme.hotkeys_description_font = theme.font_name .. "9"
theme.hotkeys_shape = helpers.rrect(theme.border_radius)
theme.hotkeys_group_margin = dpi(40)
-- Layout List
theme.layoutlist_border_color = theme.lighter_bg
theme.layoutlist_border_width = theme.border_width
theme.layoutlist_shape_selected = helpers.rrect(dpi(10))
theme.layoutlist_bg_selected = theme.lighter_bg
-- Recolor Layout icons:
theme = theme_assets.recolor_layout(theme, theme.xforeground)
-- Gaps
theme.useless_gap = dpi(5)
-- Wibar
theme.wibar_bg = theme.darker_bg
theme.wibar_widget_bg = theme.lighter_bg
-- Dock
theme.dock_bg = theme.wibar_bg
theme.dock_focused_bg = theme.lighter_bg
theme.dock_accent = theme.accent
-- Systray
theme.systray_icon_spacing = dpi(15)
theme.bg_systray = theme.wibar_bg
theme.systray_icon_size = dpi(15)
theme.systray_max_rows = 2
-- Tabs
theme.mstab_bar_height = dpi(60)
theme.mstab_bar_padding = dpi(0)
theme.mstab_border_radius = theme.border_radius
theme.tabbar_disable = true
theme.tabbar_style = "modern"
theme.tabbar_bg_focus = theme.lighter_bg
theme.tabbar_bg_normal = theme.darker_bg
theme.tabbar_fg_focus = theme.xforeground
theme.tabbar_fg_normal = theme.xcolor0
theme.tabbar_position = "bottom"
theme.tabbar_AA_radius = 0
theme.tabbar_size = 40
theme.mstab_bar_ontop = true
-- Notifications
theme.notification_spacing = dpi(20)
theme.notification_border_radius = theme.border_radius
theme.notification_border_width = dpi(0)
-- Notif center
theme.notif_center_radius = theme.border_radius
theme.notif_center_box_radius = theme.notif_center_radius / 2
theme.notif_center_notifs_bg = theme.lighter_bg
theme.notif_center_notifs_accent = theme.xcolor0
-- Swallowing
theme.dont_swallow_classname_list = {
"firefox",
"gimp",
"Google-chrome",
"Thunar",
}
-- Layout Machi
theme.machi_switcher_border_color = theme.darker_bg
theme.machi_switcher_border_opacity = 0.25
theme.machi_editor_border_color = theme.darker_bg
theme.machi_editor_border_opacity = 0.25
theme.machi_editor_active_opacity = 0.25
-- Tag Preview
theme.tag_preview_client_border_radius = dpi(5)
theme.tag_preview_client_opacity = 0.1
theme.tag_preview_client_bg = theme.xbackground
theme.tag_preview_client_border_color = theme.darker_bg
theme.tag_preview_client_border_width = theme.widget_border_width
theme.tag_preview_widget_border_radius = theme.border_radius
theme.tag_preview_widget_bg = theme.xbackground
theme.tag_preview_widget_border_color = theme.widget_border_color
theme.tag_preview_widget_border_width = theme.widget_border_width * 0
theme.tag_preview_widget_margin = dpi(10)
-- Task Preview
theme.task_preview_widget_border_radius = theme.border_radius
theme.task_preview_widget_bg = theme.xbackground
theme.task_preview_widget_border_color = theme.widget_border_color
theme.task_preview_widget_border_width = theme.widget_border_width * 0
theme.task_preview_widget_margin = dpi(15)
theme.fade_duration = 250
return theme

View file

@ -11,7 +11,7 @@ round-borders-exclude = [
];
#========================= Shadows =========================#
shadow = false;
shadow-opacity = 0.50;
shadow-radius = 14;
shadow-opacity = 0.50;
shadow-offset-x = -14;

43
config/awesome/theme/themes Executable file
View file

@ -0,0 +1,43 @@
#!/bin/sh
# Simple theme-switcher script.
# author https://github.com/rxyhn
# var
########
awesome=$HOME/.config/awesome/rc.lua
theme=$HOME/.config/awesome/theme
term=$HOME/.config/alacritty/alacritty.yml
# Beautiful day themes
#########################
day () {
# colorscheme
sed -i "17s/.*/theme = themes[1]/g" $awesome
# picom
sed -i "14s/.*/shadow-opacity = 0.25;/g" $theme/picom.conf
# alacritty
sed -i "4s/.*/ - .config\/alacritty\/themes\/day.yml/g" $term
}
# Aesthetic night themes
###########################
night () {
# colorscheme
sed -i "17s/.*/theme = themes[2]/g" $awesome
# picom
sed -i "14s/.*/shadow-opacity = 0.50;/g" $theme/picom.conf
# alacritty
sed -i "4s/.*/ - .config\/alacritty\/themes\/night.yml/g" $term
}
case $1 in
day)
day
;;
night)
night
;;
*)
esac

View file

@ -1,371 +1 @@
-- Standard awesome library
local awful = require("awful")
local gears = require("gears")
-- Widget library
local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
-- Rubato
local rubato = require("module.rubato")
-- Helpers
local helpers = require("helpers")
-- Get screen geometry
local screen_width = awful.screen.focused().geometry.width
local screen_height = awful.screen.focused().geometry.height
-- Helpers
-------------
local wrap_widget = function(widget)
return {
widget,
margins = dpi(6),
widget = wibox.container.margin
}
end
-- Wibar
-----------
screen.connect_signal("request::desktop_decoration", function(s)
-- Launcher
-------------
local awesome_icon = wibox.widget {
{
widget = wibox.widget.imagebox,
image = beautiful.awesome_logo,
resize = true
},
margins = dpi(4),
widget = wibox.container.margin
}
helpers.add_hover_cursor(awesome_icon, "hand2")
-- Battery
-------------
local charge_icon = wibox.widget{
bg = beautiful.xcolor8,
widget = wibox.container.background,
visible = false
}
local batt = wibox.widget{
charge_icon,
color = {beautiful.xcolor2},
bg = beautiful.xcolor8 .. "88",
value = 50,
min_value = 0,
max_value = 100,
thickness = dpi(4),
padding = dpi(2),
-- rounded_edge = true,
start_angle = math.pi * 3 / 2,
widget = wibox.container.arcchart
}
awesome.connect_signal("signal::battery", function(value)
local fill_color = beautiful.xcolor2
if value >= 11 and value <= 30 then
fill_color = beautiful.xcolor3
elseif value <= 10 then
fill_color = beautiful.xcolor1
end
batt.colors = {fill_color}
batt.value = value
end)
awesome.connect_signal("signal::charger", function(state)
if state then
charge_icon.visible = true
else
charge_icon.visible = false
end
end)
-- Time
----------
local hour = wibox.widget{
font = beautiful.font_name .. "bold 14",
format = "%H",
align = "center",
valign = "center",
widget = wibox.widget.textclock
}
local min = wibox.widget{
font = beautiful.font_name .. "bold 14",
format = "%M",
align = "center",
valign = "center",
widget = wibox.widget.textclock
}
local clock = wibox.widget{
{
{
hour,
min,
spacing = dpi(5),
layout = wibox.layout.fixed.vertical
},
top = dpi(5),
bottom = dpi(5),
widget = wibox.container.margin
},
bg = beautiful.lighter_bg,
shape = helpers.rrect(beautiful.bar_radius),
widget = wibox.container.background
}
-- Stats
-----------
local stats = wibox.widget{
{
wrap_widget(batt),
clock,
spacing = dpi(5),
layout = wibox.layout.fixed.vertical
},
bg = beautiful.xcolor0,
shape = helpers.rrect(beautiful.bar_radius),
widget = wibox.container.background
}
stats:connect_signal("mouse::enter", function()
stats.bg = beautiful.xcolor8
stats_tooltip_show()
end)
stats:connect_signal("mouse::leave", function()
stats.bg = beautiful.xcolor0
stats_tooltip_hide()
end)
-- Notification center
-------------------------
notif_center = wibox({
type = "dock",
screen = screen.primary,
height = screen_height - dpi(50),
width = dpi(300),
shape = helpers.rrect(beautiful.notif_center_radius),
ontop = true,
visible = false
})
notif_center.y = dpi(25)
-- Rubato
local slide = rubato.timed{
pos = dpi(-300),
rate = 60,
intro = 0.3,
duration = 0.8,
easing = rubato.quadratic,
awestore_compat = true,
subscribed = function(pos) notif_center.x = pos end
}
local notif_center_status = false
slide.ended:subscribe(function()
if notif_center_status then
notif_center.visible = false
end
end)
-- Make toogle button
local notif_center_show = function()
notif_center.visible = true
slide:set(dpi(100))
notif_center_status = false
end
local notif_center_hide = function()
slide:set(dpi(-375))
notif_center_status = true
end
local notif_center_toggle = function()
if notif_center.visible then
notif_center_hide()
else
notif_center_show()
end
end
-- notif_center setup
s.notif_center = require('ui.notifs.notif-center')(s)
notif_center:setup {
s.notif_center,
margins = dpi(15),
widget = wibox.container.margin
}
local notif_center_button = wibox.widget{
markup = helpers.colorize_text("", beautiful.xcolor4),
font = beautiful.font_name .. "18",
align = "center",
valign = "center",
widget = wibox.widget.textbox
}
notif_center_button:connect_signal("mouse::enter", function()
notif_center_button.markup = helpers.colorize_text(notif_center_button.text, beautiful.xcolor4 .. 55)
end)
notif_center_button:connect_signal("mouse::leave", function()
notif_center_button.markup = helpers.colorize_text(notif_center_button.text, beautiful.xcolor4)
end)
notif_center_button:buttons(gears.table.join(
awful.button({}, 1, function()
notif_center_toggle()
end)
))
helpers.add_hover_cursor(notif_center_button, "hand2")
-- Setup wibar
-----------------
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
-- Layoutbox
local layoutbox_buttons = gears.table.join(
-- Left click
awful.button({}, 1, function (c)
awful.layout.inc(1)
end),
-- Right click
awful.button({}, 3, function (c)
awful.layout.inc(-1)
end),
-- Scrolling
awful.button({}, 4, function ()
awful.layout.inc(-1)
end),
awful.button({}, 5, function ()
awful.layout.inc(1)
end)
)
s.mylayoutbox = awful.widget.layoutbox(s)
s.mylayoutbox:buttons(layoutbox_buttons)
local layoutbox = wibox.widget{
s.mylayoutbox,
margins = {bottom = dpi(7), left = dpi(8), right = dpi(8)},
widget = wibox.container.margin
}
helpers.add_hover_cursor(layoutbox, "hand2")
-- Create the wibar
s.mywibar = awful.wibar({
type = "dock",
position = "left",
screen = s,
height = awful.screen.focused().geometry.height - dpi(50),
width = dpi(50),
shape = helpers.rrect(beautiful.border_radius),
bg = beautiful.transparent,
ontop = true,
visible = true
})
awesome_icon:buttons(gears.table.join(
awful.button({}, 1, function ()
dashboard_toggle()
end)
))
-- Remove wibar on full screen
local function remove_wibar(c)
if c.fullscreen or c.maximized then
c.screen.mywibar.visible = false
else
c.screen.mywibar.visible = true
end
end
-- Remove wibar on full screen
local function add_wibar(c)
if c.fullscreen or c.maximized then
c.screen.mywibar.visible = true
end
end
client.connect_signal("property::fullscreen", remove_wibar)
client.connect_signal("request::unmanage", add_wibar)
-- Create the taglist widget
s.mytaglist = require("ui.widgets.pacman_taglist")(s)
local taglist = wibox.widget{
s.mytaglist,
shape = beautiful.taglist_shape_focus,
bg = beautiful.xcolor0,
widget = wibox.container.background
}
-- Add widgets to wibar
s.mywibar:setup {
{
{
layout = wibox.layout.align.vertical,
expand = "none",
{ -- top
awesome_icon,
taglist,
spacing = dpi(10),
layout = wibox.layout.fixed.vertical
},
-- middle
nil,
{ -- bottom
stats,
notif_center_button,
layoutbox,
spacing = dpi(8),
layout = wibox.layout.fixed.vertical
}
},
margins = dpi(8),
widget = wibox.container.margin
},
bg = beautiful.darker_bg,
shape = helpers.rrect(beautiful.border_radius),
widget = wibox.container.background
}
-- wibar position
s.mywibar.x = dpi(25)
end)
require("ui.bar.topwibar")

View file

@ -0,0 +1,288 @@
local wibox = require("wibox")
local awful = require("awful")
local gears = require("gears")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
-- Papirus Taglist from https://github.com/crylia
local icon_cache = {}
function Get_icon(theme, client, program_string, class_string, is_steam)
client = client or nil
program_string = program_string or nil
class_string = class_string or nil
is_steam = is_steam or nil
if theme and (client or program_string or class_string) then
local clientName
if is_steam then
clientName = "steam_icon_" .. tostring(client) .. ".svg"
elseif client then
if client.class then
clientName = string.lower(client.class:gsub(" ", "")) .. ".svg"
elseif client.name then
clientName = string.lower(client.name:gsub(" ", "")) .. ".svg"
else
if client.icon then
return client.icon
else
return "/usr/share/icons/Papirus-Dark/128x128/apps/application-default-icon.svg"
end
end
else
if program_string then
clientName = program_string .. ".svg"
else
clientName = class_string .. ".svg"
end
end
for index, icon in ipairs(icon_cache) do
if icon:match(clientName) then
return icon
end
end
local resolutions = { "128x128", "96x96", "64x64", "48x48", "42x42", "32x32", "24x24", "16x16" }
for i, res in ipairs(resolutions) do
local iconDir = "/usr/share/icons/" .. theme .. "/" .. res .. "/apps/"
local ioStream = io.open(iconDir .. clientName, "r")
if ioStream ~= nil then
icon_cache[#icon_cache + 1] = iconDir .. clientName
return iconDir .. clientName
else
clientName = clientName:gsub("^%l", string.upper)
iconDir = "/usr/share/icons/" .. theme .. "/" .. res .. "/apps/"
ioStream = io.open(iconDir .. clientName, "r")
if ioStream ~= nil then
icon_cache[#icon_cache + 1] = iconDir .. clientName
return iconDir .. clientName
elseif not class_string then
return "/usr/share/icons/Papirus-Dark/128x128/apps/application-default-icon.svg"
else
clientName = class_string .. ".svg"
iconDir = "/usr/share/icons/" .. theme .. "/" .. res .. "/apps/"
ioStream = io.open(iconDir .. clientName, "r")
if ioStream ~= nil then
icon_cache[#icon_cache + 1] = iconDir .. clientName
return iconDir .. clientName
else
return "/usr/share/icons/Papirus-Dark/128x128/apps/application-default-icon.svg"
end
end
end
end
if client then
return "/usr/share/icons/Papirus-Dark/128x128/apps/application-default-icon.svg"
end
end
end
local list_update = function(widget, buttons, label, data, objects)
widget:reset()
for i, object in ipairs(objects) do
local tag_icon = wibox.widget({
nil,
{
id = "icon",
resize = true,
widget = wibox.widget.imagebox,
},
nil,
layout = wibox.layout.align.horizontal,
})
local tag_icon_margin = wibox.widget({
tag_icon,
forced_width = dpi(33),
margins = dpi(3),
widget = wibox.container.margin,
})
local tag_label = wibox.widget({
text = "",
align = "center",
valign = "center",
visible = true,
font = beautiful.font_name .. "Bold 12",
forced_width = dpi(25),
widget = wibox.widget.textbox,
})
local tag_label_margin = wibox.widget({
tag_label,
left = dpi(5),
right = dpi(5),
widget = wibox.container.margin,
})
local tag_widget = wibox.widget({
id = "widget_margin",
{
id = "container",
tag_label_margin,
layout = wibox.layout.fixed.horizontal,
},
fg = beautiful.xforeground,
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
end,
widget = wibox.container.background,
})
local function create_buttons(buttons, object)
if buttons then
local btns = {}
for _, b in ipairs(buttons) do
local btn = awful.button({
modifiers = b.modifiers,
button = b.button,
on_press = function()
b:emit_signal("press", object)
end,
on_release = function()
b:emit_signal("release", object)
end,
})
btns[#btns + 1] = btn
end
return btns
end
end
tag_widget:buttons(create_buttons(buttons, object))
local text, bg_color, bg_image, icon, args = label(object, tag_label)
tag_label:set_text(object.index)
if object.urgent == true then
tag_widget:set_bg(beautiful.xcolor1)
tag_widget:set_fg(beautiful.xforeground)
elseif object == awful.screen.focused().selected_tag then
tag_widget:set_bg(beautiful.lighter_bg)
tag_widget:set_fg(beautiful.xforeground)
else
tag_widget:set_bg(beautiful.lighter_bg .. 55)
end
-- Set the icon for each client
for _, client in ipairs(object:clients()) do
tag_label_margin:set_right(0)
local icon = wibox.widget({
{
id = "icon_container",
{
id = "icon",
resize = true,
widget = wibox.widget.imagebox,
},
widget = wibox.container.place,
},
tag_icon_margin,
forced_width = dpi(33),
margins = dpi(6),
widget = wibox.container.margin,
})
icon.icon_container.icon:set_image(Get_icon("Papirus-Dark", client))
tag_widget.container:setup({
icon,
strategy = "exact",
layout = wibox.container.constraint,
})
end
local old_wibox, old_cursor, old_bg
tag_widget:connect_signal("mouse::enter", function()
old_bg = tag_widget.bg
if object == awful.screen.focused().selected_tag then
tag_widget.bg = beautiful.accent .. 55
else
tag_widget.bg = beautiful.accent .. 55
end
local w = mouse.current_wibox
if w then
old_cursor, old_wibox = w.cursor, w
w.cursor = "hand1"
end
end)
tag_widget:connect_signal("button::press", function()
if object == awful.screen.focused().selected_tag then
tag_widget.bg = beautiful.accent .. 55
else
tag_widget.bg = beautiful.accent
end
end)
tag_widget:connect_signal("button::release", function()
if object == awful.screen.focused().selected_tag then
tag_widget.bg = beautiful.accent
else
tag_widget.bg = beautiful.accent .. 55
end
end)
tag_widget:connect_signal("mouse::leave", function()
tag_widget.bg = old_bg
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end)
-- Bling tag preview
tag_widget:connect_signal("mouse::enter", function()
if #object:clients() > 0 then
awesome.emit_signal("bling::tag_preview::update", object)
awesome.emit_signal("bling::tag_preview::visibility", awful.screen.focused(), true)
end
end)
tag_widget:connect_signal("mouse::leave", function()
awesome.emit_signal("bling::tag_preview::visibility", awful.screen.focused(), false)
end)
widget:add(tag_widget)
widget:set_spacing(dpi(6))
end
end
local tag_list = function(s)
return awful.widget.taglist(
s,
awful.widget.taglist.filter.noempty,
gears.table.join(
awful.button({}, 1, function(t)
t:view_only()
end),
awful.button({ modkey }, 1, function(t)
if client.focus then
client.focus:move_to_tag(t)
end
end),
awful.button({}, 3, function(t)
if client.focus then
client.focus:toggle_tag(t)
end
end),
awful.button({ modkey }, 3, function(t)
if client.focus then
client.focus:toggle_tag(t)
end
end),
awful.button({}, 4, function(t)
awful.tag.viewnext(t.screen)
end),
awful.button({}, 5, function(t)
awful.tag.viewprev(t.screen)
end)
),
{},
list_update,
wibox.layout.fixed.horizontal()
)
end
return tag_list

View file

@ -0,0 +1,419 @@
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
local helpers = require("helpers")
awful.screen.connect_for_each_screen(function(s)
local awesome_icon = wibox.widget({
widget = wibox.widget.imagebox,
image = beautiful.awesome_logo,
resize = true,
})
local launcher = wibox.widget({
{
awesome_icon,
top = dpi(6),
bottom = dpi(6),
left = dpi(12),
right = dpi(12),
widget = wibox.container.margin,
},
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, dpi(5))
end,
bg = beautiful.wibar_widget_bg,
widget = wibox.container.background,
})
launcher:buttons(gears.table.join(awful.button({}, 1, function()
central_panel:toggle()
end)))
helpers.add_hover_cursor(awesome_icon, "hand2")
local search_icon = wibox.widget({
font = "icomoon bold 14",
align = "center",
valign = "center",
widget = wibox.widget.textbox(),
})
local reset_search_icon = function()
search_icon.markup = helpers.colorize_text("", beautiful.accent)
end
reset_search_icon()
local search_text = wibox.widget({
markup = helpers.colorize_text("Search", beautiful.xcolor8),
align = "center",
valign = "center",
font = beautiful.prompt_font,
widget = wibox.widget.textbox(),
})
local search = wibox.widget({
{
{
search_icon,
search_text,
spacing = dpi(10),
layout = wibox.layout.fixed.horizontal,
},
left = dpi(15),
widget = wibox.container.margin,
},
forced_height = dpi(35),
forced_width = dpi(200),
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, dpi(5))
end,
bg = beautiful.wibar_widget_bg,
widget = wibox.container.background,
})
local function generate_prompt_icon(icon, color)
return "<span font='icomoon 14' foreground='" .. color .. "'>" .. icon .. "</span> "
end
function activate_prompt(action)
search_icon.visible = false
local prompt
if action == "run" then
prompt = generate_prompt_icon("", beautiful.accent)
elseif action == "web_search" then
prompt = generate_prompt_icon("", beautiful.accent)
end
helpers.prompt(action, search_text, prompt, function()
search_icon.visible = true
end)
end
search:buttons(gears.table.join(
awful.button({}, 1, function()
activate_prompt("run")
end),
awful.button({}, 3, function()
activate_prompt("web_search")
end)
))
helpers.add_hover_cursor(search, "hand2")
-- battery
local charge_icon = wibox.widget({
markup = helpers.colorize_text("󱐋", beautiful.wibar_bg),
align = "center",
valign = "center",
font = beautiful.icon_font_name .. "16",
widget = wibox.widget.textbox,
visible = false,
})
local batt = wibox.widget({
color = beautiful.xcolor2,
background_color = beautiful.xcolor2 .. "55",
bar_shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, dpi(5))
end,
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, dpi(5))
end,
value = 50,
max_value = 100,
widget = wibox.widget.progressbar,
})
local batt_container = wibox.widget({
{
batt,
forced_height = dpi(35),
forced_width = dpi(100),
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, dpi(5))
end,
bg = beautiful.wibar_widget_bg,
widget = wibox.container.background,
},
charge_icon,
valign = "center",
layout = wibox.layout.stack,
})
local batt_last_value = 100
local batt_low_value = 40
local batt_critical_value = 20
awesome.connect_signal("signal::battery", function(value)
batt.value = value
batt_last_value = value
local color
if charge_icon.visible then
color = beautiful.xcolor6
elseif value <= batt_critical_value then
color = beautiful.xcolor1
elseif value <= batt_low_value then
color = beautiful.xcolor3
else
color = beautiful.xcolor2
end
batt.color = color
batt.background_color = color .. "44"
end)
awesome.connect_signal("signal::charger", function(state)
local color
if state then
charge_icon.visible = true
color = beautiful.xcolor6
elseif batt_last_value <= batt_critical_value then
charge_icon.visible = false
color = beautiful.xcolor1
elseif batt_last_value <= batt_low_value then
charge_icon.visible = false
color = beautiful.xcolor3
else
charge_icon.visible = false
color = beautiful.xcolor2
end
batt.color = color
batt.background_color = color .. "44"
end)
local vertical_separator = wibox.widget({
orientation = "vertical",
color = beautiful.wibar_bg,
forced_height = dpi(1),
forced_width = dpi(1),
span_ratio = 0.90,
widget = wibox.widget.separator,
})
-- clock
local hours = wibox.widget.textclock("%H")
local minutes = wibox.widget.textclock("%M")
local make_little_dot = function(color)
return wibox.widget({
bg = color,
forced_width = dpi(2),
forced_height = dpi(2),
shape = gears.shape.circle,
widget = wibox.container.background,
})
end
local time = {
{
font = beautiful.font_name .. "Bold 12",
align = "right",
valign = "center",
widget = hours,
},
{
nil,
{
make_little_dot(beautiful.xforeground),
make_little_dot(beautiful.xforeground),
spacing = dpi(4),
widget = wibox.layout.fixed.vertical,
},
expand = "none",
widget = wibox.layout.align.vertical,
},
{
font = beautiful.font_name .. "Bold 12",
align = "left",
valign = "center",
widget = minutes,
},
spacing = dpi(4),
layout = wibox.layout.fixed.horizontal,
}
local layoutbox_buttons = gears.table.join(
-- Left click
awful.button({}, 1, function(c)
awful.layout.inc(1)
end),
-- Right click
awful.button({}, 3, function(c)
awful.layout.inc(-1)
end),
-- Scrolling
awful.button({}, 4, function()
awful.layout.inc(-1)
end),
awful.button({}, 5, function()
awful.layout.inc(1)
end)
)
s.mylayoutbox = awful.widget.layoutbox(s)
s.mylayoutbox:buttons(layoutbox_buttons)
local layoutbox = wibox.widget({
s.mylayoutbox,
left = dpi(2),
right = dpi(2),
top = dpi(3),
bottom = dpi(3),
widget = wibox.container.margin,
})
helpers.add_hover_cursor(layoutbox, "hand2")
local right_container = wibox.widget({
{
{
time,
vertical_separator,
layoutbox,
layout = wibox.layout.fixed.horizontal,
spacing = dpi(10),
},
top = dpi(4),
bottom = dpi(4),
left = dpi(8),
right = dpi(8),
widget = wibox.container.margin,
},
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, dpi(5))
end,
bg = beautiful.wibar_widget_bg,
widget = wibox.container.background,
})
right_container:connect_signal("mouse::enter", function()
right_container.bg = beautiful.wibar_widget_bg .. 55
tooltip_toggle()
end)
right_container:connect_signal("mouse::leave", function()
right_container.bg = beautiful.wibar_widget_bg
tooltip_toggle()
end)
-- Systray
s.systray = wibox.widget.systray()
s.systray.base_size = beautiful.systray_icon_size
s.traybox = wibox({
screen = s,
width = dpi(100),
height = dpi(150),
bg = "#00000000",
visible = false,
ontop = true,
})
s.traybox:setup({
{
{
nil,
s.systray,
direction = "west",
widget = wibox.container.rotate,
},
margins = dpi(15),
widget = wibox.container.margin,
},
bg = beautiful.wibar_bg,
shape = helpers.rrect(beautiful.border_radius),
widget = wibox.container.background,
})
awful.placement.top_right(s.traybox, {
margins = {
top = beautiful.useless_gap * 16,
bottom = beautiful.useless_gap * 4,
left = beautiful.useless_gap * 4,
right = beautiful.useless_gap * 4,
},
})
s.traybox:buttons(gears.table.join(awful.button({}, 2, function()
s.traybox.visible = false
end)))
-- Create the wibox
s.mywibar = awful.wibar({
type = "dock",
position = "top",
screen = s,
height = dpi(50),
width = s.geometry.width - dpi(40),
bg = beautiful.transparent,
ontop = true,
visible = true,
})
awful.placement.top(s.mywibar, { margins = beautiful.useless_gap * 3 })
-- Remove wibar on full screen
local function remove_wibar(c)
if c.fullscreen or c.maximized then
c.screen.mywibar.visible = false
else
c.screen.mywibar.visible = true
end
end
-- Remove wibar on full screen
local function add_wibar(c)
if c.fullscreen or c.maximized then
c.screen.mywibar.visible = true
end
end
-- Hide bar when a splash widget is visible
awesome.connect_signal("widgets::splash::visibility", function(vis)
screen.primary.mywibar.visible = not vis
end)
client.connect_signal("property::fullscreen", remove_wibar)
client.connect_signal("request::unmanage", add_wibar)
-- Create the taglist widget
s.mytaglist = require("ui.bar.taglist")(s)
-- Add widgets to the wibox
s.mywibar:setup({
{
{
layout = wibox.layout.align.horizontal,
expand = "none",
{
launcher,
nil,
search,
spacing = dpi(10),
layout = wibox.layout.fixed.horizontal,
},
{
widget = s.mytaglist,
},
{
batt_container,
right_container,
spacing = dpi(10),
layout = wibox.layout.fixed.horizontal,
},
},
margins = dpi(10),
widget = wibox.container.margin,
},
bg = beautiful.wibar_bg,
shape = helpers.rrect(beautiful.border_radius),
widget = wibox.container.background,
})
end)
-- Systray toggle
function systray_toggle()
local s = awful.screen.focused()
s.traybox.visible = not s.traybox.visible
end

View file

@ -0,0 +1,38 @@
-- Standard awesome library
local awful = require("awful")
-- Theme handling library
local beautiful = require("beautiful")
-- Widget library
local wibox = require("wibox")
-- Helpers
local helpers = require("helpers")
-- Date
---------
local date_day = wibox.widget({
font = beautiful.font_name .. "medium 8",
format = helpers.colorize_text("%A", beautiful.xforeground .. "c6"),
valign = "center",
widget = wibox.widget.textclock,
})
local date_month = wibox.widget({
font = beautiful.font_name .. "medium 11",
format = "%d %B",
valign = "center",
widget = wibox.widget.textclock,
})
local date = wibox.widget({
date_day,
nil,
date_month,
expand = "none",
widget = wibox.layout.align.vertical,
})
return date

View file

@ -0,0 +1,109 @@
-- Theme handling library
local beautiful = require("beautiful")
-- Widget library
local wibox = require("wibox")
-- Helpers
local helpers = require("helpers")
local function centered_widget(widget)
local w = wibox.widget({
nil,
{
nil,
widget,
expand = "none",
layout = wibox.layout.align.vertical,
},
expand = "none",
layout = wibox.layout.align.horizontal,
})
return w
end
local function create_boxed_widget(widget_to_be_boxed, width, height, bg_color)
local box_container = wibox.container.background()
box_container.bg = bg_color
box_container.forced_height = height
box_container.forced_width = width
box_container.shape = helpers.rrect(dpi(5))
local boxed_widget = wibox.widget({
-- Add margins
{
-- Add background color
{
-- The actual widget goes here
widget_to_be_boxed,
top = dpi(9),
bottom = dpi(9),
left = dpi(10),
right = dpi(10),
widget = wibox.container.margin,
},
widget = box_container,
},
margins = dpi(10),
color = "#FF000000",
widget = wibox.container.margin,
})
return boxed_widget
end
-- Aesthetic Dashboard
-------------------------
-- Widget
local dashboard = function(s)
s.profile = require("ui.central-panel.dashboard.profile")
s.music = require("ui.central-panel.dashboard.music")
s.media = require("ui.central-panel.dashboard.mediakeys")
s.time = require("ui.central-panel.dashboard.time")
s.date = require("ui.central-panel.dashboard.date")
s.todo = require("ui.central-panel.dashboard.todo")
s.weather = require("ui.central-panel.dashboard.weather")
s.stats = require("ui.central-panel.dashboard.stats")
s.time_boxed = create_boxed_widget(centered_widget(s.time), dpi(260), dpi(90), beautiful.transparent)
s.date_boxed = create_boxed_widget(s.date, dpi(120), dpi(50), beautiful.dashboard_box_bg)
s.todo_boxed = create_boxed_widget(s.todo, dpi(120), dpi(120), beautiful.dashboard_box_bg)
s.weather_boxed = create_boxed_widget(s.weather, dpi(120), dpi(120), beautiful.dashboard_box_bg)
s.stats_boxed = create_boxed_widget(s.stats, dpi(120), dpi(190), beautiful.dashboard_box_bg)
-- Dashboard setup
return wibox.widget({
nil,
{
s.time_boxed,
{
{
s.profile,
s.stats_boxed,
layout = wibox.layout.fixed.vertical,
},
{
s.date_boxed,
s.todo_boxed,
s.weather_boxed,
layout = wibox.layout.fixed.vertical,
},
layout = wibox.layout.fixed.horizontal,
},
{
s.music,
s.media,
layout = wibox.layout.fixed.horizontal,
},
s.notifs_boxed,
layout = wibox.layout.fixed.vertical,
},
expand = "none",
layout = wibox.layout.align.horizontal,
})
end
return dashboard

View file

@ -0,0 +1,93 @@
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
-- Theme handling library
local beautiful = require("beautiful")
-- Widget library
local wibox = require("wibox")
-- Helpers
local helpers = require("helpers")
-- Media Keys
---------------
--playerctl
local playerctl = require("module.bling").signal.playerctl.lib()
-- Helpers
local create_media_button = function(symbol, color, command, playpause)
local icon = wibox.widget({
markup = helpers.colorize_text(symbol, color),
font = beautiful.icon_font_name .. "16",
align = "center",
valign = "center",
widget = wibox.widget.textbox(),
})
playerctl:connect_signal("playback_status", function(_, playing, __)
if playpause then
if playing then
icon:set_markup_silently(helpers.colorize_text("󰏦", color))
else
icon:set_markup_silently(helpers.colorize_text("󰐍", color))
end
end
end)
icon:buttons(gears.table.join(awful.button({}, 1, function()
command()
end)))
icon:connect_signal("mouse::enter", function()
icon.markup = helpers.colorize_text(icon.text, beautiful.xcolor15)
end)
icon:connect_signal("mouse::leave", function()
icon.markup = helpers.colorize_text(icon.text, color)
end)
return icon
end
-- Widget
local media_play_command = function()
playerctl:play_pause()
end
local media_prev_command = function()
playerctl:previous()
end
local media_next_command = function()
playerctl:next()
end
local media_play = create_media_button("󰐍", beautiful.xforeground, media_play_command, true)
local media_prev = create_media_button("󰒮", beautiful.xforeground, media_prev_command, false)
local media_next = create_media_button("󰒭", beautiful.xforeground, media_next_command, false)
local media = wibox.widget({
{
{
{
media_prev,
media_play,
media_next,
expand = "none",
layout = wibox.layout.align.vertical,
},
margins = dpi(9),
widget = wibox.container.margin,
},
bg = beautiful.dashboard_box_bg,
shape = helpers.rrect(5),
forced_width = dpi(40),
forced_height = dpi(120),
widget = wibox.container.background,
},
margins = dpi(10),
widget = wibox.container.margin,
})
return media

View file

@ -0,0 +1,167 @@
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
-- Theme handling library
local beautiful = require("beautiful")
-- Widget library
local wibox = require("wibox")
-- Helpers
local helpers = require("helpers")
-- Music
----------
local music_text = wibox.widget({
font = beautiful.font_name .. "medium 8",
valign = "center",
widget = wibox.widget.textbox,
})
local music_art = wibox.widget({
image = gears.filesystem.get_configuration_dir() .. "theme/assets/no_music.png",
resize = true,
widget = wibox.widget.imagebox,
})
local music_art_container = wibox.widget({
music_art,
forced_height = dpi(120),
forced_width = dpi(120),
widget = wibox.container.background,
})
local filter_color = {
type = "linear",
from = { 0, 0 },
to = { 0, 120 },
stops = { { 0, beautiful.dashboard_box_bg .. "cc" }, { 1, beautiful.dashboard_box_bg } },
}
local music_art_filter = wibox.widget({
{
bg = filter_color,
forced_height = dpi(120),
forced_width = dpi(120),
widget = wibox.container.background,
},
direction = "east",
widget = wibox.container.rotate,
})
local music_title = wibox.widget({
font = beautiful.font_name .. "medium 9",
valign = "center",
widget = wibox.widget.textbox,
})
local music_artist = wibox.widget({
font = beautiful.font_name .. "medium 12",
valign = "center",
widget = wibox.widget.textbox,
})
local music_pos = wibox.widget({
font = beautiful.font_name .. "medium 8",
valign = "center",
widget = wibox.widget.textbox,
})
-- playerctl
---------------
local playerctl = require("module.bling").signal.playerctl.lib()
playerctl:connect_signal("metadata", function(_, title, artist, album_path, __, ___, ____)
if title == "" then
title = "Nothing Playing"
end
if artist == "" then
artist = "Nothing Playing"
end
if album_path == "" then
album_path = gears.filesystem.get_configuration_dir() .. "theme/assets/no_music.png"
end
music_art:set_image(gears.surface.load_uncached(album_path))
music_title:set_markup_silently(helpers.colorize_text(title, beautiful.xforeground .. "b3"))
music_artist:set_markup_silently(helpers.colorize_text(artist, beautiful.xforeground .. "e6"))
end)
playerctl:connect_signal("playback_status", function(_, playing, __)
if playing then
music_text:set_markup_silently(helpers.colorize_text("Now Playing", beautiful.xforeground .. "cc"))
else
music_text:set_markup_silently(helpers.colorize_text("Music", beautiful.xforeground .. "cc"))
end
end)
playerctl:connect_signal("position", function(_, interval_sec, length_sec, player_name)
local pos_now = tostring(os.date("!%M:%S", math.floor(interval_sec)))
local pos_length = tostring(os.date("!%M:%S", math.floor(length_sec)))
local pos_markup = helpers.colorize_text(pos_now .. " / " .. pos_length, beautiful.xforeground .. "66")
music_pos:set_markup_silently(pos_markup)
end)
local music = wibox.widget({
{
{
{
music_art_container,
music_art_filter,
layout = wibox.layout.stack,
},
{
{
music_text,
{
{
{
step_function = wibox.container.scroll.step_functions.waiting_nonlinear_back_and_forth,
speed = 50,
{
widget = music_artist,
},
forced_width = dpi(180),
widget = wibox.container.scroll.horizontal,
},
{
step_function = wibox.container.scroll.step_functions.waiting_nonlinear_back_and_forth,
speed = 50,
{
widget = music_title,
},
forced_width = dpi(180),
widget = wibox.container.scroll.horizontal,
},
layout = wibox.layout.fixed.vertical,
},
bottom = dpi(15),
widget = wibox.container.margin,
},
music_pos,
expand = "none",
layout = wibox.layout.align.vertical,
},
top = dpi(9),
bottom = dpi(9),
left = dpi(10),
right = dpi(10),
widget = wibox.container.margin,
},
layout = wibox.layout.stack,
},
bg = beautiful.dashboard_box_bg,
shape = helpers.rrect(dpi(5)),
forced_width = dpi(200),
forced_height = dpi(120),
widget = wibox.container.background,
},
margins = dpi(10),
widget = wibox.container.margin,
})
return music

View file

@ -0,0 +1,39 @@
-- Standard awesome library
local awful = require("awful")
-- Theme handling library
local beautiful = require("beautiful")
-- Widget library
local wibox = require("wibox")
-- Helpers
local helpers = require("helpers")
-- Profile
------------
local profile_pic_img = wibox.widget({
image = beautiful.pfp,
halign = "center",
valign = "center",
widget = wibox.widget.imagebox,
})
local profile_pic_container = wibox.widget({
shape = helpers.rrect(5),
forced_height = dpi(120),
forced_width = dpi(120),
widget = wibox.container.background,
})
local profile = wibox.widget({
{
profile_pic_img,
widget = profile_pic_container,
},
margins = dpi(10),
widget = wibox.container.margin,
})
return profile

View file

@ -0,0 +1,187 @@
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
-- Theme handling library
local beautiful = require("beautiful")
-- Notification library
local naughty = require("naughty")
-- Widget library
local wibox = require("wibox")
-- rubato
local rubato = require("module.rubato")
-- Helpers
local helpers = require("helpers")
-- Stats
----------
local stats_text = wibox.widget({
font = beautiful.font_name .. "medium 8",
markup = helpers.colorize_text("Stats", beautiful.dashboard_box_fg),
valign = "center",
widget = wibox.widget.textbox,
})
-- Vars
local vol_color = beautiful.xcolor4
local brightness_color = beautiful.xcolor5
local cpu_color = beautiful.xcolor6
local ram_color = beautiful.xcolor2
-- Helpers
local function create_slider_widget(slider_color)
local slider_widget = wibox.widget({
{
id = "slider",
max_value = 100,
value = 20,
background_color = slider_color .. "44",
color = slider_color,
shape = gears.shape.rounded_rect,
bar_shape = gears.shape.rounded_rect,
widget = wibox.widget.progressbar,
},
forced_width = dpi(4),
forced_height = dpi(145),
direction = "east",
widget = wibox.container.rotate,
})
return slider_widget
end
local stats_tooltip = wibox.widget({
visible = false,
top_only = true,
layout = wibox.layout.stack,
})
local tooltip_counter = 0
local function create_tooltip(w)
local tooltip = wibox.widget({
font = beautiful.font_name .. "medium 8",
align = "right",
valign = "center",
widget = wibox.widget.textbox,
})
tooltip_counter = tooltip_counter + 1
local index = tooltip_counter
stats_tooltip:insert(index, tooltip)
w:connect_signal("mouse::enter", function()
-- Raise tooltip to the top of the stack
stats_tooltip:set(1, tooltip)
stats_tooltip.visible = true
end)
w:connect_signal("mouse::leave", function()
stats_tooltip.visible = false
end)
return tooltip
end
-- Widget
local vol = create_slider_widget(vol_color)
local brightness = create_slider_widget(brightness_color)
local cpu = create_slider_widget(cpu_color)
local ram = create_slider_widget(ram_color)
local vol_tooltip = create_tooltip(vol)
local brightness_tooltip = create_tooltip(brightness)
local cpu_tooltip = create_tooltip(cpu)
local ram_tooltip = create_tooltip(ram)
awesome.connect_signal("signal::volume", function(value, muted)
local fill_color
local vol_value = value or 0
if muted then
fill_color = beautiful.xcolor8
else
fill_color = vol_color
end
vol.slider.value = vol_value
vol.slider.color = fill_color
vol_tooltip.markup = helpers.colorize_text(vol_value .. "%", vol_color)
end)
awesome.connect_signal("signal::brightness", function(value)
brightness.slider.value = value
brightness_tooltip.markup = helpers.colorize_text(value .. "%", brightness_color)
end)
awesome.connect_signal("signal::cpu", function(value)
cpu.slider.value = value
cpu_tooltip.markup = helpers.colorize_text(value .. "%", cpu_color)
end)
awesome.connect_signal("signal::ram", function(used, total)
local r_average = (used / total) * 100
local r_used = string.format("%.1f", used / 1000) .. "G"
ram.slider.value = r_average
ram_tooltip.markup = helpers.colorize_text(r_used, ram_color)
end)
vol:buttons(gears.table.join(
awful.button({}, 1, function()
helpers.volume_control(0)
end),
-- Scrolling
awful.button({}, 4, function()
helpers.volume_control(5)
end),
awful.button({}, 5, function()
helpers.volume_control(-5)
end)
))
brightness:buttons(gears.table.join(
-- Scrolling
awful.button({}, 4, function()
awful.spawn.with_shell("brightnessctl set 5%+ -q")
end),
awful.button({}, 5, function()
awful.spawn.with_shell("brightnessctl set 5%- -q")
end)
))
local stats = wibox.widget({
{
stats_text,
nil,
stats_tooltip,
expand = "none",
layout = wibox.layout.align.horizontal,
},
{
nil,
{
nil,
{
vol,
brightness,
cpu,
ram,
spacing = dpi(24),
layout = wibox.layout.fixed.horizontal,
},
expand = "none",
layout = wibox.layout.fixed.vertical,
},
expand = "none",
layout = wibox.layout.align.horizontal,
},
spacing = dpi(10),
layout = wibox.layout.fixed.vertical,
})
return stats

View file

@ -0,0 +1,57 @@
-- Standard awesome library
local awful = require("awful")
-- Theme handling library
local beautiful = require("beautiful")
-- Widget library
local wibox = require("wibox")
-- Helpers
local helpers = require("helpers")
-- Time
---------
local hours = wibox.widget.textclock("%H")
local minutes = wibox.widget.textclock("%M")
local make_little_dot = function(color)
return wibox.widget({
bg = color,
forced_width = dpi(10),
forced_height = dpi(10),
shape = helpers.rrect(dpi(2)),
widget = wibox.container.background,
})
end
local time = {
{
font = beautiful.font_name .. "bold 44",
align = "right",
valign = "top",
widget = hours,
},
{
nil,
{
make_little_dot(beautiful.xcolor1),
make_little_dot(beautiful.xcolor4),
make_little_dot(beautiful.xcolor5),
spacing = dpi(10),
widget = wibox.layout.fixed.vertical,
},
expand = "none",
widget = wibox.layout.align.vertical,
},
{
font = beautiful.font_name .. "bold 44",
align = "left",
valign = "top",
widget = minutes,
},
spacing = dpi(20),
layout = wibox.layout.fixed.horizontal,
}
return time

View file

@ -0,0 +1,113 @@
-- Standard awesome library
local awful = require("awful")
-- Theme handling library
local beautiful = require("beautiful")
-- Widget library
local wibox = require("wibox")
-- Helpers
local helpers = require("helpers")
-- Todo
---------
local todo_text = wibox.widget({
font = beautiful.font_name .. "medium 8",
markup = helpers.colorize_text("Todo", beautiful.dashboard_box_fg),
valign = "center",
widget = wibox.widget.textbox,
})
local todo_badge = wibox.widget({
font = beautiful.font_name .. "medium 8",
markup = helpers.colorize_text("0", beautiful.xcolor1),
valign = "center",
widget = wibox.widget.textbox,
})
local todo_stat_color = beautiful.xcolor8
local todo_stat = wibox.widget({
colors = { todo_stat_color },
bg = todo_stat_color .. "44",
value = 5,
min_value = 0,
max_value = 8,
thickness = dpi(8),
rounded_edge = true,
start_angle = math.pi * 3 / 2,
widget = wibox.container.arcchart,
})
local todo_done = wibox.widget({
font = beautiful.font_name .. "bold 14",
markup = "0",
valign = "bottom",
widget = wibox.widget.textbox,
})
local todo_total = wibox.widget({
font = beautiful.font_name .. "bold 8",
markup = helpers.colorize_text("/0", beautiful.xcolor8),
valign = "bottom",
widget = wibox.widget.textbox,
})
local todo = wibox.widget({
{
todo_text,
nil,
todo_badge,
expand = "none",
layout = wibox.layout.align.horizontal,
},
{
{
{
todo_stat,
reflection = { horizontal = true },
widget = wibox.container.mirror,
},
{
nil,
{
nil,
{
todo_done,
todo_total,
spacing = dpi(1),
layout = wibox.layout.fixed.horizontal,
},
expand = "none",
layout = wibox.layout.align.vertical,
},
expand = "none",
layout = wibox.layout.align.horizontal,
},
layout = wibox.layout.stack,
},
margins = dpi(10),
widget = wibox.container.margin,
},
layout = wibox.layout.fixed.vertical,
})
awesome.connect_signal("signal::todo", function(total, done, undone)
todo_badge.markup = helpers.colorize_text("-" .. undone, beautiful.xcolor1)
todo_total.markup = helpers.colorize_text("/" .. total, beautiful.xcolor8)
if total == 0 then
todo_badge.visible = false
total = 1
else
todo_badge.visible = true
end
todo_done.markup = done
todo_stat.max_value = total
todo_stat.value = done
end)
return todo

View file

@ -0,0 +1,65 @@
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
-- Theme handling library
local beautiful = require("beautiful")
-- Widget library
local wibox = require("wibox")
-- Helpers
local helpers = require("helpers")
-- Weather
------------
local weather_text = wibox.widget({
font = beautiful.font_name .. "medium 8",
markup = helpers.colorize_text("Weather unavailable", beautiful.dashboard_box_fg),
valign = "center",
widget = wibox.widget.textbox,
})
local weather_temp = wibox.widget({
font = beautiful.font_name .. "medium 11",
markup = "999°C",
valign = "center",
widget = wibox.widget.textbox,
})
local weather_icon = wibox.widget({
font = "icomoon 36",
markup = helpers.colorize_text("", beautiful.xcolor2),
align = "right",
valign = "bottom",
widget = wibox.widget.textbox,
})
local weather = wibox.widget({
{
weather_text,
weather_temp,
spacing = dpi(3),
layout = wibox.layout.fixed.vertical,
},
nil,
weather_icon,
expand = "none",
layout = wibox.layout.align.vertical,
})
awesome.connect_signal("signal::weather", function(temperature, description, icon_widget)
local weather_temp_symbol
if weather_units == "metric" then
weather_temp_symbol = "°C"
elseif weather_units == "imperial" then
weather_temp_symbol = "°F"
end
weather_icon.markup = icon_widget
weather_text.markup = helpers.colorize_text(description, beautiful.dashboard_box_fg)
weather_temp.markup = temperature .. weather_temp_symbol
end)
return weather

View file

@ -0,0 +1,148 @@
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
-- Theme handling library
local beautiful = require("beautiful")
-- Widget library
local wibox = require("wibox")
-- rubato
local rubato = require("module.rubato")
-- Helpers
local helpers = require("helpers")
-- Aesthetic Dashboard
-------------------------
local panel_visible = false
awful.screen.connect_for_each_screen(function(s)
-- Dashboard and animations init
local separator = wibox.widget({
orientation = "horizontal",
opacity = 0.0,
forced_height = 15,
widget = wibox.widget.separator,
})
central_panel = wibox({
type = "dock",
screen = s,
height = dpi(670),
width = dpi(620),
bg = beautiful.transparent,
ontop = true,
visible = false,
})
awful.placement.centered(central_panel, { honor_workarea = true, margins = beautiful.useless_gap * 5 })
-- Rubato
local slide = rubato.timed({
pos = dpi(-s.geometry.height),
rate = 60,
duration = 0.25,
intro = 0.125,
easing = rubato.quadratic,
awestore_compat = true,
subscribed = function(pos)
central_panel.y = pos
end,
})
local central_panel_status = false
slide.ended:subscribe(function()
if central_panel_status then
central_panel.visible = false
end
end)
-- Make toogle button
local central_panel_show = function()
central_panel.visible = true
slide:set(dpi(80))
central_panel_status = false
central_panel:emit_signal("opened")
end
local central_panel_hide = function()
slide:set(-s.geometry.height)
central_panel_status = true
central_panel:emit_signal("closed")
end
function central_panel:toggle()
self.opened = not self.opened
if self.opened then
central_panel_hide()
else
central_panel_show()
end
end
function central_panel:switch_pane(mode)
if mode == "dashboard_mode" then
-- Update Content
central_panel:get_children_by_id("settings_id")[1].visible = false
central_panel:get_children_by_id("dashboard_id")[1].visible = true
elseif mode == "settings_mode" then
-- Update Content
central_panel:get_children_by_id("dashboard_id")[1].visible = false
central_panel:get_children_by_id("settings_id")[1].visible = true
end
end
central_panel:setup({
{
{
expand = "none",
layout = wibox.layout.fixed.vertical,
{
layout = wibox.layout.align.horizontal,
expand = "none",
nil,
require("ui.widgets.central-panel-switch"),
nil,
},
separator,
{
layout = wibox.layout.stack,
{
id = "dashboard_id",
visible = true,
layout = wibox.layout.fixed.vertical,
{
layout = wibox.layout.flex.horizontal,
spacing = 10,
spacing_widget = wibox.widget.separator({
span_ratio = 0.80,
color = beautiful.lighter_bg,
}),
require("ui.central-panel.dashboard")(s),
require("ui.central-panel.notif-center")(s),
},
},
{
id = "settings_id",
visible = false,
layout = wibox.layout.fixed.vertical,
{
layout = wibox.layout.fixed.vertical,
require("ui.central-panel.settings")(s),
},
},
},
},
margins = dpi(10),
widget = wibox.container.margin,
},
bg = beautiful.dashboard_bg,
shape = helpers.rrect(beautiful.notif_center_radius),
widget = wibox.container.background,
})
end)

View file

@ -0,0 +1,52 @@
local wibox = require("wibox")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local gears = require("gears")
local icons = require("theme.assets.icons")
local empty_notifbox = wibox.widget({
{
layout = wibox.layout.fixed.vertical,
spacing = dpi(20),
{
expand = "none",
layout = wibox.layout.align.horizontal,
nil,
{
image = gears.color.recolor_image(icons.notification_bell, beautiful.accent),
resize = true,
forced_height = dpi(140),
forced_width = dpi(140),
widget = wibox.widget.imagebox,
},
nil,
},
{
text = "No Notifications? :(",
font = beautiful.font_name .. "Bold 14",
align = "center",
valign = "center",
widget = wibox.widget.textbox,
},
},
margins = dpi(20),
widget = wibox.container.margin,
})
local separator_for_empty_msg = wibox.widget({
orientation = "vertical",
opacity = 0.0,
widget = wibox.widget.separator,
})
-- Make empty_notifbox center
local centered_empty_notifbox = wibox.widget({
layout = wibox.layout.align.vertical,
forced_height = dpi(500),
expand = "none",
separator_for_empty_msg,
empty_notifbox,
separator_for_empty_msg,
})
return centered_empty_notifbox

View file

@ -0,0 +1,61 @@
local wibox = require("wibox")
local awful = require("awful")
local gears = require("gears")
local naughty = require("naughty")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local icons = require("theme.assets.icons")
local empty_notifbox = require("ui.central-panel.notif-center.build-notifbox.empty-notifbox")
local notifbox_scroller = require("ui.central-panel.notif-center.build-notifbox.notifbox-scroller")
local notif_core = {}
notif_core.remove_notifbox_empty = true
notif_core.notifbox_layout = wibox.widget({
layout = wibox.layout.fixed.vertical,
spacing = dpi(10),
empty_notifbox,
})
notifbox_scroller(notif_core.notifbox_layout)
notif_core.reset_notifbox_layout = function()
notif_core.notifbox_layout:reset()
notif_core.notifbox_layout:insert(1, empty_notifbox)
notif_core.remove_notifbox_empty = true
end
local notifbox_add = function(n, notif_icon, notifbox_color)
if #notif_core.notifbox_layout.children == 1 and notif_core.remove_notifbox_empty then
notif_core.notifbox_layout:reset(notif_core.notifbox_layout)
notif_core.remove_notifbox_empty = false
end
local notifbox_box = require("ui.central-panel.notif-center.build-notifbox.notifbox-builder")
notif_core.notifbox_layout:insert(1, notifbox_box(n, notif_icon, n.title, n.message, n.app_name, notifbox_color))
end
local notifbox_add_expired = function(n, notif_icon, notifbox_color)
n:connect_signal("destroyed", function(self, reason, keep_visble)
if reason == 1 then
notifbox_add(n, notif_icon, notifbox_color)
end
end)
end
naughty.connect_signal("request::display", function(n)
local notifbox_color = beautiful.notif_center_notifs_bg
if n.urgency == "critical" then
notifbox_color = n.bg .. "66"
end
local notif_icon = n.icon or n.app_icon
if not notif_icon then
notif_icon = gears.color.recolor_image(icons.notification, beautiful.accent)
end
notifbox_add_expired(n, notif_icon, notifbox_color)
end)
return notif_core

View file

@ -0,0 +1,170 @@
local wibox = require("wibox")
local awful = require("awful")
local gears = require("gears")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local builder = require("ui.central-panel.notif-center.build-notifbox.notifbox-ui-elements")
local notifbox_core = require("ui.central-panel.notif-center.build-notifbox")
local notifbox_layout = notifbox_core.notifbox_layout
local remove_notifbox_empty = notifbox_core.remove_notifbox_empty
local reset_notifbox_layout = notifbox_core.reset_notifbox_layout
local return_date_time = function(format)
return os.date(format)
end
local parse_to_seconds = function(time)
local hourInSec = tonumber(string.sub(time, 1, 2)) * 3600
local minInSec = tonumber(string.sub(time, 4, 5)) * 60
local getSec = tonumber(string.sub(time, 7, 8))
return (hourInSec + minInSec + getSec)
end
notifbox_box = function(notif, icon, title, message, app, bgcolor)
local time_of_pop = return_date_time("%H:%M:%S")
local exact_time = return_date_time("%I:%M %p")
local exact_date_time = return_date_time("%b %d, %I:%M %p")
local notifbox_timepop = wibox.widget({
id = "time_pop",
markup = nil,
font = beautiful.font_name .. "Regular 10",
align = "left",
valign = "center",
visible = true,
widget = wibox.widget.textbox,
})
local notifbox_dismiss = builder.notifbox_dismiss()
local time_of_popup = gears.timer({
timeout = 60,
call_now = true,
autostart = true,
callback = function()
local time_difference = nil
time_difference = parse_to_seconds(return_date_time("%H:%M:%S")) - parse_to_seconds(time_of_pop)
time_difference = tonumber(time_difference)
if time_difference < 60 then
notifbox_timepop:set_markup("now")
elseif time_difference >= 60 and time_difference < 3600 then
local time_in_minutes = math.floor(time_difference / 60)
notifbox_timepop:set_markup(time_in_minutes .. "m ago")
elseif time_difference >= 3600 and time_difference < 86400 then
notifbox_timepop:set_markup(exact_time)
elseif time_difference >= 86400 then
notifbox_timepop:set_markup(exact_date_time)
return false
end
collectgarbage("collect")
end,
})
local notifbox_template = wibox.widget({
id = "notifbox_template",
expand = "none",
{
{
layout = wibox.layout.fixed.vertical,
spacing = dpi(5),
{
expand = "none",
layout = wibox.layout.align.horizontal,
{
layout = wibox.layout.fixed.horizontal,
spacing = dpi(5),
builder.notifbox_icon(icon),
builder.notifbox_appname(app),
},
nil,
{
notifbox_timepop,
notifbox_dismiss,
layout = wibox.layout.fixed.horizontal,
},
},
{
layout = wibox.layout.fixed.vertical,
spacing = dpi(5),
{
builder.notifbox_title(title),
builder.notifbox_message(message),
layout = wibox.layout.fixed.vertical,
},
builder.notifbox_actions(notif),
},
},
margins = dpi(10),
widget = wibox.container.margin,
},
bg = bgcolor,
shape = function(cr, width, height)
gears.shape.partially_rounded_rect(
cr,
width,
height,
true,
true,
true,
true,
beautiful.notif_center_box_radius
)
end,
widget = wibox.container.background,
})
-- Put the generated template to a container
local notifbox = wibox.widget({
notifbox_template,
shape = function(cr, width, height)
gears.shape.partially_rounded_rect(
cr,
width,
height,
true,
true,
true,
true,
beautiful.notif_center_box_radius
)
end,
widget = wibox.container.background,
})
-- Delete notification box
local notifbox_delete = function()
notifbox_layout:remove_widgets(notifbox, true)
end
notifbox_dismiss:buttons(awful.util.table.join(awful.button({}, 1, function()
if #notifbox_layout.children == 1 then
reset_notifbox_layout()
else
notifbox_delete()
end
collectgarbage("collect")
end)))
-- Add hover, and mouse leave events
notifbox_template:connect_signal("mouse::enter", function()
notifbox_timepop.visible = false
notifbox_dismiss.visible = true
end)
notifbox_template:connect_signal("mouse::leave", function()
notifbox_timepop.visible = true
notifbox_dismiss.visible = false
end)
collectgarbage("collect")
return notifbox
end
return notifbox_box

View file

@ -0,0 +1,30 @@
local wibox = require("wibox")
local awful = require("awful")
local naughty = require("naughty")
local find_widget_in_wibox = function(wb, widget)
local function find_widget_in_hierarchy(h, widget)
if h:get_widget() == widget then
return h
end
local result
for _, ch in ipairs(h:get_children()) do
result = result or find_widget_in_hierarchy(ch, widget)
end
return result
end
local h = wb._drawable._widget_hierarchy
return h and find_widget_in_hierarchy(h, widget)
end
local focused = awful.screen.focused()
local h = find_widget_in_wibox(focused.top_panel, focused.music)
local x, y, width, height = h:get_matrix_to_device():transform_rectangle(0, 0, h:get_size())
-- local geo = focused.mywibox:geometry()
-- x, y = x + geo.x, y + geo.y
-- print(string.format("The widget is inside of the rectangle (%d, %d, %d, %d) on the screen", x, y, width, height)
naughty.notification({ message = tostring(height) })

View file

@ -0,0 +1,23 @@
local awful = require("awful")
local gears = require("gears")
local add_button_event = function(widget)
widget:buttons(gears.table.join(
awful.button({}, 4, nil, function()
if #widget.children == 1 then
return
end
widget:insert(1, widget.children[#widget.children])
widget:remove(#widget.children)
end),
awful.button({}, 5, nil, function()
if #widget.children == 1 then
return
end
widget:insert(#widget.children + 1, widget.children[1])
widget:remove(1)
end)
))
end
return add_button_event

View file

@ -0,0 +1,126 @@
local wibox = require("wibox")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local naughty = require("naughty")
local gears = require("gears")
local helpers = require("helpers")
local clickable_container = require("ui.widgets.clickable-container")
local ui_notifbox_builder = {}
-- Notification icon container
ui_notifbox_builder.notifbox_icon = function(ico_image)
local noti_icon = wibox.widget({
{
id = "icon",
resize = true,
forced_height = dpi(25),
forced_width = dpi(25),
widget = wibox.widget.imagebox,
},
layout = wibox.layout.fixed.horizontal,
})
noti_icon.icon:set_image(ico_image)
return noti_icon
end
-- Notification title container
ui_notifbox_builder.notifbox_title = function(title)
return wibox.widget({
markup = title,
font = beautiful.font_name .. "Bold 12",
align = "left",
valign = "center",
widget = wibox.widget.textbox,
})
end
-- Notification message container
ui_notifbox_builder.notifbox_message = function(msg)
return wibox.widget({
markup = msg,
font = beautiful.font_name .. "Regular 11",
align = "left",
valign = "center",
widget = wibox.widget.textbox,
})
end
-- Notification app name container
ui_notifbox_builder.notifbox_appname = function(app)
return wibox.widget({
markup = app,
font = beautiful.font_name .. "Bold 12",
align = "left",
valign = "center",
widget = wibox.widget.textbox,
})
end
-- Notification actions container
ui_notifbox_builder.notifbox_actions = function(n)
actions_template = wibox.widget({
notification = n,
base_layout = wibox.widget({
spacing = dpi(0),
layout = wibox.layout.flex.horizontal,
}),
widget_template = {
{
{
{
{
id = "text_role",
font = beautiful.font_name .. "Regular 10",
widget = wibox.widget.textbox,
},
widget = wibox.container.place,
},
widget = clickable_container,
},
bg = beautiful.accent,
shape = gears.shape.rounded_rect,
forced_height = 30,
widget = wibox.container.background,
},
margins = 4,
widget = wibox.container.margin,
},
style = { underline_normal = false, underline_selected = true },
widget = naughty.list.actions,
})
return actions_template
end
-- Notification dismiss button
ui_notifbox_builder.notifbox_dismiss = function()
local dismiss_imagebox = wibox.widget({
align = "center",
valign = "center",
font = beautiful.icon_font_name .. "10",
markup = helpers.colorize_text("󰅖", beautiful.xcolor1),
widget = wibox.widget.textbox(),
})
local dismiss_button = wibox.widget({
{
dismiss_imagebox,
margins = dpi(5),
widget = wibox.container.margin,
},
widget = clickable_container,
})
local notifbox_dismiss = wibox.widget({
dismiss_button,
visible = false,
bg = beautiful.notif_center_notifs_accent,
shape = gears.shape.circle,
widget = wibox.container.background,
})
return notifbox_dismiss
end
return ui_notifbox_builder

View file

@ -0,0 +1,49 @@
local awful = require("awful")
local wibox = require("wibox")
local gears = require("gears")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local clickable_container = require("ui.widgets.clickable-container")
local notifbox_core = require("ui.central-panel.notif-center.build-notifbox")
local reset_notifbox_layout = notifbox_core.reset_notifbox_layout
local clear_all_textbox = wibox.widget({
text = "Clear",
font = beautiful.font_name .. "Bold 12",
align = "center",
valign = "center",
widget = wibox.widget.textbox,
})
local clear_all_button = wibox.widget({
{
clear_all_textbox,
top = dpi(5),
bottom = dpi(5),
left = dpi(20),
right = dpi(20),
widget = wibox.container.margin,
},
widget = clickable_container,
})
clear_all_button:buttons(gears.table.join(awful.button({}, 1, nil, function()
reset_notifbox_layout()
end)))
local clear_all_button_wrapped = wibox.widget({
nil,
{
clear_all_button,
bg = beautiful.notif_center_notifs_bg,
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, dpi(5))
end,
widget = wibox.container.background,
},
nil,
expand = "none",
layout = wibox.layout.align.vertical,
})
return clear_all_button_wrapped

View file

@ -0,0 +1,36 @@
local wibox = require("wibox")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local notif_center = function(s)
s.clear_all = require("ui.central-panel.notif-center.clear-all")
s.notifbox_layout = require("ui.central-panel.notif-center.build-notifbox").notifbox_layout
return wibox.widget({
expand = "none",
layout = wibox.layout.align.vertical,
{
{
{
s.notifbox_layout,
spacing = dpi(10),
layout = wibox.layout.fixed.vertical,
},
forced_height = dpi(550),
widget = wibox.container.constraint,
},
margins = dpi(10),
widget = wibox.container.margin,
},
nil,
{
nil,
nil,
s.clear_all,
expand = "none",
layout = wibox.layout.align.horizontal,
},
})
end
return notif_center

View file

@ -0,0 +1,375 @@
local gears = require("gears")
local awful = require("awful")
local beautiful = require("beautiful")
local wibox = require("wibox")
local helpers = require("helpers")
local icons = require("theme.assets.icons")
local format_item = function(widget)
return wibox.widget({
{
{
layout = wibox.layout.align.vertical,
expand = "none",
nil,
widget,
nil,
},
margins = dpi(10),
widget = wibox.container.margin,
},
forced_height = dpi(88),
bg = beautiful.control_center_widget_bg,
shape = helpers.rrect(beautiful.control_center_widget_radius),
widget = wibox.container.background,
})
end
local format_item_no_fix_height = function(widget)
return wibox.widget({
{
{
layout = wibox.layout.align.vertical,
expand = "none",
nil,
widget,
nil,
},
margins = dpi(10),
widget = wibox.container.margin,
},
bg = beautiful.control_center_widget_bg,
shape = helpers.rrect(beautiful.control_center_widget_radius),
widget = wibox.container.background,
})
end
local function format_progress_bar(bar, icon)
local widget_icon = wibox.widget({
image = gears.color.recolor_image(icon, beautiful.xforeground),
widget = wibox.widget.imagebox,
resize = true,
})
local w = wibox.widget({
{
{
{
bar,
reflection = { horizontal = true },
widget = wibox.container.mirror,
},
{
nil,
{
nil,
{
widget_icon,
margins = dpi(20),
widget = wibox.container.margin,
},
expand = "none",
layout = wibox.layout.align.vertical,
},
expand = "none",
layout = wibox.layout.align.horizontal,
},
layout = wibox.layout.stack,
},
margins = dpi(10),
widget = wibox.container.margin,
},
layout = wibox.layout.fixed.vertical,
})
return w
end
local function create_boxed_widget(widget_to_be_boxed, width, height, radius, bg_color)
local box_container = wibox.container.background()
box_container.bg = bg_color
box_container.forced_height = height
box_container.forced_width = width
box_container.shape = helpers.rrect(radius)
local boxed_widget = wibox.widget({
{
nil,
{
widget_to_be_boxed,
layout = wibox.layout.align.vertical,
expand = "none",
},
layout = wibox.layout.align.horizontal,
},
widget = box_container,
})
return boxed_widget
end
local function create_arc_container(markup, widget)
local text = wibox.widget({
font = beautiful.font_name .. "Bold 10",
markup = helpers.colorize_text(markup, beautiful.dashboard_box_fg),
valign = "center",
widget = wibox.widget.textbox,
})
local arc_container = wibox.widget({
{
{
text,
nil,
expand = "none",
layout = wibox.layout.align.horizontal,
},
widget,
layout = wibox.layout.fixed.vertical,
},
margins = dpi(10),
widget = wibox.container.margin,
})
return arc_container
end
local function create_buttons(icon, color)
local button = wibox.widget({
id = "icon",
markup = helpers.colorize_text(icon, color),
font = beautiful.icon_font_name .. "16",
align = "center",
valign = "center",
widget = wibox.widget.textbox,
})
local button_container = wibox.widget({
{
{
button,
margins = dpi(15),
forced_height = dpi(48),
forced_width = dpi(48),
widget = wibox.container.margin,
},
widget = require("ui.widgets.clickable-container"),
},
bg = beautiful.control_center_button_bg,
shape = gears.shape.circle,
widget = wibox.container.background,
})
return button_container
end
-- widgets
-------------
-- color indicator
local off = beautiful.control_center_button_bg
local on = beautiful.accent
-- wifi button
local wifi = create_buttons("󰤨", beautiful.xforeground)
local wifi_status = false
awesome.connect_signal("signal::network", function(status, ssid)
wifi_status = status
awesome.emit_signal("widget::network")
end)
awesome.connect_signal("widget::network", function()
local w, fill_color
if wifi_status == true then
fill_color = on
wifi:buttons({
awful.button({}, 1, function()
awful.spawn("nmcli radio wifi off")
end),
})
else
fill_color = off
wifi:buttons({
awful.button({}, 1, function()
awful.spawn("nmcli radio wifi on")
end),
})
end
wifi.bg = fill_color
end)
-- bluetooth button
local bluetooth = create_buttons("󰂯", beautiful.xforeground)
local bluetooth_status = true
bluetooth:buttons({
awful.button({}, 1, function()
bluetooth_status = not bluetooth_status
if bluetooth_status then
bluetooth.bg = off
awful.spawn("bluetoothctl power off")
else
bluetooth.bg = on
awful.spawn("bluetoothctl power on")
end
end),
})
-- screenrec button
local mic = require("ui.widgets.microphone")
-- screenrec button
local screenrec = require("ui.widgets.screenrec")()
-- screenshot button
local screenshot = create_buttons("󰆞", beautiful.xforeground)
screenshot:buttons({
awful.button({}, 1, function()
central_panel:toggle()
awful.spawn.with_shell("screensht area")
end),
})
-- cpu arc
local cpu_bar = require("ui.widgets.arc.cpu_arc")
local cpu = format_progress_bar(cpu_bar, icons.cpu)
local cpu_details = create_arc_container("Cpu", cpu)
local cpu_box = create_boxed_widget(
cpu_details,
dpi(50),
dpi(150),
beautiful.control_center_widget_radius,
beautiful.control_center_widget_bg
)
-- ram arc
local ram_bar = require("ui.widgets.arc.ram_arc")
local ram = format_progress_bar(ram_bar, icons.ram)
local ram_details = create_arc_container("Ram", ram)
local ram_box = create_boxed_widget(
ram_details,
dpi(50),
dpi(150),
beautiful.control_center_widget_radius,
beautiful.control_center_widget_bg
)
-- temp arc
local temp_bar = require("ui.widgets.arc.temp_arc")
local temp = format_progress_bar(temp_bar, icons.temp)
local temp_details = create_arc_container("Temp", temp)
local temp_box = create_boxed_widget(
temp_details,
dpi(50),
dpi(150),
beautiful.control_center_widget_radius,
beautiful.control_center_widget_bg
)
-- disk arc
local disk_bar = require("ui.widgets.arc.disk_arc")
local disk = format_progress_bar(disk_bar, icons.disk)
local disk_details = create_arc_container("Disk", disk)
local disk_box = create_boxed_widget(
disk_details,
dpi(50),
dpi(150),
beautiful.control_center_widget_radius,
beautiful.control_center_widget_bg
)
-- Control Center
--------------------
local control_center = function(s)
s.control_center_row_one = wibox.widget({
layout = wibox.layout.align.horizontal,
forced_height = dpi(60),
nil,
format_item(require("ui.widgets.user-profile")()),
{
format_item({
layout = wibox.layout.fixed.horizontal,
require("ui.widgets.end-session")(),
}),
left = dpi(20),
widget = wibox.container.margin,
},
})
s.control_center_row_two = wibox.widget({
{
{
wifi,
bluetooth,
mic,
screenrec,
screenshot,
spacing = dpi(6),
layout = wibox.layout.flex.horizontal,
},
margins = dpi(12),
widget = wibox.container.margin,
},
shape = helpers.rrect(beautiful.control_center_widget_radius),
bg = beautiful.control_center_widget_bg,
widget = wibox.container.background,
})
s.control_center_row_five = wibox.widget({
layout = wibox.layout.flex.horizontal,
spacing = dpi(20),
ram_box,
cpu_box,
temp_box,
disk_box,
})
s.control_center_row_three = wibox.widget({
layout = wibox.layout.flex.horizontal,
spacing = dpi(20),
format_item_no_fix_height({
layout = wibox.layout.fixed.vertical,
spacing = dpi(5),
nil,
require("ui.widgets.dnd"),
require("ui.widgets.blue-light"),
require("ui.widgets.airplane-mode"),
nil,
}),
{
layout = wibox.layout.flex.vertical,
spacing = dpi(20),
format_item_no_fix_height({
layout = wibox.layout.align.vertical,
expand = "none",
nil,
require("ui.widgets.floating-mode"),
nil,
}),
{
layout = wibox.layout.flex.horizontal,
spacing = dpi(20),
require("ui.widgets.theme-switcher").day,
nil,
require("ui.widgets.theme-switcher").night,
},
},
})
s.control_center_row_four = require("ui.widgets.vol-bri-slider")
return wibox.widget({
{
s.control_center_row_one,
s.control_center_row_two,
s.control_center_row_three,
s.control_center_row_four,
s.control_center_row_five,
spacing = dpi(20),
layout = wibox.layout.fixed.vertical,
},
margins = dpi(10),
widget = wibox.container.margin,
})
end
return control_center

View file

@ -1,37 +1,2 @@
-- Standard awesome library
local gears = require("gears")
-- Theme handling library
local beautiful = require("beautiful")
-- Helpers
local helpers = require("helpers")
-- Apply rounded corners to clients if needed
if beautiful.border_radius and beautiful.border_radius > 0 then
client.connect_signal("manage", function (c, startup)
if not c.fullscreen and not c.maximized then
c.shape = helpers.rrect(beautiful.border_radius)
end
end)
-- Fullscreen and maximized clients should not have rounded corners
local function no_round_corners (c)
if c.fullscreen or c.maximized then
c.shape = gears.shape.rectangle
else
c.shape = helpers.rrect(beautiful.border_radius)
end
end
client.connect_signal("property::fullscreen", no_round_corners)
client.connect_signal("property::maximized", no_round_corners)
beautiful.snap_shape = helpers.rrect(beautiful.border_radius * 2)
else
beautiful.snap_shape = gears.shape.rectangle
end
require("ui.decorations.titlebar")
require("ui.decorations.music")
require("ui.decorations.twitch")

View file

@ -14,206 +14,211 @@ local wibox = require("wibox")
-- Helpers
local helpers = require("helpers")
-- Aesthetic Music Player
----------------------------
-- Music icon
----------------
local big_music_icon = wibox.widget{
align = "center",
font = beautiful.icon_font_name .. "Bold 16",
markup = helpers.colorize_text("", beautiful.xcolor4),
widget = wibox.widget.textbox()
}
local big_music_icon = wibox.widget({
align = "center",
font = beautiful.icon_font_name .. "15",
markup = helpers.colorize_text("󰎇", beautiful.accent),
widget = wibox.widget.textbox(),
})
local small_music_icon = wibox.widget{
align = "center",
font = beautiful.icon_font_name .. "Bold 12",
markup = helpers.colorize_text("", beautiful.xforeground),
widget = wibox.widget.textbox()
}
local small_music_icon = wibox.widget({
align = "center",
font = beautiful.icon_font_name .. "11",
markup = helpers.colorize_text("󰎇", beautiful.xforeground),
widget = wibox.widget.textbox(),
})
local container_music_icon = wibox.widget {
big_music_icon,
{
small_music_icon,
top = dpi(12),
widget = wibox.container.margin
},
spacing = dpi(-8),
layout = wibox.layout.fixed.horizontal
}
local container_music_icon = wibox.widget({
big_music_icon,
{
small_music_icon,
top = dpi(11),
widget = wibox.container.margin,
},
spacing = dpi(-9),
layout = wibox.layout.fixed.horizontal,
})
local music_icon = wibox.widget{
nil,
{
container_music_icon,
spacing = dpi(14),
layout = wibox.layout.fixed.horizontal
},
expand = "none",
layout = wibox.layout.align.horizontal,
}
local music_icon = wibox.widget({
nil,
{
container_music_icon,
spacing = dpi(14),
layout = wibox.layout.fixed.horizontal,
},
expand = "none",
layout = wibox.layout.align.horizontal,
})
-- Helpers
-------------
local control_button_bg = "#00000000"
local control_button_bg_hover = beautiful.xcolor0
local control_button_bg_hover = beautiful.hover_effect
local control_button = function(c, symbol, color, font, size, on_click, on_right_click)
local icon = wibox.widget{
markup = helpers.colorize_text(symbol, color),
font = font,
align = "center",
valign = "center",
widget = wibox.widget.textbox()
}
local icon = wibox.widget({
markup = helpers.colorize_text(symbol, color),
font = font,
align = "center",
valign = "center",
widget = wibox.widget.textbox(),
})
local button = wibox.widget {
icon,
bg = control_button_bg,
shape = helpers.rrect(dpi(5)),
widget = wibox.container.background
}
local button = wibox.widget({
icon,
bg = control_button_bg,
shape = helpers.rrect(dpi(5)),
widget = wibox.container.background,
})
local container = wibox.widget {
button,
strategy = "min",
width = dpi(30),
widget = wibox.container.constraint,
}
local container = wibox.widget({
button,
strategy = "min",
width = dpi(30),
widget = wibox.container.constraint,
})
container:buttons(gears.table.join(
awful.button({ }, 1, on_click),
awful.button({ }, 3, on_right_click)
))
container:buttons(gears.table.join(awful.button({}, 1, on_click), awful.button({}, 3, on_right_click)))
container:connect_signal("mouse::enter", function ()
button.bg = control_button_bg_hover
end)
container:connect_signal("mouse::leave", function ()
button.bg = control_button_bg
end)
container:connect_signal("mouse::enter", function()
button.bg = control_button_bg_hover
end)
container:connect_signal("mouse::leave", function()
button.bg = control_button_bg
end)
return container
return container
end
local music_play_pause = control_button(c, "", beautiful.xforeground, beautiful.icon_font_name .. "Round 22", dpi(30), function()
awful.spawn.with_shell("mpc -q toggle")
end)
-- Play Pause button
local music_play_pause = control_button(
c,
"󰐊",
beautiful.xforeground,
beautiful.icon_font_name .. "22",
dpi(30),
function()
awful.spawn.with_shell("mpc -q toggle")
end
)
-- Loop button
local loop = control_button(c, "", beautiful.xforeground, beautiful.icon_font_name .. "Round 12", dpi(30), function()
awful.spawn.with_shell("mpc repeat")
local loop = control_button(c, "󰑖", beautiful.xforeground, beautiful.icon_font_name .. "12", dpi(30), function()
awful.spawn.with_shell("mpc repeat")
end)
-- Shuffle playlist
local shuffle = control_button(c, "", beautiful.xforeground, beautiful.icon_font_name .. "Round 12", dpi(30), function()
awful.spawn.with_shell("mpc random")
-- Shuffle playlist button
local shuffle = control_button(c, "󰒝", beautiful.xforeground, beautiful.icon_font_name .. "12", dpi(30), function()
awful.spawn.with_shell("mpc random")
end)
local function create_slider_widget(slider_color)
local slider_widget = wibox.widget {
{
id = "slider",
max_value = 100,
value = 20,
margins = {
top = dpi(7),
bottom = dpi(7),
left = dpi(6),
right = dpi(6),
},
forced_width = dpi(60),
shape = gears.shape.rounded_bar,
bar_shape = gears.shape.rounded_bar,
color = slider_color,
background_color = beautiful.xcolor0,
widget = wibox.widget.progressbar
},
expand = "none",
forced_width = 60,
layout = wibox.layout.align.horizontal
}
local slider_widget = wibox.widget({
{
id = "slider",
max_value = 100,
value = 20,
margins = {
top = dpi(7),
bottom = dpi(7),
left = dpi(6),
right = dpi(6),
},
forced_width = dpi(60),
shape = gears.shape.rounded_bar,
bar_shape = gears.shape.rounded_bar,
color = slider_color,
background_color = slider_color .. "44",
widget = wibox.widget.progressbar,
},
expand = "none",
forced_width = 60,
layout = wibox.layout.align.horizontal,
})
return slider_widget
return slider_widget
end
local stats_tooltip = wibox.widget {
visible = false,
top_only = true,
layout = wibox.layout.stack
}
local stats_tooltip = wibox.widget({
visible = false,
top_only = true,
layout = wibox.layout.stack,
})
local tooltip_counter = 0
local function create_tooltip(w)
local tooltip = wibox.widget {
font = beautiful.font_name .. "bold 10",
align = "right",
valign = "center",
widget = wibox.widget.textbox
}
local tooltip = wibox.widget({
font = beautiful.font_name .. "bold 10",
align = "right",
valign = "center",
widget = wibox.widget.textbox,
})
tooltip_counter = tooltip_counter + 1
local index = tooltip_counter
tooltip_counter = tooltip_counter + 1
local index = tooltip_counter
stats_tooltip:insert(index, tooltip)
stats_tooltip:insert(index, tooltip)
w:connect_signal("mouse::enter", function()
-- Raise tooltip to the top of the stack
stats_tooltip:set(1, tooltip)
stats_tooltip.visible = true
end)
w:connect_signal("mouse::leave", function ()
stats_tooltip.visible = false
end)
w:connect_signal("mouse::enter", function()
-- Raise tooltip to the top of the stack
stats_tooltip:set(1, tooltip)
stats_tooltip.visible = true
end)
w:connect_signal("mouse::leave", function()
stats_tooltip.visible = false
end)
return tooltip
return tooltip
end
-- Decorations
----------------
-----------------
local music_art = wibox.widget {
image = gears.filesystem.get_configuration_dir() .. "theme/assets/no_music.png",
resize = true,
widget = wibox.widget.imagebox
}
local music_art_container = wibox.widget{
music_art,
shape = helpers.rrect(dpi(5)),
widget = wibox.container.background
}
local music_now = wibox.widget{
font = beautiful.font_name .. "bold 10",
valign = "center",
widget = wibox.widget.textbox
}
local music_pos = wibox.widget{
font = beautiful.font_name .. "bold 10",
valign = "center",
widget = wibox.widget.textbox
}
local music_bar = wibox.widget {
max_value = 100,
value = 0,
background_color = beautiful.xcolor0,
color = beautiful.xcolor4,
forced_height = dpi(3),
widget = wibox.widget.progressbar
}
local music_now = wibox.widget({
font = beautiful.font_name .. "bold 10",
valign = "center",
widget = wibox.widget.textbox,
})
local music_pos = wibox.widget({
font = beautiful.font_name .. "bold 10",
valign = "center",
widget = wibox.widget.textbox,
})
local music_bar = wibox.widget({
max_value = 100,
value = 0,
background_color = beautiful.accent .. "44",
color = beautiful.accent,
forced_height = dpi(3),
widget = wibox.widget.progressbar,
})
music_bar:connect_signal("button::press", function(_, lx, __, button, ___, w)
if button == 1 then
awful.spawn.with_shell("mpc seek " .. math.ceil(lx * 100 / w.width) .. "%")
end
if button == 1 then
awful.spawn.with_shell("mpc seek " .. math.ceil(lx * 100 / w.width) .. "%")
end
end)
local music_play_pause_textbox = music_play_pause:get_all_children()[1]:get_all_children()[1]
local loop_textbox = loop:get_all_children()[1]:get_all_children()[1]
local shuffle_textbox = shuffle:get_all_children()[1]:get_all_children()[1]
@ -221,63 +226,69 @@ local shuffle_textbox = shuffle:get_all_children()[1]:get_all_children()[1]
-- Volume
--------
local vol_color = beautiful.xcolor4
local vol_color = beautiful.accent
local vol_slider = create_slider_widget(vol_color)
local vol_tooltip = create_tooltip(vol_slider)
local vol_icon = wibox.widget{
align = "center",
font = "icomoon 16",
markup = "",
widget = wibox.widget.textbox
}
local vol_icon = wibox.widget({
align = "center",
font = beautiful.icon_font_name .. "16",
markup = helpers.colorize_text("󰕾", beautiful.accent),
widget = wibox.widget.textbox,
})
local vol_button = wibox.widget{
vol_icon,
bg = control_button_bg,
shape = helpers.rrect(dpi(5)),
widget = wibox.container.background
}
local vol_button = wibox.widget({
vol_icon,
bg = control_button_bg,
shape = helpers.rrect(dpi(5)),
widget = wibox.container.background,
})
local vol = wibox.widget {
vol_button,
strategy = "min",
width = dpi(30),
widget = wibox.container.constraint,
}
local vol = wibox.widget({
vol_button,
strategy = "min",
width = dpi(30),
widget = wibox.container.constraint,
})
vol:connect_signal("mouse::enter", function ()
vol_button.bg = control_button_bg_hover
vol:connect_signal("mouse::enter", function()
vol_button.bg = control_button_bg_hover
end)
vol:connect_signal("mouse::leave", function ()
vol_button.bg = control_button_bg
vol:connect_signal("mouse::leave", function()
vol_button.bg = control_button_bg
end)
vol:buttons(gears.table.join(
awful.button({}, 1, function() helpers.volume_control(0) end)
))
vol:buttons(gears.table.join(awful.button({}, 1, function()
helpers.volume_control(0)
end)))
awesome.connect_signal("signal::volume", function(value, muted)
local fill_color
local vol_value = value or 0
local fill_color
local vol_value = value or 0
if muted then
vol_icon.markup = helpers.colorize_text("", beautiful.xcolor8)
fill_color = beautiful.xcolor8
else
vol_icon.markup = helpers.colorize_text("", beautiful.xforeground)
fill_color = vol_color
end
if muted then
vol_icon.markup = helpers.colorize_text("󰖁", beautiful.xcolor8)
fill_color = beautiful.xcolor8
else
vol_icon.markup = helpers.colorize_text("󰕾", beautiful.accent)
fill_color = vol_color
end
vol_slider.slider.value = vol_value
vol_slider.slider.color = fill_color
vol_tooltip.markup = helpers.colorize_text(vol_value .. "%", vol_color)
vol_slider.slider.value = vol_value
vol_slider.slider.color = fill_color
vol_tooltip.markup = helpers.colorize_text(vol_value .. "%", vol_color)
end)
vol_slider:buttons(gears.table.join(
awful.button({}, 1, function() helpers.volume_control(0) end),
-- Scrolling
awful.button({}, 4, function() helpers.volume_control(5) end),
awful.button({}, 5, function() helpers.volume_control(-5) end)
awful.button({}, 1, function()
helpers.volume_control(0)
end),
-- Scrolling
awful.button({}, 4, function()
helpers.volume_control(5)
end),
awful.button({}, 5, function()
helpers.volume_control(-5)
end)
))
-- Playerctl
@ -287,182 +298,207 @@ local playerctl = require("module.bling").signal.playerctl.lib()
local music_length = 0
playerctl:connect_signal("metadata", function(_, title, artist, album_path, album, ___, player_name)
if player_name == "mpd" then
local m_now = artist .. " - " .. title .. "/" .. album
if player_name == "mpd" then
local m_now = artist .. " - " .. title .. "/" .. album
music_now:set_markup_silently(m_now)
end
music_now:set_markup_silently(m_now)
end
end)
playerctl:connect_signal("position", function(_, interval_sec, length_sec, player_name)
if player_name == "mpd" then
local pos_now = tostring(os.date("!%M:%S", math.floor(interval_sec)))
local pos_length = tostring(os.date("!%M:%S", math.floor(length_sec)))
local pos_markup = pos_now .. helpers.colorize_text(" / " .. pos_length, beautiful.xcolor8)
if player_name == "mpd" then
local pos_now = tostring(os.date("!%M:%S", math.floor(interval_sec)))
local pos_length = tostring(os.date("!%M:%S", math.floor(length_sec)))
local pos_markup = pos_now .. helpers.colorize_text(" / " .. pos_length, beautiful.xforeground)
music_art:set_image(gears.surface.load_uncached(album_path))
music_pos:set_markup_silently(pos_markup)
music_bar.value = (interval_sec / length_sec) * 100
music_length = length_sec
end
music_art:set_image(gears.surface.load_uncached(album_path))
music_pos:set_markup_silently(pos_markup)
music_bar.value = (interval_sec / length_sec) * 100
music_length = length_sec
end
end)
playerctl:connect_signal("playback_status", function(_, playing, player_name)
if player_name == "mpd" then
if playing then
music_play_pause_textbox:set_markup_silently(helpers.colorize_text("", beautiful.xcolor4))
else
music_play_pause_textbox:set_markup_silently(helpers.colorize_text("", beautiful.xcolor4))
end
end
if player_name == "mpd" then
if playing then
music_play_pause_textbox:set_markup_silently(helpers.colorize_text("󰏤", beautiful.accent))
else
music_play_pause_textbox:set_markup_silently(helpers.colorize_text("󰐊", beautiful.accent))
end
end
end)
playerctl:connect_signal("loop_status", function(_, loop_status, player_name)
if player_name == "mpd" then
if loop_status == "none" then
loop_textbox:set_markup_silently("")
else
loop_textbox:set_markup_silently("")
end
end
if player_name == "mpd" then
if loop_status == "none" then
loop_textbox:set_markup_silently("󰑖")
else
loop_textbox:set_markup_silently(helpers.colorize_text("󰑖", beautiful.accent))
end
end
end)
playerctl:connect_signal("shuffle", function(_, shuffle, player_name)
if player_name == "mpd" then
if shuffle then
shuffle_textbox:set_markup_silently("")
else
shuffle_textbox:set_markup_silently("")
end
end
if player_name == "mpd" then
if shuffle then
shuffle_textbox:set_markup_silently(helpers.colorize_text("󰒝", beautiful.accent))
else
shuffle_textbox:set_markup_silently("󰒝")
end
end
end)
local music_create_decoration = function (c)
local music_create_decoration = function(c)
-- Hide default titlebar
awful.titlebar.hide(c, beautiful.titlebar_pos)
-- Hide default titlebar
awful.titlebar.hide(c, beautiful.titlebar_pos)
-- Titlebar
awful.titlebar(c, { position = "top", size = dpi(45), bg = beautiful.transparent }):setup({
{
{
{
{
{
vol,
nil,
vol_slider,
spacing = dpi(2),
layout = wibox.layout.fixed.horizontal,
},
stats_tooltip,
layout = wibox.layout.align.horizontal,
},
top = dpi(10),
bottom = dpi(5),
right = dpi(10),
left = dpi(15),
widget = wibox.container.margin,
},
forced_width = dpi(200),
widget = wibox.container.background,
},
{
widget = music_icon,
},
layout = wibox.layout.align.horizontal,
},
bg = beautiful.music_bg,
shape = helpers.prrect(beautiful.border_radius, true, true, false, false),
widget = wibox.container.background,
})
-- Titlebar
awful.titlebar(c, { position = "top", size = beautiful.titlebar_size, bg = beautiful.xbackground }):setup {
{
{
{
{
vol,
nil,
vol_slider,
spacing = dpi(2),
layout = wibox.layout.fixed.horizontal
},
stats_tooltip,
layout = wibox.layout.align.horizontal
},
top = dpi(10),
bottom = dpi(10),
right = dpi(10),
left = dpi(15),
widget = wibox.container.margin
},
forced_width = dpi(200),
widget = wibox.container.background
},
{
widget = music_icon
},
layout = wibox.layout.align.horizontal
}
-- Sidebar
awful.titlebar(c, { position = "left", size = dpi(200) }):setup({
{
nil,
{
music_art_container,
bottom = dpi(20),
left = dpi(25),
right = dpi(25),
widget = wibox.container.margin,
},
nil,
expand = "none",
layout = wibox.layout.align.vertical,
},
bg = beautiful.music_accent,
shape = helpers.prrect(dpi(10), false, true, false, false),
widget = wibox.container.background,
})
-- Sidebar
awful.titlebar(c, { position = "left", size = dpi(200), bg = beautiful.xbackground }):setup {
{
nil,
{
music_art_container,
bottom = dpi(20),
left = dpi(25),
right = dpi(25),
widget = wibox.container.margin
},
nil,
expand = "none",
layout = wibox.layout.align.vertical
},
bg = beautiful.bg_accent,
shape = helpers.prrect(dpi(10), false, true, false, false),
widget = wibox.container.background,
}
-- Toolbar
awful.titlebar(c, { position = "bottom", size = dpi(63), bg = beautiful.transparent }):setup({
{
music_bar,
{
{
{
control_button(
c,
"󰒮",
beautiful.xforeground,
beautiful.icon_font_name .. "14",
dpi(30),
function()
awful.spawn.with_shell("mpc -q prev")
end
),
-- Toggle play pause
music_play_pause,
control_button(
c,
"󰒭",
beautiful.xforeground,
beautiful.icon_font_name .. "14",
dpi(30),
function()
awful.spawn.with_shell("mpc -q next")
end
),
layout = wibox.layout.flex.horizontal,
},
{
{
step_function = wibox.container.scroll.step_functions.waiting_nonlinear_back_and_forth,
speed = 50,
{
widget = music_now,
},
-- forced_width = dpi(110),
widget = wibox.container.scroll.horizontal,
},
left = dpi(15),
right = dpi(20),
widget = wibox.container.margin,
},
{
music_pos,
{
loop,
shuffle,
-- Go to list of playlists
control_button(
c,
"󰲸",
beautiful.xforeground,
beautiful.icon_font_name .. "12",
dpi(30),
function()
helpers.send_key(c, "1")
end
),
-- Go to visualizer
control_button(c, "", beautiful.xforeground, "icomoon 12", dpi(30), function()
helpers.send_key(c, "8")
end),
layout = wibox.layout.flex.horizontal,
},
spacing = dpi(10),
layout = wibox.layout.fixed.horizontal,
},
layout = wibox.layout.align.horizontal,
},
margins = dpi(15),
widget = wibox.container.margin,
},
layout = wibox.layout.align.vertical,
},
bg = beautiful.music_bg_accent,
shape = helpers.prrect(beautiful.border_radius, false, false, true, true),
widget = wibox.container.background,
})
-- Toolbar
awful.titlebar(c, { position = "bottom", size = dpi(63), bg = beautiful.bg_secondary }):setup {
music_bar,
{
{
{
-- Go to playlist and focus currently playing song
control_button(c, "", beautiful.xforeground, beautiful.icon_font_name .. "Round 14", dpi(30), function()
awful.spawn.with_shell("mpc -q prev")
end),
-- Toggle play pause
music_play_pause,
-- Go to list of playlists
control_button(c, "", beautiful.xforeground, beautiful.icon_font_name .. "Round 14", dpi(30), function()
awful.spawn.with_shell("mpc -q next")
end),
layout = wibox.layout.flex.horizontal
},
{
{
step_function = wibox.container.scroll
.step_functions
.waiting_nonlinear_back_and_forth,
speed = 50,
{
widget = music_now,
},
-- forced_width = dpi(110),
widget = wibox.container.scroll.horizontal
},
left = dpi(15),
right = dpi(20),
widget = wibox.container.margin
},
{
music_pos,
{
loop,
shuffle,
-- Go to list of playlists
control_button(c, "", beautiful.xforeground, beautiful.icon_font_name .. "Round 12", dpi(30), function()
helpers.send_key(c, "1")
end),
-- Go to visualizer
control_button(c, "", beautiful.xforeground, "icomoon 12", dpi(30), function()
helpers.send_key(c, "8")
end),
layout = wibox.layout.flex.horizontal
},
spacing = dpi(10),
layout = wibox.layout.fixed.horizontal
},
layout = wibox.layout.align.horizontal
},
margins = dpi(15),
widget = wibox.container.margin
},
layout = wibox.layout.align.vertical
}
-- Set custom decoration flags
c.custom_decoration = { top = true, left = true, bottom = true }
-- Set custom decoration flags
c.custom_decoration = { top = true, left = true, bottom = true }
end
-- Add the titlebar whenever a new music client is spawned
ruled.client.connect_signal("request::rules", function()
ruled.client.append_rule {
id = "music",
rule = {instance = "music"},
callback = music_create_decoration
}
ruled.client.append_rule({
id = "music",
rule = { instance = "music" },
callback = music_create_decoration,
})
end)

View file

@ -2,134 +2,130 @@ local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local bling = require("module.bling")
local helpers = require("helpers")
-- Helpers
-------------
local function create_title_button(c, color_focus, color_unfocus, shp)
local tb = wibox.widget {
forced_width = dpi(20),
forced_height = dpi(20),
bg = color_focus .. 90,
shape = shp,
border_color = beautiful.border_color,
widget = wibox.container.background
}
local ico = wibox.widget({
markup = "",
widget = wibox.widget.textbox,
})
local tb = wibox.widget({
ico,
forced_width = dpi(16),
forced_height = dpi(16),
bg = color_focus .. 80,
shape = shp,
widget = wibox.container.background,
})
local function update()
if client.focus == c then
tb.bg = color_focus
else
tb.bg = color_unfocus
end
end
update()
local function update()
if client.focus == c then
tb.bg = color_focus
else
tb.bg = color_unfocus
end
end
update()
c:connect_signal("focus", update)
c:connect_signal("unfocus", update)
c:connect_signal("focus", update)
c:connect_signal("unfocus", update)
tb:connect_signal("mouse::enter", function() tb.bg = color_focus .. 55 end)
tb:connect_signal("mouse::leave", function() tb.bg = color_focus end)
tb:connect_signal("mouse::enter", function()
local clr = client.focus ~= c and color_focus or color_focus .. 55
tb.bg = clr
end)
tb:connect_signal("mouse::leave", function()
local clr = client.focus == c and color_focus or color_unfocus
tb.bg = clr
end)
tb.visible = true
return tb
end
local wrap_widget = function(w)
return {
w,
top = dpi(20),
widget = wibox.container.margin
}
tb.visible = true
return tb
end
-- Add a titlebar if titlebars_enabled is set to true in the rules.
client.connect_signal("request::titlebars", function(c)
-- buttons for the titlebar
local buttons = gears.table.join(
awful.button({}, 1, function()
c:emit_signal("request::activate", "titlebar", { raise = true })
awful.mouse.client.move(c)
end),
awful.button({}, 3, function()
c:emit_signal("request::activate", "titlebar", { raise = true })
awful.mouse.client.resize(c)
end)
)
local close = create_title_button(c, beautiful.xcolor1, beautiful.xcolor8 .. 55, gears.shape.circle)
close:connect_signal("button::press", function()
c:kill()
end)
-- Buttons for the titlebar
------------------------------
local minimize = create_title_button(c, beautiful.xcolor3, beautiful.xcolor8 .. 55, gears.shape.circle)
minimize:connect_signal("button::press", function()
c.minimized = true
end)
local buttons = gears.table.join(awful.button({}, 1, function()
c:emit_signal("request::activate", "titlebar", {raise = true})
if c.maximized == true then c.maximized = false end
awful.mouse.client.move(c)
end), awful.button({}, 3, function()
c:emit_signal("request::activate", "titlebar", {raise = true})
awful.mouse.client.resize(c)
end))
local borderbuttons = gears.table.join( awful.button({}, 3, function()
c:emit_signal("request::activate", "titlebar", {raise = true})
awful.mouse.client.resize(c)
end), awful.button({}, 1, function()
c:emit_signal("request::activate", "titlebar", {raise = true})
awful.mouse.client.resize(c)
end))
local maximize = create_title_button(c, beautiful.xcolor2, beautiful.xcolor8 .. 55, gears.shape.circle)
maximize:connect_signal("button::press", function()
helpers.maximize(c)
end)
-- Titlebars setup
--------------------
-- Titlebars shapes
----------------------
awful.titlebar(c, { position = "top", size = dpi(45), bg = beautiful.transparent }):setup({
{
layout = wibox.layout.align.horizontal,
{
{
close,
minimize,
maximize,
layout = wibox.layout.fixed.horizontal,
spacing = dpi(10),
},
left = dpi(15),
widget = wibox.container.margin,
},
{
{
{ -- Title
align = "center",
widget = awful.titlebar.widget.titlewidget(c),
},
layout = wibox.layout.flex.horizontal,
spacing = dpi(10),
},
left = dpi(10),
right = dpi(10),
widget = wibox.container.margin,
buttons = buttons,
},
{
{
layout = wibox.layout.fixed.horizontal,
spacing = dpi(10),
},
left = dpi(10),
right = dpi(10),
widget = wibox.container.margin,
buttons = buttons,
},
},
bg = beautiful.titlebar_bg,
shape = helpers.prrect(beautiful.border_radius, true, true, false, false),
widget = wibox.container.background,
})
local ci = function(width, height)
return function(cr) gears.shape.circle(cr, width, height) end
end
-- Create titlebars buttons
------------------------------
local close = create_title_button(c, beautiful.xcolor1, beautiful.titlebar_unfocused, ci(dpi(11), dpi(11)))
close:connect_signal("button::press", function() c:kill() end)
local float = create_title_button(c, beautiful.xcolor4, beautiful.titlebar_unfocused, ci(dpi(11), dpi(11)))
float:connect_signal("button::press", function() awful.client.floating.toggle(c) end)
local max = create_title_button(c, beautiful.xcolor5, beautiful.titlebar_unfocused, ci(dpi(11), dpi(11)))
max:connect_signal("button::press", function() c.maximized = not c.maximized end)
-- Titlebars setup
--------------------
awful.titlebar(c, {
position = "top",
size = beautiful.titlebar_size
}):setup{
{ -- left
wrap_widget({
close,
left = dpi(25),
widget = wibox.container.margin
}),
wrap_widget(float),
wrap_widget(max),
buttons = buttons,
layout = wibox.layout.fixed.horizontal,
},
{ -- middle
awful.titlebar.widget.titlewidget(c),
layout = wibox.layout.fixed.horizontal
},
{ -- right
layout = wibox.layout.fixed.horizontal
},
bg = beautiful.darker_bg,
shape = helpers.prrect(beautiful.border_radius, true, true, false, false),
widget = wibox.container.background
}
awful.titlebar(c, {
position = "bottom",
size = dpi(24)
}):setup{
bg = beautiful.darker_bg,
shape = helpers.prrect(beautiful.border_radius, false, false, true, true),
widget = wibox.container.background
}
awful.titlebar(c, {
position = "bottom",
size = dpi(24),
bg = beautiful.transparent,
}):setup({
bg = beautiful.titlebar_bg,
shape = helpers.prrect(beautiful.border_radius, false, false, true, true),
widget = wibox.container.background,
})
end)

View file

@ -1,7 +1,4 @@
local lock_screen = require("ui.lockscreen")
lock_screen.init()
require("ui.bar")
require("ui.dashboard")
require("ui.central-panel")
require("ui.decorations")
require("ui.tooltip")
require("ui.notifs")

View file

@ -1,25 +1,30 @@
local naughty = require("naughty")
local beautiful = require("beautiful")
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local awful = require("awful")
local dpi = beautiful.xresources.apply_dpi
local beautiful = require("beautiful")
local naughty = require("naughty")
local helpers = require("helpers")
local ruled = require("ruled")
local menubar = require("menubar")
local button_container = require('ui.widgets.button')
local icons = require("theme.assets.icons")
-- Notifications
------------------
naughty.connect_signal("request::icon", function(n, context, hints)
if context ~= "app_icon" then return end
if context ~= "app_icon" then
return
end
local path = menubar.utils.lookup_icon(hints.app_icon) or
menubar.utils.lookup_icon(hints.app_icon:lower())
if path then n.icon = path end
local path = menubar.utils.lookup_icon(hints.app_icon) or menubar.utils.lookup_icon(hints.app_icon:lower())
if path then
n.icon = path
end
end)
-- Import stuff
-- Popup notifications
require("ui.notifs.popup")
naughty.config.defaults.ontop = true
@ -28,27 +33,26 @@ naughty.config.defaults.timeout = 3
naughty.config.defaults.title = "Notification"
naughty.config.defaults.position = "bottom_right"
-- Timeouts
naughty.config.presets.low.timeout = 3
naughty.config.presets.critical.timeout = 0
naughty.config.presets.normal = {
font = beautiful.font_name .. "medium 10",
fg = beautiful.fg_normal,
bg = beautiful.bg_normal
font = beautiful.font,
fg = beautiful.fg_normal,
bg = beautiful.bg_normal,
}
naughty.config.presets.low = {
font = beautiful.font_name .. "medium 10",
fg = beautiful.fg_normal,
bg = beautiful.bg_normal
font = beautiful.font,
fg = beautiful.fg_normal,
bg = beautiful.bg_normal,
}
naughty.config.presets.critical = {
font = beautiful.font_name .. "medium 10",
fg = beautiful.xcolor1,
bg = beautiful.bg_normal,
timeout = 0
font = beautiful.font_name .. "10",
fg = beautiful.xcolor1,
bg = beautiful.bg_normal,
timeout = 0,
}
naughty.config.presets.ok = naughty.config.presets.normal
@ -56,213 +60,186 @@ naughty.config.presets.info = naughty.config.presets.normal
naughty.config.presets.warn = naughty.config.presets.critical
ruled.notification.connect_signal("request::rules", function()
-- All notifications will match this rule.
ruled.notification.append_rule {
rule = {},
properties = {screen = awful.screen.preferred, implicit_timeout = 6}
}
-- All notifications will match this rule.
ruled.notification.append_rule({
rule = {},
properties = { screen = awful.screen.preferred, implicit_timeout = 6 },
})
end)
naughty.connect_signal("request::display", function(n)
local appicon = n.app_icon
if not appicon then
appicon = gears.color.recolor_image(icons.notification, beautiful.accent)
end
local time = os.date("%H:%M")
local appicon = gears.color.recolor_image(beautiful.notification_icon, beautiful.xcolor4)
local time = os.date("%H:%M")
local action_widget = {
{
{
id = "text_role",
align = "center",
valign = "center",
font = beautiful.font,
widget = wibox.widget.textbox,
},
left = dpi(6),
right = dpi(6),
widget = wibox.container.margin,
},
bg = beautiful.lighter_bg,
forced_height = dpi(25),
forced_width = dpi(20),
shape = helpers.rrect(beautiful.border_radius / 2),
widget = wibox.container.background,
}
local action_widget = {
{
{
id = "text_role",
align = "center",
valign = "center",
font = beautiful.font_name .. "medium 10",
widget = wibox.widget.textbox
},
left = dpi(6),
right = dpi(6),
widget = wibox.container.margin
},
bg = beautiful.xcolor0,
forced_height = dpi(25),
forced_width = dpi(20),
shape = gears.shape.rounded_rect,
widget = wibox.container.background
}
local actions = wibox.widget({
notification = n,
base_layout = wibox.widget({
spacing = dpi(8),
layout = wibox.layout.flex.horizontal,
}),
widget_template = action_widget,
style = { underline_normal = false, underline_selected = true },
widget = naughty.list.actions,
})
local actions = wibox.widget {
notification = n,
base_layout = wibox.widget {
spacing = dpi(8),
layout = wibox.layout.flex.horizontal
},
widget_template = {
helpers.add_hover_cursor(actions, "hand2")
naughty.layout.box({
notification = n,
type = "notification",
bg = beautiful.transparent,
widget_template = {
{
{
{
{
id = 'text_role',
font = beautiful.font_name .. 'medium 10',
widget = wibox.widget.textbox
{
{
{
{
image = appicon,
resize = true,
widget = wibox.widget.imagebox,
},
strategy = "max",
height = dpi(20),
widget = wibox.container.constraint,
},
right = dpi(10),
widget = wibox.container.margin,
},
{
markup = "<span weight='bold'>" .. n.app_name .. "</span>",
align = "left",
font = beautiful.font_name .. "10",
widget = wibox.widget.textbox,
},
{
markup = "<span weight='bold'>" .. time .. "</span>",
align = "right",
font = beautiful.font,
widget = wibox.widget.textbox,
},
layout = wibox.layout.align.horizontal,
},
top = dpi(10),
left = dpi(20),
right = dpi(20),
bottom = dpi(10),
widget = wibox.container.margin,
},
widget = wibox.container.place
bg = beautiful.darker_bg,
widget = wibox.container.background,
},
widget = button_container
{
{
{
helpers.vertical_pad(10),
{
{
step_function = wibox.container.scroll.step_functions.waiting_nonlinear_back_and_forth,
speed = 50,
{
markup = "<span weight='bold'>" .. n.title .. "</span>",
font = beautiful.font_name .. "9",
align = "left",
widget = wibox.widget.textbox,
},
forced_width = dpi(210),
widget = wibox.container.scroll.horizontal,
},
{
step_function = wibox.container.scroll.step_functions.waiting_nonlinear_back_and_forth,
speed = 50,
{
markup = n.message,
align = "left",
font = beautiful.font,
widget = wibox.widget.textbox,
},
forced_width = dpi(210),
widget = wibox.container.scroll.horizontal,
},
spacing = 0,
layout = wibox.layout.flex.vertical,
},
helpers.vertical_pad(10),
layout = wibox.layout.align.vertical,
},
left = dpi(20),
right = dpi(20),
widget = wibox.container.margin,
},
{
{
nil,
{
{
image = n.icon,
resize = true,
clip_shape = helpers.rrect(beautiful.border_radius / 2),
widget = wibox.widget.imagebox,
},
strategy = "max",
height = dpi(40),
widget = wibox.container.constraint,
},
nil,
expand = "none",
layout = wibox.layout.align.vertical,
},
margins = dpi(10),
widget = wibox.container.margin,
},
layout = wibox.layout.fixed.horizontal,
},
{
{ actions, layout = wibox.layout.fixed.vertical },
margins = dpi(10),
visible = n.actions and #n.actions > 0,
widget = wibox.container.margin,
},
layout = wibox.layout.fixed.vertical,
},
bg = beautiful.lighter_bg,
shape = gears.shape.rounded_rect,
forced_height = dpi(30),
widget = wibox.container.background
top = dpi(0),
bottom = dpi(5),
widget = wibox.container.margin,
},
margins = 4,
widget = wibox.container.margin
bg = beautiful.xbackground,
shape = helpers.rrect(beautiful.border_radius),
widget = wibox.container.background,
},
style = {underline_normal = false, underline_selected = true},
widget = naughty.list.actions
}
})
helpers.add_hover_cursor(actions, "hand2")
naughty.layout.box {
notification = n,
type = "notification",
bg = beautiful.xbackground .. 00,
widget_template = {
{
{
{
{
{
{
{
{
image = appicon,
resize = true,
widget = wibox.widget.imagebox
},
strategy = "max",
height = dpi(20),
widget = wibox.container.constraint
},
right = dpi(10),
widget = wibox.container.margin
},
{
markup = n.app_name,
align = "left",
font = beautiful.font_name .. "Bold 12",
widget = wibox.widget.textbox
},
{
markup = time,
align = "right",
font = beautiful.font_name .. "medium 10",
widget = wibox.widget.textbox
},
layout = wibox.layout.align.horizontal
},
top = dpi(5),
left = dpi(20),
right = dpi(20),
bottom = dpi(5),
widget = wibox.container.margin
},
bg = beautiful.darker_bg,
widget = wibox.container.background
},
{
{
{
helpers.vertical_pad(10),
{
{
step_function = wibox.container.scroll
.step_functions
.waiting_nonlinear_back_and_forth,
speed = 50,
{
markup = n.title,
font = beautiful.font_name .. "Bold 12",
align = "left",
widget = wibox.widget.textbox
},
forced_width = dpi(250),
widget = wibox.container.scroll
.horizontal
},
{
step_function = wibox.container.scroll
.step_functions
.waiting_nonlinear_back_and_forth,
speed = 50,
{
markup = n.message,
align = "left",
font = beautiful.font_name .. "medium 10",
widget = wibox.widget.textbox
},
forced_width = dpi(250),
widget = wibox.container.scroll
.horizontal
},
spacing = 0,
layout = wibox.layout.flex.vertical
},
helpers.vertical_pad(10),
layout = wibox.layout.align.vertical
},
left = dpi(20),
right = dpi(20),
widget = wibox.container.margin
},
{
{
nil,
{
{
image = n.icon,
resize = true,
clip_shape = helpers.rrect(beautiful.notification_border_radius),
widget = wibox.widget.imagebox
},
strategy = "max",
height = dpi(50),
widget = wibox.container.constraint
},
nil,
expand = "none",
layout = wibox.layout.align.vertical
},
top = dpi(10),
left = dpi(10),
right = dpi(10),
bottom = dpi(5),
widget = wibox.container.margin
},
layout = wibox.layout.fixed.horizontal
},
{
{actions, layout = wibox.layout.fixed.vertical},
margins = dpi(10),
visible = n.actions and #n.actions > 0,
widget = wibox.container.margin
},
layout = wibox.layout.fixed.vertical
},
top = dpi(5),
bottom = dpi(5),
widget = wibox.container.margin
},
bg = beautiful.xbackground,
shape = helpers.rrect(beautiful.border_radius),
widget = wibox.container.background
}
}
-- Destroy popups if dont_disturb mode is on
-- Destroy popups notifs if dont_disturb mode is on
-- Or if the notif_center is visible
if _G.dont_disturb or
(notif_center and notif_center.visible) then
if
_G.dont_disturb_state
or (central_panel and central_panel.visible and central_panel:get_children_by_id("dashboard_id")[1].visible)
then
naughty.destroy_all_notifications(nil, 1)
end
end)

View file

@ -1,219 +1,200 @@
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
-- Theme handling library
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
-- Widget library
local wibox = require("wibox")
-- Helpers
local helpers = require("helpers")
-- Pop Up Notification
------------
local pop_icon = wibox.widget{
{
id = "icon",
resize = true,
widget = wibox.widget.imagebox
},
local pop_icon = wibox.widget({
forced_height = dpi(100),
top = dpi(28),
widget = wibox.container.margin
}
local pop_bar = wibox.widget {
max_value = 100,
value = 0,
background_color = beautiful.pop_bar_bg,
color = beautiful.bg_accent,
shape = gears.shape.rounded_bar,
bar_shape = gears.shape.rounded_bar,
widget = wibox.widget.progressbar
}
local pop = wibox({
type = "dock",
screen = screen.focused,
height = beautiful.pop_size,
width = beautiful.pop_size,
shape = helpers.rrect(beautiful.pop_border_radius - 1),
bg = beautiful.transparent,
ontop = true,
visible = false
forced_width = dpi(100),
font = beautiful.icon_font_name .. "80",
align = "center",
valign = "center",
widget = wibox.widget.textbox(),
})
pop:setup {
{
{
{
layout = wibox.layout.align.horizontal,
expand = 'none',
nil,
pop_icon,
nil
},
layout = wibox.layout.fixed.vertical
},
{
pop_bar,
margins = dpi(28),
widget = wibox.container.margin
},
layout = wibox.layout.align.vertical
},
bg = beautiful.xbackground,
shape = helpers.rrect(beautiful.pop_border_radius),
widget = wibox.container.background
}
awful.placement.bottom(pop, {margins = {bottom = dpi(100)}})
local pop_bar = wibox.widget({
max_value = 100,
value = 0,
background_color = beautiful.pop_bar_bg,
color = beautiful.bg_accent,
shape = gears.shape.rounded_bar,
bar_shape = gears.shape.rounded_bar,
forced_height = dpi(25),
widget = wibox.widget.progressbar,
})
local pop_timeout = gears.timer {
timeout = 1.4,
autostart = true,
callback = function()
pop.visible = false
end
}
local pop = wibox({
type = "dock",
screen = screen.primary,
height = beautiful.pop_size,
width = beautiful.pop_size,
shape = helpers.rrect(beautiful.pop_border_radius),
bg = beautiful.transparent,
ontop = true,
visible = false,
})
pop:setup({
{
{
{
pop_icon,
layout = wibox.layout.fixed.vertical,
},
nil,
pop_bar,
layout = wibox.layout.align.vertical,
},
top = dpi(15),
bottom = dpi(30),
left = dpi(30),
right = dpi(30),
widget = wibox.container.margin,
},
bg = beautiful.xbackground,
shape = helpers.rrect(beautiful.pop_border_radius),
widget = wibox.container.background,
})
awful.placement.bottom(pop, { margins = { bottom = dpi(100) } })
local pop_timeout = gears.timer({
timeout = 1.4,
autostart = true,
callback = function()
pop.visible = false
end,
})
local function toggle_pop()
if pop.visible then
pop_timeout:again()
else
pop.visible = true
pop_timeout:start()
end
if pop.visible then
pop_timeout:again()
else
pop.visible = true
pop_timeout:start()
end
end
local vol_first_time = true
awesome.connect_signal("signal::volume", function(value, muted)
local icon = beautiful.volume_icon
if vol_first_time then
vol_first_time = false
else
pop_icon.markup = helpers.colorize_text("󰕾", beautiful.accent)
pop_bar.value = value
if vol_first_time then
vol_first_time = false
else
if muted then
pop_icon.markup = helpers.colorize_text("󰖁", beautiful.xcolor8)
pop_bar.color = beautiful.xcolor8
else
pop_bar.color = beautiful.accent
end
if muted then
local muted_icon = gears.color.recolor_image(beautiful.volume_muted_icon, beautiful.xcolor8)
icon = muted_icon
pop_bar.color = beautiful.xcolor8
else
local vol_icon = gears.color.recolor_image(icon, beautiful.pop_vol_color)
icon = vol_icon
pop_bar.color = beautiful.pop_vol_color
end
pop_bar.value = value
pop_icon.icon.image = icon
toggle_pop()
end
toggle_pop()
end
end)
awesome.connect_signal("signal::brightness", function(value)
local icon = beautiful.brightness_icon
pop_icon.markup = helpers.colorize_text("󰖨", beautiful.accent)
pop_bar.value = value
pop_bar.color = beautiful.accent
if value ~= 0 then
local bri_icon = gears.color.recolor_image(icon, beautiful.pop_brightness_color)
icon = bri_icon
pop_bar.color = beautiful.pop_brightness_color
else
local bri_icon = gears.color.recolor_image(icon, beautiful.xcolor8)
icon = bri_icon
end
pop_bar.value = value
pop_icon.icon.image = icon
toggle_pop()
toggle_pop()
end)
-- Layout list
-----------------
local layout_list = awful.widget.layoutlist {
source = awful.widget.layoutlist.source.default_layouts, -- DOC_HIDE
spacing = dpi(24),
base_layout = wibox.widget {
spacing = dpi(24),
forced_num_cols = 4,
layout = wibox.layout.grid.vertical
},
widget_template = {
{
{
id = "icon_role",
forced_height = dpi(68),
forced_width = dpi(68),
widget = wibox.widget.imagebox
},
margins = dpi(24),
widget = wibox.container.margin
},
id = "background_role",
forced_width = dpi(68),
forced_height = dpi(68),
widget = wibox.container.background
}
}
local layout_list = awful.widget.layoutlist({
source = awful.widget.layoutlist.source.default_layouts, -- DOC_HIDE
spacing = dpi(24),
base_layout = wibox.widget({
spacing = dpi(24),
forced_num_cols = 4,
layout = wibox.layout.grid.vertical,
}),
widget_template = {
{
{
id = "icon_role",
forced_height = dpi(68),
forced_width = dpi(68),
widget = wibox.widget.imagebox,
},
margins = dpi(24),
widget = wibox.container.margin,
},
id = "background_role",
forced_width = dpi(68),
forced_height = dpi(68),
widget = wibox.container.background,
},
})
local layout_popup = awful.popup {
widget = wibox.widget {
{layout_list, margins = dpi(24), widget = wibox.container.margin},
bg = beautiful.xbackground,
shape = helpers.rrect(beautiful.border_radius),
border_color = beautiful.widget_border_color,
border_width = beautiful.widget_border_width,
widget = wibox.container.background
},
placement = awful.placement.centered,
ontop = true,
visible = false,
bg = beautiful.xbackground .. "00"
}
local layout_popup = awful.popup({
widget = wibox.widget({
{ layout_list, margins = dpi(24), widget = wibox.container.margin },
bg = beautiful.xbackground,
shape = helpers.rrect(beautiful.border_radius),
border_color = beautiful.widget_border_color,
border_width = beautiful.widget_border_width,
widget = wibox.container.background,
}),
placement = awful.placement.centered,
ontop = true,
visible = false,
bg = beautiful.xbackground .. "00",
})
function gears.table.iterate_value(t, value, step_size, filter, start_at)
local k = gears.table.hasitem(t, value, true, start_at)
if not k then return end
local k = gears.table.hasitem(t, value, true, start_at)
if not k then
return
end
step_size = step_size or 1
local new_key = gears.math.cycle(#t, k + step_size)
step_size = step_size or 1
local new_key = gears.math.cycle(#t, k + step_size)
if filter and not filter(t[new_key]) then
for i = 1, #t do
local k2 = gears.math.cycle(#t, new_key + i)
if filter(t[k2]) then return t[k2], k2 end
end
return
end
if filter and not filter(t[new_key]) then
for i = 1, #t do
local k2 = gears.math.cycle(#t, new_key + i)
if filter(t[k2]) then
return t[k2], k2
end
end
return
end
return t[new_key], new_key
return t[new_key], new_key
end
awful.keygrabber {
start_callback = function() layout_popup.visible = true end,
stop_callback = function() layout_popup.visible = false end,
export_keybindings = true,
stop_event = "release",
stop_key = {"Escape", "Super_L", "Super_R", "Mod4"},
keybindings = {
{
{modkey, "Shift"}, " ", function()
awful.layout.set(gears.table.iterate_value(layout_list.layouts,
layout_list.current_layout, -1),
nil)
end
}, {
{modkey}, " ", function()
awful.layout.set(gears.table.iterate_value(layout_list.layouts,
layout_list.current_layout, 1),
nil)
end
}
}
}
awful.keygrabber({
start_callback = function()
layout_popup.visible = true
end,
stop_callback = function()
layout_popup.visible = false
end,
export_keybindings = true,
stop_event = "release",
stop_key = { "Escape", "Super_L", "Super_R", "Mod4" },
keybindings = {
{
{ modkey, "Shift" },
" ",
function()
awful.layout.set(gears.table.iterate_value(layout_list.layouts, layout_list.current_layout, -1), nil)
end,
},
{
{ modkey },
" ",
function()
awful.layout.set(gears.table.iterate_value(layout_list.layouts, layout_list.current_layout, 1), nil)
end,
},
},
})

View file

@ -0,0 +1 @@
false

View file

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="240"
height="240"
viewBox="0 0 240 240"
version="1.1"
id="svg4"
sodipodi:docname="ic_airplanemode_inactive_48px.svg"
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1321"
inkscape:window-height="740"
id="namedview6"
showgrid="false"
inkscape:pagecheckerboard="true"
inkscape:zoom="0.43457604"
inkscape:cx="-392.6819"
inkscape:cy="-33.781494"
inkscape:window-x="45"
inkscape:window-y="28"
inkscape:window-maximized="0"
inkscape:current-layer="svg4" />
<path
d="M 135,90 V 35 c 0,-8.3 -6.7,-15 -15,-15 -8.3,0 -15,6.7 -15,15 V 71.8 L 183.25,150.05 215,160 V 140 Z M 35,52.75 84.85,102.6 25,140 v 20 l 80,-25 v 55 l -20,15 v 15 l 35,-10 35,10 V 205 L 135,190 V 152.75 L 192.25,210 205,197.25 47.75,40 Z"
id="path2"
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;stroke-width:5" />
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="240"
height="240"
viewBox="0 0 240 240"
version="1.1"
id="svg6"
sodipodi:docname="ic_airplanemode_active_48px.svg"
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
<metadata
id="metadata12">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs10" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1321"
inkscape:window-height="740"
id="namedview8"
showgrid="false"
inkscape:pagecheckerboard="true"
inkscape:zoom="0.43457604"
inkscape:cx="-51.304834"
inkscape:cy="18.788525"
inkscape:window-x="45"
inkscape:window-y="28"
inkscape:window-maximized="0"
inkscape:current-layer="svg6" />
<path
d="M 120,120"
id="path2"
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;stroke-width:5" />
<path
d="M 215,160 V 140 L 135,90 V 35 c 0,-8.3 -6.7,-15 -15,-15 -8.3,0 -15,6.7 -15,15 v 55 l -80,50 v 20 l 80,-25 v 55 l -20,15 v 15 l 35,-10 35,10 v -15 l -20,-15 v -55 z"
id="path4"
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;stroke-width:5" />
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1,171 @@
local awful = require("awful")
local wibox = require("wibox")
local gears = require("gears")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local clickable_container = require("ui.widgets.clickable-container")
local config_dir = gears.filesystem.get_configuration_dir()
local widget_dir = config_dir .. "ui/widgets/airplane-mode/"
local widget_icon_dir = widget_dir .. "icons/"
local ap_state = false
local action_name = wibox.widget({
text = "Airplane Mode",
font = beautiful.font_name .. "Bold 12",
align = "left",
widget = wibox.widget.textbox,
})
local action_status = wibox.widget({
text = "Off",
font = beautiful.font_name .. "11",
align = "left",
widget = wibox.widget.textbox,
})
local action_info = wibox.widget({
layout = wibox.layout.fixed.vertical,
action_name,
action_status,
})
local button_widget = wibox.widget({
{
id = "icon",
image = gears.color.recolor_image(widget_icon_dir .. "airplane-mode-off.svg", beautiful.xforeground),
widget = wibox.widget.imagebox,
resize = true,
},
layout = wibox.layout.align.horizontal,
})
local widget_button = wibox.widget({
{
{
button_widget,
margins = dpi(15),
forced_height = dpi(48),
forced_width = dpi(48),
widget = wibox.container.margin,
},
widget = clickable_container,
},
bg = beautiful.control_center_button_bg,
shape = gears.shape.circle,
widget = wibox.container.background,
})
local update_widget = function()
if ap_state then
action_status:set_text("On")
widget_button.bg = beautiful.accent
button_widget.icon:set_image(
gears.color.recolor_image(widget_icon_dir .. "airplane-mode.svg", beautiful.xforeground)
)
else
action_status:set_text("Off")
widget_button.bg = beautiful.control_center_button_bg
button_widget.icon:set_image(
gears.color.recolor_image(widget_icon_dir .. "airplane-mode-off.svg", beautiful.xforeground)
)
end
end
local check_airplane_mode_state = function()
local cmd = "cat " .. widget_dir .. "airplane_mode"
awful.spawn.easy_async_with_shell(cmd, function(stdout)
local status = stdout
if status:match("true") then
ap_state = true
elseif status:match("false") then
ap_state = false
else
ap_state = false
awful.spawn.easy_async_with_shell('echo "false" > ' .. widget_dir .. "airplane_mode", function(stdout) end)
end
update_widget()
end)
end
check_airplane_mode_state()
local ap_off_cmd = [[
rfkill unblock wlan
# Create an AwesomeWM Notification
awesome-client "
naughty = require('naughty')
naughty.notification({
app_name = 'Network Manager',
title = '<b>Airplane mode disabled!</b>',
message = 'Initializing network devices',
icon = ']] .. widget_icon_dir .. "airplane-mode-off" .. ".svg" .. [['
})
"
]] .. "echo false > " .. widget_dir .. "airplane_mode" .. [[
]]
local ap_on_cmd = [[
rfkill block wlan
# Create an AwesomeWM Notification
awesome-client "
naughty = require('naughty')
naughty.notification({
app_name = 'Network Manager',
title = '<b>Airplane mode enabled!</b>',
message = 'Disabling radio devices',
icon = ']] .. widget_icon_dir .. "airplane-mode" .. ".svg" .. [['
})
"
]] .. "echo true > " .. widget_dir .. "airplane_mode" .. [[
]]
local toggle_action = function()
if ap_state then
awful.spawn.easy_async_with_shell(ap_off_cmd, function(stdout)
ap_state = false
update_widget()
end)
else
awful.spawn.easy_async_with_shell(ap_on_cmd, function(stdout)
ap_state = true
update_widget()
end)
end
end
widget_button:buttons(gears.table.join(awful.button({}, 1, nil, function()
toggle_action()
end)))
action_info:buttons(gears.table.join(awful.button({}, 1, nil, function()
toggle_action()
end)))
gears.timer({
timeout = 5,
autostart = true,
callback = function()
check_airplane_mode_state()
end,
})
local action_widget = wibox.widget({
layout = wibox.layout.fixed.horizontal,
spacing = dpi(10),
widget_button,
{
layout = wibox.layout.align.vertical,
expand = "none",
nil,
action_info,
nil,
},
})
return action_widget

View file

@ -0,0 +1,81 @@
-- Standard awesome library
local gears = require("gears")
local wibox = require("wibox")
local math = require("math")
-- Theme handling library
local beautiful = require("beautiful")
-- C libraries
local cairo = require("lgi").cairo
-- Analog clock
------------------
-- Stolen from No37
local function create_minute_pointer(minute)
local img = cairo.ImageSurface(cairo.Format.ARGB32, 1000, 1000)
local cr = cairo.Context(img)
local angle = (minute / 60) * 2 * math.pi
cr:translate(500, 500)
cr:rotate(angle)
cr:translate(-500, -500)
cr:set_source(gears.color(beautiful.xforeground))
cr:rectangle(485, 100, 30, 420)
cr:fill()
return img
end
local function create_hour_pointer(hour)
local img = cairo.ImageSurface(cairo.Format.ARGB32, 1000, 1000)
local cr = cairo.Context(img)
local angle = ((hour % 12) / 12) * 2 * math.pi
cr:translate(500, 500)
cr:rotate(angle)
cr:translate(-500, -500)
cr:set_source(gears.color(beautiful.accent))
cr:rectangle(480, 200, 40, 320)
cr:fill()
return img
end
local minute_pointer = create_minute_pointer(37)
local hour_pointer = create_hour_pointer(17)
local minute_pointer_img = wibox.widget.imagebox()
local hour_pointer_img = wibox.widget.imagebox()
local analog_clock = wibox.widget({
{ -- circle
wibox.widget.textbox(""),
shape = function(cr, width, height)
gears.shape.circle(cr, width, height, height / 2)
end,
shape_border_width = 4,
shape_border_color = beautiful.accent,
bg = "alpha",
widget = wibox.container.background,
},
minute_pointer_img,
hour_pointer_img,
layout = wibox.layout.stack,
})
local minute = 0
local hour = 0
gears.timer({
timeout = 30,
call_now = true,
autostart = true,
callback = function()
minute = os.date("%M")
hour = os.date("%H")
minute_pointer = create_minute_pointer(minute)
hour_pointer = create_hour_pointer(hour + (minute / 60))
minute_pointer_img.image = minute_pointer
hour_pointer_img.image = hour_pointer
end,
})
return analog_clock

View file

@ -0,0 +1,27 @@
local awful = require("awful")
local watch = awful.widget.watch
local wibox = require("wibox")
local beautiful = require("beautiful")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local active_color = beautiful.accent
local cpu_arc = wibox.widget({
start_angle = 3 * math.pi / 2,
min_value = 0,
max_value = 100,
value = 50,
thickness = dpi(8),
rounded_edge = true,
bg = active_color .. "44",
paddings = dpi(10),
colors = { active_color },
widget = wibox.container.arcchart,
})
awesome.connect_signal("signal::cpu", function(value)
cpu_arc.value = value
end)
return cpu_arc

View file

@ -0,0 +1,27 @@
local awful = require("awful")
local watch = awful.widget.watch
local wibox = require("wibox")
local beautiful = require("beautiful")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local active_color = beautiful.accent
local disk_arc = wibox.widget({
start_angle = 3 * math.pi / 2,
min_value = 0,
max_value = 100,
value = 50,
thickness = dpi(8),
rounded_edge = true,
bg = active_color .. "44",
paddings = dpi(10),
colors = { active_color },
widget = wibox.container.arcchart,
})
awesome.connect_signal("signal::disk", function(used, total)
disk_arc.value = used * 100 / total
end)
return disk_arc

View file

@ -0,0 +1,31 @@
local awful = require("awful")
local watch = awful.widget.watch
local wibox = require("wibox")
local beautiful = require("beautiful")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local active_color = beautiful.accent
local ram_arc = wibox.widget({
start_angle = 3 * math.pi / 2,
min_value = 0,
max_value = 100,
value = 50,
thickness = dpi(8),
rounded_edge = true,
bg = active_color .. "44",
paddings = dpi(10),
colors = { active_color },
widget = wibox.container.arcchart,
})
watch('bash -c "free | grep -z Mem.*Swap.*"', 10, function(_, stdout)
local total, used, free, shared, buff_cache, available, total_swap, used_swap, free_swap = stdout:match(
"(%d+)%s*(%d+)%s*(%d+)%s*(%d+)%s*(%d+)%s*(%d+)%s*Swap:%s*(%d+)%s*(%d+)%s*(%d+)"
)
ram_arc:set_value(used / total * 100)
collectgarbage("collect")
end)
return ram_arc

View file

@ -0,0 +1,58 @@
local awful = require("awful")
local watch = awful.widget.watch
local wibox = require("wibox")
local beautiful = require("beautiful")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local active_color = beautiful.accent
local temp_arc = wibox.widget({
start_angle = 3 * math.pi / 2,
min_value = 0,
max_value = 100,
value = 50,
thickness = dpi(8),
rounded_edge = true,
bg = active_color .. "44",
paddings = dpi(10),
colors = { active_color },
widget = wibox.container.arcchart,
})
local max_temp = 80
awful.spawn.easy_async_with_shell(
[[
temp_path=null
for i in /sys/class/hwmon/hwmon*/temp*_input;
do
temp_path="$(echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null ||
echo $(basename ${i%_*})) $(readlink -f $i)");"
label="$(echo $temp_path | awk '{print $2}')"
if [ "$label" = "Package" ];
then
echo ${temp_path} | awk '{print $5}' | tr -d ';\n'
exit;
fi
done
]],
function(stdout)
local temp_path = stdout:gsub("%\n", "")
if temp_path == "" or not temp_path then
temp_path = "/sys/class/thermal/thermal_zone0/temp"
end
watch([[
sh -c "cat ]] .. temp_path .. [["
]], 10, function(_, stdout)
local temp = stdout:match("(%d+)")
temp_arc:set_value((temp / 1000) / max_temp * 100)
collectgarbage("collect")
end)
end
)
return temp_arc

View file

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="bold"
enable-background="new 0 0 24 24"
height="240"
viewBox="0 0 240 240"
width="240"
version="1.1"
sodipodi:docname="blue-light-off.svg"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)">
<metadata
id="metadata29">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs27" />
<sodipodi:namedview
inkscape:document-rotation="0"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="684"
id="namedview25"
showgrid="false"
inkscape:zoom="1.177598"
inkscape:cx="140.91522"
inkscape:cy="195.63048"
inkscape:window-x="0"
inkscape:window-y="28"
inkscape:window-maximized="0"
inkscape:current-layer="g883"
inkscape:pagecheckerboard="true" />
<g
id="g883"
transform="translate(20,20)"
style="fill:#ffffff;fill-opacity:1">
<g
id="g843">
<path
d="m 125,175 v 10.41667 c 0,8 -6.58333,14.58333 -14.58333,14.58333 H 89.583333 C 82.583333,200 75,194.66667 75,183 v -8 z"
id="path16"
style="stroke-width:8.33333;fill:#ffffff;fill-opacity:1" />
<path
d="M 136.75,54.666667 C 123.08333,43.583333 105.08333,39.25 87.5,43 c -22.083333,4.583333 -40,22.583333 -44.583333,44.666667 -4.666667,22.666663 3.833333,45.166663 22,58.916663 4.916666,3.66667 8.333333,9.33334 9.5,15.91667 v 0.0833 C 74.583333,162.5 74.833333,162.5 75,162.5 h 50 c 0.16667,0 0.25,0 0.41667,0.0833 V 162.5 c 1.16666,-6.33333 4.91666,-12.16667 10.66666,-16.66667 C 150.16667,134.66667 158.33333,118 158.33333,100 158.33333,82.333333 150.5,65.833333 136.75,54.666667 Z m -5.5,49.500003 c -3.41667,0 -6.25,-2.83334 -6.25,-6.250003 C 125,85.25 114.75,75 102.08333,75 c -3.416663,0 -6.249997,-2.833333 -6.249997,-6.25 0,-3.416667 2.833334,-6.25 6.249997,-6.25 19.5,0 35.41667,15.916667 35.41667,35.416667 0,3.416663 -2.83333,6.250003 -6.25,6.250003 z"
id="path18"
style="stroke-width:8.33333;fill:#ffffff;fill-opacity:1" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="idea.svg"
version="1.1"
width="240"
viewBox="0 0 240 240"
height="240"
enable-background="new 0 0 24 24"
id="bold">
<metadata
id="metadata29">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs27" />
<sodipodi:namedview
inkscape:pagecheckerboard="true"
inkscape:current-layer="bold"
inkscape:window-maximized="0"
inkscape:window-y="127"
inkscape:window-x="-25"
inkscape:cy="195.63048"
inkscape:cx="140.91522"
inkscape:zoom="1.177598"
showgrid="false"
id="namedview25"
inkscape:window-height="684"
inkscape:window-width="1366"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<g
style="fill:#ffffff;fill-opacity:1"
transform="translate(20,20)"
id="g883">
<path
d="m 100,28.808333 c -3.45,0 -6.25,-2.8 -6.25,-6.25 V 6.25 C 93.75,2.8 96.55,0 100,0 c 3.45,0 6.25,2.8 6.25,6.25 v 16.308333 c 0,3.45 -2.8,6.25 -6.25,6.25 z"
id="path2"
style="stroke-width:8.33333;fill:#ffffff;fill-opacity:1" />
<path
d="m 154.75833,51.491667 c -1.6,0 -3.2,-0.608334 -4.41666,-1.833334 -2.44167,-2.441666 -2.44167,-6.4 0,-8.841666 L 161.875,29.283333 c 2.44167,-2.441666 6.4,-2.441666 8.84167,0 2.44166,2.441667 2.44166,6.4 0,8.841667 l -11.53334,11.533333 c -1.225,1.216667 -2.825,1.833334 -4.425,1.833334 z"
id="path4"
style="stroke-width:8.33333;fill:#ffffff;fill-opacity:1" />
<path
d="m 193.75,106.25 h -16.30833 c -3.45,0 -6.25,-2.8 -6.25,-6.25 0,-3.45 2.8,-6.25 6.25,-6.25 H 193.75 c 3.45,0 6.25,2.8 6.25,6.25 0,3.45 -2.8,6.25 -6.25,6.25 z"
id="path6"
style="stroke-width:8.33333;fill:#ffffff;fill-opacity:1" />
<path
d="m 166.29167,172.54167 c -1.6,0 -3.2,-0.60834 -4.41667,-1.83334 L 150.34167,159.175 c -2.44167,-2.44167 -2.44167,-6.4 0,-8.84167 2.44166,-2.44166 6.4,-2.44166 8.84166,0 l 11.53334,11.53334 c 2.44166,2.44166 2.44166,6.4 0,8.84166 -1.225,1.225 -2.825,1.83334 -4.425,1.83334 z"
id="path8"
style="stroke-width:8.33333;fill:#ffffff;fill-opacity:1" />
<path
d="m 33.708333,172.54167 c -1.6,0 -3.2,-0.60834 -4.416666,-1.83334 -2.441667,-2.44166 -2.441667,-6.4 0,-8.84166 L 40.825,150.33333 c 2.441667,-2.44166 6.4,-2.44166 8.841667,0 2.441666,2.44167 2.441666,6.4 0,8.84167 l -11.533334,11.53333 c -1.225,1.225 -2.825,1.83334 -4.425,1.83334 z"
id="path10"
style="stroke-width:8.33333;fill:#ffffff;fill-opacity:1" />
<path
d="M 22.558333,106.25 H 6.25 C 2.8,106.25 0,103.45 0,100 0,96.55 2.8,93.75 6.25,93.75 h 16.308333 c 3.45,0 6.25,2.8 6.25,6.25 0,3.45 -2.8,6.25 -6.25,6.25 z"
id="path12"
style="stroke-width:8.33333;fill:#ffffff;fill-opacity:1" />
<path
d="m 45.241667,51.491667 c -1.6,0 -3.2,-0.608334 -4.416667,-1.833334 L 29.291667,38.125 c -2.441667,-2.441667 -2.441667,-6.4 0,-8.841667 2.441666,-2.441666 6.4,-2.441666 8.841666,0 l 11.533334,11.533334 c 2.441666,2.441666 2.441666,6.4 0,8.841666 -1.233334,1.216667 -2.825,1.833334 -4.425,1.833334 z"
id="path14"
style="stroke-width:8.33333;fill:#ffffff;fill-opacity:1" />
<path
d="m 125,175 v 10.41667 c 0,8 -6.58333,14.58333 -14.58333,14.58333 H 89.583333 C 82.583333,200 75,194.66667 75,183 v -8 z"
id="path16"
style="stroke-width:8.33333;fill:#ffffff;fill-opacity:1" />
<path
d="M 136.75,54.666667 C 123.08333,43.583333 105.08333,39.25 87.5,43 c -22.083333,4.583333 -40,22.583333 -44.583333,44.666667 -4.666667,22.666663 3.833333,45.166663 22,58.916663 4.916666,3.66667 8.333333,9.33334 9.5,15.91667 v 0.0833 C 74.583333,162.5 74.833333,162.5 75,162.5 h 50 c 0.16667,0 0.25,0 0.41667,0.0833 V 162.5 c 1.16666,-6.33333 4.91666,-12.16667 10.66666,-16.66667 C 150.16667,134.66667 158.33333,118 158.33333,100 158.33333,82.333333 150.5,65.833333 136.75,54.666667 Z m -5.5,49.500003 c -3.41667,0 -6.25,-2.83334 -6.25,-6.250003 C 125,85.25 114.75,75 102.08333,75 c -3.416663,0 -6.249997,-2.833333 -6.249997,-6.25 0,-3.416667 2.833334,-6.25 6.249997,-6.25 19.5,0 35.41667,15.916667 35.41667,35.416667 0,3.416663 -2.83333,6.250003 -6.25,6.250003 z"
id="path18"
style="stroke-width:8.33333;fill:#ffffff;fill-opacity:1" />
<path
d="M 74.416667,162.5 H 75 c -0.166667,0 -0.416667,0 -0.583333,0.0833 z"
id="path20"
style="stroke-width:8.33333;fill:#ffffff;fill-opacity:1" />
<path
d="m 125.41667,162.5 v 0.0833 C 125.25,162.5 125.16667,162.5 125,162.5 Z"
id="path22"
style="stroke-width:8.33333;fill:#ffffff;fill-opacity:1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.3 KiB

View file

@ -0,0 +1,137 @@
local awful = require("awful")
local wibox = require("wibox")
local gears = require("gears")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local clickable_container = require("ui.widgets.clickable-container")
local config_dir = gears.filesystem.get_configuration_dir()
local widget_dir = config_dir .. "ui/widgets/blue-light/"
local widget_icon_dir = widget_dir .. "icons/"
local blue_light_state = false
local action_name = wibox.widget({
text = "Blue Light",
font = beautiful.font_name .. "Bold 12",
align = "left",
widget = wibox.widget.textbox,
})
local action_status = wibox.widget({
text = "Off",
font = beautiful.font_name .. "11",
align = "left",
widget = wibox.widget.textbox,
})
local action_info = wibox.widget({
layout = wibox.layout.fixed.vertical,
action_name,
action_status,
})
local button_widget = wibox.widget({
{
id = "icon",
image = gears.color.recolor_image(widget_icon_dir .. "blue-light-off.svg", beautiful.xforeground),
widget = wibox.widget.imagebox,
resize = true,
},
layout = wibox.layout.align.horizontal,
})
local widget_button = wibox.widget({
{
{
button_widget,
margins = dpi(15),
forced_height = dpi(48),
forced_width = dpi(48),
widget = wibox.container.margin,
},
widget = clickable_container,
},
bg = beautiful.control_center_button_bg,
shape = gears.shape.circle,
widget = wibox.container.background,
})
local update_widget = function()
if blue_light_state then
action_status:set_text("On")
widget_button.bg = beautiful.accent
button_widget.icon:set_image(
gears.color.recolor_image(widget_icon_dir .. "blue-light.svg", beautiful.xforeground)
)
else
action_status:set_text("Off")
widget_button.bg = beautiful.control_center_button_bg
button_widget.icon:set_image(
gears.color.recolor_image(widget_icon_dir .. "blue-light-off.svg", beautiful.xforeground)
)
end
end
local kill_state = function()
awful.spawn.easy_async_with_shell(
[[
redshift -x
kill -9 $(pgrep redshift)
]],
function(stdout)
stdout = tonumber(stdout)
if stdout then
blue_light_state = false
update_widget()
end
end
)
end
kill_state()
local toggle_action = function()
awful.spawn.easy_async_with_shell(
[[
if [ ! -z $(pgrep redshift) ];
then
redshift -x && pkill redshift && killall redshift
echo 'OFF'
else
redshift -l 0:0 -t 4500:4500 -r &>/dev/null &
echo 'ON'
fi
]],
function(stdout)
if stdout:match("ON") then
blue_light_state = true
else
blue_light_state = false
end
update_widget()
end
)
end
widget_button:buttons(gears.table.join(awful.button({}, 1, nil, function()
toggle_action()
end)))
action_info:buttons(gears.table.join(awful.button({}, 1, nil, function()
toggle_action()
end)))
local action_widget = wibox.widget({
layout = wibox.layout.fixed.horizontal,
spacing = dpi(10),
widget_button,
{
layout = wibox.layout.align.vertical,
expand = "none",
nil,
action_info,
nil,
},
})
return action_widget

View file

@ -0,0 +1,91 @@
local awful = require("awful")
local wibox = require("wibox")
local gears = require("gears")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local clickable_container = require("ui.widgets.clickable-container")
-- Variable used for switching panel modes
local central_panel_mode = "dashboard_mode"
local active_button = beautiful.lighter_bg
local inactive_button = beautiful.transparent
local settings_text = wibox.widget({
text = "Settings",
font = beautiful.font_name .. "Bold 11",
align = "center",
valign = "center",
widget = wibox.widget.textbox,
})
local settings_button = clickable_container(wibox.container.margin(settings_text, dpi(0), dpi(0), dpi(7), dpi(7)))
local wrap_settings = wibox.widget({
settings_button,
forced_width = dpi(93),
bg = inactive_button,
border_width = dpi(1),
border_color = beautiful.lighter_bg,
shape = function(cr, width, height)
gears.shape.partially_rounded_rect(cr, width, height, false, true, true, false, dpi(6))
end,
widget = wibox.container.background,
})
local dashboard_text = wibox.widget({
text = "Dashboard",
font = beautiful.font_name .. "Bold 11",
align = "center",
valign = "center",
widget = wibox.widget.textbox,
})
local dashboard_button = clickable_container(wibox.container.margin(dashboard_text, dpi(0), dpi(0), dpi(7), dpi(7)))
local wrap_dashboard = wibox.widget({
dashboard_button,
forced_width = dpi(93),
bg = active_button,
border_width = dpi(1),
border_color = beautiful.lighter_bg,
shape = function(cr, width, height)
gears.shape.partially_rounded_rect(cr, width, height, true, false, false, true, dpi(6))
end,
widget = wibox.container.background,
})
local switcher = wibox.widget({
expand = "none",
layout = wibox.layout.fixed.horizontal,
wrap_dashboard,
wrap_settings,
})
function switch_rdb_pane(central_panel_mode)
if central_panel_mode == "dashboard_mode" then
-- Update button color
wrap_dashboard.bg = active_button
wrap_settings.bg = inactive_button
-- Change panel content of floating-panel.lua
central_panel:switch_pane(central_panel_mode)
elseif central_panel_mode == "settings_mode" then
-- Update button color
wrap_dashboard.bg = inactive_button
wrap_settings.bg = active_button
-- Change panel content of floating-panel.lua
central_panel:switch_pane(central_panel_mode)
end
end
dashboard_button:buttons(gears.table.join(awful.button({}, 1, nil, function()
switch_rdb_pane("dashboard_mode")
end)))
settings_button:buttons(gears.table.join(awful.button({}, 1, nil, function()
switch_rdb_pane("settings_mode")
end)))
return switcher

View file

@ -0,0 +1,40 @@
local wibox = require("wibox")
local beautiful = require("beautiful")
local create_click_events = function(widget)
local container = wibox.widget({
widget,
widget = wibox.container.background,
})
local old_cursor, old_wibox
container:connect_signal("mouse::enter", function()
container.bg = beautiful.hover_effect
local w = mouse.current_wibox
if w then
old_cursor, old_wibox = w.cursor, w
w.cursor = "hand1"
end
end)
container:connect_signal("mouse::leave", function()
container.bg = beautiful.transparent
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end)
container:connect_signal("button::press", function()
container.bg = beautiful.accent
end)
container:connect_signal("button::release", function()
container.bg = beautiful.hover_effect
end)
return container
end
return create_click_events

View file

@ -0,0 +1,200 @@
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local helpers = require("helpers")
-- Cute battery face indicator
------------------
-- Stolen from Elena
local stroke = beautiful.xbackground
local happy_color = beautiful.xcolor2
local sad_color = beautiful.xcolor1
local ok_color = beautiful.xcolor3
local charging_color = beautiful.xcolor6
-- Not great not terrible
local ok_threshold = 40
-- Low percentage
local battery_threshold_low = 20
local battery_bar = wibox.widget({
max_value = 100,
value = 50,
forced_height = dpi(100),
forced_width = dpi(50),
bar_shape = gears.shape.rectangle,
color = happy_color,
background_color = happy_color .. "55",
widget = wibox.widget.progressbar,
})
local battery_bar_container = wibox.widget({
battery_bar,
direction = "east",
widget = wibox.container.rotate,
})
local charging_icon = wibox.widget({
font = beautiful.icon_font_name .. "18",
valign = "center",
markup = helpers.colorize_text("󱐋", stroke .. "80"),
widget = wibox.widget.textbox(),
})
local eye_size = dpi(5)
local mouth_size = dpi(10)
local mouth_shape = function()
return function(cr, width, height)
gears.shape.pie(cr, width, height, 0, math.pi)
end
end
local mouth_widget = wibox.widget({
forced_width = mouth_size,
forced_height = mouth_size,
shape = mouth_shape(),
-- shape = gears.shape.pie,
bg = stroke,
widget = wibox.container.background(),
})
local frown = wibox.widget({
{
mouth_widget,
direction = "south",
widget = wibox.container.rotate(),
},
top = dpi(8),
widget = wibox.container.margin(),
})
local smile = wibox.widget({
mouth_widget,
direction = "north",
widget = wibox.container.rotate(),
})
local ok = wibox.widget({
{
bg = stroke,
shape = helpers.rrect(dpi(2)),
widget = wibox.container.background,
},
top = dpi(5),
bottom = dpi(1),
widget = wibox.container.margin(),
})
local mouth = wibox.widget({
frown,
ok,
smile,
top_only = true,
widget = wibox.layout.stack(),
})
local eye = wibox.widget({
forced_width = eye_size,
forced_height = eye_size,
shape = gears.shape.circle,
bg = stroke,
widget = wibox.container.background(),
})
-- 2 eyes 1 semicircle (smile or frown)
local face = wibox.widget({
eye,
mouth,
eye,
spacing = dpi(4),
layout = wibox.layout.fixed.horizontal,
})
local cute_battery_face = wibox.widget({
{
battery_bar_container,
shape = helpers.rrect(beautiful.widget_radius),
border_color = stroke,
border_width = dpi(4),
widget = wibox.container.background,
},
{
{
nil,
charging_icon,
nil,
expand = "none",
layout = wibox.layout.align.horizontal,
},
left = dpi(25),
bottom = dpi(50),
widget = wibox.container.margin,
},
{
nil,
{
nil,
face,
layout = wibox.layout.align.vertical,
expand = "none",
},
layout = wibox.layout.align.horizontal,
expand = "none",
},
top_only = false,
layout = wibox.layout.stack,
})
local last_value = 100
awesome.connect_signal("signal::battery", function(value)
-- Update bar
battery_bar.value = value
last_value = value
local color
-- Update face
if charging_icon.visible then
color = charging_color
mouth:set(1, smile)
elseif value <= battery_threshold_low then
color = sad_color
mouth:set(1, frown)
elseif value <= ok_threshold then
color = ok_color
mouth:set(1, ok)
else
color = happy_color
mouth:set(1, smile)
end
battery_bar.color = color
battery_bar.background_color = color .. "44"
end)
awesome.connect_signal("signal::charger", function(plugged)
local color
if plugged then
charging_icon.visible = true
color = charging_color
mouth:set(1, smile)
elseif last_value <= battery_threshold_low then
charging_icon.visible = false
color = sad_color
mouth:set(1, frown)
elseif last_value <= ok_threshold then
charging_icon.visible = false
color = ok_color
mouth:set(1, ok)
else
charging_icon.visible = false
color = happy_color
mouth:set(1, smile)
end
battery_bar.color = color
battery_bar.background_color = color .. "44"
end)
return cute_battery_face

View file

@ -0,0 +1 @@
false

View file

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="512px"
viewBox="-12 0 448 448.04455"
width="512px"
version="1.1"
id="svg6"
sodipodi:docname="dont-disturb-mode.svg"
inkscape:version="0.92.4 5da689c313, 2019-01-14">
<metadata
id="metadata12">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs10" />
<sodipodi:namedview
pagecolor="#252525"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:window-width="1321"
inkscape:window-height="738"
id="namedview8"
showgrid="false"
inkscape:zoom="0.4609375"
inkscape:cx="264.67797"
inkscape:cy="247.32203"
inkscape:window-x="45"
inkscape:window-y="30"
inkscape:window-maximized="0"
inkscape:current-layer="svg6" />
<g
id="g4"
transform="matrix(0.71799041,0,0,0.71799041,59.727137,63.17728)">
<path
d="m 224.02344,448.03125 c 85.71484,0.90234 164.01172,-48.48828 200.11718,-126.23047 -22.72265,9.91406 -47.33203,14.76953 -72.11718,14.23047 -97.15625,-0.10938 -175.89063,-78.84375 -176,-176 C 176.99609,94.3125 213.25781,34.199219 270.93359,2.679688 255.37891,0.699219 239.70312,-0.1875 224.02344,0.03125 c -123.71485,0 -224.0000025,100.28906 -224.0000025,224 0,123.71484 100.2851525,224 224.0000025,224 z m 0,0"
data-original="#000000"
class="active-path"
data-old_color="#000000"
style="fill:#ffffff"
data-darkreader-inline-fill=""
id="path2"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="512px"
viewBox="-21 0 512 512"
width="512px"
version="1.1"
id="svg12"
sodipodi:docname="notify-mode.svg"
inkscape:version="0.92.4 5da689c313, 2019-01-14">
<metadata
id="metadata18">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs16" />
<sodipodi:namedview
pagecolor="#252525"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:window-width="1321"
inkscape:window-height="738"
id="namedview14"
showgrid="false"
inkscape:zoom="0.4609375"
inkscape:cx="-98.711864"
inkscape:cy="256"
inkscape:window-x="45"
inkscape:window-y="30"
inkscape:window-maximized="0"
inkscape:current-layer="svg12" />
<g
id="g10"
transform="matrix(0.75500702,0,0,0.75500702,57.825511,62.718203)">
<path
d="m 448,232.14844 c -11.77734,0 -21.33203,-9.55469 -21.33203,-21.33203 0,-59.83985 -23.29688,-116.074222 -65.60156,-158.402348 -8.33985,-8.339843 -8.33985,-21.820312 0,-30.164062 8.33984,-8.339844 21.82421,-8.339844 30.16406,0 50.37109,50.367188 78.10156,117.33594 78.10156,188.56641 0,11.77734 -9.55469,21.33203 -21.33203,21.33203 z m 0,0"
data-original="#000000"
class="active-path"
style="fill:#ffffff"
data-darkreader-inline-fill=""
data-old_color="#000000"
id="path2"
inkscape:connector-curvature="0" />
<path
d="M 21.332031,232.14844 C 9.558594,232.14844 0,222.59375 0,210.81641 0,139.58594 27.734375,72.617188 78.101562,22.25 c 8.339844,-8.339844 21.824219,-8.339844 30.164068,0 8.34375,8.34375 8.34375,21.824219 0,30.164062 C 65.960938,94.71875 42.667969,150.97656 42.667969,210.81641 c 0,11.77734 -9.558594,21.33203 -21.335938,21.33203 z m 0,0"
data-original="#000000"
class="active-path"
style="fill:#ffffff"
data-darkreader-inline-fill=""
data-old_color="#000000"
id="path4"
inkscape:connector-curvature="0" />
<path
d="M 434.75391,360.8125 C 402.49609,333.54687 384,293.69531 384,251.47656 V 192 C 384,116.92969 328.23437,54.785156 256,44.375 V 21.332031 C 256,9.535156 246.44141,0 234.66797,0 222.89062,0 213.33203,9.535156 213.33203,21.332031 V 44.375 C 141.07812,54.785156 85.332031,116.92969 85.332031,192 v 59.47656 c 0,42.21875 -18.496093,82.07031 -50.941406,109.50391 -8.300781,7.10547 -13.058594,17.42969 -13.058594,28.35156 0,20.58984 16.746094,37.33594 37.335938,37.33594 H 410.66797 c 20.58594,0 37.33203,-16.7461 37.33203,-37.33594 0,-10.92187 -4.75781,-21.24609 -13.24609,-28.51953 z m 0,0"
data-original="#000000"
class="active-path"
style="fill:#ffffff"
data-darkreader-inline-fill=""
data-old_color="#000000"
id="path6"
inkscape:connector-curvature="0" />
<path
d="m 234.66797,512 c 38.63281,0 70.95312,-27.54297 78.3789,-64 H 156.28906 c 7.42188,36.45703 39.74219,64 78.37891,64 z m 0,0"
data-original="#000000"
class="active-path"
style="fill:#ffffff"
data-darkreader-inline-fill=""
data-old_color="#000000"
id="path8"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

@ -0,0 +1,135 @@
local awful = require("awful")
local wibox = require("wibox")
local gears = require("gears")
local naughty = require("naughty")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local clickable_container = require("ui.widgets.clickable-container")
local config_dir = gears.filesystem.get_configuration_dir()
local widget_dir = config_dir .. "ui/widgets/dnd/"
local widget_icon_dir = widget_dir .. "icons/"
_G.dont_disturb_state = false
local action_name = wibox.widget({
text = "Do Not Disturb",
font = beautiful.font_name .. "Bold 12",
align = "left",
widget = wibox.widget.textbox,
})
local action_status = wibox.widget({
text = "Off",
font = beautiful.font_name .. "11",
align = "left",
widget = wibox.widget.textbox,
})
local action_info = wibox.widget({
layout = wibox.layout.fixed.vertical,
action_name,
action_status,
})
local button_widget = wibox.widget({
{
id = "icon",
image = gears.color.recolor_image(widget_icon_dir .. "notify.svg", beautiful.xforeground),
widget = wibox.widget.imagebox,
resize = true,
},
layout = wibox.layout.align.horizontal,
})
local widget_button = wibox.widget({
{
{
button_widget,
margins = dpi(15),
forced_height = dpi(48),
forced_width = dpi(48),
widget = wibox.container.margin,
},
widget = clickable_container,
},
bg = beautiful.control_center_button_bg,
shape = gears.shape.circle,
widget = wibox.container.background,
})
local update_widget = function()
if dont_disturb_state then
action_status:set_text("On")
widget_button.bg = beautiful.accent
button_widget.icon:set_image(
gears.color.recolor_image(widget_icon_dir .. "dont-disturb.svg", beautiful.xforeground)
)
else
action_status:set_text("Off")
widget_button.bg = beautiful.control_center_button_bg
button_widget.icon:set_image(gears.color.recolor_image(widget_icon_dir .. "notify.svg", beautiful.xforeground))
end
end
local check_disturb_status = function()
awful.spawn.easy_async_with_shell("cat " .. widget_dir .. "disturb_status", function(stdout)
local status = stdout
if status:match("true") then
dont_disturb_state = true
elseif status:match("false") then
dont_disturb_state = false
else
dont_disturb_state = false
awful.spawn.with_shell("echo 'false' > " .. widget_dir .. "disturb_status")
end
update_widget()
end)
end
check_disturb_status()
local toggle_action = function()
if dont_disturb_state then
dont_disturb_state = false
else
dont_disturb_state = true
end
awful.spawn.easy_async_with_shell(
"echo " .. tostring(dont_disturb_state) .. " > " .. widget_dir .. "disturb_status",
function()
update_widget()
end
)
end
widget_button:buttons(gears.table.join(awful.button({}, 1, nil, function()
toggle_action()
end)))
action_info:buttons(gears.table.join(awful.button({}, 1, nil, function()
toggle_action()
end)))
local action_widget = wibox.widget({
layout = wibox.layout.fixed.horizontal,
spacing = dpi(10),
widget_button,
{
layout = wibox.layout.align.vertical,
expand = "none",
nil,
action_info,
nil,
},
})
-- Create a notification sound
naughty.connect_signal("request::display", function(n)
if not dont_disturb_state then
awful.spawn.with_shell("canberra-gtk-play -i message")
end
end)
return action_widget

View file

@ -0,0 +1,43 @@
local awful = require("awful")
local wibox = require("wibox")
local gears = require("gears")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local clickable_container = require("ui.widgets.clickable-container")
local helpers = require("helpers")
local return_button = function()
local widget = wibox.widget({
{
align = "center",
valign = "center",
font = beautiful.icon_font_name .. "18",
markup = helpers.colorize_text("󰤆", beautiful.xforeground),
widget = wibox.widget.textbox(),
},
layout = wibox.layout.align.horizontal,
})
local widget_button = wibox.widget({
{
{
widget,
margins = dpi(8),
widget = wibox.container.margin,
},
widget = clickable_container,
},
bg = beautiful.transparent,
shape = helpers.rrect(beautiful.control_center_widget_radius),
widget = wibox.container.background,
})
widget_button:buttons(gears.table.join(awful.button({}, 1, nil, function()
awesome.emit_signal("module::exit_screen:show")
central_panel:toggle()
end)))
return widget_button
end
return return_button

View file

@ -0,0 +1 @@
false

View file

@ -0,0 +1,4 @@
<svg width="240" height="240" viewBox="0 0 240 240" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="20" y="20" width="149" height="134" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M169 120V154H84V120H169ZM182 120V167H174H169H84V220H220V120H182Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 297 B

View file

@ -0,0 +1,9 @@
<svg width="240" height="240" viewBox="0 0 240 240" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M83 20H20V220H83V20Z" fill="white"/>
<path d="M153 20H101V74H153V20Z" fill="white"/>
<path d="M153 93H101V147H153V93Z" fill="white"/>
<path d="M153 166H101V220H153V166Z" fill="white"/>
<path d="M220 20H171V74H220V20Z" fill="white"/>
<path d="M220 93H171V147H220V93Z" fill="white"/>
<path d="M220 166H171V220H220V166Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 449 B

View file

@ -0,0 +1,175 @@
local awful = require("awful")
local wibox = require("wibox")
local gears = require("gears")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local clickable_container = require("ui.widgets.clickable-container")
local config_dir = gears.filesystem.get_configuration_dir()
local widget_dir = config_dir .. "ui/widgets/floating-mode/"
local widget_icon_dir = widget_dir .. "icons/"
local floating_state = false
local action_name = wibox.widget({
text = "Floating Mode",
font = beautiful.font_name .. "Bold 12",
align = "left",
widget = wibox.widget.textbox,
})
local action_status = wibox.widget({
text = "Off",
font = beautiful.font_name .. "11",
align = "left",
widget = wibox.widget.textbox,
})
local action_info = wibox.widget({
layout = wibox.layout.fixed.vertical,
action_name,
action_status,
})
local button_widget = wibox.widget({
{
id = "icon",
image = gears.color.recolor_image(widget_icon_dir .. "floating.svg", beautiful.xforeground),
widget = wibox.widget.imagebox,
resize = true,
},
layout = wibox.layout.align.horizontal,
})
local widget_button = wibox.widget({
{
{
button_widget,
margins = dpi(15),
forced_height = dpi(48),
forced_width = dpi(48),
widget = wibox.container.margin,
},
widget = clickable_container,
},
bg = beautiful.control_center_button_bg,
shape = gears.shape.circle,
widget = wibox.container.background,
})
local update_widget = function()
if floating_state then
action_status:set_text("On")
widget_button.bg = beautiful.accent
button_widget.icon:set_image(
gears.color.recolor_image(widget_icon_dir .. "floating.svg", beautiful.xforeground)
)
else
action_status:set_text("Off")
widget_button.bg = beautiful.control_center_button_bg
button_widget.icon:set_image(
gears.color.recolor_image(widget_icon_dir .. "floating.svg", beautiful.xforeground)
)
end
end
local check_floating_mode_state = function()
local cmd = "cat " .. widget_dir .. "floating_mode"
awful.spawn.easy_async_with_shell(cmd, function(stdout)
local status = stdout
if status:match("true") then
floating_state = true
elseif status:match("false") then
floating_state = false
else
floating_state = false
awful.spawn.easy_async_with_shell('echo "false" > ' .. widget_dir .. "floating_mode", function(stdout) end)
end
update_widget()
end)
end
check_floating_mode_state()
local ap_off_cmd = [[
# Create an AwesomeWM Notification
awesome-client "
naughty = require('naughty')
naughty.notification({
app_name = 'Layout Manager',
title = '<b>Floating mode disabled!</b>',
message = 'Set global layout to tile',
icon = ']] .. widget_icon_dir .. "tile" .. ".svg" .. [['
})
"
]] .. "echo false > " .. widget_dir .. "floating_mode" .. [[
]]
local ap_on_cmd = [[
# Create an AwesomeWM Notification
awesome-client "
naughty = require('naughty')
naughty.notification({
app_name = 'Layout Manager',
title = '<b>Floating mode enabled!</b>',
message = 'Set global layout to floating',
icon = ']] .. widget_icon_dir .. "floating" .. ".svg" .. [['
})
"
]] .. "echo true > " .. widget_dir .. "floating_mode" .. [[
]]
local toggle_global_floating = function()
local tags = awful.screen.focused().tags
if not floating_state then
for _, tag in ipairs(tags) do
awful.layout.set(awful.layout.suit.floating, tag)
end
awful.spawn.easy_async_with_shell(ap_on_cmd, function(stdout)
floating_state = true
update_widget()
end)
else
for _, tag in ipairs(tags) do
awful.layout.set(awful.layout.suit.tile, tag)
end
awful.spawn.easy_async_with_shell(ap_off_cmd, function(stdout)
floating_state = false
update_widget()
end)
end
end
widget_button:buttons(gears.table.join(awful.button({}, 1, nil, function()
toggle_global_floating()
end)))
action_info:buttons(gears.table.join(awful.button({}, 1, nil, function()
toggle_global_floating()
end)))
gears.timer({
timeout = 5,
autostart = true,
callback = function()
check_floating_mode_state()
end,
})
local action_widget = wibox.widget({
layout = wibox.layout.fixed.horizontal,
spacing = dpi(10),
widget_button,
{
layout = wibox.layout.align.vertical,
expand = "none",
nil,
action_info,
nil,
},
})
return action_widget

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M15 10.6V5c0-1.66-1.34-3-3-3-1.54 0-2.79 1.16-2.96 2.65L15 10.6zm3.08.4c-.41 0-.77.3-.83.71-.05.32-.12.64-.22.93l1.27 1.27c.3-.6.52-1.25.63-1.94.07-.51-.33-.97-.85-.97zM3.71 3.56c-.39.39-.39 1.02 0 1.41L9 10.27v.43c0 1.19.6 2.32 1.63 2.91.75.43 1.41.44 2.02.31l1.66 1.66c-.71.33-1.5.52-2.31.52-2.54 0-4.88-1.77-5.25-4.39-.06-.41-.42-.71-.83-.71-.52 0-.92.46-.85.97.46 2.96 2.96 5.3 5.93 5.75V20c0 .55.45 1 1 1s1-.45 1-1v-2.28c.91-.13 1.77-.45 2.55-.9l3.49 3.49c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L5.12 3.56c-.39-.39-1.02-.39-1.41 0z"/></svg>

After

Width:  |  Height:  |  Size: 661 B

Some files were not shown because too many files have changed in this diff Show more