Updated hyprland to use lua to be compatible 0.55

This commit is contained in:
_N0x 2026-05-17 16:49:33 +02:00
parent f308f2fe75
commit 23718c9477
7 changed files with 267 additions and 287 deletions

View File

@ -0,0 +1,92 @@
-----------------------
---- LOOK AND FEEL ----
-----------------------
hl.config({
general = {
gaps_in = 5,
gaps_out = 10,
border_size = 2,
col = {
active_border = { colors = { "rgba(7fbbb3ee)", "rgba(a7c080ee)" }, angle = 45 },
inactive_border = "rgba(384b55aa)",
},
resize_on_border = false,
allow_tearing = false,
layout = "dwindle",
},
decoration = {
rounding = 10,
active_opacity = 1.0,
inactive_opacity = 1.0,
shadow = {
enabled = true,
range = 4,
render_power = 3,
color = "rgba(1a1a1aee)",
},
blur = {
enabled = true,
size = 3,
passes = 1,
vibrancy = 0.1696,
},
},
animations = {
enabled = true,
},
dwindle = {
-- pseudotile = true,
preserve_split = true,
},
master = {
new_status = "master",
},
misc = {
force_default_wallpaper = -1,
disable_hyprland_logo = false,
},
cursor = {
no_hardware_cursors = true,
},
})
---------------------
---- ANIMATIONS -----
---------------------
-- Curves and animation leaves are now top-level hl.curve / hl.animation calls.
hl.curve("myBezier", { type = "bezier", points = { { 0.05, 0.9 }, { 0.1, 1.05 } } })
hl.animation({ leaf = "windows", enabled = true, speed = 7, bezier = "myBezier" })
hl.animation({ leaf = "windowsOut", enabled = true, speed = 7, bezier = "default", style = "popin 80%" })
hl.animation({ leaf = "border", enabled = true, speed = 10, bezier = "default" })
hl.animation({ leaf = "borderangle", enabled = true, speed = 8, bezier = "default" })
hl.animation({ leaf = "fade", enabled = true, speed = 7, bezier = "default" })
hl.animation({ leaf = "workspaces", enabled = true, speed = 6, bezier = "default" })
---------------
---- INPUT ----
---------------
hl.config({
input = {
kb_layout = "de",
kb_variant = "",
kb_model = "",
kb_options = "",
kb_rules = "",
follow_mouse = 1,
sensitivity = 0,
numlock_by_default = true,
touchpad = {
natural_scroll = false,
},
},
})

View File

