lua
This commit is contained in:
1 parent
9930692c91
commit
7267fb6a93
1 file changed
+175
+175
@@ -0,0 +1,175 @@
|
||||
local mod = "SUPER"
|
||||
|
||||
-- keybinds
|
||||
|
||||
local commands = {
|
||||
{ "return", "ghostty" },
|
||||
{ "d", "wofi --show drun -IG" },
|
||||
{ "l", "popup pulsemixer" },
|
||||
{ "u", "popup qalc" },
|
||||
{ "k", "popup note" },
|
||||
{ "j", "ocr" },
|
||||
}
|
||||
|
||||
hl.bind(mod .. " + v", hl.dsp.window.close())
|
||||
hl.bind(mod .. " + 0", hl.dsp.exit())
|
||||
hl.bind(mod .. " + g", hl.dsp.group.toggle())
|
||||
hl.bind(mod .. " + h", hl.dsp.group.next())
|
||||
hl.bind(mod .. " + semicolon", hl.dsp.window.fullscreen())
|
||||
hl.bind(mod .. " + SHIFT + l", hl.dsp.workspace.toggle_special("keepass"))
|
||||
hl.bind("print", hl.dsp.exec_cmd("screenshot"))
|
||||
hl.bind("SHIFT + print", hl.dsp.exec_cmd("grim - | swappy -f -"))
|
||||
|
||||
local mov_keys = {
|
||||
{ "n", "left" },
|
||||
{ "e", "down" },
|
||||
{ "i", "up" },
|
||||
{ "o", "right" }
|
||||
}
|
||||
|
||||
local wss = {
|
||||
{ 1, "a" },
|
||||
{ 2, "r" },
|
||||
{ 3, "s" },
|
||||
{ 4, "t" },
|
||||
{ 5, "q" },
|
||||
{ 6, "w" },
|
||||
{ 7, "f" },
|
||||
{ 8, "p" },
|
||||
{ 10, "x" },
|
||||
{ 11, "c" },
|
||||
}
|
||||
|
||||
hl.bind(mod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
|
||||
hl.bind(mod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
|
||||
|
||||
for _, p in ipairs(commands) do
|
||||
local key = p[1]
|
||||
local cmd = p[2]
|
||||
hl.bind(mod .. " + " .. key, hl.dsp.exec_cmd(cmd))
|
||||
end
|
||||
|
||||
for _, p in ipairs(mov_keys) do
|
||||
local key = p[1]
|
||||
local dir = p[2]
|
||||
hl.bind(mod .. " + " .. key, hl.dsp.focus({ direction = dir }))
|
||||
hl.bind(mod .. " + SHIFT + " .. key, hl.dsp.window.move({ direction = dir }))
|
||||
end
|
||||
|
||||
for _, p in ipairs(wss) do
|
||||
local i = p[1]
|
||||
local key = p[2]
|
||||
hl.bind(mod .. " + " .. key, hl.dsp.focus({ workspace = i }))
|
||||
hl.bind(mod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i, follow = false }))
|
||||
end
|
||||
|
||||
-- window rules
|
||||
|
||||
hl.window_rule({
|
||||
match = {
|
||||
class = "term-popup"
|
||||
},
|
||||
float = true,
|
||||
})
|
||||
|
||||
--keepassxc
|
||||
hl.window_rule({
|
||||
match = {
|
||||
initial_title = ".* \\[Locked\\] - KeePassXC",
|
||||
},
|
||||
workspace = "special:keepass"
|
||||
})
|
||||
hl.window_rule({
|
||||
match = {
|
||||
class = "org.keepassxc.KeePassXC",
|
||||
initial_title = "negative:.* \\[Locked\\] - KeePassXC",
|
||||
},
|
||||
float = true
|
||||
})
|
||||
|
||||
|
||||
-- looks
|
||||
|
||||
local active_col = { colors = { "rgba(aaaaeeff)", "rgba(eeaaeeff)" }, angle = 45 }
|
||||
local inactive_col = 0xff333333
|
||||
|
||||
hl.config({
|
||||
general = {
|
||||
gaps_in = 9,
|
||||
gaps_out = 15,
|
||||
border_size = 2,
|
||||
col = {
|
||||
active_border = active_col,
|
||||
inactive_border = inactive_col
|
||||
}
|
||||
},
|
||||
decoration = {
|
||||
rounding = 10,
|
||||
blur = {
|
||||
enabled = true,
|
||||
size = 3,
|
||||
}
|
||||
},
|
||||
group = {
|
||||
col = {
|
||||
border_active = active_col,
|
||||
border_inactive = inactive_col
|
||||
},
|
||||
groupbar = {
|
||||
enabled = false
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
-- animations
|
||||
|
||||
hl.curve("decel", { type = "bezier", points = { { 0.05, 0.1 }, { 0.1, 1 } } })
|
||||
|
||||
hl.animation({ leaf = "windows", enabled = true, speed = 2, bezier = "decel", style = "popin 80%" })
|
||||
hl.animation({ leaf = "windowsOut", enabled = true, speed = 2, bezier = "decel", style = "popin 80%" })
|
||||
hl.animation({ leaf = "workspaces", enabled = true, speed = 2, bezier = "decel", style = "slidefade 5%" })
|
||||
hl.animation({ leaf = "fade", enabled = true, speed = 2, bezier = "decel" })
|
||||
|
||||
-- setup
|
||||
|
||||
hl.monitor({
|
||||
output = "",
|
||||
mode = "preferred",
|
||||
position = "auto",
|
||||
scale = "1",
|
||||
})
|
||||
|
||||
hl.config({
|
||||
input = {
|
||||
kb_layout = "us",
|
||||
kb_variant = "colemak_dh",
|
||||
kb_model = "",
|
||||
kb_options = "caps:escape",
|
||||
kb_rules = "",
|
||||
|
||||
repeat_rate = 50,
|
||||
repeat_delay = 300,
|
||||
|
||||
follow_mouse = 1,
|
||||
|
||||
sensitivity = 0.5, -- -1.0 - 1.0, 0 means no modification.
|
||||
accel_profile = "flat",
|
||||
|
||||
touchpad = {
|
||||
disable_while_typing = false,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
hl.on("hyprland.start", function()
|
||||
hl.exec_cmd("wayland-init")
|
||||
hl.exec_cmd("wallpaper")
|
||||
hl.exec_cmd("eww open bar-eDP")
|
||||
hl.exec_cmd("keepassxc")
|
||||
end)
|
||||
|
||||
-- get lua ls to stop complaining
|
||||
function _()
|
||||
---@diagnostic disable-next-line: lowercase-global
|
||||
hl = {}
|
||||
end
|
||||
Reference in new issue
Block a user