diff --git a/.config/mpv/osc.conf b/.config/mpv/osc.conf deleted file mode 100644 index b9ddec8..0000000 --- a/.config/mpv/osc.conf +++ /dev/null @@ -1,2 +0,0 @@ -font=Consolas -logotext={\\1c&H00\\bord0\\fs30\\fn微软雅黑 light\\fscx125}MPV{\\fscx100} 播放器 diff --git a/.p10k.zsh b/.config/zsh/.p10k.zsh similarity index 100% rename from .p10k.zsh rename to .config/zsh/.p10k.zsh diff --git a/.zshrc b/.config/zsh/.zshrc similarity index 78% rename from .zshrc rename to .config/zsh/.zshrc index 94ba7e1..6a2f6d6 100644 --- a/.zshrc +++ b/.config/zsh/.zshrc @@ -1,3 +1,26 @@ +# Path to your oh-my-zsh installation. +export ZSH="$HOME/.local/share/oh-my-zsh" + +! [ -d "$HOME"/.local/share/ ] && mkdir -p "$HOME"/.local/share + +if ! [ -d "$HOME"/.local/share/oh-my-zsh ]; then + echo "installing oh-my-zsh" + sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh) --unattended --keep-zshrc" + echo "done installing oh-my-zsh" +fi + +if ! [ -d "$HOME"/.local/share/oh-my-zsh/custom/themes/powerlevel10k ]; then + echo "installing powerlevel10k" + git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.local/share/oh-my-zsh/custom}/themes/powerlevel10k + echo "done installing powerlevel10k" +fi + +if ! [ -d "$HOME"/.local/share/oh-my-zsh/custom/plugins/zsh-syntax-highlighting ]; then + echo "installing zsh-syntax-highlighting" + git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.local/share/oh-my-zsh/custom}/plugins/zsh-syntax-highlighting + echo "done installing zsh-syntax-highlighting" +fi + # 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. @@ -8,9 +31,6 @@ fi # If you come from bash you might have to change your $PATH. # export PATH=$HOME/bin:/usr/local/bin:$PATH -# Path to your oh-my-zsh installation. -export ZSH="$HOME/.oh-my-zsh" - # Set name of the theme to load --- if set to "random", it will # load a random theme each time oh-my-zsh is loaded, in which case, # to know which specific one was loaded, run: echo $RANDOM_THEME @@ -102,6 +122,8 @@ source $ZSH/oh-my-zsh.sh # Compilation flags # export ARCHFLAGS="-arch x86_64" +compinit -d "$HOME"/.cache/zcompdump + # Set personal aliases, overriding those provided by oh-my-zsh libs, # plugins, and themes. Aliases can be placed here, though oh-my-zsh # users are encouraged to define aliases within the ZSH_CUSTOM folder. @@ -110,7 +132,9 @@ source $ZSH/oh-my-zsh.sh # Example aliases # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" -source ~/.config/aliasrc +[ -f ~/.config/aliasrc ] && source ~/.config/aliasrc # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. -[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh +[[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh + +cd "$HOME" diff --git a/.zprofile b/.zprofile deleted file mode 100644 index b530f16..0000000 --- a/.zprofile +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh - -export XDG_DATA_HOME="$HOME/.local/share" -export XDG_CONFIG_HOME="$HOME/.config" -export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config" -export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0" -export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc" -export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/inputrc" -export WINEPREFIX="$XDG_DATA_HOME/wineprefixes/default" -export STACK_ROOT="$XDG_DATA_HOME"/stack -export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store" -export GNUPGHOME="$XDG_DATA_HOME/gnupg" -export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo" -export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go" -export ANSIBLE_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/ansible/ansible.cfg" -export TMUX_TMPDIR="$XDG_RUNTIME_DIR" -export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android" -export MBSYNCRC="${XDG_CONFIG_HOME:-$HOME/.config}/mbsync/config" -export ELECTRUMDIR="${XDG_DATA_HOME:-$HOME/.local/share}/electrum" -export GHCUP_USE_XDG_DIRS=true -export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc - - -#make firefox/librewolf use wayland -export GDK_BACKEND=wayland -export MOZ_ENABLE_WAYLAND=1 - -#theming -export GTK_THEME=Adwaita:dark -export XCURSOR_THEME=Adwaita - -#add to path -export PATH="$PATH:$HOME/.local/bin" -export PATH="$PATH:$HOME/.local/scripts" -export PATH="$PATH:/var/lib/flatpak/exports/bin" - -export LESSHISTFILE="-" - -export LESS_TERMCAP_mb="$(printf '%b' '')" -export LESS_TERMCAP_md="$(printf '%b' '')" -export LESS_TERMCAP_me="$(printf '%b' '')" -export LESS_TERMCAP_so="$(printf '%b' '')" -export LESS_TERMCAP_se="$(printf '%b' '')" -export LESS_TERMCAP_us="$(printf '%b' '')" -export LESS_TERMCAP_ue="$(printf '%b' '')" - -export MANPAGER=less -export XDG_CURRENT_DESKTOP="sway" - -#sfeed vars -export SFEED_PLUMBER="$BROWSER" -export SFEED_URL_FILE="$HOME/.local/share/sfeed/read" - -#set programs -export EDITOR=nvim -export BROWSER="browser.sh" - - -#lf icons -. "$HOME"/.config/lf/lf-icons.sh - -#fixes -#fix weird terminal issues -#export TERM="xterm-256color" -#fix arduino ide issues -export AWT_TOOLKIT=MToolkit diff --git a/.zshenv b/.zshenv new file mode 100644 index 0000000..558223f --- /dev/null +++ b/.zshenv @@ -0,0 +1 @@ +ZDOTDIR=$HOME/.config/zsh