hyprlock
This commit is contained in:
parent
76657b603d
commit
2c0bbe1372
3 changed files with 193 additions and 0 deletions
162
hyprlock.conf
Normal file
162
hyprlock.conf
Normal file
|
|
@ -0,0 +1,162 @@
|
|||
source = ~/.config/hypr/scheme/current.conf
|
||||
|
||||
$outline = rgba($mauvedd)
|
||||
$secondary_text = rgb($lavender)
|
||||
|
||||
$font_family = JetBrains Mono Nerd Font Bold
|
||||
$font_family_clock = JetBrains Mono Nerd Font Bold
|
||||
|
||||
animation {
|
||||
bezier = linear, 1, 1, 0, 0
|
||||
animation = fadeIn, 1, 5, linear
|
||||
animation = fadeOut, 1, 3, linear
|
||||
animation = inputField, 1, 2, linear
|
||||
animation = inputFieldColors, 1, 3, linear
|
||||
}
|
||||
|
||||
background {
|
||||
color = rgb($crust)
|
||||
path = $HOME/.cache/caelestia/wallpaper/current
|
||||
}
|
||||
|
||||
shape {
|
||||
monitor =
|
||||
size = 1200, 100%
|
||||
color = rgba($base50)
|
||||
border_size = 2
|
||||
border_color = rgb($text)
|
||||
|
||||
shadow_passes = 2
|
||||
shadow_color = rgb($mantle)
|
||||
|
||||
position = 0, 0
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
input-field {
|
||||
monitor =
|
||||
size = 320, 60
|
||||
outline_thickness = 4
|
||||
dots_size = 0.225
|
||||
dots_spacing = 0.2
|
||||
outer_color = $outline
|
||||
inner_color = rgba($based7)
|
||||
font_color = rgb($text)
|
||||
check_color = rgb($sky)
|
||||
fail_color = rgb($red)
|
||||
fade_on_empty = false
|
||||
placeholder_text = <i> Logged in as </i><span foreground="##$lavender">$USER</span>
|
||||
fail_text = <i>$FAIL ($ATTEMPTS)</i>
|
||||
|
||||
position = 0, 100
|
||||
halign = center
|
||||
valign = bottom
|
||||
}
|
||||
|
||||
image { # Face
|
||||
monitor =
|
||||
path = $HOME/.face
|
||||
size = 100
|
||||
border_color = $outline
|
||||
|
||||
position = 0, 200
|
||||
halign = center
|
||||
valign = bottom
|
||||
}
|
||||
|
||||
label { # Top left clock framing
|
||||
monitor =
|
||||
text = ⌜
|
||||
color = $outline
|
||||
font_size = 140
|
||||
font_family = $font_family_clock
|
||||
|
||||
position = -470, 70
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
label { # Bottom right clock framing
|
||||
monitor =
|
||||
text = ⌟
|
||||
color = $outline
|
||||
font_size = 140
|
||||
font_family = $font_family_clock
|
||||
|
||||
position = 475, 50
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
label { # Clock
|
||||
monitor =
|
||||
text = cmd[update:1000] date +'%I:%M:%S %p'
|
||||
color = rgb($text)
|
||||
font_size = 100
|
||||
font_family = $font_family_clock
|
||||
|
||||
position = 0, 60
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
label { # Date
|
||||
monitor =
|
||||
text = cmd[update:43200000] date +'%A, %-d %B %Y'
|
||||
color = $secondary_text
|
||||
font_size = 36
|
||||
font_family = $font_family
|
||||
|
||||
position = 0, -60
|
||||
halign = center
|
||||
valign = top
|
||||
}
|
||||
|
||||
label { # Week
|
||||
monitor =
|
||||
text = cmd[update:43200000] date +'Week %U'
|
||||
color = rgb($text)
|
||||
font_size = 24
|
||||
font_family = $font_family
|
||||
|
||||
position = 0, -120
|
||||
halign = center
|
||||
valign = top
|
||||
}
|
||||
|
||||
label { # Uptime
|
||||
monitor =
|
||||
text = cmd[update:60000] uptime -p
|
||||
color = $secondary_text
|
||||
font_size = 24
|
||||
font_family = $font_family
|
||||
|
||||
position = -20, 20
|
||||
halign = right
|
||||
valign = bottom
|
||||
}
|
||||
|
||||
label { # Battery
|
||||
monitor =
|
||||
text = cmd[update:5000] ~/.config/hypr/scripts/battery.fish
|
||||
color = $secondary_text
|
||||
font_size = 24
|
||||
font_family = $font_family
|
||||
|
||||
position = 20, 20
|
||||
halign = left
|
||||
valign = bottom
|
||||
}
|
||||
|
||||
label { # Weather if no battery
|
||||
monitor =
|
||||
text = cmd[update:90000] ~/.config/hypr/scripts/battery.fish > /dev/null || ~/.config/hypr/scripts/weather.fish
|
||||
color = $secondary_text
|
||||
font_size = 24
|
||||
font_family = $font_family
|
||||
|
||||
position = 20, 20
|
||||
halign = left
|
||||
valign = bottom
|
||||
}
|
||||
17
scripts/battery.fish
Executable file
17
scripts/battery.fish
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/fish
|
||||
|
||||
for battery in /sys/class/power_supply/*BAT*
|
||||
if test -f "$battery/uevent"
|
||||
set has_battery
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if set -q has_battery
|
||||
if test "$(cat /sys/class/power_supply/*/status | head -1)" = "Charging"
|
||||
echo -n "(+) "
|
||||
end
|
||||
echo "$(cat /sys/class/power_supply/*/capacity | head -1)% remaining"
|
||||
else
|
||||
exit 1
|
||||
end
|
||||
14
scripts/weather.fish
Executable file
14
scripts/weather.fish
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/fish
|
||||
|
||||
set -q XDG_CACHE_HOME && set cache $XDG_CACHE_HOME || set cache ~/.cache
|
||||
set cache $cache/caelestia/weather.txt
|
||||
|
||||
set format '\(.weatherDesc[0].value) • \(.temp_C)°C | UV \(.uvIndex) • 💨 \(.windspeedKmph)km/h'
|
||||
|
||||
set city (curl ipinfo.io | jq -r '.city')
|
||||
set weather (curl "wttr.in/$city?format=j1" | jq -er '.current_condition[0] | "'$format'"' || cat $cache)
|
||||
|
||||
if test -n weather
|
||||
echo $weather > $cache
|
||||
echo $weather
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue