add config folder

This commit is contained in:
Tibeuleu
2024-02-27 11:54:00 +01:00
commit 738538d51b
33 changed files with 1776 additions and 0 deletions

53
.config/shell/aliasrc Executable file
View File

@@ -0,0 +1,53 @@
#!/bin/sh
# Use neovim for vim if present.
[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"
# Verbosity and settings that you pretty much just always are going to want.
alias \
mv="mv -iv" \
rm="rm -vI" \
mkd="mkdir -pv" \
yt="youtube-dl --add-metadata -i" \
yta="yt -x -f bestaudio/best" \
ffmpeg="ffmpeg -hide_banner"
cp="cp -iv" \
# Colorize commands when possible.
alias \
ls="ls -hN --color=auto --group-directories-first" \
grep="grep --color=auto" \
diff="diff --color=auto" \
ccat="highlight --out-format=ansi"
# These common commands are just too long! Abbreviate them.
alias \
ka="killall" \
g="git" \
trem="transmission-remote" \
YT="youtube-viewer" \
sdn="doas shutdown -h now" \
f="$FILE" \
e="$EDITOR" \
v="$EDITOR" \
p="doas pacman" \
pu="doas pacman -Syu" \
yu="yay -Syu --aur" \
xi="doas xbps-install" \
xr="doas xbps-remove -R" \
xq="xbps-query" \
z="zathura"
alias \
magit="nvim -c MagitOnly" \
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
weath="less -S ${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" \
tmux="tmux -f ${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf" \
scrcpy="scrcpy --shortcut-mod=lctrl" \
anaconda="source $HOME/.anaconda3/bin/activate" \
homestuck="./.config/unofficial-homestuck-collection-2.0.7/unofficial-homestuck-collection --no-sandbox 2>&1" \
hlup="wg-quick up artixbook" \
hldown="wg-quick down artixbook" \
ixpe="cd /home/tibeuleu/IXPE_analysis/Code && clear && ls" \
foc="cd /home/tibeuleu/FOC_reduction/Code && clear && ls" \
config='/usr/bin/git --git-dir=/home/tibeuleu/.cfg/ --work-tree=/home/tibeuleu' \

15
.config/shell/bm-dirs Executable file
View File

@@ -0,0 +1,15 @@
# You can add comments to these files with #
cac ${XDG_CACHE_HOME:-$HOME/.cache}
cf ${XDG_CONFIG_HOME:-$HOME/.config}
cfv ${XDG_CONFIG_HOME:-$HOME/.config}/nvim
cl ${XDG_LOCAL_HOME:-$HOME/.local}
dt ${XDG_DATA_HOME:-$HOME/.local/share}
sc ${XDG_LOCAL_HOME:-$HOME/.local}/bin
src ${XDG_LOCAL_HOME:-$HOME/.local}/src
h $HOME
d ${XDG_DOCUMENTS_DIR:-$HOME/Documents}
D ${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
m ${XDG_MUSIC_DIR:-$HOME/Music}
pp ${XDG_PICTURES_DIR:-$HOME/Pictures}
vv ${XDG_VIDEOS_DIR:-$HOME/Videos}
mn /mnt

21
.config/shell/bm-files Executable file
View File

@@ -0,0 +1,21 @@
# These files automatically update when edited/saved in vim:
# keys filename description
bf ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-files # This file, a list of bookmarked files
bd ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs # A list of bookmarked directories similar to this file
cfi ${XDG_CONFIG_HOME:-$HOME/.config}/i3/config # i3: the window manager i3
cfib ${XDG_CONFIG_HOME:-$HOME/.config}/i3blocks/config # i3blocks: the status bar for i3
cfx ${XDG_CONFIG_HOME:-$HOME/.config}/x11/Xresources # Colors, themes and variables for X11
# These do not update automatically, but on the next new instance of a program:
cfa ${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc # aliases used by zsh (and potentially other shells)
cfl ${XDG_CONFIG_HOME:-$HOME/.config}/lf/lfrc # lf (file browser) config
cfL ${XDG_CONFIG_HOME:-$HOME/.config}/lf/scope # lf's scope/preview file
cfmb ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/bindings # ncmpcpp (music player) keybinds file
cfmc ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/config # ncmpcpp (music player) config
cfn ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/config # newsboat (RSS reader)
cfp ${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile # profile file for login settings for zsh
cfu ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls # RSS urls for newsboat
cfX ${XDG_CONFIG_HOME:-$HOME/.config}/sxiv/exec/key-handler # sxiv (image viewer) key/script handler
cfz $ZDOTDIR/.zshrc # zsh (shell) config

View File

@@ -0,0 +1,155 @@
#!/bin/zsh
# zsh profile file. Runs on login. Environmental variables are set here.
# If you don't plan on reverting to bash, you can remove the link in ~/.profile
# to clean up.
# Adds `~/.local/bin` to $PATH
export PATH="$PATH:$(du "$HOME/.local/bin" | cut -f2 | paste -sd ':')"
# Default programs:
export EDITOR="nvim"
export TERMINAL="st"
export BROWSER="brave"
export READER="zathura"
# ~/ Clean-up:
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
#export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs.
export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config"
export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0"
export LESSHISTFILE="-"
export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc"
export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/shell/inputrc"
export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
#export GNUPGHOME="$XDG_DATA_HOME/gnupg"
export WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/wineprefixes/default"
export KODI_DATA="${XDG_DATA_HOME:-$HOME/.local/share}/kodi"
export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store"
export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android"
export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo"
export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go"
export ANSIBLE_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/ansible/ansible.cfg"
export UNISON="${XDG_DATA_HOME:-$HOME/.local/share}/unison"
export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history"
# Xspec and IXPEobssim
export HEADAS="$HOME/.local/lib/heasoft-6.29/x86_64-pc-linux-gnu-libc2.35/"
export IXPEOBSSIM_ROOT="$HOME/Internship/IXPE/ixpeobssim_latest"
export IXPEOBSSIM_DATA="$HOME/Internship/IXPE/ixpeobssim_latest/ixpeobssimdata"
export IXPEOBSSIM_AUXFILES="$HOME/Internship/IXPE/ixpeobssim_latest/ixpeobssimauxfiles"
# Other program settings:
export DICS="/usr/share/stardict/dic/"
export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
export LESS=-R
export LESS_TERMCAP_mb="$(printf '%b' '')"
export LESS_TERMCAP_md="$(printf '%b' '')"
export LESS_TERMCAP_me="$(printf '%b' '')"
export LESS_TERMCAP_so="$(printf '%b' '')"
export LESS_TERMCAP_se="$(printf '%b' '')"
export LESS_TERMCAP_us="$(printf '%b' '')"
export LESS_TERMCAP_ue="$(printf '%b' '')"
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme.
export MOZ_USE_XINPUT2="1" # Mozilla smooth scrolling/touchpads.
export AWT_TOOLKIT="MToolkit wmname LG3D" #May have to install wmname
export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm
export $(dbus-launch)
# This is the list for lf icons:
export LF_ICONS="di=📁:\
fi=📃:\
tw=🤝:\
ow=📂:\
ln=⛓:\
or=❌:\
ex=🎯:\
*.txt=✍:\
*.mom=✍:\
*.me=✍:\
*.ms=✍:\
*.png=🖼:\
*.webp=🖼:\
*.ico=🖼:\
*.jpg=📸:\
*.jpe=📸:\
*.jpeg=📸:\
*.gif=🖼:\
*.svg=🗺:\
*.tif=🖼:\
*.tiff=🖼:\
*.xcf=🖌:\
*.html=🌎:\
*.xml=📰:\
*.gpg=🔒:\
*.css=🎨:\
*.pdf=📚:\
*.djvu=📚:\
*.epub=📚:\
*.csv=📓:\
*.xlsx=📓:\
*.tex=📜:\
*.md=📘:\
*.r=📊:\
*.R=📊:\
*.rmd=📊:\
*.Rmd=📊:\
*.m=📊:\
*.mp3=🎵:\
*.opus=🎵:\
*.ogg=🎵:\
*.m4a=🎵:\
*.flac=🎼:\
*.mkv=🎥:\
*.mp4=🎥:\
*.webm=🎥:\
*.mpeg=🎥:\
*.avi=🎥:\
*.zip=📦:\
*.rar=📦:\
*.7z=📦:\
*.tar.gz=📦:\
*.z64=🎮:\
*.v64=🎮:\
*.n64=🎮:\
*.gba=🎮:\
*.nes=🎮:\
*.gdi=🎮:\
*.1=:\
*.nfo=:\
*.info=:\
*.log=📙:\
*.iso=📀:\
*.img=📀:\
*.bib=🎓:\
*.ged=👪:\
*.part=💔:\
*.torrent=🔽:\
*.jar=♨:\
*.java=♨:\
"
[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ] && shortcuts >/dev/null 2>&1 &
if pacman -Qs libxft-bgra >/dev/null 2>&1; then
# Start graphical server on tty1 if not already running.
[ "$(tty)" = "/dev/tty1" ] && ! pidof Xorg >/dev/null 2>&1 && exec startx
else
echo "\033[31mIMPORTANT\033[0m: Note that \033[32m\`libxft-bgra\`\033[0m must be installed for this build of dwm.
Please run:
\033[32myay -S libxft-bgra-git\033[0m
and replace \`libxft\`"
fi
# Switch escape and caps if tty and no passwd required:
sudo -n loadkeys ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/ttymaps.kmap 2>/dev/null
# modifications by HEALPixAutoConf 3.80
[ -r /home/tibeuleu/.healpix/3_80_Linux/config ] && . /home/tibeuleu/.healpix/3_80_Linux/config

19
.config/shell/inputrc Executable file
View File

@@ -0,0 +1,19 @@
$include /etc/inputrc
set editing-mode vi
$if mode=vi
set show-mode-in-prompt on
set vi-ins-mode-string \1\e[6 q\2
set vi-cmd-mode-string \1\e[2 q\2
set keymap vi-command
# these are for vi-command mode
Control-l: clear-screen
Control-a: beginning-of-line
set keymap vi-insert
# these are for vi-insert mode
Control-l: clear-screen
Control-a: beginning-of-line
$endif

157
.config/shell/profile Executable file
View File

@@ -0,0 +1,157 @@
#!/bin/zsh
# zsh profile file. Runs on login. Environmental variables are set here.
# If you don't plan on reverting to bash, you can remove the link in ~/.profile
# to clean up.
# Adds `~/.local/bin` to $PATH
export PATH="$PATH:$(du "$HOME/.local/bin" | cut -f2 | paste -sd ':')"
# Default programs:
export EDITOR="nvim"
export TERMINAL="st"
export BROWSER="librewolf"
export READER="zathura"
# ~/ Clean-up:
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
#export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs.
export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config"
export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0"
export LESSHISTFILE="-"
export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc"
export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/shell/inputrc"
export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
#export GNUPGHOME="$XDG_DATA_HOME/gnupg"
export WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/wineprefixes/default"
export KODI_DATA="${XDG_DATA_HOME:-$HOME/.local/share}/kodi"
export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store"
export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android"
export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo"
export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go"
export ANSIBLE_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/ansible/ansible.cfg"
export UNISON="${XDG_DATA_HOME:-$HOME/.local/share}/unison"
export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history"
# Xspec and IXPEobssim
export HEADAS="$HOME/.local/lib/heasoft-6.30/x86_64-pc-linux-gnu-libc2.35/"
export TINYTIM="$HOME/.local/share/tinytim-7.5/"
export IXPEOBSSIM_ROOT="$HOME/IXPE_analysis/ixpeobssim_latest"
export IXPEOBSSIM_DATA="$HOME/IXPE_analysis/ixpeobssim_latest/ixpeobssimdata"
export IXPEOBSSIM_AUXFILES="$HOME/IXPE_analysis/ixpeobssim_latest/ixpeobssimauxfiles"
# Other program settings:
export DICS="/usr/share/stardict/dic/"
export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
export DOAS_ASKPASS="$HOME/.local/bin/dmenupass"
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
export LESS=-R
export LESS_TERMCAP_mb="$(printf '%b' '')"
export LESS_TERMCAP_md="$(printf '%b' '')"
export LESS_TERMCAP_me="$(printf '%b' '')"
export LESS_TERMCAP_so="$(printf '%b' '')"
export LESS_TERMCAP_se="$(printf '%b' '')"
export LESS_TERMCAP_us="$(printf '%b' '')"
export LESS_TERMCAP_ue="$(printf '%b' '')"
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme.
export MOZ_USE_XINPUT2="1" # Mozilla smooth scrolling/touchpads.
export AWT_TOOLKIT="MToolkit wmname LG3D" #May have to install wmname
export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm
export $(dbus-launch)
# This is the list for lf icons:
export LF_ICONS="di=📁:\
fi=📃:\
tw=🤝:\
ow=📂:\
ln=⛓:\
or=❌:\
ex=🎯:\
*.txt=✍:\
*.mom=✍:\
*.me=✍:\
*.ms=✍:\
*.png=🖼:\
*.webp=🖼:\
*.ico=🖼:\
*.jpg=📸:\
*.jpe=📸:\
*.jpeg=📸:\
*.gif=🖼:\
*.svg=🗺:\
*.tif=🖼:\
*.tiff=🖼:\
*.xcf=🖌:\
*.html=🌎:\
*.xml=📰:\
*.gpg=🔒:\
*.css=🎨:\
*.pdf=📚:\
*.djvu=📚:\
*.epub=📚:\
*.csv=📓:\
*.xlsx=📓:\
*.tex=📜:\
*.md=📘:\
*.r=📊:\
*.R=📊:\
*.rmd=📊:\
*.Rmd=📊:\
*.m=📊:\
*.mp3=🎵:\
*.opus=🎵:\
*.ogg=🎵:\
*.m4a=🎵:\
*.flac=🎼:\
*.mkv=🎥:\
*.mp4=🎥:\
*.webm=🎥:\
*.mpeg=🎥:\
*.avi=🎥:\
*.zip=📦:\
*.rar=📦:\
*.7z=📦:\
*.tar.gz=📦:\
*.z64=🎮:\
*.v64=🎮:\
*.n64=🎮:\
*.gba=🎮:\
*.nes=🎮:\
*.gdi=🎮:\
*.1=:\
*.nfo=:\
*.info=:\
*.log=📙:\
*.iso=📀:\
*.img=📀:\
*.bib=🎓:\
*.ged=👪:\
*.part=💔:\
*.torrent=🔽:\
*.jar=♨:\
*.java=♨:\
"
[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ] && shortcuts >/dev/null 2>&1 &
if pacman -Qs libxft-bgra >/dev/null 2>&1; then
# Start graphical server on tty1 if not already running.
[ "$(tty)" = "/dev/tty1" ] && ! pidof Xorg >/dev/null 2>&1 && exec startx
else
echo "\033[31mIMPORTANT\033[0m: Note that \033[32m\`libxft-bgra\`\033[0m must be installed for this build of dwm.
Please run:
\033[32myay -S libxft-bgra-git\033[0m
and replace \`libxft\`"
fi
# Switch escape and caps if tty and no passwd required:
doas -n loadkeys ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/ttymaps.kmap 2>/dev/null
# modifications by HEALPixAutoConf 3.80
[ -r /home/tibeuleu/.healpix/3_80_Linux/config ] && . /home/tibeuleu/.healpix/3_80_Linux/config

30
.config/shell/shortcutrc Executable file
View File

@@ -0,0 +1,30 @@
# vim: filetype=sh
alias cac="cd ${XDG_CACHE_HOME:-$HOME/.cache} && ls -a" \
cf="cd ${XDG_CONFIG_HOME:-$HOME/.config} && ls -a" \
cfv="cd ${XDG_CONFIG_HOME:-$HOME/.config}/nvim && ls -a" \
cl="cd ${XDG_LOCAL_HOME:-$HOME/.local} && ls -a" \
dt="cd ${XDG_DATA_HOME:-$HOME/.local/share} && ls -a" \
sc="cd ${XDG_LOCAL_HOME:-$HOME/.local}/bin && ls -a" \
src="cd ${XDG_LOCAL_HOME:-$HOME/.local}/src && ls -a" \
h="cd $HOME && ls -a" \
d="cd ${XDG_DOCUMENTS_DIR:-$HOME/Documents} && ls -a" \
D="cd ${XDG_DOWNLOAD_DIR:-$HOME/Downloads} && ls -a" \
m="cd ${XDG_MUSIC_DIR:-$HOME/Music} && ls -a" \
pp="cd ${XDG_PICTURES_DIR:-$HOME/Pictures} && ls -a" \
vv="cd ${XDG_VIDEOS_DIR:-$HOME/Videos} && ls -a" \
mn="cd /mnt && ls -a" \
bf="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-files" \
bd="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs" \
cfi="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/i3/config" \
cfib="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/i3blocks/config" \
cfx="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/x11/Xresources" \
cfa="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" \
cfl="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/lf/lfrc" \
cfL="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/lf/scope" \
cfmb="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/bindings" \
cfmc="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/config" \
cfn="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/config" \
cfp="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile" \
cfu="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls" \
cfX="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/sxiv/exec/key-handler" \
cfz="$EDITOR $ZDOTDIR/.zshrc" \

View File

@@ -0,0 +1,14 @@
hash -d cac=${XDG_CACHE_HOME:-$HOME/.cache}
hash -d cf=${XDG_CONFIG_HOME:-$HOME/.config}
hash -d cfv=${XDG_CONFIG_HOME:-$HOME/.config}/nvim
hash -d cl=${XDG_LOCAL_HOME:-$HOME/.local}
hash -d dt=${XDG_DATA_HOME:-$HOME/.local/share}
hash -d sc=${XDG_LOCAL_HOME:-$HOME/.local}/bin
hash -d src=${XDG_LOCAL_HOME:-$HOME/.local}/src
hash -d h=$HOME
hash -d d=${XDG_DOCUMENTS_DIR:-$HOME/Documents}
hash -d D=${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
hash -d m=${XDG_MUSIC_DIR:-$HOME/Music}
hash -d pp=${XDG_PICTURES_DIR:-$HOME/Pictures}
hash -d vv=${XDG_VIDEOS_DIR:-$HOME/Videos}
hash -d mn=/mnt