Current limits is set on the A4988 stepper driver by a voltage on the Vref pin. The Pololu A4988 driver I had didnt have a dedicated pin to the VRef but it did have a via. This via is really connected to the center tap of the trim pot and we could place a resistor from this point to ground and based on ohms law it would pull Vref closer to ground depending on the value we use. If we instead use a tri-state GPIO pin of a arduino (for ex.) to provide our ground reference we can control our two current modes. Our GPIO pin is either in an input Hi-Z or output LOW state, we never use HIGH state. The Hi-Z state essentially disconnects our resistor. You should also disable pull-ups on the GPIO pin if you can but this will still work quiet well otherwise.

In my design I set my trim pot to give me 0.45v at Vref. Using the formula on the Pololu page, this provided up to 1.1A of current to the stepper motor. For my idle mode resistor I used a 500ohm, connecting it from the via as shown in the first picture to my esp8266 microcontroller. In my code I set the pin to LOW output and toggled the pin mode between input/output to enable high-power or idle current state. I also controlled the A4988 ENABLE pin so I really had 3 power modes (high, idle and off). 

The 500ohm resistor when grounded with the GPIO pin resulted in a Vref of 0.088v, which reduced the motor current to only 220mA and yet it still had enough holding power (along with mechanical friction) that I couldn't move the drawer. Furthermore, the A4988 ran cool in this mode so I feel confident it can last the test of time. 

See the attached spreadsheet to calculate the proper resistor for your project. Choose your desired nominal motor current in the left section. Then use either the middle section to test IDLE current based on resistors you have on hand, or use the right-most section to calculate a resistor value based on your desired IDLE current. You can edit any of the plain white columns and the line values will update.

WARNING  Ensure you never output a HIGH level on the GPIO pin. You will pull Vref to VDD through the IDLE resistor and will likely set the A4988 to max current of 2A. You will likely send the A4988 quickly into thermal shutdown. This is why we use the Hi-Z state by setting the pin to an INPUT as this electrically disconnects the IDLE resistor.