diff --git a/.gitmodules b/.gitmodules
index 99fda9b..2bbf97a 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -10,6 +10,6 @@
[submodule "awesome/src/lib/nice"]
path = awesome/src/lib/nice
url = https://github.com/Crylia/awesome-wm-nice
-[submodule "awesome/src/lib/lua-dbus_proxy"]
- path = awesome/src/lib/lua-dbus_proxy
- url = https://github.com/Crylia/lua-dbus_proxy
+[submodule "awesome/src/lib/dbus_proxy"]
+ path = awesome/src/lib/dbus_proxy
+ url = git@github.com:Crylia/lua-dbus_proxy.git
diff --git a/awesome/awful/widget/inputbox.lua b/awesome/awful/widget/inputbox.lua
index e371d6e..103e59d 100644
--- a/awesome/awful/widget/inputbox.lua
+++ b/awesome/awful/widget/inputbox.lua
@@ -432,6 +432,8 @@ function inputbox.new(args)
--gtable.crush(w, args)
gtable.crush(w, inputbox, true)
+ w.font = args.font or beautiful.font
+
w.keybindings = args.keybindings or {}
w.hint_text = args.hint_text
diff --git a/awesome/rc.lua b/awesome/rc.lua
index 2762f45..5256619 100644
--- a/awesome/rc.lua
+++ b/awesome/rc.lua
@@ -20,11 +20,11 @@ tag = tag
-- Do not touch as this is used to share some variable settings files
Global_config = {}
+require("src.core.error_handling")
require("src.theme.user_config")
require("src.theme.theme_config")
require("src.tools.gio_icon_lookup")
require("src.theme.init")
-require("src.core.error_handling")
require("src.tools.hex_to_rgba")
require("src.core.signals")
require("src.core.notifications")
@@ -32,4 +32,6 @@ require("src.core.rules")
require("src.bindings.global_buttons")
require("src.bindings.bind_to_tags")
require("src.modules.init")
---require("src.tools.auto_starter")(User_config.autostart)
+require("src.tools.auto_starter")(User_config.autostart)
+
+--require("src.config.setup")()
diff --git a/awesome/src/assets/fonts/Comfortaa/Comfortaa-VariableFont_wght.ttf b/awesome/src/assets/fonts/Comfortaa/Comfortaa-VariableFont_wght.ttf
new file mode 100644
index 0000000..c1135a8
Binary files /dev/null and b/awesome/src/assets/fonts/Comfortaa/Comfortaa-VariableFont_wght.ttf differ
diff --git a/awesome/src/assets/fonts/Comfortaa/OFL.txt b/awesome/src/assets/fonts/Comfortaa/OFL.txt
new file mode 100644
index 0000000..daa25d0
--- /dev/null
+++ b/awesome/src/assets/fonts/Comfortaa/OFL.txt
@@ -0,0 +1,93 @@
+Copyright 2011 The Comfortaa Project Authors (https://github.com/alexeiva/comfortaa), with Reserved Font Name "Comfortaa".
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/awesome/src/assets/fonts/Comfortaa/README.txt b/awesome/src/assets/fonts/Comfortaa/README.txt
new file mode 100644
index 0000000..1d01eab
--- /dev/null
+++ b/awesome/src/assets/fonts/Comfortaa/README.txt
@@ -0,0 +1,67 @@
+Comfortaa Variable Font
+=======================
+
+This download contains Comfortaa as both a variable font and static fonts.
+
+Comfortaa is a variable font with this axis:
+ wght
+
+This means all the styles are contained in a single file:
+ Comfortaa-VariableFont_wght.ttf
+
+If your app fully supports variable fonts, you can now pick intermediate styles
+that aren’t available as static fonts. Not all apps support variable fonts, and
+in those cases you can use the static font files for Comfortaa:
+ static/Comfortaa-Light.ttf
+ static/Comfortaa-Regular.ttf
+ static/Comfortaa-Medium.ttf
+ static/Comfortaa-SemiBold.ttf
+ static/Comfortaa-Bold.ttf
+
+Get started
+-----------
+
+1. Install the font files you want to use
+
+2. Use your app's font picker to view the font family and all the
+available styles
+
+Learn more about variable fonts
+-------------------------------
+
+ https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts
+ https://variablefonts.typenetwork.com
+ https://medium.com/variable-fonts
+
+In desktop apps
+
+ https://theblog.adobe.com/can-variable-fonts-illustrator-cc
+ https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts
+
+Online
+
+ https://developers.google.com/fonts/docs/getting_started
+ https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide
+ https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts
+
+Installing fonts
+
+ MacOS: https://support.apple.com/en-us/HT201749
+ Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux
+ Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows
+
+Android Apps
+
+ https://developers.google.com/fonts/docs/android
+ https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts
+
+License
+-------
+Please read the full license text (OFL.txt) to understand the permissions,
+restrictions and requirements for usage, redistribution, and modification.
+
+You can use them in your products & projects – print or digital,
+commercial or otherwise.
+
+This isn't legal advice, please consider consulting a lawyer and see the full
+license for all details.
diff --git a/awesome/src/assets/fonts/Comfortaa/static/Comfortaa-Bold.ttf b/awesome/src/assets/fonts/Comfortaa/static/Comfortaa-Bold.ttf
new file mode 100644
index 0000000..28ca423
Binary files /dev/null and b/awesome/src/assets/fonts/Comfortaa/static/Comfortaa-Bold.ttf differ
diff --git a/awesome/src/assets/fonts/Comfortaa/static/Comfortaa-Light.ttf b/awesome/src/assets/fonts/Comfortaa/static/Comfortaa-Light.ttf
new file mode 100644
index 0000000..1804ca8
Binary files /dev/null and b/awesome/src/assets/fonts/Comfortaa/static/Comfortaa-Light.ttf differ
diff --git a/awesome/src/assets/fonts/Comfortaa/static/Comfortaa-Medium.ttf b/awesome/src/assets/fonts/Comfortaa/static/Comfortaa-Medium.ttf
new file mode 100644
index 0000000..487247f
Binary files /dev/null and b/awesome/src/assets/fonts/Comfortaa/static/Comfortaa-Medium.ttf differ
diff --git a/awesome/src/assets/fonts/Comfortaa/static/Comfortaa-Regular.ttf b/awesome/src/assets/fonts/Comfortaa/static/Comfortaa-Regular.ttf
new file mode 100644
index 0000000..6023bde
Binary files /dev/null and b/awesome/src/assets/fonts/Comfortaa/static/Comfortaa-Regular.ttf differ
diff --git a/awesome/src/assets/fonts/Comfortaa/static/Comfortaa-SemiBold.ttf b/awesome/src/assets/fonts/Comfortaa/static/Comfortaa-SemiBold.ttf
new file mode 100644
index 0000000..0e76940
Binary files /dev/null and b/awesome/src/assets/fonts/Comfortaa/static/Comfortaa-SemiBold.ttf differ
diff --git a/awesome/src/assets/fonts/Raleway/OFL.txt b/awesome/src/assets/fonts/Raleway/OFL.txt
new file mode 100644
index 0000000..a6b73db
--- /dev/null
+++ b/awesome/src/assets/fonts/Raleway/OFL.txt
@@ -0,0 +1,93 @@
+Copyright 2010 The Raleway Project Authors (impallari@gmail.com), with Reserved Font Name "Raleway".
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/awesome/src/assets/fonts/Raleway/README.txt b/awesome/src/assets/fonts/Raleway/README.txt
new file mode 100644
index 0000000..91c5afa
--- /dev/null
+++ b/awesome/src/assets/fonts/Raleway/README.txt
@@ -0,0 +1,81 @@
+Raleway Variable Font
+=====================
+
+This download contains Raleway as both variable fonts and static fonts.
+
+Raleway is a variable font with this axis:
+ wght
+
+This means all the styles are contained in these files:
+ Raleway-VariableFont_wght.ttf
+ Raleway-Italic-VariableFont_wght.ttf
+
+If your app fully supports variable fonts, you can now pick intermediate styles
+that aren’t available as static fonts. Not all apps support variable fonts, and
+in those cases you can use the static font files for Raleway:
+ static/Raleway-Thin.ttf
+ static/Raleway-ExtraLight.ttf
+ static/Raleway-Light.ttf
+ static/Raleway-Regular.ttf
+ static/Raleway-Medium.ttf
+ static/Raleway-SemiBold.ttf
+ static/Raleway-Bold.ttf
+ static/Raleway-ExtraBold.ttf
+ static/Raleway-Black.ttf
+ static/Raleway-ThinItalic.ttf
+ static/Raleway-ExtraLightItalic.ttf
+ static/Raleway-LightItalic.ttf
+ static/Raleway-Italic.ttf
+ static/Raleway-MediumItalic.ttf
+ static/Raleway-SemiBoldItalic.ttf
+ static/Raleway-BoldItalic.ttf
+ static/Raleway-ExtraBoldItalic.ttf
+ static/Raleway-BlackItalic.ttf
+
+Get started
+-----------
+
+1. Install the font files you want to use
+
+2. Use your app's font picker to view the font family and all the
+available styles
+
+Learn more about variable fonts
+-------------------------------
+
+ https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts
+ https://variablefonts.typenetwork.com
+ https://medium.com/variable-fonts
+
+In desktop apps
+
+ https://theblog.adobe.com/can-variable-fonts-illustrator-cc
+ https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts
+
+Online
+
+ https://developers.google.com/fonts/docs/getting_started
+ https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide
+ https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts
+
+Installing fonts
+
+ MacOS: https://support.apple.com/en-us/HT201749
+ Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux
+ Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows
+
+Android Apps
+
+ https://developers.google.com/fonts/docs/android
+ https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts
+
+License
+-------
+Please read the full license text (OFL.txt) to understand the permissions,
+restrictions and requirements for usage, redistribution, and modification.
+
+You can use them in your products & projects – print or digital,
+commercial or otherwise.
+
+This isn't legal advice, please consider consulting a lawyer and see the full
+license for all details.
diff --git a/awesome/src/assets/fonts/Raleway/Raleway-Italic-VariableFont_wght.ttf b/awesome/src/assets/fonts/Raleway/Raleway-Italic-VariableFont_wght.ttf
new file mode 100644
index 0000000..7801e66
Binary files /dev/null and b/awesome/src/assets/fonts/Raleway/Raleway-Italic-VariableFont_wght.ttf differ
diff --git a/awesome/src/assets/fonts/Raleway/Raleway-VariableFont_wght.ttf b/awesome/src/assets/fonts/Raleway/Raleway-VariableFont_wght.ttf
new file mode 100644
index 0000000..424fb0e
Binary files /dev/null and b/awesome/src/assets/fonts/Raleway/Raleway-VariableFont_wght.ttf differ
diff --git a/awesome/src/assets/fonts/Raleway/static/Raleway-Black.ttf b/awesome/src/assets/fonts/Raleway/static/Raleway-Black.ttf
new file mode 100644
index 0000000..c926d1d
Binary files /dev/null and b/awesome/src/assets/fonts/Raleway/static/Raleway-Black.ttf differ
diff --git a/awesome/src/assets/fonts/Raleway/static/Raleway-BlackItalic.ttf b/awesome/src/assets/fonts/Raleway/static/Raleway-BlackItalic.ttf
new file mode 100644
index 0000000..fac6b30
Binary files /dev/null and b/awesome/src/assets/fonts/Raleway/static/Raleway-BlackItalic.ttf differ
diff --git a/awesome/src/assets/fonts/Raleway/static/Raleway-Bold.ttf b/awesome/src/assets/fonts/Raleway/static/Raleway-Bold.ttf
new file mode 100644
index 0000000..ea2ac6b
Binary files /dev/null and b/awesome/src/assets/fonts/Raleway/static/Raleway-Bold.ttf differ
diff --git a/awesome/src/assets/fonts/Raleway/static/Raleway-BoldItalic.ttf b/awesome/src/assets/fonts/Raleway/static/Raleway-BoldItalic.ttf
new file mode 100644
index 0000000..d39dc38
Binary files /dev/null and b/awesome/src/assets/fonts/Raleway/static/Raleway-BoldItalic.ttf differ
diff --git a/awesome/src/assets/fonts/Raleway/static/Raleway-ExtraBold.ttf b/awesome/src/assets/fonts/Raleway/static/Raleway-ExtraBold.ttf
new file mode 100644
index 0000000..77466aa
Binary files /dev/null and b/awesome/src/assets/fonts/Raleway/static/Raleway-ExtraBold.ttf differ
diff --git a/awesome/src/assets/fonts/Raleway/static/Raleway-ExtraBoldItalic.ttf b/awesome/src/assets/fonts/Raleway/static/Raleway-ExtraBoldItalic.ttf
new file mode 100644
index 0000000..2dd9af9
Binary files /dev/null and b/awesome/src/assets/fonts/Raleway/static/Raleway-ExtraBoldItalic.ttf differ
diff --git a/awesome/src/assets/fonts/Raleway/static/Raleway-ExtraLight.ttf b/awesome/src/assets/fonts/Raleway/static/Raleway-ExtraLight.ttf
new file mode 100644
index 0000000..b2386bc
Binary files /dev/null and b/awesome/src/assets/fonts/Raleway/static/Raleway-ExtraLight.ttf differ
diff --git a/awesome/src/assets/fonts/Raleway/static/Raleway-ExtraLightItalic.ttf b/awesome/src/assets/fonts/Raleway/static/Raleway-ExtraLightItalic.ttf
new file mode 100644
index 0000000..c7e8042
Binary files /dev/null and b/awesome/src/assets/fonts/Raleway/static/Raleway-ExtraLightItalic.ttf differ
diff --git a/awesome/src/assets/fonts/Raleway/static/Raleway-Italic.ttf b/awesome/src/assets/fonts/Raleway/static/Raleway-Italic.ttf
new file mode 100644
index 0000000..faad883
Binary files /dev/null and b/awesome/src/assets/fonts/Raleway/static/Raleway-Italic.ttf differ
diff --git a/awesome/src/assets/fonts/Raleway/static/Raleway-Light.ttf b/awesome/src/assets/fonts/Raleway/static/Raleway-Light.ttf
new file mode 100644
index 0000000..ced4beb
Binary files /dev/null and b/awesome/src/assets/fonts/Raleway/static/Raleway-Light.ttf differ
diff --git a/awesome/src/assets/fonts/Raleway/static/Raleway-LightItalic.ttf b/awesome/src/assets/fonts/Raleway/static/Raleway-LightItalic.ttf
new file mode 100644
index 0000000..2f18372
Binary files /dev/null and b/awesome/src/assets/fonts/Raleway/static/Raleway-LightItalic.ttf differ
diff --git a/awesome/src/assets/fonts/Raleway/static/Raleway-Medium.ttf b/awesome/src/assets/fonts/Raleway/static/Raleway-Medium.ttf
new file mode 100644
index 0000000..4fcca74
Binary files /dev/null and b/awesome/src/assets/fonts/Raleway/static/Raleway-Medium.ttf differ
diff --git a/awesome/src/assets/fonts/Raleway/static/Raleway-MediumItalic.ttf b/awesome/src/assets/fonts/Raleway/static/Raleway-MediumItalic.ttf
new file mode 100644
index 0000000..a0f2d71
Binary files /dev/null and b/awesome/src/assets/fonts/Raleway/static/Raleway-MediumItalic.ttf differ
diff --git a/awesome/src/assets/fonts/Raleway/static/Raleway-Regular.ttf b/awesome/src/assets/fonts/Raleway/static/Raleway-Regular.ttf
new file mode 100644
index 0000000..5e7242b
Binary files /dev/null and b/awesome/src/assets/fonts/Raleway/static/Raleway-Regular.ttf differ
diff --git a/awesome/src/assets/fonts/Raleway/static/Raleway-SemiBold.ttf b/awesome/src/assets/fonts/Raleway/static/Raleway-SemiBold.ttf
new file mode 100644
index 0000000..78f4321
Binary files /dev/null and b/awesome/src/assets/fonts/Raleway/static/Raleway-SemiBold.ttf differ
diff --git a/awesome/src/assets/fonts/Raleway/static/Raleway-SemiBoldItalic.ttf b/awesome/src/assets/fonts/Raleway/static/Raleway-SemiBoldItalic.ttf
new file mode 100644
index 0000000..a2a52d1
Binary files /dev/null and b/awesome/src/assets/fonts/Raleway/static/Raleway-SemiBoldItalic.ttf differ
diff --git a/awesome/src/assets/fonts/Raleway/static/Raleway-Thin.ttf b/awesome/src/assets/fonts/Raleway/static/Raleway-Thin.ttf
new file mode 100644
index 0000000..5ae0035
Binary files /dev/null and b/awesome/src/assets/fonts/Raleway/static/Raleway-Thin.ttf differ
diff --git a/awesome/src/assets/fonts/Raleway/static/Raleway-ThinItalic.ttf b/awesome/src/assets/fonts/Raleway/static/Raleway-ThinItalic.ttf
new file mode 100644
index 0000000..ddab8a3
Binary files /dev/null and b/awesome/src/assets/fonts/Raleway/static/Raleway-ThinItalic.ttf differ
diff --git a/awesome/src/assets/icons/ArchLogo.png b/awesome/src/assets/icons/ArchLogo.png
deleted file mode 100644
index 143dc53..0000000
Binary files a/awesome/src/assets/icons/ArchLogo.png and /dev/null differ
diff --git a/awesome/src/assets/icons/setup/choose.svg b/awesome/src/assets/icons/setup/choose.svg
new file mode 100644
index 0000000..ded896a
--- /dev/null
+++ b/awesome/src/assets/icons/setup/choose.svg
@@ -0,0 +1,3 @@
+
diff --git a/awesome/src/assets/icons/setup/close.svg b/awesome/src/assets/icons/setup/close.svg
new file mode 100644
index 0000000..2141a72
--- /dev/null
+++ b/awesome/src/assets/icons/setup/close.svg
@@ -0,0 +1,4 @@
+
diff --git a/awesome/src/assets/icons/setup/left.svg b/awesome/src/assets/icons/setup/left.svg
new file mode 100644
index 0000000..f95c0dd
--- /dev/null
+++ b/awesome/src/assets/icons/setup/left.svg
@@ -0,0 +1,3 @@
+
diff --git a/awesome/src/assets/icons/setup/openweathermap.png b/awesome/src/assets/icons/setup/openweathermap.png
new file mode 100644
index 0000000..8b51943
Binary files /dev/null and b/awesome/src/assets/icons/setup/openweathermap.png differ
diff --git a/awesome/src/assets/icons/setup/right.svg b/awesome/src/assets/icons/setup/right.svg
new file mode 100644
index 0000000..3e42b5f
--- /dev/null
+++ b/awesome/src/assets/icons/setup/right.svg
@@ -0,0 +1,3 @@
+
diff --git a/awesome/src/assets/icons/setup/status_bars.png b/awesome/src/assets/icons/setup/status_bars.png
new file mode 100644
index 0000000..f73a8f7
Binary files /dev/null and b/awesome/src/assets/icons/setup/status_bars.png differ
diff --git a/awesome/src/assets/icons/setup/title_center.png b/awesome/src/assets/icons/setup/title_center.png
new file mode 100644
index 0000000..3d7b314
Binary files /dev/null and b/awesome/src/assets/icons/setup/title_center.png differ
diff --git a/awesome/src/assets/icons/setup/title_left.png b/awesome/src/assets/icons/setup/title_left.png
new file mode 100644
index 0000000..7d186e2
Binary files /dev/null and b/awesome/src/assets/icons/setup/title_left.png differ
diff --git a/awesome/src/assets/icons/setup/title_right.png b/awesome/src/assets/icons/setup/title_right.png
new file mode 100644
index 0000000..f1e3bc4
Binary files /dev/null and b/awesome/src/assets/icons/setup/title_right.png differ
diff --git a/awesome/src/assets/icons/setup/titlebar.png b/awesome/src/assets/icons/setup/titlebar.png
new file mode 100644
index 0000000..ef68892
Binary files /dev/null and b/awesome/src/assets/icons/setup/titlebar.png differ
diff --git a/awesome/src/assets/icons/setup/titlebar_alt.png b/awesome/src/assets/icons/setup/titlebar_alt.png
new file mode 100644
index 0000000..fe0ae77
Binary files /dev/null and b/awesome/src/assets/icons/setup/titlebar_alt.png differ
diff --git a/awesome/src/assets/layout/cornerne.png b/awesome/src/assets/layout/cornerne.png
new file mode 100644
index 0000000..c85bd56
Binary files /dev/null and b/awesome/src/assets/layout/cornerne.png differ
diff --git a/awesome/src/assets/layout/cornernw.png b/awesome/src/assets/layout/cornernw.png
new file mode 100644
index 0000000..dfe78b3
Binary files /dev/null and b/awesome/src/assets/layout/cornernw.png differ
diff --git a/awesome/src/assets/layout/cornerse.png b/awesome/src/assets/layout/cornerse.png
new file mode 100644
index 0000000..023ae79
Binary files /dev/null and b/awesome/src/assets/layout/cornerse.png differ
diff --git a/awesome/src/assets/layout/cornersw.png b/awesome/src/assets/layout/cornersw.png
new file mode 100644
index 0000000..c1453c9
Binary files /dev/null and b/awesome/src/assets/layout/cornersw.png differ
diff --git a/awesome/src/assets/layout/dwindle.png b/awesome/src/assets/layout/dwindle.png
new file mode 100644
index 0000000..9902d22
Binary files /dev/null and b/awesome/src/assets/layout/dwindle.png differ
diff --git a/awesome/src/assets/layout/fairh.png b/awesome/src/assets/layout/fairh.png
new file mode 100644
index 0000000..d41deea
Binary files /dev/null and b/awesome/src/assets/layout/fairh.png differ
diff --git a/awesome/src/assets/layout/fairv.png b/awesome/src/assets/layout/fairv.png
new file mode 100644
index 0000000..f5f0288
Binary files /dev/null and b/awesome/src/assets/layout/fairv.png differ
diff --git a/awesome/src/assets/layout/floating.png b/awesome/src/assets/layout/floating.png
new file mode 100644
index 0000000..b8061a0
Binary files /dev/null and b/awesome/src/assets/layout/floating.png differ
diff --git a/awesome/src/assets/layout/fullscreen.png b/awesome/src/assets/layout/fullscreen.png
new file mode 100644
index 0000000..d02f6fc
Binary files /dev/null and b/awesome/src/assets/layout/fullscreen.png differ
diff --git a/awesome/src/assets/layout/magnifier.png b/awesome/src/assets/layout/magnifier.png
new file mode 100644
index 0000000..2925414
Binary files /dev/null and b/awesome/src/assets/layout/magnifier.png differ
diff --git a/awesome/src/assets/layout/max.png b/awesome/src/assets/layout/max.png
new file mode 100644
index 0000000..8d20844
Binary files /dev/null and b/awesome/src/assets/layout/max.png differ
diff --git a/awesome/src/assets/layout/spiral.png b/awesome/src/assets/layout/spiral.png
new file mode 100644
index 0000000..d9434be
Binary files /dev/null and b/awesome/src/assets/layout/spiral.png differ
diff --git a/awesome/src/assets/layout/tile.png b/awesome/src/assets/layout/tile.png
new file mode 100644
index 0000000..3ede21e
Binary files /dev/null and b/awesome/src/assets/layout/tile.png differ
diff --git a/awesome/src/assets/layout/tilebottom.png b/awesome/src/assets/layout/tilebottom.png
new file mode 100644
index 0000000..6f8c257
Binary files /dev/null and b/awesome/src/assets/layout/tilebottom.png differ
diff --git a/awesome/src/assets/layout/tileleft.png b/awesome/src/assets/layout/tileleft.png
new file mode 100644
index 0000000..31d6870
Binary files /dev/null and b/awesome/src/assets/layout/tileleft.png differ
diff --git a/awesome/src/assets/layout/tiletop.png b/awesome/src/assets/layout/tiletop.png
new file mode 100644
index 0000000..f3a1e9d
Binary files /dev/null and b/awesome/src/assets/layout/tiletop.png differ
diff --git a/awesome/src/assets/userpfp/crylia.png b/awesome/src/assets/userpfp/crylia.png
index c77ac60..cc2d872 100644
Binary files a/awesome/src/assets/userpfp/crylia.png and b/awesome/src/assets/userpfp/crylia.png differ
diff --git a/awesome/src/bindings/global_keys.lua b/awesome/src/bindings/global_keys.lua
index 8fde800..46e7a63 100644
--- a/awesome/src/bindings/global_keys.lua
+++ b/awesome/src/bindings/global_keys.lua
@@ -7,9 +7,6 @@ local ruled = require("ruled")
-- Third party libs
local json = require("src.lib.json-lua.json-lua")
--- Own libs
-local backlight_helper = require("src.tools.helpers.backlight")
-
local capi = {
awesome = awesome,
mousegrabber = mousegrabber,
diff --git a/awesome/src/core/notifications.lua b/awesome/src/core/notifications.lua
index bf07861..77c1606 100644
--- a/awesome/src/core/notifications.lua
+++ b/awesome/src/core/notifications.lua
@@ -8,7 +8,6 @@ local gears = require("gears")
local menubar = require('menubar')
local naughty = require("naughty")
local wibox = require("wibox")
-local wtemplate = require("wibox.template")
local rubato = require("src.lib.rubato")
@@ -32,153 +31,149 @@ naughty.config.defaults.spacing = Theme_config.notification.spacing
Theme.notification_spacing = Theme_config.notification.corner_spacing
-naughty.connect_signal(
- 'request::icon',
- function(n, context, hints)
- if context ~= 'app_icon' then
- return
- end
- local path = menubar.utils.lookup_icon(hints.app_icon) or menubar.utils.lookup_icon(hints.app_icon:lower())
- if path then
- n.icon = path
- end
+naughty.connect_signal('request::icon', function(n, context, hints)
+ if context ~= 'app_icon' then
+ return
end
-)
+ local path = menubar.utils.lookup_icon(hints.app_icon) or menubar.utils.lookup_icon(hints.app_icon:lower())
+ if path then
+ n.icon = path
+ end
+end)
-naughty.connect_signal(
- "request::display",
- function(n)
- if User_config.dnd then
- n:destroy()
+naughty.connect_signal("request::display", function(n)
+ if User_config.dnd then
+ n:destroy()
+ else
+ if n.urgency == "critical" then
+ n.title = string.format("%s",
+ Theme_config.notification.fg_urgent_title, n.title) or ""
+ n.message = string.format("%s", Theme_config.notification.fg_urgent_message,
+ n.message) or ""
+ n.app_name = string.format("%s", Theme_config.notification.fg_urgent_app_name,
+ n.app_name) or ""
+ n.bg = Theme_config.notification.bg_urgent
else
- if n.urgency == "critical" then
- n.title = string.format("%s",
- Theme_config.notification.fg_urgent_title, n.title) or ""
- n.message = string.format("%s", Theme_config.notification.fg_urgent_message,
- n.message) or ""
- n.app_name = string.format("%s", Theme_config.notification.fg_urgent_app_name,
- n.app_name) or ""
- n.bg = Theme_config.notification.bg_urgent
- else
- n.title = string.format("%s",
- Theme_config.notification.fg_normal_title, n.title) or ""
- n.message = string.format("%s", Theme_config.notification.fg_normal_message,
- n.message) or ""
- n.bg = Theme_config.notification.bg_normal
- n.timeout = n.timeout or Theme_config.notification.timeout or 3
- end
+ n.title = string.format("%s",
+ Theme_config.notification.fg_normal_title, n.title) or ""
+ n.message = string.format("%s", Theme_config.notification.fg_normal_message,
+ n.message) or ""
+ n.bg = Theme_config.notification.bg_normal
+ n.timeout = n.timeout or Theme_config.notification.timeout or 3
+ end
- local use_image = false
+ local use_image = false
- if n.app_name == "Spotify" then
- n.actions = {
- naughty.action {
- program = "Spotify",
- id = "skip-prev",
- icon = gears.color.recolor_image(icondir .. "skip-prev.svg",
- Theme_config.notification.spotify_button_icon_color)
- }, naughty.action {
- program = "Spotify",
- id = "play-pause",
- icon = gears.color.recolor_image(icondir .. "play-pause.svg",
- Theme_config.notification.spotify_button_icon_color)
- }, naughty.action {
- program = "Spotify",
- id = "skip-next",
- icon = gears.color.recolor_image(icondir .. "skip-next.svg",
- Theme_config.notification.spotify_button_icon_color)
- }
+ if n.app_name == "Spotify" then
+ n.actions = {
+ naughty.action {
+ program = "Spotify",
+ id = "skip-prev",
+ icon = gears.color.recolor_image(icondir .. "skip-prev.svg",
+ Theme_config.notification.spotify_button_icon_color)
+ }, naughty.action {
+ program = "Spotify",
+ id = "play-pause",
+ icon = gears.color.recolor_image(icondir .. "play-pause.svg",
+ Theme_config.notification.spotify_button_icon_color)
+ }, naughty.action {
+ program = "Spotify",
+ id = "skip-next",
+ icon = gears.color.recolor_image(icondir .. "skip-next.svg",
+ Theme_config.notification.spotify_button_icon_color)
}
- use_image = true
- end
+ }
+ use_image = true
+ end
- local action_template_widget
+ local action_template_widget
- if use_image then
- action_template_widget = wibox.template {
+ if use_image then
+ action_template_widget = wibox.template {
+ {
{
{
{
- {
- id = "icon_role",
- valign = "center",
- halign = "center",
- widget = wibox.widget.imagebox
- },
- id = "centered",
+ id = "icon_role",
valign = "center",
halign = "center",
- widget = wibox.container.place
+ widget = wibox.widget.imagebox
},
- margins = dpi(5),
- widget = wibox.container.margin
+ id = "centered",
+ valign = "center",
+ halign = "center",
+ widget = wibox.container.place
},
- forced_height = dpi(35),
- forced_width = dpi(35),
- bg = Theme_config.notification.action_bg,
- shape = function(cr, width, height)
- gears.shape.rounded_rect(cr, width, height, dpi(6))
- end,
- widget = wibox.container.background,
- id = "bgrnd"
+ margins = dpi(5),
+ widget = wibox.container.margin
},
- id = "mrgn",
- top = dpi(10),
- bottom = dpi(10),
- widget = wibox.container.margin
- }
- else
- action_template_widget = wibox.template {
+ forced_height = dpi(35),
+ forced_width = dpi(35),
+ bg = Theme_config.notification.action_bg,
+ shape = function(cr, width, height)
+ gears.shape.rounded_rect(cr, width, height, dpi(6))
+ end,
+ widget = wibox.container.background,
+ id = "bgrnd"
+ },
+ id = "mrgn",
+ top = dpi(10),
+ bottom = dpi(10),
+ widget = wibox.container.margin
+ }
+ else
+ action_template_widget = wibox.template {
+ {
{
{
{
- {
- id = "text_role",
- font = "JetBrainsMono Nerd Font, Regular 12",
- widget = wibox.widget.textbox
- },
- id = "centered",
- widget = wibox.container.place
+ id = "text_role",
+ font = "JetBrainsMono Nerd Font, Regular 12",
+ widget = wibox.widget.textbox
},
- margins = dpi(5),
- widget = wibox.container.margin
+ id = "centered",
+ widget = wibox.container.place
},
- fg = Theme_config.notification.action_fg,
- bg = Theme_config.notification.action_bg,
- shape = function(cr, width, height)
- gears.shape.rounded_rect(cr, width, height, dpi(6))
- end,
- widget = wibox.container.background,
- id = "bgrnd"
+ margins = dpi(5),
+ widget = wibox.container.margin
},
- id = "mrgn",
- top = dpi(10),
- bottom = dpi(10),
- widget = wibox.container.margin
- }
- end
-
- local actions_template = wibox.widget {
- notification = n,
- base_layout = wibox.widget {
- spacing = dpi(40),
- layout = wibox.layout.fixed.horizontal
+ fg = Theme_config.notification.action_fg,
+ bg = Theme_config.notification.action_bg,
+ shape = function(cr, width, height)
+ gears.shape.rounded_rect(cr, width, height, dpi(6))
+ end,
+ widget = wibox.container.background,
+ id = "bgrnd"
},
- widget_template = action_template_widget,
- style = {
- underline_normal = false,
- underline_selected = true
- },
- widget = naughty.list.actions
+ id = "mrgn",
+ top = dpi(10),
+ bottom = dpi(10),
+ widget = wibox.container.margin
}
+ end
- local arc_start = n.timeout
- if n.timeout == 0 then
- arc_start = 10
- end
+ local actions_template = wibox.widget {
+ notification = n,
+ base_layout = wibox.widget {
+ spacing = dpi(40),
+ layout = wibox.layout.fixed.horizontal
+ },
+ widget_template = action_template_widget,
+ style = {
+ underline_normal = false,
+ underline_selected = true
+ },
+ widget = naughty.list.actions
+ }
- local w_template = wibox.template {
- widget = wibox.widget {
+ local arc_start = n.timeout
+ if n.timeout == 0 then
+ arc_start = 10
+ end
+
+ local w_template = wibox.template {
+ widget = wibox.widget {
+ {
{
{
{
@@ -188,241 +183,239 @@ naughty.connect_signal(
{
{
{
- {
- image = gears.color.recolor_image(icondir .. "notification-outline.svg",
- Theme_config.notification.icon_color),
- resize = false,
- valign = "center",
- halign = "center",
- widget = wibox.widget.imagebox
- },
- right = dpi(5),
- widget = wibox.container.margin
- },
- {
- markup = n.app_name or 'System Notification',
- align = "center",
+ image = gears.color.recolor_image(icondir .. "notification-outline.svg",
+ Theme_config.notification.icon_color),
+ resize = false,
valign = "center",
- widget = wibox.widget.textbox
+ halign = "center",
+ widget = wibox.widget.imagebox
},
- layout = wibox.layout.fixed.horizontal
+ right = dpi(5),
+ widget = wibox.container.margin
},
- fg = Theme_config.notification.fg_appname,
- widget = wibox.container.background
- },
- margins = dpi(10),
- widget = wibox.container.margin
- },
- nil,
- {
- {
{
- text = os.date("%H:%M"),
+ markup = n.app_name or 'System Notification',
+ align = "center",
+ valign = "center",
widget = wibox.widget.textbox
},
- id = "background",
- fg = Theme_config.notification.fg_time,
- widget = wibox.container.background
+ layout = wibox.layout.fixed.horizontal
},
+ fg = Theme_config.notification.fg_appname,
+ widget = wibox.container.background
+ },
+ margins = dpi(10),
+ widget = wibox.container.margin
+ },
+ nil,
+ {
+ {
+ {
+ text = os.date("%H:%M"),
+ widget = wibox.widget.textbox
+ },
+ id = "background",
+ fg = Theme_config.notification.fg_time,
+ widget = wibox.container.background
+ },
+ {
{
{
{
{
- {
- font = User_config.font.specify .. ", 10",
- text = "✕",
- align = "center",
- valign = "center",
- widget = wibox.widget.textbox
- },
- start_angle = 4.71239,
- thickness = dpi(2),
- min_value = 0,
- max_value = arc_start,
- value = arc_start,
- widget = wibox.container.arcchart,
- id = "arc_chart"
+ font = User_config.font.specify .. ", 10",
+ text = "✕",
+ align = "center",
+ valign = "center",
+ widget = wibox.widget.textbox
},
- id = "background1",
- fg = Theme_config.notification.fg_close,
- bg = Theme_config.notification.bg_close,
- widget = wibox.container.background
+ start_angle = 4.71239,
+ thickness = dpi(2),
+ min_value = 0,
+ max_value = arc_start,
+ value = arc_start,
+ widget = wibox.container.arcchart,
+ id = "arc_chart"
},
- strategy = "exact",
- width = dpi(20),
- height = dpi(20),
- widget = wibox.container.constraint,
- id = "const1"
+ id = "background1",
+ fg = Theme_config.notification.fg_close,
+ bg = Theme_config.notification.bg_close,
+ widget = wibox.container.background
},
- margins = dpi(10),
- widget = wibox.container.margin,
- id = "arc_margin"
+ strategy = "exact",
+ width = dpi(20),
+ height = dpi(20),
+ widget = wibox.container.constraint,
+ id = "const1"
},
- layout = wibox.layout.fixed.horizontal,
- id = "arc_app_layout_2"
+ margins = dpi(10),
+ widget = wibox.container.margin,
+ id = "arc_margin"
},
- id = "arc_app_layout",
- layout = wibox.layout.align.horizontal
+ layout = wibox.layout.fixed.horizontal,
+ id = "arc_app_layout_2"
},
- id = "arc_app_bg",
- border_color = Theme_config.notification.title_border_color,
- border_width = Theme_config.notification.title_border_width,
- widget = wibox.container.background
+ id = "arc_app_layout",
+ layout = wibox.layout.align.horizontal
},
+ id = "arc_app_bg",
+ border_color = Theme_config.notification.title_border_color,
+ border_width = Theme_config.notification.title_border_width,
+ widget = wibox.container.background
+ },
+ {
{
{
{
{
- {
- image = n.icon,
- resize = true,
- widget = wibox.widget.imagebox,
- valign = "center",
- halign = "center",
- clip_shape = function(cr, width, height)
- gears.shape.rounded_rect(cr, width, height, 10)
- end
- },
- width = naughty.config.defaults.icon_size,
- height = naughty.config.defaults.icon_size,
- strategy = "exact",
- widget = wibox.container.constraint
+ image = n.icon,
+ resize = true,
+ widget = wibox.widget.imagebox,
+ valign = "center",
+ halign = "center",
+ clip_shape = function(cr, width, height)
+ gears.shape.rounded_rect(cr, width, height, 10)
+ end
},
- halign = "center",
- valign = "top",
- widget = wibox.container.place
+ width = naughty.config.defaults.icon_size,
+ height = naughty.config.defaults.icon_size,
+ strategy = "exact",
+ widget = wibox.container.constraint
},
- left = dpi(20),
- bottom = dpi(15),
- top = dpi(15),
- right = dpi(10),
- widget = wibox.container.margin
+ halign = "center",
+ valign = "top",
+ widget = wibox.container.place
},
+ left = dpi(20),
+ bottom = dpi(15),
+ top = dpi(15),
+ right = dpi(10),
+ widget = wibox.container.margin
+ },
+ {
{
{
- {
- widget = naughty.widget.title,
- align = "left"
- },
- {
- widget = naughty.widget.message,
- align = "left"
- },
- {
- actions_template,
- widget = wibox.container.place
- },
- layout = wibox.layout.fixed.vertical
+ widget = naughty.widget.title,
+ align = "left"
},
- left = dpi(10),
- bottom = dpi(10),
- top = dpi(10),
- right = dpi(20),
- widget = wibox.container.margin
+ {
+ widget = naughty.widget.message,
+ align = "left"
+ },
+ {
+ actions_template,
+ widget = wibox.container.place
+ },
+ layout = wibox.layout.fixed.vertical
},
- layout = wibox.layout.fixed.horizontal
+ left = dpi(10),
+ bottom = dpi(10),
+ top = dpi(10),
+ right = dpi(20),
+ widget = wibox.container.margin
},
- id = "widget_layout",
- layout = wibox.layout.fixed.vertical
+ layout = wibox.layout.fixed.horizontal
},
- id = "min_size",
- strategy = "min",
- width = dpi(100),
- widget = wibox.container.constraint
+ id = "widget_layout",
+ layout = wibox.layout.fixed.vertical
},
- id = "max_size",
- strategy = "max",
- width = Theme.notification_max_width or dpi(500),
+ id = "min_size",
+ strategy = "min",
+ width = dpi(100),
widget = wibox.container.constraint
},
- id = "background",
- bg = Theme_config.notification.bg,
- border_color = Theme_config.notification.border_color,
- border_width = Theme_config.notification.border_width,
- shape = Theme_config.notification.shape_inside,
- widget = wibox.container.background
+ id = "max_size",
+ strategy = "max",
+ width = Theme.notification_max_width or dpi(500),
+ widget = wibox.container.constraint
},
- update_callback = function()
+ id = "background",
+ bg = Theme_config.notification.bg,
+ border_color = Theme_config.notification.border_color,
+ border_width = Theme_config.notification.border_width,
+ shape = Theme_config.notification.shape_inside,
+ widget = wibox.container.background
+ },
+ update_callback = function()
- end
- }
- local close = w_template:get_widget().max_size.min_size.widget_layout.arc_app_bg.arc_app_layout.arc_app_layout_2.arc_margin
- .const1.background1
- local arc = close.arc_chart
-
- local timeout = n.timeout
-
- if timeout ~= 0 then
-
- local rubato_timer = rubato.timed {
- duration = n.timeout,
- pos = n.timeout,
- easing = rubato.linear,
- subscribed = function(value)
- arc.value = value
- end
- }
-
- rubato_timer.target = 0
-
- w_template:get_widget():connect_signal(
- "mouse::enter",
- function()
- n.timeout = 99999
- rubato_timer.pause = true
- end
- )
-
- w_template:get_widget():connect_signal(
- "mouse::leave",
- function()
- n.timeout = rubato_timer.pos
- rubato_timer.pause = false
- rubato_timer.target = 0
- end
- )
end
+ }
+ local close = w_template:get_widget().max_size.min_size.widget_layout.arc_app_bg.arc_app_layout.arc_app_layout_2.arc_margin
+ .const1.background1
+ local arc = close.arc_chart
- Hover_signal(close)
+ local timeout = n.timeout
- close:connect_signal("button::press", function()
- n:destroy()
- end)
+ if timeout ~= 0 then
- w_template:get_widget():connect_signal("button::press", function(_, _, _, key)
- if key == 3 then
- n:destroy()
+ local rubato_timer = rubato.timed {
+ duration = n.timeout,
+ pos = n.timeout,
+ easing = rubato.linear,
+ subscribed = function(value)
+ arc.value = value
end
- -- Raise the client on click
- if key == 1 then
- for _, client in ipairs(capi.client.get()) do
- if client.name:match(n.app_name) then
- if not client:isvisible() and client.first_tag then
- client.first_tag:view_only()
- end
- client:emit_signal('request::activate')
- client:raise()
- end
- end
- end
- end)
-
- local box = naughty.layout.box {
- notification = n,
- timeout = 5,
- type = "notification",
- screen = capi.screen.primary,
- shape = function(cr, width, height)
- gears.shape.rounded_rect(cr, width, height, 10)
- end,
- widget_template = w_template
}
- box.buttons = {}
- n.buttons = {}
+ rubato_timer.target = 0
+
+ w_template:get_widget():connect_signal(
+ "mouse::enter",
+ function()
+ n.timeout = 99999
+ rubato_timer.pause = true
+ end
+ )
+
+ w_template:get_widget():connect_signal(
+ "mouse::leave",
+ function()
+ n.timeout = rubato_timer.pos
+ rubato_timer.pause = false
+ rubato_timer.target = 0
+ end
+ )
end
+
+ Hover_signal(close)
+
+ close:connect_signal("button::press", function()
+ n:destroy()
+ end)
+
+ w_template:get_widget():connect_signal("button::press", function(_, _, _, key)
+ if key == 3 then
+ n:destroy()
+ end
+ -- Raise the client on click
+ if key == 1 then
+ for _, client in ipairs(capi.client.get()) do
+ if client.name:match(n.app_name) then
+ if not client:isvisible() and client.first_tag then
+ client.first_tag:view_only()
+ end
+ client:emit_signal('request::activate')
+ client:raise()
+ end
+ end
+ end
+ end)
+
+ local box = naughty.layout.box {
+ notification = n,
+ timeout = 5,
+ type = "notification",
+ screen = capi.screen.primary,
+ shape = function(cr, width, height)
+ gears.shape.rounded_rect(cr, width, height, 10)
+ end,
+ widget_template = w_template
+ }
+
+ box.buttons = {}
+ n.buttons = {}
end
-)
+end)
naughty.connect_signal(
"destroyed",
diff --git a/awesome/src/core/signals.lua b/awesome/src/core/signals.lua
index 5e802c9..c74c238 100644
--- a/awesome/src/core/signals.lua
+++ b/awesome/src/core/signals.lua
@@ -14,85 +14,61 @@ local capi = {
tag = tag
}
-capi.screen.connect_signal(
- "added",
- function()
- capi.awesome.restart()
- end
-)
+capi.screen.connect_signal("added", function()
+ capi.awesome.restart()
+end)
-capi.screen.connect_signal(
- "removed",
- function()
- capi.awesome.restart()
- end
-)
+capi.screen.connect_signal("removed", function()
+ capi.awesome.restart()
+end)
-capi.client.connect_signal(
- "manage",
- function(c)
- if capi.awesome.startup and not c.size_hints.user_porition and not c.size_hints.program_position then
- awful.placement.no_offscreen(c)
- end
- if c.class == "Brave-browser" then
- c.floating = false
- end
- if c.transient_for then
- c.floating = true
- end
- if c.fullscreen then
- gears.timer.delayed_call(function()
- if c.valid then
- c:geometry(c.screen.geometry)
- end
- end)
- end
+capi.client.connect_signal("manage", function(c)
+ if capi.awesome.startup and not c.size_hints.user_porition and not c.size_hints.program_position then
+ awful.placement.no_offscreen(c)
end
-)
+ if c.class == "Brave-browser" then
+ c.floating = false
+ end
+ if c.transient_for then
+ c.floating = true
+ end
+ if c.fullscreen then
+ gears.timer.delayed_call(function()
+ if c.valid then
+ c:geometry(c.screen.geometry)
+ end
+ end)
+ end
+end)
-capi.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
+capi.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)
-capi.tag.connect_signal(
- 'property::selected',
- function(c)
- if #awful.screen.focused().clients > 0 then
- awful.screen.focused().clients[1]:emit_signal(
- 'request::activate',
- 'mouse_enter',
- {
- raise = true
- }
- )
- end
+capi.tag.connect_signal('property::selected', 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 = true
- }
- )
- end
-) ]]
+--[[ client.connect_signal("mouse::enter", function(c)
+ c:emit_signal(
+ "request::activate",
+ "mouse_enter",{
+ raise = true
+ })
+end) ]]
--- Takes a wibox.container.background and connects four signals to it
---@param widget wibox.container.background a background widget
diff --git a/awesome/src/lib/dbus_proxy b/awesome/src/lib/dbus_proxy
new file mode 160000
index 0000000..c9253bd
--- /dev/null
+++ b/awesome/src/lib/dbus_proxy
@@ -0,0 +1 @@
+Subproject commit c9253bde3fa5a64261953d1b196c57fabf9f8561
diff --git a/awesome/src/lib/lua-dbus_proxy b/awesome/src/lib/lua-dbus_proxy
deleted file mode 160000
index 011306f..0000000
--- a/awesome/src/lib/lua-dbus_proxy
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 011306f859457865d3d289c49b640ac848d8fb1a
diff --git a/awesome/src/lib/overflow_widget/overflow.lua b/awesome/src/lib/overflow_widget/overflow.lua
index 8b4d98f..c6eed22 100644
--- a/awesome/src/lib/overflow_widget/overflow.lua
+++ b/awesome/src/lib/overflow_widget/overflow.lua
@@ -18,8 +18,6 @@ local gshape = require('gears.shape')
local gobject = require('gears.object')
local mousegrabber = mousegrabber
-local rubato = require("src.lib.rubato")
-
local overflow = { mt = {} }
-- Determine the required space to draw the layout's children and, if necessary,
@@ -275,7 +273,7 @@ end
--- Scroll the layout's content by `amount * step`.
--
--- A positive amount scroll down/right, a negative amount scrolls up/left.
+-- A positive amount scrolls down/right, a negative amount scrolls up/left.
--
-- The amount of units scrolled is affected by `step`.
--
@@ -307,9 +305,6 @@ end
-- @tparam number scroll_factor The scroll factor.
-- @propemits true false
-overflow.rubato_timed = rubato.timed { duration = 0.2 }
-
-local first_call = true
function overflow:set_scroll_factor(factor)
local current = self._private.scroll_factor
local interval = self._private.used_in_dir - self._private.avail_in_dir
@@ -323,22 +318,10 @@ function overflow:set_scroll_factor(factor)
return
end
+ self._private.scroll_factor = math.min(1, math.max(factor, 0))
- local function update_scroll()
- self._private.scroll_factor = self.rubato_timed.pos
- self:emit_signal("widget::layout_changed")
- self:emit_signal("property::scroll_factor", factor)
- end
-
- -- Make sure it only subscribes once
- if first_call then
- self.rubato_timed:subscribe(update_scroll)
- --first_call = false
- end
-
- -- Set the target to the new target + remaining target from last scroll. This makes it scroll faster and correctly.
- self.rubato_timed.target = math.min(1,
- math.max(factor + (self.rubato_timed.target - self.rubato_timed.pos), 0))
+ self:emit_signal("widget::layout_changed")
+ self:emit_signal("property::scroll_factor", factor)
end
function overflow:get_scroll_factor()
@@ -486,6 +469,19 @@ function overflow:get_scrollbar_widget()
return self._private.scrollbar_widget
end
+function overflow:reset()
+ self._private.widgets = {}
+ self._private.scroll_factor = 0
+
+ local scrollbar_widget = separator({ shape = gshape.rectangle })
+ apply_scrollbar_mouse_signal(self, scrollbar_widget)
+ self._private.scrollbar_widget = scrollbar_widget
+
+ self:emit_signal("widget::layout_changed")
+ self:emit_signal("widget::reset")
+ self:emit_signal("widget::reseted")
+end
+
local function new(dir, ...)
local ret = fixed[dir](...)
@@ -538,7 +534,7 @@ end
-- widgets exceeds the height available whithin the layout's outer container
-- a scrollbar will be added and scrolling behavior enabled.
-- @tparam widget ... Widgets that should be added to the layout.
--- @constructorfct wibox.layout.overflow.horizontal
+-- @constructorfct wibox.layout.overflow.vertical
function overflow.vertical(...)
return new("vertical", ...)
end
diff --git a/awesome/src/lib/rubato b/awesome/src/lib/rubato
index b40ecae..47efd9d 160000
--- a/awesome/src/lib/rubato
+++ b/awesome/src/lib/rubato
@@ -1 +1 @@
-Subproject commit b40ecae70b01b9917df2ba192f058f5e0b768798
+Subproject commit 47efd9d91113ab11a315ef83475f86e1eab118c5
diff --git a/awesome/src/modules/crylia_bar/left_bar.lua b/awesome/src/modules/crylia_bar/left_bar.lua
index 916f465..a1e22bf 100644
--- a/awesome/src/modules/crylia_bar/left_bar.lua
+++ b/awesome/src/modules/crylia_bar/left_bar.lua
@@ -4,7 +4,6 @@
-- Awesome Libs
local awful = require("awful")
local dpi = require("beautiful").xresources.apply_dpi
-local gears = require("gears")
local wibox = require("wibox")
return function(s, w)
diff --git a/awesome/src/modules/crylia_bar/right_bar.lua b/awesome/src/modules/crylia_bar/right_bar.lua
index 6a1addf..97d02c7 100644
--- a/awesome/src/modules/crylia_bar/right_bar.lua
+++ b/awesome/src/modules/crylia_bar/right_bar.lua
@@ -4,7 +4,6 @@
-- Awesome Libs
local awful = require("awful")
local dpi = require("beautiful").xresources.apply_dpi
-local gears = require("gears")
local wibox = require("wibox")
return function(s, w)
@@ -56,6 +55,7 @@ return function(s, w)
bg = Theme_config.right_bar.bg,
visible = true,
screen = s,
+ maximum_width = dpi(650),
placement = function(c) awful.placement.top_right(c, { margins = dpi(10) }) end
}
diff --git a/awesome/src/modules/init.lua b/awesome/src/modules/init.lua
index dc4cf92..2ad7e51 100644
--- a/awesome/src/modules/init.lua
+++ b/awesome/src/modules/init.lua
@@ -14,8 +14,6 @@ awful.screen.connect_for_each_screen(function(s)
require("src.modules.audio.volume_osd") { screen = s }
--require("src.modules.audio.volume_controller") { screen = s }
require("src.modules.brightness.brightness_osd") { screen = s }
- require("src.lib.nice") { titlebar_font = User_config.font.bold,
- titlebar_items = { left = { "icon" }, right = { "minimize", "maximize", "close" } } }
require("src.modules.crylia_bar.init")(s)
--require("src.modules.crylia_wibox.init")(s)
require("src.modules.notification-center.init")(s)
@@ -23,3 +21,8 @@ awful.screen.connect_for_each_screen(function(s)
require("src.modules.application_launcher.init") { screen = s }
require("src.modules.network_controller.init") { screen = s }
end)
+
+do
+ require("src.lib.nice") { titlebar_font = User_config.font.bold,
+ titlebar_items = { left = { "icon" }, right = { "minimize", "maximize", "close" } } }
+end
diff --git a/awesome/src/modules/network_controller/init.lua b/awesome/src/modules/network_controller/init.lua
index f8339c2..5007fec 100644
--- a/awesome/src/modules/network_controller/init.lua
+++ b/awesome/src/modules/network_controller/init.lua
@@ -59,6 +59,7 @@ network.DeviceState = {
function network:get_wifi_proxy()
local devices = self._private.NetworkManager:GetDevices()
+ if (not devices) or (#devices == 0) then return end
for _, path in ipairs(devices) do
local NetworkManagerDevice = dbus_proxy.Proxy:new {
bus = dbus_proxy.Bus.SYSTEM,
@@ -117,6 +118,7 @@ end
---Scan for access points and create a widget for each one.
function network:scan_access_points()
+ if not self._private.NetworkManagerDeviceWireless then return end
local ap_list = self:get_children_by_id("wifi_ap_list")[1]
ap_list:reset()
self._private.NetworkManagerDeviceWireless:RequestScanAsync(function(proxy, context, success, failure)
@@ -358,7 +360,7 @@ function network.new(args)
ret:scan_access_points()
- gtimer.delayed_call(function()
+ --[[ gtimer.delayed_call(function()
local active_access_point = ret._private.NetworkManagerDeviceWireless.ActiveAccessPoint
if ret._private.NetworkManager.State == network.DeviceState.ACTIVATED and active_access_point ~= "/" then
local active_access_point_proxy = dbus_proxy.Proxy:new {
@@ -368,7 +370,7 @@ function network.new(args)
path = active_access_point,
}
end
- end)
+ end) ]]
--#endregion
diff --git a/awesome/src/modules/notification-center/status_bars.lua b/awesome/src/modules/notification-center/status_bars.lua
index 3e2849b..08846bd 100644
--- a/awesome/src/modules/notification-center/status_bars.lua
+++ b/awesome/src/modules/notification-center/status_bars.lua
@@ -497,7 +497,6 @@ return function()
local rubato_timer = rubato.timed {
duration = 1,
pos = bar.value,
- easing = rubato.linear,
subscribed = function(v)
bar.value = v
end
@@ -594,7 +593,6 @@ return function()
local rubato_timer = rubato.timed {
duration = 1,
pos = bar.value,
- easing = rubato.linear,
subscribed = function(v)
bar.value = v
end
diff --git a/awesome/src/theme/init.lua b/awesome/src/theme/init.lua
index ffacf51..53e7a1e 100644
--- a/awesome/src/theme/init.lua
+++ b/awesome/src/theme/init.lua
@@ -6,7 +6,6 @@
-- ╚██████╗██║ ██║ ██║ ███████╗██║██║ ██║ --
-- ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝╚═╝╚═╝ ╚═╝ --
--------------------------------------------------
-local awful = require("awful")
local beautiful = require("beautiful")
local gears = require("gears")
@@ -14,9 +13,6 @@ local capi = {
screen = screen,
}
-require("src.theme.user_config")
-require("src.theme.theme_config")
-
Theme_path = gears.filesystem.get_configuration_dir() .. "/src/theme/"
Theme = {}
@@ -53,9 +49,6 @@ Theme.hotkeys_label_bg = Theme_config.hotkeys.label_bg
Theme.hotkeys_label_fg = Theme_config.hotkeys.label_fg
--#endregion
-Theme.awesome_icon = Theme_path .. "../assets/icons/ArchLogo.png"
-Theme.awesome_subicon = Theme_path .. "../assets/icons/ArchLogo.png"
-
-- Wallpaper
beautiful.wallpaper = User_config.wallpaper
capi.screen.connect_signal(
diff --git a/awesome/src/theme/theme_config.lua b/awesome/src/theme/theme_config.lua
index 30b383a..991ab5f 100644
--- a/awesome/src/theme/theme_config.lua
+++ b/awesome/src/theme/theme_config.lua
@@ -93,7 +93,10 @@ Theme_config.kblayout = {
Theme_config.layout_list = {
bg = color["LightBlue200"],
- fg = color["Grey900"]
+ fg = color["Grey900"],
+ shape = function(cr, width, height)
+ gshape.rounded_rect(cr, width, height, dpi(6))
+ end
}
Theme_config.network = {
@@ -672,6 +675,73 @@ Theme_config.context_menu = {
icon_color_hover = color["Teal200"]
}
}
+
+Theme_config.setup = {
+ bg = color["Grey900"],
+ border_color = color["Grey800"],
+ border_width = dpi(4),
+ wallpaper = {
+ bg = color["Grey900"],
+ fg = color["Grey100"],
+ clip_shape = function(cr, width, height)
+ gshape.rounded_rect(cr, width, height, dpi(12))
+ end,
+ button_bg = color["Yellow200"],
+ button_fg = color["Grey900"],
+ button_shape = function(cr, width, height)
+ gshape.rounded_rect(cr, width, height, dpi(12))
+ end,
+ close_fg = color["Red200"],
+ path_bg = color["Grey800"],
+ path_fg = color["Grey100"],
+ path_border_color = color["Grey700"],
+ path_border_width = dpi(2),
+ path_shape = function(cr, width, height)
+ gshape.rounded_rect(cr, width, height, dpi(12))
+ end,
+ },
+ bar = {
+ shape = gshape.circle,
+ color = color["Green200"],
+ padding = dpi(4),
+ border_width = dpi(2),
+ border_color = color["Grey800"],
+ widget_bg = color["Grey800"],
+ widget_fg = color["Grey100"],
+ widget_border_color = color["Grey700"],
+ widget_border_width = dpi(2),
+ widget_shape = function(cr, width, height)
+ gshape.rounded_rect(cr, width, height, dpi(8))
+ end,
+ widget_toggle_color = color["Blue200"],
+ bar_shape = function(cr, width, height)
+ gshape.rounded_rect(cr, width, height, dpi(8))
+ end,
+ bar_image_shape = function(cr, width, height)
+ gshape.rounded_rect(cr, width, height, dpi(4))
+ end,
+ },
+ notification = {
+ separator_color = color["Grey800"],
+ checkbox_color = color["Purple200"],
+ checkbox_paddings = dpi(4),
+ checkbox_shape = gshape.circle,
+ border_color = color["Grey800"],
+ border_width = dpi(2),
+ shape = function(cr, width, height)
+ gshape.rounded_rect(cr, width, height, dpi(4))
+ end,
+ },
+ layout = {
+ bg = color["Orange200"],
+ border_color = color["Grey800"],
+ border_width = dpi(2),
+ shape = function(cr, width, height)
+ gshape.rounded_rect(cr, width, height, dpi(8))
+ end,
+ border_color_selected = color["DeepOrange200"]
+ }
+}
-- #endregion
--[[
diff --git a/awesome/src/theme/user_config.lua b/awesome/src/theme/user_config.lua
index ff2dc1d..ad6a107 100644
--- a/awesome/src/theme/user_config.lua
+++ b/awesome/src/theme/user_config.lua
@@ -18,11 +18,9 @@ User_config = {
]] --
autostart = {
"picom",
- "xfce4-power-manager",
- "light-locker --lock-on-suspend --lock-on-lid &",
"/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1",
"setxkbmap -option caps:swapescape",
- "/home/crylia/.screenlayout/single.sh"
+ "/home/crylia/.screenlayout/double.sh"
},
--[[
@@ -45,7 +43,7 @@ User_config = {
"MEDIA_PLAYER"
More information at: https://lazka.github.io/pgi-docs/UPowerGlib-1.0/enums.html#UPowerGlib.DeviceKind.KEYBOARD
]] --
- battery_kind = "BATTERY",
+ battery_kind = "LINE_POWER",
--[[
If your battery is not found you can specify its path here.
@@ -208,8 +206,6 @@ User_config = {
"volume",
"gpu_temp",
"gpu_usage",
- "battery",
- "backlight"
},
--[[
@@ -267,7 +263,7 @@ User_config = {
unit = "metric"
},
- web_browser = "brave-browser",
+ web_browser = "firefox",
--[[
You can configure your bar's here, if you leave it empty the bar will not be shown.
@@ -305,16 +301,36 @@ User_config = {
"Tasklist"
},
right_bar = {
- "Battery",
- "Network",
- "Bluetooth",
+ "Cpu Frequency",
+ "Cpu Temperature",
+ "Cpu Usage",
"Audio",
"Keyboard Layout",
"Date",
"Clock",
"Power Button"
}
- }
+ },
+ --[[ [2] = {
+ left_bar = {
+ "Tiling Layout",
+ "Systray",
+ "Taglist"
+ },
+ center_bar = {
+ "Tasklist"
+ },
+ right_bar = {
+ "Gpu Temperature",
+ "Gpu Usage",
+ "Ram",
+ "Audio",
+ "Keyboard Layout",
+ "Date",
+ "Clock",
+ "Power Button"
+ }
+ }]]
},
crylia_wibox = {
diff --git a/awesome/src/tools/color_helper.lua b/awesome/src/tools/color_helper.lua
deleted file mode 100644
index c3251d9..0000000
--- a/awesome/src/tools/color_helper.lua
+++ /dev/null
@@ -1,87 +0,0 @@
-local cairo = require("lgi").cairo
-local gcolor = require("gears.color")
-local gdk = require("lgi").Gdk
-local gsurface = require("gears.surface")
-local gtable = require("gears.table")
-
-local color_helper = { mt = {} }
-color_helper.color_rules = {}
-
-function color_helper.set_color_rule(c, color)
- color_helper.color_rules[c.instance] = color
-end
-
-function color_helper.get_color_rule(c)
- return color_helper.color_rules[c.instance]
-end
-
-function color_helper.lighten(color, amount)
- local r, g, b
- r, g, b = gcolor.parse_color(color)
- r = 255 * r
- g = 255 * g
- b = 255 * b
- r = r + math.floor(2.55 * amount)
- g = g + math.floor(2.55 * amount)
- b = b + math.floor(2.55 * amount)
- r = r > 255 and 255 or r
- g = g > 255 and 255 or g
- b = b > 255 and 255 or b
- return ("#%02x%02x%02x"):format(r, g, b)
-end
-
-function color_helper.duotone_gradient_vertical(color_1, color_2, height, offset_1, offset_2)
- local fill_pattern = cairo.Pattern.create_linear(0, 0, 0, height)
- local r, g, b, a
- r, g, b, a = gcolor.parse_color(color_1)
- fill_pattern:add_color_stop_rgba(offset_1 or 0, r, g, b, a)
- r, g, b, a = gcolor.parse_color(color_2)
- fill_pattern:add_color_stop_rgba(offset_2 or 1, r, g, b, a)
- return fill_pattern
-end
-
-function color_helper.get_dominant_color(client)
- local color, pb, bytes
- local tally, content, cgeo = {}, gsurface(client.content), client:geometry()
- local x_offset, y_offset, x_lim = 2, 2, math.floor(cgeo.width / 2)
-
- for x_pos = 0, x_lim, 2 do
- for y_pos = 0, 8, 1 do
- pb = gdk.pixbuf_get_from_surface(content, x_offset + x_pos, y_offset + y_pos, 1, 1)
- bytes = pb:get_pixels()
- color = "#" .. bytes:gsub(".", function(c)
- return ("%02x"):format(c:byte())
- end)
- if not tally[color] then
- tally[color] = 1
- else
- tally[color] = tally[color] + 1
- end
- end
- end
- local mode
- local mode_c = 0
- for k, v in pairs(tally) do
- if v > mode_c then
- mode_c = v
- mode = k
- end
- end
- color = mode
- color_helper.set_color_rule(client, color)
- return color
-end
-
-function color_helper.new(args)
- local ret = {}
-
- gtable.crush(ret, color_helper, true)
-
- return ret
-end
-
-function color_helper.mt:__call(...)
- return color_helper.new(...)
-end
-
-return setmetatable(color_helper, color_helper.mt)
diff --git a/awesome/src/tools/dbus/bluetooth_dbus.lua b/awesome/src/tools/dbus/bluetooth_dbus.lua
deleted file mode 100644
index 8a1d5af..0000000
--- a/awesome/src/tools/dbus/bluetooth_dbus.lua
+++ /dev/null
@@ -1,146 +0,0 @@
-local awful = require("awful")
-local gears = require("gears")
-local dbus_proxy = require("src.lib.lua-dbus_proxy.src.dbus_proxy")
-local lgi = require("lgi")
-
-local capi = {
- awesome = awesome,
-}
-
-return function()
-
- local function get_device_info(object_path)
- if object_path ~= nil and object_path:match("/org/bluez/hci0/dev") then
- local device = dbus_proxy.Proxy:new {
- bus = dbus_proxy.Bus.SYSTEM,
- name = "org.bluez",
- interface = "org.bluez.Device1",
- path = object_path
- }
-
- local battery = dbus_proxy.Proxy:new {
- bus = dbus_proxy.Bus.SYSTEM,
- name = "org.bluez",
- interface = "org.bluez.Battery1",
- path = object_path
- }
-
- local device_properties = dbus_proxy.Proxy:new {
- bus = dbus_proxy.Bus.SYSTEM,
- name = "org.bluez",
- interface = "org.freedesktop.DBus.Properties",
- path = object_path
- }
-
- capi.awesome.emit_signal("bluetooth::scan")
- if (device.Name ~= nil) or (device.Alias ~= nil) then
- device_properties:connect_signal(function()
- capi.awesome.emit_signal("bluetooth::device_changed", device, battery)
- end, "PropertiesChanged")
- capi.awesome.emit_signal("bluetooth::device_changed", device, battery)
- end
- end
- end
-
- awful.spawn.easy_async_with_shell(
- "lsusb | grep Bluetooth",
- function(stdout)
- stdout = stdout:gsub("\n", "")
- if stdout ~= "" or stdout == nil then
- local ObjectManager = dbus_proxy.Proxy:new {
- bus = dbus_proxy.Bus.SYSTEM,
- name = "org.bluez",
- interface = "org.freedesktop.DBus.ObjectManager",
- path = "/"
- }
-
- local Adapter = dbus_proxy.Proxy:new {
- bus = dbus_proxy.Bus.SYSTEM,
- name = "org.bluez",
- interface = "org.bluez.Adapter1",
- path = "/org/bluez/hci0"
- }
-
- local AdapterProperties = dbus_proxy.Proxy:new {
- bus = dbus_proxy.Bus.SYSTEM,
- name = "org.bluez",
- interface = "org.freedesktop.DBus.Properties",
- path = "/org/bluez/hci0"
- }
-
- ObjectManager:connect_signal(
- function(interface)
- get_device_info(interface)
- end,
- "InterfacesAdded"
- )
-
- ObjectManager:connect_signal(
- function(interface)
- capi.awesome.emit_signal("device_removed", interface)
- end,
- "InterfacesRemoved"
- )
-
- Adapter:connect_signal(
- function(data)
- if data.Powered ~= nil then
- capi.awesome.emit_signal("state", data.Powered)
- end
- end,
- "PropertiesChanged"
- )
-
- capi.awesome.connect_signal(
- "bluetooth::scan",
- function()
- Adapter:StartDiscovery()
- end
- )
-
- capi.awesome.connect_signal(
- "bluetooth::stop",
- function()
- Adapter:StopDiscovery()
- end
- )
-
- AdapterProperties:connect_signal(
- function(data)
- if data.Powered ~= nil then
- if data.Powered then
- Adapter:StartDiscovery()
- end
- end
- end,
- "PropertiesChanged"
- )
-
- capi.awesome.connect_signal("toggle_bluetooth",
- function()
- local is_powered = Adapter.Powered
- Adapter:Set(
- "org.bluez.Adapter1",
- "Powered",
- lgi.GLib.Variant("b", not is_powered)
- )
- Adapter.Powered = { signature = "b", value = not is_powered }
- capi.awesome.emit_signal("state", Adapter.Powered)
- end)
-
- gears.timer.delayed_call(
- function()
- local objects = ObjectManager:GetManagedObjects()
-
- for object_path, _ in pairs(objects) do
- get_device_info(object_path)
- end
-
- capi.awesome.emit_signal("state", Adapter.Powered)
- end
- )
- end
- end
- )
-
-end
diff --git a/awesome/src/tools/desktop_parser.lua b/awesome/src/tools/desktop_parser.lua
deleted file mode 100644
index 982e52e..0000000
--- a/awesome/src/tools/desktop_parser.lua
+++ /dev/null
@@ -1,165 +0,0 @@
-local gears = require("gears")
-local GLib = require("lgi").GLib
-
-local m = {}
-
----Will return every $XDG_DATA_DIRS
----@return table
-local function get_paths()
- local dirs = {}
-
- local dir
- for _, value in ipairs(GLib.get_system_data_dirs()) do
- dir = GLib.build_filenamev({ value, "applications" })
- if gears.filesystem.dir_readable(dir) then table.insert(dirs, dir) end
- end
-
- dir = GLib.build_filenamev({ GLib.get_user_data_dir(), "applications" })
- if gears.filesystem.dir_readable(dir) then table.insert(dirs, dir) end
-
- return dirs
-end
-
----Returns every found .desktop file that has NoDesktop=false or unset
----@return table
-function m.Get_all_visible_desktop()
- local dirs = get_paths()
- local desktops = {}
- for _, dir in ipairs(dirs) do
- local files = io.popen('find "' .. dir .. '" -type f,l')
- if files then
- for file in files:lines() do
- if gears.filesystem.file_readable(file) then
- --[[ local symlink = lfs.symlinkattributes(file, "target")
- if symlink then
- file = dir .. symlink
- end ]]
- local handler = io.open(file, "r")
- if not handler then
- return {}
- end
- while true do
- local line = handler:read()
- if not line then break end
- if line:match("^%[Desktop Entry%]") then
- local name, comment, icon, exec, keywords, terminal, categories, nodisplay = "", "", "", "", "", "", "",
- false
- while true do
- local prop = handler:read() or nil
- if ((not prop) and name ~= "") or prop:match("^%[(.+)%]") then
- local desktop_table = {
- name = name or "",
- comment = comment or "",
- icon = icon or "",
- exec = exec or "",
- keywords = keywords or "",
- terminal = terminal or false,
- categories = categories or "",
- nodisplay = nodisplay or false,
- file = file
- }
- table.insert(desktops, desktop_table)
- break
- end
-
- if prop:match("^Name=") then
- name = prop:match("Name=(.+)")
- end
- if prop:match("^Comment=") then
- comment = prop:match("Comment=(.+)")
- end
- if prop:match("^Icon=") then
- icon = prop:match("Icon=(.+)")
- end
- if prop:match("^Exec=") then
- exec = prop:match("Exec=(.+)"):gsub("%%u", ""):gsub("%%U", ""):gsub("%%f", ""):gsub("%%F", ""):gsub("%%i"
- , ""):gsub("%%c", ""):gsub("%%k", "")
- end
- if prop:match("^Keywords=") then
- keywords = prop:match("Keywords=(.+)")
- end
- if prop:match("^Terminal=") then
- terminal = prop:match("Terminal=(.+)")
- end
- if prop:match("^Categories=") then
- categories = prop:match("Categories=(.+)")
- end
- if prop:match("^NoDisplay=") then
- nodisplay = prop:match("NoDisplay=(.+)")
- if nodisplay == "false" then
- nodisplay = false
- else
- nodisplay = true
- end
- end
- end
- break
- end
- end
- handler:close()
- end
- end
- files:close()
- end
- end
- return desktops
-end
-
----Returns every .desktop file into a table
----@param file table .desktop files
----@return table
-function m.Get_desktop_values(file)
-
- if not file or file == "" then
- return {}
- end
-
- local handler = nil
-
- for _, dir in ipairs(get_paths()) do
- handler = io.open(dir .. "/" .. file, "r")
- if handler then
- break
- end
- end
-
- if not handler then
- return {}
- end
-
- local desktop_table = {}
- while true do
- local line = handler:read()
-
- if not line then
- break
- end
-
- if line:match("^%[Desktop Entry%]") then
- while true do
- local property = handler:read()
- if not property then
- break
- end
-
- if property:match("^%[(.+)%]") then
- return desktop_table
- end
-
- if property:match("^Name=") then
- desktop_table["Name"] = property:match("Name=(.+)")
- elseif property:match("^Exec") then
- -- Second match is to remove the %u, %U and %f, %F some applications use to open a URI/URL. It's not needed here
- desktop_table["Exec"] = property:match("Exec=(.+)"):gsub("%%u", ""):gsub("%%U", ""):gsub("%%f", ""):gsub("%%F"
- , ""):gsub("%%i", ""):gsub("%%c", ""):gsub("%%k", "")
- elseif property:match("^Icon=") then
- desktop_table["Icon"] = property:match("Icon=(.+)")
- end
- end
- end
- end
- handler:close()
- return desktop_table
-end
-
-return m
diff --git a/awesome/src/tools/helpers/audio.lua b/awesome/src/tools/helpers/audio.lua
index d59428e..a71668e 100644
--- a/awesome/src/tools/helpers/audio.lua
+++ b/awesome/src/tools/helpers/audio.lua
@@ -1,116 +1,59 @@
-local awful = require("awful")
+local aspawn = require("awful.spawn")
local capi = {
awesome = awesome,
}
-local lgi = require("lgi")
-
-
-
---[[ ctx:connect(nil, function(state)
- if state == 4 then
- print("Connection is ready")
-
- ctx:get_sinks(function(sinks)
- print(sinks[1])
- end)
- end
-end) ]]
-
---local address = pulse.get_address()
-
---[[ local connection = pulse.get_connection(address)
-
-local core = pulse.get_core(connection)
-
-local sink = pulse.get_device(connection, core:get_sinks()[1])
-
-sink:set_muted(false)
-
---assert(not sink:is_muted())
-
-sink:set_volume_percent({ 75 }) ]]
-
-awful.spawn.with_line_callback(
- [[bash -c "LC_ALL=C pactl subscribe"]],
- {
- stdout = function(line)
- -- Volume changed
- if line:match("on sink") or line:match("on source") then
- capi.awesome.emit_signal("audio::volume_changed")
- capi.awesome.emit_signal("microphone::volume_changed")
- end
- -- Device added/removed
- if line:match("on server") then
- capi.awesome.emit_signal("audio::device_changed")
- capi.awesome.emit_signal("microphone::device_changed")
- end
- end,
- output_done = function()
- -- Kill the pulseaudio subscribe command to prevent it from spawning multiple instances
- awful.spawn.with_shell("pkill pactl && pkill grep")
+aspawn.with_line_callback([[bash -c "LC_ALL=C pactl subscribe"]], {
+ stdout = function(line)
+ -- Volume changed
+ if line:match("on sink") or line:match("on source") then
+ capi.awesome.emit_signal("audio::volume_changed")
+ capi.awesome.emit_signal("microphone::volume_changed")
end
- }
-)
-
-capi.awesome.connect_signal(
- "exit",
- function()
- awful.spawn.with_shell("pkill pactl && pkill grep")
+ -- Device added/removed
+ if line:match("on server") then
+ capi.awesome.emit_signal("audio::device_changed")
+ capi.awesome.emit_signal("microphone::device_changed")
+ end
+ end,
+ output_done = function()
+ aspawn.with_shell("pkill pactl && pkill grep")
end
-)
+})
-capi.awesome.connect_signal(
- "audio::volume_changed",
- function()
- awful.spawn.easy_async_with_shell(
- "./.config/awesome/src/scripts/vol.sh mute",
- function(stdout)
- if stdout == "" or stdout == nil then
- return
- end
- local muted = false
- if stdout:match("yes") then
- muted = true
- end
- awful.spawn.easy_async_with_shell(
- "./.config/awesome/src/scripts/vol.sh volume",
- function(stdout2)
- if stdout == "" or stdout == nil then
- return
- end
- capi.awesome.emit_signal("audio::get", muted, stdout2:gsub("%%", ""):gsub("\n", "") or 0)
- end
- )
+capi.awesome.connect_signal("audio::volume_changed", function()
+ aspawn.easy_async_with_shell("./.config/awesome/src/scripts/vol.sh mute", function(stdout)
+ if stdout == "" or stdout == nil then
+ return
+ end
+ local muted = false
+ if stdout:match("yes") then
+ muted = true
+ end
+ aspawn.easy_async_with_shell("./.config/awesome/src/scripts/vol.sh volume", function(stdout2)
+ if stdout == "" or stdout == nil then
+ return
end
- )
- end
-)
+ capi.awesome.emit_signal("audio::get", muted, stdout2:gsub("%%", ""):gsub("\n", "") or 0)
+ end)
+ end)
+end)
-capi.awesome.connect_signal(
- "microphone::volume_changed",
- function()
- awful.spawn.easy_async_with_shell(
- "./.config/awesome/src/scripts/mic.sh mute",
- function(stdout)
- local muted = false
- if stdout:match("yes") then
- muted = true
- end
- awful.spawn.easy_async_with_shell(
- "./.config/awesome/src/scripts/mic.sh volume",
- function(stdout2)
- if stdout2 == nil or stdout2 == "awful" then
- return
- end
- capi.awesome.emit_signal("microphone::get", muted, stdout2:gsub("%%", ""):gsub("\n", "") or 0)
- end
- )
+capi.awesome.connect_signal("microphone::volume_changed", function()
+ aspawn.easy_async_with_shell("./.config/awesome/src/scripts/mic.sh mute", function(stdout)
+ local muted = false
+ if stdout:match("yes") then
+ muted = true
+ end
+ aspawn.easy_async_with_shell("./.config/awesome/src/scripts/mic.sh volume", function(stdout2)
+ if stdout2 == nil or stdout2 == "awful" then
+ return
end
- )
- end
-)
+ capi.awesome.emit_signal("microphone::get", muted, stdout2:gsub("%%", ""):gsub("\n", "") or 0)
+ end)
+ end)
+end)
capi.awesome.emit_signal("audio::volume_changed")
capi.awesome.emit_signal("microphone::volume_changed")
diff --git a/awesome/src/tools/icon_theme.lua b/awesome/src/tools/icon_theme.lua
deleted file mode 100644
index 86ed5d7..0000000
--- a/awesome/src/tools/icon_theme.lua
+++ /dev/null
@@ -1,16 +0,0 @@
-local lgi = require("lgi")
-local Gtk = lgi.require("Gtk", "3.0")
-
-local gtk_theme = Gtk.IconTheme.new()
-Gtk.IconTheme.set_custom_theme(gtk_theme, User_config.icon_theme)
-
-function Get_gicon_path(app)
- local icon_info = gtk_theme:lookup_by_gicon(app, 64, 0)
- if icon_info then
- local path = icon_info:get_filename()
- if path then
- return path
- end
- end
- return ""
-end
diff --git a/awesome/src/tools/theme_index.lua b/awesome/src/tools/theme_index.lua
deleted file mode 100644
index 95aa11b..0000000
--- a/awesome/src/tools/theme_index.lua
+++ /dev/null
@@ -1,106 +0,0 @@
-local theme_index = { mt = {} }
-
-theme_index.new = function(cls, theme, basedirs)
- local self = {}
- setmetatable(self, { __index = cls })
-
- self.icon_theme_name = theme or User_config.icon_theme
- self.base_dir = nil
- self["Directories"] = {}
- self["Inherits"] = {}
- self.per_directory_keys = {}
-
- local basedir, handler = nil, nil
- for _, dir in ipairs(basedirs) do
- basedir = dir .. "/" .. self.icon_theme_name
- handler = io.open(basedir .. "/index.theme", "r")
- if handler then
- break
- end
- end
-
- if not handler then
- return self
- end
- self.base_dir = basedir
-
- while true do
- local line = handler:read()
-
- if not line then
- break
- end
-
- local header = line:match("^%[(.+)%]$")
- if header then
- if header == "Icon Theme" then
- while true do
- local property = handler:read()
-
- if not property then
- break
- end
-
- if property:match("^%[(.+)%]$") then
- handler:seek("cur", -string.len(property) - 1)
- break
- end
-
- local key, value = property:match("^(%w+)=(.*)$")
- if key == "Directories" or key == "Inherits" then
- string.gsub(value, "([^,]+),?", function(match)
- table.insert(self[key], match)
- end)
- end
- end
-
- else
- local keys = {}
-
- while true do
- local property = handler:read()
- if not property then
- break
- end
-
- if property:match("^%[(.+)%]$") then
- handler:seek("cur", -string.len(property) - 1)
- break
- end
-
- local key, value = property:match("^(%w+)=(%w+)$")
- if key == "Size" or key == "MinSize" or key == "MaxSize" or key == "Threshold" then
- keys[key] = tonumber(value)
- elseif key == "Type" then
- keys[key] = value
- end
- end
-
- if keys["Size"] then
- if not keys["Type"] then keys["Type"] = "Threshold" end
- if not keys["MinSize"] then keys["MinSize"] = keys["Size"] end
- if not keys["MaxSize"] then keys["MaxSize"] = keys["Size"] end
- if not keys["Threshold"] then keys["Threshold"] = 2 end
- self.per_directory_keys[header] = keys
- end
- end
- end
- end
- handler:close()
-
- return self
-end
-
-theme_index.get_subdirectories = function(self)
- return self["Directories"]
-end
-
-theme_index.get_inherits = function(self)
- return self["Inherits"]
-end
-
-theme_index.mt.__call = function(cls, theme, basedirs)
- return theme_index.new(cls, theme, basedirs)
-end
-
-return setmetatable(theme_index, theme_index.mt)
diff --git a/awesome/src/tools/xdg_icon_lookup.lua b/awesome/src/tools/xdg_icon_lookup.lua
deleted file mode 100644
index ed81916..0000000
--- a/awesome/src/tools/xdg_icon_lookup.lua
+++ /dev/null
@@ -1,245 +0,0 @@
------------------------------------------------------
--- Helper to get icons from a program/program name --
------------------------------------------------------
-
-local gears = require("gears")
-local GLib = require("lgi").GLib
-
-local theme_index = require("src.tools.theme_index")
-
-local function get_basedir()
- local dirs = {}
-
- local dir = GLib.build_filenamev({ GLib.get_home_dir(), ".icons" })
- if gears.filesystem.dir_readable(dir) then
- table.insert(dirs, dir)
- end
-
- dir = GLib.build_filenamev({ GLib.get_user_data_dir(), "icons" })
- if gears.filesystem.dir_readable(dir) then table.insert(dirs, dir) end
-
- for _, value in ipairs(GLib.get_system_data_dirs()) do
- dir = GLib.build_filenamev({ value, "icons" })
- if gears.filesystem.dir_readable(dir) then table.insert(dirs, dir) end
- end
-
- local need_usr_share_pixmaps = true
- for _, value in ipairs(GLib.get_system_data_dirs()) do
- dir = GLib.build_filenamev({ value, "icons" })
- if gears.filesystem.dir_readable(dir) then table.insert(dirs, dir) end
- if dir == "/usr/share/pixmaps" then
- need_usr_share_pixmaps = false
- end
- end
-
- dir = "/usr/share/pixmaps"
- if gears.filesystem.dir_readable(dir) then table.insert(dirs, dir) end
- if need_usr_share_pixmaps and gears.filesystem.dir_readable(dir) then
- table.insert(dirs, dir)
- end
-
- return dirs
-end
-
-local xdg_icon_lookup = { mt = {} }
-
-local icon_cache = {}
-
-xdg_icon_lookup.new = function(theme, base_dirs)
- local self = {}
-
- self.icon_theme = theme or User_config.icon_theme
- self.base_directories = base_dirs or get_basedir()
- self.file_extension = { "svg", "png", "xpm" }
-
- if not icon_cache[self.icon_theme] then
- icon_cache[self.icon_theme] = {}
- end
-
- local cache_key = table.concat(self.base_directories, ":")
- if not icon_cache[self.icon_theme][cache_key] then
- icon_cache[self.icon_theme][cache_key] = theme_index(self.icon_theme, self.base_directories)
- end
- self.theme_index = icon_cache[self.icon_theme][cache_key]
-
- return setmetatable(self, { __index = xdg_icon_lookup })
-end
-
----Look for an fallback icon
----@param iconname any
----@return string|nil nil
-local function lookup_fallback_icon(self, iconname)
- for _, dir in ipairs(self.base_directories) do
- for _, ext in ipairs(self.file_extension) do
- local filename = string.format("%s/%s.%s", dir, iconname, ext)
- if gears.filesystem.file_readable(filename) then
- return filename
- end
- end
- end
- return nil
-end
-
----Checkes if the size equals the actual icon size
----@param subdir any
----@param iconsize any
----@return boolean
-local function directory_matches_size(self, subdir, iconsize)
- local type, size, min_size, max_size, threshold = self.theme_index.per_directory_keys[subdir]["Type"],
- self.theme_index.per_directory_keys[subdir]["Size"], self.theme_index.per_directory_keys[subdir]["MinSize"],
- self.theme_index.per_directory_keys[subdir]["MaxSize"], self.theme_index.per_directory_keys[subdir]["Threshold"]
-
- if type == "Fixed" then
- return iconsize == size
- elseif type == "Scalable" then
- return iconsize >= min_size and iconsize <= max_size
- elseif type == "Threshold" then
- return iconsize >= size - threshold and iconsize <= size + threshold
- end
-
- return false
-end
-
----Returns how far off the size is from the actual icon size
----@param subdir table
----@param iconsize number
----@return number
-local function directory_size_distance(self, subdir, iconsize)
- local type, size, min_size, max_size, threshold = self.theme_index.per_directory_keys[subdir]["Type"],
- self.theme_index.per_directory_keys[subdir]["Size"], self.theme_index.per_directory_keys[subdir]["MinSize"],
- self.theme_index.per_directory_keys[subdir]["MaxSize"], self.theme_index.per_directory_keys[subdir]["Threshold"]
-
- if type and min_size and max_size and threshold then
- if type == "Fixed" then
- return math.abs(size - iconsize)
- elseif type == "Scalable" then
- if iconsize < min_size then
- return min_size - iconsize
- elseif iconsize > max_size then
- return iconsize - max_size
- end
- return 0
- elseif type == "Threshold" then
- if iconsize < size - threshold then
- return min_size - iconsize
- elseif iconsize > size + threshold then
- return iconsize - max_size
- end
- return 0
- end
- end
- return 0xffffffff
-end
-
----Checks each and every sub directory for an icon
----@param iconname any
----@param size any
----@return string|unknown|nil path_to_icon
-local function lookup_icon(self, iconname, size)
- local already_checked = {}
- for _, subdir in ipairs(self.theme_index:get_subdirectories()) do
- for _, dir in ipairs(self.base_directories) do
- for _, ext in ipairs(self.file_extension) do
- if directory_matches_size(self, subdir, size) then
- local filename = string.format("%s/%s/%s/%s.%s", dir, self.icon_theme, subdir, iconname, ext)
- if gears.filesystem.file_readable(filename) then
- return filename
- else
- already_checked[filename] = true
- end
- end
- end
- end
- end
- local min_size = 0xffffffff
- local closest_filename = nil
- for _, subdir in ipairs(self.theme_index:get_subdirectories()) do
- local dist = directory_size_distance(self, subdir, size)
- if dist < min_size then
- for _, dir in ipairs(self.base_directories) do
- for _, ext in ipairs(self.file_extension) do
- local filename = string.format("%s/%s/%s/%s.%s", dir, self.icon_theme, subdir, iconname, ext)
- if not already_checked[filename] then
- if gears.filesystem.file_readable(filename) then
- closest_filename = filename
- min_size = dist
- end
- end
- end
- end
- end
- end
- return closest_filename or nil
-end
-
----Check if the icon inherits from another icon theme and search that for an icon
----@param icon any
----@param size any
----@param self any
----@return string|unknown|nil path_to_icon
-local function find_icon_helper(self, icon, size)
- local filename = lookup_icon(self, icon, size)
- if filename then return filename end
-
- -- Exists purely for clients in hope to find a matching icon.
- filename = lookup_icon(self, icon:lower(), size)
- if filename then return filename end
-
- -- !Disabled for now until memory leak can be fixed.
- --[[ for _, parent in ipairs(self.theme_index:get_inherits()) do
- if parent == "hicolor" then
- return
- end
- filename = find_icon_helper(xdg_icon_lookup(parent, self.base_directories), icon, size)
- if filename then return filename end
- end ]]
-
- return nil
-end
-
-local iconcache = {}
----Takes an icon and its props and theme to search for it inside the theme
----@param icon any
----@param size any
----@return string|nil path_to_icon
-function xdg_icon_lookup:find_icon(icon, size)
- size = size or 64
-
-
- if icon_cache[icon] == "" then return nil end
- if iconcache[icon] then return iconcache[icon] end
-
- if not icon or icon == "" then return nil end
-
- if gears.filesystem.file_readable(icon) then
- iconcache[icon] = icon
- return icon
- end
-
- local filename = find_icon_helper(self, icon, size)
- if filename then
- iconcache[icon] = filename
- return filename
- end
-
- filename = find_icon_helper(xdg_icon_lookup("hicolor", self.base_directories), icon, size)
- if filename then
- iconcache[icon] = filename
- return filename
- end
-
- filename = lookup_fallback_icon(self, icon)
- if filename then
- iconcache[icon] = filename
- return filename
- end
-
- iconcache[icon] = ""
- return nil
-end
-
-xdg_icon_lookup.mt.__call = function(_, ...)
- return xdg_icon_lookup.new(...)
-end
-
-return setmetatable(xdg_icon_lookup, xdg_icon_lookup.mt)
diff --git a/awesome/src/widgets/audio.lua b/awesome/src/widgets/audio.lua
index dda890f..a57de72 100644
--- a/awesome/src/widgets/audio.lua
+++ b/awesome/src/widgets/audio.lua
@@ -2,7 +2,7 @@
-- This is the audio widget --
------------------------------
-- Awesome Libs
-local awful = require("awful")
+
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
@@ -61,50 +61,39 @@ return function(s)
widget = wibox.container.background
}
- capi.awesome.connect_signal(
- "audio::get",
- function(muted, volume)
- if muted then
- audio_widget.container.audio_layout.label.visible = false
- audio_widget.container.audio_layout.icon_margin.icon_layout.icon:set_image(
- gears.color.recolor_image(icondir .. "volume-mute" .. ".svg", Theme_config.audio.fg))
- else
- audio_widget.container:set_right(10)
- local icon = icondir .. "volume"
- audio_widget.container.audio_layout.spacing = dpi(5)
- audio_widget.container.audio_layout.label.visible = true
- volume = tonumber(volume)
- if not volume then
- return
- end
- if volume < 1 then
- icon = icon .. "-mute"
- audio_widget.container.audio_layout.spacing = dpi(0)
- audio_widget.container.audio_layout.label.visible = false
- elseif volume >= 1 and volume < 34 then
- icon = icon .. "-low"
- elseif volume >= 34 and volume < 67 then
- icon = icon .. "-medium"
- elseif volume >= 67 then
- icon = icon .. "-high"
- end
- audio_widget.container.audio_layout.label:set_text(volume .. "%")
- audio_widget.container.audio_layout.icon_margin.icon_layout.icon:set_image(
- gears.color.recolor_image(icon .. ".svg", Theme_config.audio.fg))
+ capi.awesome.connect_signal("audio::get", function(muted, volume)
+ if muted then
+ audio_widget.container.audio_layout.label.visible = false
+ audio_widget.container.audio_layout.icon_margin.icon_layout.icon:set_image(
+ gears.color.recolor_image(icondir .. "volume-mute" .. ".svg", Theme_config.audio.fg))
+ else
+ audio_widget.container:set_right(10)
+ local icon = icondir .. "volume"
+ audio_widget.container.audio_layout.spacing = dpi(5)
+ audio_widget.container.audio_layout.label.visible = true
+ volume = tonumber(volume)
+ if not volume then
+ return
end
+ if volume < 1 then
+ icon = icon .. "-mute"
+ audio_widget.container.audio_layout.spacing = dpi(0)
+ audio_widget.container.audio_layout.label.visible = false
+ elseif volume >= 1 and volume < 34 then
+ icon = icon .. "-low"
+ elseif volume >= 34 and volume < 67 then
+ icon = icon .. "-medium"
+ elseif volume >= 67 then
+ icon = icon .. "-high"
+ end
+ audio_widget.container.audio_layout.label:set_text(volume .. "%")
+ audio_widget.container.audio_layout.icon_margin.icon_layout.icon:set_image(
+ gears.color.recolor_image(icon .. ".svg", Theme_config.audio.fg))
end
- )
+ end)
-- Signals
Hover_signal(audio_widget)
- audio_widget:connect_signal(
- "button::press",
- function()
- capi.awesome.emit_signal("volume_controller::toggle", s)
- capi.awesome.emit_signal("volume_controller::toggle:keygrabber")
- end
- )
-
return audio_widget
end
diff --git a/awesome/src/widgets/cpu_info.lua b/awesome/src/widgets/cpu_info.lua
index 7638d4a..32ef7d6 100644
--- a/awesome/src/widgets/cpu_info.lua
+++ b/awesome/src/widgets/cpu_info.lua
@@ -3,7 +3,6 @@
---------------------------------
-- Awesome Libs
-local awful = require("awful")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
@@ -13,7 +12,7 @@ local rubato = require("src.lib.rubato")
require("src.tools.helpers.cpu_freq")
require("src.tools.helpers.cpu_temp")
---!Has to be disabled until rewritten to perform better require("src.tools.helpers.cpu_usage")
+require("src.tools.helpers.cpu_usage")
local capi = {
awesome = awesome,
@@ -22,7 +21,7 @@ local capi = {
local icon_dir = gears.filesystem.get_configuration_dir() .. "src/assets/icons/cpu/"
--TODO: Add tooltip with more CPU and per core information
-return function(widget, _)
+return function(widget)
local cpu_usage_widget = wibox.widget {
{
@@ -153,12 +152,9 @@ return function(widget, _)
widget = wibox.container.background
}
- capi.awesome.connect_signal(
- "update::cpu_usage",
- function(usage)
- cpu_usage_widget.container.cpu_layout.label.text = usage .. "%"
- end
- )
+ capi.awesome.connect_signal("update::cpu_usage", function(usage)
+ cpu_usage_widget.container.cpu_layout.label.text = usage .. "%"
+ end)
local r_timed_cpu_bg = rubato.timed { duration = 2.5 }
local g_timed_cpu_bg = rubato.timed { duration = 2.5 }
@@ -180,42 +176,33 @@ return function(widget, _)
r_timed_cpu_bg.target, g_timed_cpu_bg.target, b_timed_cpu_bg.target = color.utils.hex_to_rgba(newbg)
end
- capi.awesome.connect_signal(
- "update::cpu_temp",
- function(temp)
- local temp_icon
- local temp_color
+ capi.awesome.connect_signal("update::cpu_temp", function(temp)
+ local temp_icon
+ local temp_color
- if temp < 50 then
- temp_color = Theme_config.cpu_temp.bg_low
- temp_icon = icon_dir .. "thermometer-low.svg"
- elseif temp >= 50 and temp < 80 then
- temp_color = Theme_config.cpu_temp.bg_mid
- temp_icon = icon_dir .. "thermometer.svg"
- elseif temp >= 80 then
- temp_color = Theme_config.cpu_temp.bg_high
- temp_icon = icon_dir .. "thermometer-high.svg"
- end
- cpu_temp.container.cpu_layout.icon_margin.icon_layout.icon:set_image(temp_icon)
- set_bg(temp_color)
- cpu_temp.container.cpu_layout.label.text = math.floor(temp) .. "°C"
- capi.awesome.emit_signal("update::cpu_temp_widget", temp, temp_icon)
+ if temp < 50 then
+ temp_color = Theme_config.cpu_temp.bg_low
+ temp_icon = icon_dir .. "thermometer-low.svg"
+ elseif temp >= 50 and temp < 80 then
+ temp_color = Theme_config.cpu_temp.bg_mid
+ temp_icon = icon_dir .. "thermometer.svg"
+ elseif temp >= 80 then
+ temp_color = Theme_config.cpu_temp.bg_high
+ temp_icon = icon_dir .. "thermometer-high.svg"
end
- )
+ cpu_temp.container.cpu_layout.icon_margin.icon_layout.icon:set_image(temp_icon)
+ set_bg(temp_color)
+ cpu_temp.container.cpu_layout.label.text = math.floor(temp) .. "°C"
+ capi.awesome.emit_signal("update::cpu_temp_widget", temp, temp_icon)
+ end)
- capi.awesome.connect_signal(
- "update::cpu_freq_average",
- function(average)
- cpu_clock.container.cpu_layout.label.text = average .. "Mhz"
- end
- )
+ capi.awesome.connect_signal("update::cpu_freq_average", function(average)
+ cpu_clock.container.cpu_layout.label.text = average .. "Mhz"
+ end)
- capi.awesome.connect_signal(
- "update::cpu_freq_core",
- function(freq)
- cpu_clock.container.cpu_layout.label.text = freq .. "Mhz"
- end
- )
+ capi.awesome.connect_signal("update::cpu_freq_core", function(freq)
+ cpu_clock.container.cpu_layout.label.text = freq .. "Mhz"
+ end)
Hover_signal(cpu_temp)
Hover_signal(cpu_usage_widget)
diff --git a/awesome/src/widgets/layout_list.lua b/awesome/src/widgets/layout_list.lua
index ef4c264..f8a44f4 100644
--- a/awesome/src/widgets/layout_list.lua
+++ b/awesome/src/widgets/layout_list.lua
@@ -3,25 +3,32 @@
----------------------------------
-- Awesome Libs
-local awful = require("awful")
+local abutton = require("awful.button")
+local alayout = require("awful.layout")
+local awidget = require("awful.widget")
local dpi = require("beautiful").xresources.apply_dpi
-local gears = require("gears")
+local gtable = require("gears.table")
local wibox = require("wibox")
--#region Layout icons
local layout_path = Theme_path .. "../assets/layout/"
-Theme.layout_floating = layout_path .. "floating.svg"
-Theme.layout_tile = layout_path .. "tile.svg"
-Theme.layout_dwindle = layout_path .. "dwindle.svg"
-Theme.layout_fairh = layout_path .. "fairh.svg"
-Theme.layout_fairv = layout_path .. "fairv.svg"
-Theme.layout_fullscreen = layout_path .. "fullscreen.svg"
-Theme.layout_max = layout_path .. "max.svg"
-Theme.layout_cornerne = layout_path .. "cornerne.svg"
-Theme.layout_cornernw = layout_path .. "cornernw.svg"
-Theme.layout_cornerse = layout_path .. "cornerse.svg"
-Theme.layout_cornersw = layout_path .. "cornersw.svg"
+Theme.layout_cornerne = layout_path .. "cornerne.png"
+Theme.layout_cornernw = layout_path .. "cornernw.png"
+Theme.layout_cornerse = layout_path .. "cornerse.png"
+Theme.layout_cornersw = layout_path .. "cornersw.png"
+Theme.layout_dwindle = layout_path .. "dwindle.png"
+Theme.layout_fairh = layout_path .. "fairh.png"
+Theme.layout_fairv = layout_path .. "fairv.png"
+Theme.layout_floating = layout_path .. "floating.png"
+Theme.layout_fullscreen = layout_path .. "fullscreen.png"
+Theme.layout_magnifier = layout_path .. "magnifier.png"
+Theme.layout_max = layout_path .. "max.png"
+Theme.layout_spiral = layout_path .. "spiral.png"
+Theme.layout_tile = layout_path .. "tile.png"
+Theme.layout_tilebottom = layout_path .. "tilebottom.png"
+Theme.layout_tileleft = layout_path .. "tileleft.png"
+Theme.layout_tiletop = layout_path .. "tiletop.png"
--#endregion
-- Returns the layoutbox widget
@@ -29,32 +36,40 @@ return function()
local layout = wibox.widget {
{
{
- awful.widget.layoutbox(),
- id = "icon_layout",
- widget = wibox.container.place
+ {
+ awidget.layoutbox(),
+ widget = wibox.container.place,
+ halign = "center",
+ valign = "center"
+ },
+ left = dpi(5),
+ right = dpi(5),
+ widget = wibox.container.margin,
},
- id = "icon_margin",
- left = dpi(5),
- right = dpi(5),
- forced_width = dpi(40),
- widget = wibox.container.margin
+ widget = wibox.container.constraint,
+ width = dpi(40)
},
bg = Theme_config.layout_list.bg,
- shape = function(cr, width, height)
- gears.shape.rounded_rect(cr, width, height, dpi(6))
- end,
+ shape = Theme_config.layout_list.shape,
widget = wibox.container.background
}
- -- Signals
Hover_signal(layout)
- layout:connect_signal(
- "button::press",
- function()
- awful.layout.inc(-1)
- end
- )
+ layout:buttons(gtable.join(
+ abutton({}, 1, function()
+ alayout.inc(1)
+ end),
+ abutton({}, 3, function()
+ alayout.inc(-1)
+ end),
+ abutton({}, 4, function()
+ alayout.inc(1)
+ end),
+ abutton({}, 5, function()
+ alayout.inc(-1)
+ end)
+ ))
return layout
end
diff --git a/awesome/todo.md b/awesome/todo.md
index 30a330b..36931db 100644
--- a/awesome/todo.md
+++ b/awesome/todo.md
@@ -16,6 +16,15 @@
- Algorithm to select the best search match
- Keep track of most launched applications and serve them over others
+### Audio [0% Done]
+
+#### TODO
+
+- Reliabely fetch audio devices
+- Switch inputs
+- Fetch programs that make audio
+- Mute toggle
+
### Backlight [100% Done]
#### Features
@@ -42,6 +51,7 @@
#### TODO
+- Don't try to create a bluetooth proxy if there is no bluetooth adapter
- Getting and asking for a passcode
- "Greying out" non avaiable options in the dropdown
@@ -65,16 +75,18 @@
### Desktop [40% Done]
+#### Features
+
- Create desktop icons, folders or files
- Drag and drop desktop icons
- Context menu
- Saves accross restart
- Desktop context menu
-TODO
+#### TODO
- Actions for the context menu
-- Open width in context menu
+- "Open with" in context menu
- Drag across multiple screens
- Proper size calculation for desktop icons and desktop
- Multiscreen support in general
@@ -83,4 +95,73 @@ TODO
- Drag-select
- Cross-DE support (e.g. use the same desktop icons as used in KDE or Mate ...)
+### crylia_bar [100% Done]
+
+#### Features
+
+- Add widgets into three different bars (Left, Center, Right)
+- Hide when no widget is present
+- Auto resize based on widgets size
+- Automatically loads widgets from config
+
+### crylia_wibox [? Done]
+
+#### Features
+
+- Single bar that can be placed at the bottom
+- Automatically loads widgets from config
+
+#### TODO
+
+### Network Controller [50% Done]
+
+#### Features
+
+- List and show all WiFi-AccessPoints
+- Connect to an AccessPoint
+- Enter a password for each AccessPoint
+
+#### TODO
+
+- Toggle WiFi On/Off
+- Mark the connected AccessPoint
+- Send signals for connected AccessPoints wifi strength
+- Send notifications for various events
+- Only show the Module when a WiFi Agent exists
+
+### Notification Center [95% Done]
+
+#### Features
+
+- Multiple widgets (Weather, Profile, Status Bars, Music, Notification, Date Time)
+- Keeps track of notification time sent
+- Displays bars which visualize various system resources (CPU/GPU-Usage/Temp, Ram, Audio Volume,Mic Volume, Battery, Backlight)
+- Fetches the user Profile picture and different informations like name, OS etc
+- Shows the current weather with the openweather.com API
+- Music widget which can fetch an album cover, song metadata etc
+- Do not Disturb button to hide notifications
+
+#### TODO
+
+- Cleanup
+- _Maybe_ add more widgets
+
+### Powermenu [100% Done]
+
+#### Feature
+
+- Logout, Reboot, Shutdown, Lock or **Sus**pend system
+- Display user profile picture and name or hostname
+
+### Window Switcher[90% Done]
+
+#### Features
+
+- Alt-Tab to cycle trough windows and switch to the tag and focus them
+
+#### TODO
+
+- "Toggle" alt tab to switch between two windows (keep track which was the last one as put it as the first one)
+- Rewrite and try to make more performant
+
## Widgets
diff --git a/awesome/wibox/layout/fixed.lua b/awesome/wibox/layout/fixed.lua
index 7b34eed..51522b4 100644
--- a/awesome/wibox/layout/fixed.lua
+++ b/awesome/wibox/layout/fixed.lua
@@ -23,7 +23,6 @@
-- @supermodule wibox.widget.base
---------------------------------------------------------------------------
----@diagnostic disable-next-line: deprecated
local unpack = unpack or table.unpack -- luacheck: globals unpack (compatibility with Lua 5.1)
local base = require("wibox.widget.base")
local table = table
@@ -364,7 +363,7 @@ function fixed:fit(context, orig_width, orig_height)
local is_enough
if is_y then
- is_enough = height_left >= h
+ is_enough = h > 0 and height_left >= h
if is_enough then
used_max = math.max(used_max, w)