diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2b27993
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+awesome/.idea
+awesome/.vscode
+awesome/start-xephyr.sh
diff --git a/awesome/Main/ErrorHandling.lua b/awesome/Main/ErrorHandling.lua
deleted file mode 100644
index 3036f68..0000000
--- a/awesome/Main/ErrorHandling.lua
+++ /dev/null
@@ -1,33 +0,0 @@
-----------------------------------------------------------------
--- 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
\ No newline at end of file
diff --git a/awesome/Main/Layouts.lua b/awesome/Main/Layouts.lua
deleted file mode 100644
index 89be572..0000000
--- a/awesome/Main/Layouts.lua
+++ /dev/null
@@ -1,14 +0,0 @@
-------------------------------------------------------------------------------------------
--- 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
\ No newline at end of file
diff --git a/awesome/Main/Menu.lua b/awesome/Main/Menu.lua
deleted file mode 100644
index 3642a3b..0000000
--- a/awesome/Main/Menu.lua
+++ /dev/null
@@ -1,38 +0,0 @@
---------------------------------------------------------------
--- 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
\ No newline at end of file
diff --git a/awesome/Main/Rules.lua b/awesome/Main/Rules.lua
deleted file mode 100644
index 056b236..0000000
--- a/awesome/Main/Rules.lua
+++ /dev/null
@@ -1,53 +0,0 @@
--------------------------------------------------------------------------------------------------
--- 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
\ No newline at end of file
diff --git a/awesome/Main/Signals.lua b/awesome/Main/Signals.lua
deleted file mode 100644
index 0e1735a..0000000
--- a/awesome/Main/Signals.lua
+++ /dev/null
@@ -1,101 +0,0 @@
--- 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
\ No newline at end of file
diff --git a/awesome/Main/Tags.lua b/awesome/Main/Tags.lua
deleted file mode 100644
index 3a1d01d..0000000
--- a/awesome/Main/Tags.lua
+++ /dev/null
@@ -1,23 +0,0 @@
------------------------------------------------------------------------------------------------------
--- 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
\ No newline at end of file
diff --git a/awesome/Main/Theme.lua b/awesome/Main/Theme.lua
deleted file mode 100644
index a7a83dd..0000000
--- a/awesome/Main/Theme.lua
+++ /dev/null
@@ -1,19 +0,0 @@
-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
\ No newline at end of file
diff --git a/awesome/Main/UserVariables.lua b/awesome/Main/UserVariables.lua
deleted file mode 100644
index e1ec608..0000000
--- a/awesome/Main/UserVariables.lua
+++ /dev/null
@@ -1,18 +0,0 @@
--------------------------------------------
--- 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
\ No newline at end of file
diff --git a/awesome/Main/Wallpaper.lua b/awesome/Main/Wallpaper.lua
deleted file mode 100644
index 8c48c24..0000000
--- a/awesome/Main/Wallpaper.lua
+++ /dev/null
@@ -1,18 +0,0 @@
----------------------------------------
--- 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)
\ No newline at end of file
diff --git a/awesome/Bindings/BindToTags.lua b/awesome/bindings/bind_to_tags.lua
similarity index 98%
rename from awesome/Bindings/BindToTags.lua
rename to awesome/bindings/bind_to_tags.lua
index cea0778..e7165ad 100644
--- a/awesome/Bindings/BindToTags.lua
+++ b/awesome/bindings/bind_to_tags.lua
@@ -2,7 +2,7 @@
local awful = require("awful")
local gears = require("gears")
-local modkey = RC.vars.modkey
+local modkey = user_vars.vars.modkey
return function (globalkeys)
for i = 1, 9 do
diff --git a/awesome/bindings/bindtotags.lua b/awesome/bindings/bindtotags.lua
deleted file mode 100644
index 1c70318..0000000
--- a/awesome/bindings/bindtotags.lua
+++ /dev/null
@@ -1,72 +0,0 @@
--- Awesome Libs
-local awful = require("awful")
-local gears = require("gears")
-
-local _M = {}
-local modkey = RC.vars.modkey
-
-function _M.get(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
-
-return _M.get
\ No newline at end of file
diff --git a/awesome/Bindings/ClientButtons.lua b/awesome/bindings/client_buttons.lua
similarity index 94%
rename from awesome/Bindings/ClientButtons.lua
rename to awesome/bindings/client_buttons.lua
index 90758b9..4b5e0bb 100644
--- a/awesome/Bindings/ClientButtons.lua
+++ b/awesome/bindings/client_buttons.lua
@@ -2,7 +2,7 @@
local awful = require("awful")
local gears = require("gears")
-local modkey = RC.vars.modkey
+local modkey = user_vars.vars.modkey
return function ()
local clientbuttons = gears.table.join(
diff --git a/awesome/Bindings/ClientKeys.lua b/awesome/bindings/client_keys.lua
similarity index 67%
rename from awesome/Bindings/ClientKeys.lua
rename to awesome/bindings/client_keys.lua
index de0572d..13110af 100644
--- a/awesome/Bindings/ClientKeys.lua
+++ b/awesome/bindings/client_keys.lua
@@ -2,7 +2,7 @@
local awful = require("awful")
local gears = require("gears")
-local modkey = RC.vars.modkey
+local modkey = user_vars.vars.modkey
return function ()
local clientkeys = gears.table.join(
@@ -21,11 +21,11 @@ return function ()
function(c)
c:kill()
end,
- { description = "Close window", group = "Client" }
+ { description = "Close focused client", group = "Client" }
),
awful.key(
{ modkey },
- "space",
+ "g",
awful.client.floating.toggle,
{ description = "Toggle floating window", group = "Client" }
),
@@ -36,16 +36,7 @@ return function ()
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"}
+ {description = "(un)maximize", group = "Client"}
)
)
return clientkeys
diff --git a/awesome/bindings/clientbuttons.lua b/awesome/bindings/clientbuttons.lua
deleted file mode 100644
index 12f54e4..0000000
--- a/awesome/bindings/clientbuttons.lua
+++ /dev/null
@@ -1,25 +0,0 @@
--- Awesome Libs
-local awful = require("awful")
-local gears = require("gears")
-
-local _M = {}
-local modkey = RC.vars.modkey
-
-function _M.get()
- 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
-
-return _M.get
\ No newline at end of file
diff --git a/awesome/bindings/clientkeys.lua b/awesome/bindings/clientkeys.lua
deleted file mode 100644
index cd63b40..0000000
--- a/awesome/bindings/clientkeys.lua
+++ /dev/null
@@ -1,55 +0,0 @@
--- Awesome Libs
-local awful = require("awful")
-local gears = require("gears")
-
-local _M = {}
-local modkey = RC.vars.modkey
-
-function _M.get()
- 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
-
-return _M.get
\ No newline at end of file
diff --git a/awesome/Bindings/GlobalButtons.lua b/awesome/bindings/global_buttons.lua
similarity index 88%
rename from awesome/Bindings/GlobalButtons.lua
rename to awesome/bindings/global_buttons.lua
index 84f3c6b..e476a38 100644
--- a/awesome/Bindings/GlobalButtons.lua
+++ b/awesome/bindings/global_buttons.lua
@@ -5,7 +5,7 @@ local awful = require("awful")
return function ()
local globalbuttons = gears.table.join(
awful.button({ }, 3, function()
- RC.MainMenu:toggle()
+ user_vars.main_menu:toggle()
end),
awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev)
diff --git a/awesome/Bindings/GlobalKeys.lua b/awesome/bindings/global_keys.lua
similarity index 54%
rename from awesome/Bindings/GlobalKeys.lua
rename to awesome/bindings/global_keys.lua
index acd64eb..e0b9261 100644
--- a/awesome/Bindings/GlobalKeys.lua
+++ b/awesome/bindings/global_keys.lua
@@ -4,7 +4,7 @@ local awful = require("awful")
local hotkeys_popup = require("awful.hotkeys_popup")
-- Resource Configuration
-local modkey = RC.vars.modkey
+local modkey = user_vars.vars.modkey
return function()
local globalkeys = gears.table.join(
@@ -12,34 +12,34 @@ return function()
{ modkey },
"s",
hotkeys_popup.show_help,
- {description="Cheet Sheet", group="Awesome"}
+ {description="Cheat sheet", group="Awesome"}
),
-- Tag browsing
awful.key(
{ modkey },
"Left",
awful.tag.viewprev,
- {description = "View previous", group = "Tag"}
+ {description = "View previous tag", group = "Tag"}
),
awful.key(
{ modkey },
"Right",
awful.tag.viewnext,
- {description = "View next", group = "Tag"}
+ {description = "View next tag", group = "Tag"}
),
awful.key(
{ modkey },
"Escape",
awful.tag.history.restore,
- {description = "Go back", group = "Tag"}
+ {description = "Go back to last tag", group = "Tag"}
),
awful.key(
{ modkey },
"j",
function ()
- awful.client.focus.byidx( 1)
+ awful.client.focus.byidx(1)
end,
- {description = "Focus next by index", group = "Client"}
+ {description = "Focus next client by index", group = "Client"}
),
awful.key(
{ modkey },
@@ -47,21 +47,21 @@ return function()
function ()
awful.client.focus.byidx(-1)
end,
- {description = "Focus previous by index", group = "Client"}
+ {description = "Focus previous client by index", group = "Client"}
),
awful.key(
{ modkey },
"w",
function ()
- RC.MainMenu:show()
+ user_vars.main_menu:show()
end,
- {description = "Show main menu", group = "Awesome"}
+ {description = "Show context menu", group = "Awesome"}
),
awful.key(
{ modkey, "Shift" },
"j",
function ()
- awful.client.swap.byidx( 1)
+ awful.client.swap.byidx(1)
end,
{description = "Swap with next client by index", group = "Client"}
),
@@ -69,22 +69,22 @@ return function()
{ modkey, "Shift" },
"k",
function ()
- awful.client.swap.byidx( -1)
+ 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)
+ function ()
+ awful.screen.focus_relative(1)
end,
{description = "Focus the next screen", group = "Screen"}
),
awful.key(
{ modkey, "Control" },
"k",
- function ()
+ function ()
awful.screen.focus_relative(-1)
end,
{description = "Focus the previous screen", group = "Screen"}
@@ -93,25 +93,15 @@ return function()
{ 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"}
+ {description = "Jump to urgent client", group = "Client"}
),
awful.key(
{ modkey },
"Return",
function ()
- awful.spawn("alacritty -o font.size=8")
+ awful.spawn(user_vars.vars.terminal)
end,
- {description = "Open terminal", group = "Launcher"}
+ {description = "Open terminal", group = "Applications"}
),
awful.key(
{ modkey, "Control" },
@@ -125,7 +115,7 @@ return function()
function ()
awful.tag.incmwfact( 0.05)
end,
- {description = "Increase master width factor", group = "Layout"}
+ {description = "Increase client width", group = "Layout"}
),
awful.key(
{ modkey },
@@ -133,29 +123,13 @@ return function()
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"}
+ {description = "Decrease client width", group = "Layout"}
),
awful.key(
{ modkey, "Control" },
"h",
function ()
- awful.tag.incncol( 1, nil, true)
+ awful.tag.incncol(1, nil, true)
end,
{description = "Increase the number of columns", group = "Layout"}
),
@@ -173,101 +147,39 @@ return function()
function ()
awful.layout.inc(-1)
end,
- {description = "Select previous", group = "Layout"}
+ {description = "Select previous layout", group = "Layout"}
),
awful.key(
- { modkey, "Control" },
- "n",
+ { modkey, "Shift" },
+ "Return",
function ()
- local c = awful.client.restore()
- -- Focus restored client
- if c then
- c:emit_signal(
- "request::activate", "key.unminimize", {raise = true}
- )
- end
+ awful.layout.inc(1)
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
+ {description = "Select next layout", group = "Layout"}
),
awful.key(
{ modkey },
"d",
function ()
- awful.spawn("rofi -show drun -theme ~/.config/rofi/appmenu/rofi.rasi")
+ awful.spawn("rofi -show drun -theme ~/.config/rofi/launcher/launcher.rasi")
end,
- { descripton = "Application searcher", group = "Application" }
+ { descripton = "Application launcher", group = "Application" }
),
awful.key(
{ modkey },
"Tab",
function ()
- awful.spawn("rofi -show window -theme ~/.config/rofi/appmenu/rofi.rasi")
+ awful.spawn("rofi -show window -theme ~/.config/rofi/launcher/launcher.rasi")
end,
- { descripton = "Show all open windows", group = "Application" }
+ { descripton = "Client switcher (alt+tab)", group = "Application" }
),
awful.key(
{ modkey },
"e",
function ()
- awful.spawn("thunar")
+ awful.spawn(user_vars.vars.file_manager)
end,
- { descripton = "Open Thunar File Manager", group = "System" }
+ { descripton = "Open file manager", group = "System" }
),
awful.key(
{ modkey, "Shift" },
@@ -275,76 +187,89 @@ return function()
function ()
awesome.emit_signal("module::powermenu:show")
end,
- { descripton = "Open the exit window", group = "System" }
+ { descripton = "Session options", group = "System" }
),
awful.key(
{ },
"Print",
function ()
- awful.spawn("flameshot gui")
- end
+ awful.spawn(user_vars.vars.screenshot_program)
+ end,
+ { description = "Screenshot", group = "Applications" }
),
awful.key(
{ },
"XF86AudioLowerVolume",
function (c)
- awful.spawn("amixer sset Master 5%-")
+ awful.spawn("pactl set-sink-volume @DEFAULT_SINK@ -2%")
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
+ end,
+ { description = "Lower volume", group = "System" }
),
awful.key(
{ },
"XF86AudioRaiseVolume",
function (c)
- awful.spawn("amixer sset Master 5%+")
+ awful.spawn.easy_async_with_shell(
+ [[ pacmd list-sinks | grep "volume: front" | awk '{print $5}' ]],
+ function (stdout)
+ stdout = stdout:gsub("%%", "")
+ local volume = tonumber(stdout) or 0
+ if volume <= 98 then
+ awful.spawn("pactl set-sink-volume @DEFAULT_SINK@ +2%")
+ end
+ end)
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
+ end,
+ { description = "Increase volume", group = "System" }
),
awful.key(
{ },
"XF86AudioMute",
function (c)
- awful.spawn("pactl -- set-sink-mute @DEFAULT_SINK@ toggle")
+ 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
+ end,
+ { description = "Mute volume", group = "System" }
),
awful.key(
- { modkey },
- "F5",
+ { },
+ "XF86MonBrightnessUp",
function (c)
- awful.spawn("xbacklight -inc 10%+")
+ awful.spawn("xbacklight -time 100 -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
+ end,
+ { description = "Raise backlight brightness", group = "System" }
),
awful.key(
- { modkey },
- "F4",
+ { },
+ "XF86MonBrightnessDown",
function (c)
- awful.spawn("xbacklight -dec 10%-")
+ awful.spawn("xbacklight -time 100 -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
+ end,
+ { description = "Lower backlight brightness", group = "System" }
),
awful.key(
- { modkey, "Shift" },
- "q",
+ {modkey},
+ "space",
function ()
- local t = awful.screen.focused().selected_tag
- t:delete()
- end
+ awesome.emit_signal("kblayout::toggle")
+ end,
+ { description = "Toggle keyboard layout", group = "System" }
)
)
diff --git a/awesome/bindings/globalbuttons.lua b/awesome/bindings/globalbuttons.lua
deleted file mode 100644
index f11a43d..0000000
--- a/awesome/bindings/globalbuttons.lua
+++ /dev/null
@@ -1,19 +0,0 @@
--- Awesome Libs
-local gears = require("gears")
-local awful = require("awful")
-
-local _M = {}
-local modkey = RC.vars.modkey
-
-function _M.get()
- 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
-
-return _M.get
\ No newline at end of file
diff --git a/awesome/bindings/globalkeys.lua b/awesome/bindings/globalkeys.lua
deleted file mode 100644
index e9e745e..0000000
--- a/awesome/bindings/globalkeys.lua
+++ /dev/null
@@ -1,364 +0,0 @@
--- Awesome Libs
-local gears = require("gears")
-local awful = require("awful")
-local hotkeys_popup = require("awful.hotkeys_popup")
-
--- Resource Configuration
-local modkey = RC.vars.modkey
-local terminal = RC.vars.terminal
-
-local _M = {}
-
-function _M.get()
- 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.0")
- 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 = "Start a Application", group = "Application" }
- ),
- awful.key(
- { modkey },
- "Tab",
- function ()
- awful.spawn("rofi -show window -theme ~/.config/rofi/appmenu/rofi.rasi")
- end,
- { descripton = "Start a Application", group = "Application" }
- ),
- awful.key(
- { modkey },
- "e",
- function ()
- awful.spawn('nautilus')
- end,
- { descripton = "Start a Application", group = "Application" }
- ),
- 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
- ),
- awful.key(
- { },
- "Escape",
- function ()
- awesome.emit_signal("module::powermenu:hide")
- end
- )
- )
-
- return globalkeys
-end
-
-return setmetatable({ }, { __call = function(_, ...) return _M.get(...) end })
\ No newline at end of file
diff --git a/awesome/CryliaBar/CenterBar.lua b/awesome/crylia_bar/center_bar.lua
similarity index 98%
rename from awesome/CryliaBar/CenterBar.lua
rename to awesome/crylia_bar/center_bar.lua
index b6a5367..cf203b3 100644
--- a/awesome/CryliaBar/CenterBar.lua
+++ b/awesome/crylia_bar/center_bar.lua
@@ -14,7 +14,6 @@ return function (s, widget)
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,
@@ -24,11 +23,13 @@ return function (s, widget)
}
top_center:setup{
+ nil,
{
widget,
margins = dpi(6),
widget = wibox.container.margin
},
+ nil,
forced_height = 45,
layout = wibox.layout.align.horizontal
}
diff --git a/awesome/CryliaBar/init.lua b/awesome/crylia_bar/init.lua
similarity index 81%
rename from awesome/CryliaBar/init.lua
rename to awesome/crylia_bar/init.lua
index cb7266d..989df8b 100644
--- a/awesome/CryliaBar/init.lua
+++ b/awesome/crylia_bar/init.lua
@@ -25,10 +25,11 @@ awful.screen.connect_for_each_screen(
s.kblayout = require("theme.crylia.widgets.kblayout")()
s.taglist = require("theme.crylia.widgets.taglist")(s)
s.tasklist = require("theme.crylia.widgets.tasklist")(s)
+ s.systray = require("theme.crylia.widgets.systray")(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})
+ require("crylia_bar.left_bar")(s, {s.layoutlist, s.systray, s.taglist})
+ require("crylia_bar.center_bar")(s, s.tasklist)
+ require("crylia_bar.right_bar")(s, {s.battery, s.network, s.bluetooth, s.audio, s.kblayout, s.date, s.clock,s.powerbutton})
end
)
diff --git a/awesome/CryliaBar/LeftBar.lua b/awesome/crylia_bar/left_bar.lua
similarity index 85%
rename from awesome/CryliaBar/LeftBar.lua
rename to awesome/crylia_bar/left_bar.lua
index 6552b9a..3ecb5dc 100644
--- a/awesome/CryliaBar/LeftBar.lua
+++ b/awesome/crylia_bar/left_bar.lua
@@ -14,12 +14,11 @@ return function (s, widgets)
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)
+ gears.shape.rounded_rect(cr, width, height, 5)
end
}
@@ -28,8 +27,6 @@ return function (s, widgets)
}
top_left:setup {
- nil,
- nil,
{
{
widgets[1],
@@ -41,9 +38,16 @@ return function (s, widgets)
margins = dpi(6),
widget = wibox.container.margin
},
+ {
+ widgets[3],
+ margins = dpi(6),
+ widget = wibox.container.margin
+ },
forced_height = 45,
layout = wibox.layout.fixed.horizontal
},
- layout = wibox.layout.align.horizontal
+ nil,
+ nil,
+ layout = wibox.layout.fixed.horizontal
}
end
\ No newline at end of file
diff --git a/awesome/CryliaBar/RightBar.lua b/awesome/crylia_bar/right_bar.lua
similarity index 97%
rename from awesome/CryliaBar/RightBar.lua
rename to awesome/crylia_bar/right_bar.lua
index 5dc996c..9f3e955 100644
--- a/awesome/CryliaBar/RightBar.lua
+++ b/awesome/crylia_bar/right_bar.lua
@@ -14,12 +14,11 @@ return function (s, widgets)
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)
+ gears.shape.rounded_rect(cr, width, height, 5)
end
}
diff --git a/awesome/deco/statusbar.lua b/awesome/deco/statusbar.lua
deleted file mode 100644
index 380e7a7..0000000
--- a/awesome/deco/statusbar.lua
+++ /dev/null
@@ -1,449 +0,0 @@
---------------------------------------------------------------------------------------------------------------
--- 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 beautiful = require("beautiful")
-local colors = require ("theme.crylia.colors")
-local dpi = beautiful.xresources.apply_dpi
-local gears = require("gears")
-local wibox = require("wibox")
-
-local tasklist = require("theme.crylia.widgets.tasklist")
-local taglist = require("theme.crylia.widgets.taglist")
-
-awful.screen.connect_for_each_screen(
- function (s)
-
- -- Bar for the layoutbox, taglist and newtag button
- s.top_left = awful.popup {
- widget = wibox.container.background,
- ontop = false,
- bg = colors.color["Grey900"],
- stretch = false,
- visible = true,
- placement = function (c)
- awful.placement.top_left(c, {margins = dpi(10)})
- end,
- shape = function (cr, width, height)
- gears.shape.rounded_rect(cr, width, height, 5)
- end
- }
-
- -- Bar for the tasklist
- s.top_center = awful.popup{
- widget = {
- margins = dpi(10),
- widget = wibox.container.margin
- },
- ontop = false,
- bg = colors.color["Grey900"],
- visible = true,
- stretch = false,
- maximum_width = 600,
- placement = function (c)
- awful.placement.top(c, {margins = dpi(10)})
- end,
- shape = function (cr, width, height)
- gears.shape.rounded_rect(cr, width, height, 5)
- end,
- layout = wibox.layout.flex.horizontal
- }
-
- -- Bar for all the widgets
- s.top_right = awful.popup {
- widget = {
- margins = dpi(10),
- widget = wibox.container.margin
- },
- ontop = false,
- bg = "#212121",
- visible = true,
- placement = function (c)
- awful.placement.top_right(c, {margins = dpi(10)})
- end,
- shape = function (cr, width, height)
- gears.shape.rounded_rect(cr, width, height, 5)
- end
- }
-
- -- Calendar OSD container
- s.calendar_osd_container = awful.popup{
- widget = {},
- ontop = true,
- shape = function (cr, width, height)
- gears.shape.rounded_rect(cr, width, height, 10)
- end,
- border_width = dpi(0),
- border_color = colors.color["Grey800"],
- placement = function (c)
- awful.placement.top_right(c, {
- margins = {
- right = dpi(100),
- top = dpi(60)
- }
- })
- end,
- visible = false
- }
-
- local hide_osd = gears.timer{
- timeout = 0.25,
- autostart = true,
- callback = function ()
- s.calendar_osd_container.visible = false
- end
- }
-
- -- OSD Container
- s.volume_container = awful.popup{
- widget = {
- margins = dpi(10),
- widget = wibox.container.margin
- },
- ontop = true,
- bg = "#00000000",
- border_width = dpi(0),
- border_color = "#454545",
- shape = function (cr, width, height)
- gears.shape.rounded_rect(cr, width, height, 10)
- end,
- placement = function (c)
- awful.placement.bottom_right(c, {margins = dpi(10)})
- end,
- visible = false,
- }
-
- local hide_volume_osd = gears.timer{
- timeout = 1,
- autostart = true,
- callback = function ()
- s.volume_container.visible = false
- end
- }
-
- s.brightness_container = awful.popup{
- widget = {
- margins = dpi(10),
- widget = wibox.container.margin
- },
- ontop = true,
- bg = "#00000000",
- border_width = dpi(0),
- border_color = "#454545",
- shape = function (cr, width, height)
- gears.shape.rounded_rect(cr, width, height, 10)
- end,
- placement = function (c)
- awful.placement.bottom_right(c, {margins = dpi(10)})
- end,
- visible = false
- }
-
- local hide_brightness_osd = gears.timer{
- timeout = 1,
- autostart = true,
- callback = function ()
- s.brightness_container.visible = false
- end
- }
-
- s.powermenu_container = wibox{
- 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
- }
-
- -- All the modules and widgets
- s.volume_osd = require("theme.crylia.modules.volume_osd")()
- s.brightness_osd = require("theme.crylia.modules.brightness_osd")()
- 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.calendar_osd = require("theme.crylia.modules.calendar_osd")()
- s.layoutlist = require("theme.crylia.widgets.layout_list")()
- s.powerbutton = require("theme.crylia.widgets.power")()
- s.kblayout = require("theme.crylia.widgets.kblayout")()
- s.powermenu = require("theme.crylia.modules.powermenu")()
-
- s.top_left:setup {
- nil,
- nil,
- {
- {
- s.layoutlist,
- margins = dpi(6),
- widget = wibox.container.margin
- },
- {
- taglist(s),
- margins = dpi(6),
- widget = wibox.container.margin
- },
- forced_height = 45,
- layout = wibox.layout.fixed.horizontal
- },
- layout = wibox.layout.align.horizontal
- }
-
- -- This is the space from top down till the window starts
- s.top_left:struts{
- top = 55
- }
-
- s.top_center:setup{
- {
- tasklist(s),
- margins = dpi(6),
- widget = wibox.container.margin
- },
- forced_height = 45,
- layout = wibox.layout.align.horizontal
- }
-
- s.top_right:setup {
- nil,
- nil,
- {
- {
- s.battery,
- left = dpi(6),
- right = dpi(3),
- top = dpi(6),
- bottom = dpi(6),
- widget = wibox.container.margin
- },
- {
- s.network,
- left = dpi(3),
- right = dpi(3),
- top = dpi(6),
- bottom = dpi(6),
- widget = wibox.container.margin
- },
- {
- s.bluetooth,
- left = dpi(3),
- right = dpi(3),
- top = dpi(6),
- bottom = dpi(6),
- widget = wibox.container.margin
- },
- {
- s.audio,
- left = dpi(3),
- right = dpi(3),
- top = dpi(6),
- bottom = dpi(6),
- widget = wibox.container.margin
- },
- {
- s.kblayout,
- left = dpi(3),
- right = dpi(3),
- top = dpi(6),
- bottom = dpi(6),
- widget = wibox.container.margin
- },
- {
- s.date,
- left = dpi(3),
- right = dpi(3),
- top = dpi(6),
- bottom = dpi(6),
- widget = wibox.container.margin
- },
- {
- s.clock,
- left = dpi(3),
- right = dpi(3),
- top = dpi(6),
- bottom = dpi(6),
- widget = wibox.container.margin
- },
- {
- s.powerbutton,
- 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
- }
-
- s.volume_container:setup{
- s.volume_osd,
- layout = wibox.layout.fixed.horizontal
- }
-
- s.brightness_container:setup{
- s.brightness_osd,
- layout = wibox.layout.fixed.horizontal
- }
-
- s.calendar_osd_container:setup{
- s.calendar_osd,
- layout = wibox.layout.align.horizontal
- }
-
- s.powermenu_container:setup{
- s.powermenu,
- layout = wibox.layout.flex.horizontal
- }
-
- s.powermenu_container:buttons(
- gears.table.join(
- awful.button(
- {},
- 3,
- function ()
- awesome.emit_signal("module::powermenu:hide")
- end
- )
- )
- )
-
- -- Signals
- awesome.connect_signal(
- "module::powermenu:show",
- function()
- for s in screen do
- s.powermenu_container.visible = false
- end
- awful.screen.focused().powermenu_container.visible = true
- end
- )
-
- awesome.connect_signal(
- "module::powermenu:hide",
- function()
- for s in screen do
- s.powermenu_container.visible = false
- end
- end
- )
-
- awesome.connect_signal(
- "hide_centerbar",
- function (hide)
- s.top_center.visible = hide
- end
- )
-
- 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 ()
- s.brightness_container.visible = true
- end
- )
-
- s.brightness_container:connect_signal(
- "mouse::enter",
- function ()
- s.brightness_container.visible = true
- hide_brightness_osd:stop()
- end
- )
-
- s.brightness_container:connect_signal(
- "mouse::leave",
- function ()
- s.brightness_container.visible = true
- hide_brightness_osd:again()
- end
- )
-
- awesome.connect_signal(
- "module::volume_osd:show",
- function ()
- s.volume_container.visible = true
- end
- )
-
- s.volume_container:connect_signal(
- "mouse::enter",
- function ()
- s.volume_container.visible = true
- hide_volume_osd:stop()
- end
- )
-
- s.volume_container:connect_signal(
- "mouse::leave",
- function ()
- s.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
- )
-
- s.calendar_osd_container:connect_signal(
- "mouse::enter",
- function ()
- s.calendar_osd_container.visible = true
- hide_osd:stop()
- end
- )
-
- s.calendar_osd_container:connect_signal(
- "mouse::leave",
- function ()
- s.calendar_osd_container.visible = false
- hide_osd:stop()
- end
- )
-
- awesome.connect_signal(
- "widget::calendar_osd:stop",
- function ()
- s.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
-)
\ No newline at end of file
diff --git a/awesome/deco/taglist.lua b/awesome/deco/taglist.lua
deleted file mode 100644
index 82fcd1d..0000000
--- a/awesome/deco/taglist.lua
+++ /dev/null
@@ -1,64 +0,0 @@
--- This function does currently nothing
--- Awesome Libs
-local gears = require("gears")
-local awful = require("awful")
-
-local _M = { }
-
-function _M.get()
- local taglist_buttons = gears.table.join(
- awful.button(
- { },
- 1,
- function (t)
- t:view_only()
- end
- ),
- awful.button(
- { modkey },
- 1,
- function (t)
- if client.focus then
- client.focus:move_to_tag(t)
- end
- end
- ),
- awful.button(
- { },
- 3,
- function (t)
- if client.focus then
- client.focus:toggle_tag(t)
- end
- end
- ),
- awful.button(
- { modkey },
- 3,
- function (t)
- if client.focus then
- client.focus:toggle_tag(t)
- end
- end
- ),
- awful.button(
- { },
- 4,
- function (t)
- awful.tag.viewnext(t.screen)
- end
- ),
- awful.button(
- { },
- 5,
- function (t)
- if client.focus then
- awful.tag.viewprev(t.screen)
- end
- end
- )
- )
- return taglist_buttons
-end
-
-return setmetatable({ }, { __call = function(_, ...) return _M.get(...) end})
\ No newline at end of file
diff --git a/awesome/deco/tasklist.lua b/awesome/deco/tasklist.lua
deleted file mode 100644
index e099256..0000000
--- a/awesome/deco/tasklist.lua
+++ /dev/null
@@ -1,50 +0,0 @@
--- This function does currently nothing
--- Default awesome libraries
-local gears = require("gears")
-local awful = require("awful")
-
-local _M = {}
-
-function _M.get()
- local tasklist_buttons = gears.table.join(
- awful.button(
- { },
- 1,
- function (c)
- if c == client.focus then
- c.minimized = true
- else
- c:emit_signal(
- "request::activate",
- "tasklist",
- {raise = true}
- )
- end
- end
- ),
- awful.button(
- { },
- 3,
- function()
- awful.menu.client_list({ theme = { width = 250 } })
- end
- ),
- awful.button(
- { },
- 4,
- function ()
- awful.client.focus.byidx(1)
- end
- ),
- awful.button(
- { },
- 5,
- function ()
- awful.client.focus.byidx(-1)
- end
- )
- )
- return tasklist_buttons
-end
-
-return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })
\ No newline at end of file
diff --git a/awesome/main/layouts.lua b/awesome/main/layouts.lua
index 33b4b29..89be572 100644
--- a/awesome/main/layouts.lua
+++ b/awesome/main/layouts.lua
@@ -4,15 +4,11 @@
-- Awesome Libs
local awful = require("awful")
-local _M = { }
-
-function _M.get()
+return function ()
local layouts = {
awful.layout.suit.tile,
awful.layout.suit.floating,
}
return layouts
-end
-
-return _M.get
\ No newline at end of file
+end
\ No newline at end of file
diff --git a/awesome/main/menu.lua b/awesome/main/menu.lua
index 5512728..14fee34 100644
--- a/awesome/main/menu.lua
+++ b/awesome/main/menu.lua
@@ -4,21 +4,16 @@
-- Awesome Libs
local awful = require("awful")
--- Menu Namespace
-local M = { }
-
-- Module Namespace
local _M = { }
-local terminal = RC.vars.terminal
-
-M.session = {
+local session = {
{ "Logout", function () awesome.quit() end },
{ "Shutdown", function () awful.spawn.with_shell('shutdown now') end },
{ "Reboot", function () awful.spawn.with_shell('reboot') end },
}
-M.applications = {
+local applications = {
{ "Firefox", "firefox" },
{ "VS Code", "code" },
{ "Blender", "blender" },
@@ -26,21 +21,18 @@ M.applications = {
{ "Lutris", "lutris" },
}
-M.settings = {
+local settings = {
{ "General Settings", "gnome-control-center" },
{ "Power Settings", "xfce4-power-manager-settings" },
{ "Display Settings", "arandr" }
}
-function _M.get()
+return function()
local menu_items = {
- { "Power Menu", M.session },
- { "Applications", M.applications },
- { "Open Terminal", terminal },
- { "Settings", M.settings },
+ { "Power Menu", session },
+ { "Applications", applications },
+ { "Open Terminal", user_vars.vars.terminal },
+ { "Settings", settings },
}
-
- return menu_items
-end
-
-return _M.get
\ No newline at end of file
+ return menu_ttems
+end
\ No newline at end of file
diff --git a/awesome/main/rules.lua b/awesome/main/rules.lua
index 35e51cf..056b236 100644
--- a/awesome/main/rules.lua
+++ b/awesome/main/rules.lua
@@ -6,9 +6,7 @@
local awful = require("awful")
local beautiful = require("beautiful")
-local _M = { }
-
-function _M.get(clientkeys, clientbuttons)
+return function (clientkeys, clientbuttons)
local rules = {
{
rule = { },
@@ -28,7 +26,11 @@ function _M.get(clientkeys, clientbuttons)
instance = { },
class = {
"Arandr",
- "Tor Browser"
+ "Lxappearance",
+ "kdeconnect.app",
+ "zoom",
+ "file-roller",
+ "File-roller"
},
name = { },
role = {
@@ -48,6 +50,4 @@ function _M.get(clientkeys, clientbuttons)
}
}
return rules
-end
-
-return _M.get
\ No newline at end of file
+end
\ No newline at end of file
diff --git a/awesome/main/signals.lua b/awesome/main/signals.lua
index 094273b..6c43c6f 100644
--- a/awesome/main/signals.lua
+++ b/awesome/main/signals.lua
@@ -2,7 +2,6 @@
local awful = require("awful")
local beautiful = require("beautiful")
-
client.connect_signal(
"manage",
function (c)
@@ -56,4 +55,82 @@ end)
client.connect_signal("unfocus", function (c)
c.border_color = beautiful.border_normal
-end)
\ No newline at end of file
+end)
+
+function hover_signal (widget, bg, fg)
+ local old_wibox, old_cursor, old_bg, old_fg
+ widget:connect_signal(
+ "mouse::enter",
+ function ()
+ if bg then
+ old_bg = widget.bg
+ if string.len(bg) == 7 then
+ widget.bg = bg .. 'dd'
+ else
+ widget.bg = bg
+ end
+ end
+ if fg then
+ old_fg = widget.fg
+ widget.fg = fg
+ end
+ 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 ()
+ if bg then
+ if bg then
+ if string.len(bg) == 7 then
+ widget.bg = bg .. 'bb'
+ else
+ widget.bg = bg
+ end
+ end
+ end
+ if fg then
+ widget.fg = fg
+ end
+ end
+ )
+
+ widget:connect_signal(
+ "button::release",
+ function ()
+ if bg then
+ if bg then
+ if string.len(bg) == 7 then
+ widget.bg = bg .. 'dd'
+ else
+ widget.bg = bg
+ end
+ end
+ end
+ if fg then
+ widget.fg = fg
+ end
+ end
+ )
+
+ widget:connect_signal(
+ "mouse::leave",
+ function ()
+ if bg then
+ widget.bg = old_bg
+ end
+ if fg then
+ widget.fg = old_fg
+ end
+ if old_wibox then
+ old_wibox.cursor = old_cursor
+ old_wibox = nil
+ end
+ end
+ )
+end
\ No newline at end of file
diff --git a/awesome/main/tags.lua b/awesome/main/tags.lua
index 5a34164..6b37d86 100644
--- a/awesome/main/tags.lua
+++ b/awesome/main/tags.lua
@@ -5,9 +5,7 @@
-- Awesome Libs
local awful = require("awful")
-local _M = { }
-
-function _M.get()
+return function()
local tags = {}
awful.screen.connect_for_each_screen(
function (s)
@@ -16,12 +14,10 @@ function _M.get()
"1", "2", "3", "4", "5", "6", "7", "8", "9"
},
s,
- RC.layouts[1]
+ user_vars.Layouts[1]
)
end
)
return tags
-end
-
-return _M.get
\ No newline at end of file
+end
\ No newline at end of file
diff --git a/awesome/main/theme.lua b/awesome/main/theme.lua
index a7a83dd..7245b09 100644
--- a/awesome/main/theme.lua
+++ b/awesome/main/theme.lua
@@ -5,8 +5,8 @@ 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(user_vars.vars.wallpaper) then
+ local wallpaper = user_vars.vars.wallpaper
if awful.util.file_readable(wallpaper) then
Theme.wallpaper = wallpaper
end
diff --git a/awesome/main/user_variables.lua b/awesome/main/user_variables.lua
index 03250a9..e10a729 100644
--- a/awesome/main/user_variables.lua
+++ b/awesome/main/user_variables.lua
@@ -5,9 +5,30 @@ local home = os.getenv("HOME")
-- If you want different default programs, wallpaper path or modkey; edit this file.
local _M = {
- terminal = "alacritty",
+
+ -- This is your default Terminal
+ terminal = "alacritty -o font.size=8",
+
+ -- This is the modkey 'mod4' = Super/Mod/WindowsKey, 'mod3' = alt...
modkey = "Mod4",
- wallpaper = home .. "/.config/awesome/theme/crylia/assets/wallpaper.jpg"
+
+ -- 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",
+
+ -- List every Keyboard layout you use here comma seperated. (run localectl list-keymaps to list all averiable keymaps)
+ kblayout = {"de", "ru", "us"},
+
+ -- Set to false if you dont have a controller
+ bluetooth = true,
+
+ -- Your filemanager that opens with super+e
+ file_manager = "thunar",
+
+ -- Screenshot program to make a screenshot when print is hit
+ screenshot_program = "flameshot gui"
}
return _M
\ No newline at end of file
diff --git a/awesome/deco/wallpaper.lua b/awesome/main/wallpaper.lua
similarity index 100%
rename from awesome/deco/wallpaper.lua
rename to awesome/main/wallpaper.lua
diff --git a/awesome/rc.lua b/awesome/rc.lua
index dd13292..ce4fd76 100644
--- a/awesome/rc.lua
+++ b/awesome/rc.lua
@@ -17,72 +17,73 @@ local gears = require("gears")
local menubar = require("menubar")
-- Global Namespace
-RC = {}
-RC.vars = require("Main.UserVariables")
+user_vars = {}
+user_vars.vars = require("main.user_variables")
-- Error Handling
-require("Main.ErrorHandling")
+require("main.error_handling")
-- Default Theme and Custom Wallpaper
beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua")
-beautiful.wallpaper = RC.vars.wallpaper
-modkey = RC.vars.modkey
+beautiful.wallpaper = user_vars.vars.wallpaper
+modkey = user_vars.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 = {
+ global_buttons = require("bindings.global_buttons"),
+ client_buttons = require("bindings.client_buttons"),
+ global_keys = require("bindings.global_keys"),
+ bind_to_tags = require("bindings.bind_to_tags"),
+ client_keys = require("bindings.client_keys")
}
-RC.Layouts = Main.Layouts()
+user_vars.Layouts = main.layouts()
-awful.layout.layouts = Main.Layouts()
+awful.layout.layouts = main.layouts()
-RC.Tags = Main.Tags()
+user_vars.tags = main.tags()
-RC.MainMenu = awful.menu({
- items = Main.Menu()
+user_vars.main_menu = awful.menu({
+ items = main.menu()
})
-- A Variable needed in Statusbar (helper)
-RC.Launcher = awful.widget.launcher({
- Image = beautiful.awesome_icon,
- Menu = RC.MainMenu
+user_vars.launcher = awful.widget.launcher({
+ image = beautiful.awesome_icon,
+ menu = user_vars.main_menu
})
-- Menubar configuration
-menubar.utils.terminal = RC.vars.terminal
+menubar.utils.terminal = user_vars.vars.terminal
-- Set root
-root.buttons(Bindings.GlobalButtons())
-root.keys(Bindings.BindToTags(Bindings.GlobalKeys()))
+root.buttons(bindings.global_buttons())
+root.keys(bindings.bind_to_tags(bindings.global_keys()))
-- Default statusbar, comment if you want use a third party tool like polybar
-require("CryliaBar.init")
+require("crylia_bar.init")
-- Rules to apply to new clients
-awful.rules.rules = Main.Rules(
- Bindings.ClientKeys(),
- Bindings.ClientButtons()
+awful.rules.rules = main.rules(
+ bindings.client_keys(),
+ bindings.client_buttons()
)
-- Signals
-require("Main.Signals")
+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("light-locker --lock-on-suspend --lock-on-lid &")
diff --git a/awesome/theme/crylia/assets/icons/addtag/JetBrainsMono.zip b/awesome/theme/crylia/assets/icons/addtag/JetBrainsMono.zip
deleted file mode 100644
index 68d4727..0000000
Binary files a/awesome/theme/crylia/assets/icons/addtag/JetBrainsMono.zip and /dev/null differ
diff --git a/awesome/theme/crylia/assets/icons/audio/volume-high.svg b/awesome/theme/crylia/assets/icons/audio/volume-high.svg
index a002372..521fe87 100644
--- a/awesome/theme/crylia/assets/icons/audio/volume-high.svg
+++ b/awesome/theme/crylia/assets/icons/audio/volume-high.svg
@@ -1 +1,5 @@
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/awesome/theme/crylia/assets/icons/audio/volume-low.svg b/awesome/theme/crylia/assets/icons/audio/volume-low.svg
index cddf5b8..0a7f9ef 100644
--- a/awesome/theme/crylia/assets/icons/audio/volume-low.svg
+++ b/awesome/theme/crylia/assets/icons/audio/volume-low.svg
@@ -1 +1,5 @@
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/awesome/theme/crylia/assets/icons/audio/volume-medium.svg b/awesome/theme/crylia/assets/icons/audio/volume-medium.svg
index 80c54ee..fd01e51 100644
--- a/awesome/theme/crylia/assets/icons/audio/volume-medium.svg
+++ b/awesome/theme/crylia/assets/icons/audio/volume-medium.svg
@@ -1 +1,5 @@
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/awesome/theme/crylia/assets/icons/audio/volume-mute.svg b/awesome/theme/crylia/assets/icons/audio/volume-mute.svg
index 7cdff75..902d2d5 100644
--- a/awesome/theme/crylia/assets/icons/audio/volume-mute.svg
+++ b/awesome/theme/crylia/assets/icons/audio/volume-mute.svg
@@ -1 +1,5 @@
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/awesome/theme/crylia/assets/icons/audio/volume-off.svg b/awesome/theme/crylia/assets/icons/audio/volume-off.svg
index 01e450f..4048f82 100644
--- a/awesome/theme/crylia/assets/icons/audio/volume-off.svg
+++ b/awesome/theme/crylia/assets/icons/audio/volume-off.svg
@@ -1 +1,5 @@
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/awesome/theme/crylia/assets/icons/brightness/brightness-high.svg b/awesome/theme/crylia/assets/icons/brightness/brightness-high.svg
index 0f22d78..fa2ced4 100644
--- a/awesome/theme/crylia/assets/icons/brightness/brightness-high.svg
+++ b/awesome/theme/crylia/assets/icons/brightness/brightness-high.svg
@@ -1 +1,5 @@
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/awesome/theme/crylia/assets/icons/brightness/brightness-low.svg b/awesome/theme/crylia/assets/icons/brightness/brightness-low.svg
index d5a1c15..d8818a4 100644
--- a/awesome/theme/crylia/assets/icons/brightness/brightness-low.svg
+++ b/awesome/theme/crylia/assets/icons/brightness/brightness-low.svg
@@ -1 +1,5 @@
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/awesome/theme/crylia/assets/icons/brightness/brightness-medium.svg b/awesome/theme/crylia/assets/icons/brightness/brightness-medium.svg
index e4e223c..6de47b0 100644
--- a/awesome/theme/crylia/assets/icons/brightness/brightness-medium.svg
+++ b/awesome/theme/crylia/assets/icons/brightness/brightness-medium.svg
@@ -1 +1,5 @@
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/awesome/theme/crylia/assets/userpfp/crylia.png b/awesome/theme/crylia/assets/userpfp/crylia.png
index 20e1e11..2f79ddb 100644
Binary files a/awesome/theme/crylia/assets/userpfp/crylia.png and b/awesome/theme/crylia/assets/userpfp/crylia.png differ
diff --git a/awesome/theme/crylia/assets/wallpaper.jpg b/awesome/theme/crylia/assets/wallpaper.jpg
deleted file mode 100644
index f6ff102..0000000
Binary files a/awesome/theme/crylia/assets/wallpaper.jpg and /dev/null differ
diff --git a/awesome/theme/crylia/modules/brightness_osd.lua b/awesome/theme/crylia/modules/brightness_osd.lua
index bccd4ad..9cb7416 100644
--- a/awesome/theme/crylia/modules/brightness_osd.lua
+++ b/awesome/theme/crylia/modules/brightness_osd.lua
@@ -20,48 +20,56 @@ return function (s)
{
{
{
- id = "label",
- text = "Brightness",
- align = "left",
- valign = "center",
- widget = wibox.widget.textbox
+ nil,
+ {
+ nil,
+ {
+ id = "icon",
+ forced_height = dpi(220),
+ image = icondir .. "brightness-high.svg",
+ widget = wibox.widget.imagebox
+ },
+ nil,
+ expand = "none",
+ id = "icon_margin2",
+ layout = wibox.layout.align.vertical
+ },
+ nil,
+ id = "icon_margin1",
+ expand = "none",
+ layout = wibox.layout.align.horizontal
},
- nil,
- {
- id = "value",
- text = "0%",
- align = "center",
- valign = "center",
- widget = wibox.widget.textbox
- },
- id = "label_value_layout",
- forced_height = dpi(48),
- layout = wibox.layout.align.horizontal,
- },
- {
{
{
- id = "icon",
- image = gears.color.recolor_image(icondir .. "brightness-high.svg", color.color["White"]),
- widget = wibox.widget.imagebox
+ id = "label",
+ text = "Brightness",
+ align = "left",
+ valign = "center",
+ widget = wibox.widget.textbox
},
- id = "icon_margin",
- top = dpi(12),
- bottom = dpi(12),
- widget = wibox.container.margin
+ nil,
+ {
+ id = "value",
+ text = "0%",
+ align = "center",
+ valign = "center",
+ widget = wibox.widget.textbox
+ },
+ id = "label_value_layout",
+ forced_height = dpi(48),
+ layout = wibox.layout.align.horizontal,
},
{
{
id = "brightness_slider",
bar_shape = gears.shape.rounded_rect,
- bar_height = dpi(2),
- bar_color = color.color["White"],
- bar_active_color = color.color["White"],
- handle_color = color.color["White"],
+ bar_height = dpi(10),
+ bar_color = color.color["Grey800"] .. "88",
+ bar_active_color = "#ffffff",
+ handle_color = "#ffffff",
handle_shape = gears.shape.circle,
- handle_width = dpi(15),
+ handle_width = dpi(10),
handle_border_color = color.color["White"],
- handle_border_width = dpi(1),
maximum = 100,
widget = wibox.widget.slider
},
@@ -70,23 +78,23 @@ return function (s)
widget = wibox.container.place
},
id = "icon_slider_layout",
- spacing = dpi(24),
- layout = wibox.layout.fixed.horizontal
+ spacing = dpi(0),
+ layout = wibox.layout.align.vertical
},
id = "osd_layout",
- layout = wibox.layout.fixed.vertical
+ layout = wibox.layout.align.vertical
},
id = "container",
left = dpi(24),
right = dpi(24),
widget = wibox.container.margin
},
- bg = color.color["Grey900"],
+ bg = color.color["Grey900"] .. "88",
widget = wibox.container.background,
ontop = true,
visible = true,
type = "notification",
- forced_height = dpi(100),
+ forced_height = dpi(300),
forced_width = dpi(300),
offset = dpi(5),
}
@@ -97,7 +105,7 @@ return function (s)
local brightness_value = brightness_osd_widget.container.osd_layout.icon_slider_layout.slider_layout.brightness_slider:get_value()
-- Performance is horrible, or it overrides and executes at the same time as the keybindings
--awful.spawn("xbacklight -set " .. brightness_value, false)
- brightness_osd_widget.container.osd_layout.label_value_layout.value:set_text(brightness_value .. "%")
+ brightness_osd_widget.container.osd_layout.icon_slider_layout.label_value_layout.value:set_text(brightness_value .. "%")
awesome.emit_signal(
"widget::brightness:update",
@@ -119,13 +127,13 @@ return function (s)
elseif brightness_value >= 67 then
icon = icon .. "-high"
end
- brightness_osd_widget.container.osd_layout.icon_slider_layout.icon_margin.icon:set_image(gears.color.recolor_image(icon .. ".svg", color.color["White"]))
+ brightness_osd_widget.container.osd_layout.icon_slider_layout.icon_margin1.icon_margin2.icon:set_image(icon .. ".svg")
end
)
local update_slider = function ()
awful.spawn.easy_async_with_shell(
- [[ xbacklight -get ]],
+ [[ sleep 0.1 && xbacklight -get ]],
function (stdout)
stdout = stdout:sub(1,-9)
brightness_osd_widget.container.osd_layout.icon_slider_layout.slider_layout.brightness_slider:set_value(tonumber(stdout))
@@ -152,17 +160,17 @@ return function (s)
local brightness_container = awful.popup{
widget = wibox.container.background,
ontop = true,
- bg = color.color["Grey900"],
+ bg = color.color["Grey900"] .. "00",
stretch = false,
visible = false,
- placement = function (c) awful.placement.bottom_right(c, {margins = dpi(10)}) end,
+ placement = function (c) awful.placement.centered(c, {margins = {top = dpi(200)}}) end,
shape = function (cr, width, height)
- gears.shape.rounded_rect(cr, width, height, 5)
+ gears.shape.rounded_rect(cr, width, height, 15)
end
}
local hide_brightness_osd = gears.timer{
- timeout = 1,
+ timeout = 2,
autostart = true,
callback = function ()
brightness_container.visible = false
diff --git a/awesome/theme/crylia/modules/powermenu.lua b/awesome/theme/crylia/modules/powermenu.lua
index 2d1d617..c05d3b2 100644
--- a/awesome/theme/crylia/modules/powermenu.lua
+++ b/awesome/theme/crylia/modules/powermenu.lua
@@ -8,7 +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")
+require("main.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/powermenu/"
@@ -77,7 +77,7 @@ return function (s)
update_profile_picture()
-- Will determin the display style
- local namestyle = RC.vars.namestyle
+ local namestyle = user_vars.vars.namestyle
-- Get the full username(if set) and the username + hostname
local update_user_name = function()
awful.spawn.easy_async_with_shell(
diff --git a/awesome/theme/crylia/modules/titlebar.lua b/awesome/theme/crylia/modules/titlebar.lua
index 96f4cbc..6b92069 100644
--- a/awesome/theme/crylia/modules/titlebar.lua
+++ b/awesome/theme/crylia/modules/titlebar.lua
@@ -8,7 +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")
+require("main.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/titlebar/"
@@ -138,16 +138,23 @@ local create_titlebar = function (c, bg, size)
end
local create_titlebar_dialog = 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 {
+ {
+ {
+ {
awful.titlebar.widget.closebutton(c),
widget = wibox.container.background,
bg = color.color["Red200"],
shape = function (cr, height, width)
gears.shape.rounded_rect(cr, width, height, 4)
- end
+ end,
+ id = "closebutton"
},
{
awful.titlebar.widget.minimizebutton(c),
@@ -155,21 +162,33 @@ local create_titlebar_dialog = 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(7),
- layout = wibox.layout.fixed.vertical
- },
- margins = dpi(8),
- widget = wibox.container.margin
- },
- {
+ spacing = dpi(10),
+ layout = wibox.layout.fixed.vertical,
+ id = "spacing"
+ },
+ margins = dpi(8),
+ 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.minimizebutton, color.color["Green200"])
end
local create_titlebar_borderhack = function (c, bg, position)
@@ -234,6 +253,9 @@ local draw_titlebar = function (c)
end
elseif c.type == 'dialog' then
create_titlebar_dialog(c, '#121212AA', 35)
+ create_titlebar_borderhack(c, "#121212AA", "right")
+ create_titlebar_borderhack(c, "#121212AA", "top")
+ create_titlebar_borderhack(c, "#121212AA", "bottom")
elseif c.type == 'modal' then
else
create_titlebar_borderhack(c, "#121212AA", "right")
diff --git a/awesome/theme/crylia/modules/volume_osd.lua b/awesome/theme/crylia/modules/volume_osd.lua
index 6c51d85..fe42d05 100644
--- a/awesome/theme/crylia/modules/volume_osd.lua
+++ b/awesome/theme/crylia/modules/volume_osd.lua
@@ -20,48 +20,56 @@ return function (s)
{
{
{
- id = "label",
- text = "Volume",
- align = "left",
- valign = "center",
- widget = wibox.widget.textbox
+ nil,
+ {
+ nil,
+ {
+ id = "icon",
+ forced_height = dpi(220),
+ image = icondir .. "volume-high.svg",
+ widget = wibox.widget.imagebox
+ },
+ nil,
+ expand = "none",
+ id = "icon_margin2",
+ layout = wibox.layout.align.vertical
+ },
+ nil,
+ id = "icon_margin1",
+ expand = "none",
+ layout = wibox.layout.align.horizontal
},
- nil,
- {
- id = "value",
- text = "0%",
- align = "center",
- valign = "center",
- widget = wibox.widget.textbox
- },
- id = "label_value_layout",
- forced_height = dpi(48),
- layout = wibox.layout.align.horizontal,
- },
- {
{
{
- id = "icon",
- image = gears.color.recolor_image(icondir .. "volume-high.svg", color.color["White"]),
- widget = wibox.widget.imagebox
+ id = "label",
+ text = "Volume",
+ align = "left",
+ valign = "center",
+ widget = wibox.widget.textbox
},
- id = "icon_margin",
- top = dpi(12),
- bottom = dpi(12),
- widget = wibox.container.margin
+ nil,
+ {
+ id = "value",
+ text = "0%",
+ align = "center",
+ valign = "center",
+ widget = wibox.widget.textbox
+ },
+ id = "label_value_layout",
+ forced_height = dpi(48),
+ layout = wibox.layout.align.horizontal,
},
{
{
id = "volume_slider",
bar_shape = gears.shape.rounded_rect,
- bar_height = dpi(2),
- bar_color = color.color["White"],
- bar_active_color = color.color["White"],
- handle_color = color.color["White"],
+ bar_height = dpi(10),
+ bar_color = color.color["Grey800"] .. "88",
+ bar_active_color = "#ffffff",
+ handle_color = "#ffffff",
handle_shape = gears.shape.circle,
- handle_width = dpi(15),
+ handle_width = dpi(10),
handle_border_color = color.color["White"],
- handle_border_width = dpi(1),
maximum = 100,
widget = wibox.widget.slider
},
@@ -70,76 +78,80 @@ return function (s)
widget = wibox.container.place
},
id = "icon_slider_layout",
- spacing = dpi(24),
- layout = wibox.layout.fixed.horizontal
+ spacing = dpi(0),
+ layout = wibox.layout.align.vertical
},
id = "osd_layout",
- layout = wibox.layout.fixed.vertical
+ layout = wibox.layout.align.vertical
},
id = "container",
left = dpi(24),
right = dpi(24),
widget = wibox.container.margin
},
- bg = color.color["Grey900"],
+ bg = color.color["Grey900"] .. '88',
widget = wibox.container.background,
ontop = true,
visible = true,
type = "notification",
- forced_height = dpi(100),
+ forced_height = dpi(300),
forced_width = dpi(300),
offset = dpi(5),
}
+ local function update_osd()
+ local volume_level = volume_osd_widget.container.osd_layout.icon_slider_layout.slider_layout.volume_slider:get_value()
+
+ awful.spawn("pactl set-sink-volume @DEFAULT_SINK@ ".. volume_level .. "%", false)
+ awesome.emit_signal("widget::volume")
+ volume_osd_widget.container.osd_layout.icon_slider_layout.label_value_layout.value:set_text(volume_level .. "%")
+
+ awesome.emit_signal(
+ "widget::volume:update",
+ volume_level
+ )
+
+ if awful.screen.focused().show_volume_osd then
+ awesome.emit_signal(
+ "module::volume_osd:show",
+ true
+ )
+ end
+
+ local icon = icondir .. "volume"
+ if volume_level < 1 then
+ icon = icon .. "-mute"
+ elseif volume_level >= 1 and volume_level < 34 then
+ icon = icon .. "-low"
+ elseif volume_level >= 34 and volume_level < 67 then
+ icon = icon .. "-medium"
+ elseif volume_level >= 67 then
+ icon = icon .. "-high"
+ end
+ volume_osd_widget.container.osd_layout.icon_slider_layout.icon_margin1.icon_margin2.icon:set_image(icon .. ".svg")
+ end
+
volume_osd_widget.container.osd_layout.icon_slider_layout.slider_layout.volume_slider:connect_signal(
"property::value",
function ()
- local volume_level = volume_osd_widget.container.osd_layout.icon_slider_layout.slider_layout.volume_slider:get_value()
-
- awful.spawn("amixer sset Master ".. volume_level .. "%", false)
- awesome.emit_signal("widget::volume")
- volume_osd_widget.container.osd_layout.label_value_layout.value:set_text(volume_level .. "%")
-
- awesome.emit_signal(
- "widget::volume:update",
- volume_level
- )
-
- if awful.screen.focused().show_volume_osd then
- awesome.emit_signal(
- "module::volume_osd:show",
- true
- )
- end
-
- local icon = icondir .. "volume"
- if volume_level < 1 then
- icon = icon .. "-mute"
- elseif volume_level >= 1 and volume_level < 34 then
- icon = icon .. "-low"
- elseif volume_level >= 34 and volume_level < 67 then
- icon = icon .. "-medium"
- elseif volume_level >= 67 then
- icon = icon .. "-high"
- end
- volume_osd_widget.container.osd_layout.icon_slider_layout.icon_margin.icon:set_image(gears.color.recolor_image(icon .. ".svg", color.color["White"]))
+ update_osd()
end
)
local update_slider = function ()
awful.spawn.easy_async_with_shell(
- [[ awk -F"[][]" '/dB/ { print $6 }' <(amixer sget Master) ]],
+ [[ pacmd list-sinks | grep "muted" ]],
function (stdout)
- if stdout:match("off") then
- volume_osd_widget.container.osd_layout.label_value_layout.value:set_text("0%")
- --volume_osd_slider.volume_slider:set_value(0)
- volume_osd_widget.container.osd_layout.icon_slider_layout.icon_margin.icon:set_image(gears.color.recolor_image(icondir .. "volume-mute" .. ".svg", color.color["White"]))
+ if stdout:match("yes") then
+ volume_osd_widget.container.osd_layout.icon_slider_layout.label_value_layout.value:set_text("0%")
+ volume_osd_widget.container.osd_layout.icon_slider_layout.icon_margin1.icon_margin2.icon:set_image(icondir .. "volume-mute" .. ".svg")
else
awful.spawn.easy_async_with_shell(
- [[ awk -F"[][]" '/dB/ { print $2 }' <(amixer sget Master) ]],
- function (stdout)
- stdout = stdout:sub(1, -3)
- volume_osd_widget.container.osd_layout.icon_slider_layout.slider_layout.volume_slider:set_value(tonumber(stdout))
+ [[ pacmd list-sinks | grep "volume: front" | awk '{print $5}' ]],
+ function (stdout2)
+ stdout2 = stdout2:sub(1, -3)
+ volume_osd_widget.container.osd_layout.icon_slider_layout.slider_layout.volume_slider:set_value(tonumber(stdout2))
+ update_osd()
end
)
end
@@ -167,12 +179,12 @@ return function (s)
local volume_container = awful.popup{
widget = wibox.container.background,
ontop = true,
- bg = color.color["Grey900"],
+ bg = color.color["Grey900"] .. "00",
stretch = false,
visible = false,
- placement = function (c) awful.placement.bottom_right(c, {margins = dpi(10)}) end,
+ placement = function (c) awful.placement.centered(c, {margins = {top = dpi(200)}}) end,
shape = function (cr, width, height)
- gears.shape.rounded_rect(cr, width, height, 5)
+ gears.shape.rounded_rect(cr, width, height, 15)
end
}
@@ -190,36 +202,36 @@ return function (s)
}
awesome.connect_signal(
- "module::volume_osd:show",
- function ()
- volume_container.visible = true
- end
- )
+ "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::enter",
+ function ()
+ volume_container.visible = true
+ hide_volume_osd:stop()
+ end
+ )
- volume_container:connect_signal(
- "mouse::leave",
- function ()
- volume_container.visible = true
+ 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
- )
-
- 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
\ No newline at end of file
diff --git a/awesome/theme/crylia/theme_variables.lua b/awesome/theme/crylia/theme_variables.lua
index e651529..b52d9e3 100644
--- a/awesome/theme/crylia/theme_variables.lua
+++ b/awesome/theme/crylia/theme_variables.lua
@@ -67,4 +67,7 @@ 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"
\ No newline at end of file
+Theme.titlebar_maximized_button_inactive = icondir .. "maximize.svg"
+
+Theme.bg_systray = colors.color["BlueGrey800"]
+Theme.systray_icon_spacing = dpi(10)
\ No newline at end of file
diff --git a/awesome/theme/crylia/Tools/IconHandler.lua b/awesome/theme/crylia/tools/icon_handler.lua
similarity index 73%
rename from awesome/theme/crylia/Tools/IconHandler.lua
rename to awesome/theme/crylia/tools/icon_handler.lua
index 83607a2..2a9ce31 100644
--- a/awesome/theme/crylia/Tools/IconHandler.lua
+++ b/awesome/theme/crylia/tools/icon_handler.lua
@@ -1,21 +1,21 @@
------------------------------
-- This is the audio widget --
------------------------------
-
-function GetIcon(theme, c)
+local naughty = require("naughty")
+function Get_icon(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 iconDir = "/usr/share/icons/" .. theme .. "/" .. res .."/apps/"
local ioStream = io.open(iconDir .. clientName, "r")
if ioStream ~= nil then
return iconDir .. clientName
else
- return c:get_icon(1)
+ return c.icon
end
end
end
- return nil
+ return c:Get_icon(1)
end
\ No newline at end of file
diff --git a/awesome/theme/crylia/widgets/audio.lua b/awesome/theme/crylia/widgets/audio.lua
index 3196eef..93100ba 100644
--- a/awesome/theme/crylia/widgets/audio.lua
+++ b/awesome/theme/crylia/widgets/audio.lua
@@ -8,7 +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")
+require("main.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/audio/"
@@ -58,7 +58,7 @@ return function ()
local get_volume = function ()
awful.spawn.easy_async_with_shell(
- [[ awk -F"[][]" '/dB/ { print $2 }' <(amixer sget Master) ]],
+ [[ pacmd list-sinks | grep "volume: front" | awk '{print $5}' ]],
function (stdout)
local icon = icondir .. "volume"
stdout = stdout:gsub("%%", "")
@@ -84,9 +84,9 @@ return function ()
local check_muted = function ()
awful.spawn.easy_async_with_shell(
- [[ awk -F"[][]" '/dB/ { print $6 }' <(amixer sget Master) ]],
+ [[ pacmd list-sinks | grep "muted" ]],
function (stdout)
- if stdout:match("off") then
+ if stdout:match("yes") then
audio_widget.container.audio_layout.label.visible = false
audio_widget.container:set_right(0)
audio_widget.container.audio_layout.icon_margin.icon_layout.icon:set_image(gears.color.recolor_image(icondir .. "volume-mute" .. ".svg", color.color["Grey900"]))
diff --git a/awesome/theme/crylia/widgets/battery.lua b/awesome/theme/crylia/widgets/battery.lua
index 6a8bc98..96789e1 100644
--- a/awesome/theme/crylia/widgets/battery.lua
+++ b/awesome/theme/crylia/widgets/battery.lua
@@ -10,7 +10,7 @@ local gears = require("gears")
local naughty = require("naughty")
local watch = awful.widget.watch
local wibox = require("wibox")
-require("Main.Signals")
+require("main.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/battery/"
diff --git a/awesome/theme/crylia/widgets/bluetooth.lua b/awesome/theme/crylia/widgets/bluetooth.lua
index 8adef0b..413fbfe 100644
--- a/awesome/theme/crylia/widgets/bluetooth.lua
+++ b/awesome/theme/crylia/widgets/bluetooth.lua
@@ -8,7 +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")
+require("main.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/bluetooth/"
@@ -86,7 +86,14 @@ return function ()
autostart = true,
call_now = true,
callback = function ()
- get_bluetooth_information()
+ awful.spawn.easy_async_with_shell(
+ "bluetoothctl list",
+ function (stdout)
+ if stdout ~= nil or stdout:gsub("\n", ""):match("") then
+ get_bluetooth_information()
+ end
+ end
+ )
end
}
diff --git a/awesome/theme/crylia/widgets/clock.lua b/awesome/theme/crylia/widgets/clock.lua
index 60f973b..8cdfe91 100644
--- a/awesome/theme/crylia/widgets/clock.lua
+++ b/awesome/theme/crylia/widgets/clock.lua
@@ -8,7 +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")
+require("main.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/clock/"
diff --git a/awesome/theme/crylia/widgets/date.lua b/awesome/theme/crylia/widgets/date.lua
index c4bdb07..7f31dce 100644
--- a/awesome/theme/crylia/widgets/date.lua
+++ b/awesome/theme/crylia/widgets/date.lua
@@ -8,7 +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")
+require("main.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/date/"
diff --git a/awesome/theme/crylia/widgets/kblayout.lua b/awesome/theme/crylia/widgets/kblayout.lua
index e91cf12..e32c7ee 100644
--- a/awesome/theme/crylia/widgets/kblayout.lua
+++ b/awesome/theme/crylia/widgets/kblayout.lua
@@ -8,7 +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")
+require("main.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/kblayout/"
@@ -54,6 +54,7 @@ return function ()
end,
widget = wibox.widget.background
}
+
local layout = "";
local get_kblayout = function ()
awful.spawn.easy_async_with_shell(
@@ -67,25 +68,271 @@ return function ()
return layout
end
- local set_kblayout = function (kblayout)
- kblayout = "de"
- if get_kblayout():gsub("\n", "") == "de" then
- kblayout = "ru"
+
+ local function create_kb_layout_item (keymap)
+ -- TODO: Add more, too lazy rn
+ local longname, shortname
+
+ local xkeyboard_country_code = {
+ {"ad", "", "AND"}, -- Andorra
+ {"af", "", "AFG"}, -- Afganistan
+ {"al", "", "ALB"}, -- Albania
+ {"am", "", "ARM"}, -- Armenia
+ {"ara", "", "ARB"}, -- Arabic
+ {"at", "", "AUT"}, -- Austria
+ {"az", "", "AZE"}, -- Azerbaijan
+ {"ba", "", "BIH"}, -- Bosnia and Herzegovina
+ {"bd", "", "BGD"}, -- Bangladesh
+ {"be", "", "BEL"}, -- Belgium
+ {"bg", "", "BGR"}, -- Bulgaria
+ {"br", "", "BRA"}, -- Brazil
+ {"bt", "", "BTN"}, -- Bhutan
+ {"bw", "", "BWA"}, -- Botswana
+ {"by", "", "BLR"}, -- Belarus
+ {"ca", "", "CAN"}, -- Canada
+ {"cd", "", "COD"}, -- Congo
+ {"ch", "", "CHE"}, -- Switzerland
+ {"cm", "", "CMR"}, -- Cameroon
+ {"cn", "", "CHN"}, -- China
+ {"cz", "", "CZE"}, -- Czechia
+ {"de", "Deutsch (Germany)", "GER"}, -- Germany
+ {"dk", "", "DNK"}, -- Denmark
+ {"ee", "", "EST"}, -- Estonia
+ {"es", "", "ESP"}, -- Spain
+ {"et", "", "ETH"}, -- Ethiopia
+ {"eu", "?", "?"}, -- EurKey
+ {"fi", "", "FIN"}, -- Finland
+ {"fo", "", "FRO"}, -- Faroe Islands
+ {"fr", "", "FRA"}, -- France
+ {"gb", "English (Bri'ish)", "ENG"}, -- United Kingdom
+ {"ge", "", "GEO"}, -- Georgia
+ {"gh", "", "GHA"}, -- Ghana
+ {"gn", "", "GIN"}, -- Guinea
+ {"gr", "", "GRC"}, -- Greece
+ {"hr", "", "HRV"}, -- Croatia
+ {"hu", "", "HUN"}, -- Hungary
+ {"ie", "", "IRL"}, -- Ireland
+ {"il", "", "ISR"}, -- Israel
+ {"in", "", "IND"}, -- India
+ {"iq", "", "IRQ"}, -- Iraq
+ {"ir", "", "IRN"}, -- Iran
+ {"is", "", "ISL"}, -- Iceland
+ {"it", "", "ITA"}, -- Italy
+ {"jp", "", "JPN"}, -- Japan
+ {"ke", "", "KEN"}, -- Kenya
+ {"kg", "", "KGZ"}, -- Kyrgyzstan
+ {"kh", "", "KHM"}, -- Cambodia
+ {"kr", "", "KOR"}, -- Korea
+ {"kz", "", "KAZ"}, -- Kazakhstan
+ {"la", "", "LAO"}, -- Laos
+ {"latam", "?", "?"}, -- Latin America
+ {"latin", "?", "?"}, -- Latin
+ {"lk", "", "LKA"}, -- Sri Lanka
+ {"lt", "", "LTU"}, -- Lithuania
+ {"lv", "", "LVA"}, -- Latvia
+ {"ma", "", "MAR"}, -- Morocco
+ {"mao", "?", "?"}, -- Maori
+ {"me", "", "MNE"}, -- Montenegro
+ {"mk", "", "MKD"}, -- Macedonia
+ {"ml", "", "MLI"}, -- Mali
+ {"mm", "", "MMR"}, -- Myanmar
+ {"mn", "", "MNG"}, -- Mongolia
+ {"mt", "", "MLT"}, -- Malta
+ {"mv", "", "MDV"}, -- Maldives
+ {"ng", "", "NGA"}, -- Nigeria
+ {"nl", "", "NLD"}, -- Netherlands
+ {"no", "", "NOR"}, -- Norway
+ {"np", "", "NRL"}, -- Nepal
+ {"ph", "", "PHL"}, -- Philippines
+ {"pk", "", "PAK"}, -- Pakistan
+ {"pl", "", "POL"}, -- Poland
+ {"pt", "", "PRT"}, -- Portugal
+ {"ro", "", "ROU"}, -- Romania
+ {"rs", "", "SRB"}, -- Serbia
+ {"ru", "Русски (Russia)", "RUS"}, -- Russia
+ {"se", "", "SWE"}, -- Sweden
+ {"si", "", "SVN"}, -- Slovenia
+ {"sk", "", "SVK"}, -- Slovakia
+ {"sn", "", "SEN"}, -- Senegal
+ {"sy", "", "SYR"}, -- Syria
+ {"th", "", "THA"}, -- Thailand
+ {"tj", "", "TJK"}, -- Tajikistan
+ {"tm", "", "TKM"}, -- Turkmenistan
+ {"tr", "", "TUR"}, -- Turkey
+ {"tw", "", "TWN"}, -- Taiwan
+ {"tz", "", "TZA"}, -- Tanzania
+ {"ua", "", "UKR"}, -- Ukraine
+ {"us", "English (United States)", "USA"}, -- USA
+ {"uz", "", "UZB"}, -- Uzbekistan
+ {"vn", "", "VNM"}, -- Vietnam
+ {"za", "", "ZAF"} -- South Africa
+ }
+
+ for i, c in ipairs(xkeyboard_country_code) do
+ if c[1] == keymap then
+ longname = c[2]
+ shortname = c[3]
+ end
end
- awful.spawn.easy_async_with_shell("setxkbmap -layout " .. kblayout)
- get_kblayout()
+
+ local kb_layout_item = wibox.widget{
+ {
+ {
+ {
+ -- Short name e.g. GER, ENG, RUS
+ {
+ {
+ text = shortname,
+ widget = wibox.widget.textbox,
+ font = "JetBrains Mono ExtraBold, 12",
+ id = "kbmapname"
+ },
+ widget = wibox.container.margin,
+ id = "margin2"
+ },
+ nil,
+ {
+ {
+ text = longname,
+ widget = wibox.widget.textbox,
+ font = "JetBrains Mono Bold, 12",
+
+ },
+ widget = wibox.container.margin
+ },
+ spacing = dpi(15),
+ layout = wibox.layout.fixed.horizontal,
+ id = "container"
+ },
+ margins = dpi(10),
+ widget = wibox.container.margin,
+ id = "margin"
+ },
+ shape = function (cr, width, height)
+ gears.shape.rounded_rect(cr, width, height, 10)
+ end,
+ bg = color.color["Grey800"],
+ fg = color.color["White"],
+ widget = wibox.container.background,
+ id = "background"
+ },
+ margins = dpi(5),
+ widget = wibox.container.margin
+ }
+ hover_signal(kb_layout_item.background, color.color["White"], color.color["Grey900"])
+ kb_layout_item:connect_signal(
+ "button::press",
+ function ()
+ awful.spawn.easy_async_with_shell(
+ "setxkbmap " .. keymap,
+ function (stdout)
+ awesome.emit_signal("kblayout::hide:kbmenu")
+ get_kblayout()
+ end
+ )
+ end
+ )
+ return kb_layout_item
end
+ local function get_kblist()
+ local kb_layout_items = {
+ layout = wibox.layout.fixed.vertical
+ }
+ for i, keymap in pairs(user_vars.vars.kblayout) do
+ kb_layout_items[i] = create_kb_layout_item(keymap)
+ end
+ return kb_layout_items
+ end
+
+ local kb_menu_widget = awful.popup{
+ shape = function (cr, width, height)
+ gears.shape.rounded_rect(cr, width, height, 5)
+ end,
+ widget = wibox.container.background,
+ bg = color.color["Grey900"],
+ fg = color.color["White"],
+ width = dpi(100),
+ max_height = dpi(600),
+ visible = false,
+ ontop = true,
+ placement = function (c) awful.placement.align(c, {position = "top_right", margins = {right = dpi(255), top = dpi(60)}}) end
+ }
+
+ kb_menu_widget:setup(
+ get_kblist()
+ )
+
+ local function toggle_kb_layout()
+ awful.spawn.easy_async_with_shell(
+ "setxkbmap -query | grep layout: | awk '{print $2}'",
+ function (stdout)
+ for j, n in ipairs(user_vars.vars.kblayout) do
+ if stdout:match(n) then
+ if j == #user_vars.vars.kblayout then
+ awful.spawn.easy_async_with_shell(
+ "setxkbmap " .. user_vars.vars.kblayout[1],
+ function ()
+ get_kblayout()
+ end
+ )
+ else
+ awful.spawn.easy_async_with_shell(
+ "setxkbmap " .. user_vars.vars.kblayout[j + 1],
+ function ()
+ get_kblayout()
+ end
+ )
+ end
+ end
+ end
+ end
+ )
+ end
+
+ awesome.connect_signal(
+ "kblayout::toggle",
+ function ()
+ toggle_kb_layout()
+ end
+ )
+
+ --kb_menu_widget:move_next_to(mouse.current_widget_geometry)
-- Signals
hover_signal(kblayout_widget, color.color["Green200"])
+ local kblayout_keygrabber = awful.keygrabber{
+ autostart = false,
+ stop_event = 'release',
+ keypressed_callback = function (self, mod, key, command)
+ if key == 'Escape' then
+ awesome.emit_signal("kblayout::hide:kbmenu")
+ end
+ end
+ }
+
kblayout_widget:connect_signal(
"button::press",
function ()
- set_kblayout()
+ if kb_menu_widget.visible then
+ kb_menu_widget.visible = false
+ kblayout_keygrabber:stop()
+ else
+ kb_menu_widget.visible = true
+ kblayout_keygrabber:start()
+ end
+ end
+ )
+
+ awesome.connect_signal(
+ "kblayout::hide:kbmenu",
+ function ()
+ kb_menu_widget.visible = false
+ kblayout_keygrabber:stop()
end
)
get_kblayout()
+ kb_menu_widget.visible = false
return kblayout_widget
end
\ No newline at end of file
diff --git a/awesome/theme/crylia/widgets/layout_list.lua b/awesome/theme/crylia/widgets/layout_list.lua
index 7858d84..47f5d89 100644
--- a/awesome/theme/crylia/widgets/layout_list.lua
+++ b/awesome/theme/crylia/widgets/layout_list.lua
@@ -8,7 +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")
+require("main.signals")
-- Returns the layoutbox widget
return function ()
diff --git a/awesome/theme/crylia/widgets/network.lua b/awesome/theme/crylia/widgets/network.lua
index 129a341..3473d2e 100644
--- a/awesome/theme/crylia/widgets/network.lua
+++ b/awesome/theme/crylia/widgets/network.lua
@@ -9,7 +9,7 @@ local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local naughty = require("naughty")
local wibox = require("wibox")
-require("Main.Signals")
+require("main.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/network/"
@@ -180,7 +180,7 @@ return function ()
wifi_strength = tonumber(stdout)
network_widget.container.network_layout.spacing = dpi(8)
network_widget.container.network_layout.label.visible = true
- network_widget.container.network_layout.label:set_text(tostring(wifi_strength))
+ network_widget.container.network_layout.label:set_text(tostring(wifi_strength .. "%"))
local wifi_strength_rounded = math.floor(wifi_strength / 25 + 0.5)
update_wireless_icon(wifi_strength_rounded)
end
diff --git a/awesome/theme/crylia/widgets/power.lua b/awesome/theme/crylia/widgets/power.lua
index aa86c6c..91f9d62 100644
--- a/awesome/theme/crylia/widgets/power.lua
+++ b/awesome/theme/crylia/widgets/power.lua
@@ -9,7 +9,7 @@ local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local naughty = require("naughty")
local wibox = require("wibox")
-require("Main.Signals")
+require("main.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/power/"
diff --git a/awesome/theme/crylia/widgets/systray.lua b/awesome/theme/crylia/widgets/systray.lua
new file mode 100644
index 0000000..f7e2fe2
--- /dev/null
+++ b/awesome/theme/crylia/widgets/systray.lua
@@ -0,0 +1,40 @@
+--------------------------------
+-- This is the power widget --
+--------------------------------
+
+-- Awesome Libs
+local awful = require("awful")
+local color = require("theme.crylia.colors")
+local dpi = require("beautiful").xresources.apply_dpi
+local gears = require("gears")
+local wibox = require("wibox")
+require("main.signals")
+
+
+return function (s)
+
+ local systray = wibox.widget{
+ {
+ {
+ wibox.widget.systray,
+ top = dpi(6),
+ bottom = dpi(6),
+ left = dpi(6),
+ right = dpi(6),
+ widget = wibox.container.margin
+ },
+ width = dpi(100),
+ strategy = "exact",
+ layout = wibox.container.constraint,
+ },
+ widget = wibox.container.background,
+ shape = function (cr, width, height)
+ gears.shape.rounded_rect(cr, width, height, 5)
+ end,
+ bg = color.color["BlueGrey800"]
+ }
+ -- Signals
+ --hover_signal(systray, color.color["Red200"])
+
+ return systray
+end
\ No newline at end of file
diff --git a/awesome/theme/crylia/widgets/taglist.lua b/awesome/theme/crylia/widgets/taglist.lua
index d3ad895..51c37c2 100644
--- a/awesome/theme/crylia/widgets/taglist.lua
+++ b/awesome/theme/crylia/widgets/taglist.lua
@@ -3,8 +3,7 @@ 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")
-require("theme.crylia.Tools.IconHandler")
+require("theme.crylia.tools.icon_handler")
local list_update = function (widget, buttons, label, data, objects)
widget:reset()
@@ -52,7 +51,6 @@ local list_update = function (widget, buttons, label, data, objects)
{
id = "container",
tag_label_margin,
- --tag_icon_margin,
layout = wibox.layout.fixed.horizontal
},
margins = dpi(0),
@@ -114,12 +112,12 @@ local list_update = function (widget, buttons, label, data, objects)
},
widget = wibox.container.place
},
- tag_icon,
+ tag_icon_margin,
forced_width = dpi(33),
margins = dpi(6),
widget = wibox.container.margin
}
- icon.icon_container.icon:set_image(GetIcon("Papirus", client))
+ icon.icon_container.icon:set_image(Get_icon("Papirus-Dark", client))
tag_widget.widget_margin.container:setup({
icon,
layout = wibox.layout.align.horizontal
diff --git a/awesome/theme/crylia/widgets/tasklist.lua b/awesome/theme/crylia/widgets/tasklist.lua
index 630c492..26cb249 100644
--- a/awesome/theme/crylia/widgets/tasklist.lua
+++ b/awesome/theme/crylia/widgets/tasklist.lua
@@ -109,9 +109,7 @@ local list_update = function (widget, buttons, label, data, objects)
task_widget:set_bg("#3A475C")
task_title:set_text('')
end
-
- task_icon.icon:set_image(GetIcon("Papirus", object))
-
+ task_icon.icon:set_image(Get_icon("Papirus-Dark", object))
widget:add(task_widget)
widget:set_spacing(dpi(6))