added more widgets, rewritten folder structure

This commit is contained in:
Crylia
2021-11-28 14:58:07 +01:00
parent 7f28224bf1
commit 32ba8ff3a8
65 changed files with 832 additions and 1873 deletions

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
awesome/.idea
awesome/.vscode
awesome/start-xephyr.sh

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -2,7 +2,7 @@
local awful = require("awful")
local gears = require("gears")
local modkey = RC.vars.modkey
local modkey = user_vars.vars.modkey
return function (globalkeys)
for i = 1, 9 do

View File

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

View File

@@ -2,7 +2,7 @@
local awful = require("awful")
local gears = require("gears")
local modkey = RC.vars.modkey
local modkey = user_vars.vars.modkey
return function ()
local clientbuttons = gears.table.join(

View File

@@ -2,7 +2,7 @@
local awful = require("awful")
local gears = require("gears")
local modkey = RC.vars.modkey
local modkey = user_vars.vars.modkey
return function ()
local clientkeys = gears.table.join(
@@ -21,11 +21,11 @@ return function ()
function(c)
c:kill()
end,
{ description = "Close window", group = "Client" }
{ description = "Close focused client", group = "Client" }
),
awful.key(
{ modkey },
"space",
"g",
awful.client.floating.toggle,
{ description = "Toggle floating window", group = "Client" }
),
@@ -36,16 +36,7 @@ return function ()
c.maximized = not c.maximized
c:raise()
end ,
{description = "(un)maximize", group = "client"}
),
awful.key(
{ modkey, "Control" },
"m",
function (c)
c.maximized_vertical = not c.maximized_vertical
c:raise()
end,
{ description = "Unmaximize", group = "client"}
{description = "(un)maximize", group = "Client"}
)
)
return clientkeys

View File

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

View File

@@ -1,55 +0,0 @@
-- Awesome Libs
local awful = require("awful")
local gears = require("gears")
local _M = {}
local modkey = RC.vars.modkey
function _M.get()
local clientkeys = gears.table.join(
awful.key(
{ modkey },
"f",
function(c)
c.fullscreen = not c.fullscreen
c:raise()
end,
{ description = "Toggle fullscreen", group = "Client" }
),
awful.key(
{ modkey },
"q",
function(c)
c:kill()
end,
{ description = "Close window", group = "Client" }
),
awful.key(
{ modkey },
"space",
awful.client.floating.toggle,
{ description = "Toggle floating window", group = "Client" }
),
awful.key(
{ modkey},
"m",
function (c)
c.maximized = not c.maximized
c:raise()
end ,
{description = "(un)maximize", group = "client"}
),
awful.key(
{ modkey, "Control" },
"m",
function (c)
c.maximized_vertical = not c.maximized_vertical
c:raise()
end,
{ description = "Unmaximize", group = "client"}
)
)
return clientkeys
end
return _M.get

View File

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

View File

@@ -4,7 +4,7 @@ local awful = require("awful")
local hotkeys_popup = require("awful.hotkeys_popup")
-- Resource Configuration
local modkey = RC.vars.modkey
local modkey = user_vars.vars.modkey
return function()
local globalkeys = gears.table.join(
@@ -12,34 +12,34 @@ return function()
{ modkey },
"s",
hotkeys_popup.show_help,
{description="Cheet Sheet", group="Awesome"}
{description="Cheat sheet", group="Awesome"}
),
-- Tag browsing
awful.key(
{ modkey },
"Left",
awful.tag.viewprev,
{description = "View previous", group = "Tag"}
{description = "View previous tag", group = "Tag"}
),
awful.key(
{ modkey },
"Right",
awful.tag.viewnext,
{description = "View next", group = "Tag"}
{description = "View next tag", group = "Tag"}
),
awful.key(
{ modkey },
"Escape",
awful.tag.history.restore,
{description = "Go back", group = "Tag"}
{description = "Go back to last tag", group = "Tag"}
),
awful.key(
{ modkey },
"j",
function ()
awful.client.focus.byidx( 1)
awful.client.focus.byidx(1)
end,
{description = "Focus next by index", group = "Client"}
{description = "Focus next client by index", group = "Client"}
),
awful.key(
{ modkey },
@@ -47,21 +47,21 @@ return function()
function ()
awful.client.focus.byidx(-1)
end,
{description = "Focus previous by index", group = "Client"}
{description = "Focus previous client by index", group = "Client"}
),
awful.key(
{ modkey },
"w",
function ()
RC.MainMenu:show()
user_vars.main_menu:show()
end,
{description = "Show main menu", group = "Awesome"}
{description = "Show context menu", group = "Awesome"}
),
awful.key(
{ modkey, "Shift" },
"j",
function ()
awful.client.swap.byidx( 1)
awful.client.swap.byidx(1)
end,
{description = "Swap with next client by index", group = "Client"}
),
@@ -69,7 +69,7 @@ return function()
{ modkey, "Shift" },
"k",
function ()
awful.client.swap.byidx( -1)
awful.client.swap.byidx(-1)
end,
{description = "Swap with previous client by index", group = "Client"}
),
@@ -77,7 +77,7 @@ return function()
{ modkey, "Control" },
"j",
function ()
awful.screen.focus_relative( 1)
awful.screen.focus_relative(1)
end,
{description = "Focus the next screen", group = "Screen"}
),
@@ -93,25 +93,15 @@ return function()
{ modkey },
"u",
awful.client.urgent.jumpto,
{description = "Jump to urgent client", group = "Client"}),
awful.key(
{ modkey },
"Tab",
function ()
awful.client.focus.history.previous()
if client.focus then
client.focus:raise()
end
end,
{description = "Go back", group = "Client"}
{description = "Jump to urgent client", group = "Client"}
),
awful.key(
{ modkey },
"Return",
function ()
awful.spawn("alacritty -o font.size=8")
awful.spawn(user_vars.vars.terminal)
end,
{description = "Open terminal", group = "Launcher"}
{description = "Open terminal", group = "Applications"}
),
awful.key(
{ modkey, "Control" },
@@ -125,7 +115,7 @@ return function()
function ()
awful.tag.incmwfact( 0.05)
end,
{description = "Increase master width factor", group = "Layout"}
{description = "Increase client width", group = "Layout"}
),
awful.key(
{ modkey },
@@ -133,29 +123,13 @@ return function()
function ()
awful.tag.incmwfact(-0.05)
end,
{description = "Decrease master width factor", group = "Layout"}
),
awful.key(
{ modkey, "Shift" },
"h",
function ()
awful.tag.incnmaster( 1, nil, true)
end,
{description = "Increase the number of master clients", group = "Layout"}
),
awful.key(
{ modkey, "Shift" },
"l",
function ()
awful.tag.incnmaster(-1, nil, true)
end,
{description = "Decrease the number of master clients", group = "Layout"}
{description = "Decrease client width", group = "Layout"}
),
awful.key(
{ modkey, "Control" },
"h",
function ()
awful.tag.incncol( 1, nil, true)
awful.tag.incncol(1, nil, true)
end,
{description = "Increase the number of columns", group = "Layout"}
),
@@ -173,101 +147,39 @@ return function()
function ()
awful.layout.inc(-1)
end,
{description = "Select previous", group = "Layout"}
{description = "Select previous layout", group = "Layout"}
),
awful.key(
{ modkey, "Control" },
"n",
{ modkey, "Shift" },
"Return",
function ()
local c = awful.client.restore()
-- Focus restored client
if c then
c:emit_signal(
"request::activate", "key.unminimize", {raise = true}
)
end
awful.layout.inc(1)
end,
{description = "Restore minimized", group = "Client"}
),
awful.key(
{ modkey, "Control" },
"Up",
function ()
awful.client.moveresize( 0, 0, 0, -20)
end
),
awful.key(
{ modkey, "Control" },
"Down",
function ()
awful.client.moveresize( 0, 0, 0, 20)
end
),
awful.key(
{ modkey, "Control" },
"Left",
function ()
awful.client.moveresize( 0, 0, -20, 0)
end
),
awful.key(
{ modkey, "Control" },
"Right",
function ()
awful.client.moveresize( 0, 0, 20, 0)
end
),
awful.key(
{ modkey, "Shift" },
"Down",
function ()
awful.client.moveresize( 0, 20, 0, 0)
end
),
awful.key(
{ modkey, "Shift" },
"Up",
function ()
awful.client.moveresize( 0, -20, 0, 0)
end
),
awful.key(
{ modkey, "Shift" },
"Left",
function ()
awful.client.moveresize(-20, 0, 0, 0)
end
),
awful.key(
{ modkey, "Shift" },
"Right",
function ()
awful.client.moveresize( 20, 0, 0, 0)
end
{description = "Select next layout", group = "Layout"}
),
awful.key(
{ modkey },
"d",
function ()
awful.spawn("rofi -show drun -theme ~/.config/rofi/appmenu/rofi.rasi")
awful.spawn("rofi -show drun -theme ~/.config/rofi/launcher/launcher.rasi")
end,
{ descripton = "Application searcher", group = "Application" }
{ descripton = "Application launcher", group = "Application" }
),
awful.key(
{ modkey },
"Tab",
function ()
awful.spawn("rofi -show window -theme ~/.config/rofi/appmenu/rofi.rasi")
awful.spawn("rofi -show window -theme ~/.config/rofi/launcher/launcher.rasi")
end,
{ descripton = "Show all open windows", group = "Application" }
{ descripton = "Client switcher (alt+tab)", group = "Application" }
),
awful.key(
{ modkey },
"e",
function ()
awful.spawn("thunar")
awful.spawn(user_vars.vars.file_manager)
end,
{ descripton = "Open Thunar File Manager", group = "System" }
{ descripton = "Open file manager", group = "System" }
),
awful.key(
{ modkey, "Shift" },
@@ -275,76 +187,89 @@ return function()
function ()
awesome.emit_signal("module::powermenu:show")
end,
{ descripton = "Open the exit window", group = "System" }
{ descripton = "Session options", group = "System" }
),
awful.key(
{ },
"Print",
function ()
awful.spawn("flameshot gui")
end
awful.spawn(user_vars.vars.screenshot_program)
end,
{ description = "Screenshot", group = "Applications" }
),
awful.key(
{ },
"XF86AudioLowerVolume",
function (c)
awful.spawn("amixer sset Master 5%-")
awful.spawn("pactl set-sink-volume @DEFAULT_SINK@ -2%")
awesome.emit_signal("widget::volume")
awesome.emit_signal("module::volume_osd:show", true)
awesome.emit_signal("module::slider:update")
awesome.emit_signal("widget::volume_osd:rerun")
end
end,
{ description = "Lower volume", group = "System" }
),
awful.key(
{ },
"XF86AudioRaiseVolume",
function (c)
awful.spawn("amixer sset Master 5%+")
awful.spawn.easy_async_with_shell(
[[ pacmd list-sinks | grep "volume: front" | awk '{print $5}' ]],
function (stdout)
stdout = stdout:gsub("%%", "")
local volume = tonumber(stdout) or 0
if volume <= 98 then
awful.spawn("pactl set-sink-volume @DEFAULT_SINK@ +2%")
end
end)
awesome.emit_signal("widget::volume")
awesome.emit_signal("module::volume_osd:show", true)
awesome.emit_signal("module::slider:update")
awesome.emit_signal("widget::volume_osd:rerun")
end
end,
{ description = "Increase volume", group = "System" }
),
awful.key(
{ },
"XF86AudioMute",
function (c)
awful.spawn("pactl -- set-sink-mute @DEFAULT_SINK@ toggle")
awful.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle")
awesome.emit_signal("widget::volume")
awesome.emit_signal("module::volume_osd:show", true)
awesome.emit_signal("module::slider:update")
awesome.emit_signal("widget::volume_osd:rerun")
end
end,
{ description = "Mute volume", group = "System" }
),
awful.key(
{ modkey },
"F5",
{ },
"XF86MonBrightnessUp",
function (c)
awful.spawn("xbacklight -inc 10%+")
awful.spawn("xbacklight -time 100 -inc 10%+")
awesome.emit_signal("module::brightness_osd:show", true)
awesome.emit_signal("module::brightness_slider:update")
awesome.emit_signal("widget::brightness_osd:rerun")
end
end,
{ description = "Raise backlight brightness", group = "System" }
),
awful.key(
{ modkey },
"F4",
{ },
"XF86MonBrightnessDown",
function (c)
awful.spawn("xbacklight -dec 10%-")
awful.spawn("xbacklight -time 100 -dec 10%-")
awesome.emit_signal("widget::brightness_osd:rerun")
awesome.emit_signal("module::brightness_osd:show", true)
awesome.emit_signal("module::brightness_slider:update")
end
end,
{ description = "Lower backlight brightness", group = "System" }
),
awful.key(
{ modkey, "Shift" },
"q",
{modkey},
"space",
function ()
local t = awful.screen.focused().selected_tag
t:delete()
end
awesome.emit_signal("kblayout::toggle")
end,
{ description = "Toggle keyboard layout", group = "System" }
)
)

