Compare commits
2 Commits
cca7b09909
...
78164cb4a4
| Author | SHA1 | Date | |
|---|---|---|---|
| 78164cb4a4 | |||
| 48ab194fdb |
@@ -25,7 +25,7 @@ hl.bind(mainMod .. "d", function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
-- Open windows
|
-- Open windows
|
||||||
local appBinds = {
|
local globalAppBinds = {
|
||||||
{ key = { "RETURN" }, dispatch = "kitty" },
|
{ key = { "RETURN" }, dispatch = "kitty" },
|
||||||
{ key = { "f", "o" }, dispatch = "firefox" },
|
{ key = { "f", "o" }, dispatch = "firefox" },
|
||||||
{ key = { "s" }, dispatch = "nemo" },
|
{ key = { "s" }, dispatch = "nemo" },
|
||||||
@@ -33,7 +33,7 @@ local appBinds = {
|
|||||||
{ mod = subMod, key = { "SHIFT + s" }, dispatch = "grimblast copy area" },
|
{ mod = subMod, key = { "SHIFT + s" }, dispatch = "grimblast copy area" },
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, bind in ipairs(appBinds) do
|
for _, bind in ipairs(globalAppBinds) do
|
||||||
local modBind = bind.mod or mainMod
|
local modBind = bind.mod or mainMod
|
||||||
if bind.key[keybindIndex] then
|
if bind.key[keybindIndex] then
|
||||||
hl.bind(modBind .. bind.key[keybindIndex], hl.dsp.exec_cmd(bind.dispatch))
|
hl.bind(modBind .. bind.key[keybindIndex], hl.dsp.exec_cmd(bind.dispatch))
|
||||||
@@ -89,7 +89,7 @@ hl.bind(mainMod .. "h", function()
|
|||||||
-- 9 derived from 5 gap plus 3 border (8), so first pixel of window is 9
|
-- 9 derived from 5 gap plus 3 border (8), so first pixel of window is 9
|
||||||
if pos == 9 then
|
if pos == 9 then
|
||||||
-- If first window, then move to monitor to the left
|
-- If first window, then move to monitor to the left
|
||||||
hl.dispatch(hl.dsp.focus({ monitor = "-1" }))
|
hl.dispatch(hl.dsp.focus({ monitor = "+1" }))
|
||||||
else
|
else
|
||||||
-- If not the first window then go to the column to the left
|
-- If not the first window then go to the column to the left
|
||||||
hl.dispatch(hl.dsp.layout("move -col"))
|
hl.dispatch(hl.dsp.layout("move -col"))
|
||||||
@@ -104,7 +104,7 @@ hl.bind(mainMod .. "l", function()
|
|||||||
-- Go back a window
|
-- Go back a window
|
||||||
hl.dispatch(hl.dsp.layout("move -col"))
|
hl.dispatch(hl.dsp.layout("move -col"))
|
||||||
-- Move to monitor to the right
|
-- Move to monitor to the right
|
||||||
hl.dispatch(hl.dsp.focus({ monitor = "+1" }))
|
hl.dispatch(hl.dsp.focus({ monitor = "-1" }))
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
@@ -27,18 +27,19 @@ hl.window_rule({
|
|||||||
|
|
||||||
-- Define windows that float
|
-- Define windows that float
|
||||||
local standardFloatingWindows = {
|
local standardFloatingWindows = {
|
||||||
{ class = "^(xdg-desktop-portal-gtk)$" },
|
{ class = "xdg-desktop-portal-gtk" },
|
||||||
{ class = "^(firefox)$", title = "^(.*Save.*)" },
|
{ class = "org.pulseaudio.pavucontrol" },
|
||||||
|
{ class = "firefox", title = ".*Save.*" },
|
||||||
}
|
}
|
||||||
|
|
||||||
-- For every window that floats make a rule
|
-- For every window that floats make a rule
|
||||||
for _, window in ipairs(standardFloatingWindows) do
|
for _, window in ipairs(standardFloatingWindows) do
|
||||||
hl.window_rule({
|
hl.window_rule({
|
||||||
name = "float file selector",
|
name = ("float " .. window.class),
|
||||||
match = {
|
match = {
|
||||||
-- both are optional ig
|
-- both are optional ig
|
||||||
class = window.class or "",
|
class = ("^(" .. (window.class or "") .. ")$"),
|
||||||
title = window.title or "",
|
title = ("^(" .. (window.title or "") .. ")"),
|
||||||
},
|
},
|
||||||
float = true,
|
float = true,
|
||||||
animation = "popin 70%",
|
animation = "popin 70%",
|
||||||
|
|||||||
Reference in New Issue
Block a user