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.

67 lines
2.5 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=qt5ct
  8. export EDITOR="nvim"
  9. export TERMINAL="st"
  10. export BROWSER="firefox"
  11. export LC_CTYPE=ru_RU.UTF-8
  12. # less + man
  13. export LESS_TERMCAP_mb=$'\e[1;32m'
  14. export LESS_TERMCAP_md=$'\e[1;32m'
  15. export LESS_TERMCAP_me=$'\e[0m'
  16. export LESS_TERMCAP_se=$'\e[0m'
  17. export LESS_TERMCAP_so=$'\e[01;33m'
  18. export LESS_TERMCAP_ue=$'\e[0m'
  19. export LESS_TERMCAP_us=$'\e[1;4;31m'
  20. export PAGER="less"
  21. fzfcd () {
  22. cd "$(fd --type d --follow --exclude .git --exclude node_modules | fzf)"
  23. }
  24. alias ..="cd .."
  25. alias ls="ls --color"
  26. alias ll="ls -l --color"
  27. alias la="ls -a --color"
  28. alias lal="ls -al --color"
  29. alias dxyz="ssh root@rinri-d.xyz"
  30. alias vim="nvim"
  31. alias cal="cal -m"
  32. # Lines configured by zsh-newuser-install
  33. HISTFILE=~/.histfile
  34. HISTSIZE=100000
  35. SAVEHIST=100000
  36. bindkey -e
  37. # End of lines configured by zsh-newuser-install
  38. # The following lines were added by compinstall
  39. zstyle :compinstall filename '/home/rinri/.zshrc'
  40. autoload -U compinit
  41. zstyle ':completion:*' menu select
  42. zmodload zsh/complist
  43. compinit
  44. _comp_options+=(globdots)
  45. bindkey -s '^o' 'fzfcd\n'
  46. # End of lines added by compinstall
  47. source ~/src/powerlevel10k/powerlevel10k.zsh-theme
  48. source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  49. source /usr/share/fzf/completion.zsh
  50. source /usr/share/fzf/key-bindings.zsh
  51. # fzf things
  52. export FZF_DEFAULT_COMMAND="fd --color=never --type f --type l --follow --exclude .git --exclude node_modules"
  53. 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)'"
  54. # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
  55. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
  56. 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