View File

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

View File

@@ -1,364 +0,0 @@
-- Awesome Libs
local gears = require("gears")
local awful = require("awful")
local hotkeys_popup = require("awful.hotkeys_popup")
-- Resource Configuration
local modkey = RC.vars.modkey
local terminal = RC.vars.terminal
local _M = {}
function _M.get()
local globalkeys = gears.table.join(
awful.key(
{ modkey },
"s",
hotkeys_popup.show_help,
{description="Cheet Sheet", group="Awesome"}
),
-- Tag browsing
awful.key(
{ modkey },
"Left",
awful.tag.viewprev,
{description = "View previous", group = "Tag"}
),
awful.key(
{ modkey },
"Right",
awful.tag.viewnext,
{description = "View next", group = "Tag"}
),
awful.key(
{ modkey },
"Escape",
awful.tag.history.restore,
{description = "Go back", group = "Tag"}
),
awful.key(
{ modkey },
"j",
function ()
awful.client.focus.byidx( 1)
end,
{description = "Focus next by index", group = "Client"}
),
awful.key(
{ modkey },
"k",
function ()
awful.client.focus.byidx(-1)
end,
{description = "Focus previous by index", group = "Client"}
),
awful.key(
{ modkey },
"w",
function ()
RC.mainmenu:show()
end,
{description = "Show main menu", group = "Awesome"}
),
awful.key(
{ modkey, "Shift" },
"j",
function ()
awful.client.swap.byidx( 1)
end,
{description = "Swap with next client by index", group = "Client"}
),
awful.key(
{ modkey, "Shift" },
"k",
function ()
awful.client.swap.byidx( -1)
end,
{description = "Swap with previous client by index", group = "Client"}
),
awful.key(
{ modkey, "Control" },
"j",
function ()
awful.screen.focus_relative( 1)
end,
{description = "Focus the next screen", group = "Screen"}
),
awful.key(
{ modkey, "Control" },
"k",
function ()
awful.screen.focus_relative(-1)
end,
{description = "Focus the previous screen", group = "Screen"}
),
awful.key(
{ modkey },
"u",
awful.client.urgent.jumpto,
{description = "Jump to urgent client", group = "Client"}),
awful.key(
{ modkey },
"Tab",
function ()
awful.client.focus.history.previous()
if client.focus then
client.focus:raise()
end
end,
{description = "Go back", group = "Client"}
),
awful.key(
{ modkey },
"Return",
function ()
awful.spawn("alacritty -o font.size=8.0")
end,
{description = "Open terminal", group = "Launcher"}
),
awful.key(
{ modkey, "Control" },
"r",
awesome.restart,
{description = "Reload awesome", group = "Awesome"}
),
awful.key(
{ modkey },
"l",
function ()
awful.tag.incmwfact( 0.05)
end,
{description = "Increase master width factor", group = "Layout"}
),
awful.key(
{ modkey },
"h",
function ()
awful.tag.incmwfact(-0.05)
end,
{description = "Decrease master width factor", group = "Layout"}
),
awful.key(
{ modkey, "Shift" },
"h",
function ()
awful.tag.incnmaster( 1, nil, true)
end,
{description = "Increase the number of master clients", group = "Layout"}
),
awful.key(
{ modkey, "Shift" },
"l",
function ()
awful.tag.incnmaster(-1, nil, true)
end,
{description = "Decrease the number of master clients", group = "Layout"}
),
awful.key(
{ modkey, "Control" },
"h",
function ()
awful.tag.incncol( 1, nil, true)
end,
{description = "Increase the number of columns", group = "Layout"}
),
awful.key(
{ modkey, "Control" },
"l",
function ()
awful.tag.incncol(-1, nil, true)
end,
{description = "Decrease the number of columns", group = "Layout"}
),
awful.key(
{ modkey, "Shift" },
"space",
function ()
awful.layout.inc(-1)
end,
{description = "Select previous", group = "Layout"}
),
awful.key(
{ modkey, "Control" },
"n",
function ()
local c = awful.client.restore()
-- Focus restored client
if c then
c:emit_signal(
"request::activate", "key.unminimize", {raise = true}
)
end
end,
{description = "Restore minimized", group = "Client"}
),
awful.key(
{ modkey, "Control" },
"Up",
function ()
awful.client.moveresize( 0, 0, 0, -20)
end
),
awful.key(
{ modkey, "Control" },
"Down",
function ()
awful.client.moveresize( 0, 0, 0, 20)
end
),
awful.key(
{ modkey, "Control" },
"Left",
function ()
awful.client.moveresize( 0, 0, -20, 0)
end
),
awful.key(
{ modkey, "Control" },
"Right",
function ()
awful.client.moveresize( 0, 0, 20, 0)
end
),
awful.key(
{ modkey, "Shift" },
"Down",
function ()
awful.client.moveresize( 0, 20, 0, 0)
end
),
awful.key(
{ modkey, "Shift" },
"Up",
function ()
awful.client.moveresize( 0, -20, 0, 0)
end
),
awful.key(
{ modkey, "Shift" },
"Left",
function ()
awful.client.moveresize(-20, 0, 0, 0)
end
),
awful.key(
{ modkey, "Shift" },
"Right",
function ()
awful.client.moveresize( 20, 0, 0, 0)
end
),
awful.key(
{ modkey },
"d",
function ()
awful.spawn("rofi -show drun -theme ~/.config/rofi/appmenu/rofi.rasi")
end,
{ descripton = "Start a Application", group = "Application" }
),
awful.key(
{ modkey },
"Tab",
function ()
awful.spawn("rofi -show window -theme ~/.config/rofi/appmenu/rofi.rasi")
end,
{ descripton = "Start a Application", group = "Application" }
),
awful.key(
{ modkey },
"e",
function ()
awful.spawn('nautilus')
end,
{ descripton = "Start a Application", group = "Application" }
),
awful.key(
{ modkey, "Shift" },
"e",
function ()
awesome.emit_signal("module::powermenu:show")
end,
{ descripton = "Open the exit window", group = "System" }
),
awful.key(
{ },
"Print",
function ()
awful.spawn("flameshot gui")
end
),
awful.key(
{ },
"XF86AudioLowerVolume",
function (c)
awful.spawn("amixer sset Master 5%-")
awesome.emit_signal("widget::volume")
awesome.emit_signal("module::volume_osd:show", true)
awesome.emit_signal("module::slider:update")
awesome.emit_signal("widget::volume_osd:rerun")
end
),
awful.key(
{ },
"XF86AudioRaiseVolume",
function (c)
awful.spawn("amixer sset Master 5%+")
awesome.emit_signal("widget::volume")
awesome.emit_signal("module::volume_osd:show", true)
awesome.emit_signal("module::slider:update")
awesome.emit_signal("widget::volume_osd:rerun")
end
),
awful.key(
{ },
"XF86AudioMute",
function (c)
awful.spawn("pactl -- set-sink-mute @DEFAULT_SINK@ toggle")
awesome.emit_signal("widget::volume")
awesome.emit_signal("module::volume_osd:show", true)
awesome.emit_signal("module::slider:update")
awesome.emit_signal("widget::volume_osd:rerun")
end
),
awful.key(
{ modkey },
"F5",
function (c)
awful.spawn("xbacklight -inc 10%+")
awesome.emit_signal("module::brightness_osd:show", true)
awesome.emit_signal("module::brightness_slider:update")
awesome.emit_signal("widget::brightness_osd:rerun")
end
),
awful.key(
{ modkey },
"F4",
function (c)
awful.spawn("xbacklight -dec 10%-")
awesome.emit_signal("widget::brightness_osd:rerun")
awesome.emit_signal("module::brightness_osd:show", true)
awesome.emit_signal("module::brightness_slider:update")
end
),
awful.key(
{ modkey, "Shift" },
"q",
function ()
local t = awful.screen.focused().selected_tag
t:delete()
end
),
awful.key(
{ },
"Escape",
function ()
awesome.emit_signal("module::powermenu:hide")
end
)
)
return globalkeys
end
return setmetatable({ }, { __call = function(_, ...) return _M.get(...) end })

