summaryrefslogtreecommitdiff
path: root/config/hypr/hyprlock
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--config/hypr/hyprlock.conf74
-rwxr-xr-xconfig/hypr/hyprlock/status.sh29
2 files changed, 103 insertions, 0 deletions
diff --git a/config/hypr/hyprlock.conf b/config/hypr/hyprlock.conf
new file mode 100644
index 0000000..94920bf
--- /dev/null
+++ b/config/hypr/hyprlock.conf
@@ -0,0 +1,74 @@
+background {
+ monitor =
+ path = $HOME/.config/hypr/lock.png # only *.png supported for now
+ color = rgba(25, 20, 20, 1.0)
+ blur_passes = 4 # 0 disables blurring
+ blur_size = 2
+ noise = 0.0117
+ contrast = 0.8916
+ brightness = 0.8172
+ vibrancy = 0.1696
+ vibrancy_darkness = 0.0
+}
+
+input-field {
+ monitor =
+ size = 400, 50
+ outline_thickness = 1
+ dots_size = 0.4 # Scale of input-field height, 0.2 - 0.8
+ dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0
+ dots_center = true
+ outer_color = rgb(000000)
+ inner_color = rgb(200, 200, 200)
+ font_color = rgb(10, 10, 10)
+ fade_on_empty = true
+ placeholder_text = <i>Пароль</i> # Text rendered in the input box when it's empty.
+ hide_input = false
+ position = 0, -50
+ halign = center
+ valign = center
+}
+
+label {
+ monitor =
+ text = cmd[update:1000] echo "<span foreground='##ffffff'>$(date +"%H:%M")</span>"
+ color = rgba(200, 200, 200, 1.0)
+ font_size = 60
+ font_family = Noto Sans
+ position = 0, 150
+ halign = center
+ valign = center
+}
+
+label {
+ monitor =
+ text = cmd[update:1000] echo "<span foreground='##ffffff'>$(date +"%A, %d %B %Y")</span>"
+ color = rgba(200, 200, 200, 1.0)
+ font_size = 18
+ font_family = Noto Sans
+ position = 0, 100
+ halign = center
+ valign = center
+}
+
+label {
+ monitor =
+ text = cmd[update:5000] ${XDG_CONFIG_HOME:-$HOME/.config}/hypr/hyprlock/status.sh
+ color = rgba(200, 200, 200, 1.0)
+ font_size = 18
+ font_family = Noto Sans
+ position = 0, 50
+ halign = center
+ valign = center
+}
+
+label {
+ monitor =
+ text = <span foreground='##ffffff'>$USER</span>
+ color = rgba(200, 200, 200, 1.0)
+ font_size = 60
+ font_family = Noto Sans
+ position = 0, 320
+ halign = center
+ valign = center
+}
diff --git a/config/hypr/hyprlock/status.sh b/config/hypr/hyprlock/status.sh
new file mode 100755
index 0000000..ea2607e
--- /dev/null
+++ b/config/hypr/hyprlock/status.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+############ Variables ############
+enable_battery=false
+battery_charging=false
+
+####### Check availability ########
+for battery in /sys/class/power_supply/*BAT*; do
+ if [[ -f "$battery/uevent" ]]; then
+ enable_battery=true
+ if [[ $(cat /sys/class/power_supply/*/status | head -1) == "Charging" ]]; then
+ battery_charging=true
+ fi
+ break
+ fi
+done
+
+############# Output #############
+if [[ $enable_battery == true ]]; then
+ if [[ $battery_charging == true ]]; then
+ echo -n " заряжается"
+ fi
+ echo -n "$(cat /sys/class/power_supply/*/capacity | head -1)"%
+ if [[ $battery_charging == false ]]; then
+ echo -n " осталось"
+ fi
+fi
+
+echo ''