first cmatrix lock fix, still needs debugging

This commit is contained in:
2025-08-21 01:57:48 +02:00
parent ae154bcaa7
commit b58b194797
4 changed files with 24 additions and 22 deletions

View File

@@ -9,8 +9,8 @@ general {
gaps_in = 2
gaps_out = 1
border_size = 1
col.active_border = $color2
col.inactive_border = $color4
col.active_border = $color4
col.inactive_border = $color2
layout = dwindle # master|dwindle
resize_on_border = true
extend_border_grab_area = 10
@@ -65,6 +65,8 @@ misc {
swallow_regex = ^(cachy-browser|firefox|nautilus|nemo|thunar|btrfs-assistant.)$
focus_on_activate = true
vrr = 2
# Hypridle cmatrix fix:
session_lock_xray = true
}
# https://wiki.hyprland.org/0.45.0/Configuring/Variables/#render

View File

@@ -22,18 +22,18 @@ windowrule = opacity 0.92, class:^(thunar|nemo|dolphin)$
windowrule = opacity 0.96, class:^(discord|armcord|webcord)$
windowrule = opacity 0.95, title:^(QQ|Telegram)$
windowrule = opacity 0.95, title:^(NetEase Cloud Music Gtk4)$
windowrule = opacity 1, class:^(kitty)$
# General window rules
windowrule = float, title:^(Picture-in-Picture)$
windowrule = size 960 540, title:^(Picture-in-Picture)$
windowrule = move 25%-, title:^(Picture-in-Picture)$
windowrule = float, title:^(imv|mpv|danmufloat|termfloat|nemo|ncmpcpp)$
windowrule = float, title:^(imv|mpv|danmufloat|termfloat|nemo|ncmpcpp|nwg-look|nwg-displays)$
windowrule = move 25%-, title:^(imv|mpv|danmufloat|termfloat|nemo|ncmpcpp)$
windowrule = size 960 540, title:^(imv|mpv|danmufloat|termfloat|nemo|ncmpcpp)$
windowrule = pin, title:^(danmufloat)$
windowrule = rounding 5, title:^(danmufloat|termfloat)$
windowrule = animation slide right, class:^(kitty|Alacritty)$
windowrule = noblur, class:^(org.mozilla.firefox)$
windowrule = opacity 0.88, class:Code
# Decorations related to floating windows on workspaces 1 to 10
windowrule = bordersize 2, floating:1, onworkspace:w[fv1-10]
windowrule = bordercolor $color4, floating:1, onworkspace:w[fv1-10]
@@ -68,6 +68,3 @@ layerrule = animation fade 50%, wallpaper
windowrule = float,class:^(Zotero)$,title:^(Citation Dialog)$
windowrule = center,class:^(Zotero)$,title:^(Citation Dialog)$
windowrule = noanim,class:^(Zotero)$,title:^(Citation Dialog)$
windowrule = fullscreen, class:matrix
windowrule = opacity 0.8, class:matrix

View File

@@ -1,22 +1,25 @@
#!/usr/bin/env bash
USER_HOME="/home/michaelb"
set -Eeuo pipefail
USER_HOME="$HOME"
MATRIX_SCRIPT="$USER_HOME/.config/swaylock/matrix.sh"
ALACRITTY_CONF="$USER_HOME/.config/swaylock/alacritty-matrix.toml"
mtrx_command="alacritty \
--config-file \"$ALACRITTY_CONF\" \
--class matrix \
-e \"$MATRIX_SCRIPT\""
# 1) Spawn Matrix windows per-monitor
screens=$(hyprctl -j monitors | jq length)
for (( i = -1; i < screens; i++ )); do
hyprctl dispatch focusmonitor $i
eval $mtrx_command &
# 1) Spawn matrix per monitor
mapfile -t MONS < <(hyprctl -j monitors | jq -r '.[].name')
for mon in "${MONS[@]}"; do
hyprctl dispatch focusmonitor "$mon"
sleep 0.06
kitty \
--app-id matrix \
--title "matrix-$mon" \
--start-as fullscreen \
bash -lc "$MATRIX_SCRIPT" &
sleep 0.12
done
# 2) Lock (blocks until unlock)
# 2) Lock screen (blocks until unlock)
swaylock
# 3) Tear down Matrix
pkill -f "$MATRIX_SCRIPT"
# 3) Tear down matrix
pkill -f "$MATRIX_SCRIPT" || true

View File

@@ -1,4 +1,4 @@
#!/bin/bash
sleep 0.03
sleep 0.15
cmatrix