Skip to content
forked from bokub/i3-config

🐍 A backup of my i3wm config

Notifications You must be signed in to change notification settings

oussaka/i3-config

 
 

Repository files navigation

i3-config

A backup of my i3wm config.

All these files should be placed in ~/.config/i3

System Files Tiles

Dependencies

Terminal color theme

Dracula theme for gnome-terminal

UI theme

Arc Theme with Arc-Darker variant

Prompt PS1

PROMPT_COMMAND=__prompt_command # Func to gen PS1 after CMDs

__prompt_command() {
    local EXIT="$?" # This needs to be first
    PS1=""
    local RCol='\[\e[0m\]'
    local Red='\[\e[1;31m\]'
    local Gre='\[\e[1;32m\]'
    local Yel='\[\e[0;33m\]'
    local Blu='\[\e[0;34m\]'
    local Pin='\[\e[0;36m\]'

    PS1+="${Blu}\w " # Path

    _BRANCH=$(git branch 2>/dev/null | grep '^*' | colrm 1 2) # Git branch
    if [ -n "$_BRANCH" ]; then
    	PS1+="${Pin}"
    	# Yellow color if dirty
    	[[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]] && PS1+="${Yel}"
    	PS1+="$_BRANCH "
	fi

    if [ $EXIT != 0 ]; then # Color depending on status
        PS1+="${Red}>"
    else
        PS1+="${Gre}>"
    fi
    PS1+=" ${RCol}" # Reset color
}

About

🐍 A backup of my i3wm config

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 81.7%
  • Perl 18.3%