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
| function set_battery_envs() { | |
| export POWER_SOURCE=$([[ $(pmset -g batt | grep -Eoi "(\w+) Power") == "Battery Power" ]] && echo "🔋" || echo "🔌") | |
| export BATTERY_LEVEL=$(pmset -g batt | grep -Eoi '([0-9]{1,3}\%)' | grep -Eoi '[0-9]+') | |
| PS1="(%h) %K{22}[${BATTERY_LEVEL}%%]%k ${POWER_SOURCE} %* %n:%~$ " | |
| } | |
| typeset -a precmd_functions | |
| precmd_functions=(set_battery_envs) | |
| setopt PROMPT_SUBST |
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
| # Read more here: https://docs.sheetsu.com/?shell#create | |
| curl "https://sheetsu.com/apis/v1.0/{your_api_id}" \ | |
| -X POST \ | |
| -H "Content-Type: application/json" \ | |
| -d ' | |
| { | |
| "rows": [ | |
| { "link": "https://google.com" }, | |
| { "link": "https://www.apple.com/" }, | |
| { "link": "https://sheetsu.com" }, |