View File

@@ -14,7 +14,6 @@ return function (s, widget)
widget = wibox.container.background,
ontop = false,
bg = colors.color["Grey900"],
stretch = false,
visible = true,
maximum_width = dpi(500),
placement = function (c) awful.placement.top(c, {margins = dpi(10)}) end,
@@ -24,11 +23,13 @@ return function (s, widget)
}
top_center:setup{
nil,
{
widget,
margins = dpi(6),
widget = wibox.container.margin
},
nil,
forced_height = 45,
layout = wibox.layout.align.horizontal
}

View File

@@ -25,10 +25,11 @@ awful.screen.connect_for_each_screen(
s.kblayout = require("theme.crylia.widgets.kblayout")()
s.taglist = require("theme.crylia.widgets.taglist")(s)
s.tasklist = require("theme.crylia.widgets.tasklist")(s)
s.systray = require("theme.crylia.widgets.systray")(s)
-- Bars
require("CryliaBar.LeftBar")(s, {s.layoutlist, s.taglist})
require("CryliaBar.CenterBar")(s, s.tasklist)
require("CryliaBar.RightBar")(s, {s.battery, s.network, s.bluetooth, s.audio, s.kblayout, s.date, s.clock,s.powerbutton})
require("crylia_bar.left_bar")(s, {s.layoutlist, s.systray, s.taglist})
require("crylia_bar.center_bar")(s, s.tasklist)
require("crylia_bar.right_bar")(s, {s.battery, s.network, s.bluetooth, s.audio, s.kblayout, s.date, s.clock,s.powerbutton})
end
)

View File

@@ -14,12 +14,11 @@ return function (s, widgets)
widget = wibox.container.background,
ontop = false,
bg = colors.color["Grey900"],
stretch = false,
visible = true,
maximum_width = dpi(650),
placement = function(c) awful.placement.top_left(c, {margins = dpi(10)}) end,
shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 10)
gears.shape.rounded_rect(cr, width, height, 5)
end
}
@@ -28,8 +27,6 @@ return function (s, widgets)
}
top_left:setup {
nil,
nil,
{
{
widgets[1],
@@ -41,9 +38,16 @@ return function (s, widgets)
margins = dpi(6),
widget = wibox.container.margin
},
{
widgets[3],
margins = dpi(6),
widget = wibox.container.margin
},
forced_height = 45,
layout = wibox.layout.fixed.horizontal
},
layout = wibox.layout.align.horizontal
nil,
nil,
layout = wibox.layout.fixed.horizontal
}
end

View File

@@ -14,12 +14,11 @@ return function (s, widgets)
widget = wibox.container.background,
ontop = false,
bg = colors.color["Grey900"],
stretch = false,
visible = true,
screen = s,
placement = function (c) awful.placement.top_right(c, {margins = dpi(10)}) end,
shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 10)
gears.shape.rounded_rect(cr, width, height, 5)
end
}

View File

@@ -1,449 +0,0 @@
--------------------------------------------------------------------------------------------------------------
-- This is the statusbar, every widget, module and so on is combined to all the stuff you see on the screen --
--------------------------------------------------------------------------------------------------------------
-- Awesome Libs
local awful = require("awful")
local beautiful = require("beautiful")
local colors = require ("theme.crylia.colors")
local dpi = beautiful.xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
local tasklist = require("theme.crylia.widgets.tasklist")
local taglist = require("theme.crylia.widgets.taglist")
awful.screen.connect_for_each_screen(
function (s)
-- Bar for the layoutbox, taglist and newtag button
s.top_left = awful.popup {
widget = wibox.container.background,
ontop = false,
bg = colors.color["Grey900"],
stretch = false,
visible = true,
placement = function (c)
awful.placement.top_left(c, {margins = dpi(10)})
end,
shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
end
}
-- Bar for the tasklist
s.top_center = awful.popup{
widget = {
margins = dpi(10),
widget = wibox.container.margin
},
ontop = false,
bg = colors.color["Grey900"],
visible = true,
stretch = false,
maximum_width = 600,
placement = function (c)
awful.placement.top(c, {margins = dpi(10)})
end,
shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
end,
layout = wibox.layout.flex.horizontal
}
-- Bar for all the widgets
s.top_right = awful.popup {
widget = {
margins = dpi(10),
widget = wibox.container.margin
},
ontop = false,
bg = "#212121",
visible = true,
placement = function (c)
awful.placement.top_right(c, {margins = dpi(10)})
end,
shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
end
}
-- Calendar OSD container
s.calendar_osd_container = awful.popup{
widget = {},
ontop = true,
shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 10)
end,
border_width = dpi(0),
border_color = colors.color["Grey800"],
placement = function (c)
awful.placement.top_right(c, {
margins = {
right = dpi(100),
top = dpi(60)
}
})
end,
visible = false
}
local hide_osd = gears.timer{
timeout = 0.25,
autostart = true,
callback = function ()
s.calendar_osd_container.visible = false
end
}
-- OSD Container
s.volume_container = awful.popup{
widget = {
margins = dpi(10),
widget = wibox.container.margin
},
ontop = true,
bg = "#00000000",
border_width = dpi(0),
border_color = "#454545",
shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 10)
end,
placement = function (c)
awful.placement.bottom_right(c, {margins = dpi(10)})
end,
visible = false,
}
local hide_volume_osd = gears.timer{
timeout = 1,
autostart = true,
callback = function ()
s.volume_container.visible = false
end
}
s.brightness_container = awful.popup{
widget = {
margins = dpi(10),
widget = wibox.container.margin
},
ontop = true,
bg = "#00000000",
border_width = dpi(0),
border_color = "#454545",
shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 10)
end,
placement = function (c)
awful.placement.bottom_right(c, {margins = dpi(10)})
end,
visible = false
}
local hide_brightness_osd = gears.timer{
timeout = 1,
autostart = true,
callback = function ()
s.brightness_container.visible = false
end
}
s.powermenu_container = wibox{
screen = s,
type = "splash",
visible = false,
ontop = true,
bg = "#21212188",
height = s.geometry.height,
width = s.geometry.width,
x = s.geometry.x,
y = s.geometry.y
}
-- All the modules and widgets
s.volume_osd = require("theme.crylia.modules.volume_osd")()
s.brightness_osd = require("theme.crylia.modules.brightness_osd")()
s.battery = require("theme.crylia.widgets.battery")()
s.network = require("theme.crylia.widgets.network")()
s.audio = require("theme.crylia.widgets.audio")()
s.date = require("theme.crylia.widgets.date")()
s.clock = require("theme.crylia.widgets.clock")()
s.bluetooth = require("theme.crylia.widgets.bluetooth")()
s.calendar_osd = require("theme.crylia.modules.calendar_osd")()
s.layoutlist = require("theme.crylia.widgets.layout_list")()
s.powerbutton = require("theme.crylia.widgets.power")()
s.kblayout = require("theme.crylia.widgets.kblayout")()
s.powermenu = require("theme.crylia.modules.powermenu")()
s.top_left:setup {
nil,
nil,
{
{
s.layoutlist,
margins = dpi(6),
widget = wibox.container.margin
},
{
taglist(s),
margins = dpi(6),
widget = wibox.container.margin
},
forced_height = 45,
layout = wibox.layout.fixed.horizontal
},
layout = wibox.layout.align.horizontal
}
-- This is the space from top down till the window starts
s.top_left:struts{
top = 55
}
s.top_center:setup{
{
tasklist(s),
margins = dpi(6),
widget = wibox.container.margin
},
forced_height = 45,
layout = wibox.layout.align.horizontal
}
s.top_right:setup {
nil,
nil,
{
{
s.battery,
left = dpi(6),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
s.network,
left = dpi(3),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
s.bluetooth,
left = dpi(3),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
s.audio,
left = dpi(3),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
s.kblayout,
left = dpi(3),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
s.date,
left = dpi(3),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
s.clock,
left = dpi(3),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
s.powerbutton,
left = dpi(3),
right = dpi(6),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
forced_height = 45,
layout = wibox.layout.fixed.horizontal
},
layout = wibox.layout.align.horizontal
}
s.volume_container:setup{
s.volume_osd,
layout = wibox.layout.fixed.horizontal
}
s.brightness_container:setup{
s.brightness_osd,
layout = wibox.layout.fixed.horizontal
}
s.calendar_osd_container:setup{
s.calendar_osd,
layout = wibox.layout.align.horizontal
}
s.powermenu_container:setup{
s.powermenu,
layout = wibox.layout.flex.horizontal
}
s.powermenu_container:buttons(
gears.table.join(
awful.button(
{},
3,
function ()
awesome.emit_signal("module::powermenu:hide")
end
)
)
)
-- Signals
awesome.connect_signal(
"module::powermenu:show",
function()
for s in screen do
s.powermenu_container.visible = false
end
awful.screen.focused().powermenu_container.visible = true
end
)
awesome.connect_signal(
"module::powermenu:hide",
function()
for s in screen do
s.powermenu_container.visible = false
end
end
)
awesome.connect_signal(
"hide_centerbar",
function (hide)
s.top_center.visible = hide
end
)
awesome.connect_signal(
"widget::brightness_osd:rerun",
function ()
if hide_brightness_osd.started then
hide_brightness_osd:again()
else
hide_brightness_osd:start()
end
end
)
awesome.connect_signal(
"module::brightness_osd:show",
function ()
s.brightness_container.visible = true
end
)
s.brightness_container:connect_signal(
"mouse::enter",
function ()
s.brightness_container.visible = true
hide_brightness_osd:stop()
end
)
s.brightness_container:connect_signal(
"mouse::leave",
function ()
s.brightness_container.visible = true
hide_brightness_osd:again()
end
)
awesome.connect_signal(
"module::volume_osd:show",
function ()
s.volume_container.visible = true
end
)
s.volume_container:connect_signal(
"mouse::enter",
function ()
s.volume_container.visible = true
hide_volume_osd:stop()
end
)
s.volume_container:connect_signal(
"mouse::leave",
function ()
s.volume_container.visible = true
hide_volume_osd:again()
end
)
awesome.connect_signal(
"widget::volume_osd:rerun",
function ()
if hide_volume_osd.started then
hide_volume_osd:again()
else
hide_volume_osd:start()
end
end
)
s.calendar_osd_container:connect_signal(
"mouse::enter",
function ()
s.calendar_osd_container.visible = true
hide_osd:stop()
end
)
s.calendar_osd_container:connect_signal(
"mouse::leave",
function ()
s.calendar_osd_container.visible = false
hide_osd:stop()
end
)
awesome.connect_signal(
"widget::calendar_osd:stop",
function ()
s.calendar_osd_container.visible = true
hide_osd:stop()
end
)
awesome.connect_signal(
"widget::calendar_osd:rerun",
function ()
if hide_osd.started then
hide_osd:again()
else
hide_osd:start()
end
end
)
end
)

