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 -- Default Awesome Libs
local awful = require("awful") local awful = require("awful")
local beautiful = require("beautiful") local beautiful = require("beautiful")
@@ -14,84 +18,71 @@ local menubar = require("menubar")
-- Global Namespace -- Global Namespace
RC = {} RC = {}
RC.vars = require("main.user_variables") RC.vars = require("Main.UserVariables")
-- Error Handling -- Error Handling
require("main.error_handling") require("Main.ErrorHandling")
-- Default Theme and Custom Wallpaper -- Default Theme and Custom Wallpaper
beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua") beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua")
beautiful.wallpaper = RC.vars.wallpaper beautiful.wallpaper = RC.vars.wallpaper
modkey = RC.vars.modkey modkey = RC.vars.modkey
require("main.theme") require("Main.Theme")
-- Load Local User Libs -- Load Local User Libs
local main = { local Main = {
layouts = require("main.layouts"), Layouts = require("Main.Layouts"),
tags = require("main.tags"), Tags = require("Main.Tags"),
menu = require("main.menu"), Menu = require("Main.Menu"),
rules = require("main.rules") Rules = require("Main.Rules")
} }
-- Load all Shortcuts from Local User Libs -- Load all Shortcuts from Local User Libs
local bindings = { local Bindings = {
globalbuttons = require("bindings.globalbuttons"), GlobalButtons = require("Bindings.GlobalButtons"),
clientbuttons = require("bindings.clientbuttons"), ClientButtons = require("Bindings.ClientButtons"),
globalkeys = require("bindings.globalkeys"), GlobalKeys = require("Bindings.GlobalKeys"),
bindtotags = require("bindings.bindtotags"), BindToTags = require("Bindings.BindToTags"),
clientkeys = require("bindings.clientkeys") ClientKeys = require("Bindings.ClientKeys")
} }
-- Sets the local layout to Aweful.layout.inc RC.Layouts = Main.Layouts()
RC.layouts = main.layouts()
awful.layout.layouts = main.layouts()
-- Tag table which holds all screen tags awful.layout.layouts = Main.Layouts()
RC.tags = main.tags()
-- Creates a launcher widget and a main menu RC.Tags = Main.Tags()
RC.mainmenu = awful.menu({
items = main.menu() RC.MainMenu = awful.menu({
items = Main.Menu()
}) })
-- A Variable needed in Statusbar (helper) -- A Variable needed in Statusbar (helper)
RC.launcher = awful.widget.launcher({ RC.Launcher = awful.widget.launcher({
image = beautiful.awesome_icon, Image = beautiful.awesome_icon,
menu = RC.mainmenu Menu = RC.MainMenu
}) })
-- Menubar configuration -- Menubar configuration
menubar.utils.terminal = RC.vars.terminal menubar.utils.terminal = RC.vars.terminal
-- Sets the user Keybindings
RC.globalkeys = bindings.globalkeys()
RC.globalkeys = bindings.bindtotags(RC.globalkeys)
-- Set root -- Set root
root.buttons(bindings.globalbuttons()) root.buttons(Bindings.GlobalButtons())
root.keys(RC.globalkeys) root.keys(Bindings.BindToTags(Bindings.GlobalKeys()))
-- Keymap -- Default statusbar, comment if you want use a third party tool like polybar
mykeyboardlayout = awful.widget.keyboardlayout() require("CryliaBar.init")
-- Default statusbar, uncomment if you dont use a third party tool like polybar
require("deco.statusbar")
-- Rules to apply to new clients -- Rules to apply to new clients
awful.rules.rules = main.rules( awful.rules.rules = Main.Rules(
bindings.clientkeys(), Bindings.ClientKeys(),
bindings.clientbuttons() Bindings.ClientButtons()
) )
-- Signals -- Signals
require("main.signals") require("Main.Signals")
-- Titlebar
require("theme.crylia.modules.titlebar")
-- Autostart programs -- Autostart programs
--awful.spawn.with_shell("~/.screenlayout/single_screen.sh") --awful.spawn.with_shell("~/.screenlayout/single_screen.sh")
awful.spawn.with_shell("picom --experimental-backends") awful.spawn.with_shell("picom --experimental-backends")
awful.spawn.with_shell("xfce4-power-manager") 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 -- 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_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_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_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_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_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_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 gears = require("gears")
local wibox = require("wibox") local wibox = require("wibox")
local naughty = require("naughty")
-- Icon directory path -- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/brightness/" local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/brightness/"
-- TODO: fix backlight keys and osd not working correctly -- TODO: fix backlight keys and osd not working correctly
return function () return function (s)
local brightness_osd_widget = wibox.widget{ local brightness_osd_widget = wibox.widget{
{ {
@@ -150,5 +148,63 @@ return function ()
) )
update_slider() 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 end

View File

@@ -4,12 +4,13 @@
-- Awesome Libs -- Awesome Libs
local awful = require("awful")
local wibox = require("wibox") local wibox = require("wibox")
local gears = require("gears") local gears = require("gears")
local dpi = require("beautiful").xresources.apply_dpi local dpi = require("beautiful").xresources.apply_dpi
local color = require("theme.crylia.colors") local color = require("theme.crylia.colors")
return function () return function (s)
local styles = {} local styles = {}
styles.month = { styles.month = {
@@ -118,5 +119,63 @@ return function ()
end 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 end

View File

@@ -8,23 +8,25 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears") local gears = require("gears")
local wibox = require("wibox") local wibox = require("wibox")
local naughty = require("naughty") require("Main.Signals")
-- Icon directory path -- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/powermenu/" local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/powermenu/"
return function () return function (s)
-- Profile picture imagebox
local profile_picture = wibox.widget { local profile_picture = wibox.widget {
image = icondir .. "defaultpfp.svg", image = icondir .. "defaultpfp.svg",
resize = true, resize = true,
forced_height = dpi(200), forced_height = dpi(200),
clip_shape = function (cr, width, height) 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, end,
widget = wibox.widget.imagebox widget = wibox.widget.imagebox
} }
-- Username textbox
local profile_name = wibox.widget { local profile_name = wibox.widget {
align = 'center', align = 'center',
valign = 'center', valign = 'center',
@@ -33,6 +35,9 @@ return function ()
widget = wibox.widget.textbox 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 () local update_profile_picture = function ()
awful.spawn.easy_async_with_shell( awful.spawn.easy_async_with_shell(
[=[ [=[
@@ -69,9 +74,11 @@ return function ()
end end
) )
end end
update_profile_picture() 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() local update_user_name = function()
awful.spawn.easy_async_with_shell( awful.spawn.easy_async_with_shell(
[=[ [=[
@@ -98,6 +105,7 @@ return function ()
end end
update_user_name() update_user_name()
-- Universal Button widget
local button = function(name, icon, bg_color, callback) local button = function(name, icon, bg_color, callback)
local item = wibox.widget{ 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, image = icon,
resize = true, resize = true,
forced_height = dpi(30), forced_height = dpi(30),
@@ -133,7 +144,8 @@ return function ()
shape = function (cr, width, height) shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 10) gears.shape.rounded_rect(cr, width, height, 10)
end, end,
widget = wibox.container.background widget = wibox.container.background,
id = 'background'
}, },
spacing = dpi(0), spacing = dpi(0),
layout = wibox.layout.align.vertical layout = wibox.layout.align.vertical
@@ -149,6 +161,7 @@ return function ()
return item return item
end end
-- Create the power menu actions
local suspend_command = function() local suspend_command = function()
awful.spawn.easy_async_with_shell("dm-tool lock & systemctl suspend") awful.spawn.easy_async_with_shell("dm-tool lock & systemctl suspend")
awesome.emit_signal("module::powermenu:hide") awesome.emit_signal("module::powermenu:hide")
@@ -173,12 +186,21 @@ return function ()
awesome.emit_signal("module::powermenu:hide") awesome.emit_signal("module::powermenu:hide")
end end
-- Create the buttons with their command and name etc
local shutdown_button = button("Shutdown", icondir .. "shutdown.svg", color.color["Blue200"], shutdown_command) 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 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 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 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) 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 { local powermenu = wibox.widget {
layout = wibox.layout.align.vertical, layout = wibox.layout.align.vertical,
expand = "none", expand = "none",
@@ -239,5 +261,60 @@ return function ()
}, },
nil 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 end

View File

@@ -8,6 +8,10 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears") local gears = require("gears")
local wibox = require("wibox") 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.enable_tooltip = true
awful.titlebar.fallback_name = 'Client' awful.titlebar.fallback_name = 'Client'
@@ -56,8 +60,27 @@ local create_click_events = function (c)
return buttons return buttons
end 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) 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"], bg = color.color["Red200"],
shape = function (cr, height, width) shape = function (cr, height, width)
gears.shape.rounded_rect(cr, width, height, 4) gears.shape.rounded_rect(cr, width, height, 4)
end end,
id = "closebutton"
}, },
{ {
awful.titlebar.widget.maximizedbutton(c), awful.titlebar.widget.maximizedbutton(c),
@@ -74,7 +98,8 @@ local create_titlebar = function (c, bg, size)
bg = color.color["Yellow200"], bg = color.color["Yellow200"],
shape = function (cr, height, width) shape = function (cr, height, width)
gears.shape.rounded_rect(cr, width, height, 4) gears.shape.rounded_rect(cr, width, height, 4)
end end,
id = "maximizebutton"
}, },
{ {
awful.titlebar.widget.minimizebutton(c), awful.titlebar.widget.minimizebutton(c),
@@ -82,21 +107,34 @@ local create_titlebar = function (c, bg, size)
bg = color.color["Green200"], bg = color.color["Green200"],
shape = function (cr, height, width) shape = function (cr, height, width)
gears.shape.rounded_rect(cr, width, height, 4) gears.shape.rounded_rect(cr, width, height, 4)
end end,
id = "minimizebutton"
}, },
spacing = dpi(10), spacing = dpi(10),
layout = wibox.layout.fixed.vertical layout = wibox.layout.fixed.vertical,
id = "spacing"
}, },
margins = dpi(8), margins = dpi(8),
widget = wibox.container.margin widget = wibox.container.margin,
id = "margin"
}, },
{ {
buttons = create_click_events(c), buttons = create_click_events(c),
layout = wibox.layout.flex.vertical 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 end
local create_titlebar_dialog = function(c, bg, size) local create_titlebar_dialog = function(c, bg, size)
@@ -134,8 +172,55 @@ local create_titlebar_dialog = function(c, bg, size)
} }
end 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) 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 if c.class == 'Firefox' then
create_titlebar(c, '#121212AA', 35) create_titlebar(c, '#121212AA', 35)
elseif c.name == "Steam" then elseif c.name == "Steam" then
@@ -150,16 +235,47 @@ local draw_titlebar = function (c)
elseif c.type == 'dialog' then elseif c.type == 'dialog' then
create_titlebar_dialog(c, '#121212AA', 35) create_titlebar_dialog(c, '#121212AA', 35)
elseif c.type == 'modal' then 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
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( client.connect_signal(
"request::titlebars", "request::titlebars",
function (c) 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) 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, 'left')
awful.titlebar.hide(c, 'right')
awful.titlebar.hide(c, 'top')
awful.titlebar.hide(c, 'bottom')
end end
end end
) )
@@ -167,14 +283,23 @@ client.connect_signal(
client.connect_signal( client.connect_signal(
'property::floating', 'property::floating',
function (c) function (c)
if c.floating then if c.floating and not c.maximized then
if c.class == "Steam" then if c.class == "Steam" then
awful.titlebar.hide(c, 'left') awful.titlebar.hide(c, 'left')
awful.titlebar.hide(c, 'right')
awful.titlebar.hide(c, 'top')
awful.titlebar.hide(c, 'bottom')
else else
awful.titlebar.show(c, 'left') awful.titlebar.show(c, 'left')
awful.titlebar.show(c, 'right')
awful.titlebar.show(c, 'top')
awful.titlebar.show(c, 'bottom')
end end
else else
awful.titlebar.hide(c, 'left') awful.titlebar.hide(c, 'left')
awful.titlebar.hide(c, 'right')
awful.titlebar.hide(c, 'top')
awful.titlebar.hide(c, 'bottom')
end end
end end
) )

View File

@@ -13,7 +13,7 @@ local wibox = require("wibox")
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/audio/" local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/audio/"
-- Returns the volume_osd -- Returns the volume_osd
return function () return function (s)
local volume_osd_widget = wibox.widget{ local volume_osd_widget = wibox.widget{
{ {
@@ -163,5 +163,63 @@ return function ()
) )
update_slider() 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 end

View File

@@ -66,3 +66,5 @@ Theme.notification_icon_size = dpi(40)
Theme.titlebar_close_button_normal = icondir .. "close.svg" Theme.titlebar_close_button_normal = icondir .. "close.svg"
Theme.titlebar_maximized_button_normal = icondir .. "maximize.svg" Theme.titlebar_maximized_button_normal = icondir .. "maximize.svg"
Theme.titlebar_minimize_button_normal = icondir .. "minimize.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 dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears") local gears = require("gears")
local wibox = require("wibox") local wibox = require("wibox")
require("Main.Signals")
-- Icon directory path -- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/audio/" local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/audio/"
@@ -98,43 +99,15 @@ return function ()
end end
-- Signals -- Signals
local old_wibox, old_cursor, old_bg hover_signal(audio_widget, color.color["Yellow200"])
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
)
audio_widget:connect_signal( audio_widget:connect_signal(
"button::press", "button::press",
function () function ()
awesome.emit_signal("widget::volume")
awesome.emit_signal("module::volume_osd:show", true) awesome.emit_signal("module::volume_osd:show", true)
audio_widget.bg = color.color["Yellow200"] .. "bb" awesome.emit_signal("module::slider:update")
end awesome.emit_signal("widget::volume_osd:rerun")
)
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
end end
) )

View File

@@ -10,6 +10,7 @@ local gears = require("gears")
local naughty = require("naughty") local naughty = require("naughty")
local watch = awful.widget.watch local watch = awful.widget.watch
local wibox = require("wibox") local wibox = require("wibox")
require("Main.Signals")
-- Icon directory path -- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/battery/" local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/battery/"
@@ -165,45 +166,7 @@ return function ()
) )
end end
local old_wibox, old_cursor, old_bg hover_signal(battery_widget, color.color["Purple200"])
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
)
battery_widget:connect_signal( battery_widget:connect_signal(
'button::press', 'button::press',

View File

@@ -8,6 +8,7 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears") local gears = require("gears")
local wibox = require("wibox") local wibox = require("wibox")
require("Main.Signals")
-- Icon directory path -- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/bluetooth/" local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/bluetooth/"
@@ -90,44 +91,7 @@ return function ()
} }
-- Signals -- Signals
local old_wibox, old_cursor, old_bg hover_signal(bluetooth_widget, color.color["Blue200"])
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
)
bluetooth_widget:connect_signal( bluetooth_widget:connect_signal(
"button::press", "button::press",

View File

@@ -8,6 +8,7 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears") local gears = require("gears")
local wibox = require("wibox") local wibox = require("wibox")
require("Main.Signals")
-- Icon directory path -- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/clock/" local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/clock/"
@@ -71,45 +72,7 @@ return function ()
end end
} }
-- Signals hover_signal(clock_widget, color.color["Orange200"])
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
)
return clock_widget return clock_widget
end end

