Skip to content

Commit

Permalink
Merge pull request #37 from jotyGill/develop
Browse files Browse the repository at this point in the history
Cleanup and zsh-autosuggestions enabled be default
  • Loading branch information
jotyGill authored Oct 5, 2024
2 parents 9c8b666 + 5e60933 commit 02b515a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 23 deletions.
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,16 @@ Sets following useful aliases and ohmyzsh plugins. **You can add more or overwri
* l="ls -lah" - just type "l" instead of "ls -lah"
* alias k="k -h" - show human readable filesizes, in kb, mb etc
* e="exit"
* [x="extract"](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/extract) - extract any compressed files
* [z](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/z) - quickly jump to most visited directories
* [web-search](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/web-search) - search on the web from cli
* [sudo](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/sudo) - easily prefix your commands with sudo by pressing `esc` twice
* [systemd](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/systemd) - many useful aliases for systemd
* https - make httpie use https
* myip - (wget -qO- https://wtfismyip.com/text) - what's my ip: quickly find out external IP
* cheat - (https://github.com/chubin/cheat.sh) - cheatsheets in the terminal!
* speedtest - (curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python3 -) run speedtest on the fly
* dadjoke - (curl https://icanhazdadjoke.com) - terminally sick jokes
* dict - (curl "dict://dict.org/d:$1 $2 $3") - dictionary definitions
* ipgeo - (curl "http://api.db-ip.com/v2/free/$1") - finds geo location from IP
* corona - (curl "https://corona-stats.online/") - shows corona virus spread live stats
* [x="extract"](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/extract) - extract any compressed files
* [z](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/z) - quickly jump to most visited directories
* [web-search](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/web-search) - search on the web from cli
* [sudo](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/sudo) - easily prefix your commands with sudo by pressing `esc` twice
* [systemd](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/systemd) - many useful aliases for systemd

## Demo

Expand Down Expand Up @@ -66,7 +63,7 @@ You can also manually install Nerd Fonts of your choice.

* All oh-my-zsh plugins are installed under ~/.config/ezsh/oh-my-zsh/plugin, Other tools (fzf,marker,todo) are installed in ~/.config/ezsh/

* zsh-autosuggestions is not currently enabled due to a conflict with Marker. If you don't use Marker, enable it by adding `plugins+=(zsh-autosuggestions)` into your personal config file
* If you use Marker, disable zsh-autosuggestions as it has a conflict with Marker (completion looks ugly). Add `plugins=(${plugins:#(zsh-autosuggestions)})` into your personal config file to remove it

* The look of the shell can be very easily customised[https://github.com/bhilburn/powerlevel9k#prompt-customization] by overwriting POWERLEVEL10K settings
in your personal config file under ~/.config/ezsh/zshrc/ . See example setup under example/personal_rc.zsh
Expand Down
4 changes: 3 additions & 1 deletion example-config/personal_rc.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
# Additional OH-MY-ZSH plugins to enable
plugins+=(lol httpie docker docker-compose pyenv pip)

POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(virtualenv status command_execution_time background_jobs todo ram load rvm time)
# Remove OH-MY-ZSH plugins from the default config
plugins=(${plugins:#(zsh-autosuggestions|lol)})

POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(virtualenv status command_execution_time background_jobs todo ram load rvm time)

# Custom Aliases, add your personal aliases here
17 changes: 4 additions & 13 deletions ezshrc.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ POWERLEVEL9K_PROMPT_ON_NEWLINE=true
# Add wisely, as too many plugins slow down shell startup.
plugins=(
zsh-completions
# zsh-autosuggestions # disable when using marker, otherwise enable
zsh-autosuggestions # Disable if you are using Marker, otherwise enable
zsh-syntax-highlighting
history-substring-search
screen
Expand Down Expand Up @@ -151,6 +151,9 @@ alias myip="wget -qO- https://wtfismyip.com/text" # quickly show external ip add
alias l="ls --hyperlink=auto -lAhrtF" # show all except . .. , sort by recent, / at the end of folders, clickable
alias e="exit"
alias ip="ip --color=auto"
## Install EZA to use this. The better ls command
alias a='eza -la --git --colour-scale all -g --smart-group --icons always --hyperlink' #the new ls
alias aa='eza -la --git --colour-scale all -g --smart-group --icons always --hyperlink -s modified -r'#sort by new


# CUSTOM FUNCTIONS
Expand All @@ -167,7 +170,6 @@ cheat() {
fi
}


# Matrix screen saver! will run if you have installed "cmatrix"
# TMOUT=900
# TRAPALRM() { if command -v cmatrix &> /dev/null; then cmatrix -sb; fi }
Expand All @@ -180,17 +182,6 @@ dadjoke() {
curl https://icanhazdadjoke.com
}

# Find dictionary definition
dict() {
if [ "$3" ]; then
curl "dict://dict.org/d:$1 $2 $3"
elif [ "$2" ]; then
curl "dict://dict.org/d:$1 $2"
else
curl "dict://dict.org/d:$1"
fi
}

# Find geo info from IP
ipgeo() {
# Specify ip or your ip will be used
Expand Down

0 comments on commit 02b515a

Please sign in to comment.