this repo has no description

feat: multi-env install bash script

+242 -9
+1
.zshenv
··· 1 + . "$HOME/.cargo/env"
+118
.zshrc
··· 1 + # If you come from bash you might have to change your $PATH. 2 + # export PATH=$HOME/bin:/usr/local/bin:$PATH 3 + 4 + # Path to your oh-my-zsh installation. 5 + export ZSH="$HOME/.oh-my-zsh" 6 + 7 + # Set name of the theme to load --- if set to "random", it will 8 + # load a random theme each time oh-my-zsh is loaded, in which case, 9 + # to know which specific one was loaded, run: echo $RANDOM_THEME 10 + # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes 11 + ZSH_THEME="robbyrussell" 12 + 13 + # Set list of themes to pick from when loading at random 14 + # Setting this variable when ZSH_THEME=random will cause zsh to load 15 + # a theme from this variable instead of looking in $ZSH/themes/ 16 + # If set to an empty array, this variable will have no effect. 17 + # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) 18 + 19 + # Uncomment the following line to use case-sensitive completion. 20 + # CASE_SENSITIVE="true" 21 + 22 + # Uncomment the following line to use hyphen-insensitive completion. 23 + # Case-sensitive completion must be off. _ and - will be interchangeable. 24 + # HYPHEN_INSENSITIVE="true" 25 + 26 + # Uncomment one of the following lines to change the auto-update behavior 27 + # zstyle ':omz:update' mode disabled # disable automatic updates 28 + # zstyle ':omz:update' mode auto # update automatically without asking 29 + # zstyle ':omz:update' mode reminder # just remind me to update when it's time 30 + 31 + # Uncomment the following line to change how often to auto-update (in days). 32 + # zstyle ':omz:update' frequency 13 33 + 34 + # Uncomment the following line if pasting URLs and other text is messed up. 35 + # DISABLE_MAGIC_FUNCTIONS="true" 36 + 37 + # Uncomment the following line to disable colors in ls. 38 + # DISABLE_LS_COLORS="true" 39 + 40 + # Uncomment the following line to disable auto-setting terminal title. 41 + # DISABLE_AUTO_TITLE="true" 42 + 43 + # Uncomment the following line to enable command auto-correction. 44 + # ENABLE_CORRECTION="true" 45 + 46 + # Uncomment the following line to display red dots whilst waiting for completion. 47 + # You can also set it to another string to have that shown instead of the default red dots. 48 + # e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" 49 + # Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) 50 + # COMPLETION_WAITING_DOTS="true" 51 + 52 + # Uncomment the following line if you want to disable marking untracked files 53 + # under VCS as dirty. This makes repository status check for large repositories 54 + # much, much faster. 55 + # DISABLE_UNTRACKED_FILES_DIRTY="true" 56 + 57 + # Uncomment the following line if you want to change the command execution time 58 + # stamp shown in the history command output. 59 + # You can set one of the optional three formats: 60 + # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" 61 + # or set a custom format using the strftime function format specifications, 62 + # see 'man strftime' for details. 63 + # HIST_STAMPS="mm/dd/yyyy" 64 + 65 + # Would you like to use another custom folder than $ZSH/custom? 66 + # ZSH_CUSTOM=/path/to/new-custom-folder 67 + 68 + # Which plugins would you like to load? 69 + # Standard plugins can be found in $ZSH/plugins/ 70 + # Custom plugins may be added to $ZSH_CUSTOM/plugins/ 71 + # Example format: plugins=(rails git textmate ruby lighthouse) 72 + # Add wisely, as too many plugins slow down shell startup. 73 + plugins=(git) 74 + 75 + source $ZSH/oh-my-zsh.sh 76 + 77 + # User configuration 78 + 79 + # export MANPATH="/usr/local/man:$MANPATH" 80 + 81 + # You may need to manually set your language environment 82 + # export LANG=en_US.UTF-8 83 + 84 + # Preferred editor for local and remote sessions 85 + # if [[ -n $SSH_CONNECTION ]]; then 86 + # export EDITOR='vim' 87 + # else 88 + # export EDITOR='mvim' 89 + # fi 90 + 91 + # Compilation flags 92 + # export ARCHFLAGS="-arch x86_64" 93 + 94 + # Set personal aliases, overriding those provided by oh-my-zsh libs, 95 + # plugins, and themes. Aliases can be placed here, though oh-my-zsh 96 + # users are encouraged to define aliases within the ZSH_CUSTOM folder. 97 + # For a full list of active aliases, run `alias`. 98 + # 99 + # Example aliases 100 + # alias zshconfig="mate ~/.zshrc" 101 + # alias ohmyzsh="mate ~/.oh-my-zsh" 102 + 103 + export NVM_DIR="$HOME/.nvm" 104 + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm 105 + [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion 106 + 107 + PATH=/home/biscuitech/.surrealdb:$PATH 108 + export COLORTERM=truecolor 109 + export PATH=~/bin:$PATH 110 + 111 + #alias cargo-update="cargo install $(cargo install --list | egrep '^[a-z0-9_-]+ v[0-9.]+:$' | cut -f1 -d' ')" 112 + 113 + export GDK_BACKEND=x11 114 + 115 + export SSH_AUTH_SOCK=~/.1password/agent.sock 116 + 117 + export FLYCTL_INSTALL="/home/biscuitech/.fly" 118 + export PATH="$FLYCTL_INSTALL/bin:$PATH"
+3
backup/install.sh
··· 1 + echo $USER 2 + 3 + stow -R */
-7
copy.sh
··· 1 - cp ~/.config/helix/config.toml ~/dotfiles/helix/config.toml 2 - cp ~/.config/helix/language.toml ~/dotfiles/helix/language.toml 3 - 4 - cp ~/.zshrc ~/dotfiles/.zshrc 5 - cp ~/.zshenv ~/dotfiles/.zshenv 6 - 7 -
+35
helix/config.toml
··· 1 + theme="github_dark" 2 + 3 + 4 + [editor] 5 + line-number = "relative" 6 + scroll-lines = 1 7 + # auto-pairs = false 8 + mouse = true 9 + auto-format = true 10 + bufferline="multiple" 11 + 12 + [editor.cursor-shape] 13 + insert = "bar" 14 + normal = "block" 15 + select = "underline" 16 + 17 + [editor.file-picker] 18 + # hidden = true 19 + 20 + [editor.lsp] 21 + display-messages = true 22 + display-inlay-hints = true 23 + 24 + [keys.normal] 25 + g = { a = "code_action" } # Maps `ga` to show possible code actions 26 + "ret" = ["move_line_down", "goto_first_nonwhitespace"] # Maps the enter key to move to start of next line 27 + X = "extend_line_above" 28 + D = "delete_char_backward" 29 + y = "yank_main_selection_to_clipboard" 30 + Y = "yank_joined_to_clipboard" 31 + # p = "paste_clipboard_before" 32 + 33 + [keys.insert] 34 + # j = { k = "normal_mode" } # Maps `jk` to exit insert mode 35 +
+38
helix/language.toml
··· 1 + 2 + [[language]] 3 + name = "rust" 4 + 5 + [language.config.hints] 6 + assignVariableTypes = true 7 + compositeLiteralFields = true 8 + constantValues = true 9 + functionTypeParameters = true 10 + parameterNames = true 11 + rangeVariableTypes = true 12 + 13 + [[language]] 14 + name = "html" 15 + formatter = { command = 'prettier', args = ["--parser", "html"] } 16 + 17 + [[language]] 18 + name = "json" 19 + formatter = { command = 'prettier', args = ["--parser", "json"] } 20 + 21 + [[language]] 22 + name = "css" 23 + formatter = { command = 'prettier', args = ["--parser", "css"] } 24 + 25 + [[language]] 26 + name = "javascript" 27 + formatter = { command = 'prettier', args = ["--parser", "typescript"] } 28 + auto-format = true 29 + 30 + [[language]] 31 + name = "typescript" 32 + formatter = { command = 'prettier', args = ["--parser", "typescript"] } 33 + auto-format = true 34 + 35 + [[language]] 36 + name = "tsx" 37 + formatter = { command = 'prettier', args = ["--parser", "typescript"] } 38 + auto-format = true
+47 -2
install.sh
··· 1 - echo $USER 1 + #!/bin/bash 2 + 3 + create_complex_symlink() { 4 + local source_file="$1" 5 + local symlink_name_win="$2" 6 + local symlink_name_unix="$3" 7 + 8 + # Check the operating system 9 + if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" ]]; then 10 + # Windows (using PowerShell) 11 + powershell -Command "New-Item -ItemType SymbolicLink -Path $symlink_name_win -Value $source_file -Force" 12 + echo "Symbolic link created: $symlink_name_win -> $source_file" 13 + else 14 + # Unix-like (using Bash) 15 + ln -sf "$HOME/dotfiles/$source_file" "$symlink_name_unix" 16 + echo "Symbolic link created: $symlink_name_unix -> $source_file" 17 + fi 18 + } 19 + 20 + create_symlink() { 21 + local source_file="$1" 22 + local symlink_name="$2" 23 + 24 + # Check the operating system 25 + if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" ]]; then 26 + # Windows (using PowerShell) 27 + powershell -Command "New-Item -ItemType SymbolicLink -Path $symlink_name -Value $source_file -Force" 28 + echo "Symbolic link created: $symlink_name -> $source_file" 29 + else 30 + # Unix-like (using Bash) 31 + ln -sf "$HOME/dotfiles/$source_file" "$symlink_name" 32 + echo "Symbolic link created: $symlink_name -> $source_file" 33 + fi 34 + } 2 35 3 - stow -R */ 36 + # Usage: Pass the filename as an argument to the function 37 + # create_symlink "./source.txt" "$HOME/source.txt" 38 + 39 + # Simple config files where target is the same in both env 40 + # create_symlink "$HOME/dotfiles/dprint.config.json" "$HOME/.dprint.json" 41 + # create_symlink "$HOME/dotfiles/starship/.config.toml" "$HOME/.config/starship/.config.toml" 42 + # create_symlink "$HOME/dotfiles/ssh/.ssh/config" "$HOME/.ssh/config" 43 + create_symlink "$HOME/dotfiles/.zshrc" "$HOME/.zshrc" 44 + create_symlink "$HOME/dotfiles/.zshenv" "$HOME/.zshenv" 45 + 46 + # Complex config files where target depends on the env 47 + ## Helix 48 + create_complex_symlink "$HOME/dotfiles/helix/.config/helix" "$env:APPDATA/helix" "$HOME/.config/helix"
make-symlinks.ps1 backup/make-symlinks.ps1