feat(hyprlock): update

This commit is contained in:
2026-02-25 02:41:26 +01:00
parent 7e3062121a
commit d5bb18adfd
3 changed files with 58 additions and 8 deletions

View File

@@ -2,7 +2,7 @@ $color = rgba(#1e1e2e, 1.0)
$inner_color = rgba(#1e1e2e, 0.8)
$outer_color = rgba(#cdd6f4, 1.0)
$font_color = rgba(#cdd6f4, 1.0)
$check_color = rgba(#89b4fa, 1.0)
$check_color = rgba(#380000, 1.0)
general {
ignore_empty_input = true
@@ -48,6 +48,18 @@ label {
valign = center
}
# NETWORK
label {
monitor =
text = cmd[update:2000] ~/.config/hypr/scripts/net-status.sh
color = rgba(242, 243, 244, 0.8)
font_size = 14
font_family = Lexend
position = 100, 100
halign = bottom
valign = left
}
# BATTERY
label {
monitor =
@@ -74,9 +86,9 @@ label {
image {
monitor =
path = ~/.cache/nowplaying-cover.jpg
size = 250
size = 300
rounding = 20
position = 0, -120
position = 0, -150
halign = center
valign = center
border_size = 0
@@ -89,7 +101,7 @@ label {
color = rgba(242, 243, 244, 0.8)
font_size = 14
font_family = Lexend
position = 0, -270
position = 0, -320
halign = center
valign = center
}
@@ -100,7 +112,7 @@ label {
color = rgba(242, 243, 244, 0.8)
font_size = 14
font_family = Lexend Bold
position = 0, -300
position = 0, -345
halign = center
valign = center
}
@@ -121,7 +133,7 @@ input-field {
placeholder_text = Enter Password
check_color = $check_color
fail_text = <i>$FAIL ($ATTEMPTS)</i>
fail_text = $FAIL
rounding = 10
shadow_passes = 0

38
hypr/scripts/net-status.sh Executable file
View File

@@ -0,0 +1,38 @@
#!/bin/bash
IFACE="wlp1s0"
# Prüfen ob Interface existiert
if [ ! -d "/sys/class/net/$IFACE" ]; then
echo "󰤮 no iface"
exit 0
fi
STATE=$(cat /sys/class/net/$IFACE/operstate 2>/dev/null)
if [ "$STATE" != "up" ]; then
echo "󰤮 Disconnected"
exit 0
fi
# SSID holen
SSID=$(iw dev "$IFACE" link 2>/dev/null | awk -F': ' '/SSID/ {print $2}')
SIGNAL=$(iw dev "$IFACE" link 2>/dev/null | awk -F'signal: ' '/signal/ {print $2}' | awk '{print $1}')
if [ -z "$SSID" ]; then
echo "󰤮 Disconnected"
exit 0
fi
# Icon je nach dBm (realistische Werte: -30 sehr stark, -90 sehr schwach)
if ((SIGNAL >= -50)); then
ICON="󰤨 " # stark
elif ((SIGNAL >= -65)); then
ICON="󰤥 " # mittel
elif ((SIGNAL >= -75)); then
ICON="󰤢 " # schwach
else
ICON="󰤟 " # sehr schwach
fi
echo "${ICON} ${SSID}"

View File

@@ -163,8 +163,8 @@
"format": "",
"format-icons": ["󰤟 ", "󰤢 ", "󰤥 ", "󰤨 "],
"format-wifi": "{icon} {essid}",
"format-ethernet": "󰈀 ",
"format-disconnected": "󰤮 ",
"format-ethernet": "󰈀 Ethernet",
"format-disconnected": "󰤮 Disconnected",
"tooltip-format": "{ifname}",
"tooltip-format-wifi": "{essid} ({signalStrength}%)",
"tooltip-format-ethernet": "{ifname}",