diff --git a/.config/rofi-open/config.json b/.config/rofi-open/config.json
index 6965c1e..e73a1ed 100644
--- a/.config/rofi-open/config.json
+++ b/.config/rofi-open/config.json
@@ -42,6 +42,7 @@
"Sonarr - https://sonarr.suda.codes",
"Sonarr Anime - http://pve-main:6969",
"Sudacode - https://sudacode.com",
+ "Suwayomi - https://suwayomi.suda.codes",
"Tailscale - https://login.tailscale.com/admin/machines",
"Tranga - http://pve-main:9555",
"Truenas - https://truenas.unicorn-ilish.ts.net",
diff --git a/.config/waybar/catppuccin-macchiato/config.jsonc b/.config/waybar/catppuccin-macchiato/config.jsonc
index 97c133b..e9f3cf9 100644
--- a/.config/waybar/catppuccin-macchiato/config.jsonc
+++ b/.config/waybar/catppuccin-macchiato/config.jsonc
@@ -20,7 +20,7 @@
// "modules-center": ["hyprland/window"],
"modules-center": ["custom/notification"],
"modules-right": [
- "hyprland/scratchpad",
+ // "hyprland/scratchpad",
// "idle_inhibitor",
// "custom/notification",
"custom/updates",
@@ -157,13 +157,13 @@
"format-disconnected": "Disconnected ⚠",
"on-click": "$HOME/.config/rofi/scripts/rofi-wifi-menu.sh",
},
- // "custom/weather": {
- // "interval": 600,
- // "exec": "~/.config/waybar/scripts/wttr.sh Los_Angeles",
- // "return-type": "json",
- // "format": "{}",
- // "tooltip": true,
- // },
+ "custom/weather": {
+ "interval": 600,
+ "exec": "~/.config/waybar/scripts/wttr.sh Los_Angeles",
+ "return-type": "json",
+ "format": "{}",
+ "tooltip": true,
+ },
"custom/kernel": {
"exec": "uname -r | sed -E 's/^([0-9]+\\.[0-9]+\\.[0-9]+)-.*-([a-zA-Z0-9]+)/\\1-\\2/'",
"format": "{} ",
@@ -305,7 +305,7 @@
"exec": "$HOME/.config/waybar/scripts/scroll-mpv.sh",
"format": " {}",
"max-length": 35,
- "on-click": "playerctl -p firefox play-pause",
+ "on-click": "playerctl -p mpv play-pause",
"hide-empty-text": true,
},
"custom/notification": {
diff --git a/projects/scripts/waybar/mediaplayer.py b/projects/scripts/waybar/mediaplayer.py
index 9c6d4f6..c44471b 100755
--- a/projects/scripts/waybar/mediaplayer.py
+++ b/projects/scripts/waybar/mediaplayer.py
@@ -8,13 +8,13 @@ import logging
import os
import signal
import sys
-from typing import List
import gi
from gi.repository import GLib, Playerctl
from gi.repository.Playerctl import Player
logger = logging.getLogger(__name__)
+logger.setLevel(logging.INFO)
is_plain = False
@@ -66,7 +66,7 @@ class PlayerManager:
self.manager.manage_player(player)
self.on_metadata_changed(player, player.props.metadata)
- def get_players(self) -> List[Player]:
+ def get_players(self) -> list[Player]:
return self.manager.props.players
def write_output(self, text, player):
@@ -234,5 +234,4 @@ def main():
if __name__ == "__main__":
-
main()
diff --git a/projects/scripts/waybar/playerctl.sh b/projects/scripts/waybar/playerctl.sh
index 342e592..a4891a3 100755
--- a/projects/scripts/waybar/playerctl.sh
+++ b/projects/scripts/waybar/playerctl.sh
@@ -3,21 +3,22 @@
PLAYER="$1"
if [ -z "$PLAYER" ]; then
- echo "Usage: $0 "
- exit 1
+ echo "Usage: $0 "
+ exit 1
fi
-STATUS="$(playerctl -p "$PLAYER" status)"
+STATUS="$(playerctl -p "$PLAYER" status 2>/dev/null)"
-if [ -z "$STATUS" ] || [ "$STATUS" = "Stopped" ]; then
- exit 0
-elif [ "$STATUS" = "Paused" ]; then
- STATUS=" "
-elif [ "$STATUS" = "Playing" ]; then
- STATUS=" "
-else
- exit 0
-fi
+case "$STATUS" in "" | "Stopped")
+ exit 0
+ ;;
+"Paused")
+ STATUS=" "
+ ;;
+"Playing")
+ STATUS=" "
+ ;;
+esac
TITLE="$(playerctl -p "$PLAYER" metadata title)"
ARTIST="$(playerctl -p "$PLAYER" metadata artist)"