mirror of
https://github.com/1xtier/.dotfiles.git
synced 2026-03-17 02:47:56 +00:00
macos
This commit is contained in:
68
macos/.zshrc
68
macos/.zshrc
@@ -5,10 +5,13 @@
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
|
||||
# Configure PATH
|
||||
export PATH=/opt/homebrew/bin:$HOME/.local/bin:$HOME/.dotfiles/sh:$HOME/go/bin:$PATH
|
||||
export PATH=$PATH:/opt/homebrew/bin:/Users/h0lik/.local/bin:$HOME/.dotfiles/sh:$HOME/go/bin:/opt/homebrew/opt/ruby/bin
|
||||
export PKG_CONFIG_PATH="/opt/homebrew/opt/ruby/lib/pkgconfig"
|
||||
export LDFLAGS="-L/opt/homebrew/opt/ruby/lib"
|
||||
export CPPFLAGS="-I/opt/homebrew/opt/ruby/include"
|
||||
# Editor
|
||||
export EDITOR="/usr/bin/nvim"
|
||||
export ANSIBLE_CONFIG="$HOME/ansible/ansible.cfg"
|
||||
export ANSIBLE_CONFIG="/Users/h0lik/ansible/ansible.cfg"
|
||||
# Configurate remote docker host
|
||||
export DOCKER_HOST=tcp://192.168.19.244:2376
|
||||
export DOCKER_CERT_PATH="$HOME/.docker/cert-for-docker"
|
||||
@@ -18,65 +21,21 @@ export NACKER_ANSIBLE_PATH=$HOME/ansible
|
||||
export NACKER_TERRAFROM_PATH=$HOME/terraform
|
||||
export NACKER_DOTFILES_PATH=$HOME/.dotfiles
|
||||
export NACKER_PROJECT_PATH=$HOME/dev
|
||||
|
||||
eval "$(rbenv init -)"
|
||||
#
|
||||
ZSH_THEME="nacker"
|
||||
plugins=(git docker vscode zsh-autosuggestions zsh-syntax-highlighting)
|
||||
plugins=(git ansible docker vscode zsh-autosuggestions zsh-syntax-highlighting)
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
# Configure bat Replacement cat tail less > bat
|
||||
if [[ -e $(which batcat) ]]; then
|
||||
export bat="batcat"
|
||||
alias bat="batcat"
|
||||
elif [[ -e $(which bat) ]]; then
|
||||
export bat="bat"
|
||||
fi
|
||||
if [[ -n $bat ]]; then
|
||||
export COLORTERM="truecolor"
|
||||
export BAT_THEME="Monokai Extended Origin"
|
||||
export MANPAGER="sh -c 'col -bx | $bat --language=man --style=plain'"
|
||||
export MANROFFOPT="-c"
|
||||
alias cat="$bat --style=plain --paging=never"
|
||||
alias less="$bat --paging=always"
|
||||
if [[ $SHELL == *zsh ]]; then
|
||||
alias -g -- --help='--help 2>&1 | $bat --language=help --style=plain'
|
||||
fi
|
||||
help() { "$@" --help 2>&1 | $bat --language=help --style=plain; }
|
||||
tailf() { tail -f "$@" | $bat --paging=never --language=log; }
|
||||
batdiff() { git diff --name-only --relative --diff-filter=d | xargs $bat --diff; }
|
||||
fi
|
||||
|
||||
|
||||
lori() {
|
||||
local lori_name="${1}"
|
||||
typeset -A lori_list
|
||||
|
||||
|
||||
lori_list=(
|
||||
disk_size "df -h"
|
||||
)
|
||||
|
||||
if [[ -z ${lori_list[$lori_name]} || -z "$lori_name" || "$lori_name" == "-h" ]]; then
|
||||
echo "AVAILABLE COMMANDS:\n"
|
||||
printf "%-20s %s\n" "command"
|
||||
echo "----------------------"
|
||||
for key in "${(@k)lori_list}"; do
|
||||
printf "%-20s %s\n" "$key" "${lori_list[$key]}"
|
||||
done | sort
|
||||
return 0
|
||||
else
|
||||
print -zr "${lori_list[$lori_name]}"
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
_lori_completion() {
|
||||
local -a keys
|
||||
keys=($(lori -h | awk 'NR>4 {print $1}'))
|
||||
compadd "$@" -- "${keys[@]}"
|
||||
}
|
||||
compdef _lori_completion lori
|
||||
# Configire custom aliases
|
||||
alias kp="/Applications/KeePassXC.app/Contents/MacOS/keepassxc-cli"
|
||||
if [ -f ~/.dotfiles/macos/zsh_aliases ]; then
|
||||
. ~/.dotfiles/macos/zsh_aliases
|
||||
fi
|
||||
if [ -f ~/.dotfiles/macos/rc_lib ]; then
|
||||
. ~/.dotfiles/macos/rc_lib
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@@ -90,3 +49,6 @@ function color {
|
||||
}
|
||||
|
||||
color
|
||||
|
||||
autoload -U +X bashcompinit && bashcompinit
|
||||
complete -o nospace -C /Users/h0lik/.local/bin/terraform terraform
|
||||
|
||||
@@ -5,11 +5,11 @@ padding.x = 20
|
||||
padding.y = 20
|
||||
[general]
|
||||
import = [
|
||||
"~/.config/alacritty/themes/themes/gruvbox_dark.toml"
|
||||
"~/.config/alacritty/themes/themes/nackerthemes.toml"
|
||||
]
|
||||
#decorations = "Buttonless"
|
||||
#opacity = 0.92
|
||||
#blur = true
|
||||
[font]
|
||||
normal.family = "DaddyTimeMono Nerd Font Mono"
|
||||
size = 14.0
|
||||
normal.family = "CodeNewRoman Nerd Font Mono"
|
||||
size = 14.5
|
||||
|
||||
BIN
macos/kitty/bg-blurred.png
Normal file
BIN
macos/kitty/bg-blurred.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 346 KiB |
72
macos/kitty/current-theme.conf
Normal file
72
macos/kitty/current-theme.conf
Normal file
@@ -0,0 +1,72 @@
|
||||
## name: Alabaster Dark
|
||||
## author: Nikita Prokopov
|
||||
## license: MIT
|
||||
## upstream: https://raw.githubusercontent.com/anmolmathias/kitty-alabaster/master/alabaster-dark.conf
|
||||
## blurb: A dark color scheme adapted from Alabaster for the kitty terminal.
|
||||
|
||||
#: The basic colors
|
||||
|
||||
foreground #cecece
|
||||
background #0e1415
|
||||
|
||||
selection_foreground #cecece
|
||||
selection_background #293334
|
||||
|
||||
|
||||
#: Cursor colors
|
||||
|
||||
cursor #cd974b
|
||||
cursor_text_color #000000
|
||||
|
||||
|
||||
#: URL underline color when hovering with mouse
|
||||
|
||||
url_color #cd974b
|
||||
#: black
|
||||
color0 #000000
|
||||
color8 #777777
|
||||
|
||||
#: red
|
||||
color1 #e25d56
|
||||
color9 #f36868
|
||||
|
||||
#: green
|
||||
color2 #73ca50
|
||||
color10 #88db3f
|
||||
|
||||
#: yellow
|
||||
color3 #e9bf57
|
||||
color11 #f0bf7a
|
||||
|
||||
#: blue
|
||||
color4 #4a88e4
|
||||
color12 #6f8fdb
|
||||
|
||||
#: magenta
|
||||
color5 #915caf
|
||||
color13 #e987e9
|
||||
|
||||
#: cyan
|
||||
color6 #23acdd
|
||||
color14 #4ac9e2
|
||||
|
||||
#: white
|
||||
color7 #cecece
|
||||
color15 #ffffff
|
||||
|
||||
|
||||
#: kitty window border colors and terminal bell colors
|
||||
|
||||
active_border_color #777777
|
||||
inactive_border_color #323738
|
||||
bell_border_color #e97e57
|
||||
|
||||
|
||||
#: Tab bar colors
|
||||
|
||||
active_tab_foreground #ffffff
|
||||
active_tab_background #51903c
|
||||
inactive_tab_foreground #7c7a79
|
||||
inactive_tab_background #8f661e
|
||||
background_image bg-blurred.png
|
||||
background_image_layout scaled
|
||||
33
macos/kitty/dark-theme.auto.conf
Normal file
33
macos/kitty/dark-theme.auto.conf
Normal file
@@ -0,0 +1,33 @@
|
||||
# Theme ported from the Mac Terminal application.
|
||||
|
||||
background #000000
|
||||
foreground #f2f2f2
|
||||
cursor #4d4d4d
|
||||
selection_background #414141
|
||||
color0 #000000
|
||||
color8 #666666
|
||||
color1 #990000
|
||||
color9 #e50000
|
||||
color2 #00a600
|
||||
color10 #00d900
|
||||
color3 #999900
|
||||
color11 #e5e500
|
||||
color4 #1f08db
|
||||
color12 #0000ff
|
||||
color5 #b200b2
|
||||
color13 #e500e5
|
||||
color6 #00a6b2
|
||||
color14 #00e5e5
|
||||
color7 #bfbfbf
|
||||
color15 #e5e5e5
|
||||
selection_foreground #000000
|
||||
|
||||
# START_AUTOGENERATED_TAB_STYLE
|
||||
# Feel free to update these colors manually and remove these comments.
|
||||
active_tab_foreground #eeeeee
|
||||
active_tab_background #414141
|
||||
inactive_tab_foreground #f2f2f2
|
||||
inactive_tab_background #000000
|
||||
# END_AUTOGENERATED_TAB_STYLE
|
||||
#background_image bg-blurred.png
|
||||
#background_image_layout scaled
|
||||
2831
macos/kitty/kitty.conf
Normal file
2831
macos/kitty/kitty.conf
Normal file
File diff suppressed because it is too large
Load Diff
2822
macos/kitty/kitty.conf.bak
Normal file
2822
macos/kitty/kitty.conf.bak
Normal file
File diff suppressed because it is too large
Load Diff
65
macos/rc_lib
Normal file
65
macos/rc_lib
Normal file
@@ -0,0 +1,65 @@
|
||||
if [[ -e $(which batcat) ]]; then
|
||||
export bat="batcat"
|
||||
alias bat="batcat"
|
||||
elif [[ -e $(which bat) ]]; then
|
||||
export bat="bat"
|
||||
fi
|
||||
if [[ -n $bat ]]; then
|
||||
export COLORTERM="truecolor"
|
||||
export BAT_THEME="Monokai Extended Origin"
|
||||
export MANPAGER="sh -c 'col -bx | $bat --language=man --style=plain'"
|
||||
export MANROFFOPT="-c"
|
||||
alias cat="$bat --style=plain --paging=never"
|
||||
alias less="$bat --paging=always"
|
||||
if [[ $SHELL == *zsh ]]; then
|
||||
alias -g -- --help='--help 2>&1 | $bat --language=help --style=plain'
|
||||
fi
|
||||
help() { "$@" --help 2>&1 | $bat --language=help --style=plain; }
|
||||
tailf() { tail -f "$@" | $bat --paging=never --language=log; }
|
||||
batdiff() { git diff --name-only --relative --diff-filter=d | xargs $bat --diff; }
|
||||
fi
|
||||
if [[ -e $(which eza) ]]; then
|
||||
if [[ -n "$DISPLAY" || $(tty) == /dev/pts* ]]; then
|
||||
alias ls="eza --group --header --icons"
|
||||
alias tree="eza --long --tree --level=3"
|
||||
else
|
||||
alias ls="eza --group --header"
|
||||
alias tree="eza --long --tree --level=3"
|
||||
fi
|
||||
alias ll="ls --long"
|
||||
alias l="ls --long --all --header"
|
||||
alias lm="ls --long --all --sort=modified"
|
||||
alias lmm="ls -lbHigUmuSa --sort=modified --time-style=long-iso"
|
||||
alias lt="ls --tree"
|
||||
alias lr="ls --recurse"
|
||||
alias lg="ls --long --git --sort=modified"
|
||||
fi
|
||||
|
||||
lori() {
|
||||
local lori_name="${1}"
|
||||
typeset -A lori_list
|
||||
|
||||
|
||||
lori_list=(
|
||||
disk_size "df -h"
|
||||
)
|
||||
|
||||
if [[ -z ${lori_list[$lori_name]} || -z "$lori_name" || "$lori_name" == "-h" ]]; then
|
||||
echo "AVAILABLE COMMANDS:\n"
|
||||
printf "%-20s %s\n" "command"
|
||||
echo "----------------------"
|
||||
for key in "${(@k)lori_list}"; do
|
||||
printf "%-20s %s\n" "$key" "${lori_list[$key]}"
|
||||
done | sort
|
||||
return 0
|
||||
else
|
||||
print -zr "${lori_list[$lori_name]}"
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
_lori_completion() {
|
||||
local -a keys
|
||||
keys=($(lori -h | awk 'NR>4 {print $1}'))
|
||||
compadd "$@" -- "${keys[@]}"
|
||||
}
|
||||
compdef _lori_completion lori
|
||||
Reference in New Issue
Block a user