feat(hyprlock): update
This commit is contained in:
@@ -2,7 +2,7 @@ $color = rgba(#1e1e2e, 1.0)
|
|||||||
$inner_color = rgba(#1e1e2e, 0.8)
|
$inner_color = rgba(#1e1e2e, 0.8)
|
||||||
$outer_color = rgba(#cdd6f4, 1.0)
|
$outer_color = rgba(#cdd6f4, 1.0)
|
||||||
$font_color = rgba(#cdd6f4, 1.0)
|
$font_color = rgba(#cdd6f4, 1.0)
|
||||||
$check_color = rgba(#89b4fa, 1.0)
|
$check_color = rgba(#380000, 1.0)
|
||||||
|
|
||||||
general {
|
general {
|
||||||
ignore_empty_input = true
|
ignore_empty_input = true
|
||||||
@@ -48,6 +48,18 @@ label {
|
|||||||
valign = center
|
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
|
# BATTERY
|
||||||
label {
|
label {
|
||||||
monitor =
|
monitor =
|
||||||
@@ -74,9 +86,9 @@ label {
|
|||||||
image {
|
image {
|
||||||
monitor =
|
monitor =
|
||||||
path = ~/.cache/nowplaying-cover.jpg
|
path = ~/.cache/nowplaying-cover.jpg
|
||||||
size = 250
|
size = 300
|
||||||
rounding = 20
|
rounding = 20
|
||||||
position = 0, -120
|
position = 0, -150
|
||||||
halign = center
|
halign = center
|
||||||
valign = center
|
valign = center
|
||||||
border_size = 0
|
border_size = 0
|
||||||
@@ -89,7 +101,7 @@ label {
|
|||||||
color = rgba(242, 243, 244, 0.8)
|
color = rgba(242, 243, 244, 0.8)
|
||||||
font_size = 14
|
font_size = 14
|
||||||
font_family = Lexend
|
font_family = Lexend
|
||||||
position = 0, -270
|
position = 0, -320
|
||||||
halign = center
|
halign = center
|
||||||
valign = center
|
valign = center
|
||||||
}
|
}
|
||||||
@@ -100,7 +112,7 @@ label {
|
|||||||
color = rgba(242, 243, 244, 0.8)
|
color = rgba(242, 243, 244, 0.8)
|
||||||
font_size = 14
|
font_size = 14
|
||||||
font_family = Lexend Bold
|
font_family = Lexend Bold
|
||||||
position = 0, -300
|
position = 0, -345
|
||||||
halign = center
|
halign = center
|
||||||
valign = center
|
valign = center
|
||||||
}
|
}
|
||||||
@@ -121,7 +133,7 @@ input-field {
|
|||||||
|
|
||||||
placeholder_text = Enter Password
|
placeholder_text = Enter Password
|
||||||
check_color = $check_color
|
check_color = $check_color
|
||||||
fail_text = <i>$FAIL ($ATTEMPTS)</i>
|
fail_text = $FAIL
|
||||||
|
|
||||||
rounding = 10
|
rounding = 10
|
||||||
shadow_passes = 0
|
shadow_passes = 0
|
||||||
|
|||||||
38
hypr/scripts/net-status.sh
Executable file
38
hypr/scripts/net-status.sh
Executable 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}"
|
||||||
@@ -163,8 +163,8 @@
|
|||||||
"format": "",
|
"format": "",
|
||||||
"format-icons": [" ", " ", " ", " "],
|
"format-icons": [" ", " ", " ", " "],
|
||||||
"format-wifi": "{icon} {essid}",
|
"format-wifi": "{icon} {essid}",
|
||||||
"format-ethernet": " ",
|
"format-ethernet": " Ethernet",
|
||||||
"format-disconnected": " ",
|
"format-disconnected": " Disconnected",
|
||||||
"tooltip-format": "{ifname}",
|
"tooltip-format": "{ifname}",
|
||||||
"tooltip-format-wifi": "{essid} ({signalStrength}%)",
|
"tooltip-format-wifi": "{essid} ({signalStrength}%)",
|
||||||
"tooltip-format-ethernet": "{ifname}",
|
"tooltip-format-ethernet": "{ifname}",
|
||||||
|
|||||||
Reference in New Issue
Block a user