From 26cea1fef330f76dfd73b2933437c84bebd65fa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nina=20Chl=C3=B3e=20Kassandra=20Rei=C3=9F?= Date: Sun, 26 Jul 2026 18:41:08 +0200 Subject: [PATCH] Replace swaylock with hyprlock --- background.lua | 13 +++++- hyprlock.conf | 100 +++++++++++++++++++++++++++++++++++++++++++ program_launcher.lua | 2 +- 3 files changed, 113 insertions(+), 2 deletions(-) create mode 100644 hyprlock.conf diff --git a/background.lua b/background.lua index 239412a..b98d9c4 100644 --- a/background.lua +++ b/background.lua @@ -1,5 +1,16 @@ +local function shell_quote(value) + return "'" .. value:gsub("'", "'\\''") .. "'" +end + +local function config_dir() + local source = debug.getinfo(1, "S").source:gsub("^@", "") + return source:match("(.*/)") +end + +local wallpaper = config_dir() .. "wallpaper/RooftopSunset.jpeg" + return { start = function() - hl.exec_cmd("swaybg -m stretch -i ./wallpaper/RooftopSunset.jpeg") + hl.exec_cmd("swaybg -m stretch -i " .. shell_quote(wallpaper)) end, } diff --git a/hyprlock.conf b/hyprlock.conf new file mode 100644 index 0000000..0015d05 --- /dev/null +++ b/hyprlock.conf @@ -0,0 +1,100 @@ +# _ _ _ +# | |__ _ _ _ __ _ __| | ___ ___| | __ +# | '_ \| | | | '_ \| '__| |/ _ \ / __| |/ / +# | | | | |_| | |_) | | | | (_) | (__| < +# |_| |_|\__, | .__/|_| |_|\___/ \___|_|\_\ +# |___/|_| +# + +# Cache Folder +#$ml4w_cache_folder = $HOME/.cache/ml4w/hyprland-dotfiles + +# BACKGROUND +background { + monitor = + path = ~/.config/hypr/wallpaper/evening-sky.png + blur_passes = 0 + contrast = 0.8916 + brightness = 0.8172 + vibrancy = 0.1696 + vibrancy_darkness = 0.0 +} + +# GENERAL +general { + no_fade_in = false + grace = 0 + disable_loading_bar = false +} + +# INPUT FIELD +input-field { + monitor = + size = 250, 60 + outline_thickness = 2 + dots_size = 0.2 + dots_spacing = 0.2 + dots_center = true + outer_color = rgba(0, 0, 0, 0) + inner_color = rgba(100, 114, 125, 0.3) + font_color = rgb(200, 200, 200) + fade_on_empty = false + font_family = SF Pro Display Bold + placeholder_text = 🔑 + hide_input = false + position = 0, -225 + halign = center + valign = center +} + +# Time +label { + monitor = + text = cmd[update:1000] echo "$(date +"%H:%M")" + color = rgba(216, 222, 233, 0.70) + font_size = 130 + font_family = SF Pro Display Bold + position = 0, 240 + halign = center + valign = center +} + +# Day-Month-Date +label { + monitor = + text = cmd[update:1000] echo "$(date +"%A, %d %B")" + color = rgba(216, 222, 233, 0.70) + font_size = 30 + font_family = SF Pro Display Bold + position = 0, 105 + halign = center + valign = center +} + +# Profile-Photo +image { + monitor = + path = ~/.config/hypr/img/launcher/nixos_emblem.png + border_color = 0xffdddddd + border_size = 0 + size = 140 + rounding = -1 + rotate = 0 + reload_time = -1 + reload_cmd = + position = 0, -20 + halign = center + valign = center +} + +# USER +label { + monitor = + text = $USER + color = rgba(216, 222, 233, 0.70) + font_size = 25 + font_family = SF Pro Display Bold + position = 0, -130 + halign = center + valign = center +} diff --git a/program_launcher.lua b/program_launcher.lua index cffe887..168e7b7 100644 --- a/program_launcher.lua +++ b/program_launcher.lua @@ -60,7 +60,7 @@ hl.bind(mainMod .. " + XF86AudioLowerVolume", hl.dsp.exec_cmd("pamixer --default hl.bind(mainMod .. " + XF86AudioRaiseVolume", hl.dsp.exec_cmd("pamixer --default-source -i 4")) -- Lock -hl.bind(mainMod .. " + N", hl.dsp.exec_cmd("swaylock -c 000000 -e -i ~/.config/hypr/wallpaper/background.png")) +hl.bind(mainMod .. " + N", hl.dsp.exec_cmd("hyprlock --config ~/.config/hypr/hyprlock.config")) -- Mouse hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })