Initial Commit
This commit is contained in:
13
configuration/client/buttons.lua
Normal file
13
configuration/client/buttons.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
local awful = require('awful')
|
||||
|
||||
local modkey = require('configuration.keys.mod').modKey
|
||||
|
||||
return awful.util.table.join(awful.button({}, 1, function(c)
|
||||
_G.client.focus = c
|
||||
c:raise()
|
||||
end), awful.button({modkey}, 1, awful.mouse.client.move), awful.button({modkey, 'Shift'}, 1, awful.mouse.client.resize),
|
||||
awful.button({modkey}, 4, function()
|
||||
awful.layout.inc(1)
|
||||
end), awful.button({modkey}, 5, function()
|
||||
awful.layout.inc(-1)
|
||||
end))
|
1
configuration/client/init.lua
Normal file
1
configuration/client/init.lua
Normal file
@@ -0,0 +1 @@
|
||||
require('configuration.client.rules')
|
27
configuration/client/keys.lua
Normal file
27
configuration/client/keys.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
local awful = require('awful')
|
||||
require('awful.autofocus')
|
||||
local modkey = require('configuration.keys.mod').modKey
|
||||
local altkey = require('configuration.keys.mod').altKey
|
||||
|
||||
local clientKeys =
|
||||
awful.util.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', group = 'client'}
|
||||
)
|
||||
)
|
||||
|
||||
return clientKeys
|
74
configuration/client/rules.lua
Normal file
74
configuration/client/rules.lua
Normal file
@@ -0,0 +1,74 @@
|
||||
local awful = require('awful')
|
||||
local gears = require('gears')
|
||||
local client_keys = require('configuration.client.keys')
|
||||
local client_buttons = require('configuration.client.buttons')
|
||||
|
||||
-- Rules
|
||||
awful.rules.rules = {{
|
||||
rule = {},
|
||||
properties = {
|
||||
focus = awful.client.focus.filter,
|
||||
raise = true,
|
||||
keys = client_keys,
|
||||
buttons = client_buttons,
|
||||
screen = awful.screen.preferred,
|
||||
placement = awful.placement.no_offscreen,
|
||||
floating = false,
|
||||
maximized = false,
|
||||
above = false,
|
||||
below = false,
|
||||
ontop = false,
|
||||
sticky = false,
|
||||
maximized_horizontal = false,
|
||||
maximized_vertical = false
|
||||
}
|
||||
}, {
|
||||
rule_any = {
|
||||
type = {'dialog'},
|
||||
class = {'Wicd-client.py', 'calendar.google.com'}
|
||||
},
|
||||
properties = {
|
||||
placement = awful.placement.centered,
|
||||
ontop = true,
|
||||
floating = true,
|
||||
drawBackdrop = true,
|
||||
shape = function()
|
||||
return function(cr, w, h)
|
||||
gears.shape.rounded_rect(cr, w, h, 8)
|
||||
end
|
||||
end,
|
||||
skip_decoration = true
|
||||
}
|
||||
}, {
|
||||
rule_any = {
|
||||
type = {'modal'}
|
||||
},
|
||||
properties = {
|
||||
titlebars_enabled = true,
|
||||
floating = true,
|
||||
above = true,
|
||||
skip_decoration = true,
|
||||
placement = awful.placement.centered
|
||||
}
|
||||
}, {
|
||||
rule_any = {
|
||||
type = {'utility'}
|
||||
},
|
||||
properties = {
|
||||
titlebars_enabled = false,
|
||||
floating = true,
|
||||
skip_decoration = true,
|
||||
placement = awful.placement.centered
|
||||
}
|
||||
}, {
|
||||
rule_any = {
|
||||
type = {'splash'},
|
||||
name = {'Discord Updater'}
|
||||
},
|
||||
properties = {
|
||||
floating = true,
|
||||
above = true,
|
||||
skip_decoration = true,
|
||||
placement = awful.placement.centered
|
||||
}
|
||||
}}
|
Reference in New Issue
Block a user