From 211b3e626c5e1168e22a31dbdcc75d607c31f589 Mon Sep 17 00:00:00 2001 From: aibrash Date: Fri, 30 Oct 2026 14:28:06 +0500 Subject: [PATCH] Drop the remaining sway references lock.sh no longer falls back to swaylock (hyprlock instead), and the comments in hyprland.lua and the README no longer mention sway. Co-Authored-By: Claude Sonnet 5.5 --- README.md | 2 +- hypr/hyprland.lua | 8 ++++---- hypr/scripts/lock.sh | 12 ++++-------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 91c0d45..6add786 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ DMS (Plugins) или создайте `~/.config/dms/plugin_settings.json` с `{ * В `hypr/hyprland.lua` имена мониторов (`eDP-1`, `HDMI-A-1`) и масштаб 1.25 — под конкретный ноутбук. * Раскладка (`us,ru`, переключение Alt+Shift), чувствительность тачпада и мыши — там же, в блоке `input`. -* Блокировку экрана делает DMS через `hypr/scripts/lock.sh` (с запасным вариантом swaylock). +* Блокировку экрана делает DMS через `hypr/scripts/lock.sh` (если DMS не запущен, запасной вариант — hyprlock). ## Обновление репозитория diff --git a/hypr/hyprland.lua b/hypr/hyprland.lua index c449d08..2d9799a 100644 --- a/hypr/hyprland.lua +++ b/hypr/hyprland.lua @@ -1,5 +1,5 @@ -- Hyprland 0.57 (Lua). Clean dark work setup; shell = DankMaterialShell. --- Sway config stays in ~/.config/sway as a fallback session. +-- Fallback login session: GNOME (via GDM). local terminal = "kitty" local mod = "SUPER" @@ -25,7 +25,7 @@ hl.env("ELECTRON_OZONE_PLATFORM_HINT", "auto") hl.on("hyprland.start", function() hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP XDG_SESSION_TYPE") hl.exec_cmd("systemctl --user import-environment WAYLAND_DISPLAY DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP XDG_SESSION_TYPE") - -- portals (file pickers, screen sharing, Nautilus) need graphical-session.target; sway had sway-session.target for this + -- portals (file pickers, screen sharing, Nautilus) need graphical-session.target, which is not started outside uwsm hl.exec_cmd("systemctl --user start hyprland-session.target") hl.exec_cmd("sh -c 'pgrep -x dms >/dev/null || exec dms run'") hl.exec_cmd("systemctl --user start hyprpolkitagent") @@ -116,7 +116,7 @@ hl.animation({ leaf = "layersOut", enabled = true, speed = 1.0, bezier = "quic hl.animation({ leaf = "workspaces", enabled = true, speed = 3.0, bezier = "easeInOutCubic", style = "slide" }) hl.animation({ leaf = "specialWorkspace", enabled = true, speed = 2.8, bezier = "easeOutQuint", style = "slidevert" }) --- No gaps/border/rounding for a single tiled window (sway smart_gaps equivalent). +-- No gaps/border/rounding for a single tiled window. hl.workspace_rule({ workspace = "w[tv1]", gaps_out = 0, gaps_in = 0 }) hl.workspace_rule({ workspace = "f[1]", gaps_out = 0, gaps_in = 0 }) hl.window_rule({ name = "smart-gaps-1", match = { float = false, workspace = "w[tv1]" }, border_size = 0, rounding = 0 }) @@ -129,7 +129,7 @@ hl.config({ input = { kb_layout = "us,ru", kb_options = "grp:alt_shift_toggle,grp_led:scroll", - follow_mouse = 2, -- click to focus, like sway's focus_follows_mouse no + follow_mouse = 2, -- click to focus; the cursor can still cross other windows sensitivity = -0.5, touchpad = { natural_scroll = true, diff --git a/hypr/scripts/lock.sh b/hypr/scripts/lock.sh index a57669a..0622e3f 100755 --- a/hypr/scripts/lock.sh +++ b/hypr/scripts/lock.sh @@ -1,12 +1,8 @@ #!/bin/sh -# Lock with DankMaterialShell (matches the shell theme). Fall back to swaylock-effects / swaylock -# when DMS is not running or the IPC call fails. -pgrep -x swaylock >/dev/null && exit 0 +# Lock the screen with DankMaterialShell (matches the shell theme); hyprlock only if DMS is not running. +pgrep -x hyprlock >/dev/null && exit 0 if pgrep -x dms >/dev/null && timeout 3 dms ipc call lock lock >/dev/null 2>&1; then exit 0 fi -fx=$HOME/.local/bin/swaylock-effects -if [ -x "$fx" ]; then - exec "$fx" -f -C "$HOME/.config/swaylock/config-effects" -fi -exec swaylock -f +command -v hyprlock >/dev/null && exec hyprlock +exit 1