mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-01 19:47:41 +00:00
Compare commits
41 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 33a7de2dfc | |||
| f5f4f47655 | |||
|
|
4d8d70d390 | ||
|
|
cacc98a7d3 | ||
|
|
9c05733b5d | ||
| d4e02bbb89 | |||
| 32dbec6476 | |||
|
|
980fc9aa7d | ||
|
|
a2c3de1b3b | ||
|
|
16d455a262 | ||
|
|
9ba66c7734 | ||
|
|
86824d8c45 | ||
| 38d853aa8a | |||
|
|
34a0d7d8c4 | ||
|
|
65bf470c5b | ||
|
|
965c47efef | ||
| 410f5ac2b5 | |||
|
|
b6a18688c4 | ||
| 9f1ba5034f | |||
|
|
4cf956aa17 | ||
|
|
f9142a4780 | ||
|
|
bb921189e2 | ||
| a4eb0b0186 | |||
| 1222b8fdb3 | |||
| cced3a5310 | |||
|
|
6c680a0fa9 | ||
|
|
6746fb5381 | ||
| 7b2831ec94 | |||
| a605d46294 | |||
|
|
5e98f61942 | ||
|
|
e2583f4d91 | ||
| 80b2e542bf | |||
| 9c3ba8f2e8 | |||
| 632424ecf9 | |||
|
|
8c8436254e | ||
|
|
fe6f070beb | ||
|
|
2a5b2400d7 | ||
| e109cca22a | |||
| 1d948f6915 | |||
|
|
14c3e376dc | ||
|
|
75a32331b0 |
@@ -3,27 +3,10 @@ root = true
|
|||||||
[*]
|
[*]
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
# indent_size = 4
|
indent_size = 2
|
||||||
indent_style = space
|
indent_style = space
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
# max_line_length = 160
|
|
||||||
# tab_width = 4
|
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
[{*.yaml,*.yml}]
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[*.sh]
|
|
||||||
indent_size = 2
|
|
||||||
tab_width = 2
|
|
||||||
|
|
||||||
shell_variant = bash # like -ln=posix
|
|
||||||
binary_next_line = true # like -bn
|
|
||||||
switch_case_indent = true # like -ci
|
|
||||||
space_redirects = true # like -sr
|
|
||||||
keep_padding = false # like -kp
|
|
||||||
function_next_line = true # like -fn
|
|
||||||
never_split = false # like -ns
|
|
||||||
|
|
||||||
[local/bin/antigen.zsh]
|
[local/bin/antigen.zsh]
|
||||||
ignore = true
|
ignore = true
|
||||||
|
|||||||
8
.gitmodules
vendored
Normal file
8
.gitmodules
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[submodule "config/nvim"]
|
||||||
|
path = config/nvim
|
||||||
|
url = git@github.com:AstroNvim/AstroNvim.git
|
||||||
|
ignore = dirty
|
||||||
|
[submodule "config/astronvim/lua/user"]
|
||||||
|
path = config/astronvim/lua/user
|
||||||
|
url = git@github.com:ivuorinen/astronvim_config.git
|
||||||
|
ignore = dirty
|
||||||
45
Brewfile
45
Brewfile
@@ -10,11 +10,10 @@ tap "homebrew/cask"
|
|||||||
tap "homebrew/cask-fonts"
|
tap "homebrew/cask-fonts"
|
||||||
tap "homebrew/core"
|
tap "homebrew/core"
|
||||||
tap "homebrew/services"
|
tap "homebrew/services"
|
||||||
|
tap "mongodb/brew"
|
||||||
tap "shivammathur/extensions"
|
tap "shivammathur/extensions"
|
||||||
tap "shivammathur/php"
|
tap "shivammathur/php"
|
||||||
tap "teamookla/speedtest"
|
tap "teamookla/speedtest"
|
||||||
# Interpreted, interactive, object-oriented programming language
|
|
||||||
brew "python@3.10"
|
|
||||||
# Automate deployment, configuration, and upgrading
|
# Automate deployment, configuration, and upgrading
|
||||||
brew "ansible"
|
brew "ansible"
|
||||||
# Zstandard is a real-time compression algorithm
|
# Zstandard is a real-time compression algorithm
|
||||||
@@ -33,8 +32,12 @@ brew "brew-php-switcher"
|
|||||||
brew "glib"
|
brew "glib"
|
||||||
# Manage compile and link flags for libraries
|
# Manage compile and link flags for libraries
|
||||||
brew "pkg-config"
|
brew "pkg-config"
|
||||||
|
# Cross-platform make
|
||||||
|
brew "cmake"
|
||||||
# Open source suite of directory software
|
# Open source suite of directory software
|
||||||
brew "openldap"
|
brew "openldap"
|
||||||
|
# Get a file from an HTTP, HTTPS or FTP server
|
||||||
|
brew "curl"
|
||||||
# Libraries to talk to Microsoft SQL Server and Sybase databases
|
# Libraries to talk to Microsoft SQL Server and Sybase databases
|
||||||
brew "freetds"
|
brew "freetds"
|
||||||
# C/C++ and Java libraries for Unicode and globalization
|
# C/C++ and Java libraries for Unicode and globalization
|
||||||
@@ -47,16 +50,22 @@ brew "php"
|
|||||||
brew "composer"
|
brew "composer"
|
||||||
# GNU File, Shell, and Text utilities
|
# GNU File, Shell, and Text utilities
|
||||||
brew "coreutils"
|
brew "coreutils"
|
||||||
|
# Get, unpack, build, and install modules from CPAN
|
||||||
|
brew "cpanminus"
|
||||||
# Diff that understands syntax
|
# Diff that understands syntax
|
||||||
brew "difftastic"
|
brew "difftastic"
|
||||||
# Tool for exploring each layer in a docker image
|
# Tool for exploring each layer in a docker image
|
||||||
brew "dive"
|
brew "dive"
|
||||||
# Command-line DNS client
|
# Command-line DNS client
|
||||||
brew "dog"
|
brew "dog"
|
||||||
|
# Tool to verify that your files are in harmony with your .editorconfig
|
||||||
|
brew "editorconfig-checker"
|
||||||
# Useful examples at the command-line
|
# Useful examples at the command-line
|
||||||
brew "eg-examples"
|
brew "eg-examples"
|
||||||
# CLI for templating and/or deploying FaaS functions
|
# CLI for templating and/or deploying FaaS functions
|
||||||
brew "faas-cli"
|
brew "faas-cli"
|
||||||
|
# Simple, fast and user-friendly alternative to find
|
||||||
|
brew "fd"
|
||||||
# Monitor a directory for changes and run a shell command
|
# Monitor a directory for changes and run a shell command
|
||||||
brew "fswatch"
|
brew "fswatch"
|
||||||
# GitHub command-line tool
|
# GitHub command-line tool
|
||||||
@@ -107,12 +116,18 @@ brew "jq"
|
|||||||
brew "lazydocker"
|
brew "lazydocker"
|
||||||
# Linguistic software and Finnish dictionary
|
# Linguistic software and Finnish dictionary
|
||||||
brew "libvoikko"
|
brew "libvoikko"
|
||||||
|
# Package manager for the Lua programming language
|
||||||
|
brew "luarocks"
|
||||||
# Swiss Army Knife for macOS
|
# Swiss Army Knife for macOS
|
||||||
brew "m-cli"
|
brew "m-cli"
|
||||||
# Mac App Store command-line interface
|
# Mac App Store command-line interface
|
||||||
brew "mas"
|
brew "mas"
|
||||||
# Terminal-based visual file manager
|
# Terminal-based visual file manager
|
||||||
brew "midnight-commander"
|
brew "midnight-commander"
|
||||||
|
# Ambitious Vim-fork focused on extensibility and agility
|
||||||
|
brew "neovim"
|
||||||
|
# No Nonsense Neovim Client in Rust
|
||||||
|
brew "neovide"
|
||||||
# Port scanning utility for large networks
|
# Port scanning utility for large networks
|
||||||
brew "nmap"
|
brew "nmap"
|
||||||
# Manage multiple Node.js versions
|
# Manage multiple Node.js versions
|
||||||
@@ -121,6 +136,12 @@ brew "nvm"
|
|||||||
brew "openjdk"
|
brew "openjdk"
|
||||||
# Generate clients, server & docs from an OpenAPI spec (v2, v3)
|
# Generate clients, server & docs from an OpenAPI spec (v2, v3)
|
||||||
brew "openapi-generator"
|
brew "openapi-generator"
|
||||||
|
# Swiss-army knife of markup format conversion
|
||||||
|
brew "pandoc"
|
||||||
|
# Highly capable, feature-rich programming language
|
||||||
|
brew "perl"
|
||||||
|
# Interpreted, interactive, object-oriented programming language
|
||||||
|
brew "python@3.10"
|
||||||
# Interpreted, interactive, object-oriented programming language
|
# Interpreted, interactive, object-oriented programming language
|
||||||
brew "python@3.8"
|
brew "python@3.8"
|
||||||
# RC file (dotfile) management
|
# RC file (dotfile) management
|
||||||
@@ -133,6 +154,8 @@ brew "ruby"
|
|||||||
brew "shellcheck"
|
brew "shellcheck"
|
||||||
# Autoformat shell script source code
|
# Autoformat shell script source code
|
||||||
brew "shfmt"
|
brew "shfmt"
|
||||||
|
# Cross-shell prompt for astronauts
|
||||||
|
brew "starship"
|
||||||
# Version control system designed to be a better CVS
|
# Version control system designed to be a better CVS
|
||||||
brew "subversion"
|
brew "subversion"
|
||||||
# Send macOS User Notifications from the command-line
|
# Send macOS User Notifications from the command-line
|
||||||
@@ -155,12 +178,16 @@ brew "tmux"
|
|||||||
brew "tree"
|
brew "tree"
|
||||||
# Modern watch command
|
# Modern watch command
|
||||||
brew "viddy"
|
brew "viddy"
|
||||||
|
# Command-line interface to the WakaTime api
|
||||||
|
brew "wakatime-cli"
|
||||||
# Executes a program periodically, showing output fullscreen
|
# Executes a program periodically, showing output fullscreen
|
||||||
brew "watch"
|
brew "watch"
|
||||||
# Internet file retriever
|
# Internet file retriever
|
||||||
brew "wget"
|
brew "wget"
|
||||||
# Personal information dashboard for your terminal
|
# Personal information dashboard for your terminal
|
||||||
brew "wtfutil"
|
brew "wtfutil"
|
||||||
|
# JavaScript package manager
|
||||||
|
brew "yarn"
|
||||||
# Tracks most-used directories to make cd smarter
|
# Tracks most-used directories to make cd smarter
|
||||||
brew "z"
|
brew "z"
|
||||||
# A vulnerability scanner for container images and filesystems
|
# A vulnerability scanner for container images and filesystems
|
||||||
@@ -169,6 +196,8 @@ brew "anchore/grype/grype"
|
|||||||
brew "ddosify/tap/ddosify"
|
brew "ddosify/tap/ddosify"
|
||||||
# lets you quickly switch between multiple git user profiles
|
# lets you quickly switch between multiple git user profiles
|
||||||
brew "gesquive/tap/git-user"
|
brew "gesquive/tap/git-user"
|
||||||
|
# High-performance, schema-free, document-oriented database
|
||||||
|
brew "mongodb/brew/mongodb-community"
|
||||||
# Xdebug PHP extension
|
# Xdebug PHP extension
|
||||||
brew "shivammathur/extensions/xdebug@7.4"
|
brew "shivammathur/extensions/xdebug@7.4"
|
||||||
# Xdebug PHP extension
|
# Xdebug PHP extension
|
||||||
@@ -231,6 +260,8 @@ cask "qlstephen"
|
|||||||
cask "quicklook-json"
|
cask "quicklook-json"
|
||||||
# QuickLook generator for Adobe Swatch Exchange files
|
# QuickLook generator for Adobe Swatch Exchange files
|
||||||
cask "quicklookase"
|
cask "quicklookase"
|
||||||
|
# Automatically hides or quits apps after periods of inactivity
|
||||||
|
cask "quitter"
|
||||||
# Move and resize windows using keyboard shortcuts or snap areas
|
# Move and resize windows using keyboard shortcuts or snap areas
|
||||||
cask "rectangle"
|
cask "rectangle"
|
||||||
# MySQL/MariaDB database management
|
# MySQL/MariaDB database management
|
||||||
@@ -249,13 +280,13 @@ cask "syntax-highlight"
|
|||||||
cask "visual-studio-code"
|
cask "visual-studio-code"
|
||||||
# Multimedia player
|
# Multimedia player
|
||||||
cask "vlc"
|
cask "vlc"
|
||||||
|
# Spell-checking service for Finnish
|
||||||
|
cask "voikkospellservice"
|
||||||
# Rust-based terminal
|
# Rust-based terminal
|
||||||
cask "warp"
|
cask "warp"
|
||||||
|
# View output from scripts in the menu bar
|
||||||
|
cask "xbar"
|
||||||
mas "1Password for Safari", id: 1569813296
|
mas "1Password for Safari", id: 1569813296
|
||||||
mas "Flow", id: 1423210932
|
mas "Flow", id: 1423210932
|
||||||
mas "GarageBand", id: 682658836
|
mas "pullBar", id: 1601913905
|
||||||
mas "iMovie", id: 408981434
|
|
||||||
mas "Keynote", id: 409183694
|
|
||||||
mas "Numbers", id: 409203825
|
|
||||||
mas "Pages", id: 409201541
|
|
||||||
mas "Tailscale", id: 1475387142
|
mas "Tailscale", id: 1475387142
|
||||||
|
|||||||
@@ -42,9 +42,9 @@ and you need git to clone the repo. This will change soon™.
|
|||||||
|
|
||||||
`.local/bin/dfm` is a shell script that has some tools that help with dotfiles management.
|
`.local/bin/dfm` is a shell script that has some tools that help with dotfiles management.
|
||||||
|
|
||||||
### `scripts/install.sh` - dotfiles linker
|
### `scripts/install-dotfiles.sh` - dotfiles linker
|
||||||
|
|
||||||
The `scripts/install.sh` is a `rcm` generated shell script that does all the necessary linking.
|
The `scripts/install-dotfiles.sh` is a `rcm` generated shell script that does all the necessary linking.
|
||||||
|
|
||||||
To refresh the file, you can run `dfm dotfiles update`
|
To refresh the file, you can run `dfm dotfiles update`
|
||||||
|
|
||||||
|
|||||||
11
config/alias
11
config/alias
@@ -58,19 +58,20 @@ alias zapds='find . -name ".DS_Store" -print -delete'
|
|||||||
alias t='tail -f' # tail with follow flag on
|
alias t='tail -f' # tail with follow flag on
|
||||||
alias dn='du -chd1' # directory usage, return only the total
|
alias dn='du -chd1' # directory usage, return only the total
|
||||||
|
|
||||||
alias code_scanner='docker run \
|
alias code_scanner="docker run \
|
||||||
--env SOURCE_CODE="$PWD" \
|
--env SOURCE_CODE='${PWD}' \
|
||||||
--volume "$PWD":/code \
|
--volume '${PWD}':/code \
|
||||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||||
registry.gitlab.com/gitlab-org/ci-cd/codequality:${CODEQUALITY_VERSION:-latest} \
|
registry.gitlab.com/gitlab-org/ci-cd/codequality:${CODEQUALITY_VERSION:-latest} \
|
||||||
/code'
|
/code"
|
||||||
|
|
||||||
alias composerUp='composer global update'
|
alias composerUp='composer global update'
|
||||||
alias npmUp='npm -g up'
|
alias npmUp='npm -g up'
|
||||||
|
|
||||||
alias zedit='code ~/.zshrc ~/.alias'
|
alias zedit='$EDITOR ~/.dotfiles'
|
||||||
|
|
||||||
if [[ -f "$HOME/.aliases.local" ]]; then
|
if [[ -f "$HOME/.aliases.local" ]]; then
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
source "$HOME/.aliases.local"
|
source "$HOME/.aliases.local"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
1
config/astronvim/lua/user
Submodule
1
config/astronvim/lua/user
Submodule
Submodule config/astronvim/lua/user added at 6f246744d4
6
config/flipperdevices.com/qFlipper.ini
Normal file
6
config/flipperdevices.com/qFlipper.ini
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[General]
|
||||||
|
ApplicationUpdateChannel=release
|
||||||
|
CheckApplicatonUpdates=true
|
||||||
|
FirmwareUpdateChannel=release
|
||||||
|
LastFolderUrl=/Users/ivuorinen
|
||||||
|
ShowHiddenFiles=false
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
*.cache
|
*.cache
|
||||||
*~
|
*~
|
||||||
|
|
||||||
|
*-secret
|
||||||
__secret
|
__secret
|
||||||
__ignored
|
__ignored
|
||||||
__test_*.php
|
__test_*.php
|
||||||
@@ -16,3 +17,4 @@ cachegrind.out.*
|
|||||||
composer.phar
|
composer.phar
|
||||||
wp_*.sh
|
wp_*.sh
|
||||||
auth.json
|
auth.json
|
||||||
|
dfm.sh
|
||||||
|
|||||||
1
config/nvim
Submodule
1
config/nvim
Submodule
Submodule config/nvim added at 4f4269d174
35
config/starship.toml
Normal file
35
config/starship.toml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# Get editor completions based on the config schema
|
||||||
|
"$schema" = 'https://starship.rs/config-schema.json'
|
||||||
|
|
||||||
|
# Inserts a blank line between shell prompts
|
||||||
|
add_newline = true
|
||||||
|
|
||||||
|
# Replace the '❯' symbol in the prompt with '➜'
|
||||||
|
[character] # The name of the module we are configuring is 'character'
|
||||||
|
success_symbol = '[➜](bold green)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green'
|
||||||
|
|
||||||
|
[cmd_duration]
|
||||||
|
disabled = true
|
||||||
|
|
||||||
|
[git_branch]
|
||||||
|
symbol = '🌱 '
|
||||||
|
truncation_length = 4
|
||||||
|
truncation_symbol = ''
|
||||||
|
ignore_branches = ['master', 'main']
|
||||||
|
|
||||||
|
[git_status]
|
||||||
|
up_to_date = '✓'
|
||||||
|
staged = '[++\($count\)](green)'
|
||||||
|
|
||||||
|
[package]
|
||||||
|
format = '[$symbol($version )]($style)'
|
||||||
|
version_format = '${major}.${minor}'
|
||||||
|
|
||||||
|
[php]
|
||||||
|
format = '[$symbol($version )]($style)'
|
||||||
|
version_format = '${major}.${minor}'
|
||||||
|
|
||||||
|
[nodejs]
|
||||||
|
format = '[$symbol($version )]($style)'
|
||||||
|
version_format = '${major}.${minor}'
|
||||||
|
|
||||||
53
config/tmux/tmux.conf
Normal file
53
config/tmux/tmux.conf
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
# ~/.config/tmux/tmux.conf, or .dotfiles/config/tmux/tmux.conf
|
||||||
|
#
|
||||||
|
# Contains configuration from the follwing sources:
|
||||||
|
# - https://tmuxguide.readthedocs.io/en/latest/tmux/tmux.html
|
||||||
|
# -
|
||||||
|
|
||||||
|
# unbind default prefix and set it to ctrl-a
|
||||||
|
unbind C-b
|
||||||
|
set -g prefix C-a
|
||||||
|
bind C-a send-prefix
|
||||||
|
|
||||||
|
# make delay shorter
|
||||||
|
set -sg escape-time 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### key bindings ####
|
||||||
|
|
||||||
|
# reload config file
|
||||||
|
bind r source-file ~/.dotfiles/config/tmux/tmux.conf \; display "tmux.conf reloaded!"
|
||||||
|
|
||||||
|
# quickly open a new window
|
||||||
|
bind N new-window
|
||||||
|
|
||||||
|
# synchronize all panes in a window
|
||||||
|
bind y setw synchronize-panes
|
||||||
|
|
||||||
|
# pane movement shortcuts (same as vim)
|
||||||
|
bind h select-pane -L
|
||||||
|
bind j select-pane -D
|
||||||
|
bind k select-pane -U
|
||||||
|
bind l select-pane -R
|
||||||
|
|
||||||
|
# enable mouse support for switching panes/windows
|
||||||
|
#set -g mouse-utf8 on
|
||||||
|
#set -g mouse on
|
||||||
|
|
||||||
|
#### copy mode : vim ####
|
||||||
|
|
||||||
|
# set vi mode for copy mode
|
||||||
|
setw -g mode-keys vi
|
||||||
|
|
||||||
|
# copy mode using 'Esc'
|
||||||
|
unbind [
|
||||||
|
bind Escape copy-mode
|
||||||
|
|
||||||
|
# start selection with 'space' and copy using 'y'
|
||||||
|
#bind -t vi-copy 'y' copy-selection
|
||||||
|
|
||||||
|
# paste using 'p'
|
||||||
|
unbind p
|
||||||
|
bind p paste-buffer
|
||||||
|
|
||||||
19
ecrc
Normal file
19
ecrc
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"Version": "2.7.0",
|
||||||
|
"Verbose": false,
|
||||||
|
"Debug": false,
|
||||||
|
"IgnoreDefaults": false,
|
||||||
|
"SpacesAftertabs": false,
|
||||||
|
"NoColor": false,
|
||||||
|
"Exclude": [],
|
||||||
|
"AllowedContentTypes": [],
|
||||||
|
"PassedFiles": [],
|
||||||
|
"Disable": {
|
||||||
|
"EndOfLine": false,
|
||||||
|
"Indentation": false,
|
||||||
|
"InsertFinalNewline": false,
|
||||||
|
"TrimTrailingWhitespace": false,
|
||||||
|
"IndentSize": false,
|
||||||
|
"MaxLineLength": false
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,12 +9,12 @@
|
|||||||
# Helper variables, override with ENVs like `VERBOSE=1 dfm help`
|
# Helper variables, override with ENVs like `VERBOSE=1 dfm help`
|
||||||
: "${VERBOSE:=0}"
|
: "${VERBOSE:=0}"
|
||||||
: "${DOTFILES:=$HOME/.dotfiles}"
|
: "${DOTFILES:=$HOME/.dotfiles}"
|
||||||
: "${INSTALL_SCRIPT:=$DOTFILES/scripts/install.sh}"
|
: "${INSTALL_SCRIPT:=$DOTFILES/scripts/install-dotfiles.sh}"
|
||||||
: "${BREWFILE:=$DOTFILES/Brewfile}"
|
: "${BREWFILE:=$DOTFILES/Brewfile}"
|
||||||
|
|
||||||
SCRIPT=$(basename "$0")
|
SCRIPT=$(basename "$0")
|
||||||
|
|
||||||
source "$HOME/.dotfiles/scripts/shared.sh"
|
source "$DOTFILES/scripts/shared.sh"
|
||||||
|
|
||||||
function section_install
|
function section_install
|
||||||
{
|
{
|
||||||
@@ -22,27 +22,39 @@ function section_install
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
all)
|
all)
|
||||||
bash "$DOTFILES/scripts/settler.sh" && msg_done "🎉 Done!"
|
$0 install antigen
|
||||||
|
$0 install macos
|
||||||
|
$0 install brew
|
||||||
|
$0 install ext_gh
|
||||||
|
$0 install ext_go
|
||||||
;;
|
;;
|
||||||
antigen)
|
antigen)
|
||||||
curl -L git.io/antigen > "$DOTFILES/local/bin/antigen.zsh" && msg_done "🎉 Done!"
|
curl -L git.io/antigen > "$DOTFILES/local/bin/antigen.zsh" && msg_done "🎉 New antigen installed!"
|
||||||
;;
|
;;
|
||||||
defaults)
|
brew)
|
||||||
bash "$DOTFILES/scripts/set-defaults.sh" && msg_done "🎉 Done!"
|
brew bundle install --file="$BREWFILE" && msg_done "🎉 macOS Defaults set!"
|
||||||
|
;;
|
||||||
|
macos)
|
||||||
|
bash "$DOTFILES/scripts/set-macos-defaults.sh" && msg_done "🎉 Brewfile defined apps has been installed!"
|
||||||
;;
|
;;
|
||||||
ext_go)
|
ext_go)
|
||||||
bash "$DOTFILES/scripts/install-go-packages" && msg_done "🎉 Done!"
|
bash "$DOTFILES/scripts/install-go-packages.sh" && msg_done "🎉 Go packages have been installed!"
|
||||||
;;
|
;;
|
||||||
ext_gh)
|
ext_gh)
|
||||||
bash "$DOTFILES/scripts/install-gh-extensions" && msg_done "🎉 Done!"
|
bash "$DOTFILES/scripts/install-gh-extensions.sh" && msg_done "🎉 Extensions for GitHub CLI have been installed!"
|
||||||
|
;;
|
||||||
|
settler)
|
||||||
|
bash "$DOTFILES/scripts/settler.sh" && msg_done "🎉 Settler has been run!"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
menu_section "$USAGE_PREFIX" "all | antigen | defaults | ext_go | ext_gh"
|
menu_section "$USAGE_PREFIX" "all | antigen | brew | ext_gh | ext_go | macos | settler"
|
||||||
menu_item "all" "Runs the WIP settler.sh"
|
menu_item "all" "Installs antigen, macos, brew, ext_gh and ext_go"
|
||||||
menu_item "antigen" "Updates the antigen.zsh file"
|
menu_item "antigen" "Updates the antigen.zsh file"
|
||||||
menu_item "defaults" "Setup nice macOS defaults"
|
menu_item "brew" "Install Brewfile contents"
|
||||||
menu_item "ext_go" "Install Go Packages"
|
menu_item "ext_gh" "Install GitHub CLI Extensions"
|
||||||
menu_item "ext_gh" "Install GitHub CLI Extensions"
|
menu_item "ext_go" "Install Go Packages"
|
||||||
|
menu_item "macos" "Setup nice macOS defaults"
|
||||||
|
menu_item "settler" "Runs the WIP settler.sh"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@@ -58,21 +70,21 @@ function section_brew
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
install)
|
install)
|
||||||
brew bundle install --file="$BREWFILE"
|
brew bundle install --file="$BREWFILE" && msg_done "🎉 Done!"
|
||||||
echo "🎉 Done!"
|
|
||||||
;;
|
;;
|
||||||
update)
|
update)
|
||||||
brew update && brew outdated && brew upgrade && brew cleanup
|
brew update && brew outdated && brew upgrade && brew cleanup
|
||||||
echo "🎉 Done!"
|
msg_done "🎉 Done!"
|
||||||
;;
|
;;
|
||||||
updatebundle)
|
updatebundle)
|
||||||
# Updates .dotfiles/Brewfile with descriptions
|
# Updates .dotfiles/Brewfile with descriptions
|
||||||
brew bundle dump \
|
brew bundle dump \
|
||||||
--force \
|
--force \
|
||||||
--file="$BREWFILE" \
|
--file="$BREWFILE" \
|
||||||
--describe && msg_ok "🎉 Done!"
|
--describe && msg_done "🎉 Done!"
|
||||||
;;
|
;;
|
||||||
autoupdate)
|
autoupdate)
|
||||||
|
brew autoupdate delete
|
||||||
brew autoupdate start 43200 --upgrade --cleanup --immediate
|
brew autoupdate start 43200 --upgrade --cleanup --immediate
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@@ -91,36 +103,29 @@ function section_dotfiles
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
link)
|
link)
|
||||||
rcup -B "$HOSTNAME" -f -v && echo "🎉 Done!"
|
rcup -B "$HOSTNAME" -f -v && msg_done "🎉 dotfiles have been linked!"
|
||||||
;;
|
;;
|
||||||
update)
|
update)
|
||||||
# Updates .dotfiles/scripts/install.sh and formats it
|
# Updates .dotfiles/scripts/install.sh and formats it
|
||||||
rcup -B 0 -g \
|
rcup -B 0 -g \
|
||||||
| tee "$INSTALL_SCRIPT" 1> /dev/null \
|
| tee "$INSTALL_SCRIPT" 1> /dev/null \
|
||||||
&& sed -i '' "s|$HOME|\$HOME|g" "$INSTALL_SCRIPT"
|
&& sed -i '' "s|$HOME|\$HOME|g" "$INSTALL_SCRIPT" \
|
||||||
|
&& sed -i '' "s|install.sh|$(basename "$INSTALL_SCRIPT")|g" "$INSTALL_SCRIPT"
|
||||||
$0 dotfiles shfmt
|
$0 dotfiles shfmt
|
||||||
echo "🎉 Done!"
|
$0 dotfiles link
|
||||||
|
msg_done "🎉 dotfiles updated and linked!"
|
||||||
;;
|
;;
|
||||||
shfmt)
|
shfmt)
|
||||||
# Format shell scripts according to following rules.
|
# Format shell scripts according to following rules.
|
||||||
shfmt \
|
find "$DOTFILES" \
|
||||||
--find \
|
\( -name '*.sh' -or -name '*.zsh' -or -name 'x-*' -or -not '*.pl' \) \
|
||||||
--list \
|
-exec shfmt -fn -l -w -i 2 -ci -sr -bn {} \;
|
||||||
--write \
|
msg_done "🎉 dotfiles have been formatted!"
|
||||||
--diff \
|
|
||||||
--simplify \
|
|
||||||
--language-dialect bash \
|
|
||||||
--indent 2 \
|
|
||||||
--binary-next-line \
|
|
||||||
--case-indent \
|
|
||||||
--space-redirects \
|
|
||||||
--func-next-line \
|
|
||||||
"$DOTFILES"
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
menu_section "$USAGE_PREFIX" "link | update | shfmt"
|
menu_section "$USAGE_PREFIX" "link | update | shfmt"
|
||||||
menu_item "link" "Use rcrc to update dotfile links"
|
menu_item "link" "Use rcrc to update dotfile links"
|
||||||
menu_item "update" "Updates dotfile links, installs host specific overrides automatically"
|
menu_item "update" "Updates dotfile links (scripts/install.sh), formats it and runs it."
|
||||||
menu_item "shfmt" "Run shfmt to all dotfiles"
|
menu_item "shfmt" "Run shfmt to all dotfiles"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
82
local/bin/git-dirty
Executable file
82
local/bin/git-dirty
Executable file
@@ -0,0 +1,82 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Get git repository status for all subdirectories
|
||||||
|
# recursively in specified dir.
|
||||||
|
#
|
||||||
|
# Check the default dir:
|
||||||
|
# `git-dirty.sh`
|
||||||
|
# Check specific dir:
|
||||||
|
# `git-dirty.sh ~/Projects`
|
||||||
|
# Override default dir with env:
|
||||||
|
# `GIT_DIRTY_DIR=$HOME/Projects git-dirty.sh`
|
||||||
|
#
|
||||||
|
# If you want to skip directory from checks, just add `.ignore` file next
|
||||||
|
# to the `.git` folder. ProTip: Add `.ignore` to your global `.gitignore`.
|
||||||
|
#
|
||||||
|
# The script automatically skips folders:
|
||||||
|
# node_modules, vendor
|
||||||
|
#
|
||||||
|
# SET Defaults:
|
||||||
|
# Default dir to check, can be overridden in env (.bashrc, .zshrc, ...)
|
||||||
|
: "${GIT_DIRTY_DIR:=$HOME/Code}"
|
||||||
|
|
||||||
|
# If user has provided folder as a first argument, use it.
|
||||||
|
if [ "$1" != "" ]; then
|
||||||
|
GIT_DIRTY_DIR="$1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# UTF-8 ftw
|
||||||
|
GITDIRTY="❌ "
|
||||||
|
GITCLEAN="✅ "
|
||||||
|
|
||||||
|
catch()
|
||||||
|
{
|
||||||
|
echo "Error $1 occurred on $2"
|
||||||
|
}
|
||||||
|
|
||||||
|
gitdirty()
|
||||||
|
{
|
||||||
|
local d="$1"
|
||||||
|
trap 'catch $? $LINENO' ERR
|
||||||
|
|
||||||
|
if [[ -d "$d" ]]; then
|
||||||
|
if [[ -e "$d/.ignore" ]]; then
|
||||||
|
echo -e ""
|
||||||
|
else
|
||||||
|
# Check that $d is not '--', 'vendor', or 'node_modules'
|
||||||
|
if [[ "${d:0:2}" == "--" ]] || [[ "$d" == "vendor" ]] || [[ "$d" == "node_modules" ]]; then
|
||||||
|
echo ""
|
||||||
|
else
|
||||||
|
cd "$d" > /dev/null
|
||||||
|
|
||||||
|
# If we have `.git` folder, check it.
|
||||||
|
if [[ -d ".git" ]]; then
|
||||||
|
ISDIRTY=$(git diff --shortstat 2> /dev/null | tail -n1)
|
||||||
|
ICON="$GITCLEAN"
|
||||||
|
|
||||||
|
[[ $ISDIRTY != "" ]] && ICON="$GITDIRTY"
|
||||||
|
|
||||||
|
printf " %s %s\n" "$ICON" "$(pwd)"
|
||||||
|
else
|
||||||
|
# If it wasn't git repository, check subdirectories.
|
||||||
|
gitdirtyrepos -- *
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
cd .. > /dev/null
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
gitdirtyrepos()
|
||||||
|
{
|
||||||
|
for x in "$@"; do
|
||||||
|
gitdirty "$x"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
set -e
|
||||||
|
trap 'case $? in
|
||||||
|
139) echo "segfault occurred";;
|
||||||
|
11) echo "ssegfault occurred";;
|
||||||
|
esac' EXIT
|
||||||
|
|
||||||
|
gitdirtyrepos "$GIT_DIRTY_DIR"
|
||||||
@@ -20,9 +20,10 @@
|
|||||||
#
|
#
|
||||||
# Simple function to show usage information, and exit.
|
# Simple function to show usage information, and exit.
|
||||||
#
|
#
|
||||||
usage() {
|
usage()
|
||||||
echo "Usage: $0 [-d] [-p 443] domain1.org domain2.com .. domainN"
|
{
|
||||||
exit 0
|
echo "Usage: $0 [-d] [-p 443] domain1.org domain2.com .. domainN"
|
||||||
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -35,19 +36,19 @@ port=443
|
|||||||
# Parse the argument(s) - i.e. look for "-d" / "-p 443".
|
# Parse the argument(s) - i.e. look for "-d" / "-p 443".
|
||||||
#
|
#
|
||||||
while getopts "h?dp:" opt; do
|
while getopts "h?dp:" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
h)
|
h)
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
\?)
|
\?)
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
d)
|
d)
|
||||||
days=1
|
days=1
|
||||||
;;
|
;;
|
||||||
p)
|
p)
|
||||||
port=$OPTARG
|
port=$OPTARG
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift $((OPTIND - 1))
|
shift $((OPTIND - 1))
|
||||||
@@ -56,7 +57,7 @@ shift $((OPTIND - 1))
|
|||||||
# Ensure we have some arguments
|
# Ensure we have some arguments
|
||||||
#
|
#
|
||||||
if [ "$#" = "0" ]; then
|
if [ "$#" = "0" ]; then
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -64,70 +65,70 @@ fi
|
|||||||
#
|
#
|
||||||
for name in "$@"; do
|
for name in "$@"; do
|
||||||
|
|
||||||
#
|
#
|
||||||
# Make a temporary file
|
# Make a temporary file
|
||||||
#
|
#
|
||||||
# Test if we have BSD or GNU version of mktemp
|
# Test if we have BSD or GNU version of mktemp
|
||||||
if ( strings "$(which mktemp)" | grep -q GNU); then
|
if (strings "$(which mktemp)" | grep -q GNU); then
|
||||||
# We have the GNU version
|
# We have the GNU version
|
||||||
tmp=$(mktemp)
|
tmp=$(mktemp)
|
||||||
else
|
else
|
||||||
# We have the BSD version
|
# We have the BSD version
|
||||||
tmp=$(mktemp -t tmp)
|
tmp=$(mktemp -t tmp)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Download the certificate
|
# Download the certificate
|
||||||
#
|
#
|
||||||
if ( ! echo "" | openssl s_client -connect $name:$port > $tmp 2> /dev/null); then
|
if (! echo "" | openssl s_client -connect $name:$port > $tmp 2> /dev/null); then
|
||||||
echo "Failed to get cert from https://$name:$port/"
|
echo "Failed to get cert from https://$name:$port/"
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Get the expiry date
|
# Get the expiry date
|
||||||
#
|
#
|
||||||
date=$(openssl x509 -in "$tmp" -noout -enddate | awk -F= '{print $2}')
|
date=$(openssl x509 -in "$tmp" -noout -enddate | awk -F= '{print $2}')
|
||||||
|
|
||||||
#
|
#
|
||||||
# Remove the temporary file
|
# Remove the temporary file
|
||||||
#
|
#
|
||||||
rm -f "$tmp"
|
rm -f "$tmp"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Convert the expiry date + todays date to seconds-past epoch
|
# Convert the expiry date + todays date to seconds-past epoch
|
||||||
#
|
#
|
||||||
# Check if we have the BSD or the GNU version of date
|
# Check if we have the BSD or the GNU version of date
|
||||||
if (strings "$(which date)" | grep -q GNU); then
|
if (strings "$(which date)" | grep -q GNU); then
|
||||||
# We have GNU this is easy
|
# We have GNU this is easy
|
||||||
then=$(date --date "$date" +%s)
|
then=$(date --date "$date" +%s)
|
||||||
else
|
else
|
||||||
# We have BSD now it is getting complicated
|
# We have BSD now it is getting complicated
|
||||||
year=$(echo "$date" | awk '{print $4}')
|
year=$(echo "$date" | awk '{print $4}')
|
||||||
month=$(echo "$date" | awk '{print $1}')
|
month=$(echo "$date" | awk '{print $1}')
|
||||||
day=$(echo "$date" | awk '{print $2}')
|
day=$(echo "$date" | awk '{print $2}')
|
||||||
hour=$(echo "$date" | awk '{print $3}' | awk -F: '{print $1}')
|
hour=$(echo "$date" | awk '{print $3}' | awk -F: '{print $1}')
|
||||||
minute=$(echo "$date" | awk '{print $3}' | awk -F: '{print $2}')
|
minute=$(echo "$date" | awk '{print $3}' | awk -F: '{print $2}')
|
||||||
second=$(echo "$date" | awk '{print $3}' | awk -F: '{print $3}')
|
second=$(echo "$date" | awk '{print $3}' | awk -F: '{print $3}')
|
||||||
then=$(date -v${year}y -v${month} -v${day}d -v${hour}H -v${minute}M -v${second}S -u +%s)
|
then=$(date -v${year}y -v${month} -v${day}d -v${hour}H -v${minute}M -v${second}S -u +%s)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
now=$(date +%s)
|
now=$(date +%s)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Day diff
|
# Day diff
|
||||||
#
|
#
|
||||||
diff=$(("$then" - "$now"))
|
diff=$(("$then" - "$now"))
|
||||||
diff=$($diff / 86400)
|
diff=$($diff / 86400)
|
||||||
|
|
||||||
#
|
#
|
||||||
# All done
|
# All done
|
||||||
#
|
#
|
||||||
if [ "$days" = "1" ]; then
|
if [ "$days" = "1" ]; then
|
||||||
echo "${name}: ${diff}"
|
echo "${name}: ${diff}"
|
||||||
else
|
else
|
||||||
echo "$name"
|
echo "$name"
|
||||||
echo " Expires: ${date}"
|
echo " Expires: ${date}"
|
||||||
echo " Days: ${diff}"
|
echo " Days: ${diff}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -11,5 +11,5 @@
|
|||||||
# If the status code was zero then repeat.
|
# If the status code was zero then repeat.
|
||||||
#
|
#
|
||||||
while [ $? -eq 0 ]; do
|
while [ $? -eq 0 ]; do
|
||||||
"$@"
|
"$@"
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -26,5 +26,5 @@
|
|||||||
# If the status code was not zero then repeat.
|
# If the status code was not zero then repeat.
|
||||||
#
|
#
|
||||||
while [ $? -ne 0 ]; do
|
while [ $? -ne 0 ]; do
|
||||||
"$@"
|
"$@"
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
# Ensure we received the correct number of arguments.
|
# Ensure we received the correct number of arguments.
|
||||||
#
|
#
|
||||||
if [ $# -lt 2 ]; then
|
if [ $# -lt 2 ]; then
|
||||||
echo "Usage: $0 HOST COMMAND..."
|
echo "Usage: $0 HOST COMMAND..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
HOST=$1
|
HOST=$1
|
||||||
@@ -24,7 +24,7 @@ echo "Waiting for $HOST to get down..."
|
|||||||
|
|
||||||
true
|
true
|
||||||
while [ $? -ne 1 ]; do
|
while [ $? -ne 1 ]; do
|
||||||
ping -c 1 -W 1 $HOST > /dev/null
|
ping -c 1 -W 1 $HOST > /dev/null
|
||||||
done
|
done
|
||||||
|
|
||||||
shift
|
shift
|
||||||
|
|||||||
@@ -18,8 +18,8 @@
|
|||||||
# Ensure we received the correct number of arguments.
|
# Ensure we received the correct number of arguments.
|
||||||
#
|
#
|
||||||
if [ $# -lt 2 ]; then
|
if [ $# -lt 2 ]; then
|
||||||
echo "Usage: $0 HOST COMMAND..."
|
echo "Usage: $0 HOST COMMAND..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $1 = "ssh" ]; then
|
if [ $1 = "ssh" ]; then
|
||||||
@@ -32,8 +32,8 @@ echo "Waiting for $HOST to come online..."
|
|||||||
|
|
||||||
ping -c 1 -W 1 $HOST > /dev/null
|
ping -c 1 -W 1 $HOST > /dev/null
|
||||||
while [ $? -ne 0 ]; do
|
while [ $? -ne 0 ]; do
|
||||||
sleep 1
|
sleep 1
|
||||||
ping -c 1 -W 1 $HOST > /dev/null
|
ping -c 1 -W 1 $HOST > /dev/null
|
||||||
done
|
done
|
||||||
|
|
||||||
# By the time we reach here the ping-command has completed successfully
|
# By the time we reach here the ping-command has completed successfully
|
||||||
|
|||||||
2
rcrc
2
rcrc
@@ -1,2 +1,2 @@
|
|||||||
EXCLUDES="*.md *.sh *.lock.json Brewfile scripts"
|
EXCLUDES="*.md *.sh *.lock.json Brewfile scripts *-secret xbar .github"
|
||||||
HOSTNAME=$(hostname -s)
|
HOSTNAME=$(hostname -s)
|
||||||
|
|||||||
180
scripts/install-dotfiles.sh
Normal file
180
scripts/install-dotfiles.sh
Normal file
@@ -0,0 +1,180 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# sh install-dotfiles.sh
|
||||||
|
#
|
||||||
|
# Environment variables: VERBOSE, CP, LN, MKDIR, RM, DIRNAME.
|
||||||
|
#
|
||||||
|
# env VERBOSE=1 sh install-dotfiles.sh
|
||||||
|
#
|
||||||
|
# DO NOT EDIT THIS FILE
|
||||||
|
#
|
||||||
|
# This file is generated by rcm(7) as:
|
||||||
|
#
|
||||||
|
# rcup -B 0 -g
|
||||||
|
#
|
||||||
|
# To update it, re-run the above command.
|
||||||
|
#
|
||||||
|
: ${VERBOSE:=0}
|
||||||
|
: ${CP:=/bin/cp}
|
||||||
|
: ${LN:=/bin/ln}
|
||||||
|
: ${MKDIR:=/bin/mkdir}
|
||||||
|
: ${RM:=/bin/rm}
|
||||||
|
: ${DIRNAME:=/usr/bin/dirname}
|
||||||
|
verbose() {
|
||||||
|
if [ "$VERBOSE" -gt 0 ]; then
|
||||||
|
echo "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
handle_file_cp() {
|
||||||
|
if [ -e "$2" ]; then
|
||||||
|
printf "%s " "overwrite $2? [yN]"
|
||||||
|
read overwrite
|
||||||
|
case "$overwrite" in
|
||||||
|
y)
|
||||||
|
$RM -rf "$2"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "skipping $2"
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
verbose "'$1' -> '$2'"
|
||||||
|
$MKDIR -p "$($DIRNAME "$2")"
|
||||||
|
$CP -R "$1" "$2"
|
||||||
|
}
|
||||||
|
handle_file_ln() {
|
||||||
|
if [ -e "$2" ]; then
|
||||||
|
printf "%s " "overwrite $2? [yN]"
|
||||||
|
read overwrite
|
||||||
|
case "$overwrite" in
|
||||||
|
y)
|
||||||
|
$RM -rf "$2"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "skipping $2"
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
verbose "'$1' -> '$2'"
|
||||||
|
$MKDIR -p "$($DIRNAME "$2")"
|
||||||
|
$LN -sf "$1" "$2"
|
||||||
|
}
|
||||||
|
handle_file_ln "$HOME/.dotfiles/bash_profile" "$HOME/.bash_profile"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/bashrc" "$HOME/.bashrc"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/alias" "$HOME/.config/alias"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/exports" "$HOME/.config/exports"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/flipperdevices.com/qFlipper.ini" "$HOME/.config/flipperdevices.com/qFlipper.ini"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/functions" "$HOME/.config/functions"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/gh/config.yml" "$HOME/.config/gh/config.yml"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/git/config" "$HOME/.config/git/config"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/git/gitignore" "$HOME/.config/git/gitignore"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/LICENSE" "$HOME/.config/nvim/LICENSE"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/colors/default_theme.lua" "$HOME/.config/nvim/colors/default_theme.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/config.ld" "$HOME/.config/nvim/config.ld"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/init.lua" "$HOME/.config/nvim/init.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/Comment.lua" "$HOME/.config/nvim/lua/configs/Comment.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/aerial.lua" "$HOME/.config/nvim/lua/configs/aerial.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/alpha.lua" "$HOME/.config/nvim/lua/configs/alpha.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/autopairs.lua" "$HOME/.config/nvim/lua/configs/autopairs.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/better_escape.lua" "$HOME/.config/nvim/lua/configs/better_escape.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/bufferline.lua" "$HOME/.config/nvim/lua/configs/bufferline.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/cmp.lua" "$HOME/.config/nvim/lua/configs/cmp.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/colorizer.lua" "$HOME/.config/nvim/lua/configs/colorizer.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/dap.lua" "$HOME/.config/nvim/lua/configs/dap.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/dapui.lua" "$HOME/.config/nvim/lua/configs/dapui.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/dressing.lua" "$HOME/.config/nvim/lua/configs/dressing.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/gitsigns.lua" "$HOME/.config/nvim/lua/configs/gitsigns.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/heirline.lua" "$HOME/.config/nvim/lua/configs/heirline.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/indent-line.lua" "$HOME/.config/nvim/lua/configs/indent-line.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/indent-o-matic.lua" "$HOME/.config/nvim/lua/configs/indent-o-matic.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/lspconfig.lua" "$HOME/.config/nvim/lua/configs/lspconfig.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/lspkind.lua" "$HOME/.config/nvim/lua/configs/lspkind.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/luasnip.lua" "$HOME/.config/nvim/lua/configs/luasnip.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/mason-lspconfig.lua" "$HOME/.config/nvim/lua/configs/mason-lspconfig.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/mason-null-ls.lua" "$HOME/.config/nvim/lua/configs/mason-null-ls.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/mason-nvim-dap.lua" "$HOME/.config/nvim/lua/configs/mason-nvim-dap.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/mason.lua" "$HOME/.config/nvim/lua/configs/mason.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/neo-tree.lua" "$HOME/.config/nvim/lua/configs/neo-tree.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/notify.lua" "$HOME/.config/nvim/lua/configs/notify.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/null-ls.lua" "$HOME/.config/nvim/lua/configs/null-ls.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/nvim-web-devicons.lua" "$HOME/.config/nvim/lua/configs/nvim-web-devicons.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/server-settings/jsonls.lua" "$HOME/.config/nvim/lua/configs/server-settings/jsonls.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/server-settings/sumneko_lua.lua" "$HOME/.config/nvim/lua/configs/server-settings/sumneko_lua.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/session_manager.lua" "$HOME/.config/nvim/lua/configs/session_manager.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/smart-splits.lua" "$HOME/.config/nvim/lua/configs/smart-splits.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/telescope.lua" "$HOME/.config/nvim/lua/configs/telescope.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/toggleterm.lua" "$HOME/.config/nvim/lua/configs/toggleterm.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/treesitter.lua" "$HOME/.config/nvim/lua/configs/treesitter.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/which-key-register.lua" "$HOME/.config/nvim/lua/configs/which-key-register.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/which-key.lua" "$HOME/.config/nvim/lua/configs/which-key.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/configs/window-picker.lua" "$HOME/.config/nvim/lua/configs/window-picker.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/autocmds.lua" "$HOME/.config/nvim/lua/core/autocmds.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/bootstrap.lua" "$HOME/.config/nvim/lua/core/bootstrap.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/diagnostics.lua" "$HOME/.config/nvim/lua/core/diagnostics.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/icons/nerd_font.lua" "$HOME/.config/nvim/lua/core/icons/nerd_font.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/icons/text.lua" "$HOME/.config/nvim/lua/core/icons/text.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/mappings.lua" "$HOME/.config/nvim/lua/core/mappings.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/options.lua" "$HOME/.config/nvim/lua/core/options.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/plugins.lua" "$HOME/.config/nvim/lua/core/plugins.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/git.lua" "$HOME/.config/nvim/lua/core/utils/git.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/init.lua" "$HOME/.config/nvim/lua/core/utils/init.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/lsp.lua" "$HOME/.config/nvim/lua/core/utils/lsp.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/mason.lua" "$HOME/.config/nvim/lua/core/utils/mason.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/status.lua" "$HOME/.config/nvim/lua/core/utils/status.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/ui.lua" "$HOME/.config/nvim/lua/core/utils/ui.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/updater.lua" "$HOME/.config/nvim/lua/core/utils/updater.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/base.lua" "$HOME/.config/nvim/lua/default_theme/base.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/colors.lua" "$HOME/.config/nvim/lua/default_theme/colors.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/init.lua" "$HOME/.config/nvim/lua/default_theme/init.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/lsp.lua" "$HOME/.config/nvim/lua/default_theme/lsp.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/aerial.lua" "$HOME/.config/nvim/lua/default_theme/plugins/aerial.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/beacon.lua" "$HOME/.config/nvim/lua/default_theme/plugins/beacon.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/bufferline.lua" "$HOME/.config/nvim/lua/default_theme/plugins/bufferline.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/cmp.lua" "$HOME/.config/nvim/lua/default_theme/plugins/cmp.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/dapui.lua" "$HOME/.config/nvim/lua/default_theme/plugins/dapui.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/dashboard.lua" "$HOME/.config/nvim/lua/default_theme/plugins/dashboard.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/gitsigns.lua" "$HOME/.config/nvim/lua/default_theme/plugins/gitsigns.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/highlighturl.lua" "$HOME/.config/nvim/lua/default_theme/plugins/highlighturl.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/hop.lua" "$HOME/.config/nvim/lua/default_theme/plugins/hop.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/indent_blankline.lua" "$HOME/.config/nvim/lua/default_theme/plugins/indent_blankline.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/lightspeed.lua" "$HOME/.config/nvim/lua/default_theme/plugins/lightspeed.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/neo-tree.lua" "$HOME/.config/nvim/lua/default_theme/plugins/neo-tree.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/notify.lua" "$HOME/.config/nvim/lua/default_theme/plugins/notify.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/nvim-tree.lua" "$HOME/.config/nvim/lua/default_theme/plugins/nvim-tree.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/nvim-web-devicons.lua" "$HOME/.config/nvim/lua/default_theme/plugins/nvim-web-devicons.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/rainbow.lua" "$HOME/.config/nvim/lua/default_theme/plugins/rainbow.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/symbols_outline.lua" "$HOME/.config/nvim/lua/default_theme/plugins/symbols_outline.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/telescope.lua" "$HOME/.config/nvim/lua/default_theme/plugins/telescope.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/treesitter.lua" "$HOME/.config/nvim/lua/default_theme/plugins/treesitter.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/vimwiki.lua" "$HOME/.config/nvim/lua/default_theme/plugins/vimwiki.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/default_theme/plugins/which-key.lua" "$HOME/.config/nvim/lua/default_theme/plugins/which-key.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/user_example/init.lua" "$HOME/.config/nvim/lua/user_example/init.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/packer_snapshot" "$HOME/.config/nvim/packer_snapshot"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/starship.toml" "$HOME/.config/starship.toml"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/tmux/tmux.conf" "$HOME/.config/tmux/tmux.conf"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/wtf/config.yml" "$HOME/.config/wtf/config.yml"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/ecrc" "$HOME/.ecrc"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/git_profiles" "$HOME/.git_profiles"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/huskyrc" "$HOME/.huskyrc"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/local/bin/antigen.zsh" "$HOME/.local/bin/antigen.zsh"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/local/bin/dfm" "$HOME/.local/bin/dfm"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/local/bin/git-dirty" "$HOME/.local/bin/git-dirty"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/local/bin/x-check-git-attributes" "$HOME/.local/bin/x-check-git-attributes"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/local/bin/x-dupes.pl" "$HOME/.local/bin/x-dupes.pl"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/local/bin/x-foreach" "$HOME/.local/bin/x-foreach"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/local/bin/x-multi-ping.pl" "$HOME/.local/bin/x-multi-ping.pl"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/local/bin/x-open-ports" "$HOME/.local/bin/x-open-ports"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/local/bin/x-ssl-expiry-date" "$HOME/.local/bin/x-ssl-expiry-date"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/local/bin/x-until-error" "$HOME/.local/bin/x-until-error"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/local/bin/x-until-success" "$HOME/.local/bin/x-until-success"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/local/bin/x-when-down" "$HOME/.local/bin/x-when-down"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/local/bin/x-when-up" "$HOME/.local/bin/x-when-up"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/rcrc" "$HOME/.rcrc"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/ssh/allowed_signers" "$HOME/.ssh/allowed_signers"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/ssh/config" "$HOME/.ssh/config"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/vuerc" "$HOME/.vuerc"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/zshrc" "$HOME/.zshrc"
|
||||||
@@ -1,96 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
#
|
|
||||||
# sh install.sh
|
|
||||||
#
|
|
||||||
# Environment variables: VERBOSE, CP, LN, MKDIR, RM, DIRNAME.
|
|
||||||
#
|
|
||||||
# env VERBOSE=1 sh install.sh
|
|
||||||
#
|
|
||||||
# DO NOT EDIT THIS FILE
|
|
||||||
#
|
|
||||||
# This file is generated by rcm(7) as:
|
|
||||||
#
|
|
||||||
# rcup -B 0 -g
|
|
||||||
#
|
|
||||||
# To update it, re-run the above command.
|
|
||||||
#
|
|
||||||
: ${VERBOSE:=0}
|
|
||||||
: ${CP:=/bin/cp}
|
|
||||||
: ${LN:=/bin/ln}
|
|
||||||
: ${MKDIR:=/bin/mkdir}
|
|
||||||
: ${RM:=/bin/rm}
|
|
||||||
: ${DIRNAME:=/usr/bin/dirname}
|
|
||||||
verbose()
|
|
||||||
{
|
|
||||||
if [ "$VERBOSE" -gt 0 ]; then
|
|
||||||
echo "$@"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
handle_file_cp()
|
|
||||||
{
|
|
||||||
if [ -e "$2" ]; then
|
|
||||||
printf "%s " "overwrite $2? [yN]"
|
|
||||||
read overwrite
|
|
||||||
case "$overwrite" in
|
|
||||||
y)
|
|
||||||
$RM -rf "$2"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "skipping $2"
|
|
||||||
return
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
verbose "'$1' -> '$2'"
|
|
||||||
$MKDIR -p "$($DIRNAME "$2")"
|
|
||||||
$CP -R "$1" "$2"
|
|
||||||
}
|
|
||||||
handle_file_ln()
|
|
||||||
{
|
|
||||||
if [ -e "$2" ]; then
|
|
||||||
printf "%s " "overwrite $2? [yN]"
|
|
||||||
read overwrite
|
|
||||||
case "$overwrite" in
|
|
||||||
y)
|
|
||||||
$RM -rf "$2"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "skipping $2"
|
|
||||||
return
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
verbose "'$1' -> '$2'"
|
|
||||||
$MKDIR -p "$($DIRNAME "$2")"
|
|
||||||
$LN -sf "$1" "$2"
|
|
||||||
}
|
|
||||||
handle_file_ln "$HOME/.dotfiles/bash_profile" "$HOME/.bash_profile"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/bashrc" "$HOME/.bashrc"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/alias" "$HOME/.config/alias"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/exports" "$HOME/.config/exports"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/functions" "$HOME/.config/functions"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/gh/config.yml" "$HOME/.config/gh/config.yml"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/git/config" "$HOME/.config/git/config"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/git/gitignore" "$HOME/.config/git/gitignore"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/wtf/config.yml" "$HOME/.config/wtf/config.yml"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/git_profiles" "$HOME/.git_profiles"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/huskyrc" "$HOME/.huskyrc"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/antigen.zsh" "$HOME/.local/bin/antigen.zsh"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/dfm" "$HOME/.local/bin/dfm"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-check-git-attributes" "$HOME/.local/bin/x-check-git-attributes"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-dupes" "$HOME/.local/bin/x-dupes"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-foreach" "$HOME/.local/bin/x-foreach"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-multi-ping" "$HOME/.local/bin/x-multi-ping"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-open-ports" "$HOME/.local/bin/x-open-ports"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-ssl-expiry-date" "$HOME/.local/bin/x-ssl-expiry-date"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-until-error" "$HOME/.local/bin/x-until-error"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-until-success" "$HOME/.local/bin/x-until-success"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-when-down" "$HOME/.local/bin/x-when-down"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-when-up" "$HOME/.local/bin/x-when-up"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/rcrc" "$HOME/.rcrc"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/ssh/allowed_signers" "$HOME/.ssh/allowed_signers"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/ssh/config" "$HOME/.ssh/config"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/vuerc" "$HOME/.vuerc"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/zshrc" "$HOME/.zshrc"
|
|
||||||
@@ -12,77 +12,102 @@ CLR_BLUE='\033[1;34m'
|
|||||||
CLR_RESET="\033[0m"
|
CLR_RESET="\033[0m"
|
||||||
|
|
||||||
# -- Helpers -- #
|
# -- Helpers -- #
|
||||||
function __log_marker() {
|
function __log_marker()
|
||||||
|
{
|
||||||
echo -e "${CLR_BLUE}➜${CLR_RESET}"
|
echo -e "${CLR_BLUE}➜${CLR_RESET}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function __log_marker_ok() {
|
function __log_marker_ok()
|
||||||
|
{
|
||||||
echo -e "${CLR_GREEN}✔${CLR_RESET}"
|
echo -e "${CLR_GREEN}✔${CLR_RESET}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function __log_marker_ok_blue() {
|
function __log_marker_ok_blue()
|
||||||
|
{
|
||||||
echo -e "${CLR_BLUE}✔${CLR_RESET}"
|
echo -e "${CLR_BLUE}✔${CLR_RESET}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function __log_marker_warn() {
|
function __log_marker_warn()
|
||||||
|
{
|
||||||
echo -e "${CLR_YELLOW}⁕${CLR_RESET}"
|
echo -e "${CLR_YELLOW}⁕${CLR_RESET}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function __log_marker_err() {
|
function __log_marker_err()
|
||||||
|
{
|
||||||
echo -e "${CLR_RED}⛌${CLR_RESET}"
|
echo -e "${CLR_RED}⛌${CLR_RESET}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function __log_indent() {
|
function __log_indent()
|
||||||
|
{
|
||||||
echo " "
|
echo " "
|
||||||
}
|
}
|
||||||
|
|
||||||
# -- Log -- #
|
# -- Log -- #
|
||||||
function msg() {
|
function msg()
|
||||||
|
{
|
||||||
echo -e "$(__log_marker) $1"
|
echo -e "$(__log_marker) $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_done() {
|
function msg_done()
|
||||||
|
{
|
||||||
echo -e "$(__log_marker) $1 ...$(__log_marker_ok)"
|
echo -e "$(__log_marker) $1 ...$(__log_marker_ok)"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_prompt() {
|
function msg_prompt()
|
||||||
|
{
|
||||||
echo -e "$(__log_marker) $1"
|
echo -e "$(__log_marker) $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_prompt_done() {
|
function msg_prompt_done()
|
||||||
|
{
|
||||||
echo -e "$(__log_marker) $1 ...$(__log_marker_ok)"
|
echo -e "$(__log_marker) $1 ...$(__log_marker_ok)"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_nested() {
|
function msg_nested()
|
||||||
|
{
|
||||||
echo -e "$(__log_indent)$(__log_marker) $1"
|
echo -e "$(__log_indent)$(__log_marker) $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_nested_done() {
|
function msg_nested_done()
|
||||||
|
{
|
||||||
echo -e "$(__log_indent)$(__log_marker) $1 ...$(__log_marker_ok)"
|
echo -e "$(__log_indent)$(__log_marker) $1 ...$(__log_marker_ok)"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_run() {
|
function msg_run()
|
||||||
|
{
|
||||||
echo -e "${CLR_GREEN}➜ $1${CLR_RESET} $2"
|
echo -e "${CLR_GREEN}➜ $1${CLR_RESET} $2"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_ok() {
|
function msg_ok()
|
||||||
|
{
|
||||||
echo -e "$(__log_marker_ok) $1"
|
echo -e "$(__log_marker_ok) $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_warn() {
|
function msg_warn()
|
||||||
|
{
|
||||||
echo -e "$(__log_marker_warn) $1"
|
echo -e "$(__log_marker_warn) $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_err() {
|
function msg_err()
|
||||||
|
{
|
||||||
echo -e "$(__log_marker_err) $1"
|
echo -e "$(__log_marker_err) $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
# -- Menu builder -- #
|
# -- Menu builder -- #
|
||||||
function menu_section() {
|
function menu_section()
|
||||||
|
{
|
||||||
LINE=$(printf '%-18s [ %-15s ]\n' "$1" "$2")
|
LINE=$(printf '%-18s [ %-15s ]\n' "$1" "$2")
|
||||||
echo -e " $(__log_marker) $LINE"
|
echo -e " $(__log_marker) $LINE"
|
||||||
}
|
}
|
||||||
function menu_item() {
|
function menu_item()
|
||||||
|
{
|
||||||
LINE=$(printf '%-15s %-30s\n' "$1" "$2")
|
LINE=$(printf '%-15s %-30s\n' "$1" "$2")
|
||||||
echo -e "$(__log_indent)$(__log_marker) $LINE"
|
echo -e "$(__log_indent)$(__log_marker) $LINE"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# https://stackoverflow.com/a/85932
|
||||||
|
function fn_exists()
|
||||||
|
{
|
||||||
|
declare -f -F "$1" > /dev/null
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
|||||||
16
ssh/config
16
ssh/config
@@ -1,2 +1,16 @@
|
|||||||
|
Host github.com
|
||||||
|
User git
|
||||||
|
HostName github.com
|
||||||
|
IdentityFile ~/.ssh/id_rsa
|
||||||
|
|
||||||
|
Host bitbucket.com
|
||||||
|
Hostname bitbucket.com
|
||||||
|
IdentityFile ~/.ssh/id_rsa
|
||||||
|
|
||||||
|
Host gitlab.com
|
||||||
|
Hostname gitlab.com
|
||||||
|
IdentityFile ~/.ssh/id_rsa
|
||||||
|
|
||||||
Host *
|
Host *
|
||||||
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
||||||
|
|
||||||
|
|||||||
3
vuerc
3
vuerc
@@ -20,4 +20,5 @@
|
|||||||
"cssPreprocessor": "dart-sass"
|
"cssPreprocessor": "dart-sass"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
37
zshrc
37
zshrc
@@ -5,7 +5,16 @@
|
|||||||
autoload -U colors zsh/terminfo
|
autoload -U colors zsh/terminfo
|
||||||
colors
|
colors
|
||||||
|
|
||||||
export PATH="/opt/homebrew/bin:/usr/local/sbin:$PATH"
|
export HOMEBREW="/opt/homebrew"
|
||||||
|
export DOTFILES="$HOME/.dotfiles"
|
||||||
|
export PATH="$HOMEBREW/opt/ruby/bin:$HOMEBREW/bin:$HOMEBREW/sbin:/usr/local/sbin:$PATH"
|
||||||
|
export HOMEBREW_NO_ENV_HINTS=1
|
||||||
|
|
||||||
|
# Explicitely set XDG folders
|
||||||
|
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||||
|
export XDG_DATA_HOME="$HOME/.local/share"
|
||||||
|
export XDG_CONFIG_HOME="$HOME/.config"
|
||||||
|
export XDG_STATE_HOME="$HOME/.local/state"
|
||||||
|
|
||||||
if [ command -v brew &> /dev/null ]; then
|
if [ command -v brew &> /dev/null ]; then
|
||||||
BREW_BIN=$(brew --prefix)/bin
|
BREW_BIN=$(brew --prefix)/bin
|
||||||
@@ -27,6 +36,10 @@ if command -v go &> /dev/null; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if command -v nvim &> /dev/null; then
|
||||||
|
export EDITOR="nvim"
|
||||||
|
fi
|
||||||
|
|
||||||
LOCAL_BIN="$HOME/.local/bin"
|
LOCAL_BIN="$HOME/.local/bin"
|
||||||
COMPOSER_DIR="$HOME/.composer/vendor/bin"
|
COMPOSER_DIR="$HOME/.composer/vendor/bin"
|
||||||
export PATH="$LOCAL_BIN:$COMPOSER_DIR:$PATH"
|
export PATH="$LOCAL_BIN:$COMPOSER_DIR:$PATH"
|
||||||
@@ -44,7 +57,9 @@ function x-load-configs()
|
|||||||
# Load the shell dotfiles, and then some:
|
# Load the shell dotfiles, and then some:
|
||||||
for file in ~/.dotfiles/config/{exports,alias,functions}; do
|
for file in ~/.dotfiles/config/{exports,alias,functions}; do
|
||||||
[ -r "$file" ] && [ -f "$file" ] && source "$file"
|
[ -r "$file" ] && [ -f "$file" ] && source "$file"
|
||||||
|
[ -r "$file-secret" ] && [ -f "$file-secret" ] && source "$file-secret"
|
||||||
[ -r "$file-$HOSTNAME" ] && [ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
[ -r "$file-$HOSTNAME" ] && [ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
||||||
|
[ -r "$file-$HOSTNAME-secret" ] && [ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
x-load-configs
|
x-load-configs
|
||||||
@@ -59,7 +74,7 @@ ssh-add -A 2>/dev/null;
|
|||||||
if command -v antigen &> /dev/null; then
|
if command -v antigen &> /dev/null; then
|
||||||
antigen use oh-my-zsh
|
antigen use oh-my-zsh
|
||||||
|
|
||||||
antigen theme oskarkrawczyk/honukai-iterm-zsh honukai
|
# antigen theme oskarkrawczyk/honukai-iterm-zsh honukai
|
||||||
|
|
||||||
antigen bundle ssh-agent
|
antigen bundle ssh-agent
|
||||||
antigen bundle colored-man-pages
|
antigen bundle colored-man-pages
|
||||||
@@ -68,14 +83,14 @@ if command -v antigen &> /dev/null; then
|
|||||||
antigen bundle zsh-users/zsh-completions
|
antigen bundle zsh-users/zsh-completions
|
||||||
antigen bundle MichaelAquilina/zsh-you-should-use
|
antigen bundle MichaelAquilina/zsh-you-should-use
|
||||||
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
||||||
|
antigen bundle Sparragus/zsh-auto-nvm-use
|
||||||
# antigen bundle git-auto-fetch
|
# antigen bundle git-auto-fetch
|
||||||
|
|
||||||
hash php 2>/dev/null && antigen bundle php
|
hash php 2>/dev/null && antigen bundle php
|
||||||
hash nvm 2>/dev/null && antigen bundle nvm
|
hash nvm 2>/dev/null && antigen bundle nvm
|
||||||
hash docker 2>/dev/null && antigen bundle docker
|
hash docker 2>/dev/null && antigen bundle docker
|
||||||
|
# hash ruby 2>/dev/null && antigen bundle ruby
|
||||||
hash nvm 2>/dev/null && antigen bundle Sparragus/zsh-auto-nvm-use
|
# hash python 2>/dev/null && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
|
||||||
hash python 2>/dev/null && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
|
|
||||||
hash jq 2>/dev/null && antigen bundle reegnz/jq-zsh-plugin
|
hash jq 2>/dev/null && antigen bundle reegnz/jq-zsh-plugin
|
||||||
hash docker-compose 2>/dev/null && antigen bundle sroze/docker-compose-zsh-plugin
|
hash docker-compose 2>/dev/null && antigen bundle sroze/docker-compose-zsh-plugin
|
||||||
# antigen bundle voronkovich/phpcs.plugin.zsh
|
# antigen bundle voronkovich/phpcs.plugin.zsh
|
||||||
@@ -102,11 +117,13 @@ if hash op 2>/dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# gcloud is present
|
# gcloud is present
|
||||||
if hash gcloud 2>/dev/null; then
|
#if hash gcloud 2>/dev/null; then
|
||||||
GCLOUD_LOC=$(gcloud info --format="value(installation.sdk_root)" --quiet)
|
# GCLOUD_LOC=$(gcloud info --format="value(installation.sdk_root)" --quiet)
|
||||||
[[ -f "$GCLOUD_LOC/path.zsh.inc" ]] && builtin source "$GCLOUD_LOC/path.zsh.inc"
|
# [[ -f "$GCLOUD_LOC/path.zsh.inc" ]] && builtin source "$GCLOUD_LOC/path.zsh.inc"
|
||||||
[[ -f "$GCLOUD_LOC/completion.zsh.inc" ]] && builtin source "$GCLOUD_LOC/completion.zsh.inc"
|
# [[ -f "$GCLOUD_LOC/completion.zsh.inc" ]] && builtin source "$GCLOUD_LOC/completion.zsh.inc"
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
|
eval "$(starship init zsh)"
|
||||||
|
|
||||||
# Fig post block. Keep at the bottom of this file.
|
# Fig post block. Keep at the bottom of this file.
|
||||||
[[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.post.zsh"
|
[[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.post.zsh"
|
||||||
|
|||||||
Reference in New Issue
Block a user