aboutsummaryrefslogtreecommitdiff
path: root/hypr/hyprlock
diff options
context:
space:
mode:
Diffstat (limited to 'hypr/hyprlock')
-rw-r--r--hypr/hyprlock/check-capslock.sh9
-rw-r--r--hypr/hyprlock/colors.conf7
-rw-r--r--hypr/hyprlock/status.sh29
3 files changed, 45 insertions, 0 deletions
diff --git a/hypr/hyprlock/check-capslock.sh b/hypr/hyprlock/check-capslock.sh
new file mode 100644
index 0000000..ca56178
--- /dev/null
+++ b/hypr/hyprlock/check-capslock.sh
@@ -0,0 +1,9 @@
+#!/bin/env bash
+
+MAIN_KB_CAPS=$(hyprctl devices | grep -B 6 "main: yes" | grep "capsLock" | head -1 | awk '{print $2}')
+
+if [ "$MAIN_KB_CAPS" = "yes" ]; then
+ echo "Caps Lock active"
+else
+ echo ""
+fi
diff --git a/hypr/hyprlock/colors.conf b/hypr/hyprlock/colors.conf
new file mode 100644
index 0000000..b87c815
--- /dev/null
+++ b/hypr/hyprlock/colors.conf
@@ -0,0 +1,7 @@
+$text_color = rgba(FFDAD6FF)
+$entry_background_color = rgba(41000311)
+$entry_border_color = rgba(896E6C55)
+$entry_color = rgba(FFDAD6FF)
+$font_family = JetBrainsMono Nerd Font
+$font_family_clock = JetBrainsMono Nerd Font
+$font_material_symbols = Material Symbols Rounded
diff --git a/hypr/hyprlock/status.sh b/hypr/hyprlock/status.sh
new file mode 100644
index 0000000..0d4ec2d
--- /dev/null
+++ b/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 ''