diff --git a/dot_config/spotify-player/app.toml b/dot_config/spotify-player/app.toml new file mode 100644 index 0000000..4943bba --- /dev/null +++ b/dot_config/spotify-player/app.toml @@ -0,0 +1,32 @@ +theme = "default" +client_id = "429a91bea7e740e4a73fe92c4e2ac165" +client_port = 8080 +playback_format = "{track} • {artists}\n{album}\n{metadata}" +notify_format = { summary = "{track} • {artists}", body = "{album}" } +# the default `copy_command` is based on the OS +#copy_command = { command = "pbcopy", args = [] } # macos +copy_command = { command = "xclip", args = ["-sel", "c"] } # linux +# copy_command = { command = "clip", args = [] } # windows +app_refresh_duration_in_ms = 32 +playback_refresh_duration_in_ms = 0 +cover_image_refresh_duration_in_ms = 2000 +page_size_in_rows = 20 +track_table_item_max_len = 32 +enable_media_control = true +enable_streaming = true +enable_cover_image_cache = true +default_device = "desktop" +play_icon = "▶" +pause_icon = "▌▌" +liked_icon = "♥" +playback_window_position = "Top" +cover_img_length = 9 +cover_img_width = 5 +playback_window_width = 6 + +[device] +name = "desktop" +device_type = "computer" +volume = 60 +bitrate = 320 +audio_cache = true diff --git a/dot_config/sway/config b/dot_config/sway/config index 332a64d..d288a4a 100644 --- a/dot_config/sway/config +++ b/dot_config/sway/config @@ -187,7 +187,7 @@ exec /usr/bin/otd & default_border pixel 1 default_floating_border pixel 1 smart_borders on -font pango:monospace 0 +font pango:monospace 0.001 titlebar_border_thickness 0 titlebar_padding 0 diff --git a/dot_config/waybar/config.jsonc b/dot_config/waybar/config.jsonc index 121689d..abe4ac2 100644 --- a/dot_config/waybar/config.jsonc +++ b/dot_config/waybar/config.jsonc @@ -1,40 +1,19 @@ { // "layer": "top", // Waybar at top layer // "position": "bottom", // Waybar position (top|bottom|left|right) - "height": 20, // Waybar height (to be removed for auto height) + "height": 35, // Waybar height (to be removed for auto height) // "width": 1280, // Waybar width "spacing": 8, // Gaps between modules (4px) // Choose the order of the modules - "modules-left": ["sway/workspaces", "sway/mode", "sway/window"], - "modules-right": ["pulseaudio", "cpu", "memory", "clock", "tray"], + "modules-left": ["custom/icon","sway/workspaces", "sway/mode", "sway/window"], + "modules-right": ["custom/spotify", "pulseaudio", "cpu", "memory","network", "clock", "tray"], // Modules configuration - // "sway/workspaces": { - // "disable-scroll": true, - // "all-outputs": true, - // "format": "{name}: {icon}", - // "format-icons": { - // "1": "", - // "2": "", - // "3": "", - // "4": "", - // "5": "", - // "urgent": "", - // "focused": "", - // "default": "" - // } - // }, - "keyboard-state": { - "numlock": true, - "capslock": true, - "format": "{name} {icon}", - "format-icons": { - "locked": "", - "unlocked": "" - } - }, "sway/mode": { "format": "{}" }, + "custom/icon": { + "format": "" + }, "idle_inhibitor": { "format": "{icon}", "format-icons": { @@ -47,7 +26,7 @@ "spacing": 10 }, "clock": { - // "timezone": "America/New_York", + "timezone": "America/Los_Angeles", "tooltip-format": "{:%Y %B}\n{calendar}", "format-alt": "{:%Y-%m-%d}" }, @@ -59,7 +38,6 @@ "format": "{}% " }, "network": { - // "interface": "wlp2*", // (Optional) To force the use of this interface "format-wifi": "{essid} ({signalStrength}%) ", "format-ethernet": "{ipaddr}/{cidr} ", "tooltip-format": "{ifname} via {gwaddr} ", @@ -68,7 +46,6 @@ "format-alt": "{ifname}: {ipaddr}/{cidr}" }, "pulseaudio": { - // "scroll-step": 1, // %, can be a float "format": "{volume}% {icon} {format_source}", "format-bluetooth": "{volume}% {icon} {format_source}", "format-bluetooth-muted": " {icon} {format_source}", @@ -88,17 +65,21 @@ }, "sway/workspaces": { "all-outputs": true + }, + "custom/spotify": { + "format": " {icon}{}", + "escape": true, + "return-type": "json", + "format-icons": { + "Playing": " ", + "Paused": " " + }, + "max-length": 40, + // "interval": 30, + "on-click": "playerctl play-pause", + "on-click-right": "kitty spotify_player", + //"exec": "zscroll --delay 0.2 --match-command \"spt playback\" --update-check true \"spt playback\" &", + "exec": "playerctl -a metadata --format '{\"text\": \"{{markup_escape(title)}} - {{artist}}\", \"tooltip\": \"{{markup_escape(title)}} - {{artist}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F", + "exec-if": "pgrep spotify" } - // "custom/media": { - // "format": "{icon} {}", - // "return-type": "json", - // "max-length": 40, - // "format-icons": { - // "spotify": "", - // "default": "🎜" - // }, - // "escape": true, - // "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder - // // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name - // } } diff --git a/dot_config/waybar/style.css b/dot_config/waybar/style.css index 4094d21..1e59573 100644 --- a/dot_config/waybar/style.css +++ b/dot_config/waybar/style.css @@ -1,13 +1,40 @@ * { border: none; border-radius: 0; - font-family: Roboto, Helvetica, Arial, sans-serif; + font-family: NotoSans, Roboto, Helvetica, Arial, sans-serif; font-size: 13px; min-height: 0; } window#waybar { background: #11151a; + background: rgba(17, 21, 26, 0.4); color: white; border-bottom: 3px solid rgba(100, 114, 125, 0.5); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.50), 0 1px 2px rgba(0, 0, 0, 0.50); + /*border-bottom: 2px solid rgba(100, 114, 125, 0.5);*/ +} + +tooltip { + border-radius: 8px; +} +#workspaces button { + min-width: 1px; +} +#workspaces button.focused { + font-weight: bold; +} + +#tray { + margin-right: 10px; +} + +#custom-icon { + color: white; + font-size: 20px; + padding-left: 10px; + padding-right: 16px; + border-radius: 0 10px 10px 0; + background: #1e2733; + /* border-bottom: 2px solid rgba(100, 114, 125, 0.5); */ }