This commit is contained in:
Clay Gomera 2022-04-26 15:19:29 -04:00
parent e51e4279c1
commit 0f97b3b8b4
5 changed files with 189 additions and 115 deletions

215
.bashrc
View file

@ -5,7 +5,7 @@
## /_____/_/ \__,_/_/|_|\___/ My custom bash config
##
### EXPORT
### EXPORT ###
export TERM="xterm-256color" # getting proper colors
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
export EDITOR="nvim" # $EDITOR use neovim
@ -17,20 +17,26 @@ export XDG_DATA_HOME=${XDG_DATA_HOME:="$HOME/.local/share"}
export XDG_CACHE_HOME=${XDG_CACHE_HOME:="$HOME/.cache"}
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:="$HOME/.config"}
# Use bash-completion, if available
# use bash-completion, if available
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \
. /usr/share/bash-completion/bash_completion
# If not running interactively, don't do anything
# if not running interactively, don't do anything
[[ $- != *i* ]] && return
# use neovim for vim if present.
[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"
# use $XINITRC variable if file exists.
[ -f "$XINITRC" ] && alias startx="startx $XINITRC"
### SET VI MODE ###
# Comment this line out to enable default emacs-like bindings
set -o vi
bind -m vi-command 'Control-l: clear-screen'
bind -m vi-insert 'Control-l: clear-screen'
### PATH
### PATH ###
if [ -d "$HOME/.bin" ] ;
then PATH="$HOME/.bin:$PATH"
fi
@ -43,7 +49,7 @@ if [ -d "$HOME/Applications" ] ;
then PATH="$HOME/Applications:$PATH"
fi
### CHANGE TITLE OF TERMINALS
### CHANGE TITLE OF TERMINALS ###
case ${TERM} in
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|alacritty|st|konsole*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"'
@ -53,7 +59,7 @@ case ${TERM} in
;;
esac
### SHOPT
### SHOPT ###
shopt -s autocd # change to named directory
shopt -s cdspell # autocorrects cd misspellings
shopt -s cmdhist # save multi-line commands in history as single line
@ -65,7 +71,12 @@ shopt -s checkwinsize # checks term size when bash regains control
# ignore upper and lowercase when TAB completion
bind "set completion-ignore-case on"
### ARCHIVE EXTRACTION
# sudo not required for some system commands
for command in mount umount poweroff reboot ; do
alias $command="sudo $command"
done; unset command
### ARCHIVE EXTRACTION ###
# usage: ex <file>
ex ()
{
@ -92,7 +103,7 @@ ex ()
fi
}
### ALIASES
### ALIASES ###
# navigation
up () {
local d=""
@ -113,118 +124,122 @@ up () {
fi
}
alias ..='cd ..'
alias .2='cd ../..'
alias .3='cd ../../..'
alias .4='cd ../../../..'
alias .5='cd ../../../../..'
# cd
alias \
..="cd .." \
.2="cd ../.." \
.3="cd ../../.." \
.4="cd ../../../.." \
.5="cd ../../../../.."
# bat as cat
alias cat='bat'
# editors
alias vim='nvim'
[ -x "$(command -v bat)" ] && alias cat="bat"
# Changing "ls" to "exa"
alias ls='exa -al --color=always --group-directories-first' # my preferred listing
alias la='exa -a --color=always --group-directories-first' # all files and dirs
alias ll='exa -l --color=always --group-directories-first' # long format
alias lt='exa -aT --color=always --group-directories-first' # tree listing
alias l.='exa -a | egrep "^\."'
alias \
ls="exa -al --color=always --group-directories-first" \
la="exa -a --color=always --group-directories-first" \
ll="exa -l --color=always --group-directories-first" \
lt="exa -aT --color=always --group-directories-first" \
l.='exa -a | egrep "^\."'
# xbps
alias xb-up='sudo xbps-install -Su && xcheckrestart' # Refresh pkglist & update standard pkgs
alias xb-get='sudo xbps-install -S' # Install a package
alias xb-rmv='sudo xbps-remove -R' # Remove a package with all its dependencies
alias xb-rmv-sec='sudo xbps-remove' # Remove a package with all its dependencies (secure way)
alias xb-qry='sudo xbps-query' # Repo query
alias xb-cln='sudo xbps-remove -o && sudo xbps-remove -O' # remove orphaned packages
alias \
xb-up="sudo xbps-install -Su && xcheckrestart" \
xb-get="sudo xbps-install -S" \
xb-rmv="sudo xbps-remove -R" \
xb-rmv-sec="sudo xbps-remove" \
xb-qry="sudo xbps-query" \
xb-cln="sudo xbps-remove -o && sudo xbps-remove -O"
# Colorize grep output (good for log files)
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
# confirm before overwriting something
alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'
# colorize grep output (good for log files)
alias \
grep="grep --color=auto" \
egrep="egrep --color=auto" \
fgrep="fgrep --color=auto"
# git
alias addup='git add -u'
alias addall='git add .'
alias branch='git branch'
alias checkout='git checkout'
alias clone='git clone'
alias commit='git commit -m'
alias fetch='git fetch'
alias pull='git pull origin'
alias push='git push origin'
alias stat='git status' # 'status' is protected name so using 'stat' instead
alias tag='git tag'
alias newtag='git tag -a'
alias \
addup="git add -u" \
addall="git add ." \
branch="git branch" \
checkout="git checkout" \
clone="git clone" \
commit="git commit -m" \
fetch="git fetch" \
pull="git pull origin" \
push="git push origin" \
stat="git status" \
tag="git tag" \
newtag="git tag -a"
# adding flags
alias df='df -h' # human-readable sizes
alias free='free -m' # show sizes in MB
alias newsboat='newsboat -u ~/.config/newsboat/urls' # start newsboat with my urls file
alias \
df="df -h" \
free="free -m" \
newsboat="newsboat -u ~/.config/newsboat/urls"
# ani-cli
alias ani='ani-cli'
alias ani-q='ani-cli -q' # to select video quality
# multimedia scripts
alias \
fli="flix-cli" \
ani="ani-cli" \
aniq="ani-cli -q"
# ytfzf
alias yt='ytfzf -f -t'
alias yt-m='ytfzf -m'
# flix-cli
alias fli='flix-cli'
# mount and unmount drives
alias mnt='sudo mount'
alias umnt='sudo umount'
# mixers
alias mx='pulsemixer'
alias amx='alsamixer'
# music player
alias mk='cmus'
# audio
alias \
mx="pulsemixer" \
amx="alsamixer" \
mk="cmus" \
ms="cmus" \
music="cmus"
# power management
alias po='loginctl poweroff'
alias sp='loginctl suspend'
alias rb='loginctl reboot'
alias \
po="loginctl poweroff" \
sp="loginctl suspend" \
rb="loginctl reboot"
# file manager
alias fm='./.config/vifm/scripts/vifmrun'
alias vifm='./.config/vifm/scripts/vifmrun'
# file management
alias \
fm="./.config/vifm/scripts/vifmrun" \
file="./.config/vifm/scripts/vifmrun" \
flm="./.config/vifm/scripts/vifmrun" \
vifm="./.config/vifm/scripts/vifmrun" \
rm="rm -vI" \
mv="mv -iv" \
cp="cp -iv" \
mkd="mkdir -pv"
# ps
alias psa="ps auxf"
alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
alias psmem='ps auxf | sort -nr -k 4'
alias pscpu='ps auxf | sort -nr -k 3'
alias \
psa="ps auxf" \
psgrep="ps aux | grep -v grep | grep -i -e VSZ -e" \
psmem="ps auxf | sort -nr -k 4" \
pscpu="ps auxf | sort -nr -k 3"
# youtube-dl
alias yta-aac="yt-dlp --extract-audio --audio-format aac "
alias yta-best="yt-dlp --extract-audio --audio-format best "
alias yta-flac="yt-dlp --extract-audio --audio-format flac "
alias yta-m4a="yt-dlp --extract-audio --audio-format m4a "
alias yta-mp3="yt-dlp --extract-audio --audio-format mp3 "
alias yta-opus="yt-dlp --extract-audio --audio-format opus "
alias yta-vorbis="yt-dlp --extract-audio --audio-format vorbis "
alias yta-wav="yt-dlp --extract-audio --audio-format wav "
alias ytv-best="yt-dlp -f bestvideo+bestaudio "
# youtube
alias \
yta-aac="yt-dlp --extract-audio --audio-format aac" \
yta-best="yt-dlp --extract-audio --audio-format best" \
yta-flac="yt-dlp --extract-audio --audio-format flac" \
yta-m4a="yt-dlp --extract-audio --audio-format m4a" \
yta-mp3="yt-dlp --extract-audio --audio-format mp3" \
yta-opus="yt-dlp --extract-audio --audio-format opus" \
yta-vorbis="yt-dlp --extract-audio --audio-format vorbis" \
yta-wav="yt-dlp --extract-audio --audio-format wav" \
ytv-best="yt-dlp -f bestvideo+bestaudio" \
yt="ytfzf -f -t" \
ytm="ytfzf -m"
# Network Manager and bluetooth
alias netstats='nmcli dev'
alias wfi='nmtui-connect'
alias wfi-scan='nmcli dev wifi list'
alias wfi-edit='nmtui-edit'
alias wfi-on='nmcli radio wifi on'
alias wfi-off='nmcli radio wifi off'
alias blt='bluetoothctl'
# network and bluetooth
alias \
netstats="nmcli dev" \
wfi="nmtui-connect" \
wfi-scan="nmcli dev wifi list" \
wfi-edit="nmtui-edit" \
wfi-on="nmcli radio wifi on" \
wfi-off="nmcli radio wifi off" \
blt="bluetoothctl"
### SETTING THE STARSHIP PROMPT ###
eval "$(starship init bash)"

5
.config/mpv/input.conf Normal file
View file

@ -0,0 +1,5 @@
l seek 5
h seek -5
j seek -60
k seek 60
S cycle sub

56
.config/newsboat/config Normal file
View file

@ -0,0 +1,56 @@
#show-read-feeds no
auto-reload yes
external-url-viewer "urlscan -dc -r 'linkhandler {}'"
bind-key j down
bind-key k up
bind-key j next articlelist
bind-key k prev articlelist
bind-key J next-feed articlelist
bind-key K prev-feed articlelist
bind-key G end
bind-key g home
bind-key d pagedown
bind-key u pageup
bind-key l open
bind-key h quit
bind-key a toggle-article-read
bind-key n next-unread
bind-key N prev-unread
bind-key D pb-download
bind-key U show-urls
bind-key x pb-delete
color listnormal cyan default
color listfocus black yellow standout bold
color listnormal_unread blue default
color listfocus_unread yellow default bold
color info red black bold
color article white default bold
browser linkhandler
macro , open-in-browser
macro t set browser "qndl" ; open-in-browser ; set browser linkhandler
macro a set browser "tsp yt-dlp --embed-metadata -xic -f bestaudio/best" ; open-in-browser ; set browser linkhandler
macro v set browser "setsid -f mpv" ; open-in-browser ; set browser linkhandler
macro w set browser "lynx" ; open-in-browser ; set browser linkhandler
macro d set browser "dmenuhandler" ; open-in-browser ; set browser linkhandler
macro c set browser "echo %u | xclip -r -sel c" ; open-in-browser ; set browser linkhandler
macro C set browser "youtube-viewer --comments=%u" ; open-in-browser ; set browser linkhandler
macro p set browser "peertubetorrent %u 480" ; open-in-browser ; set browser linkhandler
macro P set browser "peertubetorrent %u 1080" ; open-in-browser ; set browser linkhandler
highlight all "---.*---" yellow
highlight feedlist ".*(0/0))" black
highlight article "(^Feed:.*|^Title:.*|^Author:.*)" cyan default bold
highlight article "(^Link:.*|^Date:.*)" default default
highlight article "https?://[^ ]+" green default
highlight article "^(Title):.*$" blue default
highlight article "\\[[0-9][0-9]*\\]" magenta default bold
highlight article "\\[image\\ [0-9]+\\]" green default bold
highlight article "\\[embedded flash: [0-9][0-9]*\\]" green default bold
highlight article ":.*\\(link\\)$" cyan default
highlight article ":.*\\(image\\)$" blue default
highlight article ":.*\\(embedded flash\\)$" magenta default

View file

@ -1,11 +1,9 @@
https://archlinux.org/feeds/news/ "Reading"
https://www.linux.com/feed/ "Reading"
https://linuxhandbook.com/rss/ "Reading"
https://www.gamingonlinux.com/article_rss.php "Reading"
https://www.omgubuntu.co.uk/feed "Reading"
https://askubuntu.com/feeds "Reading"
https://itsubuntu.com/feed/ "Reading"
https://www.tecmint.com/feed/ "Reading"
https://www.linuxfoundation.org/feed/ "Reading"
https://linuxhint.com/feed/ "Reading"
https://techhut.tv/rss/ "Reading"
https://techhut.tv/rss/ "Techhut"
https://lukesmith.xyz/rss.xml "Luke Smith"
https://notrelated.xyz/rss "Not Related"
https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "Luke Smith (YouTube)"
https://landchad.net/rss.xml "Landchad"
https://based.cooking/rss.xml "Based Cooking"
https://artixlinux.org/feed.php "Artix Linux"
https://www.archlinux.org/feeds/news/ "Arch Linux"
https://switchedtolinux.com/rss "Switched to Linux"

View file

@ -181,8 +181,8 @@ c.tabs.show = 'always'
# Setting default page for when opening new tabs or new windows with
# commands like :open -t and :open -w .
c.url.default_page = 'https://start.duckduckgo.com/'
c.url.start_pages = 'https://start.duckduckgo.com/'
c.url.default_page = 'https://search.brave.com/'
c.url.start_pages = 'https://search.brave.com/'
# Search engines which can be used via the address bar. Maps a search
# engine name (such as `DEFAULT`, or `ddg`) to a URL with a `{}`
@ -202,7 +202,7 @@ c.url.start_pages = 'https://start.duckduckgo.com/'
# the search engine name to the search term, e.g. `:open google
# qutebrowser`.
# Type: Dict
c.url.searchengines = {'DEFAULT': 'https://duckduckgo.com/?q={}', 'am': 'https://www.amazon.com/s?k={}', 'aw': 'https://wiki.archlinux.org/?search={}', 'goog': 'https://www.google.com/search?q={}', 're': 'https://www.reddit.com/r/{}', 'ub': 'https://www.urbandictionary.com/define.php?term={}', 'wiki': 'https://en.wikipedia.org/wiki/{}', 'yt': 'https://www.youtube.com/results?search_query={}'}
c.url.searchengines = {'DEFAULT': 'https://search.brave.com/search?q={}', 'aw': 'https://wiki.archlinux.org/?search={}', 'ub': 'https://www.urbandictionary.com/define.php?term={}', 'wiki': 'https://en.wikipedia.org/wiki/{}'}
# Default font families to use. Whenever "default_family" is used in a
# font setting, it's replaced with the fonts listed here. If set to an