My dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
3.1 KiB

  1. # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
  2. # Initialization code that may require console input (password prompts, [y/n]
  3. # confirmations, etc.) must go above this block; everything else may go below.
  4. if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
  5. source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
  6. fi
  7. export QT_QPA_PLATFORMTHEME=gtk2
  8. export EDITOR="nvim"
  9. export TERMINAL="st"
  10. export BROWSER="firefox"
  11. export LC_CTYPE=ru_RU.UTF-8
  12. export WECHALLUSER="rinri"
  13. export WECHALLTOKEN="5F489-F2870-9F223-96264-58717-4AAB4"
  14. # less + man
  15. export LESS_TERMCAP_mb=$'\e[1;32m'
  16. export LESS_TERMCAP_md=$'\e[1;32m'
  17. export LESS_TERMCAP_me=$'\e[0m'
  18. export LESS_TERMCAP_se=$'\e[0m'
  19. export LESS_TERMCAP_so=$'\e[01;33m'
  20. export LESS_TERMCAP_ue=$'\e[0m'
  21. export LESS_TERMCAP_us=$'\e[1;4;31m'
  22. export PAGER="less"
  23. fzfcd () {
  24. cd "$(fd --type d --follow --exclude .git --exclude node_modules | fzf)"
  25. }
  26. alias em="emacsclient --create-frame"
  27. alias ..="cd .."
  28. alias ls="ls --color"
  29. alias ll="ls --color -l"
  30. alias la="ls --color -A"
  31. alias lal="ls --color -Al"
  32. alias huion="xsetwacom set 'HUION Huion Tablet Pen stylus' Area 4384 3990 24384 15240"
  33. alias dxyz="ssh root@rinri-d.xyz"
  34. alias mrcon="mcrcon -H rinri-d.xyz -p -t"
  35. alias vim="nvim"
  36. alias minemus="mpv --no-video https://youtu.be/Dg0IjOzopYU"
  37. alias weebcabin="~/scripts/anime.sh"
  38. alias cal="cal -m"
  39. alias sudo="doas"
  40. # Lines configured by zsh-newuser-install
  41. HISTFILE=~/.histfile
  42. HISTSIZE=100000
  43. SAVEHIST=100000
  44. bindkey -v
  45. # End of lines configured by zsh-newuser-install
  46. # The following lines were added by compinstall
  47. zstyle :compinstall filename '/home/rinri/.zshrc'
  48. autoload -U compinit
  49. zstyle ':completion:*' menu select
  50. zmodload zsh/complist
  51. compinit
  52. _comp_options+=(globdots)
  53. bindkey -s '^o' 'fzfcd\n'
  54. bindkey -M viins '\e.' insert-last-word
  55. # End of lines added by compinstall
  56. source ~/src/powerlevel10k/powerlevel10k.zsh-theme
  57. source ~/src/antigen.zsh
  58. source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  59. antigen bundle jeffreytse/zsh-vi-mode
  60. antigen apply
  61. # The plugin will auto execute this zvm_after_init function
  62. function zvm_after_init() {
  63. source /usr/share/fzf/completion.zsh
  64. source /usr/share/fzf/key-bindings.zsh
  65. }
  66. # fzf things
  67. export FZF_DEFAULT_COMMAND="fd --color=never --type f --type l --follow --exclude .git --exclude node_modules"
  68. export FZF_DEFAULT_OPTS="--height 50% -1 --reverse --multi --inline-info --preview='[[ \$(file --mime {}) =~ binary ]] && echo {} is a binary file || (bat --style=numbers --color=always {} || cat {}) 2> /dev/null | head -300' --preview-window='right:hidden:wrap' --bind='f3:execute(bat --style=numbers {} || less -f {}),f2:toggle-preview,ctrl-d:half-page-down,ctrl-u:half-page-up,ctrl-a:select-all+accept,ctrl-y:execute-silent(echo {+} | pbcopy)'"
  69. # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
  70. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
  71. if [ -e /home/rinri/.nix-profile/etc/profile.d/nix.sh ]; then . /home/rinri/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer