Updated
This commit is contained in:
parent
e51e4279c1
commit
0f97b3b8b4
5 changed files with 189 additions and 115 deletions
215
.bashrc
215
.bashrc
|
@ -5,7 +5,7 @@
|
||||||
## /_____/_/ \__,_/_/|_|\___/ My custom bash config
|
## /_____/_/ \__,_/_/|_|\___/ My custom bash config
|
||||||
##
|
##
|
||||||
|
|
||||||
### EXPORT
|
### EXPORT ###
|
||||||
export TERM="xterm-256color" # getting proper colors
|
export TERM="xterm-256color" # getting proper colors
|
||||||
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
|
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
|
||||||
export EDITOR="nvim" # $EDITOR use neovim
|
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_CACHE_HOME=${XDG_CACHE_HOME:="$HOME/.cache"}
|
||||||
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:="$HOME/.config"}
|
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 ]] && \
|
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \
|
||||||
. /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
|
[[ $- != *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 ###
|
### SET VI MODE ###
|
||||||
# Comment this line out to enable default emacs-like bindings
|
# Comment this line out to enable default emacs-like bindings
|
||||||
set -o vi
|
set -o vi
|
||||||
bind -m vi-command 'Control-l: clear-screen'
|
bind -m vi-command 'Control-l: clear-screen'
|
||||||
bind -m vi-insert 'Control-l: clear-screen'
|
bind -m vi-insert 'Control-l: clear-screen'
|
||||||
|
|
||||||
### PATH
|
### PATH ###
|
||||||
if [ -d "$HOME/.bin" ] ;
|
if [ -d "$HOME/.bin" ] ;
|
||||||
then PATH="$HOME/.bin:$PATH"
|
then PATH="$HOME/.bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
@ -43,7 +49,7 @@ if [ -d "$HOME/Applications" ] ;
|
||||||
then PATH="$HOME/Applications:$PATH"
|
then PATH="$HOME/Applications:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### CHANGE TITLE OF TERMINALS
|
### CHANGE TITLE OF TERMINALS ###
|
||||||
case ${TERM} in
|
case ${TERM} in
|
||||||
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|alacritty|st|konsole*)
|
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|alacritty|st|konsole*)
|
||||||
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"'
|
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"'
|
||||||
|
@ -53,7 +59,7 @@ case ${TERM} in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
### SHOPT
|
### SHOPT ###
|
||||||
shopt -s autocd # change to named directory
|
shopt -s autocd # change to named directory
|
||||||
shopt -s cdspell # autocorrects cd misspellings
|
shopt -s cdspell # autocorrects cd misspellings
|
||||||
shopt -s cmdhist # save multi-line commands in history as single line
|
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
|
# ignore upper and lowercase when TAB completion
|
||||||
bind "set completion-ignore-case on"
|
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>
|
# usage: ex <file>
|
||||||
ex ()
|
ex ()
|
||||||
{
|
{
|
||||||
|
@ -92,7 +103,7 @@ ex ()
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
### ALIASES
|
### ALIASES ###
|
||||||
# navigation
|
# navigation
|
||||||
up () {
|
up () {
|
||||||
local d=""
|
local d=""
|
||||||
|
@ -113,118 +124,122 @@ up () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
alias ..='cd ..'
|
# cd
|
||||||
alias .2='cd ../..'
|
alias \
|
||||||
alias .3='cd ../../..'
|
..="cd .." \
|
||||||
alias .4='cd ../../../..'
|
.2="cd ../.." \
|
||||||
alias .5='cd ../../../../..'
|
.3="cd ../../.." \
|
||||||
|
.4="cd ../../../.." \
|
||||||
|
.5="cd ../../../../.."
|
||||||
|
|
||||||
# bat as cat
|
# bat as cat
|
||||||
alias cat='bat'
|
[ -x "$(command -v bat)" ] && alias cat="bat"
|
||||||
|
|
||||||
# editors
|
|
||||||
alias vim='nvim'
|
|
||||||
|
|
||||||
# Changing "ls" to "exa"
|
# Changing "ls" to "exa"
|
||||||
alias ls='exa -al --color=always --group-directories-first' # my preferred listing
|
alias \
|
||||||
alias la='exa -a --color=always --group-directories-first' # all files and dirs
|
ls="exa -al --color=always --group-directories-first" \
|
||||||
alias ll='exa -l --color=always --group-directories-first' # long format
|
la="exa -a --color=always --group-directories-first" \
|
||||||
alias lt='exa -aT --color=always --group-directories-first' # tree listing
|
ll="exa -l --color=always --group-directories-first" \
|
||||||
alias l.='exa -a | egrep "^\."'
|
lt="exa -aT --color=always --group-directories-first" \
|
||||||
|
l.='exa -a | egrep "^\."'
|
||||||
|
|
||||||
# xbps
|
# xbps
|
||||||
alias xb-up='sudo xbps-install -Su && xcheckrestart' # Refresh pkglist & update standard pkgs
|
alias \
|
||||||
alias xb-get='sudo xbps-install -S' # Install a package
|
xb-up="sudo xbps-install -Su && xcheckrestart" \
|
||||||
alias xb-rmv='sudo xbps-remove -R' # Remove a package with all its dependencies
|
xb-get="sudo xbps-install -S" \
|
||||||
alias xb-rmv-sec='sudo xbps-remove' # Remove a package with all its dependencies (secure way)
|
xb-rmv="sudo xbps-remove -R" \
|
||||||
alias xb-qry='sudo xbps-query' # Repo query
|
xb-rmv-sec="sudo xbps-remove" \
|
||||||
alias xb-cln='sudo xbps-remove -o && sudo xbps-remove -O' # remove orphaned packages
|
xb-qry="sudo xbps-query" \
|
||||||
|
xb-cln="sudo xbps-remove -o && sudo xbps-remove -O"
|
||||||
|
|
||||||
# Colorize grep output (good for log files)
|
# colorize grep output (good for log files)
|
||||||
alias grep='grep --color=auto'
|
alias \
|
||||||
alias egrep='egrep --color=auto'
|
grep="grep --color=auto" \
|
||||||
alias fgrep='fgrep --color=auto'
|
egrep="egrep --color=auto" \
|
||||||
|
fgrep="fgrep --color=auto"
|
||||||
# confirm before overwriting something
|
|
||||||
alias rm='rm -i'
|
|
||||||
alias mv='mv -i'
|
|
||||||
alias cp='cp -i'
|
|
||||||
|
|
||||||
# git
|
# git
|
||||||
alias addup='git add -u'
|
alias \
|
||||||
alias addall='git add .'
|
addup="git add -u" \
|
||||||
alias branch='git branch'
|
addall="git add ." \
|
||||||
alias checkout='git checkout'
|
branch="git branch" \
|
||||||
alias clone='git clone'
|
checkout="git checkout" \
|
||||||
alias commit='git commit -m'
|
clone="git clone" \
|
||||||
alias fetch='git fetch'
|
commit="git commit -m" \
|
||||||
alias pull='git pull origin'
|
fetch="git fetch" \
|
||||||
alias push='git push origin'
|
pull="git pull origin" \
|
||||||
alias stat='git status' # 'status' is protected name so using 'stat' instead
|
push="git push origin" \
|
||||||
alias tag='git tag'
|
stat="git status" \
|
||||||
alias newtag='git tag -a'
|
tag="git tag" \
|
||||||
|
newtag="git tag -a"
|
||||||
|
|
||||||
# adding flags
|
# adding flags
|
||||||
alias df='df -h' # human-readable sizes
|
alias \
|
||||||
alias free='free -m' # show sizes in MB
|
df="df -h" \
|
||||||
alias newsboat='newsboat -u ~/.config/newsboat/urls' # start newsboat with my urls file
|
free="free -m" \
|
||||||
|
newsboat="newsboat -u ~/.config/newsboat/urls"
|
||||||
|
|
||||||
# ani-cli
|
# multimedia scripts
|
||||||
alias ani='ani-cli'
|
alias \
|
||||||
alias ani-q='ani-cli -q' # to select video quality
|
fli="flix-cli" \
|
||||||
|
ani="ani-cli" \
|
||||||
|
aniq="ani-cli -q"
|
||||||
|
|
||||||
# ytfzf
|
# audio
|
||||||
alias yt='ytfzf -f -t'
|
alias \
|
||||||
alias yt-m='ytfzf -m'
|
mx="pulsemixer" \
|
||||||
|
amx="alsamixer" \
|
||||||
# flix-cli
|
mk="cmus" \
|
||||||
alias fli='flix-cli'
|
ms="cmus" \
|
||||||
|
music="cmus"
|
||||||
# mount and unmount drives
|
|
||||||
alias mnt='sudo mount'
|
|
||||||
alias umnt='sudo umount'
|
|
||||||
|
|
||||||
# mixers
|
|
||||||
alias mx='pulsemixer'
|
|
||||||
alias amx='alsamixer'
|
|
||||||
|
|
||||||
# music player
|
|
||||||
alias mk='cmus'
|
|
||||||
|
|
||||||
# power management
|
# power management
|
||||||
alias po='loginctl poweroff'
|
alias \
|
||||||
alias sp='loginctl suspend'
|
po="loginctl poweroff" \
|
||||||
alias rb='loginctl reboot'
|
sp="loginctl suspend" \
|
||||||
|
rb="loginctl reboot"
|
||||||
|
|
||||||
# file manager
|
# file management
|
||||||
alias fm='./.config/vifm/scripts/vifmrun'
|
alias \
|
||||||
alias vifm='./.config/vifm/scripts/vifmrun'
|
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
|
# ps
|
||||||
alias psa="ps auxf"
|
alias \
|
||||||
alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
|
psa="ps auxf" \
|
||||||
alias psmem='ps auxf | sort -nr -k 4'
|
psgrep="ps aux | grep -v grep | grep -i -e VSZ -e" \
|
||||||
alias pscpu='ps auxf | sort -nr -k 3'
|
psmem="ps auxf | sort -nr -k 4" \
|
||||||
|
pscpu="ps auxf | sort -nr -k 3"
|
||||||
|
|
||||||
# youtube-dl
|
# youtube
|
||||||
alias yta-aac="yt-dlp --extract-audio --audio-format aac "
|
alias \
|
||||||
alias yta-best="yt-dlp --extract-audio --audio-format best "
|
yta-aac="yt-dlp --extract-audio --audio-format aac" \
|
||||||
alias yta-flac="yt-dlp --extract-audio --audio-format flac "
|
yta-best="yt-dlp --extract-audio --audio-format best" \
|
||||||
alias yta-m4a="yt-dlp --extract-audio --audio-format m4a "
|
yta-flac="yt-dlp --extract-audio --audio-format flac" \
|
||||||
alias yta-mp3="yt-dlp --extract-audio --audio-format mp3 "
|
yta-m4a="yt-dlp --extract-audio --audio-format m4a" \
|
||||||
alias yta-opus="yt-dlp --extract-audio --audio-format opus "
|
yta-mp3="yt-dlp --extract-audio --audio-format mp3" \
|
||||||
alias yta-vorbis="yt-dlp --extract-audio --audio-format vorbis "
|
yta-opus="yt-dlp --extract-audio --audio-format opus" \
|
||||||
alias yta-wav="yt-dlp --extract-audio --audio-format wav "
|
yta-vorbis="yt-dlp --extract-audio --audio-format vorbis" \
|
||||||
alias ytv-best="yt-dlp -f bestvideo+bestaudio "
|
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
|
# network and bluetooth
|
||||||
alias netstats='nmcli dev'
|
alias \
|
||||||
alias wfi='nmtui-connect'
|
netstats="nmcli dev" \
|
||||||
alias wfi-scan='nmcli dev wifi list'
|
wfi="nmtui-connect" \
|
||||||
alias wfi-edit='nmtui-edit'
|
wfi-scan="nmcli dev wifi list" \
|
||||||
alias wfi-on='nmcli radio wifi on'
|
wfi-edit="nmtui-edit" \
|
||||||
alias wfi-off='nmcli radio wifi off'
|
wfi-on="nmcli radio wifi on" \
|
||||||
alias blt='bluetoothctl'
|
wfi-off="nmcli radio wifi off" \
|
||||||
|
blt="bluetoothctl"
|
||||||
|
|
||||||
### SETTING THE STARSHIP PROMPT ###
|
### SETTING THE STARSHIP PROMPT ###
|
||||||
eval "$(starship init bash)"
|
eval "$(starship init bash)"
|
||||||
|
|
5
.config/mpv/input.conf
Normal file
5
.config/mpv/input.conf
Normal 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
56
.config/newsboat/config
Normal 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
|
|
@ -1,11 +1,9 @@
|
||||||
https://archlinux.org/feeds/news/ "Reading"
|
https://techhut.tv/rss/ "Techhut"
|
||||||
https://www.linux.com/feed/ "Reading"
|
https://lukesmith.xyz/rss.xml "Luke Smith"
|
||||||
https://linuxhandbook.com/rss/ "Reading"
|
https://notrelated.xyz/rss "Not Related"
|
||||||
https://www.gamingonlinux.com/article_rss.php "Reading"
|
https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "Luke Smith (YouTube)"
|
||||||
https://www.omgubuntu.co.uk/feed "Reading"
|
https://landchad.net/rss.xml "Landchad"
|
||||||
https://askubuntu.com/feeds "Reading"
|
https://based.cooking/rss.xml "Based Cooking"
|
||||||
https://itsubuntu.com/feed/ "Reading"
|
https://artixlinux.org/feed.php "Artix Linux"
|
||||||
https://www.tecmint.com/feed/ "Reading"
|
https://www.archlinux.org/feeds/news/ "Arch Linux"
|
||||||
https://www.linuxfoundation.org/feed/ "Reading"
|
https://switchedtolinux.com/rss "Switched to Linux"
|
||||||
https://linuxhint.com/feed/ "Reading"
|
|
||||||
https://techhut.tv/rss/ "Reading"
|
|
||||||
|
|
|
@ -181,8 +181,8 @@ c.tabs.show = 'always'
|
||||||
|
|
||||||
# Setting default page for when opening new tabs or new windows with
|
# Setting default page for when opening new tabs or new windows with
|
||||||
# commands like :open -t and :open -w .
|
# commands like :open -t and :open -w .
|
||||||
c.url.default_page = 'https://start.duckduckgo.com/'
|
c.url.default_page = 'https://search.brave.com/'
|
||||||
c.url.start_pages = 'https://start.duckduckgo.com/'
|
c.url.start_pages = 'https://search.brave.com/'
|
||||||
|
|
||||||
# Search engines which can be used via the address bar. Maps a search
|
# 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 `{}`
|
# 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
|
# the search engine name to the search term, e.g. `:open google
|
||||||
# qutebrowser`.
|
# qutebrowser`.
|
||||||
# Type: Dict
|
# 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
|
# 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
|
# font setting, it's replaced with the fonts listed here. If set to an
|
||||||
|
|
Loading…
Reference in a new issue