diff --git a/config/aerospace/aerospace.toml b/config/aerospace/aerospace.toml index 31cb8e3..05aa841 100644 --- a/config/aerospace/aerospace.toml +++ b/config/aerospace/aerospace.toml @@ -28,6 +28,7 @@ on-focus-changed = [ [mode.main.binding] alt-enter = 'exec-and-forget open -na Ghostty' + alt-m = ['workspace 7', 'exec-and-forget open -na Ghostty --args --title="Music" -e /etc/profiles/per-user/rayandrew/bin/spotify_player'] alt-h = 'focus --boundaries-action wrap-around-the-workspace left' alt-j = 'focus --boundaries-action wrap-around-the-workspace down' @@ -154,6 +155,12 @@ on-focus-changed = [ if.app-id = 'com.spotify.client' run = ['move-node-to-workspace 7'] +[[on-window-detected]] + if.app-id = 'com.mitchellh.ghostty' + if.window-title-regex-substring = 'Music' + check-further-callbacks = true + run = ['move-node-to-workspace 7'] + [[on-window-detected]] if.app-id = 'com.apple.mail' run = ['move-node-to-workspace 8'] diff --git a/config/spotify-player/app.toml b/config/spotify-player/app.toml new file mode 100644 index 0000000..447d4a8 --- /dev/null +++ b/config/spotify-player/app.toml @@ -0,0 +1,57 @@ +theme = "dracula" +client_port = 8080 +login_redirect_uri = "http://127.0.0.1:8989/login" +playback_format = """ +{status} {track} • {artists} {liked} +{album} • {genres} +{metadata}""" +playback_metadata_fields = [ + "repeat", + "shuffle", + "volume", + "device", +] +notify_timeout_in_secs = 0 +tracks_playback_limit = 50 +app_refresh_duration_in_ms = 32 +playback_refresh_duration_in_ms = 0 +page_size_in_rows = 20 +play_icon = "▶" +pause_icon = "▌▌" +liked_icon = "♥" +border_type = "Plain" +progress_bar_type = "Rectangle" +progress_bar_position = "Bottom" +genre_num = 2 +cover_img_length = 9 +cover_img_width = 5 +cover_img_scale = 1.0 +enable_media_control = false +enable_streaming = "Always" +enable_notify = true +enable_cover_image_cache = true +default_device = "spotify-player" +notify_streaming_only = false +seek_duration_secs = 5 +sort_artist_albums_by_type = false + +[notify_format] +summary = "{track} • {artists}" +body = "{album}" + +[layout] +playback_window_position = "Top" +playback_window_height = 6 + +[layout.library] +playlist_percent = 40 +album_percent = 40 + +[device] +name = "spotify-player" +device_type = "speaker" +volume = 70 +bitrate = 320 +audio_cache = false +normalization = false +autoplay = false diff --git a/config/spotify-player/keymap.toml b/config/spotify-player/keymap.toml new file mode 100644 index 0000000..a298cda --- /dev/null +++ b/config/spotify-player/keymap.toml @@ -0,0 +1,7 @@ +[[keymaps]] +command = "None" +key_sequence = "q" + +[[keymaps]] +command = "Quit" +key_sequence = "C-q" diff --git a/home/shell.nix b/home/shell.nix index f708549..af8cb47 100644 --- a/home/shell.nix +++ b/home/shell.nix @@ -68,6 +68,7 @@ _7zz = pkgs._7zz-rar; # Support for RAR extraction }) imagemagick + spotify-player ] ++ lib.optionals pkgs.stdenv.isDarwin [ coreutils ] ++ (lib.attrValues config.custom.shell.packages); @@ -104,5 +105,7 @@ xdg.configFile."sesh".source = config.lib.file.mkOutOfStoreSymlink "${dots}/config/sesh"; xdg.configFile."yazi".source = config.lib.file.mkOutOfStoreSymlink "${dots}/config/yazi"; + xdg.configFile."spotify-player".source = + config.lib.file.mkOutOfStoreSymlink "${dots}/config/spotify-player"; }; }