View File

@@ -1,64 +0,0 @@
-- This function does currently nothing
-- Awesome Libs
local gears = require("gears")
local awful = require("awful")
local _M = { }
function _M.get()
local taglist_buttons = gears.table.join(
awful.button(
{ },
1,
function (t)
t:view_only()
end
),
awful.button(
{ modkey },
1,
function (t)
if client.focus then
client.focus:move_to_tag(t)
end
end
),
awful.button(
{ },
3,
function (t)
if client.focus then
client.focus:toggle_tag(t)
end
end
),
awful.button(
{ modkey },
3,
function (t)
if client.focus then
client.focus:toggle_tag(t)
end
end
),
awful.button(
{ },
4,
function (t)
awful.tag.viewnext(t.screen)
end
),
awful.button(
{ },
5,
function (t)
if client.focus then
awful.tag.viewprev(t.screen)
end
end
)
)
return taglist_buttons
end
return setmetatable({ }, { __call = function(_, ...) return _M.get(...) end})

View File

@@ -1,50 +0,0 @@
-- This function does currently nothing
-- Default awesome libraries
local gears = require("gears")
local awful = require("awful")
local _M = {}
function _M.get()
local tasklist_buttons = gears.table.join(
awful.button(
{ },
1,
function (c)
if c == client.focus then
c.minimized = true
else
c:emit_signal(
"request::activate",
"tasklist",
{raise = true}
)
end
end
),
awful.button(
{ },
3,
function()
awful.menu.client_list({ theme = { width = 250 } })
end
),
awful.button(
{ },
4,
function ()
awful.client.focus.byidx(1)
end
),
awful.button(
{ },
5,
function ()
awful.client.focus.byidx(-1)
end
)
)
return tasklist_buttons
end
return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })

View File

