hyprlock
hyprlock copied to clipboard
Image from URL don't work
Regression?
No
Hyprlock Info and Version
Hyprlock version 0.4.1
Hyprlock config
# $text_color = rgba(E3E1EFFF)
# $entry_background_color = rgba(12131C11)
# $entry_border_color = rgba(908F9F55)
# $entry_color = rgba(C6C5D6FF)
$text_color = rgba(FFFFFFFF)
$entry_background_color = rgba(33333311)
$entry_border_color = rgba(3B3B3B55)
$entry_color = rgba(FFFFFFFF)
$font_family = Material Symbols Rounded
general {
no_fade_in = true
disable_loading_bar = false
hide_cursor = true
ignore_empty_input = true
text_trim = true
}
background {
path = ~/.dotfiles/wallpapers/wallpaper_arch_perfection_simplicity_by_icetremens-dbjspqh.png
monitor =
blur_size = 8
blur_passes = 0 # 0 disables blurring
noise = 0.0117
contrast = 1.3000 # Vibrant!!!
brightness = 0.8000
vibrancy = 0.2100
vibrancy_darkness = 0.0
}
# INPUT FIELD
input-field {
monitor =
size = 300, 40
outline_thickness = 2
dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true
outer_color = $entry_border_color
inner_color = $entry_background_color
font_color = $entry_color
fade_on_empty = true
placeholder_text =
hide_input = true
position = 0, 150
halign = center
valign = bottom
}
label { # Clock
monitor =
text = $TIME
shadow_passes = 1
shadow_boost = 0.5
color = $text_color
font_size = 65
font_family = $font_family
position = 0, 0
halign = center
valign = top
}
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
}
# Music
image {
monitor =
path =
size = 60 # lesser side if not 1:1 ratio
rounding = 5 # negative values mean circle
border_size = 0
rotate = 0 # degrees, counter-clockwise
reload_time = 2
reload_cmd = ~/.config/hypr/hyprlock/playerctlock.sh --arturl
position = 10, 10
halign = left
valign = bottom
}
# PLAYER TITTLE
label {
monitor =
text = cmd[update:1000] echo "$(~/.config/hypr/hyprlock/playerctlock.sh --title)"
color = rgba(255, 255, 255, 0.8)
font_size = 12
font_family = JetBrains Mono Nerd Font Mono ExtraBold
position = 80, 50
halign = left
valign = bottom
}
# PLAYER ALBUM
label {
monitor =
text = cmd[update:1000] echo "$(~/.config/hypr/hyprlock/playerctlock.sh --album)"
color = rgba(255, 255, 255, 1)
font_size = 10
font_family = JetBrains Mono Nerd Font Mono
position = 80, 30
halign = left
valign = bottom
}
# PLAYER Artist
label {
monitor =
text = cmd[update:1000] echo "$(~/.config/hypr/hyprlock/playerctlock.sh --artist)"
color = rgba(255, 255, 255, 0.8)
font_size = 10
font_family = JetBrains Mono Nerd Font Mono ExtraBold
position = 80, 10
halign = left
valign = bottom
}
playerctlock.sh
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: $0 --title | --arturl | --artist | --length | --album | --source"
exit 1
fi
# Function to get metadata using playerctl
get_metadata() {
key=$1
playerctl metadata --format "{{ $key }}" 2>/dev/null
}
# Check for arguments
# Function to determine the source and return an icon and text
get_source_info() {
trackid=$(get_metadata "mpris:trackid")
if [[ "$trackid" == *"firefox"* ]]; then
echo -e "Firefox "
elif [[ "$trackid" == *"spotify"* ]]; then
echo -e "Spotify "
elif [[ "$trackid" == *"chromium"* ]]; then
echo -e "Chrome "
else
echo ""
fi
}
# Parse the argument
case "$1" in
--title)
title=$(get_metadata "xesam:title")
if [ -z "$title" ]; then
echo ""
else
echo "${title:0:28}" # Limit the output to 50 characters
fi
;;
--arturl)
url=$(get_metadata "mpris:artUrl")
if [ -z "$url" ]; then
echo ""
else
if [[ "$url" == file://* ]]; then
url=${url#file://}
fi
echo "$url"
fi
;;
--artist)
artist=$(get_metadata "xesam:artist")
if [ -z "$artist" ]; then
echo ""
else
echo "${artist:0:30}" # Limit the output to 50 characters
fi
;;
--length)
length=$(get_metadata "mpris:length")
if [ -z "$length" ]; then
echo ""
else
# Convert length from microseconds to a more readable format (seconds)
echo "$(echo "scale=2; $length / 1000000 / 60" | bc) m"
fi
;;
--status)
status=$(playerctl status 2>/dev/null)
if [[ $status == "Playing" ]]; then
echo ""
elif [[ $status == "Paused" ]]; then
echo ""
else
echo ""
fi
;;
--album)
album=$(playerctl metadata --format "{{ xesam:album }}" 2>/dev/null)
if [[ -n $album ]]; then
echo "$album"
else
status=$(playerctl status 2>/dev/null)
if [[ -n $status ]]; then
echo "Not album"
else
echo ""
fi
fi
;;
--source)
get_source_info
;;
*)
echo "Invalid option: $1"
echo "Usage: $0 --title | --url | --artist | --length | --album | --source"
exit 1
;;
esac
Compositor Info and Version
System/Version info
Hyprland, built from branch main at commit 1ed925b69c2854a3f345cbeb7dca29a6286ca926 (internal: fix missing include directive (7984)).
Date: Fri Oct 4 10:41:27 2024
Tag: v0.43.0-93-g1ed925b6, commits: 5289
built against aquamarine 0.4.1
flags: (if any)
System Information:
System name: Linux
Node name: PadsTower
Release: 6.11.1-zen1-1-zen
Version: #1 ZEN SMP PREEMPT_DYNAMIC Mon, 30 Sep 2024 23:49:48 +0000
GPU information:
0d:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] [1002:73df] (rev c1) (prog-if 00 [VGA controller])
os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo
plugins:
Description
Image from URL (jpeg) don't work
How to reproduce
Launch spotify and lock with my config :)
Crash reports, logs, images, videos
hyprlock output with debug flag
[TRACE] got wl event
[TRACE] timer thread firing
[TRACE] got wl event
[TRACE] [core] got poll event
[ERR] filesystem error: cannot get file time: No such file or directory [https://i.scdn.co/image/ab67616d0000b273e48af84946f1e07dab564088]
[ERR] filesystem error: cannot get file time: No such file or directory [https://i.scdn.co/image/ab67616d0000b273e48af84946f1e07dab564088]
[TRACE] Requesting label resource label:94283817536192,time:1728147576021071748
[TRACE] [TRACE] Requesting label resource label:94283817538880,time:1728147576021083998
Processing requested resourceID label:94283817536192,time:1728147576021071748
[TRACE] Requesting label resource label:94283817541072,time:1728147576021093858
[TRACE] Requesting label resource label:94283816861328,time:1728147576021113588
[TRACE] Requesting label resource label:94283816628720,time:1728147576021122778
[TRACE] Requesting label resource label:94283817542640,time:1728147576021131058
[TRACE] [TRACE] [core] got poll eventgot wl event
Source of my config : https://gist.github.com/ashish-kus/dd562b0bf5e8488a09e0b9c289f4574c