Table of Contents
- Hyprlock zu Swaylock Port - README
- Erfolgreich portierte Features
- Nicht portierbare Features
- 1. Image Effects und Blur
- 2. Grace Period
- 3. Fade Animations
- 4. Loading Bar
- 5. Cursor Visibility
- 6. Input Field Customization
- 7. Placeholder Text
- 8. Custom Labels mit Dynamic Content
- 9. Fail Text Customization
- 10. Hide Input Toggle
- 11. Multiple Color States
- 12. Per-Monitor Configuration
- 13. Outline Thickness
- Farbkonvertierung
- Alternative: swaylock-effects
- Empfohlene swaylock-effects Config
- Installation und Nutzung
- Zusammenfassung: Was fehlt in Standard-swaylock
- Nützliche Kommandos
- Weitere Ressourcen
Hyprlock zu Swaylock Port - README
Diese Datei dokumentiert alle Unterschiede, Einschränkungen und Features beim Portieren von hyprlock zu swaylock.
Erfolgreich portierte Features
- ✅ Background Image (
~/Bilder/aesthetic-wallpapers/images/fractal.png) - ✅ Basis-Farben für Ring, Inside, Text
- ✅ Failed Attempts Anzeige
- ✅ Keyboard Layout Anzeige
- ✅ Caps Lock Indicator
- ✅ Font Configuration (JetBrains Mono Nerd Font)
- ✅ Verifying-State Farben (check_color)
- ✅ Wrong-Password Farben (fail_color)
- ✅ Ring/Inside/Text Color States
Nicht portierbare Features
1. Image Effects und Blur
Hyprlock:
background {
blur_passes = 3
blur_size = 7
noise = 0.0117
contrast = 0.8916
brightness = 0.8172
vibrancy = 0.1696
vibrancy_darkness = 0.0
}
Swaylock: Keine Bild-Effekte
- ❌ Kein Blur
- ❌ Kein Noise
- ❌ Keine Contrast-Anpassung
- ❌ Keine Brightness-Anpassung
- ❌ Keine Vibrancy
Workaround: Bild muss vorher mit ImageMagick oder ähnlichen Tools bearbeitet werden:
# Blur hinzufügen
convert ~/Bilder/aesthetic-wallpapers/images/fractal.png \
-blur 0x7 \
~/Bilder/aesthetic-wallpapers/images/fractal-blurred.png
# Dann in swaylock config:
image=~/Bilder/aesthetic-wallpapers/images/fractal-blurred.png
Status: Nicht nativ unterstützt, manuelle Bildbearbeitung nötig
2. Grace Period
Hyprlock:
general {
grace = 0
}
Swaylock: Keine Grace Period
- Grace Period (Zeitfenster ohne Passwortabfrage nach dem Locken) wird nicht unterstützt
Status: Nicht verfügbar
3. Fade Animations
Hyprlock:
general {
no_fade_in = false
no_fade_out = false
}
Swaylock: Keine Fade-Animationen
- Keine Ein-/Ausblend-Animationen
- Lock-Screen erscheint sofort
Status: Nicht verfügbar
4. Loading Bar
Hyprlock:
general {
disable_loading_bar = false
}
Swaylock: Kein Loading Bar
- Keine Lade-Animation beim Starten
- Keine visuelle Rückmeldung während der Initialisierung
Status: Nicht verfügbar
5. Cursor Visibility
Hyprlock:
general {
hide_cursor = true
}
Swaylock: Cursor-Kontrolle limitiert
- Cursor wird während der Eingabe automatisch angezeigt
- Keine Option zum vollständigen Verstecken
Status: Teilweise unterstützt (Cursor verschwindet bei Inaktivität)
6. Input Field Customization
Hyprlock:
input-field {
size = 300, 50
outline_thickness = 3
dots_size = 0.3
dots_spacing = 0.2
dots_center = true
position = 0, -140
halign = center
valign = center
}
Swaylock: Fixe Indicator-Größe
- ❌ Keine Größenanpassung des Input-Felds
- ❌ Keine Kontrolle über Dot-Größe
- ❌ Keine Kontrolle über Dot-Spacing
- ❌ Keine Positionierung des Indicators (immer zentriert)
- ✅ Nur
indicator-radiusundindicator-thicknesseinstellbar
Status: Stark eingeschränkt - nur Radius und Dicke anpassbar
7. Placeholder Text
Hyprlock:
input-field {
placeholder_text = <i>Enter Masterkey ...</i>
fade_on_empty = true
}
Swaylock: Kein Placeholder Text
- Kein Platzhaltertext im Input-Feld
- Keine Möglichkeit, benutzerdefinierten Text anzuzeigen
Status: Nicht verfügbar
8. Custom Labels mit Dynamic Content
Hyprlock:
# Uhrzeit
label {
text = cmd[update:1000] echo "<b><big>$(date +"%H:%M")</big></b>"
color = rgba(200, 200, 200, 0.88)
font_size = 64
position = 0, 84
}
# Datum
label {
text = cmd[update:18000] echo "<b>$(date '+%A, %d. %B %Y')</b>"
font_size = 22
position = 0, 0
}
# Benutzername
label {
text = Hi Zenny
font_size = 20
position = 0, -62
}
Swaylock: Keine Labels
- ❌ Keine Uhrzeit-Anzeige
- ❌ Keine Datums-Anzeige
- ❌ Kein Benutzername
- ❌ Keine benutzerdefinierten Text-Labels
- ❌ Keine dynamischen Kommandos
- ❌ Keine Position-Kontrolle für Text
Dies ist der größte Unterschied! Hyprlock kann beliebige Labels mit dynamischem Content anzeigen, swaylock ist auf den Unlock-Indicator beschränkt.
Workaround: Verwende swaylock-effects (Fork von swaylock) für:
--clockOption--indicator-textOption- Mehr Anpassungsmöglichkeiten
Status: Nicht in Standard-swaylock verfügbar - benötigt swaylock-effects
9. Fail Text Customization
Hyprlock:
input-field {
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i>
}
Swaylock: Standard Fail-Anzeige
- Nur
--show-failed-attemptsFlag - Kein benutzerdefinierter Text
- Keine HTML/Pango-Formatierung
Status: Nur Basis-Funktionalität verfügbar
10. Hide Input Toggle
Hyprlock:
input-field {
hide_input = false
}
Swaylock: Input immer als Dots
- Passwort wird immer als Punkte angezeigt
- Keine Option zum Anzeigen des Klartext-Passworts
Status: Nicht verfügbar (was sicherer ist)
11. Multiple Color States
Hyprlock:
input-field {
capslock_color = -1
numlock_color = -1
bothlock_color = -1
}
Swaylock: Nur Caps Lock State
- ✅ Caps Lock State wird unterstützt
- ❌ Kein Num Lock State
- ❌ Kein Both Lock State
Status: Nur Caps Lock verfügbar
12. Per-Monitor Configuration
Hyprlock:
background {
monitor =
}
input-field {
monitor =
}
label {
monitor =
}
Swaylock: Globale Konfiguration
- Alle Monitore verwenden dieselbe Konfiguration
- Kein per-monitor Setup möglich
- Background-Image kann per-monitor gesetzt werden:
--image <output>:<path>
Status: Sehr limitiert - nur Hintergrundbild per Monitor
13. Outline Thickness
Hyprlock:
input-field {
outline_thickness = 3
}
Swaylock: Fixe Ring-Dicke
indicator-thicknessist verfügbar (Standard: 10)- Aber: Dies ist die Dicke des kompletten Rings, nicht nur des Outlines
Status: Ähnlich aber nicht identisch
Farbkonvertierung
Hyprlock und swaylock verwenden unterschiedliche Farbformate:
Hyprlock: rgba(R, G, B, A) mit Werten 0-255 und 0.0-1.0 für Alpha
rgba(255, 255, 255, 0.42) # Weiß mit 42% Opacity
rgb(204, 136, 34) # Orange ohne Alpha
Swaylock: RRGGBBAA Hexadezimal
ffffff6b # Weiß mit 42% Opacity (6b ≈ 0.42 * 255 = 107)
cc8822 # Orange ohne Alpha (vollständig opak)
cc8822ff # Orange mit explizitem Alpha
Konvertierungstabelle aus deiner Config
| Hyprlock | Beschreibung | Swaylock | Verwendung |
|---|---|---|---|
rgba(255, 255, 255, 0.42) |
Weiß 42% | ffffff6b |
Ring (outer) |
rgba(107, 107, 107, 0.23) |
Grau 23% | 6b6b6b3b |
Inside (inner) |
rgba(255, 255, 255, 0.66) |
Weiß 66% | ffffffa8 |
Text |
rgb(204, 136, 34) |
Orange | cc8822 |
Verify (check) |
rgb(204, 34, 34) |
Rot | cc2222 |
Wrong (fail) |
rgba(200, 200, 200, 0.88) |
Hellgrau 88% | c8c8c8e0 |
Zeit-Label* |
rgba(200, 200, 200, 0.66) |
Hellgrau 66% | c8c8c8a8 |
Datum-Label* |
rgba(200, 200, 200, 0.55) |
Hellgrau 55% | c8c8c88c |
Username-Label* |
* Label-Farben können in Standard-swaylock nicht verwendet werden
Alternative: swaylock-effects
Für mehr Features ähnlich zu hyprlock, verwende swaylock-effects:
# Installation (Arch Linux)
yay -S swaylock-effects
# oder von GitHub
git clone https://github.com/mortie/swaylock-effects.git
cd swaylock-effects
meson build
ninja -C build
sudo ninja -C build install
Zusätzliche Features in swaylock-effects:
--clock- Uhrzeit anzeigen--indicator-text- Custom Text im Indicator--datestr- Datum anzeigen--effect-blur- Blur-Effekt für Background--effect-pixelate- Pixelate-Effekt--effect-greyscale- Graustufen-Effekt--fade-in- Fade-in Animation--grace- Grace Period- Mehr Positionierungs-Optionen
Empfohlene swaylock-effects Config
Wenn du swaylock-effects verwendest, hier eine erweiterte Config:
# swaylock-effects config (speichere als ~/.config/swaylock/config-effects)
image=~/Bilder/aesthetic-wallpapers/images/fractal.png
scaling=fill
# Effects (hyprlock blur replacement)
effect-blur=7x3
effect-vignette=0.5:0.5
# Clock (hyprlock label replacement)
clock
timestr=%H:%M
datestr=%A, %d. %B %Y
# Indicator
indicator
indicator-radius=50
indicator-thickness=10
# Grace period
grace=3
grace-no-mouse
grace-no-touch
# Fade in
fade-in=0.2
# Colors (same as before)
ring-color=ffffff6b
inside-color=6b6b6b3b
text-color=ffffffa8
ring-ver-color=cc8822
inside-ver-color=cc88226b
ring-wrong-color=cc2222
inside-wrong-color=cc22226b
# Font
font=JetBrains Mono Nerd Font
font-size=14
# Show failed attempts
show-failed-attempts
Installation und Nutzung
Standard swaylock
# Config-Datei erstellen
mkdir -p ~/.config/swaylock
cp swaylock/config ~/.config/swaylock/config
# Swaylock starten
swaylock
# Oder mit expliziter Config
swaylock -C ~/.config/swaylock/config
Mit swaylock-effects
# Effects-Config verwenden
swaylock -C ~/.config/swaylock/config-effects
In niri config.kdl einbinden
binds {
# Lock screen
Mod+Shift+L { spawn "swaylock"; }
Super+Alt+L allow-when-locked=true { spawn "swaylock"; }
# Mit effects (falls installiert)
// Mod+Shift+L { spawn-sh "swaylock -C ~/.config/swaylock/config-effects"; }
}
Zusammenfassung: Was fehlt in Standard-swaylock
| Feature | Hyprlock | Swaylock | swaylock-effects |
|---|---|---|---|
| Background Image | ✅ | ✅ | ✅ |
| Blur Effects | ✅ | ❌ | ✅ |
| Custom Labels | ✅ | ❌ | ⚠️ (nur Clock) |
| Uhrzeit/Datum | ✅ | ❌ | ✅ |
| Benutzername | ✅ | ❌ | ❌ |
| Grace Period | ✅ | ❌ | ✅ |
| Fade Animations | ✅ | ❌ | ✅ |
| Input Field Size | ✅ | ⚠️ (limitiert) | ⚠️ (limitiert) |
| Placeholder Text | ✅ | ❌ | ⚠️ (indicator-text) |
| Color States | ✅ | ✅ | ✅ |
| Failed Attempts | ✅ | ✅ | ✅ |
| Keyboard Layout | ✅ | ✅ | ✅ |
| Per-Monitor Config | ✅ | ⚠️ (nur image) | ⚠️ (nur image) |
Legende:
- ✅ Vollständig unterstützt
- ⚠️ Teilweise unterstützt
- ❌ Nicht unterstützt
Nützliche Kommandos
# Config testen
swaylock --debug
# Sofort locken
swaylock -f
# Mit Hintergrundbild
swaylock -i ~/path/to/image.png
# Farbe anzeigen (ohne Hintergrundbild)
swaylock -c 808080
# Config validieren
swaylock --help # Zeigt alle verfügbaren Optionen
Weitere Ressourcen
Generiert am: 2025-10-27 Von: Hyprlock → Swaylock Config Converter Empfehlung: Verwende swaylock-effects für ein hyprlock-ähnlicheres Erlebnis