View File

@@ -8,6 +8,7 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears") local gears = require("gears")
local wibox = require("wibox") local wibox = require("wibox")
require("Main.Signals")
-- Icon directory path -- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/date/" local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/date/"
@@ -71,32 +72,12 @@ return function ()
} }
-- Signals -- Signals
local old_wibox, old_cursor, old_bg hover_signal(date_widget, color.color["Teal200"])
date_widget:connect_signal( date_widget:connect_signal(
"mouse::enter", "mouse::enter",
function () function ()
awesome.emit_signal("widget::calendar_osd:stop", true) 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 end
) )
@@ -104,11 +85,6 @@ return function ()
"mouse::leave", "mouse::leave",
function () function ()
awesome.emit_signal("widget::calendar_osd:rerun", true) 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 end
) )

View File

@@ -8,6 +8,7 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears") local gears = require("gears")
local wibox = require("wibox") local wibox = require("wibox")
require("Main.Signals")
-- Icon directory path -- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/kblayout/" local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/kblayout/"
@@ -76,43 +77,12 @@ return function ()
end end
-- Signals -- Signals
local old_wibox, old_cursor, old_bg hover_signal(kblayout_widget, color.color["Green200"])
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
)
kblayout_widget:connect_signal( kblayout_widget:connect_signal(
"button::press", "button::press",
function () function ()
set_kblayout() 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 end
) )