@@ -4,9 +4,7 @@
-- Awesome Libs
local awful = require("awful")
local _M = { }
function _M.get()
return function ()
local layouts = {
awful.layout.suit.tile,
awful.layout.suit.floating,
@@ -14,5 +12,3 @@ function _M.get()
return layouts
end
return _M.get

View File

@@ -4,21 +4,16 @@
-- Awesome Libs
local awful = require("awful")
-- Menu Namespace
local M = { }
-- Module Namespace
local _M = { }
local terminal = RC.vars.terminal
M.session = {
local session = {
{ "Logout", function () awesome.quit() end },
{ "Shutdown", function () awful.spawn.with_shell('shutdown now') end },
{ "Reboot", function () awful.spawn.with_shell('reboot') end },
}
M.applications = {
local applications = {
{ "Firefox", "firefox" },
{ "VS Code", "code" },
{ "Blender", "blender" },
@@ -26,21 +21,18 @@ M.applications = {
{ "Lutris", "lutris" },
}
M.settings = {
local settings = {
{ "General Settings", "gnome-control-center" },
{ "Power Settings", "xfce4-power-manager-settings" },
{ "Display Settings", "arandr" }
}
function _M.get()
return function()
local menu_items = {
{ "Power Menu", M.session },
{ "Applications", M.applications },
{ "Open Terminal", terminal },
{ "Settings", M.settings },
{ "Power Menu", session },
{ "Applications", applications },
{ "Open Terminal", user_vars.vars.terminal },
{ "Settings", settings },
}
return menu_items
return menu_ttems
end
return _M.get

View File

@@ -6,9 +6,7 @@
local awful = require("awful")
local beautiful = require("beautiful")
local _M = { }
function _M.get(clientkeys, clientbuttons)
return function (clientkeys, clientbuttons)
local rules = {
{
rule = { },
@@ -28,7 +26,11 @@ function _M.get(clientkeys, clientbuttons)
instance = { },
class = {
"Arandr",
"Tor Browser"
"Lxappearance",
"kdeconnect.app",
"zoom",
"file-roller",
"File-roller"
},
name = { },
role = {
@@ -49,5 +51,3 @@ function _M.get(clientkeys, clientbuttons)
}
return rules
end
return _M.get

View File

@@ -2,7 +2,6 @@
local awful = require("awful")
local beautiful = require("beautiful")
client.connect_signal(
"manage",
function (c)
@@ -57,3 +56,81 @@ end)
client.connect_signal("unfocus", function (c)
c.border_color = beautiful.border_normal
end)
function hover_signal (widget, bg, fg)
local old_wibox, old_cursor, old_bg, old_fg
widget:connect_signal(
"mouse::enter",
function ()
if bg then
old_bg = widget.bg
if string.len(bg) == 7 then
widget.bg = bg .. 'dd'
else
widget.bg = bg
end
end
if fg then
old_fg = widget.fg
widget.fg = fg
end
local w = mouse.current_wibox
if w then
old_cursor, old_wibox = w.cursor, w
w.cursor = "hand1"
end
end
)
widget:connect_signal(
"button::press",
function ()
if bg then
if bg then
if string.len(bg) == 7 then
widget.bg = bg .. 'bb'
else
widget.bg = bg
end
end
end
if fg then
widget.fg = fg
end
end
)
widget:connect_signal(
"button::release",
function ()
if bg then
if bg then
if string.len(bg) == 7 then
widget.bg = bg .. 'dd'
else
widget.bg = bg
end
end
end
if fg then
widget.fg = fg
end
end
)
widget:connect_signal(
"mouse::leave",
function ()
if bg then
widget.bg = old_bg
end
if fg then
widget.fg = old_fg
end
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end
)
end

View File

@@ -5,9 +5,7 @@
-- Awesome Libs
local awful = require("awful")
local _M = { }
function _M.get()
return function()
local tags = {}
awful.screen.connect_for_each_screen(
function (s)
@@ -16,12 +14,10 @@ function _M.get()
"1", "2", "3", "4", "5", "6", "7", "8", "9"
},
s,
RC.layouts[1]
user_vars.Layouts[1]
)
end
)
return tags
end
return _M.get

View File

@@ -5,8 +5,8 @@ local home = os.getenv("HOME")
beautiful.init(home .. "/.config/awesome/theme/crylia/theme.lua")
if(RC.vars.wallpaper) then
local wallpaper = RC.vars.wallpaper
if(user_vars.vars.wallpaper) then
local wallpaper = user_vars.vars.wallpaper
if awful.util.file_readable(wallpaper) then
Theme.wallpaper = wallpaper
end

View File

@@ -5,9 +5,30 @@ local home = os.getenv("HOME")
-- If you want different default programs, wallpaper path or modkey; edit this file.
local _M = {
terminal = "alacritty",
-- This is your default Terminal
terminal = "alacritty -o font.size=8",
-- This is the modkey 'mod4' = Super/Mod/WindowsKey, 'mod3' = alt...
modkey = "Mod4",
wallpaper = home .. "/.config/awesome/theme/crylia/assets/wallpaper.jpg"
-- place your wallpaper at this path with this name, you could also try to change the path
wallpaper = home .. "/.config/awesome/theme/crylia/assets/wallpaper.jpg",
-- Naming scheme for the powermenu, userhost = "user@hostname", fullname = "Firstname Surname", something else ...
namestyle = "userhost",
-- List every Keyboard layout you use here comma seperated. (run localectl list-keymaps to list all averiable keymaps)
kblayout = {"de", "ru", "us"},
-- Set to false if you dont have a controller
bluetooth = true,
-- Your filemanager that opens with super+e
file_manager = "thunar",
-- Screenshot program to make a screenshot when print is hit
screenshot_program = "flameshot gui"
}
return _M

View File

@@ -17,72 +17,73 @@ local gears = require("gears")
local menubar = require("menubar")
-- Global Namespace
RC = {}
RC.vars = require("Main.UserVariables")
user_vars = {}
user_vars.vars = require("main.user_variables")
-- Error Handling
require("Main.ErrorHandling")
require("main.error_handling")
-- Default Theme and Custom Wallpaper
beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua")
beautiful.wallpaper = RC.vars.wallpaper
modkey = RC.vars.modkey
beautiful.wallpaper = user_vars.vars.wallpaper
modkey = user_vars.vars.modkey
require("Main.Theme")
require("main.theme")
-- Load Local User Libs
local Main = {
Layouts = require("Main.Layouts"),
Tags = require("Main.Tags"),
Menu = require("Main.Menu"),
Rules = require("Main.Rules")
local main = {
layouts = require("main.layouts"),
tags = require("main.tags"),
menu = require("main.menu"),
rules = require("main.rules")
}
-- Load all Shortcuts from Local User Libs
local Bindings = {
GlobalButtons = require("Bindings.GlobalButtons"),
ClientButtons = require("Bindings.ClientButtons"),
GlobalKeys = require("Bindings.GlobalKeys"),
BindToTags = require("Bindings.BindToTags"),
ClientKeys = require("Bindings.ClientKeys")
local bindings = {
global_buttons = require("bindings.global_buttons"),
client_buttons = require("bindings.client_buttons"),
global_keys = require("bindings.global_keys"),
bind_to_tags = require("bindings.bind_to_tags"),
client_keys = require("bindings.client_keys")
}
RC.Layouts = Main.Layouts()
user_vars.Layouts = main.layouts()
awful.layout.layouts = Main.Layouts()
awful.layout.layouts = main.layouts()
RC.Tags = Main.Tags()
user_vars.tags = main.tags()
RC.MainMenu = awful.menu({
items = Main.Menu()
user_vars.main_menu = awful.menu({
items = main.menu()
})
-- A Variable needed in Statusbar (helper)
RC.Launcher = awful.widget.launcher({
Image = beautiful.awesome_icon,
Menu = RC.MainMenu
user_vars.launcher = awful.widget.launcher({
image = beautiful.awesome_icon,
menu = user_vars.main_menu
})
-- Menubar configuration
menubar.utils.terminal = RC.vars.terminal
menubar.utils.terminal = user_vars.vars.terminal
-- Set root
root.buttons(Bindings.GlobalButtons())
root.keys(Bindings.BindToTags(Bindings.GlobalKeys()))
root.buttons(bindings.global_buttons())
root.keys(bindings.bind_to_tags(bindings.global_keys()))
-- Default statusbar, comment if you want use a third party tool like polybar
require("CryliaBar.init")
require("crylia_bar.init")
-- Rules to apply to new clients
awful.rules.rules = Main.Rules(
Bindings.ClientKeys(),
Bindings.ClientButtons()
awful.rules.rules = main.rules(
bindings.client_keys(),
bindings.client_buttons()
)
-- Signals
require("Main.Signals")
require("main.signals")
-- Autostart programs
--awful.spawn.with_shell("~/.screenlayout/single_screen.sh")
awful.spawn.with_shell("picom --experimental-backends")
awful.spawn.with_shell("xfce4-power-manager")
awful.spawn.with_shell("light-locker --lock-on-suspend --lock-on-lid &")

View File

@@ -1 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z" /></svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
<path fill="#ffffffdd" d="M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z" />
</svg>

Before

Width:  |  Height:  |  Size: 510 B

After

Width:  |  Height:  |  Size: 535 B

View File

@@ -1 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M7,9V15H11L16,20V4L11,9H7Z" /></svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
<path fill="#ffffffdd" d="M7,9V15H11L16,20V4L11,9H7Z" />
</svg>

Before

Width:  |  Height:  |  Size: 321 B

After

Width:  |  Height:  |  Size: 346 B

View File

@@ -1 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M5,9V15H9L14,20V4L9,9M18.5,12C18.5,10.23 17.5,8.71 16,7.97V16C17.5,15.29 18.5,13.76 18.5,12Z" /></svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
<path fill="#ffffffdd" d="M5,9V15H9L14,20V4L9,9M18.5,12C18.5,10.23 17.5,8.71 16,7.97V16C17.5,15.29 18.5,13.76 18.5,12Z" />
</svg>

Before

Width:  |  Height:  |  Size: 387 B

After

Width:  |  Height:  |  Size: 412 B

View File

@@ -1 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M3,9H7L12,4V20L7,15H3V9M16.59,12L14,9.41L15.41,8L18,10.59L20.59,8L22,9.41L19.41,12L22,14.59L20.59,16L18,13.41L15.41,16L14,14.59L16.59,12Z" /></svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
<path fill="#ffffffdd" d="M3,9H7L12,4V20L7,15H3V9M16.59,12L14,9.41L15.41,8L18,10.59L20.59,8L22,9.41L19.41,12L22,14.59L20.59,16L18,13.41L15.41,16L14,14.59L16.59,12Z" />
</svg>

Before

Width:  |  Height:  |  Size: 432 B

After

Width:  |  Height:  |  Size: 457 B

View File

@@ -1 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M12,4L9.91,6.09L12,8.18M4.27,3L3,4.27L7.73,9H3V15H7L12,20V13.27L16.25,17.53C15.58,18.04 14.83,18.46 14,18.7V20.77C15.38,20.45 16.63,19.82 17.68,18.96L19.73,21L21,19.73L12,10.73M19,12C19,12.94 18.8,13.82 18.46,14.64L19.97,16.15C20.62,14.91 21,13.5 21,12C21,7.72 18,4.14 14,3.23V5.29C16.89,6.15 19,8.83 19,12M16.5,12C16.5,10.23 15.5,8.71 14,7.97V10.18L16.45,12.63C16.5,12.43 16.5,12.21 16.5,12Z" /></svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
<path fill="#ffffffdd" d="M12,4L9.91,6.09L12,8.18M4.27,3L3,4.27L7.73,9H3V15H7L12,20V13.27L16.25,17.53C15.58,18.04 14.83,18.46 14,18.7V20.77C15.38,20.45 16.63,19.82 17.68,18.96L19.73,21L21,19.73L12,10.73M19,12C19,12.94 18.8,13.82 18.46,14.64L19.97,16.15C20.62,14.91 21,13.5 21,12C21,7.72 18,4.14 14,3.23V5.29C16.89,6.15 19,8.83 19,12M16.5,12C16.5,10.23 15.5,8.71 14,7.97V10.18L16.45,12.63C16.5,12.43 16.5,12.21 16.5,12Z" />
</svg>

Before

Width:  |  Height:  |  Size: 687 B

After

Width:  |  Height:  |  Size: 712 B

View File

@@ -1 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M12,8A4,4 0 0,0 8,12A4,4 0 0,0 12,16A4,4 0 0,0 16,12A4,4 0 0,0 12,8M12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31L23.31,12L20,8.69Z" /></svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
<path fill="#ffffffdd" d="M12,8A4,4 0 0,0 8,12A4,4 0 0,0 12,16A4,4 0 0,0 16,12A4,4 0 0,0 12,8M12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31L23.31,12L20,8.69Z" />
</svg>

Before

Width:  |  Height:  |  Size: 537 B

After

Width:  |  Height:  |  Size: 562 B

View File

@@ -1 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,15.31L23.31,12L20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31Z" /></svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
<path fill="#ffffffdd" d="M12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,15.31L23.31,12L20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31Z" />
</svg>

Before

Width:  |  Height:  |  Size: 471 B

After

Width:  |  Height:  |  Size: 496 B

View File

@@ -1 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M12,18V6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,15.31L23.31,12L20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31Z" /></svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
<path fill="#ffffffdd" d="M12,18V6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,15.31L23.31,12L20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31Z" />
</svg>

Before

Width:  |  Height:  |  Size: 443 B

After

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 KiB

After

Width:  |  Height:  |  Size: 292 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 KiB

View File

@@ -18,6 +18,27 @@ return function (s)
local brightness_osd_widget = wibox.widget{
{
{
{
{
nil,
{
nil,
{
id = "icon",
forced_height = dpi(220),
image = icondir .. "brightness-high.svg",
widget = wibox.widget.imagebox
},
nil,
expand = "none",
id = "icon_margin2",
layout = wibox.layout.align.vertical
},
nil,
id = "icon_margin1",
expand = "none",
layout = wibox.layout.align.horizontal
},
{
{
id = "label",
@@ -38,30 +59,17 @@ return function (s)
forced_height = dpi(48),
layout = wibox.layout.align.horizontal,
},
{
{
{
id = "icon",
image = gears.color.recolor_image(icondir .. "brightness-high.svg", color.color["White"]),
widget = wibox.widget.imagebox
},
id = "icon_margin",
top = dpi(12),
bottom = dpi(12),
widget = wibox.container.margin
},
{
{
id = "brightness_slider",
bar_shape = gears.shape.rounded_rect,
bar_height = dpi(2),
bar_color = color.color["White"],
bar_active_color = color.color["White"],
handle_color = color.color["White"],
bar_height = dpi(10),
bar_color = color.color["Grey800"] .. "88",
bar_active_color = "#ffffff",
handle_color = "#ffffff",
handle_shape = gears.shape.circle,
handle_width = dpi(15),
handle_width = dpi(10),
handle_border_color = color.color["White"],
handle_border_width = dpi(1),
maximum = 100,
widget = wibox.widget.slider
},
@@ -70,23 +78,23 @@ return function (s)
widget = wibox.container.place
},
id = "icon_slider_layout",
spacing = dpi(24),
layout = wibox.layout.fixed.horizontal
spacing = dpi(0),
layout = wibox.layout.align.vertical
},
id = "osd_layout",
layout = wibox.layout.fixed.vertical
layout = wibox.layout.align.vertical
},
id = "container",
left = dpi(24),
right = dpi(24),
widget = wibox.container.margin
},
bg = color.color["Grey900"],
bg = color.color["Grey900"] .. "88",
widget = wibox.container.background,
ontop = true,
visible = true,
type = "notification",
forced_height = dpi(100),
forced_height = dpi(300),
forced_width = dpi(300),
offset = dpi(5),
}
@@ -97,7 +105,7 @@ return function (s)
local brightness_value = brightness_osd_widget.container.osd_layout.icon_slider_layout.slider_layout.brightness_slider:get_value()
-- Performance is horrible, or it overrides and executes at the same time as the keybindings
--awful.spawn("xbacklight -set " .. brightness_value, false)
brightness_osd_widget.container.osd_layout.label_value_layout.value:set_text(brightness_value .. "%")
brightness_osd_widget.container.osd_layout.icon_slider_layout.label_value_layout.value:set_text(brightness_value .. "%")
awesome.emit_signal(
"widget::brightness:update",
@@ -119,13 +127,13 @@ return function (s)
elseif brightness_value >= 67 then
icon = icon .. "-high"
end
brightness_osd_widget.container.osd_layout.icon_slider_layout.icon_margin.icon:set_image(gears.color.recolor_image(icon .. ".svg", color.color["White"]))
brightness_osd_widget.container.osd_layout.icon_slider_layout.icon_margin1.icon_margin2.icon:set_image(icon .. ".svg")
end
)
local update_slider = function ()
awful.spawn.easy_async_with_shell(
[[ xbacklight -get ]],
[[ sleep 0.1 && xbacklight -get ]],
function (stdout)
stdout = stdout:sub(1,-9)
brightness_osd_widget.container.osd_layout.icon_slider_layout.slider_layout.brightness_slider:set_value(tonumber(stdout))
@@ -152,17 +160,17 @@ return function (s)
local brightness_container = awful.popup{
widget = wibox.container.background,
ontop = true,
bg = color.color["Grey900"],
bg = color.color["Grey900"] .. "00",
stretch = false,
visible = false,
placement = function (c) awful.placement.bottom_right(c, {margins = dpi(10)}) end,
placement = function (c) awful.placement.centered(c, {margins = {top = dpi(200)}}) end,
shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
gears.shape.rounded_rect(cr, width, height, 15)
end
}
local hide_brightness_osd = gears.timer{
timeout = 1,
timeout = 2,
autostart = true,
callback = function ()
brightness_container.visible = false

View File

@@ -8,7 +8,7 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
require("Main.Signals")
require("main.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/powermenu/"
@@ -77,7 +77,7 @@ return function (s)
update_profile_picture()
-- Will determin the display style
local namestyle = RC.vars.namestyle
local namestyle = user_vars.vars.namestyle
-- Get the full username(if set) and the username + hostname
local update_user_name = function()
awful.spawn.easy_async_with_shell(

View File

@@ -8,7 +8,7 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
require("Main.Signals")
require("main.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/titlebar/"
@@ -138,7 +138,13 @@ local create_titlebar = function (c, bg, size)
end
local create_titlebar_dialog = function(c, bg, size)
awful.titlebar(c, {position = "left", bg = bg, size = size}) : setup {
local titlebar = awful.titlebar(c, {
position = "left",
bg = bg,
size = size
})
titlebar : setup {
{
{
{
@@ -147,7 +153,8 @@ local create_titlebar_dialog = function(c, bg, size)
bg = color.color["Red200"],
shape = function (cr, height, width)
gears.shape.rounded_rect(cr, width, height, 4)
end
end,
id = "closebutton"
},
{
awful.titlebar.widget.minimizebutton(c),
@@ -155,21 +162,33 @@ local create_titlebar_dialog = function(c, bg, size)
bg = color.color["Green200"],
shape = function (cr, height, width)
gears.shape.rounded_rect(cr, width, height, 4)
end
end,
id = "minimizebutton"
},
spacing = dpi(7),
layout = wibox.layout.fixed.vertical
spacing = dpi(10),
layout = wibox.layout.fixed.vertical,
id = "spacing"
},
margins = dpi(8),
widget = wibox.container.margin
widget = wibox.container.margin,
id = "margin"
},
{
buttons = create_click_events(c),
layout = wibox.layout.flex.vertical
},
nil,
layout = wibox.layout.align.vertical
{
{
widget = awful.widget.clienticon(c)
},
margins = dpi(5),
widget = wibox.container.margin
},
layout = wibox.layout.align.vertical,
id = "main"
}
hover_signal(titlebar.main.margin.spacing.closebutton, color.color["Red200"])
hover_signal(titlebar.main.margin.spacing.minimizebutton, color.color["Green200"])
end
local create_titlebar_borderhack = function (c, bg, position)
@@ -234,6 +253,9 @@ local draw_titlebar = function (c)
end
elseif c.type == 'dialog' then
create_titlebar_dialog(c, '#121212AA', 35)
create_titlebar_borderhack(c, "#121212AA", "right")
create_titlebar_borderhack(c, "#121212AA", "top")
create_titlebar_borderhack(c, "#121212AA", "bottom")
elseif c.type == 'modal' then
else
create_titlebar_borderhack(c, "#121212AA", "right")

View File

@@ -18,6 +18,27 @@ return function (s)
local volume_osd_widget = wibox.widget{
{
{
{
{
nil,
{
nil,
{
id = "icon",
forced_height = dpi(220),
image = icondir .. "volume-high.svg",
widget = wibox.widget.imagebox
},
nil,
expand = "none",
id = "icon_margin2",
layout = wibox.layout.align.vertical
},
nil,
id = "icon_margin1",
expand = "none",
layout = wibox.layout.align.horizontal
},
{
{
id = "label",
@@ -38,30 +59,17 @@ return function (s)
forced_height = dpi(48),
layout = wibox.layout.align.horizontal,
},
{
{
{
id = "icon",
image = gears.color.recolor_image(icondir .. "volume-high.svg", color.color["White"]),
widget = wibox.widget.imagebox
},
id = "icon_margin",
top = dpi(12),
bottom = dpi(12),
widget = wibox.container.margin
},
{
{
id = "volume_slider",
bar_shape = gears.shape.rounded_rect,
bar_height = dpi(2),
bar_color = color.color["White"],
bar_active_color = color.color["White"],
handle_color = color.color["White"],
bar_height = dpi(10),
bar_color = color.color["Grey800"] .. "88",
bar_active_color = "#ffffff",
handle_color = "#ffffff",
handle_shape = gears.shape.circle,
handle_width = dpi(15),
handle_width = dpi(10),
handle_border_color = color.color["White"],
handle_border_width = dpi(1),
maximum = 100,
widget = wibox.widget.slider
},
@@ -70,35 +78,33 @@ return function (s)
widget = wibox.container.place
},
id = "icon_slider_layout",
spacing = dpi(24),
layout = wibox.layout.fixed.horizontal
spacing = dpi(0),
layout = wibox.layout.align.vertical
},
id = "osd_layout",
layout = wibox.layout.fixed.vertical
layout = wibox.layout.align.vertical
},
id = "container",
left = dpi(24),
right = dpi(24),
widget = wibox.container.margin
},
bg = color.color["Grey900"],
bg = color.color["Grey900"] .. '88',
widget = wibox.container.background,
ontop = true,
visible = true,
type = "notification",
forced_height = dpi(100),
forced_height = dpi(300),
forced_width = dpi(300),
offset = dpi(5),
}
volume_osd_widget.container.osd_layout.icon_slider_layout.slider_layout.volume_slider:connect_signal(
"property::value",
function ()
local function update_osd()
local volume_level = volume_osd_widget.container.osd_layout.icon_slider_layout.slider_layout.volume_slider:get_value()
awful.spawn("amixer sset Master ".. volume_level .. "%", false)
awful.spawn("pactl set-sink-volume @DEFAULT_SINK@ ".. volume_level .. "%", false)
awesome.emit_signal("widget::volume")
volume_osd_widget.container.osd_layout.label_value_layout.value:set_text(volume_level .. "%")
volume_osd_widget.container.osd_layout.icon_slider_layout.label_value_layout.value:set_text(volume_level .. "%")
awesome.emit_signal(
"widget::volume:update",
@@ -122,24 +128,30 @@ return function (s)
elseif volume_level >= 67 then
icon = icon .. "-high"
end
volume_osd_widget.container.osd_layout.icon_slider_layout.icon_margin.icon:set_image(gears.color.recolor_image(icon .. ".svg", color.color["White"]))
volume_osd_widget.container.osd_layout.icon_slider_layout.icon_margin1.icon_margin2.icon:set_image(icon .. ".svg")
end
volume_osd_widget.container.osd_layout.icon_slider_layout.slider_layout.volume_slider:connect_signal(
"property::value",
function ()
update_osd()
end
)
local update_slider = function ()
awful.spawn.easy_async_with_shell(
[[ awk -F"[][]" '/dB/ { print $6 }' <(amixer sget Master) ]],
[[ pacmd list-sinks | grep "muted" ]],
function (stdout)
if stdout:match("off") then
volume_osd_widget.container.osd_layout.label_value_layout.value:set_text("0%")
--volume_osd_slider.volume_slider:set_value(0)
volume_osd_widget.container.osd_layout.icon_slider_layout.icon_margin.icon:set_image(gears.color.recolor_image(icondir .. "volume-mute" .. ".svg", color.color["White"]))
if stdout:match("yes") then
volume_osd_widget.container.osd_layout.icon_slider_layout.label_value_layout.value:set_text("0%")
volume_osd_widget.container.osd_layout.icon_slider_layout.icon_margin1.icon_margin2.icon:set_image(icondir .. "volume-mute" .. ".svg")
else
awful.spawn.easy_async_with_shell(
[[ awk -F"[][]" '/dB/ { print $2 }' <(amixer sget Master) ]],
function (stdout)
stdout = stdout:sub(1, -3)
volume_osd_widget.container.osd_layout.icon_slider_layout.slider_layout.volume_slider:set_value(tonumber(stdout))
[[ pacmd list-sinks | grep "volume: front" | awk '{print $5}' ]],
function (stdout2)
stdout2 = stdout2:sub(1, -3)
volume_osd_widget.container.osd_layout.icon_slider_layout.slider_layout.volume_slider:set_value(tonumber(stdout2))
update_osd()
end
)
end
@@ -167,12 +179,12 @@ return function (s)
local volume_container = awful.popup{
widget = wibox.container.background,
ontop = true,
bg = color.color["Grey900"],
bg = color.color["Grey900"] .. "00",
stretch = false,
visible = false,
placement = function (c) awful.placement.bottom_right(c, {margins = dpi(10)}) end,
placement = function (c) awful.placement.centered(c, {margins = {top = dpi(200)}}) end,
shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
gears.shape.rounded_rect(cr, width, height, 15)
end
}

View File

@@ -68,3 +68,6 @@ Theme.titlebar_maximized_button_normal = icondir .. "maximize.svg"
Theme.titlebar_minimize_button_normal = icondir .. "minimize.svg"
Theme.titlebar_maximized_button_active = icondir .. "maximize.svg"
Theme.titlebar_maximized_button_inactive = icondir .. "maximize.svg"
Theme.bg_systray = colors.color["BlueGrey800"]
Theme.systray_icon_spacing = dpi(10)

View File

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

View File

@@ -8,7 +8,7 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
require("Main.Signals")
require("main.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/audio/"
@@ -58,7 +58,7 @@ return function ()
local get_volume = function ()
awful.spawn.easy_async_with_shell(
[[ awk -F"[][]" '/dB/ { print $2 }' <(amixer sget Master) ]],
[[ pacmd list-sinks | grep "volume: front" | awk '{print $5}' ]],
function (stdout)
local icon = icondir .. "volume"
stdout = stdout:gsub("%%", "")
@@ -84,9 +84,9 @@ return function ()
local check_muted = function ()
awful.spawn.easy_async_with_shell(
[[ awk -F"[][]" '/dB/ { print $6 }' <(amixer sget Master) ]],
[[ pacmd list-sinks | grep "muted" ]],
function (stdout)
if stdout:match("off") then
if stdout:match("yes") then
audio_widget.container.audio_layout.label.visible = false
audio_widget.container:set_right(0)
audio_widget.container.audio_layout.icon_margin.icon_layout.icon:set_image(gears.color.recolor_image(icondir .. "volume-mute" .. ".svg", color.color["Grey900"]))

View File

@@ -10,7 +10,7 @@ local gears = require("gears")
local naughty = require("naughty")
local watch = awful.widget.watch
local wibox = require("wibox")
require("Main.Signals")
require("main.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/battery/"

View File

@@ -8,7 +8,7 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
require("Main.Signals")
require("main.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/bluetooth/"
@@ -86,8 +86,15 @@ return function ()
autostart = true,
call_now = true,
callback = function ()
awful.spawn.easy_async_with_shell(
"bluetoothctl list",
function (stdout)
if stdout ~= nil or stdout:gsub("\n", ""):match("") then
get_bluetooth_information()
end
end
)
end
}
-- Signals

View File

@@ -8,7 +8,7 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
require("Main.Signals")
require("main.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/clock/"

View File

@@ -8,7 +8,7 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
require("Main.Signals")
require("main.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/date/"

View File

@@ -8,7 +8,7 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
require("Main.Signals")
require("main.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/kblayout/"
@@ -54,6 +54,7 @@ return function ()
end,
widget = wibox.widget.background
}
local layout = "";
local get_kblayout = function ()
awful.spawn.easy_async_with_shell(
@@ -67,25 +68,271 @@ return function ()
return layout
end
local set_kblayout = function (kblayout)
kblayout = "de"
if get_kblayout():gsub("\n", "") == "de" then
kblayout = "ru"
local function create_kb_layout_item (keymap)
-- TODO: Add more, too lazy rn
local longname, shortname
local xkeyboard_country_code = {
{"ad", "", "AND"}, -- Andorra
{"af", "", "AFG"}, -- Afganistan
{"al", "", "ALB"}, -- Albania
{"am", "", "ARM"}, -- Armenia
{"ara", "", "ARB"}, -- Arabic
{"at", "", "AUT"}, -- Austria
{"az", "", "AZE"}, -- Azerbaijan
{"ba", "", "BIH"}, -- Bosnia and Herzegovina
{"bd", "", "BGD"}, -- Bangladesh
{"be", "", "BEL"}, -- Belgium
{"bg", "", "BGR"}, -- Bulgaria
{"br", "", "BRA"}, -- Brazil
{"bt", "", "BTN"}, -- Bhutan
{"bw", "", "BWA"}, -- Botswana
{"by", "", "BLR"}, -- Belarus
{"ca", "", "CAN"}, -- Canada
{"cd", "", "COD"}, -- Congo
{"ch", "", "CHE"}, -- Switzerland
{"cm", "", "CMR"}, -- Cameroon
{"cn", "", "CHN"}, -- China
{"cz", "", "CZE"}, -- Czechia
{"de", "Deutsch (Germany)", "GER"}, -- Germany
{"dk", "", "DNK"}, -- Denmark
{"ee", "", "EST"}, -- Estonia
{"es", "", "ESP"}, -- Spain
{"et", "", "ETH"}, -- Ethiopia
{"eu", "?", "?"}, -- EurKey
{"fi", "", "FIN"}, -- Finland
{"fo", "", "FRO"}, -- Faroe Islands
{"fr", "", "FRA"}, -- France
{"gb", "English (Bri'ish)", "ENG"}, -- United Kingdom
{"ge", "", "GEO"}, -- Georgia
{"gh", "", "GHA"}, -- Ghana
{"gn", "", "GIN"}, -- Guinea
{"gr", "", "GRC"}, -- Greece
{"hr", "", "HRV"}, -- Croatia
{"hu", "", "HUN"}, -- Hungary
{"ie", "", "IRL"}, -- Ireland
{"il", "", "ISR"}, -- Israel
{"in", "", "IND"}, -- India
{"iq", "", "IRQ"}, -- Iraq
{"ir", "", "IRN"}, -- Iran
{"is", "", "ISL"}, -- Iceland
{"it", "", "ITA"}, -- Italy
{"jp", "", "JPN"}, -- Japan
{"ke", "", "KEN"}, -- Kenya
{"kg", "", "KGZ"}, -- Kyrgyzstan
{"kh", "", "KHM"}, -- Cambodia
{"kr", "", "KOR"}, -- Korea
{"kz", "", "KAZ"}, -- Kazakhstan
{"la", "", "LAO"}, -- Laos
{"latam", "?", "?"}, -- Latin America
{"latin", "?", "?"}, -- Latin
{"lk", "", "LKA"}, -- Sri Lanka
{"lt", "", "LTU"}, -- Lithuania
{"lv", "", "LVA"}, -- Latvia
{"ma", "", "MAR"}, -- Morocco
{"mao", "?", "?"}, -- Maori
{"me", "", "MNE"}, -- Montenegro
{"mk", "", "MKD"}, -- Macedonia
{"ml", "", "MLI"}, -- Mali
{"mm", "", "MMR"}, -- Myanmar
{"mn", "", "MNG"}, -- Mongolia
{"mt", "", "MLT"}, -- Malta
{"mv", "", "MDV"}, -- Maldives
{"ng", "", "NGA"}, -- Nigeria
{"nl", "", "NLD"}, -- Netherlands
{"no", "", "NOR"}, -- Norway
{"np", "", "NRL"}, -- Nepal
{"ph", "", "PHL"}, -- Philippines
{"pk", "", "PAK"}, -- Pakistan
{"pl", "", "POL"}, -- Poland
{"pt", "", "PRT"}, -- Portugal
{"ro", "", "ROU"}, -- Romania
{"rs", "", "SRB"}, -- Serbia
{"ru", "Русски (Russia)", "RUS"}, -- Russia
{"se", "", "SWE"}, -- Sweden
{"si", "", "SVN"}, -- Slovenia
{"sk", "", "SVK"}, -- Slovakia
{"sn", "", "SEN"}, -- Senegal
{"sy", "", "SYR"}, -- Syria
{"th", "", "THA"}, -- Thailand
{"tj", "", "TJK"}, -- Tajikistan
{"tm", "", "TKM"}, -- Turkmenistan
{"tr", "", "TUR"}, -- Turkey
{"tw", "", "TWN"}, -- Taiwan
{"tz", "", "TZA"}, -- Tanzania
{"ua", "", "UKR"}, -- Ukraine
{"us", "English (United States)", "USA"}, -- USA
{"uz", "", "UZB"}, -- Uzbekistan
{"vn", "", "VNM"}, -- Vietnam
{"za", "", "ZAF"} -- South Africa
}
for i, c in ipairs(xkeyboard_country_code) do
if c[1] == keymap then
longname = c[2]
shortname = c[3]
end
awful.spawn.easy_async_with_shell("setxkbmap -layout " .. kblayout)
get_kblayout()
end
local kb_layout_item = wibox.widget{
{
{
{
-- Short name e.g. GER, ENG, RUS
{
{
text = shortname,
widget = wibox.widget.textbox,
font = "JetBrains Mono ExtraBold, 12",
id = "kbmapname"
},
widget = wibox.container.margin,
id = "margin2"
},
nil,
{
{
text = longname,
widget = wibox.widget.textbox,
font = "JetBrains Mono Bold, 12",
},
widget = wibox.container.margin
},
spacing = dpi(15),
layout = wibox.layout.fixed.horizontal,
id = "container"
},
margins = dpi(10),
widget = wibox.container.margin,
id = "margin"
},
shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 10)
end,
bg = color.color["Grey800"],
fg = color.color["White"],
widget = wibox.container.background,
id = "background"
},
margins = dpi(5),
widget = wibox.container.margin
}
hover_signal(kb_layout_item.background, color.color["White"], color.color["Grey900"])
kb_layout_item:connect_signal(
"button::press",
function ()
awful.spawn.easy_async_with_shell(
"setxkbmap " .. keymap,
function (stdout)
awesome.emit_signal("kblayout::hide:kbmenu")
get_kblayout()
end
)
end
)
return kb_layout_item
end
local function get_kblist()
local kb_layout_items = {
layout = wibox.layout.fixed.vertical
}
for i, keymap in pairs(user_vars.vars.kblayout) do
kb_layout_items[i] = create_kb_layout_item(keymap)
end
return kb_layout_items
end
local kb_menu_widget = awful.popup{
shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
end,
widget = wibox.container.background,
bg = color.color["Grey900"],
fg = color.color["White"],
width = dpi(100),
max_height = dpi(600),
visible = false,
ontop = true,
placement = function (c) awful.placement.align(c, {position = "top_right", margins = {right = dpi(255), top = dpi(60)}}) end
}
kb_menu_widget:setup(
get_kblist()
)
local function toggle_kb_layout()
awful.spawn.easy_async_with_shell(
"setxkbmap -query | grep layout: | awk '{print $2}'",
function (stdout)
for j, n in ipairs(user_vars.vars.kblayout) do
if stdout:match(n) then
if j == #user_vars.vars.kblayout then
awful.spawn.easy_async_with_shell(
"setxkbmap " .. user_vars.vars.kblayout[1],
function ()
get_kblayout()
end
)
else
awful.spawn.easy_async_with_shell(
"setxkbmap " .. user_vars.vars.kblayout[j + 1],
function ()
get_kblayout()
end
)
end
end
end
end
)
end
awesome.connect_signal(
"kblayout::toggle",
function ()
toggle_kb_layout()
end
)
--kb_menu_widget:move_next_to(mouse.current_widget_geometry)
-- Signals
hover_signal(kblayout_widget, color.color["Green200"])
local kblayout_keygrabber = awful.keygrabber{
autostart = false,
stop_event = 'release',
keypressed_callback = function (self, mod, key, command)
if key == 'Escape' then
awesome.emit_signal("kblayout::hide:kbmenu")
end
end
}
kblayout_widget:connect_signal(
"button::press",
function ()
set_kblayout()
if kb_menu_widget.visible then
kb_menu_widget.visible = false
kblayout_keygrabber:stop()
else
kb_menu_widget.visible = true
kblayout_keygrabber:start()
end
end
)
awesome.connect_signal(
"kblayout::hide:kbmenu",
function ()
kb_menu_widget.visible = false
kblayout_keygrabber:stop()
end
)
get_kblayout()
kb_menu_widget.visible = false
return kblayout_widget
end

View File

@@ -8,7 +8,7 @@ local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
require("Main.Signals")
require("main.signals")
-- Returns the layoutbox widget
return function ()

View File

@@ -9,7 +9,7 @@ local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local naughty = require("naughty")
local wibox = require("wibox")
require("Main.Signals")
require("main.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/network/"
@@ -180,7 +180,7 @@ return function ()
wifi_strength = tonumber(stdout)
network_widget.container.network_layout.spacing = dpi(8)
network_widget.container.network_layout.label.visible = true
network_widget.container.network_layout.label:set_text(tostring(wifi_strength))
network_widget.container.network_layout.label:set_text(tostring(wifi_strength .. "%"))
local wifi_strength_rounded = math.floor(wifi_strength / 25 + 0.5)
update_wireless_icon(wifi_strength_rounded)
end

View File

@@ -9,7 +9,7 @@ local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local naughty = require("naughty")
local wibox = require("wibox")
require("Main.Signals")
require("main.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/power/"

View File

@@ -0,0 +1,40 @@
--------------------------------
-- This is the power widget --
--------------------------------
-- Awesome Libs
local awful = require("awful")
local color = require("theme.crylia.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
require("main.signals")
return function (s)
local systray = wibox.widget{
{
{
wibox.widget.systray,
top = dpi(6),
bottom = dpi(6),
left = dpi(6),
right = dpi(6),
widget = wibox.container.margin
},
width = dpi(100),
strategy = "exact",
layout = wibox.container.constraint,
},
widget = wibox.container.background,
shape = function (cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
end,
bg = color.color["BlueGrey800"]
}
-- Signals
--hover_signal(systray, color.color["Red200"])
return systray
end

View File

@@ -3,8 +3,7 @@ local awful = require("awful")
local gears = require("gears")
local dpi = require("beautiful").xresources.apply_dpi
local color = require("theme.crylia.colors")
local naughty =require("naughty")
require("theme.crylia.Tools.IconHandler")
require("theme.crylia.tools.icon_handler")
local list_update = function (widget, buttons, label, data, objects)
widget:reset()
@@ -52,7 +51,6 @@ local list_update = function (widget, buttons, label, data, objects)
{
id = "container",
tag_label_margin,
--tag_icon_margin,
layout = wibox.layout.fixed.horizontal
},
margins = dpi(0),
@@ -114,12 +112,12 @@ local list_update = function (widget, buttons, label, data, objects)
},
widget = wibox.container.place
},
tag_icon,
tag_icon_margin,
forced_width = dpi(33),
margins = dpi(6),
widget = wibox.container.margin
}
icon.icon_container.icon:set_image(GetIcon("Papirus", client))
icon.icon_container.icon:set_image(Get_icon("Papirus-Dark", client))
tag_widget.widget_margin.container:setup({
icon,
layout = wibox.layout.align.horizontal

View File

@@ -109,9 +109,7 @@ local list_update = function (widget, buttons, label, data, objects)
task_widget:set_bg("#3A475C")
task_title:set_text('')
end
task_icon.icon:set_image(GetIcon("Papirus", object))
task_icon.icon:set_image(Get_icon("Papirus-Dark", object))
widget:add(task_widget)
widget:set_spacing(dpi(6))