mirror of
https://github.com/Horhik/dotfiles.git
synced 2024-11-22 08:21:27 +00:00
131 lines
3.8 KiB
Bash
131 lines
3.8 KiB
Bash
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||
# Initialization code that may require console input (password prompts, [y/n]
|
||
# confirmations, etc.) must go above this block; everything else may go below.
|
||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||
fi
|
||
|
||
source ~/.zplug/init.zsh
|
||
|
||
# Make sure to use double quotes
|
||
zplug "zsh-users/zsh-history-substring-search"
|
||
|
||
# Use the package as a command
|
||
# And accept glob patterns (e.g., brace, wildcard, ...)
|
||
zplug "Jxck/dotfiles", as:command, use:"bin/{histuniq,color}"
|
||
|
||
# Can manage everything e.g., other person's zshrc
|
||
zplug "tcnksm/docker-alias", use:zshrc
|
||
|
||
# Disable updates using the "frozen" tag
|
||
zplug "k4rthik/git-cal", as:command, frozen:1
|
||
|
||
# Grab binaries from GitHub Releases
|
||
# and rename with the "rename-to:" tag
|
||
zplug "junegunn/fzf-bin", \
|
||
from:gh-r, \
|
||
as:command, \
|
||
rename-to:fzf, \
|
||
use:"*darwin*amd64*"
|
||
|
||
# Supports oh-my-zsh plugins and the like
|
||
zplug "plugins/git", from:oh-my-zsh
|
||
|
||
#zplug "romkatv/powerlevel10k", as:theme
|
||
|
||
zplug "Horhik/SimpleTW", as:theme
|
||
# Also prezto
|
||
#zplug "modules/prompt", from:prezto
|
||
|
||
# Load if "if" tag returns true
|
||
#zplug "lib/clipboard", from:oh-my-zsh, if:"[[ $OSTYPE == *darwin* ]]"
|
||
|
||
# Run a command after a plugin is installed/updated
|
||
# Provided, it requires to set the variable like the following:
|
||
# ZPLUG_SUDO_PASSWORD="********"
|
||
zplug "jhawthorn/fzy", \
|
||
as:command, \
|
||
rename-to:fzy, \
|
||
hook-build:"make && sudo make install"
|
||
|
||
# Supports checking out a specific branch/tag/commit
|
||
zplug "b4b4r07/enhancd", at:v1
|
||
zplug "mollifier/anyframe", at:4c23cb60
|
||
|
||
# Can manage gist file just like other packages
|
||
zplug "b4b4r07/79ee61f7c140c63d2786", \
|
||
from:gist, \
|
||
as:command, \
|
||
use:get_last_pane_path.sh
|
||
|
||
# Support bitbucket
|
||
zplug "b4b4r07/hello_bitbucket", \
|
||
from:bitbucket, \
|
||
as:command, \
|
||
use:"*.sh"
|
||
|
||
# Rename a command with the string captured with `use` tag
|
||
zplug "b4b4r07/httpstat", \
|
||
as:command, \
|
||
use:'(*).sh', \
|
||
rename-to:'$1'
|
||
|
||
# Group dependencies
|
||
# Load "emoji-cli" if "jq" is installed in this example
|
||
zplug "stedolan/jq", \
|
||
from:gh-r, \
|
||
as:command, \
|
||
rename-to:jq
|
||
zplug "b4b4r07/emoji-cli", \
|
||
on:"stedolan/jq"
|
||
# Note: To specify the order in which packages should be loaded, use the defer
|
||
# tag described in the next section
|
||
|
||
# Set the priority when loading
|
||
# e.g., zsh-syntax-highlighting must be loaded
|
||
# after executing compinit command and sourcing other plugins
|
||
# (If the defer tag is given 2 or above, run after compinit command)
|
||
zplug "zsh-users/zsh-syntax-highlighting", defer:2
|
||
|
||
# Can manage local plugins
|
||
zplug "~/.zsh", from:local
|
||
|
||
# Install plugins if there are plugins that have not been installed
|
||
if ! zplug check --verbose; then
|
||
printf "Install? [y/N]: "
|
||
if read -q; then
|
||
echo; zplug install
|
||
fi
|
||
fi
|
||
|
||
# Then, source plugins and add commands to $PATH
|
||
export EDITOR='nvim'
|
||
export VISUAL='nvim'
|
||
export PATH=$PATH:$HOME/.local/bin
|
||
|
||
alias vim=nvim
|
||
alias tl=task list
|
||
# Taskwarrior
|
||
alias inbo='task +inbox'
|
||
alias ibx='task +inbox'
|
||
alias week='task burndown.weekly'
|
||
alias today='task due:today or scheduled:today'
|
||
alias prjcs='task projects'
|
||
alias tm='task modify'
|
||
alias launchpad='task project:Создать_свой_Launchpad'
|
||
alias homework='task project:school +next +school +homework'
|
||
alias don='task done'
|
||
alias watchlist="task +watchlist"
|
||
alias tc="task context"
|
||
alias cal="task calendar"
|
||
alias del="task delete"
|
||
alias next="task +next and -inbox"
|
||
alias somewhen="task add +somewhen"
|
||
alias review="task to_review | head -n 10"
|
||
alias tosomewhen="task modify -inbox +somewhen"
|
||
|
||
zplug load #--verbose
|
||
|
||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|