Created
September 14, 2025 14:25
-
-
Save rhaberkorn/6935eebef817aa35e976a27b3d09df1a to your computer and use it in GitHub Desktop.
Update Aerc's accounts.conf after regenerating the Gmail refresh token
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/local/bin/sciteco -8qm | |
| !* | |
| * To update the Gmail refresh token in accounts.conf, first run | |
| * oauth2.py --generate_oauth2_token --user="[email protected]" --client_id="<CLIENT_ID>" --client_secret="<CLIENT_SECRET>" | |
| * ./gmail-refresh-token.tes <refresh-token> | |
| *! | |
| :Q[^A1]"< 1^C^C ' | |
| !* URL-encode the refresh token *! | |
| @EQ[^A1]// <0A:; @I/%/ 0A-16"<@I/0/' 16^R0A\^D D> | |
| @EB'accounts.conf' HXa @E%a'accounts.conf.bak' | |
| @S/imaps+oauthbearer:/ @S/:/ @FK/@/ G[^A1] L | |
| @S/smtps+oauthbearer:/ @S/:/ @FK/@/ G[^A1] | |
| :EX |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment