diff --git a/README.md b/README.md index d2b2866..1ef63cd 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,8 @@ # 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 -Specify the features you want in the cat command - -## Example -'''cat base.zsh mkcd.zsh update.zsh > ~/.zshrc''' +- Copy zshrc to ~/.zshrc +- Copy wanted modules into ~/.zsh folder diff --git a/rsync.plugin.zsh b/rsync.plugin.zsh deleted file mode 100644 index 1b3e26e..0000000 --- a/rsync.plugin.zsh +++ /dev/null @@ -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" diff --git a/update.zsh b/update.zsh deleted file mode 100644 index d018be3..0000000 --- a/update.zsh +++ /dev/null @@ -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 -} diff --git a/exa.zsh b/zsh/exa.zsh similarity index 98% rename from exa.zsh rename to zsh/exa.zsh index 5b1c7b0..8143cc4 100644 --- a/exa.zsh +++ b/zsh/exa.zsh @@ -1,4 +1,3 @@ - alias ls="exa" alias l="exa -l" alias la="exa -la" diff --git a/mac_files.zsh b/zsh/mac_files.zsh similarity index 99% rename from mac_files.zsh rename to zsh/mac_files.zsh index e5c10e8..5dcd9de 100644 --- a/mac_files.zsh +++ b/zsh/mac_files.zsh @@ -1,4 +1,3 @@ - function find_mac_files() { find . -name '.DS_Store'; find . -name '._*'; diff --git a/media.zsh b/zsh/media.zsh similarity index 99% rename from media.zsh rename to zsh/media.zsh index 6f9fc2f..b610c3d 100644 --- a/media.zsh +++ b/zsh/media.zsh @@ -1,4 +1,3 @@ - function convert() { for i in *.$1; do ffmpeg -i "$i" "${i%.*}.$2"; done } diff --git a/mkcd.zsh b/zsh/mkcd.zsh similarity index 97% rename from mkcd.zsh rename to zsh/mkcd.zsh index 63bf139..57ac072 100644 --- a/mkcd.zsh +++ b/zsh/mkcd.zsh @@ -1,4 +1,3 @@ - function mkcd() { mkdir $1 && cd $1 } diff --git a/zsh/vars.zsh b/zsh/vars.zsh new file mode 100644 index 0000000..98fcf4d --- /dev/null +++ b/zsh/vars.zsh @@ -0,0 +1,2 @@ +export EDITOR="micro" +export PATH=~/bin:$PATH diff --git a/video_presets.zsh b/zsh/video_presets.zsh similarity index 99% rename from video_presets.zsh rename to zsh/video_presets.zsh index 054edcf..ad9ac69 100644 --- a/video_presets.zsh +++ b/zsh/video_presets.zsh @@ -1,4 +1,3 @@ - function mkVideoProj() { mkdir $1 && cd $1; mkdir -p Media; diff --git a/youtube-dl.zsh b/zsh/youtube-dl.zsh similarity index 99% rename from youtube-dl.zsh rename to zsh/youtube-dl.zsh index 7f60037..b1dc84b 100644 --- a/youtube-dl.zsh +++ b/zsh/youtube-dl.zsh @@ -1,4 +1,3 @@ - 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 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() { cat $1 |xargs -I _ yt-dlp --downloader aria2c _ } - diff --git a/base.zsh b/zshrc similarity index 90% rename from base.zsh rename to zshrc index 04ab6d7..7b8d650 100644 --- a/base.zsh +++ b/zshrc @@ -3,8 +3,13 @@ autoload -U colors && colors autoload -Uz 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%}% $ " +fi setopt histignorealldups sharehistory 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:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' -# Config - -export EDITOR="micro" -export PATH=~/bin:$PATH -alias zshconfig="$EDITOR ~/.zshrc" -alias zshrefresh="source ~/.zshrc" +for f in $HOME/.zsh/* +do + source "$f" +done \ No newline at end of file