update
This commit is contained in:
parent
3ee2f4c885
commit
9765a9e04a
11 changed files with 15 additions and 54 deletions
|
@ -1,10 +1,8 @@
|
||||||
# ZSH Config Snippets
|
# ZSH Config Snippets
|
||||||
|
|
||||||
This is a Collection of little ZSHRC Snippets that can be modularly merged into one .zshrc file
|
Simple ZSH Module Configurations
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
Specify the features you want in the cat command
|
- Copy zshrc to ~/.zshrc
|
||||||
|
- Copy wanted modules into ~/.zsh folder
|
||||||
## Example
|
|
||||||
'''cat base.zsh mkcd.zsh update.zsh > ~/.zshrc'''
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
|
|
||||||
alias rsync-copy="rsync -avz --progress -h"
|
|
||||||
alias rsync-move="rsync -avz --progress -h --remove-source-files"
|
|
||||||
alias rsync-update="rsync -avzu --progress -h"
|
|
||||||
alias rsync-synchronize="rsync -avzu --delete --progress -h"
|
|
||||||
alias rsync-backup="rsync -avzhruP --update"
|
|
29
update.zsh
29
update.zsh
|
@ -1,29 +0,0 @@
|
||||||
|
|
||||||
function update() {
|
|
||||||
if type "apt-get" &> /dev/null; then
|
|
||||||
sudo apt-get update;
|
|
||||||
sudo apt-get upgrade;
|
|
||||||
sudo apt-get dist-upgrade;
|
|
||||||
fi
|
|
||||||
if type "apk" &> /dev/null; then
|
|
||||||
sudo apk update;
|
|
||||||
sudo apk upgrade;
|
|
||||||
fi
|
|
||||||
if type "pacman" &> /dev/null; then
|
|
||||||
sudo pacman -Syu;
|
|
||||||
fi
|
|
||||||
if type "yum" &> /dev/null; then
|
|
||||||
yum upgrade;
|
|
||||||
fi
|
|
||||||
if type "snap" &> /dev/null; then
|
|
||||||
sudo snap refresh;
|
|
||||||
fi
|
|
||||||
if type "flatpak" &> /dev/null; then
|
|
||||||
flatpak update;
|
|
||||||
fi
|
|
||||||
if type "brew" &> /dev/null; then
|
|
||||||
brew update;
|
|
||||||
brew upgrade;
|
|
||||||
brew cask upgrade;
|
|
||||||
fi
|
|
||||||
}
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
alias ls="exa"
|
alias ls="exa"
|
||||||
alias l="exa -l"
|
alias l="exa -l"
|
||||||
alias la="exa -la"
|
alias la="exa -la"
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
function find_mac_files() {
|
function find_mac_files() {
|
||||||
find . -name '.DS_Store';
|
find . -name '.DS_Store';
|
||||||
find . -name '._*';
|
find . -name '._*';
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
function convert() {
|
function convert() {
|
||||||
for i in *.$1; do ffmpeg -i "$i" "${i%.*}.$2"; done
|
for i in *.$1; do ffmpeg -i "$i" "${i%.*}.$2"; done
|
||||||
}
|
}
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
function mkcd() {
|
function mkcd() {
|
||||||
mkdir $1 && cd $1
|
mkdir $1 && cd $1
|
||||||
}
|
}
|
2
zsh/vars.zsh
Normal file
2
zsh/vars.zsh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
export EDITOR="micro"
|
||||||
|
export PATH=~/bin:$PATH
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
function mkVideoProj() {
|
function mkVideoProj() {
|
||||||
mkdir $1 && cd $1;
|
mkdir $1 && cd $1;
|
||||||
mkdir -p Media;
|
mkdir -p Media;
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
alias downloadVid="yt-dlp --downloader aria2c -o \"%(title)s.%(ext)s\" -f \"bestvideo[height<=1080]+bestaudio\" --write-thumbnail"
|
alias downloadVid="yt-dlp --downloader aria2c -o \"%(title)s.%(ext)s\" -f \"bestvideo[height<=1080]+bestaudio\" --write-thumbnail"
|
||||||
alias downloadVid1440="yt-dlp --downloader aria2c -o \"%(title)s.%(ext)s\" -f \"bestvideo[height<=1440]+bestaudio\" --write-thumbnail"
|
alias downloadVid1440="yt-dlp --downloader aria2c -o \"%(title)s.%(ext)s\" -f \"bestvideo[height<=1440]+bestaudio\" --write-thumbnail"
|
||||||
alias downloadVid4K="yt-dlp --downloader aria2c -o \"%(title)s.%(ext)s\" -f \"bestvideo[height<=2160]+bestaudio\" --write-thumbnail"
|
alias downloadVid4K="yt-dlp --downloader aria2c -o \"%(title)s.%(ext)s\" -f \"bestvideo[height<=2160]+bestaudio\" --write-thumbnail"
|
||||||
|
@ -9,4 +8,3 @@ alias downloadYT="yt-dlp --downloader aria2c --write-thumbnail -o \"%(title)s.%(
|
||||||
function downloadList() {
|
function downloadList() {
|
||||||
cat $1 |xargs -I _ yt-dlp --downloader aria2c _
|
cat $1 |xargs -I _ yt-dlp --downloader aria2c _
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,13 @@
|
||||||
autoload -U colors && colors
|
autoload -U colors && colors
|
||||||
autoload -Uz promptinit
|
autoload -Uz promptinit
|
||||||
promptinit
|
promptinit
|
||||||
#prompt adam1
|
#prompt
|
||||||
|
if [ $(id -u) -eq 0 ]
|
||||||
|
then
|
||||||
|
PS1="%{$fg[red]%}%n@%m: %{$fg[blue]%}%~ %{$reset_color%}% $ "
|
||||||
|
else
|
||||||
PS1="%{$fg[green]%}%n@%m: %{$fg[blue]%}%~ %{$reset_color%}% $ "
|
PS1="%{$fg[green]%}%n@%m: %{$fg[blue]%}%~ %{$reset_color%}% $ "
|
||||||
|
fi
|
||||||
|
|
||||||
setopt histignorealldups sharehistory
|
setopt histignorealldups sharehistory
|
||||||
setopt autocd
|
setopt autocd
|
||||||
|
@ -38,9 +43,7 @@ zstyle ':completion:*' verbose true
|
||||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
||||||
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
||||||
|
|
||||||
# Config
|
for f in $HOME/.zsh/*
|
||||||
|
do
|
||||||
export EDITOR="micro"
|
source "$f"
|
||||||
export PATH=~/bin:$PATH
|
done
|
||||||
alias zshconfig="$EDITOR ~/.zshrc"
|
|
||||||
alias zshrefresh="source ~/.zshrc"
|
|
Loading…
Add table
Reference in a new issue