Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion configs/inputrc

This file was deleted.

27 changes: 21 additions & 6 deletions defaults/bash/aliases
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
# File system
alias ls='eza -lh --group-directories-first --icons=auto'
alias lsa='ls -a'
alias lt='eza --tree --level=2 --long --icons --git'
alias lta='lt -a'
if command -v eza &> /dev/null; then
alias ls='eza -lh --group-directories-first --icons=auto'
alias lsa='ls -a'
alias lt='eza --tree --level=2 --long --icons --git'
alias lta='lt -a'
fi

alias ff="fzf --preview 'batcat --style=numbers --color=always {}'"
alias fd='fdfind'
alias cd='z'

if command -v zoxide &> /dev/null; then
alias cd="zd"
zd() {
if [ $# -eq 0 ]; then
builtin cd ~ && return
elif [ -d "$1" ]; then
builtin cd "$1"
else
z "$@" && printf "\U000F17A9 " && pwd || echo "Error: Directory not found"
fi
}
fi

# Directories
alias ..='cd ..'
Expand All @@ -14,14 +29,14 @@ alias ....='cd ../../..'

# Tools
n() { if [ "$#" -eq 0 ]; then nvim .; else nvim "$@"; fi; }
alias g='git'
alias d='docker'
alias r='rails'
alias bat='batcat'
alias lzg='lazygit'
alias lzd='lazydocker'

# Git
alias g='git'
alias gcm='git commit -m'
alias gcam='git commit -a -m'
alias gcad='git commit -a --amend'
3 changes: 1 addition & 2 deletions configs/bashrc → defaults/bash/envs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
source ~/.local/share/omakub/defaults/bash/rc

# Editor used by CLI
export EDITOR="nvim"
export SUDO_EDITOR="$EDITOR"
export BAT_THEME=ansi
2 changes: 2 additions & 0 deletions defaults/bash/rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ source ~/.local/share/omakub/defaults/bash/aliases
source ~/.local/share/omakub/defaults/bash/functions
source ~/.local/share/omakub/defaults/bash/prompt
source ~/.local/share/omakub/defaults/bash/init
source ~/.local/share/omakub/defaults/bash/envs
[[ $- == *i* ]] && bind -f ~/.local/share/omakub/defaults/bash/inputrc
14 changes: 14 additions & 0 deletions defaults/bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# All the default Omakub aliases and functions
# (don't mess with these directly, just overwrite them here!)
source ~/.local/share/omakub/defaults/bash/rc

# Add your own exports, aliases, and functions here.
#
# Make an alias for invoking commands you use constantly
# alias p='python'
#
# Use VSCode instead of neovim as your default editor
# export EDITOR="code"
#
# Set a custom prompt with the directory revealed
# PS1="\W \[\e]0;\w\a\]$PS1"
2 changes: 1 addition & 1 deletion defaults/xcompose
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ include "%L"
<Multi_key> <m> <b> : "🤯" # blowing

# Typography
<Multi_key> <space> <space> : "—"
<Multi_key> <space> <space> : "—"
9 changes: 2 additions & 7 deletions install/terminal/a-shell.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
#!/bin/bash

# Configure the bash shell using Omakub defaults
[ -f ~/.bashrc ] && mv ~/.bashrc ~/.bashrc.bak
cp ~/.local/share/omakub/configs/bashrc ~/.bashrc
cp ~/.local/share/omakub/defaults/bashrc ~/.bashrc

# Load the PATH for use later in the installers
source ~/.local/share/omakub/defaults/bash/shell

[ -f ~/.inputrc ] && mv ~/.inputrc ~/.inputrc.bak
# Configure the inputrc using Omakub defaults
cp ~/.local/share/omakub/configs/inputrc ~/.inputrc
source ~/.local/share/omakub/defaults/bash/shell
7 changes: 7 additions & 0 deletions migrations/1762596558.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

echo "Move .bashrc to use Omakub defaults"

mv ~/.bashrc ~/.bashrc.bak
mv ~/.inputrc ~/.inputrc.bak
cp ~/.local/share/omakub/defaults/bashrc ~/.bashrc