-
-
Notifications
You must be signed in to change notification settings - Fork 457
feat: new hyprlock layouts #1159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
looks cool |
Also LAYOUT 2,3,4,11,12,13,14 from your repo looks nice as well. Might well add them |
😭😭😭😭You guys are wild. Reserve extra room for other contribs HAHAHA. Thank you BTW! |
ok i will add |
@mahaveergurjar also add this at the begining of the config $resolve.font=SF Pro Display|font.download/dl/font/sf-pro-display.zip This will download and source the font. Change the name and url accordingly. |
@rubiin now review please |
by the way i don't use this sf-pro-display then why need to add this font ?? |
@kRHYME7 please add this type script of music to use full music functionality in hyprlock #!/bin/bash
# Script for Music Stats
if [ "$1" == "-music" ]; then
# 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 "Source "
fi
}
# Parse the argument
case "$2" in
--title)
title=$(get_metadata "xesam:title")
if [ -z "$title" ]; then
echo "Nothing Playing"
else
ten=" "
thirty="$ten$ten$ten"
len=${#title}
end=" "
if ((len>13)); then
len=13
end="..."
fi
title="${title:0:13}${thirty:0:$((13 - len))}"
echo "${title}${end}"
#echo "${title:0:18}" # 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://}
elif [[ "$url" == https://i.scdn.co/* ]]; then
cd "$HOME/.config/hypr/hyprlock"
temp_url=$(echo $url | awk -F '/' '{print $5}')
if [ ! -f "${temp_url}" ]; then
rm *[^.jpg][^.sh][^.webp] >/dev/null 2>/dev/null
wget $url -O $temp_url >/dev/null 2>/dev/null
fi
url="$HOME/.config/hyprlock/${temp_url}"
fi
echo "$url"
fi
;;
--artist)
artist=$(get_metadata "xesam:artist")
if [ -z "$artist" ]; then
echo ""
else
ten=" "
thirty="$ten$ten$ten"
len=${#artist}
end=" "
if ((len>10)); then
len=10
end="..."
fi
artist="${artist:0:10}${thirty:0:$((10 - len))}"
echo "${artist}${end}"
# 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 parameter: $2"
echo "Usage: $0 -music --title | --url | --artist | --length | --album | --source"
exit 1
;;
esac
else
echo "Invalid option: $1"
echo "Usage: $0 -bat | -music"
exit 1
fi |
I'll be adding a full |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just the change as said above
Anyone tried this on x2 scaling and fractional scaling? |
nah just on my regular screen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use scalable units for position and size
position = -2%, 1% | ||
halign = right | ||
valign = bottom | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kRHYME7 please review now related to scaling |
We can't. It's hyprlock thing. I suggest just support x1 and x2 monitor for now. At least avoid overlaps. |
I think I can't add this to rc for now. I have a busy week. |
Okay 👍 |
When will this pr merge ?? |
scaling for x1 and x2 are fine now? |
Yes the scaling issue fixed |
Will test tomorrow and if it's okay this patch will be available in 25.10.3 |
Let's continue this to the |
Pull Request
Description
add new hyprlock layouts
Please read these instructions and remove unnecessary text.
Type of change
Please put an
x
in the boxes that apply:Checklist
Please put an
x
in the boxes that apply:Screenshots
Additional context
Add any other context about the problem here.