This commit is contained in:
root
2021-11-18 19:30:30 +01:00
parent 5a9012fcb2
commit 7f28224bf1
51 changed files with 1632 additions and 433 deletions

21
awesome/.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,21 @@
{
// Verwendet IntelliSense zum Ermitteln möglicher Attribute.
// Zeigen Sie auf vorhandene Attribute, um die zugehörigen Beschreibungen anzuzeigen.
// Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lua-local",
"request": "launch",
"name": "Debug with Xephyr",
"program": {
"command": "${workspaceFolder}/start-xephyr.sh"
},
"args": [
"/usr/bin/Xephyr",
"/usr/bin/awesome",
"${workspaceFolder}/init.lua"
],
}
]
}

12
awesome/.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,12 @@
{
"Lua.diagnostics.globals": [
"awesome",
"client",
"screen",
"mouse",
"root",
"mykeyboardlayout",
"modkey",
"hover_signal"
]
}

View File

@@ -0,0 +1,69 @@
-- Awesome Libs
local awful = require("awful")
local gears = require("gears")
local modkey = RC.vars.modkey
return function (globalkeys)
for i = 1, 9 do
globalkeys = gears.table.join(globalkeys,
-- View tag only
awful.key(
{modkey},
"#" .. i + 9,
function()
local screen = awful.screen.focused()
local tag = screen.tags[i]
if tag then
tag:view_only()
end
client.emit_signal("tag::switched")
end,
{description = "View Tag " .. i, group = "Tag"}
),
-- Brings the window over without chaning the tag, reverts automatically on tag change
awful.key(
{modkey, "Control"},
"#" .. i + 9,
function()
local screen = awful.screen.focused()
local tag = screen.tags[i]
if tag then
awful.tag.viewtoggle(tag)
end
end,
{description = "Toggle Tag " .. i, group = "Tag"}
),
-- Brings the window over without chaning the tag, reverts automatically on tag change
awful.key(
{modkey, "Shift"},
"#" .. i + 9,
function()
local screen = awful.screen.focused()
if client.focus then
local tag = screen.tags[i]
if tag then
client.focus:move_to_tag(tag)
end
end
end,
{description = "Move focused client on tag " .. i, group = "Tag"}
),
-- Brings the window over without chaning the tag, reverts automatically on tag change
awful.key(
{modkey, "Control", "Shift"},
"#" .. i + 9,
function()
local screen = awful.screen.focused()
local tag = screen.tags[i]
if tag then
awful.tag.viewtoggle(tag)
end
end,
{description = "Move focused client on tag " .. i, group = "Tag"}
)
)
end
return globalkeys
end

View File

@@ -0,0 +1,22 @@
-- Awesome Libs
local awful = require("awful")
local gears = require("gears")
local modkey = RC.vars.modkey
return function ()
local clientbuttons = gears.table.join(
awful.button({ }, 1, function (c)
c:emit_signal("request::activate", "mouse_click", { raise = true })
end),
awful.button({ modkey }, 1, function (c)
c:emit_signal("request::activate", "mouse_click", { raise = true })
awful.mouse.client.move(c)
end),
awful.button({ modkey }, 3, function (c)
c:emit_signal("request::activate", "mouse_click", { raise = true })
awful.mouse.client.resize(c)
end)
)
return clientbuttons
end

View File

@@ -0,0 +1,52 @@
-- Awesome Libs
local awful = require("awful")
local gears = require("gears")
local modkey = RC.vars.modkey
return function ()
local clientkeys = gears.table.join(
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 window", group = "Client" }
),
awful.key(
{ modkey },
"space",
awful.client.floating.toggle,
{ description = "Toggle floating window", 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 = "Unmaximize", group = "client"}
)
)
return clientkeys
end

View File

@@ -0,0 +1,14 @@
-- Awesome Libs
local gears = require("gears")
local awful = require("awful")
return function ()
local globalbuttons = gears.table.join(
awful.button({ }, 3, function()
RC.MainMenu:toggle()
end),
awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev)
)
return globalbuttons
end

View File

@@ -0,0 +1,352 @@
-- Awesome Libs
local gears = require("gears")
local awful = require("awful")
local hotkeys_popup = require("awful.hotkeys_popup")
-- Resource Configuration
local modkey = RC.vars.modkey
return function()
local globalkeys = gears.table.join(
awful.key(
{ modkey },
"s",
hotkeys_popup.show_help,
{description="Cheet Sheet", group="Awesome"}
),
-- Tag browsing
awful.key(
{ modkey },
"Left",
awful.tag.viewprev,
{description = "View previous", group = "Tag"}
),
awful.key(
{ modkey },
"Right",
awful.tag.viewnext,
{description = "View next", group = "Tag"}
),
awful.key(
{ modkey },
"Escape",
awful.tag.history.restore,
{description = "Go back", group = "Tag"}
),
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 },
"w",
function ()
RC.MainMenu:show()
end,
{description = "Show main menu", group = "Awesome"}
),
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, "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"}
),
awful.key(
{ modkey },
"u",
awful.client.urgent.jumpto,
{description = "Jump to urgent client", group = "Client"}),
awful.key(
{ modkey },
"Tab",
function ()
awful.client.focus.history.previous()
if client.focus then
client.focus:raise()
end
end,
{description = "Go back", group = "Client"}
),
awful.key(
{ modkey },
"Return",
function ()
awful.spawn("alacritty -o font.size=8")
end,
{description = "Open terminal", group = "Launcher"}
),
awful.key(
{ modkey, "Control" },
"r",
awesome.restart,
{description = "Reload awesome", group = "Awesome"}
),
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, "Shift" },
"space",
function ()
awful.layout.inc(-1)
end,
{description = "Select previous", group = "Layout"}
),
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"}
),
awful.key(
{ modkey, "Control" },
"Up",
function ()
awful.client.moveresize( 0, 0, 0, -20)
end
),
awful.key(
{ modkey, "Control" },
"Down",
function ()
awful.client.moveresize( 0, 0, 0, 20)
end
),
awful.key(
{ modkey, "Control" },
"Left",
function ()
awful.client.moveresize( 0, 0, -20, 0)
end
),
awful.key(
{ modkey, "Control" },
"Right",
function ()
awful.client.moveresize( 0, 0, 20, 0)
end
),
awful.key(
{ modkey, "Shift" },
"Down",
function ()
awful.client.moveresize( 0, 20, 0, 0)
end
),
awful.key(
{ modkey, "Shift" },
"Up",
function ()
awful.client.moveresize( 0, -20, 0, 0)
end
),
awful.key(
{ modkey, "Shift" },
"Left",
function ()
awful.client.moveresize(-20, 0, 0, 0)
end
),
awful.key(
{ modkey, "Shift" },
"Right",
function ()
awful.client.moveresize( 20, 0, 0, 0)
end
),
awful.key(
{ modkey },
"d",
function ()
awful.spawn("rofi -show drun -theme ~/.config/rofi/appmenu/rofi.rasi")
end,
{ descripton = "Application searcher", group = "Application" }
),
awful.key(
{ modkey },
"Tab",
function ()
awful.spawn("rofi -show window -theme ~/.config/rofi/appmenu/rofi.rasi")
end,
{ descripton = "Show all open windows", group = "Application" }
),
awful.key(
{ modkey },
"e",
function ()
awful.spawn("thunar")
end,
{ descripton = "Open Thunar File Manager", group = "System" }
),
awful.key(
{ modkey, "Shift" },
"e",
function ()
awesome.emit_signal("module::powermenu:show")
end,
{ descripton = "Open the exit window", group = "System" }
),
awful.key(
{ },
"Print",
function ()
awful.spawn("flameshot gui")
end
),
awful.key(
{ },
"XF86AudioLowerVolume",
function (c)
awful.spawn("amixer sset Master 5%-")
awesome.emit_signal("widget::volume")
awesome.emit_signal("module::volume_osd:show", true)
awesome.emit_signal("module::slider:update")
awesome.emit_signal("widget::volume_osd:rerun")
end
),
awful.key(
{ },
"XF86AudioRaiseVolume",
function (c)
awful.spawn("amixer sset Master 5%+")
awesome.emit_signal("widget::volume")
awesome.emit_signal("module::volume_osd:show", true)
awesome.emit_signal("module::slider:update")
awesome.emit_signal("widget::volume_osd:rerun")
end
),
awful.key(
{ },
"XF86AudioMute",
function (c)
awful.spawn("pactl -- set-sink-mute @DEFAULT_SINK@ toggle")
awesome.emit_signal("widget::volume")
awesome.emit_signal("module::volume_osd:show", true)
awesome.emit_signal("module::slider:update")
awesome.emit_signal("widget::volume_osd:rerun")
end
),
awful.key(
{ modkey },
"F5",
function (c)
awful.spawn("xbacklight -inc 10%+")
awesome.emit_signal("module::brightness_osd:show", true)
awesome.emit_signal("module::brightness_slider:update")
awesome.emit_signal("widget::brightness_osd:rerun")
end
),
awful.key(
{ modkey },
"F4",
function (c)
awful.spawn("xbacklight -dec 10%-")
awesome.emit_signal("widget::brightness_osd:rerun")
awesome.emit_signal("module::brightness_osd:show", true)
awesome.emit_signal("module::brightness_slider:update")
end
),
awful.key(
{ modkey, "Shift" },
"q",
function ()
local t = awful.screen.focused().selected_tag
t:delete()
end
)
)
return globalkeys
end

