added more widgets, rewritten folder structure
This commit is contained in:
@@ -4,15 +4,11 @@
|
||||
-- Awesome Libs
|
||||
local awful = require("awful")
|
||||
|
||||
local _M = { }
|
||||
|
||||
function _M.get()
|
||||
return function ()
|
||||
local layouts = {
|
||||
awful.layout.suit.tile,
|
||||
awful.layout.suit.floating,
|
||||
}
|
||||
|
||||
return layouts
|
||||
end
|
||||
|
||||
return _M.get
|
||||
end
|
||||
@@ -4,21 +4,16 @@
|
||||
-- Awesome Libs
|
||||
local awful = require("awful")
|
||||
|
||||
-- Menu Namespace
|
||||
local M = { }
|
||||
|
||||
-- Module Namespace
|
||||
local _M = { }
|
||||
|
||||
local terminal = RC.vars.terminal
|
||||
|
||||
M.session = {
|
||||
local session = {
|
||||
{ "Logout", function () awesome.quit() end },
|
||||
{ "Shutdown", function () awful.spawn.with_shell('shutdown now') end },
|
||||
{ "Reboot", function () awful.spawn.with_shell('reboot') end },
|
||||
}
|
||||
|
||||
M.applications = {
|
||||
local applications = {
|
||||
{ "Firefox", "firefox" },
|
||||
{ "VS Code", "code" },
|
||||
{ "Blender", "blender" },
|
||||
@@ -26,21 +21,18 @@ M.applications = {
|
||||
{ "Lutris", "lutris" },
|
||||
}
|
||||
|
||||
M.settings = {
|
||||
local settings = {
|
||||
{ "General Settings", "gnome-control-center" },
|
||||
{ "Power Settings", "xfce4-power-manager-settings" },
|
||||
{ "Display Settings", "arandr" }
|
||||
}
|
||||
|
||||
function _M.get()
|
||||
return function()
|
||||
local menu_items = {
|
||||
{ "Power Menu", M.session },
|
||||
{ "Applications", M.applications },
|
||||
{ "Open Terminal", terminal },
|
||||
{ "Settings", M.settings },
|
||||
{ "Power Menu", session },
|
||||
{ "Applications", applications },
|
||||
{ "Open Terminal", user_vars.vars.terminal },
|
||||
{ "Settings", settings },
|
||||
}
|
||||
|
||||
return menu_items
|
||||
end
|
||||
|
||||
return _M.get
|
||||
return menu_ttems
|
||||
end
|
||||
@@ -6,9 +6,7 @@
|
||||
local awful = require("awful")
|
||||
local beautiful = require("beautiful")
|
||||
|
||||
local _M = { }
|
||||
|
||||
function _M.get(clientkeys, clientbuttons)
|
||||
return function (clientkeys, clientbuttons)
|
||||
local rules = {
|
||||
{
|
||||
rule = { },
|
||||
@@ -28,7 +26,11 @@ function _M.get(clientkeys, clientbuttons)
|
||||
instance = { },
|
||||
class = {
|
||||
"Arandr",
|
||||
"Tor Browser"
|
||||
"Lxappearance",
|
||||
"kdeconnect.app",
|
||||
"zoom",
|
||||
"file-roller",
|
||||
"File-roller"
|
||||
},
|
||||
name = { },
|
||||
role = {
|
||||
@@ -48,6 +50,4 @@ function _M.get(clientkeys, clientbuttons)
|
||||
}
|
||||
}
|
||||
return rules
|
||||
end
|
||||
|
||||
return _M.get
|
||||
end
|
||||
@@ -2,7 +2,6 @@
|
||||
local awful = require("awful")
|
||||
local beautiful = require("beautiful")
|
||||
|
||||
|
||||
client.connect_signal(
|
||||
"manage",
|
||||
function (c)
|
||||
@@ -56,4 +55,82 @@ end)
|
||||
|
||||
client.connect_signal("unfocus", function (c)
|
||||
c.border_color = beautiful.border_normal
|
||||
end)
|
||||
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
|
||||
@@ -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
|
||||
end
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
18
awesome/main/wallpaper.lua
Normal file
18
awesome/main/wallpaper.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
---------------------------------------
|
||||
-- This function sets your wallpaper --
|
||||
---------------------------------------
|
||||
-- Awesome Libs
|
||||
local gears = require("gears")
|
||||
local beautiful = require("beautiful")
|
||||
|
||||
function Set_wallpaper(s)
|
||||
if beautiful.wallpaper then
|
||||
local wallpaper = beautiful.wallpaper
|
||||
if type(wallpaper) == "function" then
|
||||
wallpaper = wallpaper(s)
|
||||
end
|
||||
gears.wallpaper.maximized(wallpaper, s, true)
|
||||
end
|
||||
end
|
||||
|
||||
screen.connect_signal("property::geometry", Set_wallpaper)
|
||||
Reference in New Issue
Block a user