diff --git a/home-manager/fred.nix b/home-manager/fred.nix index 4fc491c..6f46703 100644 --- a/home-manager/fred.nix +++ b/home-manager/fred.nix @@ -100,6 +100,36 @@ in # Redirect URI registered: http://127.0.0.1:8989/login client_id = "265506bc7bbd4032bf0fee708b321d3e"; }; + # The home-manager module only writes keymap.toml when `keymaps` is + # non-empty, so `actions` alone would silently emit nothing. Restating a + # default binding is the cheapest way to make the file exist. + keymaps = [ + { + command = "ShowActionsOnCurrentTrack"; + key_sequence = "a"; + } + ]; + # Actions default to the *selected* item, which is useless when listening + # along to someone else's playback — the track was never selected, so + # liking it means finding it by hand. target = "PlayingTrack" acts on + # whatever is actually playing. + actions = [ + { + action = "ToggleLiked"; + key_sequence = "L"; + target = "PlayingTrack"; + } + { + action = "GoToArtist"; + key_sequence = "g P"; + target = "PlayingTrack"; + } + { + action = "GoToAlbum"; + key_sequence = "g B"; + target = "PlayingTrack"; + } + ]; }; # Upstream ships no .desktop file (TUI only), so the launcher can't find it.