From 3530b5e9eed145d9c8c9763ed55fdda157406937 Mon Sep 17 00:00:00 2001 From: JGill Date: Sat, 5 Oct 2024 13:48:02 +0930 Subject: [PATCH 1/5] Added example to remove unwanted ohmyzsh plugins --- example-config/personal_rc.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/example-config/personal_rc.zsh b/example-config/personal_rc.zsh index 0a6360f..a39f210 100644 --- a/example-config/personal_rc.zsh +++ b/example-config/personal_rc.zsh @@ -4,6 +4,9 @@ # Additional OH-MY-ZSH plugins to enable plugins+=(lol httpie docker docker-compose pyenv pip) +# 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) From 6fb8752ad7b84b72b41008e53fd661ff22f194a2 Mon Sep 17 00:00:00 2001 From: JGill Date: Sat, 5 Oct 2024 13:48:46 +0930 Subject: [PATCH 2/5] Removed some clutter, keep zsh-autosuggestions by default --- README.md | 3 --- ezshrc.zsh | 14 +------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/README.md b/README.md index 98f248c..e7a9afc 100644 --- a/README.md +++ b/README.md @@ -21,14 +21,11 @@ Sets following useful aliases and ohmyzsh plugins. **You can add more or overwri * [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 ## Demo diff --git a/ezshrc.zsh b/ezshrc.zsh index d91325f..889ea74 100644 --- a/ezshrc.zsh +++ b/ezshrc.zsh @@ -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 @@ -167,7 +167,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 } @@ -180,17 +179,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 From e52be0e24535b0f9c90e16b1f3d9b95c64e97626 Mon Sep 17 00:00:00 2001 From: JGill Date: Sat, 5 Oct 2024 13:57:30 +0930 Subject: [PATCH 3/5] Cleanup --- README.md | 10 +++++----- example-config/personal_rc.zsh | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e7a9afc..1e80309 100644 --- a/README.md +++ b/README.md @@ -16,16 +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 * 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 * ipgeo - (curl "http://api.db-ip.com/v2/free/$1") - finds geo location from IP +* [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 diff --git a/example-config/personal_rc.zsh b/example-config/personal_rc.zsh index a39f210..1afef46 100644 --- a/example-config/personal_rc.zsh +++ b/example-config/personal_rc.zsh @@ -9,5 +9,4 @@ 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 From c8e14f857e44906ad2acd14f59c3e9e4abdb8d0d Mon Sep 17 00:00:00 2001 From: JGill Date: Sat, 5 Oct 2024 13:58:22 +0930 Subject: [PATCH 4/5] New alias a aa ; install eza to use --- ezshrc.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ezshrc.zsh b/ezshrc.zsh index 889ea74..4c195c3 100644 --- a/ezshrc.zsh +++ b/ezshrc.zsh @@ -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 From 5e60933c461ae0a3ed4307d556b0740270b3870b Mon Sep 17 00:00:00 2001 From: JGill Date: Sat, 5 Oct 2024 14:03:04 +0930 Subject: [PATCH 5/5] zsh-autosuggestions enabled by default --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1e80309..0569c16 100644 --- a/README.md +++ b/README.md @@ -63,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