add: tooling

- vim modline
- .editorconfig
- stylua.toml
This commit is contained in:
Aire-One 2021-10-16 15:33:51 +02:00
parent cf38140254
commit 61cbed0c52
8 changed files with 53 additions and 23 deletions

12
.editorconfig Normal file
View File

@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

View File

@ -191,3 +191,5 @@ function awesome_slot.mt:__call(params) -- luacheck: ignore unused argument self
end end
return setmetatable(awesome_slot, awesome_slot.mt) return setmetatable(awesome_slot, awesome_slot.mt)
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -1,19 +1,21 @@
local client_slots = {} local client_slots = {}
function client_slots.append_mousebindings (params) function client_slots.append_mousebindings(params)
local amouse = require 'awful.mouse' local amouse = require "awful.mouse"
for _,bindings in pairs(params.mousebindings) do for _, bindings in pairs(params.mousebindings) do
amouse.append_client_mousebindings(bindings) amouse.append_client_mousebindings(bindings)
end end
end end
function client_slots.append_keybindings (params) function client_slots.append_keybindings(params)
local akeyboard = require 'awful.keyboard' local akeyboard = require "awful.keyboard"
for _,bindings in pairs(params.keybindings) do for _, bindings in pairs(params.keybindings) do
akeyboard.append_client_keybindings(bindings) akeyboard.append_client_keybindings(bindings)
end end
end end
return client_slots return client_slots
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -1,8 +1,10 @@
local aslot_slots = {} local aslot_slots = {}
aslot_slots.client = require 'awesome-slot.slots.client' aslot_slots.client = require "awesome-slot.slots.client"
aslot_slots.ruled = require 'awesome-slot.slots.ruled' aslot_slots.ruled = require "awesome-slot.slots.ruled"
aslot_slots.screen = require 'awesome-slot.slots.screen' aslot_slots.screen = require "awesome-slot.slots.screen"
aslot_slots.tag = require 'awesome-slot.slots.tag' aslot_slots.tag = require "awesome-slot.slots.tag"
return aslot_slots return aslot_slots
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -1,19 +1,21 @@
local ruled_slots = {} local ruled_slots = {}
function ruled_slots.append_client_rules (params) function ruled_slots.append_client_rules(params)
local rclient = require 'ruled.client' local rclient = require "ruled.client"
for _,rule in pairs(params.rules) do for _, rule in pairs(params.rules) do
rclient.append_rule(rule) rclient.append_rule(rule)
end end
end end
function ruled_slots.append_notification_rules (params) function ruled_slots.append_notification_rules(params)
local rnotification = require 'ruled.notification' local rnotification = require "ruled.notification"
for _,rule in pairs(params.rules) do for _, rule in pairs(params.rules) do
rnotification.append_rule(rule) rnotification.append_rule(rule)
end end
end end
return ruled_slots return ruled_slots
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -1,18 +1,18 @@
local screen_slots = {} local screen_slots = {}
function screen_slots.wallpaper (screen, params) function screen_slots.wallpaper(screen, params)
local beautiful = require 'beautiful' local beautiful = require "beautiful"
local gwallpaper = require 'gears.wallpaper' local gwallpaper = require "gears.wallpaper"
params = params or { params = params or {
wallpaper = beautiful.wallpaper wallpaper = beautiful.wallpaper,
} }
local wallpaper = params.wallpaper local wallpaper = params.wallpaper
if wallpaper then if wallpaper then
-- If wallpaper is a function, call it with the screen -- If wallpaper is a function, call it with the screen
if type(wallpaper) == 'function' then if type(wallpaper) == "function" then
wallpaper = wallpaper(screen) wallpaper = wallpaper(screen)
end end
@ -21,3 +21,5 @@ function screen_slots.wallpaper (screen, params)
end end
return screen_slots return screen_slots
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -1,9 +1,11 @@
local tag_slots = {} local tag_slots = {}
function tag_slots.default_layouts (params) function tag_slots.default_layouts(params)
local alayout = require 'awful.layout' local alayout = require "awful.layout"
alayout.append_default_layouts(params.layouts) alayout.append_default_layouts(params.layouts)
end end
return tag_slots return tag_slots
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

6
stylua.toml Normal file
View File

@ -0,0 +1,6 @@
column_width = 80
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 4
quote_style = "AutoPreferDouble"
no_call_parentheses = true