eww: refactor and improved experience with media widgets

This commit is contained in:
retrozinndev
2024-12-21 13:17:51 -03:00
parent 5bc04e4dff
commit 9b8f81417f
9 changed files with 39 additions and 30 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ class PlayerManager:
else:
self.clear_output()
de on_metadata_changed(self, player, metadata, _=None):
def on_metadata_changed(self, player, metadata, _=None):
logger.debug(f"Metadata changed for player {player.props.player_name}")
player_name = player.props.player_name
artist = player.get_artist()
+2 -2
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# initial notification history
json_initial_history=$(makoctl history | jq -c '.data[]' | sed 's/\\[n]/\\n/g')
json_initial_history=$(makoctl history | jq -c '.data[]' | sed -e 's/\\[n]/\\n/g' -e 's/&/&/g')
echo $json_initial_history
while true; do
@@ -9,7 +9,7 @@ while true; do
sleep .2
# frequently updated history variable
json_history=$(makoctl history | jq -c '.data[]' | sed 's/\\[n]/\\n/g')
json_history=$(makoctl history | jq -c '.data[]' | sed -e 's/\\[n]/\\n/g' -e 's/&/&/g')
if ! [[ "$json_initial_history" == "$json_history" ]]; then
json_initial_history="$json_history"