summaryrefslogtreecommitdiff
path: root/.config/shell
diff options
context:
space:
mode:
authornic <ra@afu.re>2023-12-31 14:24:44 -0500
committernic <ra@afu.re>2023-12-31 14:24:44 -0500
commit84ee878342ebfa109ac547b91616eabbd7bfd30a (patch)
tree8fd84e3d9bece3700d7fec9b68ad13c4367384ec /.config/shell
Initial commit
Diffstat (limited to '.config/shell')
-rw-r--r--.config/shell/aliasrc31
-rw-r--r--.config/shell/bm-dirs12
-rw-r--r--.config/shell/bm-files22
-rw-r--r--.config/shell/profile39
4 files changed, 104 insertions, 0 deletions
diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc
new file mode 100644
index 0000000..17334cc
--- /dev/null
+++ b/.config/shell/aliasrc
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+#Use yt-dlp for youtube-dl if present
+[ -x "$(command -v yt-dlp)" ] && alias youtube-dl="yt-dlp" # ln -s yt-dlp youtube-dl
+
+# Use neovim for vim if present
+[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"
+
+
+alias g="/usr/bin/git --git-dir=$HOME/.g --work-tree=$HOME"
+# Verbosity and settings that you pretty much just always are going to want.
+alias \
+cp="cp -iv" \
+mv="mv -iv" \
+rm="rm -vI" \
+bc="bc -ql" \
+mkd="mkdir -pv" \
+ffmpeg="ffmpeg -hide_banner" \
+diff="diff --color" \
+ls="ls --color"
+
+#youtube-dl shortcuts # or more simple ?? yt -x -f
+alias yt='yt-dlp -f "bv*[ext=mkv]+ba[ext=m4a]/b[ext=mkv] / bv*+ba/b" -o "%(title)s.%(ext)s" '
+alias yta='yt-dlp -f "ba" -x -o "%(title)s.%(ext)s" -P "~/Music" '
+
+
+
+alias lf="lfub"
+# Portage admin aliases
+alias emerge="doas emerge"
+alias eix-sync="doas eix-sync"
diff --git a/.config/shell/bm-dirs b/.config/shell/bm-dirs
new file mode 100644
index 0000000..f82c568
--- /dev/null
+++ b/.config/shell/bm-dirs
@@ -0,0 +1,12 @@
+cac ${XDG_CACHE_HOME:-$HOME/.cache}
+cf ${XDG_CONFIG_HOME:-$HOME/.config}
+D ${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
+d ${XDG_DOCUMENTS_DIR:-$HOME/Documents}
+dt ${XDG_DATA_HOME:-$HOME/.local/share}
+h $HOME
+m ${XDG_MUSIC_DIR:-$HOME/Music}
+mn /mnt
+pp ${XDG_PICTURES_DIR:-$HOME/Pictures}
+sc $HOME/.local/bin
+src $HOME/.local/src
+vv ${XDG_VIDEOS_DIR:-$HOME/Videos}
diff --git a/.config/shell/bm-files b/.config/shell/bm-files
new file mode 100644
index 0000000..aaa3ddd
--- /dev/null
+++ b/.config/shell/bm-files
@@ -0,0 +1,22 @@
+# 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
+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:
+
+cfv ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/init.vim # vim/neovim config
+cfz $ZDOTDIR/.zshrc # zsh (shell) config
+cfa ${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc # aliases used by zsh (and potentially other shells)
+cfp ${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile # profile file for login settings for zsh
+cfm ${XDG_CONFIG_HOME:-$HOME/.config}/mutt/muttrc # mutt (email client) config
+cfn ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/config # newsboat (RSS reader) # del?
+cfu ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls # RSS urls for newsboat # del ?
+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
+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
+cfX ${XDG_CONFIG_HOME:-$HOME/.config}/nsxiv/exec/key-handler # nsxiv (image viewer) key/script handler
diff --git a/.config/shell/profile b/.config/shell/profile
new file mode 100644
index 0000000..4614eee
--- /dev/null
+++ b/.config/shell/profile
@@ -0,0 +1,39 @@
+#!/bin/zsh
+
+export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}"
+#
+#old one
+#export PATH="$PATH:$(du "$HOME/.local/bin/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')"
+#
+unsetopt PROMPT_SP
+
+# Default programs:
+export EDITOR="nvim"
+export TERMINAL="st"
+export BROWSER="librewolf"
+#export SURFER="qutebrowser"
+
+# ~/ Clean-up:
+export XDG_CONFIG_HOME="$HOME/.config"
+export XDG_DATA_HOME="$HOME/.local/share"
+export XDG_CACHE_HOME="$HOME/.cache"
+export XINITRC="${XDG_CONFIG_HOME:-$HOME/.config}/x11/xinitrc"
+export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
+export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/shell/inputrc"
+export LESSHISTFILE="-"
+export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc"
+export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
+export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm
+export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0"
+export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme.
+export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config"
+export MBSYNCRC="${XDG_CONFIG_HOME:-$HOME/.config}/mbsync/config"
+export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store"
+#export GNUPGHOME="${XDG_DATA_HOME:-$HOME/.local/share}/gnupg" # pam-gnupg
+#export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
+export DOAS_ASKPASS="$HOME/.local/bin/dmenupass"
+#start graphical server on user's current tty if not already running.
+[ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC"
+
+# Switch escape and caps lock
+doas loadkeys ${XDG_DATA_HOME:-$HOME/.local/share}/ttymaps.kmap 2>/dev/null