Updated hyprland config

This commit is contained in:
Gu://em_ 2026-08-04 11:39:33 +02:00
parent 8587f9d2e0
commit c582124035
9 changed files with 58 additions and 165 deletions

View file

@ -1,4 +1,3 @@
-- active_color = "rgba(f55c20ff)"
active_color = "rgba(de3c3cff)"
inactive_color = "rgba(595959aa)"

View file

@ -1,18 +1,12 @@
-- Refer to https://wiki.hyprland.org/Configuring/Variables/
local colors = require("config/colors")
-- https://wiki.hyprland.org/Configuring/Variables/#general
hl.config({
general = {
gaps_in = 1,
gaps_out = 1,
border_size = 1,
-- https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
-- Resizing windows by clicking and dragging on borders and gaps
resize_on_border = true,
-- Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false,
layout = "dwindle",
col = {
@ -22,7 +16,6 @@ hl.config({
},
})
-- https://wiki.hyprland.org/Configuring/Variables/#decoration
hl.config({
decoration = {
rounding = 2,
@ -35,7 +28,6 @@ hl.config({
render_power = 3,
color = "rgba(1a1a1aee)",
},
-- https://wiki.hyprland.org/Configuring/Variables/#blur
blur = {
enabled = true,
size = 6,
@ -128,33 +120,24 @@ hl.animation({ leaf="workspaces", enabled=true, speed=2.8, bezier="easeOutQu
hl.animation({ leaf="workspacesIn", enabled=true, speed=2.6, bezier="easeOutQuint", style="slide" })
hl.animation({ leaf="workspacesOut", enabled=true, speed=2.6, bezier="easeOutQuint", style="slide" })
-- Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/
-- "Smart gaps" / "No gaps when only"
-- uncomment all if you wish to use that.
-- workspace = w[tv1], gapsout:0, gapsin:0
-- workspace = f[1], gapsout:0, gapsin:0
-- windowrulev2 = bordersize 0, floating:0, onworkspace:w[tv1]
-- windowrulev2 = rounding 0, floating:0, onworkspace:w[tv1]
-- windowrulev2 = bordersize 0, floating:0, onworkspace:f[1]
-- windowrulev2 = rounding 0, floating:0, onworkspace:f[1]
-- Layouts
-- See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
-- Dwindle
hl.config({
dwindle = {
preserve_split = true,
-- You probably want this
},
})
-- See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
-- Master
hl.config({
master = {
new_status = "master",
},
})
-- https://wiki.hyprland.org/Configuring/Variables/#misc
-- Misc
hl.config({
misc = {
force_default_wallpaper = 0, -- Set to 0 or 1 to disable the anime mascot wallpapers
@ -168,9 +151,6 @@ hl.config({
---- WINDOWS AND WORKSPACES ---
-------------------------------
-- See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
-- See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
-- Ignore maximize requests from apps. You'll probably like this.
hl.window_rule({
name = "suppress-maximize-events",
@ -179,7 +159,6 @@ hl.window_rule({
suppress_event = "maximize",
})
-- Fix some dragging issues with XWayland
hl.window_rule({
-- Fix some dragging issues with XWayland
@ -196,24 +175,7 @@ hl.window_rule({
no_focus = true,
})
-- Albert
hl.window_rule({
name = "albert",
match = {
class = "^(albert)$",
},
border_size = 0,
no_blur = true,
no_shadow = true,
float = true,
stay_focused = true,
no_dim = true,
})
-- Prism Launcher
hl.window_rule({
name = "prismlauncher-all",
match = {
@ -221,7 +183,6 @@ hl.window_rule({
},
pseudo = true,
})
hl.window_rule({
name = "prismlauncher-main",
match = {
@ -232,7 +193,6 @@ hl.window_rule({
})
-- Nautilus
hl.window_rule({
name = "nautilus-main",
match = {
@ -243,7 +203,6 @@ hl.window_rule({
})
-- GTK file picker
hl.window_rule({
name = "gtk-file-picker",
match = {
@ -256,7 +215,6 @@ hl.window_rule({
-- Vivado
--# Loading screen
hl.window_rule({
name = "vivado-loading-screen",
match = {
@ -265,7 +223,6 @@ hl.window_rule({
float = true,
center = true,
})
hl.window_rule({
name = "vivado-loading-screen-2",
match = {
@ -273,9 +230,7 @@ hl.window_rule({
},
size = { 397, 295 },
})
--# Main window
hl.window_rule({
name = "vivado-main",
match = {
@ -285,7 +240,6 @@ hl.window_rule({
})
-- Kdenlive
hl.window_rule({
name = "kdenlive-all",
match = {
@ -293,7 +247,6 @@ hl.window_rule({
},
pseudo = true,
})
hl.window_rule({
name = "kdenlive-welcome",
match = {
@ -303,7 +256,6 @@ hl.window_rule({
})
-- Gnome characters
hl.window_rule({
name = "gnome-characters",
match = {
@ -313,6 +265,20 @@ hl.window_rule({
size = { "(849)", "(566)" },
})
-- Albert
hl.window_rule({
name = "albert",
match = {
class = "^(albert)$",
},
border_size = 0,
no_blur = true,
no_shadow = true,
float = true,
stay_focused = true,
no_dim = true,
})
-- Legacy disabled code

View file

@ -27,7 +27,6 @@ end)
---- PERMISSIONS ---
--------------------
-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Permissions/
-- Please note permission changes here require a Hyprland restart and are not applied on-the-fly
-- for security reasons
@ -42,8 +41,6 @@ hl.config({
---- ENVIRONMENT VARIABLES ---
------------------------------
-- See https://wiki.hyprland.org/Configuring/Environment-variables/
-- HyprCursor
hl.env("HYPRCURSOR_THEME", "VolantesCursors")
hl.env("XCURSOR_THEME", "VolantesCursors")

View file

@ -2,8 +2,6 @@
---- INPUT ---
--------------
-- https://wiki.hyprland.org/Configuring/Variables/#input
hl.config({
input = {
numlock_by_default = true,
@ -16,32 +14,18 @@ hl.config({
},
})
-- https://wiki.hyprland.org/Configuring/Variables/#gestures
-- TODO port to lua
-- gesture = 3, "horizontal", "workspace"
-- Example per-device config
-- See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
hl.device({
name = "epic-mouse-v1",
sensitivity = -0.5,
-- Gestures
hl.gesture({
fingers = 3,
direction = "horizontal",
action = "workspace",
})
--------------------
---- KEYBINDINGS ---
--------------------
-- See https://wiki.hyprland.org/Configuring/Keywords/
mainMod = "SUPER" -- Sets "Windows" key as main modifier
-- Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
-- TODO use the ones defined in envuronment.lua
local terminal = "foot"
local fileManager = "nautilus"
local menu = "rofi -show drun"
local notificationManager = "swaync-client -t"
mainMod = "SUPER" -- Sets META ("Windows") key as main modifier
-- Main desktop controls
hl.bind(mainMod .. " + Q" , hl.dsp.window.close())
@ -90,49 +74,19 @@ hl.bind(mainMod .. " + " .. "T", hl.dsp.window.float())
hl.bind(mainMod .. " + " .. "Y", hl.dsp.window.pseudo()) -- Toggle pseudo-tiling
-- Switch workspaces with mainMod + [0-9]
hl.bind(mainMod .. " + 1", hl.dsp.focus({ workspace = 1 }))
hl.bind(mainMod .. " + 2", hl.dsp.focus({ workspace = 2 }))
hl.bind(mainMod .. " + 3", hl.dsp.focus({ workspace = 3 }))
hl.bind(mainMod .. " + 4", hl.dsp.focus({ workspace = 4 }))
hl.bind(mainMod .. " + 5", hl.dsp.focus({ workspace = 5 }))
hl.bind(mainMod .. " + 6", hl.dsp.focus({ workspace = 6 }))
hl.bind(mainMod .. " + 7", hl.dsp.focus({ workspace = 7 }))
hl.bind(mainMod .. " + 8", hl.dsp.focus({ workspace = 8 }))
hl.bind(mainMod .. " + 9", hl.dsp.focus({ workspace = 9 }))
hl.bind(mainMod .. " + 0", hl.dsp.focus({ workspace = 10 }))
-- Move active window to a workspace with mainMod + SHIFT + [0-9]
hl.bind(mainMod .. " + SHIFT + 1", hl.dsp.window.move({ workspace = 1 }))
hl.bind(mainMod .. " + SHIFT + 2", hl.dsp.window.move({ workspace = 2 }))
hl.bind(mainMod .. " + SHIFT + 3", hl.dsp.window.move({ workspace = 3 }))
hl.bind(mainMod .. " + SHIFT + 4", hl.dsp.window.move({ workspace = 4 }))
hl.bind(mainMod .. " + SHIFT + 5", hl.dsp.window.move({ workspace = 5 }))
hl.bind(mainMod .. " + SHIFT + 6", hl.dsp.window.move({ workspace = 6 }))
hl.bind(mainMod .. " + SHIFT + 7", hl.dsp.window.move({ workspace = 7 }))
hl.bind(mainMod .. " + SHIFT + 8", hl.dsp.window.move({ workspace = 8 }))
hl.bind(mainMod .. " + SHIFT + 9", hl.dsp.window.move({ workspace = 9 }))
hl.bind(mainMod .. " + SHIFT + 0", hl.dsp.window.move({ workspace = 10 }))
-- TODO more concise notation for workspaces
-- for i = 0, 10 do
-- hl.bind(mainMod .. " + " .. key, hl.dsp.focus({ workspace = i}))
-- hl.bind(mainMod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i }))
-- end
for i = 0, 10 do
key = i % 10
hl.bind(mainMod .. " + " .. key, hl.dsp.focus({ workspace = i}))
hl.bind(mainMod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i }))
end
-- Example special workspace (scratchpad)
hl.bind(mainMod .. " + S", hl.dsp.workspace.toggle_special("magic"))
hl.bind(mainMod .. " + SHIFT + S", hl.dsp.window.move({ workspace = "special:magic" }))
-- TODO
-- Minimize function (uses scratchpad)
-- For testing, may be removed in future releases
hl.bind(mainMod .. " + N", hl.dsp.workspace.toggle_special("magic"))
-- TODO fix
-- hl.bind(mainMod .. " + N", hl.dsp.window.move({ direction = "+0" }))
hl.bind(mainMod .. " + N", hl.dsp.workspace.toggle_special("magic"))
hl.bind(mainMod .. " + N", hl.dsp.window.move({ workspace = "special:magic" }))
hl.bind(mainMod .. " + N", hl.dsp.workspace.toggle_special("magic"))
-- Scroll through existing workspaces with mainMod + scroll
hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }))
@ -183,6 +137,3 @@ hl.bind(mainMod .. " + " .. "CONTROL" .. " + " .. "SPACE", hl.dsp.exec_cmd("~/.c
-- Lock laptop on lid close
hl.bind("switch:off:Lid Switch", hl.dsp.exec_cmd("hyprlock --immediate"), { locked = true })
--- Testing
--bind = $mainMod, TAB, overview:toggle, toggle

View file

@ -7,26 +7,12 @@ hl.config({
--# Keybindings
--# Switch workspaces with mainMod + [0-9]
hl.bind(mainMod.. " + ampersand", hl.dsp.focus({ workspace = 1 }))
hl.bind(mainMod.. " + eacute", hl.dsp.focus({ workspace = 2 }))
hl.bind(mainMod.. " + quotedbl", hl.dsp.focus({ workspace = 3 }))
hl.bind(mainMod.. " + apostrophe", hl.dsp.focus({ workspace = 4 }))
hl.bind(mainMod.. " + parenleft", hl.dsp.focus({ workspace = 5 }))
hl.bind(mainMod.. " + minus", hl.dsp.focus({ workspace = 6 }))
hl.bind(mainMod.. " + egrave", hl.dsp.focus({ workspace = 7 }))
hl.bind(mainMod.. " + underscore", hl.dsp.focus({ workspace = 8 }))
hl.bind(mainMod.. " + ccedilla", hl.dsp.focus({ workspace = 9 }))
hl.bind(mainMod.. " + agrave", hl.dsp.focus({ workspace = 10 }))
-- Switch workspaces with mainMod + [0-9]
-- Move active window to a workspace with mainMod + SHIFT + [0-9]
local fr_digits_layout = [ "ampersand", "eacute", "quotedbl", "apostrophe", "parenleft", "minus", "egrave", "underscore", "ccedilla", "agrave", ]
for i = 0, 10 do
key = fr_digits_layout[i%10]
hl.bind(mainMod.. " + " .. key, hl.dsp.focus({ workspace = i }))
hl.bind(mainMod.. " + SHIFT + " .. key, hl.dsp.focus({ workspace = i }))
end
--# Move active window to a workspace with mainMod + SHIFT + [0-9]
hl.bind(mainMod .. "SHIFT + ampersand", hl.dsp.window.move({ workspace = 1 }))
hl.bind(mainMod .. "SHIFT + eacute", hl.dsp.window.move({ workspace = 2 }))
hl.bind(mainMod .. "SHIFT + quotedbl", hl.dsp.window.move({ workspace = 3 }))
hl.bind(mainMod .. "SHIFT + apostrophe", hl.dsp.window.move({ workspace = 4 }))
hl.bind(mainMod .. "SHIFT + parenleft", hl.dsp.window.move({ workspace = 5 }))
hl.bind(mainMod .. "SHIFT + minus", hl.dsp.window.move({ workspace = 6 }))
hl.bind(mainMod .. "SHIFT + egrave", hl.dsp.window.move({ workspace = 7 }))
hl.bind(mainMod .. "SHIFT + underscore", hl.dsp.window.move({ workspace = 8 }))
hl.bind(mainMod .. "SHIFT + ccedilla", hl.dsp.window.move({ workspace = 9 }))
hl.bind(mainMod .. "SHIFT + agrave", hl.dsp.window.move({ workspace = 10 }))

View file

@ -1,4 +1,3 @@
--# Overrides inputs for QWERTY layout
hl.config({
input = {
kb_layout = "fr",
@ -6,26 +5,4 @@ hl.config({
},
})
-- Switch workspaces with mainMod + [0-9]
hl.bind(mainMod .. " + 1", hl.dsp.focus({ workspace = 1 }))
hl.bind(mainMod .. " + 2", hl.dsp.focus({ workspace = 2 }))
hl.bind(mainMod .. " + 3", hl.dsp.focus({ workspace = 3 }))
hl.bind(mainMod .. " + 4", hl.dsp.focus({ workspace = 4 }))
hl.bind(mainMod .. " + 5", hl.dsp.focus({ workspace = 5 }))
hl.bind(mainMod .. " + 6", hl.dsp.focus({ workspace = 6 }))
hl.bind(mainMod .. " + 7", hl.dsp.focus({ workspace = 7 }))
hl.bind(mainMod .. " + 8", hl.dsp.focus({ workspace = 8 }))
hl.bind(mainMod .. " + 9", hl.dsp.focus({ workspace = 9 }))
hl.bind(mainMod .. " + 0", hl.dsp.focus({ workspace = 10 }))
-- Move active window to a workspace with mainMod + SHIFT + [0-9]
hl.bind(mainMod .. " + SHIFT + 1", hl.dsp.window.move({ workspace = 1 }))
hl.bind(mainMod .. " + SHIFT + 2", hl.dsp.window.move({ workspace = 2 }))
hl.bind(mainMod .. " + SHIFT + 3", hl.dsp.window.move({ workspace = 3 }))
hl.bind(mainMod .. " + SHIFT + 4", hl.dsp.window.move({ workspace = 4 }))
hl.bind(mainMod .. " + SHIFT + 5", hl.dsp.window.move({ workspace = 5 }))
hl.bind(mainMod .. " + SHIFT + 6", hl.dsp.window.move({ workspace = 6 }))
hl.bind(mainMod .. " + SHIFT + 7", hl.dsp.window.move({ workspace = 7 }))
hl.bind(mainMod .. " + SHIFT + 8", hl.dsp.window.move({ workspace = 8 }))
hl.bind(mainMod .. " + SHIFT + 9", hl.dsp.window.move({ workspace = 9 }))
hl.bind(mainMod .. " + SHIFT + 0", hl.dsp.window.move({ workspace = 10 }))
-- No need to update the default input layout

View file

@ -0,0 +1,16 @@
-- Laptop screen
hl.monitor({
output = "eDP-1",
mode = "preferred",
position = "auto",
scale = 1,
})
hl.monitor = {
output = "*",
mode = "preferred",
position = "auto",
scale = "1",
mirror = "eDP-1",
}

View file

@ -1,5 +1,3 @@
-- See https://wiki.hyprland.org/Configuring/Monitors/
-- Default
hl.monitor({
output = "",

View file

@ -10,3 +10,6 @@ plugin {
gapsOut = 20
}
}
# Bindings
# bind = $mainMod, TAB, overview:toggle, toggle