eww + culr tweaks
This commit is contained in:
parent
d20d3d8310
commit
1a49ec52ce
4 changed files with 12 additions and 11 deletions
|
@ -27,7 +27,7 @@
|
|||
.bar {
|
||||
color: $fg;
|
||||
label {
|
||||
font-size: 1.4rem;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,14 +4,14 @@ limit=128
|
|||
socat -u UNIX-CLIENT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock STDOUT |
|
||||
while read line; do
|
||||
if [[ "$line" == activewindow\>\>* ]]; then
|
||||
windowtitle="$(printf $line | cut -d',' -f 2)"
|
||||
apptitle="$(printf $line | cut -d',' -f 1 | cut -d'>' -f 3)"
|
||||
windowtitle="$(echo $line | cut -d',' -f 2)"
|
||||
apptitle="$(echo $line | cut -d',' -f 1 | cut -d'>' -f 3 | rev | cut -d'.' -f -1 | rev)"
|
||||
combined="$windowtitle - $apptitle"
|
||||
if [[ "${#combined}" -lt $limit ]]; then
|
||||
printf '{"title": "'$combined'"}'
|
||||
echo '{"title": "'$combined'"}'
|
||||
else
|
||||
clipto=$((limit-${#apptitle}))
|
||||
printf '{"title": "'"${windowtitle:0:$clipto} - $apptitle"'"}'
|
||||
echo '{"title": "'"${windowtitle:0:$clipto} - $apptitle"'"}'
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -95,9 +95,10 @@ playerctl -F metadata -f '{{title}}\{{artist}}\{{status}}\{{position}}\{{mpris:l
|
|||
fi
|
||||
fi
|
||||
|
||||
|
||||
jaq --null-input -r -c \
|
||||
--arg artist "$(sanitize "$artist")" \
|
||||
--arg title "$(sanitize "$title")" \
|
||||
--arg artist "$(sanitize "${artist:0:32}")" \
|
||||
--arg title "$(sanitize "${title:0:32}")" \
|
||||
--arg status "$status" \
|
||||
--arg pos "$(get_position "$position" "$len")" \
|
||||
--arg pos_time "$(get_position_time "$position" "$len")" \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue