Remove .config/kitty/.keep
Add .config/kitty/current-theme.conf Add .config/kitty/kitty.conf Remove .config/qtile/.keep Remove .config/qtile/old_configs/.keep Remove .config/qtile/old_configs/sweenu/.keep Remove .config/qtile/old_configs/sweenu/util/.keep Remove .config/qtile/scripts/.keep Remove .config/qtile/themes/.keep Remove .config/sheldon/.keep Remove .config/spacevim/.keep Remove .config/starship/.keep Add .config/starship/config.toml Remove .config/starship/starship.toml Remove .config/zsh/.keep Update .config/zsh/env.zsh Update .config/zsh/rc.zsh Add .config/zsh/starship_icon.zsh Add .config/zsh/transfer.zsh
This commit is contained in:
parent
9fda083054
commit
a1ba3224e9
19 changed files with 164 additions and 24 deletions
|
@ -12,6 +12,8 @@ export FZF_MARKS_FILE="$HOME/.config/fzfmarks"
|
|||
export XCURSOR_PATH=/usr/share/icons:${XDG_DATA_HOME}/icons
|
||||
export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
|
||||
export GOPATH="$XDG_DATA_HOME"/go
|
||||
export CARGO_HOME="$XDG_DATA_HOME"/cargo
|
||||
export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker
|
||||
|
||||
# gpg
|
||||
export GPG_TTY=$TTY
|
||||
|
@ -20,10 +22,6 @@ export GPG_TTY=$TTY
|
|||
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||
export LESSHISTFILE="-"
|
||||
|
||||
# ohmyzsh
|
||||
export OMP="/usr/share/ohmyzsh/plugins"
|
||||
export OML="/usr/share/ohmyzsh/lib"
|
||||
|
||||
# editor and visual
|
||||
export EDITOR=nvim
|
||||
export VISUAL=kate
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.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
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh.
|
||||
[[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh
|
||||
|
||||
# compinit
|
||||
autoload -Uz compinit
|
||||
compinit -d $XDG_CACHE_HOME/zsh/compdump
|
||||
|
@ -13,31 +23,33 @@ export HISTFILE="$XDG_CACHE_HOME/zsh/history"
|
|||
setopt inc_append_history
|
||||
|
||||
# libraries
|
||||
source $OML/history.zsh
|
||||
source $OML/completion.zsh
|
||||
source $OML/directories.zsh
|
||||
source /usr/share/ohmyzsh/lib/history.zsh
|
||||
source /usr/share/ohmyzsh/lib/completion.zsh
|
||||
source /usr/share/ohmyzsh/lib/directories.zsh
|
||||
|
||||
# plugins
|
||||
source $OMP/command-not-found/command-not-found.plugin.zsh
|
||||
source $OMP/extract/extract.plugin.zsh
|
||||
source $OMP/systemd/systemd.plugin.zsh
|
||||
source $OMP/fzf/fzf.plugin.zsh
|
||||
plugins=(command-not-found systemd fzf)
|
||||
for plugin ($plugins); do source "/usr/share/ohmyzsh/plugins/$plugin/$plugin.plugin.zsh"; done
|
||||
plugins=(fzf-tab fzf-marks evalcache colorize titles thefuck forgit)
|
||||
for plugin ($plugins); do source "/usr/share/zsh/plugins/$plugin/$plugin.zsh"; done
|
||||
unset plugins
|
||||
|
||||
|
||||
# plugins (self)
|
||||
source /usr/share/zsh/plugins/fzf-tab/fzf-tab.zsh
|
||||
source /usr/share/zsh/plugins/fzf-marks/fzf-marks.zsh
|
||||
source /usr/share/zsh/plugins/evalcache/evalcache.zsh
|
||||
source /usr/share/zsh/plugins/colorize/colorize.zsh
|
||||
source /usr/share/zsh/plugins/titles/titles.zsh
|
||||
|
||||
# eval stuff
|
||||
_evalcache zoxide init zsh
|
||||
_evalcache dircolors -b /usr/share/LS_COLORS/LS_COLORS
|
||||
_evalcache keychain --dir "$XDG_CACHE_HOME/keychain" --eval --quiet id_rsa
|
||||
_evalcache starship init zsh
|
||||
#_evalcache oh-my-posh init zsh
|
||||
_evalcache atuin init zsh
|
||||
_evalcache navi widget zsh
|
||||
_evalcache direnv hook zsh
|
||||
source /opt/asdf-vm/asdf.sh
|
||||
eval "$(keychain --dir "$XDG_CACHE_HOME/keychain" --eval --quiet id_rsa)"
|
||||
|
||||
#themes
|
||||
source /home/weger/.config/zsh/starship_icon.zsh
|
||||
source /usr/share/zsh/themes/powerlevel10k/powerlevel10k.zsh-theme
|
||||
#_evalcache starship init zsh
|
||||
#_evalcache oh-my-posh init zsh
|
||||
|
||||
# aliases
|
||||
alias ls='exa'
|
||||
|
|
34
dot_config/zsh/starship_icon.zsh
Normal file
34
dot_config/zsh/starship_icon.zsh
Normal file
|
@ -0,0 +1,34 @@
|
|||
# find out which distribution we are running on
|
||||
LFILE="/etc/*-release"
|
||||
if [[ -f $LFILE ]]; then
|
||||
_distro=$(awk '/^ID_LIKE=/' /etc/*-release | awk -F'=' '{ print tolower($2) }')
|
||||
fi
|
||||
|
||||
# set an icon based on the distro
|
||||
case $_distro in
|
||||
*kali*) ICON="ﴣ";;
|
||||
*arch*) ICON="";;
|
||||
*debian*) ICON="";;
|
||||
*raspbian*) ICON="";;
|
||||
*ubuntu*) ICON="";;
|
||||
*elementary*) ICON="";;
|
||||
*fedora*) ICON="";;
|
||||
*coreos*) ICON="";;
|
||||
*gentoo*) ICON="";;
|
||||
*mageia*) ICON="";;
|
||||
*centos*) ICON="";;
|
||||
*opensuse*|*tumbleweed*) ICON="";;
|
||||
*sabayon*) ICON="";;
|
||||
*slackware*) ICON="";;
|
||||
*linuxmint*) ICON="";;
|
||||
*alpine*) ICON="";;
|
||||
*aosc*) ICON="";;
|
||||
*nixos*) ICON="";;
|
||||
*devuan*) ICON="";;
|
||||
*manjaro*) ICON="";;
|
||||
*rhel*) ICON="";;
|
||||
*macos*) ICON="";;
|
||||
*) ICON="";;
|
||||
esac
|
||||
|
||||
export STARSHIP_DISTRO="$ICON"
|
26
dot_config/zsh/transfer.zsh
Normal file
26
dot_config/zsh/transfer.zsh
Normal file
|
@ -0,0 +1,26 @@
|
|||
transfer(){
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "No arguments specified.\nUsage:\n transfer <file|directory>\n ... | transfer <file_name>">&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
if tty -s; then
|
||||
file="$1"
|
||||
file_name=$(basename "$file")
|
||||
|
||||
if [ ! -e "$file" ]; then
|
||||
echo "$file: No such file or directory">&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -d "$file" ]; then
|
||||
file_name="$file_name.zip"
|
||||
(cd "$file" && zip -r -q - .) | curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null
|
||||
else
|
||||
cat "$file" | curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null
|
||||
fi
|
||||
else
|
||||
file_name=$1
|
||||
curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null
|
||||
fi
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue