Hey guys, I just updated hyprland and… a tiny thing does not work as intended anymore. I found a workaround, and discovered that now the configurations should be written in lua.
ok, I wrote an equivalent to my config, but when when I try it, it’s the default config that’s being used, meaning there’s something wrong with my dotfiles, somewhere.
Is anyone spoting what’s wrong ? (I commented out what I thought could be problematic, but no changes, still defaulting)
Or is there a log of the lua interpreter output somewhere ?
hyprland.lua
hl.monitor({
output = "DP-1",
mode = "[email protected]",
position = "0x0",
scale = 1,
})
hl.monitor({
output = "DP-3",
mode = "[email protected]",
position = "-1920x0",
scale = 1,
})
-------------------------
------ MY PROGRAMS ------
-------------------------
local terminal = "kitty"
local fileManager = "nautilus"
local menu = "wofi --show drun"
-----------------------
------ AUTOSTART ------
-----------------------
hl.on("hyprland.start", function()
hl.exec_cmd("hyprpm reload -n")
hl.exec_cmd("gammastep")
hl.exec_cmd("hyprpaper")
hl.exec_cmd("dunst")
end)
-----------------------------------
------ ENVIRONMENT-VARIABLES ------
-----------------------------------
hl.env("XCURSOR_SIZE", "24")
hl.env("HYPRCURSOR_SIZE", "24")
-------------------------
------ PERMISSIONS ------
-------------------------
---------------------------
------ LOOK AND FEEL ------
---------------------------
hl.config({
general = {
gaps_in = 1,
gaps_out = 0,
border_sizer = 1,
col = {
active_border = {
colors = { "rgba(33ccffee)", "rgba(00ff99ee)" },
angle = 45,
},
inactive_border = "rgba(595959aa)",
},
resize_on_border = false,
allow_tearing = false,
layout = "scrolling",
},
decoration = {
active_opacity = 1.0,
inactive_opacity = 1.0,
dim_inactive = false,
dim_strengh = 0.15,
},
animations = {
enabled = false,
},
})
hl.config({
scrolling = {
focuse_fit_method = 0,
fullscreen_on_one_column = true,
column_width = 1.0,
},
dwindle = {
preserve_split = true,
},
master = {
new_status = "master",
},
})
------------------
------ MISC ------
------------------
hl.config({
misc = {
force_default_wallpaper = 0,
disable_hyprland_logo = true,
vfr = false,
},
cursor = {
inactive_timeout = 2,
},
})
-------------------
----- INPUT -----
-------------------
hl.config({
input = {
kb_layout = "custom",
kb_variant = "coding",
kb_model = "",
kb_options = "",
kb_rules = "",
follow_mouse = 0,
sensitivity = 0,
touchpad = {
natural_scroll = false,
},
tablet = {
transform = 0,
ouput = "current",
region_position = { 1, 0 },
region_size = { 1918, 1080 },
left_handed = true,
active_area_size = { 240, 150 },
active_area_position = { 20, 25 },
},
},
})
---
--------------------------------------------
----- WORKSPACE & RELATED KEYBINDING -----
--------------------------------------------
--require("workspaces")
-------------------------
----- KEYBINDINGS -----
-------------------------
local mainmod = "SUPER"
hl.bind(mainmod .. " + T", hl.dsp.exec_cmd(terminal))
hl.bind(mainmod .. " + C", hl.dsp.window.close())
hl.bind(mainmod .. " + Escape", hl.dsp.exit())
hl.bind(mainmod .. " + E", hl.dsp.exec_cmd(fileManager))
hl.bind(mainmod .. " + space", hl.dsp.exec_cmd(menu))
--hl.bind(
-- mainmod .. " + F",
-- hl.dsp.window.fullscreen({
-- mode = "maximized",
-- action = "toggle",
-- })
--)
--hl.bind(mainmod .. " + SHIFT + F", hl.dsp.window.fullscreen({ "fullscreen", "toggle" }))
hl.bind(mainmod .. " + Tab", function()
hl.dsp.window.cycle_next("floating")
hl.dsp.window.alter_zorder({ mode = "top" })
end)
hl.bind(mainmod .. " + ALT + Delete", hl.dsp.exec_cmd('kitty -e "poweroff"'))
hl.bind(mainmod .. " + ALT + R", hl.dsp.exec_cmd('kitty -e "reboot"'))
-- move focus
hl.bind(mainmod .. " + J", hl.dsp.layout("focus l"))
hl.bind(mainmod .. " + L", hl.dsp.layout("focus r"))
hl.bind(mainmod .. " + N", hl.dsp.window.move({ monitor = "+1" }))
hl.bind(mainmod .. " + K", hl.dsp.focus({ workspace = "m-1" }))
hl.bind(mainmod .. " + I", hl.dsp.focus({ workspace = "m+1" }))
hl.bind(mainmod .. " + Comma", hl.dsp.focus({ monitor = "+1" }))
-- Move/resize windows with mainMod + LMB/RMB and dragging
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
-- Laptop multimedia keys for volume and LCD brightness
hl.bind(
"XF86AudioRaiseVolume",
hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"),
{ locked = true, repeating = true }
)
hl.bind(
"XF86AudioLowerVolume",
hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"),
{ locked = true, repeating = true }
)
hl.bind(
"XF86AudioMute",
hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"),
{ locked = true, repeating = true }
)
hl.bind(
"XF86AudioMicMute",
hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"),
{ locked = true, repeating = true }
)
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%+"), { locked = true, repeating = true })
hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%-"), { locked = true, repeating = true })
-- Requires playerctl
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true })
hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true })
workspaces.lua
hl.workspace_rule({ workspace = "special:keyring", on_created_empty = "$HOME/.local/bin/keepassxc" })
hl.workspace_rule({ workspace = "special:todo", on_created_empty = 'kitty -e "tdvim"' })
hl.workspace_rule({ workspace = "special:audio", on_created_empty = 'pavucontrol & kitty -e "alsamixer"' })
hl.workspace_rule({ workspace = "special:dashboard", on_created_empty = "$HOME/.local/bin/clock & gnome-calendar" })
-- right
hl.workspace_rule({ workspace = 1, monitor = "DP-1", default = true })
for i = 2, 9 do
hl.workspace_rule({ workspace = i, monitor = "DP-1" })
end
hl.workspace_rule({ workspace = 99, monitor = "DP-1" })
-- left
hl.workspace_rule({ workspace = 11, monitor = "DP-3", default = true })
for i = 12, 19 do
hl.workspace_rule({ workspace = i, monitor = "DP-3" })
end
hl.workspace_rule({ workspace = 199, monitor = "DP-3" })
hl.window_rule({
match = { workspace = 99 },
float = true,
})
hl.window_rule({
match = { workspace = 199 },
float = true,
})
-------------------
--- KEYBINDINGS ---
-------------------
local leader = "SUPER"
hl.bind(leader .. " + Slash", hl.dsp.workspace.toggle_special("keyring"))
hl.bind(leader .. " + Asterisk", hl.dsp.workspace.toggle_special("todo"))
hl.bind(leader .. " + Dollar", hl.dsp.workspace.toggle_special("audio"))
hl.bind(leader .. " + Minus", hl.dsp.workspace.toggle_special("dashboard"))
hl.bind(leader .. " + S", hl.dsp.workspace.toggle_special("magic"))
hl.bind(leader .. " + SHIFT + S", hl.dsp.window.move({ workspace = "special:magic" }))
local right_keys = "JKLUIO"
local left_keys = "SDFQER"
local function do_and_reset(f, i)
return function()
f({ workspace = i })
hl.dsp.submap("reset")
end
end
local function spatial_keys_template(f)
return function()
for i = 1, #right_keys do
local k = right_keys:sub(i, i)
hl.bind(leader .. " + " .. k, do_and_reset(f, i))
end
hl.bind(leader .. " + Comma", do_and_reset(f, 99))
for i = 1, #left_keys do
i = i + 10
local k = left_keys:sub(i, i)
hl.bind(leader .. " + " .. k, do_and_reset(f, i))
end
hl.bind(leader .. " + V", do_and_reset(f, 199))
hl.bind("catchall", hl.dsp.submap("reset"))
end
end
hl.bind(leader .. " + G", hl.dsp.submap("goto"))
hl.define_submap("goto", spatial_keys_template(hl.dsp.focus))
hl.bind(leader .. " + M", hl.dsp.submap("moveto"))
hl.define_submap("goto", spatial_keys_template(hl.dsp.window.move))