mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 06:12:34 +00:00
Working on cleaning up zshrc and aliases
This commit is contained in:
@@ -1,8 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
for font in /opt/homebrew/share/figlet/fonts/*.flf; do
|
set -e
|
||||||
|
|
||||||
|
font_dir="$(brew --prefix)/share/figlet/fonts"
|
||||||
|
|
||||||
|
for font in "${font_dir}"/*.flf; do
|
||||||
clear
|
clear
|
||||||
echo "FONT: $font"
|
echo "FONT: $font"
|
||||||
figlet -f "${font}" hello
|
figlet -f "${font}" hello
|
||||||
read line
|
read -r line
|
||||||
done
|
done
|
||||||
|
|||||||
8
scripts/.local/scripts/banner
Executable file
8
scripts/.local/scripts/banner
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
message="${1:-m-housh}"
|
||||||
|
font="${2:-puffy}"
|
||||||
|
|
||||||
|
echo "${message}" | figlet -c -f "${font}"
|
||||||
7
scripts/.local/scripts/dots
Executable file
7
scripts/.local/scripts/dots
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Open dotfiles.
|
||||||
|
|
||||||
|
cd "$DOTFILES" && vim .
|
||||||
5
scripts/.local/scripts/l
Executable file
5
scripts/.local/scripts/l
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Lists files and directories, including hidden files.
|
||||||
|
|
||||||
|
ls -lah --color "$@"
|
||||||
@@ -1,7 +1,18 @@
|
|||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
# _
|
||||||
|
# _______| |__ _ __ ___
|
||||||
|
# |_ / __| '_ \| '__/ __|
|
||||||
|
# / /\__ \ | | | | | (__
|
||||||
|
# /___|___/_| |_|_| \___|
|
||||||
|
#
|
||||||
|
#
|
||||||
#------------------------------ utilites ------------------------------
|
#------------------------------ utilites ------------------------------
|
||||||
_source_if() { [[ -r "$1" ]] && source "$1" }
|
|
||||||
|
_source_if() { test -r "$1" && source "$1" || return 0 }
|
||||||
|
|
||||||
|
# Load Useful Functions
|
||||||
|
_source_if "$ZDOTDIR/zsh-functions"
|
||||||
|
|
||||||
#------------------------------ exports ------------------------------
|
#------------------------------ exports ------------------------------
|
||||||
export ZDOTDIR="$HOME/.config/zsh"
|
export ZDOTDIR="$HOME/.config/zsh"
|
||||||
@@ -34,9 +45,6 @@ zle -N down-line-or-beginning-search
|
|||||||
# Colors
|
# Colors
|
||||||
autoload -Uz colors && colors
|
autoload -Uz colors && colors
|
||||||
|
|
||||||
# Load Useful Functions
|
|
||||||
_source_if "$ZDOTDIR/zsh-functions"
|
|
||||||
|
|
||||||
#------------------------------ path ------------------------------
|
#------------------------------ path ------------------------------
|
||||||
|
|
||||||
path_append() {
|
path_append() {
|
||||||
@@ -120,7 +128,7 @@ setopt aliases
|
|||||||
bindkey -v
|
bindkey -v
|
||||||
|
|
||||||
#zsh_add_file "zsh-exports"
|
#zsh_add_file "zsh-exports"
|
||||||
zsh_add_file "zsh-aliases"
|
#zsh_add_file "zsh-aliases"
|
||||||
|
|
||||||
# Plugins
|
# Plugins
|
||||||
zsh_add_plugin "zsh-users/zsh-autosuggestions"
|
zsh_add_plugin "zsh-users/zsh-autosuggestions"
|
||||||
@@ -147,4 +155,3 @@ prompt pure
|
|||||||
#------------------------------ local configs ------------------------------
|
#------------------------------ local configs ------------------------------
|
||||||
_source_if "$ZDOTDIR/.zshrc-local"
|
_source_if "$ZDOTDIR/.zshrc-local"
|
||||||
|
|
||||||
cat < "$ZDOTDIR/banner"
|
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
_ _
|
|
||||||
_ __ ___ | |__ ___ _ _ ___ | |__
|
|
||||||
| '_ ` _ \ _____ | '_ \ / _ \ | | | |/ __|| '_ \
|
|
||||||
| | | | | ||_____|| | | || (_) || |_| |\__ \| | | |
|
|
||||||
|_| |_| |_| |_| |_| \___/ \__,_||___/|_| |_|
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ alias cl() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# move into the ~/.dotfiles directory
|
# move into the ~/.dotfiles directory
|
||||||
alias cdots="cd ${HOME}/.dotfiles"
|
alias cdots() { cd "${HOME}/.dotfiles" }
|
||||||
|
|
||||||
# move into zsh config files
|
# move into zsh config files
|
||||||
alias zdots="vi ${ZDOTDIR}"
|
alias zdots="vi ${ZDOTDIR}"
|
||||||
@@ -33,7 +33,7 @@ alias dots="vi $DOTFILES"
|
|||||||
#alias mkcd() { mkdir $1 && cd $1 }
|
#alias mkcd() { mkdir $1 && cd $1 }
|
||||||
|
|
||||||
# list files and directories, including hidden files
|
# list files and directories, including hidden files
|
||||||
alias l() { ls -lah "$@" }
|
#alias l() { ls -lah --color "$@" }
|
||||||
|
|
||||||
# editor
|
# editor
|
||||||
alias vim() { nvim "$@" }
|
alias vim() { nvim "$@" }
|
||||||
@@ -50,7 +50,7 @@ alias gp() { git push }
|
|||||||
alias gs() { git status }
|
alias gs() { git status }
|
||||||
|
|
||||||
# move back to old cwd
|
# move back to old cwd
|
||||||
alias bk() { cd "$OLDPWD" }
|
alias bk="cd $OLDPWD"
|
||||||
|
|
||||||
# My mac-mini specific aliases
|
# My mac-mini specific aliases
|
||||||
# if [ $(hostname -s) = "Michaels-Mac-mini" ]; then
|
# if [ $(hostname -s) = "Michaels-Mac-mini" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user