From 12c09eaba55eb49bea96bab0159bec3b0cdc40c5 Mon Sep 17 00:00:00 2001 From: deadvey Date: Sat, 13 Jun 2026 15:36:28 +0100 Subject: [PATCH] Hyprland lua config --- .config/hypr/hyprland.conf | 41 +----------- .config/hypr/hyprland.lua | 127 ++++++++++++++++++++++++++++++++++++ .config/hypr/hyprpaper.conf | 1 + .gitignore | 1 + 4 files changed, 131 insertions(+), 39 deletions(-) create mode 100644 .config/hypr/hyprland.lua create mode 100644 .gitignore diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 537f280..8ede00e 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -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 diff --git a/.config/hypr/hyprland.lua b/.config/hypr/hyprland.lua new file mode 100644 index 0000000..28687b2 --- /dev/null +++ b/.config/hypr/hyprland.lua @@ -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) diff --git a/.config/hypr/hyprpaper.conf b/.config/hypr/hyprpaper.conf index f78d727..81df95e 100644 --- a/.config/hypr/hyprpaper.conf +++ b/.config/hypr/hyprpaper.conf @@ -1,3 +1,4 @@ +splash = false wallpaper { monitor = path = ~/.config/hypr/solarised.jpg diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1377554 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.swp