mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
Merge remote-tracking branch 'refs/remotes/origin/master'
This commit is contained in:
commit
574687892f
7 changed files with 244 additions and 208 deletions
|
|
@ -1,22 +1,22 @@
|
||||||
return {
|
return {
|
||||||
"epwalsh/obsidian.nvim",
|
"epwalsh/obsidian.nvim",
|
||||||
version = "*", -- recommended, use latest release instead of latest commit
|
version = "*", -- recommended, use latest release instead of latest commit
|
||||||
lazy = true,
|
lazy = true,
|
||||||
ft = "markdown",
|
ft = "markdown",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- Required.
|
-- Required.
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
|
|
||||||
-- see below for full list of optional dependencies 👇
|
-- see below for full list of optional dependencies 👇
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
workspaces = {
|
workspaces = {
|
||||||
{
|
{
|
||||||
name = "All",
|
name = "Obsidian",
|
||||||
path = "~/Obsidian",
|
path = "~/Obsidian",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- see below for full list of options 👇
|
-- see below for full list of options 👇
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,39 +1,61 @@
|
||||||
# $XDG_CONFIG_HOME/tmux/tmux.conf
|
# $XDG_CONFIG_HOME/tmux/tmux.conf
|
||||||
# ln -sf $DOTFILES/.config/tmux/tmux.conf $XDG_CONFIG_HOME/tmux/tmux.conf
|
# ln -sf $DOTFILES/.config/tmux/tmux.conf $XDG_CONFIG_HOME/tmux/tmux.conf
|
||||||
# Prefix
|
|
||||||
# -----------------
|
# Prefix
|
||||||
set-option -g prefix C-x
|
# -----------------
|
||||||
unbind C-b
|
set-option -g prefix C-a
|
||||||
bind C-x send-prefix
|
unbind C-b
|
||||||
|
bind C-a send-prefix
|
||||||
# Index
|
|
||||||
# -----------------
|
# Options
|
||||||
set -g base-index 1
|
set-option -g mouse on
|
||||||
set -g pane-base-index 1
|
set-option -g default-terminal "screen-256color"
|
||||||
|
set-option -g allow-rename on
|
||||||
# History
|
set-option -g alternate-screen on
|
||||||
# -----------------
|
set-option -g visual-activity on
|
||||||
set -g history-limit 4096
|
set-option -g pane-border-style fg=colour244
|
||||||
|
set-option -g pane-activity-border-style fg=colour239
|
||||||
# Reload Config
|
|
||||||
# -----------------
|
# Index
|
||||||
bind r source-file ~/.tmux.conf \; display "Reloaded Config"
|
# -----------------
|
||||||
|
set -g base-index 1
|
||||||
# Vi Mode
|
set -g pane-base-index 1
|
||||||
# -----------------
|
|
||||||
set -g status-keys vi
|
# History
|
||||||
set-window-option -g mode-keys vi
|
# -----------------
|
||||||
|
set -g history-limit 4096
|
||||||
# Windows Management
|
|
||||||
# -----------------
|
# Reload Config
|
||||||
bind | split-window -h
|
# -----------------
|
||||||
unbind '"'
|
bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded Config"
|
||||||
bind - split-window -v
|
|
||||||
unbind %
|
# Vi Mode
|
||||||
bind h select-pane -L
|
# -----------------
|
||||||
bind n select-pane -D
|
set -g status-keys vi
|
||||||
bind e select-pane -U
|
set-window-option -g mode-keys vi
|
||||||
bind i select-pane -R
|
|
||||||
|
# Windows Management
|
||||||
|
# -----------------
|
||||||
|
bind | split-window -h
|
||||||
|
unbind '"'
|
||||||
|
bind - split-window -v
|
||||||
|
unbind %
|
||||||
|
bind h select-pane -L
|
||||||
|
bind n select-pane -D
|
||||||
|
bind e select-pane -U
|
||||||
|
bind i select-pane -R
|
||||||
|
bind -r H resize-pane -L 5
|
||||||
|
bind -r N resize-pane -D 5
|
||||||
|
bind -r E resize-pane -U 5
|
||||||
|
bind -r I resize-pane -R 5
|
||||||
|
bind C-h select-window -t :-
|
||||||
|
bind C-l select-window -t :+
|
||||||
|
bind ` resize-pane -Z
|
||||||
|
|
||||||
|
# Status Bar
|
||||||
|
# -----------------
|
||||||
|
set -g status-position top
|
||||||
|
set-option -g status-bg black
|
||||||
|
set-option -g status-fg white
|
||||||
|
set-option -g status-left '#[fg=green][#S] '
|
||||||
|
setw -g window-status-current-format '#[fg=colour236,bg=colour39] #I #W '
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,24 @@
|
||||||
# $XDG_CONFIG_HOME/powershell/Microsoft.PowerShell_profile.ps1
|
# $XDG_CONFIG_HOME/powershell/Microsoft.PowerShell_profile.ps1
|
||||||
# ln -sf $DOTFILES/mac/Microsoft.PowerShell_profile.ps1 $XDG_CONFIG_HOME/powershell/Microsoft.PowerShell_profile.ps1
|
# ln -sf $DOTFILES/mac/Microsoft.PowerShell_profile.ps1 $XDG_CONFIG_HOME/powershell/Microsoft.PowerShell_profile.ps1
|
||||||
### Variables ###
|
### Variables ###
|
||||||
|
|
||||||
$DOTFILES = "$HOME\.dotfiles"
|
$DOTFILES = "$HOME/.dotfiles"
|
||||||
|
|
||||||
### Load Configs ###
|
### Load Configs ###
|
||||||
|
|
||||||
Get-ChildItem -Path $DOTFILES\powershell -Filter *.ps1 | ForEach-Object {. $_}
|
Get-ChildItem -Path $DOTFILES/powershell -Filter *.ps1 | ForEach-Object {. $_}
|
||||||
Get-ChildItem -Path $DOTFILES\powershell_private -Filter *.ps1 | ForEach-Object {. $_}
|
Get-ChildItem -Path $DOTFILES/powershell_private -Filter *.ps1 | ForEach-Object {. $_}
|
||||||
|
|
||||||
## Aliases ###
|
## Aliases ###
|
||||||
|
|
||||||
# PowerShell Equivalents #
|
# PowerShell Equivalents #
|
||||||
|
|
||||||
# Set-Alias "curl" "Invoke-WebRequest"
|
# Set-Alias "curl" "Invoke-WebRequest"
|
||||||
# Set-Alias "man" "Get-Help"
|
# Set-Alias "man" "Get-Help"
|
||||||
Set-Alias "kill" "Stop-Process"
|
Set-Alias "kill" "Stop-Process"
|
||||||
Set-Alias "open" "Invoke-Item" # Use ii instead of open
|
Set-Alias "open" "Invoke-Item" # Use ii instead of open
|
||||||
|
|
||||||
# Dev #
|
# Dev #
|
||||||
|
|
||||||
${function:zshcfg} = { nvim ~/.zshrc }
|
${function:zshcfg} = { nvim ~/.zshrc }
|
||||||
${function:bashcfg} = { nvim ~/.bashrc }
|
${function:bashcfg} = { nvim ~/.bashrc }
|
||||||
|
|
|
||||||
|
|
@ -277,4 +277,7 @@ duti -s com.jetbrains.rider .csproj all
|
||||||
duti -s com.jetbrains.rider .fsproj all
|
duti -s com.jetbrains.rider .fsproj all
|
||||||
# Video -> IINA
|
# Video -> IINA
|
||||||
duti -s com.colliderli.iina .mp4 all
|
duti -s com.colliderli.iina .mp4 all
|
||||||
duti -s com.colliderli.iina .mkv all
|
duti -s com.colliderli.iina .mkv all
|
||||||
|
|
||||||
|
mkdir -p $DOTFILES/powershell_private
|
||||||
|
touch $ZDOTDIR/.private.env.sh
|
||||||
|
|
@ -1,45 +1,50 @@
|
||||||
# PowerShell Equivalent #
|
# PowerShell Equivalent #
|
||||||
alias ni=touch
|
alias ni=touch
|
||||||
alias cls=clear
|
alias cls=clear
|
||||||
|
alias ii=open
|
||||||
# Dev #
|
|
||||||
alias g++='g++ -std=c++2b' # Set the default C++ standard to C++20
|
# Dev #
|
||||||
alias gcc='gcc -std=c99' # Set the default C standard to C99
|
alias g++='g++ -std=c++2b' # Set the default C++ standard to C++20
|
||||||
alias cl='clang -std=c99'
|
alias gcc='gcc -std=c99' # Set the default C standard to C99
|
||||||
alias clpp='clang++ -std=c++2b'
|
alias cl='clang -std=c99'
|
||||||
alias python=python3 # Set the default Python version to Python 3
|
alias clpp='clang++ -std=c++2b'
|
||||||
alias py=python # Alias for Python
|
alias python=python3 # Set the default Python version to Python 3
|
||||||
alias bashcfg="nvim ~/.bashrc"
|
alias py=python # Alias for Python
|
||||||
alias zshcfg="nvim ~/.zshrc"
|
alias pip=pip3 # Alias for pip
|
||||||
alias shcfg=zshcfg
|
alias bashcfg="nvim ~/.bashrc"
|
||||||
alias reload="source ~/.zshrc"
|
alias zshcfg="nvim ~/.zshrc"
|
||||||
alias nvimrc="nvim $XDG_CONFIG_HOME/nvim/"
|
alias shcfg=zshcfg
|
||||||
alias ohmyzsh="code ~/.oh-my-zsh"
|
alias reload="source $ZDOTDIR/.zshrc"
|
||||||
alias pulldots="cd $DOTFILES && git pull"
|
alias nvimrc="nvim $XDG_CONFIG_HOME/nvim/"
|
||||||
|
alias ohmyzsh="code ~/.oh-my-zsh"
|
||||||
# Conda #
|
alias pulldots="cd $DOTFILES && git pull"
|
||||||
alias pyact="conda activate"
|
|
||||||
alias pydact="conda deactivate"
|
# Conda #
|
||||||
alias pylsenv="conda env list"
|
alias pyact="conda activate"
|
||||||
alias pymkenv="conda create --name"
|
alias pydact="conda deactivate"
|
||||||
|
alias pylsenv="conda env list"
|
||||||
# Editors #
|
alias pymkenv="conda create --name"
|
||||||
alias v=nvim
|
|
||||||
alias c=code
|
# Editors #
|
||||||
|
alias v=nvim
|
||||||
# Misc #
|
alias c=code
|
||||||
alias cf=cfiles
|
|
||||||
|
# lsd #
|
||||||
# Functions #
|
alias ls='lsd -a'
|
||||||
mkcd() {
|
alias l='lsd -lah'
|
||||||
mkdir -p -- "$0" && cd -P -- "$1"
|
# Misc #
|
||||||
}
|
alias cf=cfiles
|
||||||
cdls(){
|
|
||||||
cd $1 && ls
|
# Functions #
|
||||||
}
|
mkcd() {
|
||||||
tc(){
|
mkdir -p -- "$0" && cd -P -- "$1"
|
||||||
touch $1 && code $1
|
}
|
||||||
}
|
cdls(){
|
||||||
tv(){
|
cd $1 && ls
|
||||||
touch $1 && nvim $1
|
}
|
||||||
}
|
tc(){
|
||||||
|
touch $1 && code $1
|
||||||
|
}
|
||||||
|
tv(){
|
||||||
|
touch $1 && nvim $1
|
||||||
|
}
|
||||||
|
|
|
||||||
147
zsh/config.zsh
147
zsh/config.zsh
|
|
@ -1,77 +1,70 @@
|
||||||
### ZSH Config ###
|
# ZSH Config #
|
||||||
export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
|
export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
|
||||||
export ZSH="$ZDOTDIR/ohmyzsh"
|
HIST_STAMPS="yyyy-mm-dd"
|
||||||
ZSH_THEME="avit"
|
# plugins=(git web-search jsontools z vi-mode zsh-syntax-highlighting zsh-autosuggestions)
|
||||||
# DISABLE_MAGIC_FUNCTIONS="true"
|
|
||||||
# DISABLE_LS_COLORS="true"
|
# Plugins (Manually Managed) #
|
||||||
# DISABLE_AUTO_TITLE="true"
|
# $ZDOTDIR/plugins
|
||||||
# ENABLE_CORRECTION="true"
|
|
||||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
source $ZDOTDIR/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
# You can also set it to another string to have that shown instead of the default red dots.
|
source $ZDOTDIR/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||||
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
|
source $ZDOTDIR/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
|
||||||
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
|
|
||||||
# COMPLETION_WAITING_DOTS="true"
|
# Tools Related Environment Variables #
|
||||||
# Uncomment the following line if you want to disable marking untracked files
|
|
||||||
# under VCS as dirty. This makes repository status check for large repositories
|
PAGER="less"
|
||||||
# much, much faster.
|
EDITOR="nvim"
|
||||||
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
VISUAL="nvim"
|
||||||
HIST_STAMPS="yyyy-mm-dd"
|
|
||||||
plugins=(git web-search jsontools z vi-mode zsh-syntax-highlighting zsh-autosuggestions)
|
# Use XDG Base Directory Specification #
|
||||||
source $ZSH/oh-my-zsh.sh
|
|
||||||
source .private.env.sh
|
# ~/.azure/ -> $XDG_DATA_HOME/azure/
|
||||||
|
export AZURE_CONFIG_DIR="$XDG_DATA_HOME"/azure
|
||||||
# export MANPATH="/usr/local/man:$MANPATH"
|
# ~/.cgdb/ -> $XDG_CONFIG_HOME/cgdb/
|
||||||
# export LANG= "en_US.UTF-8"
|
export CGDB_DIR="$XDG_CONFIG_HOME"/cgdb
|
||||||
|
# ~/.nv -> $XDG_CACHE_HOME/nv (CUDA)
|
||||||
# Use XDG Base Directory Specification
|
# macOS does not have Cuda; Check if CUDA is installed
|
||||||
|
if [ "$(uname)" != "Darwin" ] && [ -d "/usr/local/cuda" ]; then
|
||||||
# ~/.azure/ -> $XDG_DATA_HOME/azure/
|
export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv
|
||||||
export AZURE_CONFIG_DIR="$XDG_DATA_HOME"/azure
|
fi
|
||||||
# ~/.cgdb/ -> $XDG_CONFIG_HOME/cgdb/
|
# ~/.docker -> $XDG_CONFIG_HOME/docker
|
||||||
export CGDB_DIR="$XDG_CONFIG_HOME"/cgdb
|
export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker
|
||||||
# ~/.nv -> $XDG_CACHE_HOME/nv (CUDA)
|
# ~/.dotnet -> $XDG_DATA_HOME/dotnet
|
||||||
# macOS does not have Cuda; Check if CUDA is installed
|
export DOTNET_CLI_HOME="$XDG_DATA_HOME"/dotnet
|
||||||
if [ "$(uname)" != "Darwin" ] && [ -d "/usr/local/cuda" ]; then
|
# ~/.gnupg -> $XDG_CONFIG_HOME/gnupg
|
||||||
export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv
|
export GNUPGHOME="$XDG_DATA_HOME"/gnupg
|
||||||
fi
|
# ~/go -> $XDG_DATA_HOME/go
|
||||||
# ~/.docker -> $XDG_CONFIG_HOME/docker
|
export GOPATH="$XDG_DATA_HOME"/go
|
||||||
export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker
|
# ~/.juliaup/ -> $XDG_DATA_HOME/julia/
|
||||||
# ~/.dotnet -> $XDG_DATA_HOME/dotnet
|
export JULIA_DEPOT_PATH="$XDG_DATA_HOME/julia:$JULIA_DEPOT_PATH"
|
||||||
export DOTNET_CLI_HOME="$XDG_DATA_HOME"/dotnet
|
# Check if node is installed
|
||||||
# ~/.gnupg -> $XDG_CONFIG_HOME/gnupg
|
if command -v node > /dev/null; then
|
||||||
export GNUPGHOME="$XDG_DATA_HOME"/gnupg
|
# ~/.node_repl_history -> $XDG_STATE_HOME/node/repl_history
|
||||||
# ~/go -> $XDG_DATA_HOME/go
|
export NODE_REPL_HISTORY="$XDG_STATE_HOME"/node/repl_history
|
||||||
export GOPATH="$XDG_DATA_HOME"/go
|
# ~/.ts_node_repl_history -> $XDG_STATE_HOME/node/ts_node_repl_history
|
||||||
# ~/.juliaup/ -> $XDG_DATA_HOME/julia/
|
export TS_NODE_REPL_HISTORY="$XDG_STATE_HOME"/node/ts_node_repl_history
|
||||||
export JULIA_DEPOT_PATH="$XDG_DATA_HOME/julia:$JULIA_DEPOT_PATH"
|
# ~/.npmrc -> $XDG_CONFIG_HOME/npm/npmrc
|
||||||
# Check if node is installed
|
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
|
||||||
if command -v node > /dev/null; then
|
# ~/.npm -> $XDG_CACHE_HOME/npm
|
||||||
# ~/.node_repl_history -> $XDG_STATE_HOME/node/repl_history
|
export NPM_CONFIG_INIT_MODULE="$XDG_CONFIG_HOME"/npm/config/npm-init.js
|
||||||
export NODE_REPL_HISTORY="$XDG_STATE_HOME"/node/repl_history
|
export NPM_CONFIG_CACHE="$XDG_CACHE_HOME"/npm
|
||||||
# ~/.ts_node_repl_history -> $XDG_STATE_HOME/node/ts_node_repl_history
|
export NPM_CONFIG_TMP="$XDG_RUNTIME_DIR"/npm
|
||||||
export TS_NODE_REPL_HISTORY="$XDG_STATE_HOME"/node/ts_node_repl_history
|
fi
|
||||||
# ~/.npmrc -> $XDG_CONFIG_HOME/npm/npmrc
|
# ~/.python_history -> $XDG_DATA_HOME/python/history
|
||||||
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
|
# Works only with Python 3.13.0a3 and later
|
||||||
# ~/.npm -> $XDG_CACHE_HOME/npm
|
export PYTHON_HISTORY="$XDG_DATA_HOME"/python/history
|
||||||
export NPM_CONFIG_INIT_MODULE="$XDG_CONFIG_HOME"/npm/config/npm-init.js
|
# ~/.tldrc/ -> $XDG_CACHE_HOME/tldr
|
||||||
export NPM_CONFIG_CACHE="$XDG_CACHE_HOME"/npm
|
export TLDR_CACHE_DIR="$XDG_CACHE_HOME"/tldr
|
||||||
export NPM_CONFIG_TMP="$XDG_RUNTIME_DIR"/npm
|
# ~/.w3m -> $XDG_DATA_HOME/w3m
|
||||||
fi
|
export W3M_DIR="$XDG_DATA_HOME"/w3m
|
||||||
# ~/.python_history -> $XDG_DATA_HOME/python/history
|
# ~/.wakatime.cfg -> $XDG_CONFIG_HOME/wakatime.cfg
|
||||||
# Works only with Python 3.13.0a3 and later
|
# ~/.wakatime/ -> $XDG_CONFIG_HOME/wakatime/
|
||||||
export PYTHON_HISTORY="$XDG_DATA_HOME"/python/history
|
export WAKATIME_HOME="$XDG_CONFIG_HOME/wakatime"
|
||||||
# ~/.tldrc/ -> $XDG_CACHE_HOME/tldr
|
# ~/.wget-hsts -> $XDG_DATA_HOME/wget-hsts
|
||||||
export TLDR_CACHE_DIR="$XDG_CACHE_HOME"/tldr
|
alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
|
||||||
# ~/.w3m -> $XDG_DATA_HOME/w3m
|
# ~/.z -> $XDG_DATA_HOME/z
|
||||||
export W3M_DIR="$XDG_DATA_HOME"/w3m
|
export _Z_DATA="$XDG_DATA_HOME/z"
|
||||||
# ~/.wakatime.cfg -> $XDG_CONFIG_HOME/wakatime.cfg
|
# ~/.zcompdump* -> $XDG_CACHE_HOME/zsh/zcompdump*
|
||||||
# ~/.wakatime/ -> $XDG_CONFIG_HOME/wakatime/
|
compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"
|
||||||
export WAKATIME_HOME="$XDG_CONFIG_HOME/wakatime"
|
# ~/.zsh_history -> $XDG_STATE_HOME/zsh/history
|
||||||
# ~/.wget-hsts -> $XDG_DATA_HOME/wget-hsts
|
export HISTFILE="$XDG_STATE_HOME"/zsh/history
|
||||||
alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
|
|
||||||
# ~/.z -> $XDG_DATA_HOME/z
|
|
||||||
export _Z_DATA="$XDG_DATA_HOME/z"
|
|
||||||
# ~/.zcompdump* -> $XDG_CACHE_HOME/zsh/zcompdump*
|
|
||||||
compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"
|
|
||||||
# ~/.zsh_history -> $XDG_STATE_HOME/zsh/history
|
|
||||||
export HISTFILE="$XDG_STATE_HOME"/zsh/history
|
|
||||||
|
|
|
||||||
13
zsh/update.sh
Normal file
13
zsh/update.sh
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
# $DOTFILES/zsh/update.sh
|
||||||
|
|
||||||
|
# This file won't be sourced by zsh by default
|
||||||
|
# Use `source` to run this file for updating plugins
|
||||||
|
|
||||||
|
# Plugins #
|
||||||
|
# Auto `git pull` on $ZDOTDIR/plugins
|
||||||
|
for plugin in $ZDOTDIR/plugins/*; do
|
||||||
|
if [ -d "$plugin" ]; then
|
||||||
|
cd $plugin
|
||||||
|
git pull --quiet --no-edit
|
||||||
|
fi
|
||||||
|
done
|
||||||
Loading…
Add table
Add a link
Reference in a new issue