View File

@@ -0,0 +1,42 @@
--------------------------------------------------------------------------------------------------------------
-- This is the statusbar, every widget, module and so on is combined to all the stuff you see on the screen --
--------------------------------------------------------------------------------------------------------------
-- Awesome Libs
local awful = require("awful")
local colors = require ("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
return function (s, widget)
local top_center = awful.popup{
widget = wibox.container.background,
ontop = false,
bg = colors.color["Grey900"],
stretch = false,
visible = true,
maximum_width = dpi(500),
placement = function (c) awful.placement.top(c, {margins = dpi(10)}) end,
shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 10)
end
}
top_center:setup{
{
widget,
margins = dpi(6),
widget = wibox.container.margin
},
forced_height = 45,
layout = wibox.layout.align.horizontal
}
awesome.connect_signal(
"hide_centerbar",
function (hide)
top_center.visible = hide
end
)
end

View File

@@ -0,0 +1,49 @@
--------------------------------------------------------------------------------------------------------------
-- This is the statusbar, every widget, module and so on is combined to all the stuff you see on the screen --
--------------------------------------------------------------------------------------------------------------
-- Awesome Libs
local awful = require("awful")
local colors = require ("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
return function (s, widgets)
local top_left = awful.popup{
widget = wibox.container.background,
ontop = false,
bg = colors.color["Grey900"],
stretch = false,
visible = true,
maximum_width = dpi(650),
placement = function(c) awful.placement.top_left(c, {margins = dpi(10)}) end,
shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 10)
end
}
top_left:struts{
top = 55
}
top_left:setup {
nil,
nil,
{
{
widgets[1],
margins = dpi(6),
widget = wibox.container.margin
},
{
widgets[2],
margins = dpi(6),
widget = wibox.container.margin
},
forced_height = 45,
layout = wibox.layout.fixed.horizontal
},
layout = wibox.layout.align.horizontal
}
end

View File