View File

@@ -8,10 +8,10 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears") local gears = require("gears")
local wibox = require("wibox") local wibox = require("wibox")
require("Main.Signals")
-- Returns the layoutbox widget -- Returns the layoutbox widget
return function () return function ()
local layout = wibox.widget{ local layout = wibox.widget{
{ {
awful.widget.layoutbox(), awful.widget.layoutbox(),
@@ -27,42 +27,12 @@ return function ()
} }
-- Signals -- Signals
local old_wibox, old_cursor, old_bg hover_signal(layout, color.color["LightBlue200"])
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
)
layout:connect_signal( layout:connect_signal(
"button::press", "button::press",
function () function ()
layout.bg = color.color["LightBlue200"] .. "bb" awful.layout.inc(-1)
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
end end
) )

View File

@@ -9,6 +9,7 @@ local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears") local gears = require("gears")
local naughty = require("naughty") local naughty = require("naughty")
local wibox = require("wibox") local wibox = require("wibox")
require("Main.Signals")
-- Icon directory path -- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/network/" local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/network/"
@@ -126,7 +127,7 @@ return function ()
network_notify(message, title, app_name, icon) network_notify(message, title, app_name, icon)
end end
local update_wireless_data = function (strength, healthy) local update_wireless_data = function (healthy)
awful.spawn.easy_async_with_shell( awful.spawn.easy_async_with_shell(
[[ iw dev ]] .. interfaces.wlan_interface .. [[ link ]], [[ iw dev ]] .. interfaces.wlan_interface .. [[ link ]],
function (stdout) function (stdout)
@@ -158,10 +159,10 @@ return function ()
awesome.emit_signal("system::network_connected") awesome.emit_signal("system::network_connected")
end end
icon = icon .. '-' .. tostring(strength) icon = icon .. '-' .. tostring(strength)
update_wireless_data(wifi_strength_rounded, true) update_wireless_data(true)
else else
icon = icon .. "-" .. tostring(strength) icon = icon .. "-" .. tostring(strength)
update_wireless_data(wifi_strength_rounded, false) update_wireless_data(false)
end end
network_widget.container.network_layout.spacing = dpi(8) 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"])) 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 -- Signals
local old_wibox, old_cursor, old_bg hover_signal(network_widget, color.color["Red200"])
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
)
network_widget:connect_signal( network_widget:connect_signal(
"button::press", "button::press",

View File

@@ -9,6 +9,7 @@ local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears") local gears = require("gears")
local naughty = require("naughty") local naughty = require("naughty")
local wibox = require("wibox") local wibox = require("wibox")
require("Main.Signals")
-- Icon directory path -- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/power/" local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/power/"
@@ -50,44 +51,12 @@ return function ()
} }
-- Signals -- Signals
local old_wibox, old_cursor, old_bg hover_signal(power_widget, color.color["Red200"])
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
)
power_widget:connect_signal( power_widget:connect_signal(
"button::release", "button::release",
function () function ()
power_widget.bg = color.color["Red200"] .. "dd"
awesome.emit_signal("module::powermenu:show") 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 end
) )

View File

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

View File

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