mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-25 20:54:34 +00:00
Update aliases
This commit is contained in:
parent
08929b8360
commit
6aeff61f59
|
@ -38,13 +38,13 @@ alias rrf='rmr -rf'
|
||||||
alias vimdiff='nvim -d'
|
alias vimdiff='nvim -d'
|
||||||
|
|
||||||
# Directory listing aliases, defaults to exa, if aviable
|
# Directory listing aliases, defaults to exa, if aviable
|
||||||
if command -v exa > /dev/null; then
|
if command -v eza > /dev/null; then
|
||||||
alias ls='exa'
|
alias ls='eza'
|
||||||
alias l='exa -glah --classify'
|
alias l='eza -glah --classify'
|
||||||
alias ll='exa -glah --classify -s=size --group-directories-first -r'
|
alias ll='eza -glah --classify -s=size --group-directories-first -r'
|
||||||
alias ldir='exa -glahD'
|
alias ldir='eza -glahD'
|
||||||
alias tree='exa -Tlagh'
|
alias tree='eza -Tlagh'
|
||||||
alias dotall='exa -hulad .[a-z]*' # Show both dotdirs and dotfiles
|
alias dotall='eza -hulad .[a-z]*' # Show both dotdirs and dotfiles
|
||||||
alias dotfiles='dotall | grep -v ^d' # Show all dotfiles
|
alias dotfiles='dotall | grep -v ^d' # Show all dotfiles
|
||||||
alias dotdirs='dotall | grep --color=never ^d' # Show all dotdirs
|
alias dotdirs='dotall | grep --color=never ^d' # Show all dotdirs
|
||||||
else
|
else
|
||||||
|
@ -71,7 +71,7 @@ alias cftodo='vim ~/Personal/vimwiki/todo.md'
|
||||||
alias cfnvim='vim ~/.config/nvim'
|
alias cfnvim='vim ~/.config/nvim'
|
||||||
alias cfvim='cfnvim'
|
alias cfvim='cfnvim'
|
||||||
alias cfgit='vim ~/.config/git/config'
|
alias cfgit='vim ~/.config/git/config'
|
||||||
alias cfhypr='vim ~/.config/hypr/hyprland.conf'
|
alias cfhypr='vim ~/.config/hypr'
|
||||||
alias cfsway='vim ~/.config/sway/config'
|
alias cfsway='vim ~/.config/sway/config'
|
||||||
|
|
||||||
# z.lua shortcuts
|
# z.lua shortcuts
|
||||||
|
@ -225,6 +225,12 @@ alias yta-best='youtube-dl --extract-audio --audio-format best'
|
||||||
alias yta-mp3='youtube-dl --extract-audio --audio-format mp3'
|
alias yta-mp3='youtube-dl --extract-audio --audio-format mp3'
|
||||||
alias yta-wav='youtube-dl --extract-audio --audio-format wav'
|
alias yta-wav='youtube-dl --extract-audio --audio-format wav'
|
||||||
|
|
||||||
|
# Hyprland aliases
|
||||||
|
alias hyprlog-cur-path='echo "/tmp/hypr/$(exa --sort created --group-directories-first --reverse --oneline --color never --no-icons /tmp/hypr | head -n 1)/hyprland.log"'
|
||||||
|
alias hyprlog-last-path='echo "/tmp/hypr/$(exa --sort created --group-directories-first --reverse --oneline --color never --no-icons /tmp/hypr | head -n 2 | tail -n 1)/hyprland.log"'
|
||||||
|
alias hyprlog-cur='bat $(hyprlog-cur-path)'
|
||||||
|
alias hyprlog-last='bat $(hyprlog-last-path)'
|
||||||
|
|
||||||
# Terminal vim-like exits, in case I think the terminal is vim
|
# Terminal vim-like exits, in case I think the terminal is vim
|
||||||
alias :q='exit'
|
alias :q='exit'
|
||||||
alias :q!='exit'
|
alias :q!='exit'
|
||||||
|
@ -239,10 +245,19 @@ alias vimwiki='vim -c VimwikiIndex' # Open vimwiki index
|
||||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||||
alias tty-clock='tty-clock -Ssc' # Terminal clock screensaver
|
alias tty-clock='tty-clock -Ssc' # Terminal clock screensaver
|
||||||
alias rick='curl -s -L https://raw.githubusercontent.com/ItsDrike/rickrollrc/master/roll.sh| bash' # Terminal rickroll
|
alias rick='curl -s -L https://raw.githubusercontent.com/ItsDrike/rickrollrc/master/roll.sh| bash' # Terminal rickroll
|
||||||
|
alias nf='neofetch'
|
||||||
alias hist='fc -lt "$HISTTIMEFORMAT" 1'
|
alias hist='fc -lt "$HISTTIMEFORMAT" 1'
|
||||||
alias sudovim='sudoedit'
|
alias sudovim='sudoedit'
|
||||||
alias cls='clear'
|
alias cls='clear'
|
||||||
|
|
||||||
|
# Kitty terminal kitten shorthands
|
||||||
|
if [ "$TERM" = "xterm=kitty" ]; then
|
||||||
|
alias hls='\ls --hyperlink=auto'
|
||||||
|
alias hg='kitty +kitten hyperlinked_grep'
|
||||||
|
alias transfer='kitty +kitten transfer'
|
||||||
|
alias icat='kitty +kitten icat'
|
||||||
|
fi
|
||||||
|
|
||||||
# If user is not root, pass all commands via sudo/doas
|
# If user is not root, pass all commands via sudo/doas
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
# Enable aliases to be sudoed/doased
|
# Enable aliases to be sudoed/doased
|
||||||
|
@ -257,6 +272,9 @@ if [ "$(id -u)" -ne 0 ]; then
|
||||||
command -v /usr/bin/doas > /dev/null && alias doas='doas ' && alias sudo='doas '
|
command -v /usr/bin/doas > /dev/null && alias doas='doas ' && alias sudo='doas '
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# XDG Base Directory fixes
|
||||||
|
alias nvidia-settings='nvidia-settings --config=$XDG_CONFIG_HOME/nvidia/settings'
|
||||||
|
|
||||||
# enable color support
|
# enable color support
|
||||||
if [ -x /usr/bin/dircolors ]; then
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
(test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)") || eval "$(dircolors -b)"
|
(test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)") || eval "$(dircolors -b)"
|
||||||
|
|
Loading…
Reference in a new issue