Hyprland lua config

This commit is contained in:
2026-06-13 15:36:28 +01:00
parent 722bea8ea4
commit 12c09eaba5
4 changed files with 131 additions and 39 deletions
+2 -39
View File
@@ -1,9 +1,3 @@
# #######################################################################################
# AUTOGENERATED HYPRLAND CONFIG.
# EDIT THIS CONFIG ACCORDING TO THE WIKI INSTRUCTIONS.
# #######################################################################################
# This is an example Hyprland config file.
# Refer to the wiki for more information.
# https://wiki.hypr.land/Configuring/
@@ -112,7 +106,6 @@ master {
# https://wiki.hypr.land/Configuring/Variables/#decoration
decoration {
rounding = 0
rounding_power = 2
# Change transparency of focused and unfocused windows
active_opacity = 1.0
@@ -135,35 +128,7 @@ decoration {
# https://wiki.hypr.land/Configuring/Variables/#animations
animations {
enabled = no, please :)
# Default curves, see https://wiki.hypr.land/Configuring/Animations/#curves
# NAME, X0, Y0, X1, Y1
bezier = easeOutQuint, 0.23, 1, 0.32, 1
bezier = easeInOutCubic, 0.65, 0.05, 0.36, 1
bezier = linear, 0, 0, 1, 1
bezier = almostLinear, 0.5, 0.5, 0.75, 1
bezier = quick, 0.15, 0, 0.1, 1
# Default animations, see https://wiki.hypr.land/Configuring/Animations/
# NAME, ONOFF, SPEED, CURVE, [STYLE]
animation = global, 1, 10, default
animation = border, 1, 5.39, easeOutQuint
animation = windows, 1, 4.79, easeOutQuint
animation = windowsIn, 1, 4.1, easeOutQuint, popin 87%
animation = windowsOut, 1, 1.49, linear, popin 87%
animation = fadeIn, 1, 1.73, almostLinear
animation = fadeOut, 1, 1.46, almostLinear
animation = fade, 1, 3.03, quick
animation = layers, 1, 3.81, easeOutQuint
animation = layersIn, 1, 4, easeOutQuint, fade
animation = layersOut, 1, 1.5, linear, fade
animation = fadeLayersIn, 1, 1.79, almostLinear
animation = fadeLayersOut, 1, 1.39, almostLinear
animation = workspaces, 1, 1.94, almostLinear, fade
animation = workspacesIn, 1, 1.21, almostLinear, fade
animation = workspacesOut, 1, 1.94, almostLinear, fade
animation = zoomFactor, 1, 7, quick
enabled = no
}
# Ref https://wiki.hypr.land/Configuring/Workspace-Rules/
@@ -311,9 +276,7 @@ bindl = , XF86AudioPrev, exec, playerctl previous
# Example windowrule
# windowrule = float,class:^(kitty)$,title:^(kitty)$
windowrule = match:class org.zotero.Zotero, float on
# Ignore maximize requests from apps. You'll probably like this.
# Fix some dragging issues with XWayland
exec-once=waybar
exec-once=hyprpaper
+127
View File
@@ -0,0 +1,127 @@
-- Monitors
hl.monitor({
output = "VGA-1",
mode = "1920x1080@60",
position = "0x0",
scale = 1,
})
hl.monitor({
output = "LVDS-1",
mode = "1600x900@59.99",
position = "1920x0",
scale = 1,
})
-- Programs
local terminal = "kitty"
local fileManager = "dolphin"
local menu = "fuzzel"
-- Environment variables
hl.env("XCURSOR_SIZE", "24")
hl.env("HYPRCURSOR_SIZE", "24")
-- Look and feel
hl.config({
-- General
general = {
gaps_in = 0,
gaps_out = 0,
border_size = 2,
col = {
active_border = "rgb(859900)",
inactive_border = "rgb(839496)",
},
resize_on_border = false,
allow_tearing = false,
layout = "master",
},
-- Layout
master = {
mfact = 0.6,
new_status = "master",
},
-- Decoration
decoration = {
rounding = 0,
active_opacity = 1.0,
inactive_opacity = 1.0,
shadow = {
enabled = false,
},
blur = {
enabled = false,
}
},
-- Animations
animations = {
enabled = false,
},
-- Input
input = {
kb_layout = "gb",
kb_variant = "",
kb_model = "",
kb_options = "caps:escape,grp:alt_shift_toggle",
kb_rules = "",
follow_mouse = 1,
scroll_method = "on_button_down",
sensitivity = 0,
touchpad = {
natural_scroll = false,
}
}
})
-- Key binds
local mod = "SUPER"
hl.bind(mod .. " + Q", hl.dsp.exec_cmd(terminal))
hl.bind(mod .. " + C", hl.dsp.window.close())
hl.bind(mod .. " + M", hl.dsp.window.fullscreen("maximised", "toggle"))
hl.bind(mod .. " + E", hl.dsp.exit())
hl.bind(mod .. " + Space", hl.dsp.exec_cmd(menu))
hl.bind(mod .. " + F12", hl.dsp.exec_cmd("screenshot-wayland"))
hl.bind(mod .. " + O", hl.dsp.exec_cmd("hyprpicker"))
hl.bind(mod .. " + S", hl.dsp.layout("swapwithmaster master"))
hl.bind(mod .. " + N", hl.dsp.layout("cyclenext"))
hl.bind(mod .. " + P", hl.dsp.layout("cycleprev"))
hl.bind(mod .. " + G", hl.dsp.layout("focusmaster"))
hl.bind(mod .. " + F", hl.dsp.window.move({ monitor = "+1"}))
-- Discord PTT
hl.bind(mod .. " + V", hl.dsp.send_shortcut({window = "class:^vesktop", mods="", key="F12"}))
-- Resizing
hl.bind(mod .. " + L", hl.dsp.layout("mfact +0.01"))
hl.bind(mod .. " + H", hl.dsp.layout("mfact -0.01"))
-- Moving
hl.bind(mod .. " + J", hl.dsp.focus({monitor = "-1"}))
hl.bind(mod .. " + K", hl.dsp.focus({monitor = "+1"}))
-- Workspace keys
for i = 1, 10 do
local key = i % 10 -- 10 maps to 0
hl.bind(mod .. " + " .. key, hl.dsp.focus({ workspace = i}))
hl.bind(mod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i}))
end
-- 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 })
-- Autostart
hl.on("hyprland.start", function()
hl.exec_cmd("hyprpaper")
end)
+1
View File
@@ -1,3 +1,4 @@
splash = false
wallpaper {
monitor =
path = ~/.config/hypr/solarised.jpg
+1
View File
@@ -0,0 +1 @@
*.swp