GithubHelp home page GithubHelp logo

mac_tools's Introduction

What are these files?

  • chproj <project> - Runs chproj_internal and then refreshes the shell

  • change_env - Initiates a pyenv local <folder_name> allowing you to use venvs that use the names of your folders

  • de-quarantine <file> - takes a file as an arg and de-quarantines it

Abstract tools:

change_proj_internal:

  • chproj_internal - A python script that changes your workspaces by creating and destroying symlinks to folders.
  • You should use chproj instead because this wont work by itself with p10k

Setup:

  1. Add the following to your .zprofile to set where you will store your environments:
    export CHNG_PROJ_ROOT="<path to folder>"
    
  2. If you want to specify folders outside of this root folder then you must use an environment variable in .zprofile:
    export CHNG_PROJ_<NAME>="<path to folder>"
    
  3. The program creates a symlink from the current environment to /usr/local/bin/chng_proj_current so you have to add this dir to your PATH in .zprofile:
    export PATH="$PATH:/usr/local/bin/chnj_proj_current"
    
  4. At this point you can use the script to change environments:
    • If you made a folder in the environment root folder then you use the name as an argument:
       chproj <folder name>
      
    • If you used an environment variable then you can use the you specified:
       chproj <NAME>
      

How to add to p10k:

  1. Add to .zprofile
    source /usr/local/bin/chng_proj_current/env_details
    export CHNG_PROJ_ENV_NAME="$CHNG_PROJ_ENV_NAME"
    
  2. Add to .p10k.zsh:
     function prompt_custom() {
       p10k segment -b 1 -f 3 -t "${CHNG_PROJ_ENV_NAME//\%/%%}"
     }
    
     function instant_prompt_custom() {
       prompt_custom
     }
     typeset -g POWERLEVEL9K_CUSTOM_FOREGROUND=233
     typeset -g POWERLEVEL9K_CUSTOM_BACKGROUND=1
    	
    

mac_tools's People

Contributors

benoniy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.