diff --git a/dot_config/kitty/.keep b/dot_config/kitty/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/dot_config/kitty/current-theme.conf b/dot_config/kitty/current-theme.conf new file mode 100644 index 0000000..f48ac3d --- /dev/null +++ b/dot_config/kitty/current-theme.conf @@ -0,0 +1,50 @@ +# vim:ft=kitty +## name: Nord +## author: Connor Holyday +## license: MIT +## upstream: https://raw.githubusercontent.com/connorholyday/nord-kitty/master/nord.conf +## blurb: An arctic, north-bluish clean and elegant Kitty theme. + +# Nord Colorscheme for Kitty +# Based on: +# - https://gist.github.com/marcusramberg/64010234c95a93d953e8c79fdaf94192 +# - https://github.com/arcticicestudio/nord-hyper + +foreground #D8DEE9 +background #2E3440 +selection_foreground #000000 +selection_background #FFFACD +url_color #0087BD +cursor #81A1C1 + +# black +color0 #3B4252 +color8 #4C566A + +# red +color1 #BF616A +color9 #BF616A + +# green +color2 #A3BE8C +color10 #A3BE8C + +# yellow +color3 #EBCB8B +color11 #EBCB8B + +# blue +color4 #81A1C1 +color12 #81A1C1 + +# magenta +color5 #B48EAD +color13 #B48EAD + +# cyan +color6 #88C0D0 +color14 #8FBCBB + +# white +color7 #E5E9F0 +color15 #ECEFF4 diff --git a/dot_config/kitty/kitty.conf b/dot_config/kitty/kitty.conf new file mode 100644 index 0000000..c227797 --- /dev/null +++ b/dot_config/kitty/kitty.conf @@ -0,0 +1,16 @@ +# Standard Stuff +scrollback_lines 90000 +copy_on_select no +strip_trailing_spaces smart +window_padding_width 5 +enable_audio_bell no +shell_integration no-rc + +# Fonts +font_family FiraCode Nerd Font + + +# BEGIN_KITTY_THEME +# Nord +include current-theme.conf +# END_KITTY_THEME \ No newline at end of file diff --git a/dot_config/qtile/.keep b/dot_config/qtile/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/dot_config/qtile/old_configs/.keep b/dot_config/qtile/old_configs/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/dot_config/qtile/old_configs/sweenu/.keep b/dot_config/qtile/old_configs/sweenu/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/dot_config/qtile/old_configs/sweenu/util/.keep b/dot_config/qtile/old_configs/sweenu/util/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/dot_config/qtile/scripts/.keep b/dot_config/qtile/scripts/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/dot_config/qtile/themes/.keep b/dot_config/qtile/themes/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/dot_config/sheldon/.keep b/dot_config/sheldon/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/dot_config/spacevim/.keep b/dot_config/spacevim/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/dot_config/starship/.keep b/dot_config/starship/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/dot_config/starship/config.toml b/dot_config/starship/config.toml new file mode 100644 index 0000000..0c02cd4 --- /dev/null +++ b/dot_config/starship/config.toml @@ -0,0 +1,8 @@ +add_newline = false + +format = """$env_var $all""" + +[env_var.STARSHIP_DISTRO] +format = '[$env_value](white)' +variable = "STARSHIP_DISTRO" +disabled = false diff --git a/dot_config/starship/starship.toml b/dot_config/starship/starship.toml deleted file mode 100644 index 7844f19..0000000 --- a/dot_config/starship/starship.toml +++ /dev/null @@ -1,4 +0,0 @@ -add_newline = false - -[time] -disabled = false diff --git a/dot_config/zsh/.keep b/dot_config/zsh/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/dot_config/zsh/env.zsh b/dot_config/zsh/env.zsh index 6484b77..d666be4 100644 --- a/dot_config/zsh/env.zsh +++ b/dot_config/zsh/env.zsh @@ -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 diff --git a/dot_config/zsh/rc.zsh b/dot_config/zsh/rc.zsh index 237ad6f..8219ed7 100644 --- a/dot_config/zsh/rc.zsh +++ b/dot_config/zsh/rc.zsh @@ -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' diff --git a/dot_config/zsh/starship_icon.zsh b/dot_config/zsh/starship_icon.zsh new file mode 100644 index 0000000..2f5b177 --- /dev/null +++ b/dot_config/zsh/starship_icon.zsh @@ -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" diff --git a/dot_config/zsh/transfer.zsh b/dot_config/zsh/transfer.zsh new file mode 100644 index 0000000..1415467 --- /dev/null +++ b/dot_config/zsh/transfer.zsh @@ -0,0 +1,26 @@ +transfer(){ + if [ $# -eq 0 ]; then + echo "No arguments specified.\nUsage:\n transfer \n ... | transfer ">&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 +}