Skip to content

Commit

Permalink
fix: New .zshrc configuration with the new p10k theme prompt (#27)
Browse files Browse the repository at this point in the history
* fix: Added base profile configuration for zsh

* fix: Removed `.bashrc` configuration file

* refactor: Moved dotfiles for zsh to `.config/zsh` direcotry

* fix: New `.zshrc` configuration with new p10k theme

Also moved `.aliases` to `.config` direcotry with the new name.

* refactor: Rename powerlevel10k configuration prompt
  • Loading branch information
mdsanima authored Jan 20, 2024
1 parent c136b19 commit 9a87c68
Show file tree
Hide file tree
Showing 7 changed files with 508 additions and 590 deletions.
116 changes: 0 additions & 116 deletions .bashrc

This file was deleted.

5 changes: 2 additions & 3 deletions .aliases → .config/aliasrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Copyright (c) 2023-2024 MDSANIMA DEV. All rights reserved.
# Licensed under the MIT license.

# Custom alias definitions. This file must be included in the `.bashrc` file for
# proper functioning.
# Custom alias definitions.


# Aliases for SSH connection to my Home Labs hosts
# Aliases for SSH connection to my home labs hosts
alias rpi0="ssh mdsanima@192.168.1.27"
alias rpi1="ssh mdsanima@192.168.1.32"
alias rpi2="ssh mdsanima@192.168.1.34"
Expand Down
81 changes: 81 additions & 0 deletions .config/zsh/.zshrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Copyright (c) 2023-2024 MDSANIMA DEV. All rights reserved.
# Licensed under the MIT license.

# This is a custom configuration `.zshrc` file for Linux system. You can use
# this script for all available hosts in your network.


# Enable Powerlevel10k instant prompt
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

# If you come from bash you might have to change your $PATH
export PATH="$HOME/bin:/usr/local/bin:$PATH"

# Path to oh-my-zsh installation
export ZSH="$HOME/.oh-my-zsh"

# Include ~/.local/bin in $PATH
export PATH="$HOME/.local/bin:$PATH"

# Terminal colors
export TERM="xterm-256color"

# For the locale
export LC_ALL="C"

# Disabled underline
(( ${+ZSH_HIGHLIGHT_STYLES} )) || typeset -A ZSH_HIGHLIGHT_STYLES
ZSH_HIGHLIGHT_STYLES[path]=none
ZSH_HIGHLIGHT_STYLES[path_prefix]=none

# Set name of the theme to load
ZSH_THEME="powerlevel10k/powerlevel10k"

# Use case-sensitive completion
CASE_SENSITIVE="true"

# Enable command auto-correction
ENABLE_CORRECTION="true"

# Display red dots whilst waiting for completion
COMPLETION_WAITING_DOTS="true"

# Adjustment to the right side
ZLE_RPROMPT_INDENT=0

# Execution time stamp shown in the history command output
HIST_STAMPS="yyyy-mm-dd"

# History settings
HISTSIZE=500000
SAVEHIST=500000
HISTFILE="$HOME/.cache/zsh/zsh_history"

# Adding date time before each commands
HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S "

# Share history between terminals
setopt SHARE_HISTORY
# Don't store history entries that start with a space
setopt HIST_IGNORE_SPACE

# Custom plugins to load
plugins=(git zsh-autosuggestions zsh-history-substring-search zsh-syntax-highlighting)

# Add zsh terminal
source "$ZSH/oh-my-zsh.sh"

# You can turn this off if you don't want to use it, just type predict-off
autoload predict-on
predict-on

# Async auto suggestions
unset ZSH_AUTOSUGGEST_USE_ASYNC

This comment has been minimized.

Copy link
@mdsanima

mdsanima Feb 1, 2024

Author Contributor

Adding this line for fixing the bad file descriptor, bug on installation p10k on ZSH Shell.

Here is a reference romkatv/powerlevel10k#1554 (comment) and the resolving code!


# Alias definitions
[ -f "$HOME/.config/aliasrc" ] && source "$HOME/.config/aliasrc"

# Custom powerlevel10k settings
[ -f "$HOME/.config/zsh/p10k-mdsanima.zsh" ] && source "$HOME/.config/zsh/p10k-mdsanima.zsh"
Loading

0 comments on commit 9a87c68

Please sign in to comment.