@ -0,0 +1,53 @@
---------------------
---- KEYBINDINGS ----
---------------------
-- Core
hl.bind(mainMod .. " + SHIFT + return", hl.dsp.exec_cmd(terminal))
hl.bind(mainMod .. " + SHIFT + C", hl.dsp.window.close())
hl.bind(mainMod .. " + SHIFT + Q", hl.dsp.exit())
hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager))
hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" }))
hl.bind(mainMod .. " + P", hl.dsp.exec_cmd(menu))
hl.bind(mainMod .. " + SHIFT + P", hl.dsp.window.pseudo()) -- dwindle
hl.bind(mainMod .. " + J", hl.dsp.layout("togglesplit")) -- dwindle
hl.bind(mainMod .. " + SHIFT + S", hl.dsp.exec_cmd(screenshot))
hl.bind(mainMod .. " + SHIFT + B", hl.dsp.exec_cmd(pwmanager))
hl.bind(mainMod .. " + L", hl.dsp.exec_cmd(lockscreen))
hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen())
hl.bind(mainMod .. " + ESCAPE", hl.dsp.exec_cmd("nwg-bar"))
-- Move focus
hl.bind(mainMod .. " + left", hl.dsp.focus({ direction = "l" }))
hl.bind(mainMod .. " + right", hl.dsp.focus({ direction = "r" }))
hl.bind(mainMod .. " + up", hl.dsp.focus({ direction = "u" }))
hl.bind(mainMod .. " + down", hl.dsp.focus({ direction = "d" }))
-- Special workspace (scratchpad)
hl.bind(mainMod .. " + space", hl.dsp.workspace.toggle_special("magic"))
hl.bind(mainMod .. " + SHIFT + space", hl.dsp.window.move({ workspace = "special:magic" }))
-- Scroll through existing workspaces
hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }))
hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }))
-- Mouse drag/resize (mouse = true replaces the old `bindm`)
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
-- Multimedia (locked = true makes them work while session is locked,
-- replacing the bindel flags `e` and `l`)
hl.bind(
"XF86AudioRaiseVolume",
hl.dsp.exec_cmd("wpctl set-volume @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 })
hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { locked = true })
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl s 5%+"), { locked = true, repeating = true })
hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl s 5%-"), { locked = true, repeating = true })

View File

@ -0,0 +1,13 @@
------------------
---- MONITORS ----
------------------
-- Hyprland uses an inverse Y cartesian system: negative y places a monitor
-- HIGHER. The original conf had DP-2 at y=1440 (below DP-1). Kept as-is.
hl.monitor({ output = "DP-1", mode = "2560x1440@165", position = "0x0", scale = 1 })
hl.monitor({ output = "DP-2", mode = "3440x1440@165", position = "-440x1440", scale = 1 })
-- Persistent workspace 1 on DP-2
hl.workspace_rule({
workspace = "1",
monitor = "DP-2",
})

View File

@ -0,0 +1,23 @@
hl.config({
plugin = {
split_monitor_workspaces = {
count = 6,
keep_focused = 0,
enable_notifications = 0,
enable_persistent_workspaces = 1,
},
},
})
local smw = hl.plugin.split_monitor_workspaces
-- Switch workspaces with mainMod + [1-5]
for i = 1, 6 do
local key = tostring(i)
hl.bind(mainMod .. " + " .. key, function()
return smw.workspace(i)
end)
hl.bind(mainMod .. " + SHIFT + " .. key, function()
return smw.move_to_workspace_silent(i)
end)
end

View File

@ -1,285 +0,0 @@
# #######################################################################################
# AUTOGENERATED HYPR CONFIG.
# PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT,
# OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS.
# #######################################################################################
# This is an example Hyprland config file.
# Refer to the wiki for more information.
# https://wiki.hyprland.org/Configuring/Configuring-Hyprland/
# Please note not all available settings / options are set here.
# For a full list, see the wiki
# You can split this configuration into multiple files
# Create your files separately and then link them to this file like this:
# source = ~/.config/hypr/myColors.conf
################
### MONITORS ###
################
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor = eDP-1,1920x1080@60,0x0,1
monitor = , preferred, auto, 1 # For automatic discplay connection
###################
### MY PROGRAMS ###
###################
# See https://wiki.hyprland.org/Configuring/Keywords/
# Set programs that you use
$terminal = kitty
$fileManager = pcmanfm
$menu = rofi -show drun
$screenshot = grim -g "$(slurp)" - | swappy -f -
$pwmanager = bitwarden-desktop
$lockscreen = hyprlock
#################
### AUTOSTART ###
#################
# Autostart necessary processes (like notifications daemons, status bars, etc.)
# Or execute your favorite apps at launch like this:
exec-once = waybar
exec-once = hyprpaper
exec-once = nm-applet
exec-once = blueman-applet
exec-once = bitwarden-desktop
exec-once = udiskie
exec-once = dunst
exec-once = nextcloud --background
#############################
### ENVIRONMENT VARIABLES ###
#############################
# See https://wiki.hyprland.org/Configuring/Environment-variables/
env = XCURSOR_SIZE,24
env = HYPRCURSOR_SIZE,24
#####################
### LOOK AND FEEL ###
#####################
# Refer to https://wiki.hyprland.org/Configuring/Variables/
# https://wiki.hyprland.org/Configuring/Variables/#general
general {
gaps_in = 5
gaps_out = 10
border_size = 2
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
col.active_border = rgba(7fbbb3ee) rgba(A7c080ee) 45deg
col.inactive_border = rgba(384b55aa)
# Set to true enable resizing windows by clicking and dragging on borders and gaps
resize_on_border = false
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false
layout = dwindle
}
# https://wiki.hyprland.org/Configuring/Variables/#decoration
decoration {
rounding = 10
# Change transparency of focused and unfocused windows
active_opacity = 1.0
inactive_opacity = 1.0
shadow {
range = 4
render_power = 3
color = rgba(1a1a1aee)
}
# https://wiki.hyprland.org/Configuring/Variables/#blur
blur {
enabled = true
size = 3
passes = 1
vibrancy = 0.1696
}
}
# https://wiki.hyprland.org/Configuring/Variables/#animations
animations {
enabled = true
# Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
dwindle {
pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true # You probably want this
}
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
master {
new_status = master
}
# https://wiki.hyprland.org/Configuring/Variables/#misc
misc {
force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :(
}
#############
### INPUT ###
#############
# https://wiki.hyprland.org/Configuring/Variables/#input
input {
kb_layout = de
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
touchpad {
natural_scroll = false
}
numlock_by_default = true
}
# https://wiki.hyprland.org/Configuring/Variables/#gestures
gestures {
workspace_swipe = true
workspace_swipe_touch = true
workspace_swipe_forever = true
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
device {
#name = epic-mouse-v1
#sensitivity = -0.5
}
###################
### 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
bind = $mainMod SHIFT, return, exec, $terminal
bind = $mainMod SHIFT, C, killactive,
bind = $mainMod SHIFT, Q, exit,
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, V, togglefloating,
bind = $mainMod, P, exec, $menu
bind = $mainMod SHIFT, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod SHIFT, S, exec, $screenshot
bind = $mainMod SHIFT, B, exec, $pwmanager
bind = $mainMod, L, exec, $lockscreen
bind = $mainMod, F, fullscreen
bind = $mainMod, ESCAPE, exec, nwg-bar
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Example special workspace (scratchpad)
bind = $mainMod, space, togglespecialworkspace, magic
bind = $mainMod SHIFT, space, movetoworkspace, special:magic
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# Laptop multimedia keys for volume and LCD brightness
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 5%+
bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 5%-
##############################
### WINDOWS AND WORKSPACES ###
##############################
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
#
windowrulev2 = float,title:^(Bitwarden)$
windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.
cursor {
no_hardware_cursors = true
}
$mainMod = SUPER

View File

@ -0,0 +1,79 @@
-- ##########################################################################
-- Hyprland 0.55+ Lua configuration.
-- Migrated from hyprland.conf (hyprlang). Hyprlang is deprecated since 0.55.
-- File location: $XDG_CONFIG_HOME/hypr/hyprland.lua (~/.config/hypr/hyprland.lua)
-- Wiki: https://wiki.hypr.land/Configuring/Start/
-- ##########################################################################
local configDir = os.getenv("HOME") .. "/.config/hypr/"
package.path = configDir .. "?.lua;" .. package.path
----------------------
---- GLOBAL BINDS ----
----------------------
_G.mainMod = "SUPER"
---------------------
---- MY PROGRAMS ----
---------------------
_G.terminal = "kitty"
_G.fileManager = "pcmanfm"
_G.menu = "rofi -show drun"
_G.screenshot = 'grim -g "$(slurp)" - | swappy -f -'
_G.pwmanager = "bitwarden-desktop"
_G.lockscreen = "hyprlock"
require("hyprconf.base")
require("hyprconf.monitor")
require("hyprconf.keybinds")
require("hyprconf.split-workspace")
-------------------
---- AUTOSTART ----
-------------------
-- exec-once is gone; use hl.on("hyprland.start", ...).
hl.on("hyprland.start", function()
hl.exec_cmd("hyprpm reload")
hl.exec_cmd("waybar")
hl.exec_cmd("hyprpaper")
hl.exec_cmd("nm-applet")
hl.exec_cmd("blueman-applet")
hl.exec_cmd("bitwarden-desktop")
hl.exec_cmd("udiskie")
hl.exec_cmd("dunst")
hl.exec_cmd("nextcloud --background")
end)
-------------------------------
---- ENVIRONMENT VARIABLES ----
-------------------------------
hl.env("XCURSOR_SIZE", "24")
hl.env("HYPRCURSOR_SIZE", "24")
-- NVIDIA / Wayland environment.
hl.env("LIBVA_DRIVER_NAME", "nvidia")
hl.env("XDG_SESSION_TYPE", "wayland")
hl.env("GBM_BACKEND", "nvidia-drm")
hl.env("__GLX_VENDOR_LIBRARY_NAME", "nvidia")
hl.env("NVD_BACKEND", "direct")
--------------------------------
---- WINDOWS AND WORKSPACES ----
--------------------------------
-- Float Bitwarden
hl.window_rule({
name = "bw-float",
match = { title = "^(Bitwarden)$" },
float = true,
})
-- Suppress maximize events from all clients
hl.window_rule({
name = "suppress-maximize-events",
match = { class = ".*" },
suppress_event = "maximize",
})

View File

@ -1,2 +1,7 @@
preload = ~/.config/hypr/wp.png
wallpaper = , ~/.config/hypr/wp.png
wallpaper {
monitor =
path = ~/.config/hypr/wp.png
fit_mode = cover
}
splash = false