@@ -0,0 +1,99 @@
--------------------------------------------------------------------------------------------------------------
-- This is the statusbar, every widget, module and so on is combined to all the stuff you see on the screen --
--------------------------------------------------------------------------------------------------------------
-- Awesome Libs
local awful = require("awful")
local colors = require ("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
return function (s, widgets)
local top_right = awful.popup{
widget = wibox.container.background,
ontop = false,
bg = colors.color["Grey900"],
stretch = false,
visible = true,
screen = s,
placement = function (c) awful.placement.top_right(c, {margins = dpi(10)}) end,
shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 10)
end
}
top_right:setup {
nil,
nil,
{
{
widgets[1],
left = dpi(6),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
widgets[2],
left = dpi(3),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
widgets[3],
left = dpi(3),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
widgets[4],
left = dpi(3),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
widgets[5],
left = dpi(3),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
widgets[6],
left = dpi(3),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
widgets[7],
left = dpi(3),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
widgets[8],
left = dpi(3),
right = dpi(6),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
forced_height = 45,
layout = wibox.layout.fixed.horizontal
},
layout = wibox.layout.align.horizontal
}
end

View File

@@ -0,0 +1,34 @@
--------------------------------------------------------------------------------------------------------------
-- This is the statusbar, every widget, module and so on is combined to all the stuff you see on the screen --
--------------------------------------------------------------------------------------------------------------
-- Awesome Libs
local awful = require("awful")
awful.screen.connect_for_each_screen(
function (s)
-- Modules
require("theme.crylia.modules.powermenu")(s)
require("theme.crylia.modules.calendar_osd")(s)
require("theme.crylia.modules.volume_osd")(s)
require("theme.crylia.modules.brightness_osd")(s)
require("theme.crylia.modules.titlebar")
-- Widgets
s.battery = require("theme.crylia.widgets.battery")()
s.network = require("theme.crylia.widgets.network")()
s.audio = require("theme.crylia.widgets.audio")()
s.date = require("theme.crylia.widgets.date")()
s.clock = require("theme.crylia.widgets.clock")()
s.bluetooth = require("theme.crylia.widgets.bluetooth")()
s.layoutlist = require("theme.crylia.widgets.layout_list")()
s.powerbutton = require("theme.crylia.widgets.power")()
s.kblayout = require("theme.crylia.widgets.kblayout")()
s.taglist = require("theme.crylia.widgets.taglist")(s)
s.tasklist = require("theme.crylia.widgets.tasklist")(s)
-- Bars
require("CryliaBar.LeftBar")(s, {s.layoutlist, s.taglist})
require("CryliaBar.CenterBar")(s, s.tasklist)
require("CryliaBar.RightBar")(s, {s.battery, s.network, s.bluetooth, s.audio, s.kblayout, s.date, s.clock,s.powerbutton})
end
)

View File

@@ -0,0 +1,33 @@
----------------------------------------------------------------
-- This class is to output an error if you fuck up the config --
----------------------------------------------------------------
-- Awesome Libs
local naughty = require("naughty")
if awesome.startup_errors then
naughty.notify({
preset = naughty.config.presets.critical,
title = "ERROR in Awesome config!",
text = awesome.startup_errors
})
end
do
local in_error = false
awesome.connect_signal(
"debug::error",
function (err)
if in_error then
return
end
in_error = true
naughty.notify({
preset = naughty.config.presets.critical,
title = "ERROR",
text = tostring(err)
})
in_error = false
end
)
end

14
awesome/Main/Layouts.lua Normal file
View File

@@ -0,0 +1,14 @@
------------------------------------------------------------------------------------------
-- Layout class, if you want to add or remove layouts from the list do it in this table --
------------------------------------------------------------------------------------------
-- Awesome Libs
local awful = require("awful")
return function ()
local layouts = {
awful.layout.suit.tile,
awful.layout.suit.floating,
}
return layouts
end

38
awesome/Main/Menu.lua Normal file
View File

@@ -0,0 +1,38 @@
--------------------------------------------------------------
-- Menu class, this is where you change the rightclick menu --
--------------------------------------------------------------
-- Awesome Libs
local awful = require("awful")
-- Module Namespace
local _M = { }
local session = {
{ "Logout", function () awesome.quit() end },
{ "Shutdown", function () awful.spawn.with_shell('shutdown now') end },
{ "Reboot", function () awful.spawn.with_shell('reboot') end },
}
local applications = {
{ "Firefox", "firefox" },
{ "VS Code", "code" },
{ "Blender", "blender" },
{ "Steam", "steam" },
{ "Lutris", "lutris" },
}
local settings = {
{ "General Settings", "gnome-control-center" },
{ "Power Settings", "xfce4-power-manager-settings" },
{ "Display Settings", "arandr" }
}
return function()
local MenuItems = {
{ "Power Menu", session },
{ "Applications", applications },
{ "Open Terminal", RC.vars.terminal },
{ "Settings", settings },
}
return MenuItems
end

53
awesome/Main/Rules.lua Normal file
View File

@@ -0,0 +1,53 @@
-------------------------------------------------------------------------------------------------
-- This class contains rules for float exceptions or special themeing for certain applications --
-------------------------------------------------------------------------------------------------
-- Awesome Libs
local awful = require("awful")
local beautiful = require("beautiful")
return function (clientkeys, clientbuttons)
local rules = {
{
rule = { },
properties = {
border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
raise = true,
keys = clientkeys,
buttons = clientbuttons,
screen = awful.screen.preferred,
placement = awful.placement.no_overlap+awful.placement.no_offscreen
}
},
{
rule_any = {
instance = { },
class = {
"Arandr",
"Lxappearance",
"kdeconnect.app",
"zoom",
"file-roller",
"File-roller"
},
name = { },
role = {
"AlarmWindow",
"ConfigManager",
"pop-up"
}
},
properties = { floating = true, titlebars_enabled = true }
},
{
id = "titlebar",
rule_any = {
type = { "normal", "dialog", "modal", "utility" }
},
properties = { titlebars_enabled = true }
}
}
return rules
end

101
awesome/Main/Signals.lua Normal file
View File

@@ -0,0 +1,101 @@
-- Awesome Libs
local awful = require("awful")
local beautiful = require("beautiful")
local gears = require("gears")
client.connect_signal(
"manage",
function (c)
if awesome.startup and not c.size_hints.user_porition and not c.size_hints.program_position then
awful.placement.no_offscreen(c)
end
end
)
client.connect_signal(
'unmanage',
function(c)
if #awful.screen.focused().clients > 0 then
awful.screen.focused().clients[1]:emit_signal(
'request::activate',
'mouse_enter',
{
raise = true
}
)
end
end
)
client.connect_signal(
'tag::switched',
function(c)
if #awful.screen.focused().clients > 0 then
awful.screen.focused().clients[1]:emit_signal(
'request::activate',
'mouse_enter',
{
raise = true
}
)
end
end
)
-- Sloppy focus
client.connect_signal("mouse::enter", function(c)
c:emit_signal("request::activate", "mouse_enter", {raise = false})
end)
-- Workaround for focused border color, why in the love of god doesnt it work with
-- beautiful.border_focus
client.connect_signal("focus", function (c)
c.border_color = "#616161"
end)
client.connect_signal("unfocus", function (c)
c.border_color = beautiful.border_normal
end)
function hover_signal (widget, bg)
local old_wibox, old_cursor, old_bg
widget:connect_signal(
"mouse::enter",
function ()
old_bg = widget.bg
widget.bg = bg .. 'dd'
local w = mouse.current_wibox
if w then
old_cursor, old_wibox = w.cursor, w
w.cursor = "hand1"
end
end
)
widget:connect_signal(
"button::press",
function ()
widget.bg = bg .. 'bb'
end
)
widget:connect_signal(
"button::release",
function ()
widget.bg = bg .. 'dd'
end
)
widget:connect_signal(
"mouse::leave",
function ()
widget.bg = old_bg
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end
)
end

23
awesome/Main/Tags.lua Normal file
View File

@@ -0,0 +1,23 @@
-----------------------------------------------------------------------------------------------------
-- Here are the ammount of tags generated, edit the awful.tag args if you want a different ammount --
-----------------------------------------------------------------------------------------------------
-- Awesome Libs
local awful = require("awful")
return function()
local tags = {}
awful.screen.connect_for_each_screen(
function (s)
tags[s] = awful.tag(
{
"1", "2", "3", "4", "5", "6", "7", "8", "9"
},
s,
RC.Layouts[1]
)
end
)
return tags
end

19
awesome/Main/Theme.lua Normal file
View File

@@ -0,0 +1,19 @@
local awful = require("awful")
local beautiful = require("beautiful")
local gears = require("gears")
local home = os.getenv("HOME")
beautiful.init(home .. "/.config/awesome/theme/crylia/theme.lua")
if(RC.vars.wallpaper) then
local wallpaper = RC.vars.wallpaper
if awful.util.file_readable(wallpaper) then
Theme.wallpaper = wallpaper
end
end
if beautiful.wallpaper then
for s = 1, screen.count() do
gears.wallpaper.maximized(beautiful.wallpaper, s, true)
end
end

View File

@@ -0,0 +1,18 @@
-------------------------------------------
-- Uservariables are stored in this file --
-------------------------------------------
local home = os.getenv("HOME")
-- If you want different default programs, wallpaper path or modkey; edit this file.
local _M = {
-- This is your default Terminal
terminal = "alacritty",
-- This is the modkey 'mod4' = Super/Mod/WindowsKey, 'mod3' = alt...
modkey = "Mod4",
-- place your wallpaper at this path with this name, you could also try to change the path
wallpaper = home .. "/.config/awesome/theme/crylia/assets/wallpaper.jpg",
-- Naming scheme for the powermenu, userhost = "user@hostname", fullname = "Firstname Surname", something else ...
namestyle = "userhost"
}
return _M

View File

@@ -0,0 +1,18 @@
---------------------------------------
-- This function sets your wallpaper --
---------------------------------------
-- Awesome Libs
local gears = require("gears")
local beautiful = require("beautiful")
function Set_wallpaper(s)
if beautiful.wallpaper then
local wallpaper = beautiful.wallpaper
if type(wallpaper) == "function" then
wallpaper = wallpaper(s)
end
gears.wallpaper.maximized(wallpaper, s, true)
end
end
screen.connect_signal("property::geometry", Set_wallpaper)

View File

@@ -6,6 +6,10 @@
-- ██║ ██║╚███╔███╔╝███████╗███████║╚██████╔╝██║ ╚═╝ ██║███████╗╚███╔███╔╝██║ ╚═╝ ██║ --
-- ╚═╝ ╚═╝ ╚══╝╚══╝ ╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚══╝╚══╝ ╚═╝ ╚═╝ --
-----------------------------------------------------------------------------------------
if os.getenv "LOCAL_LUA_DEBUGGER_VSCODE" == "1" then
require("lldebugger").start()
end
-- Default Awesome Libs
local awful = require("awful")
local beautiful = require("beautiful")
@@ -14,84 +18,71 @@ local menubar = require("menubar")
-- Global Namespace
RC = {}
RC.vars = require("main.user_variables")
RC.vars = require("Main.UserVariables")
-- Error Handling
require("main.error_handling")
require("Main.ErrorHandling")
-- Default Theme and Custom Wallpaper
beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua")
beautiful.wallpaper = RC.vars.wallpaper
modkey = RC.vars.modkey
require("main.theme")
require("Main.Theme")
-- Load Local User Libs
local main = {
layouts = require("main.layouts"),
tags = require("main.tags"),
menu = require("main.menu"),
rules = require("main.rules")
local Main = {
Layouts = require("Main.Layouts"),
Tags = require("Main.Tags"),
Menu = require("Main.Menu"),
Rules = require("Main.Rules")
}
-- Load all Shortcuts from Local User Libs
local bindings = {
globalbuttons = require("bindings.globalbuttons"),
clientbuttons = require("bindings.clientbuttons"),
globalkeys = require("bindings.globalkeys"),
bindtotags = require("bindings.bindtotags"),
clientkeys = require("bindings.clientkeys")
local Bindings = {
GlobalButtons = require("Bindings.GlobalButtons"),
ClientButtons = require("Bindings.ClientButtons"),
GlobalKeys = require("Bindings.GlobalKeys"),
BindToTags = require("Bindings.BindToTags"),
ClientKeys = require("Bindings.ClientKeys")
}
-- Sets the local layout to Aweful.layout.inc
RC.layouts = main.layouts()
awful.layout.layouts = main.layouts()
RC.Layouts = Main.Layouts()
-- Tag table which holds all screen tags
RC.tags = main.tags()
awful.layout.layouts = Main.Layouts()
-- Creates a launcher widget and a main menu
RC.mainmenu = awful.menu({
items = main.menu()
RC.Tags = Main.Tags()
RC.MainMenu = awful.menu({
items = Main.Menu()
})
-- A Variable needed in Statusbar (helper)
RC.launcher = awful.widget.launcher({
image = beautiful.awesome_icon,
menu = RC.mainmenu
RC.Launcher = awful.widget.launcher({
Image = beautiful.awesome_icon,
Menu = RC.MainMenu
})
-- Menubar configuration
menubar.utils.terminal = RC.vars.terminal
-- Sets the user Keybindings
RC.globalkeys = bindings.globalkeys()
RC.globalkeys = bindings.bindtotags(RC.globalkeys)
-- Set root
root.buttons(bindings.globalbuttons())
root.keys(RC.globalkeys)
root.buttons(Bindings.GlobalButtons())
root.keys(Bindings.BindToTags(Bindings.GlobalKeys()))
-- Keymap
mykeyboardlayout = awful.widget.keyboardlayout()
-- Default statusbar, uncomment if you dont use a third party tool like polybar
require("deco.statusbar")
-- Default statusbar, comment if you want use a third party tool like polybar
require("CryliaBar.init")
-- Rules to apply to new clients
awful.rules.rules = main.rules(
bindings.clientkeys(),
bindings.clientbuttons()
awful.rules.rules = Main.Rules(
Bindings.ClientKeys(),
Bindings.ClientButtons()
)
-- Signals
require("main.signals")
-- Titlebar
require("theme.crylia.modules.titlebar")
require("Main.Signals")
-- Autostart programs
--awful.spawn.with_shell("~/.screenlayout/single_screen.sh")
awful.spawn.with_shell("picom --experimental-backends")
awful.spawn.with_shell("xfce4-power-manager")
awful.spawn.with_shell("~/.screenlayout/single_screen.sh")

2
awesome/start-xephyr.sh Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/bash
awmtt -c rc.lua -S 1800x900

View File

@@ -0,0 +1,21 @@
------------------------------
-- This is the audio widget --
------------------------------
function GetIcon(theme, c)
if theme and c then
local clientName = string.lower(c.class) .. ".svg"
local resolutions = {"128x128", "96x96", "64x64", "48x48", "42x42", "32x32", "24x24", "16x16"}
local home = os.getenv("HOME")
for i, res in ipairs(resolutions) do
local iconDir = home .. "/.icons/" .. theme .. "/" .. res .."/apps/"
local ioStream = io.open(iconDir .. clientName, "r")
if ioStream ~= nil then
return iconDir .. clientName
else
return c:get_icon(1)
end
end
end
return nil
end

View File

@@ -1 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M12,19.2C9.5,19.2 7.29,17.92 6,16C6.03,14 10,12.9 12,12.9C14,12.9 17.97,14 18,16C16.71,17.92 14.5,19.2 12,19.2M12,5A3,3 0 0,1 15,8A3,3 0 0,1 12,11A3,3 0 0,1 9,8A3,3 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z" /></svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
<path d="M12,19.2C9.5,19.2 7.29,17.92 6,16C6.03,14 10,12.9 12,12.9C14,12.9 17.97,14 18,16C16.71,17.92 14.5,19.2 12,19.2M12,5A3,3 0 0,1 15,8A3,3 0 0,1 12,11A3,3 0 0,1 9,8A3,3 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z" fill="#212121" />
</svg>

Before

Width:  |  Height:  |  Size: 549 B

After

Width:  |  Height:  |  Size: 572 B

View File

@@ -1 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z" /></svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
<path d="M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z" fill="#212121" />
</svg>

Before

Width:  |  Height:  |  Size: 530 B

After

Width:  |  Height:  |  Size: 553 B

View File

@@ -1 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M16,17V14H9V10H16V7L21,12L16,17M14,2A2,2 0 0,1 16,4V6H14V4H5V20H14V18H16V20A2,2 0 0,1 14,22H5A2,2 0 0,1 3,20V4A2,2 0 0,1 5,2H14Z" /></svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
<path d="M16,17V14H9V10H16V7L21,12L16,17M14,2A2,2 0 0,1 16,4V6H14V4H5V20H14V18H16V20A2,2 0 0,1 14,22H5A2,2 0 0,1 3,20V4A2,2 0 0,1 5,2H14Z" fill="#212121" />
</svg>

Before

Width:  |  Height:  |  Size: 423 B

After

Width:  |  Height:  |  Size: 446 B

View File

@@ -1 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z" /></svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
<path d="M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z" fill="#212121" />
</svg>

Before

Width:  |  Height:  |  Size: 505 B

After

Width:  |  Height:  |  Size: 528 B

View File

@@ -1 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13" /></svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
<path d="M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13" fill="#212121" />
</svg>

Before

Width:  |  Height:  |  Size: 508 B

After

Width:  |  Height:  |  Size: 531 B

View File

@@ -1 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M18.73,18C15.4,21.69 9.71,22 6,18.64C2.33,15.31 2.04,9.62 5.37,5.93C6.9,4.25 9,3.2 11.27,3C7.96,6.7 8.27,12.39 12,15.71C13.63,17.19 15.78,18 18,18C18.25,18 18.5,18 18.73,18Z" /></svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
<path d="M18.73,18C15.4,21.69 9.71,22 6,18.64C2.33,15.31 2.04,9.62 5.37,5.93C6.9,4.25 9,3.2 11.27,3C7.96,6.7 8.27,12.39 12,15.71C13.63,17.19 15.78,18 18,18C18.25,18 18.5,18 18.73,18Z" fill="#212121" />
</svg>

Before

Width:  |  Height:  |  Size: 468 B

After

Width:  |  Height:  |  Size: 491 B

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M3 3h18v2H3z"/></svg>
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M10,21V19H6.41L10.91,14.5L9.5,13.09L5,17.59V14H3V21H10M14.5,10.91L19,6.41V10H21V3H14V5H17.59L13.09,9.5L14.5,10.91Z" /></svg>

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 409 B

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M4.08,11.92L12,4L19.92,11.92L18.5,13.33L13,7.83V22H11V7.83L5.5,13.33L4.08,11.92M12,4H22V2H2V4H12Z" /></svg>

After

Width:  |  Height:  |  Size: 392 B

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M19.5,3.09L15,7.59V4H13V11H20V9H16.41L20.91,4.5L19.5,3.09M4,13V15H7.59L3.09,19.5L4.5,20.91L9,16.41V20H11V13H4Z" /></svg>

After

Width:  |  Height:  |  Size: 405 B

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M19.92,12.08L12,20L4.08,12.08L5.5,10.67L11,16.17V2H13V16.17L18.5,10.66L19.92,12.08M12,20H2V22H22V20H12Z" /></svg>

After

Width:  |  Height:  |  Size: 398 B

View File

@@ -8,7 +8,7 @@ local layout_path = Theme_path .. "assets/layout/"
-- Here are the icons for the layouts defined, if you want to add more layouts go to main/layouts.lua
Theme.layout_floating = gears.color.recolor_image(layout_path .. "floating.svg", color.color["Grey900"])
Theme.layout_tile = gears.color.recolor_image(layout_path .. "tile.svg", color.color["Grey900"])
Theme.layout_dwindle = gears.color.recolor_image(layout_path .. "dwindle.svg", color.color["Grey900"])
Theme.layout_fairh = gears.color.recolor_image(layout_path .. "fairh.svg", color.color["Grey900"])
Theme.layout_fullscreen = gears.color.recolor_image(layout_path .. "fullscreen.svg", color.color["Grey900"])
Theme.layout_max = gears.color.recolor_image(layout_path .. "max.svg", color.color["Grey900"])
--Theme.layout_dwindle = gears.color.recolor_image(layout_path .. "dwindle.svg", color.color["Grey900"])
--Theme.layout_fairh = gears.color.recolor_image(layout_path .. "fairh.svg", color.color["Grey900"])
--Theme.layout_fullscreen = gears.color.recolor_image(layout_path .. "fullscreen.svg", color.color["Grey900"])
--Theme.layout_max = gears.color.recolor_image(layout_path .. "max.svg", color.color["Grey900"])

View File

@@ -9,13 +9,11 @@ local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
local naughty = require("naughty")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/brightness/"
-- TODO: fix backlight keys and osd not working correctly
return function ()
return function (s)
local brightness_osd_widget = wibox.widget{
{
@@ -150,5 +148,63 @@ return function ()
)
update_slider()
return brightness_osd_widget
local brightness_container = awful.popup{
widget = wibox.container.background,
ontop = true,
bg = color.color["Grey900"],
stretch = false,
visible = false,
placement = function (c) awful.placement.bottom_right(c, {margins = dpi(10)}) end,
shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
end
}
local hide_brightness_osd = gears.timer{
timeout = 1,
autostart = true,
callback = function ()
brightness_container.visible = false
end
}
brightness_container:setup{
brightness_osd_widget,
layout = wibox.layout.fixed.horizontal
}
awesome.connect_signal(
"widget::brightness_osd:rerun",
function ()
if hide_brightness_osd.started then
hide_brightness_osd:again()
else
hide_brightness_osd:start()
end
end
)
awesome.connect_signal(
"module::brightness_osd:show",
function ()
brightness_container.visible = true
end
)
brightness_container:connect_signal(
"mouse::enter",
function ()
brightness_container.visible = true
hide_brightness_osd:stop()
end
)
brightness_container:connect_signal(
"mouse::leave",
function ()
brightness_container.visible = true
hide_brightness_osd:again()
end
)
end

View File

@@ -4,12 +4,13 @@
-- Awesome Libs
local awful = require("awful")
local wibox = require("wibox")
local gears = require("gears")
local dpi = require("beautiful").xresources.apply_dpi
local color = require("theme.crylia.colors")
return function ()
return function (s)
local styles = {}
styles.month = {
@@ -118,5 +119,63 @@ return function ()
end
}
return calendar_osd_widget
local calendar_osd_container = awful.popup{
widget = wibox.container.background,
ontop = true,
bg = color.color["Grey900"],
stretch = false,
visible = false,
placement = function (c)awful.placement.top_right(c, {margins = {right = dpi(100),top = dpi(60)}})end,
shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
end
}
local hide_osd = gears.timer{
timeout = 0.25,
autostart = true,
callback = function ()
calendar_osd_container.visible = false
end
}
calendar_osd_container:setup{
calendar_osd_widget,
layout = wibox.layout.align.horizontal
}
calendar_osd_container:connect_signal(
"mouse::enter",
function ()
calendar_osd_container.visible = true
hide_osd:stop()
end
)
calendar_osd_container:connect_signal(
"mouse::leave",
function ()
calendar_osd_container.visible = false
hide_osd:stop()
end
)
awesome.connect_signal(
"widget::calendar_osd:stop",
function ()
calendar_osd_container.visible = true
hide_osd:stop()
end
)
awesome.connect_signal(
"widget::calendar_osd:rerun",
function ()
if hide_osd.started then
hide_osd:again()
else
hide_osd:start()
end
end
)
end

View File

@@ -8,23 +8,25 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
local naughty = require("naughty")
require("Main.Signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/powermenu/"
return function ()
return function (s)
-- Profile picture imagebox
local profile_picture = wibox.widget {
image = icondir .. "defaultpfp.svg",
resize = true,
forced_height = dpi(200),
clip_shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 30)
gears.shape.rounded_rect(cr, dpi(width), dpi(height), 30)
end,
widget = wibox.widget.imagebox
}
-- Username textbox
local profile_name = wibox.widget {
align = 'center',
valign = 'center',
@@ -33,6 +35,9 @@ return function ()
widget = wibox.widget.textbox
}
-- Get the profile script from /var/lib/AccountsService/icons/${USER}
-- and copy it to the assets folder
-- TODO: If the user doesnt have AccountsService look into $HOME/.faces
local update_profile_picture = function ()
awful.spawn.easy_async_with_shell(
[=[
@@ -69,9 +74,11 @@ return function ()
end
)
end
update_profile_picture()
local namestyle = "userhost"
-- Will determin the display style
local namestyle = RC.vars.namestyle
-- Get the full username(if set) and the username + hostname
local update_user_name = function()
awful.spawn.easy_async_with_shell(
[=[
@@ -98,6 +105,7 @@ return function ()
end
update_user_name()
-- Universal Button widget
local button = function(name, icon, bg_color, callback)
local item = wibox.widget{
{
@@ -105,7 +113,10 @@ return function ()
{
{
{
--image = gears.color.recolor_image(icon, color.color["Grey900"]),
-- TODO: using gears.color to recolor a SVG will make it look super low res
-- currently I recolor it in the .svg file directly, but later implement
-- a better way to recolor a SVG
-- image = gears.color.recolor_image(icon, color.color["Grey900"]),
image = icon,
resize = true,
forced_height = dpi(30),
@@ -133,7 +144,8 @@ return function ()
shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 10)
end,
widget = wibox.container.background
widget = wibox.container.background,
id = 'background'
},
spacing = dpi(0),
layout = wibox.layout.align.vertical
@@ -149,6 +161,7 @@ return function ()
return item
end
-- Create the power menu actions
local suspend_command = function()
awful.spawn.easy_async_with_shell("dm-tool lock & systemctl suspend")
awesome.emit_signal("module::powermenu:hide")
@@ -173,12 +186,21 @@ return function ()
awesome.emit_signal("module::powermenu:hide")
end
-- Create the buttons with their command and name etc
local shutdown_button = button("Shutdown", icondir .. "shutdown.svg", color.color["Blue200"], shutdown_command)
local reboot_button = button("Reboot", icondir .. "reboot.svg", color.color["Red200"], reboot_command)
local suspend_button = button("Suspend", icondir .. "suspend.svg", color.color["Yellow200"], suspend_command)
local logout_button = button("Logout", icondir .. "logout.svg", color.color["Green200"], logout_command)
local lock_button = button("Lock", icondir .. "lock.svg", color.color["Orange200"], lock_command)
-- Signals to change color on hover
hover_signal(shutdown_button.background, color.color["Blue200"])
hover_signal(reboot_button.background, color.color["Red200"])
hover_signal(suspend_button.background, color.color["Yellow200"])
hover_signal(logout_button.background, color.color["Green200"])
hover_signal(lock_button.background, color.color["Orange200"])
-- The powermenu widget
local powermenu = wibox.widget {
layout = wibox.layout.align.vertical,
expand = "none",
@@ -239,5 +261,60 @@ return function ()
},
nil
}
return powermenu
-- Container for the widget, covers the entire screen
local powermenu_container = wibox{
widget = powermenu,
screen = s,
type = "splash",
visible = false,
ontop = true,
bg = "#21212188",
height = s.geometry.height,
width = s.geometry.width,
x = s.geometry.x,
y = s.geometry.y
}
-- Close on rightclick
powermenu_container:buttons(
gears.table.join(
awful.button(
{},
3,
function ()
awesome.emit_signal("module::powermenu:hide")
end
)
)
)
-- Close on Escape
local powermenu_keygrabber = awful.keygrabber{
autostart = false,
stop_event = 'release',
keypressed_callback = function (self, mod, key, command)
if key == 'Escape' then
awesome.emit_signal("module::powermenu:hide")
end
end
}
-- Signals
awesome.connect_signal(
"module::powermenu:show",
function()
powermenu_container.visible = false
powermenu_container.visible = true
powermenu_keygrabber:start()
end
)
awesome.connect_signal(
"module::powermenu:hide",
function()
powermenu_keygrabber:stop()
powermenu_container.visible = false
end
)
end

View File

@@ -8,6 +8,10 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
require("Main.Signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/titlebar/"
awful.titlebar.enable_tooltip = true
awful.titlebar.fallback_name = 'Client'
@@ -56,8 +60,27 @@ local create_click_events = function (c)
return buttons
end
local createresize_click_events = function (c)
local buttons = gears.table.join(
awful.button(
{},
1,
function ()
c:activate { context = 'titlebar', action = 'mouse_resize' }
end
)
)
return buttons
end
local create_titlebar = function (c, bg, size)
awful.titlebar(c, { position = "left", bg = bg, size = size }) : setup {
local titlebar = awful.titlebar(c, {
position = "left",
bg = bg,
size = size
})
titlebar : setup {
{
{
{
@@ -66,7 +89,8 @@ local create_titlebar = function (c, bg, size)
bg = color.color["Red200"],
shape = function (cr, height, width)
gears.shape.rounded_rect(cr, width, height, 4)
end
end,
id = "closebutton"
},
{
awful.titlebar.widget.maximizedbutton(c),
@@ -74,7 +98,8 @@ local create_titlebar = function (c, bg, size)
bg = color.color["Yellow200"],
shape = function (cr, height, width)
gears.shape.rounded_rect(cr, width, height, 4)
end
end,
id = "maximizebutton"
},
{
awful.titlebar.widget.minimizebutton(c),
@@ -82,21 +107,34 @@ local create_titlebar = function (c, bg, size)
bg = color.color["Green200"],
shape = function (cr, height, width)
gears.shape.rounded_rect(cr, width, height, 4)
end
end,
id = "minimizebutton"
},
spacing = dpi(10),
layout = wibox.layout.fixed.vertical
layout = wibox.layout.fixed.vertical,
id = "spacing"
},
margins = dpi(8),
widget = wibox.container.margin
widget = wibox.container.margin,
id = "margin"
},
{
buttons = create_click_events(c),
layout = wibox.layout.flex.vertical
},
nil,
layout = wibox.layout.align.vertical
{
{
widget = awful.widget.clienticon(c)
},
margins = dpi(5),
widget = wibox.container.margin
},
layout = wibox.layout.align.vertical,
id = "main"
}
hover_signal(titlebar.main.margin.spacing.closebutton, color.color["Red200"])
hover_signal(titlebar.main.margin.spacing.maximizebutton, color.color["Yellow200"])
hover_signal(titlebar.main.margin.spacing.minimizebutton, color.color["Green200"])
end
local create_titlebar_dialog = function(c, bg, size)
@@ -134,8 +172,55 @@ local create_titlebar_dialog = function(c, bg, size)
}
end
local create_titlebar_borderhack = function (c, bg, position)
local borderhack = awful.titlebar(c, {
position = position,
bg = bg,
size = "2"
})
borderhack : setup {
{
bg = bg,
widget = wibox.container.background
},
{
buttons = createresize_click_events(c),
layout = wibox.layout.flex.vertical
},
nil,
layout = wibox.layout.align.vertical
}
local old_wibox, old_cursor
borderhack:connect_signal(
"mouse::enter",
function ()
local w = mouse.current_client
if w then
old_cursor, old_wibox = w.cursor, w
w.cursor = "hand1"
end
end
)
borderhack:connect_signal(
"mouse::leave",
function ()
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end
)
end
local draw_titlebar = function (c)
if c.type == 'normal' then
if c.type == 'normal' and not c.requests_no_titlebar then
create_titlebar_borderhack(c, "#121212AA", "right")
create_titlebar_borderhack(c, "#121212AA", "top")
create_titlebar_borderhack(c, "#121212AA", "bottom")
if c.class == 'Firefox' then
create_titlebar(c, '#121212AA', 35)
elseif c.name == "Steam" then
@@ -150,16 +235,47 @@ local draw_titlebar = function (c)
elseif c.type == 'dialog' then
create_titlebar_dialog(c, '#121212AA', 35)
elseif c.type == 'modal' then
create_titlebar(c, '#121212AA', 35)
else
create_titlebar_borderhack(c, "#121212AA", "right")
create_titlebar_borderhack(c, "#121212AA", "top")
create_titlebar_borderhack(c, "#121212AA", "bottom")
create_titlebar_borderhack(c, "#121212AA", "left")
end
end
client.connect_signal(
"property::maximized",
function (c)
if c.maximized then
Theme.titlebar_maximized_button_normal = icondir .. "unmaximize.svg"
Theme.titlebar_maximized_button_active = icondir .. "unmaximize.svg"
Theme.titlebar_maximized_button_inactive = icondir .. "unmaximize.svg"
elseif not c.minimized then
Theme.titlebar_maximized_button_normal = icondir .. "maximize.svg"
Theme.titlebar_maximized_button_active = icondir .. "maximize.svg"
Theme.titlebar_maximized_button_inactive = icondir .. "maximize.svg"
end
end
)
client.connect_signal(
"request::titlebars",
function (c)
if c.maximized then
Theme.titlebar_maximized_button_normal = icondir .. "unmaximize.svg"
Theme.titlebar_maximized_button_active = icondir .. "unmaximize.svg"
Theme.titlebar_maximized_button_inactive = icondir .. "unmaximize.svg"
elseif not c.minimized then
Theme.titlebar_maximized_button_normal = icondir .. "maximize.svg"
Theme.titlebar_maximized_button_active = icondir .. "maximize.svg"
Theme.titlebar_maximized_button_inactive = icondir .. "maximize.svg"
end
draw_titlebar(c)
if not c.floating then
if not c.floating or c.maximized then
awful.titlebar.hide(c, 'left')
awful.titlebar.hide(c, 'right')
awful.titlebar.hide(c, 'top')
awful.titlebar.hide(c, 'bottom')
end
end
)
@@ -167,14 +283,23 @@ client.connect_signal(
client.connect_signal(
'property::floating',
function (c)
if c.floating then
if c.floating and not c.maximized then
if c.class == "Steam" then
awful.titlebar.hide(c, 'left')
awful.titlebar.hide(c, 'right')
awful.titlebar.hide(c, 'top')
awful.titlebar.hide(c, 'bottom')
else
awful.titlebar.show(c, 'left')
awful.titlebar.show(c, 'right')
awful.titlebar.show(c, 'top')
awful.titlebar.show(c, 'bottom')
end
else
awful.titlebar.hide(c, 'left')
awful.titlebar.hide(c, 'right')
awful.titlebar.hide(c, 'top')
awful.titlebar.hide(c, 'bottom')
end
end
)

View File

@@ -13,7 +13,7 @@ local wibox = require("wibox")
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/audio/"
-- Returns the volume_osd
return function ()
return function (s)
local volume_osd_widget = wibox.widget{
{
@@ -163,5 +163,63 @@ return function ()
)
update_slider()
return volume_osd_widget
local volume_container = awful.popup{
widget = wibox.container.background,
ontop = true,
bg = color.color["Grey900"],
stretch = false,
visible = false,
placement = function (c) awful.placement.bottom_right(c, {margins = dpi(10)}) end,
shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
end
}
local hide_volume_osd = gears.timer{
timeout = 2,
autostart = true,
callback = function ()
volume_container.visible = false
end
}
volume_container:setup{
volume_osd_widget,
layout = wibox.layout.fixed.horizontal
}
awesome.connect_signal(
"module::volume_osd:show",
function ()
volume_container.visible = true
end
)
volume_container:connect_signal(
"mouse::enter",
function ()
volume_container.visible = true
hide_volume_osd:stop()
end
)
volume_container:connect_signal(
"mouse::leave",
function ()
volume_container.visible = true
hide_volume_osd:again()
end
)
awesome.connect_signal(
"widget::volume_osd:rerun",
function ()
if hide_volume_osd.started then
hide_volume_osd:again()
else
hide_volume_osd:start()
end
end
)
end

View File

@@ -66,3 +66,5 @@ Theme.notification_icon_size = dpi(40)
Theme.titlebar_close_button_normal = icondir .. "close.svg"
Theme.titlebar_maximized_button_normal = icondir .. "maximize.svg"
Theme.titlebar_minimize_button_normal = icondir .. "minimize.svg"
Theme.titlebar_maximized_button_active = icondir .. "maximize.svg"
Theme.titlebar_maximized_button_inactive = icondir .. "maximize.svg"

View File

@@ -8,6 +8,7 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
require("Main.Signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/audio/"
@@ -98,43 +99,15 @@ return function ()
end
-- Signals
local old_wibox, old_cursor, old_bg
audio_widget:connect_signal(
"mouse::enter",
function ()
old_bg = audio_widget.bg
audio_widget.bg = color.color["Yellow200"] .. "dd"
local w = mouse.current_wibox
if w then
old_cursor, old_wibox = w.cursor, w
w.cursor = "hand1"
end
end
)
hover_signal(audio_widget, color.color["Yellow200"])
audio_widget:connect_signal(
"button::press",
function ()
awesome.emit_signal("widget::volume")
awesome.emit_signal("module::volume_osd:show", true)
audio_widget.bg = color.color["Yellow200"] .. "bb"
end
)
audio_widget:connect_signal(
"button::release",
function ()
audio_widget.bg = color.color["Yellow200"] .. "dd"
end
)
audio_widget:connect_signal(
"mouse::leave",
function ()
audio_widget.bg = old_bg
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
awesome.emit_signal("module::slider:update")
awesome.emit_signal("widget::volume_osd:rerun")
end
)

View File

@@ -10,6 +10,7 @@ local gears = require("gears")
local naughty = require("naughty")
local watch = awful.widget.watch
local wibox = require("wibox")
require("Main.Signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/battery/"
@@ -165,45 +166,7 @@ return function ()
)
end
local old_wibox, old_cursor, old_bg
battery_widget:connect_signal(
"mouse::enter",
function ()
old_bg = battery_widget.bg
battery_widget.bg = color.color["Purple200"] .. "dd"
local w = mouse.current_wibox
if w then
old_cursor, old_wibox = w.cursor, w
w.cursor = "hand1"
end
end
)
-- Signals
battery_widget:connect_signal(
"button::press",
function ()
battery_widget.bg = color.color["Purple200"] .. "bb"
end
)
battery_widget:connect_signal(
"button::release",
function ()
battery_widget.bg = color.color["Purple200"] .. "dd"
end
)
battery_widget:connect_signal(
"mouse::leave",
function ()
battery_widget.bg = old_bg
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end
)
hover_signal(battery_widget, color.color["Purple200"])
battery_widget:connect_signal(
'button::press',

View File

@@ -8,6 +8,7 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
require("Main.Signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/bluetooth/"
@@ -90,44 +91,7 @@ return function ()
}
-- Signals
local old_wibox, old_cursor, old_bg
bluetooth_widget:connect_signal(
"mouse::enter",
function ()
old_bg = bluetooth_widget.bg
bluetooth_widget.bg = color.color["Blue200"] .. "dd"
local w = mouse.current_wibox
if w then
old_cursor, old_wibox = w.cursor, w
w.cursor = "hand1"
end
end
)
bluetooth_widget:connect_signal(
"button::press",
function ()
bluetooth_widget.bg = color.color["Blue200"] .. "bb"
end
)
bluetooth_widget:connect_signal(
"button::release",
function ()
bluetooth_widget.bg = color.color["Blue200"] .. "dd"
end
)
bluetooth_widget:connect_signal(
"mouse::leave",
function ()
bluetooth_widget.bg = old_bg
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end
)
hover_signal(bluetooth_widget, color.color["Blue200"])
bluetooth_widget:connect_signal(
"button::press",

View File

@@ -8,6 +8,7 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
require("Main.Signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/clock/"
@@ -71,45 +72,7 @@ return function ()
end
}
-- Signals
local old_wibox, old_cursor, old_bg
clock_widget:connect_signal(
"mouse::enter",
function ()
old_bg = clock_widget.bg
clock_widget.bg = color.color["Orange200"] .. "dd"
local w = mouse.current_wibox
if w then
old_cursor, old_wibox = w.cursor, w
w.cursor = "hand1"
end
end
)
clock_widget:connect_signal(
"button::press",
function ()
clock_widget.bg = color.color["Orange200"] .. "bb"
end
)
clock_widget:connect_signal(
"button::release",
function ()
clock_widget.bg = color.color["Orange200"] .. "dd"
end
)
clock_widget:connect_signal(
"mouse::leave",
function ()
clock_widget.bg = old_bg
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end
)
hover_signal(clock_widget, color.color["Orange200"])
return clock_widget
end

View File

@@ -8,6 +8,7 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
require("Main.Signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/date/"
@@ -71,32 +72,12 @@ return function ()
}
-- Signals
local old_wibox, old_cursor, old_bg
hover_signal(date_widget, color.color["Teal200"])
date_widget:connect_signal(
"mouse::enter",
function ()
awesome.emit_signal("widget::calendar_osd:stop", true)
old_bg = date_widget.bg
date_widget.bg = color.color["Teal200"] .. "dd"
local w = mouse.current_wibox
if w then
old_cursor, old_wibox = w.cursor, w
w.cursor = "hand1"
end
end
)
date_widget:connect_signal(
"button::press",
function ()
date_widget.bg = color.color["Teal200"] .. "bb"
end
)
date_widget:connect_signal(
"button::release",
function ()
date_widget.bg = color.color["Teal200"] .. "dd"
end
)
@@ -104,11 +85,6 @@ return function ()
"mouse::leave",
function ()
awesome.emit_signal("widget::calendar_osd:rerun", true)
date_widget.bg = old_bg
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end
)

View File

@@ -8,6 +8,7 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
require("Main.Signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/kblayout/"
@@ -76,43 +77,12 @@ return function ()
end
-- Signals
local old_wibox, old_cursor, old_bg
kblayout_widget:connect_signal(
"mouse::enter",
function ()
old_bg = kblayout_widget.bg
kblayout_widget.bg = color.color["Green200"] .. "dd"
local w = mouse.current_wibox
if w then
old_cursor, old_wibox = w.cursor, w
w.cursor = "hand1"
end
end
)
hover_signal(kblayout_widget, color.color["Green200"])
kblayout_widget:connect_signal(
"button::press",
function ()
set_kblayout()
kblayout_widget.bg = color.color["Green200"] .. "bb"
end
)
kblayout_widget:connect_signal(
"button::release",
function ()
kblayout_widget.bg = color.color["Green200"] .. "dd"
end
)
kblayout_widget:connect_signal(
"mouse::leave",
function ()
kblayout_widget.bg = old_bg
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end
)

View File

@@ -8,10 +8,10 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
require("Main.Signals")
-- Returns the layoutbox widget
return function ()
local layout = wibox.widget{
{
awful.widget.layoutbox(),
@@ -27,42 +27,12 @@ return function ()
}
-- Signals
local old_wibox, old_cursor, old_bg
layout:connect_signal(
"mouse::enter",
function ()
old_bg = layout.bg
layout.bg = color.color["LightBlue200"] .. "dd"
local w = mouse.current_wibox
if w then
old_cursor, old_wibox = w.cursor, w
w.cursor = "hand1"
end
end
)
hover_signal(layout, color.color["LightBlue200"])
layout:connect_signal(
"button::press",
function ()
layout.bg = color.color["LightBlue200"] .. "bb"
end
)
layout:connect_signal(
"button::release",
function ()
layout.bg = color.color["LightBlue200"] .. "dd"
end
)
layout:connect_signal(
"mouse::leave",
function ()
layout.bg = old_bg
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
awful.layout.inc(-1)
end
)

View File

@@ -9,6 +9,7 @@ local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local naughty = require("naughty")
local wibox = require("wibox")
require("Main.Signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/network/"
@@ -126,7 +127,7 @@ return function ()
network_notify(message, title, app_name, icon)
end
local update_wireless_data = function (strength, healthy)
local update_wireless_data = function (healthy)
awful.spawn.easy_async_with_shell(
[[ iw dev ]] .. interfaces.wlan_interface .. [[ link ]],
function (stdout)
@@ -158,10 +159,10 @@ return function ()
awesome.emit_signal("system::network_connected")
end
icon = icon .. '-' .. tostring(strength)
update_wireless_data(wifi_strength_rounded, true)
update_wireless_data(true)
else
icon = icon .. "-" .. tostring(strength)
update_wireless_data(wifi_strength_rounded, false)
update_wireless_data(false)
end
network_widget.container.network_layout.spacing = dpi(8)
network_widget.container.network_layout.icon_margin.icon_layout.icon:set_image(gears.color.recolor_image(icondir .. icon .. ".svg", color.color["Grey900"]))
@@ -323,44 +324,7 @@ return function ()
}
-- Signals
local old_wibox, old_cursor, old_bg
network_widget:connect_signal(
"mouse::enter",
function ()
old_bg = network_widget.bg
network_widget.bg = color.color["Red200"] .. "dd"
local w = mouse.current_wibox
if w then
old_cursor, old_wibox = w.cursor, w
w.cursor = "hand1"
end
end
)
network_widget:connect_signal(
"button::press",
function ()
network_widget.bg = color.color["Red200"] .. "bb"
end
)
network_widget:connect_signal(
"button::release",
function ()
network_widget.bg = color.color["Red200"] .. "dd"
end
)
network_widget:connect_signal(
"mouse::leave",
function ()
network_widget.bg = old_bg
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end
)
hover_signal(network_widget, color.color["Red200"])
network_widget:connect_signal(
"button::press",

View File

@@ -9,6 +9,7 @@ local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local naughty = require("naughty")
local wibox = require("wibox")
require("Main.Signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/power/"
@@ -50,44 +51,12 @@ return function ()
}
-- Signals
local old_wibox, old_cursor, old_bg
power_widget:connect_signal(
"mouse::enter",
function ()
old_bg = power_widget.bg
power_widget.bg = color.color["Red200"] .. "dd"
local w = mouse.current_wibox
if w then
old_cursor, old_wibox = w.cursor, w
w.cursor = "hand1"
end
end
)
power_widget:connect_signal(
"button::press",
function ()
power_widget.bg = color.color["Red200"] .. "bb"
end
)
hover_signal(power_widget, color.color["Red200"])
power_widget:connect_signal(
"button::release",
function ()
power_widget.bg = color.color["Red200"] .. "dd"
awesome.emit_signal("module::powermenu:show")
--awful.spawn("rofi -show power-menu -modi 'power-menu:~/.config/rofi/rofi-power-menu --choices=shutdown/reboot/logout/lockscreen' -theme ~/.config/rofi/powermenu/powermenu.rasi")
end
)
power_widget:connect_signal(
"mouse::leave",
function ()
power_widget.bg = old_bg
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end
)

View File

@@ -3,7 +3,8 @@ local awful = require("awful")
local gears = require("gears")
local dpi = require("beautiful").xresources.apply_dpi
local color = require("theme.crylia.colors")
local naughty = require("naughty")
local naughty =require("naughty")
require("theme.crylia.Tools.IconHandler")
local list_update = function (widget, buttons, label, data, objects)
widget:reset()
@@ -102,7 +103,6 @@ local list_update = function (widget, buttons, label, data, objects)
end
for _, client in ipairs(object:clients()) do
if client.icon then
tag_label_margin:set_right(0)
local icon = wibox.widget{
{
@@ -119,15 +119,11 @@ local list_update = function (widget, buttons, label, data, objects)
margins = dpi(6),
widget = wibox.container.margin
}
icon.icon_container.icon:set_image(client:get_icon(1))
icon.icon_container.icon:set_image(GetIcon("Papirus", client))
tag_widget.widget_margin.container:setup({
icon,
layout = wibox.layout.align.horizontal
})
else
tag_icon_margin:set_margins(0)
tag_icon:set_forced_width(0)
end
end
local old_wibox, old_cursor, old_bg
@@ -135,7 +131,6 @@ local list_update = function (widget, buttons, label, data, objects)
"mouse::enter",
function ()
old_bg = tag_widget.bg
--naughty.notify({title = tostring(old_bg)})
if object == awful.screen.focused().selected_tag then
tag_widget.bg = '#dddddd' .. 'dd'
else

View File

@@ -3,7 +3,6 @@ local wibox = require('wibox')
local dpi = require('beautiful').xresources.apply_dpi
local gears = require('gears')
local color = require('theme.crylia.colors')
local naughty = require("naughty")
local list_update = function (widget, buttons, label, data, objects)
widget:reset()
@@ -111,11 +110,7 @@ local list_update = function (widget, buttons, label, data, objects)
task_title:set_text('')
end
if icon then
task_icon.icon:set_image(object:get_icon(1))
else
task_icon_margin:set_margins(0)
end
task_icon.icon:set_image(GetIcon("Papirus", object))
widget:add(task_widget)
widget:set_spacing(dpi(6))
@@ -192,14 +187,10 @@ return function(s)
if c == client.focus then
c.minimized = true
else
-- Without this, the following
-- :isvisible() makes no sense
c.minimized = false
if not c:isvisible() and c.first_tag then
c.first_tag:view_only()
end
-- This will also un-minimize
-- the client, if needed
c:emit_signal('request::activate')
c:raise()
end