aboutsummaryrefslogtreecommitdiff
path: root/.config/shell
diff options
context:
space:
mode:
authorawy <awy@awy.one>2025-07-29 03:42:18 +0300
committerawy <awy@awy.one>2025-07-29 03:42:18 +0300
commitef6dff4cce15186a66ba34cdd7bd39958ebf7f58 (patch)
treefcfa61164ca6e79c900b5d11f6afc6b46aaccb84 /.config/shell
downloadhyprdots-ef6dff4cce15186a66ba34cdd7bd39958ebf7f58.tar.gz
first commit
Diffstat (limited to '.config/shell')
-rw-r--r--.config/shell/aliasrc75
-rw-r--r--.config/shell/bm-dirs14
-rw-r--r--.config/shell/bm-files16
-rw-r--r--.config/shell/inputrc19
-rw-r--r--.config/shell/profile94
5 files changed, 218 insertions, 0 deletions
diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc
new file mode 100644
index 0000000..f875a05
--- /dev/null
+++ b/.config/shell/aliasrc
@@ -0,0 +1,75 @@
+#!/bin/sh
+
+# Use neovim for vim if present.
+[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"
+
+[ -f "$MBSYNCRC" ] && alias mbsync="mbsync -c $MBSYNCRC"
+
+# doas not required for some system commands
+for command in mount umount dinitctl pacman updatedb su shutdown poweroff reboot ; do
+ alias $command="doas $command"
+done; unset command
+
+se() {
+ choice="$(fd . --base-directory=$HOME/.local/bin -t f --min-depth=1 | fzf)"
+ [ -f "$HOME/.local/bin/$choice" ] && $EDITOR "$HOME/.local/bin/$choice"
+}
+
+# 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" \
+ rsync="rsync -vrPlu" \
+ mkd="mkdir -pv" \
+ yt="yt-dlp --embed-metadata -i" \
+ yta="yt -x -f bestaudio/best" \
+ ytt="yt --skip-download --write-thumbnail" \
+ ffmpeg="ffmpeg -hide_banner"
+
+# Colorize commands when possible.
+alias \
+ ll="eza -lh --group-directories-first --color=auto --color-scale=all --color-scale-mode=fixed --icons --no-quotes --smart-group -s size --total-size --no-user --no-permissions" \
+ ls="eza --group-directories-first --color=auto --icons --no-quotes -s name" \
+ lsf="eza -f --group-directories-first --color=auto --icons --no-quotes -s name" \
+ lsd="eza -D --group-directories-first --color=auto --icons --no-quotes -s name" \
+ lst="eza -lh --group-directories-first --color=auto --color-scale --icons --no-quotes --smart-group -s time --total-size --no-user --no-permissions" \
+ cat="bat -P" \
+ ccat="highlight --out-format=ansi" \
+ ip="ip -color=auto"
+
+# These common commands are just too long! Abbreviate them.
+alias \
+ cl="clear" \
+ ka="killall" \
+ trem="transmission-remote" \
+ YT="youtube-viewer" \
+ sdn="shutdown -h now" \
+ e="$EDITOR" \
+ v="$EDITOR" \
+ p="paru" \
+ z="zathura" \
+ lg="lazygit" \
+ sx="swayimg" \
+ md="monerod --prune-blockchain --fast-block-sync 1 --data-dir /mnt/ssd/monero/bitmonero" \
+ fetch="fastfetch" \
+ de="doasedit"
+
+# Git related
+alias \
+ g="git" \
+ gs="git status --short" \
+ gd="git diff" \
+ ga="git add" \
+ gc="git commit" \
+ gp="git push" \
+ gu="git pull" \
+ gl="git log" \
+ gb="git branch" \
+ gi="git init" \
+ gcl="git clone"
+
+alias \
+ magit="nvim -c MagitOnly" \
+ ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutenvrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc"
diff --git a/.config/shell/bm-dirs b/.config/shell/bm-dirs
new file mode 100644
index 0000000..3ab0b0d
--- /dev/null
+++ b/.config/shell/bm-dirs
@@ -0,0 +1,14 @@
+# You can add comments to these files with #
+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}
+rr /mnt/ssd/projects
+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..7d7ef0d
--- /dev/null
+++ b/.config/shell/bm-files
@@ -0,0 +1,16 @@
+# 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
+
+# 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)
+cfu ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls # RSS urls for newsboat
+cfmc ${XDG_CONFIG_HOME:-$HOME/.config}/rmpc/config.ron # rmpc (music player) config
diff --git a/.config/shell/inputrc b/.config/shell/inputrc
new file mode 100644
index 0000000..f9b94dd
--- /dev/null
+++ b/.config/shell/inputrc
@@ -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
diff --git a/.config/shell/profile b/.config/shell/profile
new file mode 100644
index 0000000..6234bba
--- /dev/null
+++ b/.config/shell/profile
@@ -0,0 +1,94 @@
+#!/bin/sh
+# shellcheck disable=SC2155
+
+# Profile file, runs on login. Environmental variables are set here.
+
+# Add all directories in `~/.local/bin` to $PATH
+export PATH="$PATH:$(find ~/.local/bin -type d | paste -sd ':' -)"
+
+unsetopt PROMPT_SP 2>/dev/null
+
+# Default programs:
+export EDITOR="nvim"
+export MANPAGER='nvim +Man!'
+export TERMINAL="footclient"
+export TERMINAL_PROG="footclient"
+export BROWSER="firefox"
+
+unset SSH_AGENT_PID
+if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
+ export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
+fi
+
+# Change the default crypto/weather monitor sites.
+# export CRYPTOURL="rate.sx"
+# export WTTRURL="wttr.in"
+
+# ~/ Clean-up:
+export XDG_CONFIG_HOME="$HOME/.config"
+export XDG_DATA_HOME="$HOME/.local/share"
+export XDG_CACHE_HOME="$HOME/.cache"
+export XDG_STATE_HOME="$HOME/.local/state"
+export XDG_MUSIC_DIR="/mnt/ssd/music"
+export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch-config"
+export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc"
+export INPUTRC="$XDG_CONFIG_HOME/shell/inputrc"
+export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
+#export GNUPGHOME="$XDG_DATA_HOME/gnupg"
+export WINEPREFIX="$XDG_DATA_HOME/wineprefixes/default"
+export KODI_DATA="$XDG_DATA_HOME/kodi"
+export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store"
+export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
+export ANDROID_SDK_HOME="$XDG_CONFIG_HOME/android"
+export CARGO_HOME="$XDG_DATA_HOME/cargo"
+export GOPATH="$XDG_DATA_HOME/go"
+export GOMODCACHE="$XDG_CACHE_HOME/go/mod"
+export ANSIBLE_CONFIG="$XDG_CONFIG_HOME/ansible/ansible.cfg"
+export UNISON="$XDG_DATA_HOME/unison"
+export HISTFILE="$XDG_DATA_HOME/history"
+export MBSYNCRC="$XDG_CONFIG_HOME/mbsync/config"
+export ELECTRUMDIR="$XDG_DATA_HOME/electrum"
+export PYTHONSTARTUP="$XDG_CONFIG_HOME/python/pythonrc"
+export SQLITE_HISTORY="$XDG_DATA_HOME/sqlite_history"
+export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"
+export CUDA_CACHE_PATH="$XDG_CACHE_HOME/nv"
+export KUBECONFIG="$XDG_CONFIG_HOME/kube/config"
+export KUBECACHEDIR="$XDG_CACHE_HOME/kube"
+export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
+export PASSWORD_STORE_CLIP_TIME=5
+
+# Other program settings:
+export DICS="/usr/share/stardict/dic/"
+export DOAS_ASKPASS="$HOME/.local/bin/dmenupass"
+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="gtk3" # Have QT use gtk3 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 LIBVA_DRIVER_NAME=nvidia
+export __GLX_VENDOR_LIBRARY_NAME=nvidia
+export MOZ_DISABLE_RDD_SANDBOX=1 # For HW in Firefox on nvidia gpu
+export ELECTRON_OZONE_PLATFORM_HINT=auto # Electron fix
+export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 # Disables decorations for QT applications
+export FZF_DEFAULT_OPTS=\
+"--layout=reverse --height 40% \
+--color=fg:#e5e9f0,bg:-1,hl:#81a1c1 \
+--color=fg+:#e5e9f0,bg+:#3b4252,hl+:#81a1c1 \
+--color=info:#eacb8a,prompt:#bf6069,pointer:#b48dac \
+--color=marker:#a3be8b,spinner:#b48dac,header:#a3be8b"
+export YT_X_FZF_OPTS="$FZF_DEFAULT_OPTS"
+export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#767676"
+export BAT_THEME="gruvbox-dark"
+
+[ ! -f "$XDG_CONFIG_HOME/shell/shortcutrc" ] && setsid -f shortcuts >/dev/null 2>&1
+
+# Start graphical server on user's current tty if not already running.
+[ "$(tty)" = "/dev/tty1" ] && ! pidof -s Hyprland >/dev/null 2>&1 && exec dbus-run-session Hyprland