aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Matei Pintilie <luca@lucamatei.com>2024-07-11 17:54:06 +0000
committerLuca Matei Pintilie <luca@lucamatei.com>2024-07-11 17:54:06 +0000
commitc33e5300d9027103e72f1cbff386768997b90ffc (patch)
tree15b54660cedeb9c8abe5d5661fa5a064e0518221
parentd7a21e259b80010ce7368e8aaa0863886a947085 (diff)
downloaddotfiles-c33e5300d9027103e72f1cbff386768997b90ffc.tar
dotfiles-c33e5300d9027103e72f1cbff386768997b90ffc.tar.gz
dotfiles-c33e5300d9027103e72f1cbff386768997b90ffc.tar.bz2
dotfiles-c33e5300d9027103e72f1cbff386768997b90ffc.tar.lz
dotfiles-c33e5300d9027103e72f1cbff386768997b90ffc.tar.xz
dotfiles-c33e5300d9027103e72f1cbff386768997b90ffc.tar.zst
dotfiles-c33e5300d9027103e72f1cbff386768997b90ffc.zip
hyprlock: add config
Diffstat (limited to '')
-rw-r--r--.config/hypr/hyprlock.conf103
-rwxr-xr-x.config/hypr/hyprlock/status.sh29
2 files changed, 132 insertions, 0 deletions
diff --git a/.config/hypr/hyprlock.conf b/.config/hypr/hyprlock.conf
new file mode 100644
index 0000000..dbed902
--- /dev/null
+++ b/.config/hypr/hyprlock.conf
@@ -0,0 +1,103 @@
+# $text_color = rgba(F6DECEFF)
+# $entry_background_color = rgba(1C110811)
+# $entry_border_color = rgba(A48C7B55)
+# $entry_color = rgba(DDC1AEFF)
+$text_color = rgba(FFFFFFFF)
+$entry_background_color = rgba(33333311)
+$entry_border_color = rgba(3B3B3B55)
+$entry_color = rgba(FFFFFFFF)
+$font_family = Rubik Light
+$font_family_clock = Rubik Light
+$font_material_symbols = Material Symbols Rounded
+
+background {
+ # color = rgba(170C04FF)
+ # color = rgba(000000FF)
+ # color = rgba(282A36FF)
+ # path = {{ SWWW_WALL }}
+ path = $HOME/Pictures/wall.png
+ # blur_size = 5
+ # blur_passes = 4
+}
+input-field {
+ monitor =
+ size = 250, 50
+ outline_thickness = 2
+ dots_size = 0.1
+ dots_spacing = 0.3
+ outer_color = $entry_border_color
+ inner_color = $entry_background_color
+ font_color = $entry_color
+ # fade_on_empty = true
+
+ position = 0, 20
+ halign = center
+ valign = center
+}
+
+label { # Clock
+ monitor =
+ text = $TIME
+ shadow_passes = 1
+ shadow_boost = 0.5
+ color = $text_color
+ font_size = 65
+ font_family = $font_family_clock
+
+ position = 0, 300
+ halign = center
+ valign = center
+}
+label { # Greeting
+ monitor =
+ text = Hi $USER
+ shadow_passes = 1
+ shadow_boost = 0.5
+ color = $text_color
+ font_size = 20
+ font_family = $font_family
+
+ position = 0, 240
+ halign = center
+ valign = center
+}
+# label { # lock icon
+# monitor =
+# text = lock
+# shadow_passes = 1
+# shadow_boost = 0.5
+# color = $text_color
+# font_size = 21
+# font_family = $font_material_symbols
+
+# position = 0, 65
+# halign = center
+# valign = bottom
+# }
+label { # "locked" text
+ monitor =
+ text = locked
+ shadow_passes = 1
+ shadow_boost = 0.5
+ color = $text_color
+ font_size = 14
+ font_family = $font_family
+
+ position = 0, 45
+ halign = center
+ valign = bottom
+}
+
+label { # Status
+ monitor =
+ text = cmd[update:5000] ~/.config/hypr/hyprlock/status.sh
+ shadow_passes = 1
+ shadow_boost = 0.5
+ color = $text_color
+ font_size = 14
+ font_family = $font_family
+
+ position = 30, -30
+ halign = left
+ valign = top
+}
diff --git a/.config/hypr/hyprlock/status.sh b/.config/hypr/hyprlock/status.sh
new file mode 100755
index 0000000..dd80633
--- /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 " remaining"
+ fi
+fi
+
+echo '' \ No newline at end of file