NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.
If you are not into long explanations, see [Paolo Bergantino’s answer][2].
| // --- SETTINGS KEYS --- | |
| const INPUT_VARIABLE = "Input Variable Name (contains JSON)"; | |
| const TEMPLATE_CHOICE_NAME = "Template Choice to Run for Each Item"; | |
| const POST_ACTION_CHOICE_NAME = "Post-Processing Choice Name (optional)"; | |
| module.exports = { | |
| entry: async (params, settings) => { | |
| const { quickAddApi, variables } = params; | |
| // --- Get Settings --- |
| { | |
| "configure-viewer-toolbar-geometry": { | |
| "__class__": "bytearray", | |
| "__value__": "AdnQywADAAAAAAZKAAABpwAACLUAAAPJAAAGSwAAAcYAAAi0AAADyAAAAAAAAAAACgAAAAZLAAABxgAACLQAAAPI" | |
| }, | |
| "local_storage": { | |
| "simple_input_history_net_search_url": [ | |
| "https://google.com/search?q={q}" | |
| ] | |
| }, |
| { | |
| "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
| "blocks": [ | |
| { | |
| "alignment": "left", | |
| "segments": [ | |
| { | |
| "background": "#ff479c", | |
| "foreground": "#ffffff", | |
| "leading_diamond": "\ue0b6", |
| # Adding this script to PS profile allows quick actions for Python venv library. | |
| # Create a variable where virtual environments are located | |
| $VENV_HOME="$HOME\.virtualenvs\" | |
| # A function to list all available virtual environments | |
| function Get-Venvs{ | |
| Get-ChildItem -Path $VENV_HOME -Name | |
| } |
NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.
If you are not into long explanations, see [Paolo Bergantino’s answer][2].