Removed old files and made p independent
This commit is contained in:
1712
home/.p10k.zsh
1712
home/.p10k.zsh
File diff suppressed because it is too large
Load Diff
68
home/.zshrc
68
home/.zshrc
@@ -1,68 +0,0 @@
|
||||
# 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.
|
||||
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
|
||||
|
||||
# Open VSCode from the terminal
|
||||
code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;}
|
||||
|
||||
source $HOME/dotfiles/scripts/p.sh
|
||||
|
||||
# Shortcuts to extract files
|
||||
extract () {
|
||||
if [[ -z $* ]]; then
|
||||
echo "No files provided for extraction."
|
||||
return 1
|
||||
fi
|
||||
|
||||
for file in "$@"; do
|
||||
case "${file##*.}" in
|
||||
(zip) unzip "$file" ;;
|
||||
(tar.gz|tgz|gzip) tar -xzf "$file" ;;
|
||||
(tar.bz2|tbz2) tar -xf "$file" ;;
|
||||
(bz2) bunzip2 "$file" ;;
|
||||
(*) echo "Unsupported file format: $file" ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
zstyle ':omz:update' mode auto # update automatically without asking
|
||||
zstyle ':omz:update' frequency 7
|
||||
|
||||
# Uncomment the following line if pasting URLs and other text is messed up.
|
||||
# DISABLE_MAGIC_FUNCTIONS="true"
|
||||
|
||||
# Uncomment the following line to enable command auto-correction.
|
||||
ENABLE_CORRECTION="true"
|
||||
|
||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||
# You can also set it to another string to have that shown instead of the default red dots.
|
||||
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
|
||||
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
|
||||
# COMPLETION_WAITING_DOTS="true"
|
||||
|
||||
plugins=(git)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# Preferred editor for local and remote sessions
|
||||
if [[ -n $SSH_CONNECTION ]]; then
|
||||
export EDITOR='zed'
|
||||
else
|
||||
export EDITOR='zed'
|
||||
fi
|
||||
|
||||
# Compilation flags
|
||||
# export ARCHFLAGS="-arch x86_64"
|
||||
|
||||
#
|
||||
# Example aliases
|
||||
# alias zshconfig="mate ~/.zshrc"
|
||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
17
scripts/p.sh
17
scripts/p.sh
@@ -1,7 +1,20 @@
|
||||
#! /bin/bash
|
||||
# Cross-distro package manager wrapper
|
||||
# Cross-distro package manager UI
|
||||
|
||||
source ~/dotfiles/scripts/color.sh
|
||||
RED="\e[31m"
|
||||
GREEN="\e[32m"
|
||||
YELLOW="\e[33m"
|
||||
BLUE="\e[34m"
|
||||
MAGENTA="\e[35m"
|
||||
CYAN="\e[36m"
|
||||
GRAY="\e[90m"
|
||||
|
||||
BOLD="\e[1m"
|
||||
FAINT="\e[2m"
|
||||
ITALIC="\e[3m"
|
||||
UNDERLINE="\e[4m"
|
||||
|
||||
ENDCOLOR="\e[0m"
|
||||
|
||||
detectDistro() {
|
||||
if [ "$(uname -s)" = "Darwin" ]; then
|
||||
|
||||
Reference in New Issue
Block a user