From 6be4b3af244e1da90868beaaa34291c8c97dcfe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Fernando=20Carri=C3=B3n?= Date: Sun, 29 Sep 2024 16:11:19 +0000 Subject: [PATCH] unify home and etc dotfiles --- _backup/.bak_acpi/acpi/events/lidconf | 3 + _backup/.bak_acpi/acpi/lid.sh | 19 +++ etc/any/bash/bash.bashrc | 108 +++++++++++++++++ etc/any/bash/bashrc.d/00-functions.sh | 111 ++++++++++++++++++ etc/any/bash/bashrc.d/aliases.sh | 72 ++++++++++++ etc/any/bash/bashrc.d/editor.sh | 8 ++ etc/any/bash/bashrc.d/less.sh | 7 ++ etc/any/bash/bashrc.d/prompt.sh | 89 ++++++++++++++ etc/any/bash/bashrc.d/vi.sh | 2 + etc/any/bash/profile | 27 +++++ etc/linux-gnu/bash/profile.d/Z99-Z99-vt220.sh | 22 ++++ .../linux-gnu/issue/issue | 0 etc/linux-gnu/issue/issue.diverted | 2 + etc/linux-gnu/issue/issue.net | 1 + etc/linux-gnu/issue/issue.net.diverted | 1 + .../serial-getty@ttyUSB0.service | 1 + .../system/serial-getty@ttyUSB0.service | 52 ++++++++ {any => home/any}/bash/.bash_aliases | 0 {any => home/any}/bash/.bash_functions | 0 {any => home/any}/bash/.bash_logout | 0 {any => home/any}/bash/.bash_profile | 0 {any => home/any}/bash/.bashrc | 0 .../any/bash/.sudo_as_admin_successful | 0 {any => home/any}/git/.gitconfig | 0 {any => home/any}/gpg/.gnupg/gpg-agent.conf | 0 {any => home/any}/gpg/.gnupg/gpg.conf | 0 .../any}/kitty/.config/kitty/kitty.conf | 0 .../scripts/.local/bin/aws-assume-role.sh | 0 .../any}/scripts/.local/bin/aws-creds | 0 .../any}/scripts/.local/bin/export_x_info | 0 {any => home/any}/scripts/.local/bin/irc | 0 .../.local/bin/irc-bounce-and-notify.sh | 0 {any => home/any}/scripts/.local/bin/lsix | 0 .../any}/scripts/.local/bin/termtest.sh | 0 .../any}/scripts/.local/bin/utf16-2-utf8.sh | 0 {any => home/any}/ssh/.ssh/config | 0 {any => home/any}/tmux/.tmux.conf | 0 .../any}/tmux/.tmux/sessions/workspace | 0 {any => home/any}/vi/.exrc | 0 {any => home/any}/vim/.config/nvim | 0 {any => home/any}/vim/.vim/.gitignore | 0 {any => home/any}/vim/.vim/autoload/plug.vim | 0 .../any}/vim/.vim/autoload/plug.vim.old | 0 {any => home/any}/vim/.vim/bak.vimrc | 0 {any => home/any}/vim/.vim/coc-settings.json | 0 {any => home/any}/vim/.vim/colors/Czar.vim | 0 {any => home/any}/vim/.vim/colors/inkpot.vim | 0 {any => home/any}/vim/.vim/colors/srcery.vim | 0 .../any}/vim/.vim/colors/synthwave.vim | 0 .../any}/vim/.vim/colors/twilight.vim | 0 {any => home/any}/vim/.vim/init.vim | 0 .../any/vim/.vim/plugged}/.gitkeep | 0 {any => home/any}/vim/.vim/spell/en.utf-8.add | 0 .../any}/vim/.vim/spell/en.utf-8.add.spl | Bin {any => home/any}/vim/.vim/tmp/.gitignore | 0 .../any/vim/.vim/tmp/backup}/.gitkeep | 0 .../any/vim/.vim/tmp/swap}/.gitkeep | 0 .../any/vim/.vim/tmp/undo}/.gitkeep | 0 {any => home/any}/vim/.vim/vimrc | 0 .../any}/vim/.vim/vimrc.d/todo-comments.lua | 0 .../any}/vim/.vim/vimrc.d/treesitter.lua | 0 .../any}/vim/.vim/vimrc.d/venv-selector.lua | 0 {any => home/any}/vim/.vim/vimrc.d/zls.lua | 0 {any => home/any}/wezterm/.wezterm.lua | 0 {freebsd => home/cygwin}/.gitkeep | 0 .../.config/karabiner/karabiner.json | 0 {haiku => home/freebsd}/.gitkeep | 0 {linux-android => home/haiku}/.gitkeep | 0 {msys => home/linux-android}/.gitkeep | 0 .../linux-gnu}/dunst/.config/dunst/dunstrc | 0 .../fonts/.local/share/fonts/Misc/.uuid | 0 .../share/fonts/Misc/Glass_TTY_VT220.ttf | Bin .../share/fonts/Misc/decterm_modern.ttf | Bin .../fonts/.local/share/fonts/NerdFonts/.uuid | 0 .../fonts/NerdFonts/FiraCodeNerdFont-Bold.ttf | Bin .../NerdFonts/FiraCodeNerdFont-Light.ttf | Bin .../NerdFonts/FiraCodeNerdFont-Medium.ttf | Bin .../NerdFonts/FiraCodeNerdFont-Regular.ttf | Bin .../NerdFonts/FiraCodeNerdFont-Retina.ttf | Bin .../NerdFonts/FiraCodeNerdFont-SemiBold.ttf | Bin .../NerdFonts/FiraCodeNerdFontMono-Bold.ttf | Bin .../NerdFonts/FiraCodeNerdFontMono-Light.ttf | Bin .../NerdFonts/FiraCodeNerdFontMono-Medium.ttf | Bin .../FiraCodeNerdFontMono-Regular.ttf | Bin .../NerdFonts/FiraCodeNerdFontMono-Retina.ttf | Bin .../FiraCodeNerdFontMono-SemiBold.ttf | Bin .../NerdFonts/FiraCodeNerdFontPropo-Bold.ttf | Bin .../NerdFonts/FiraCodeNerdFontPropo-Light.ttf | Bin .../FiraCodeNerdFontPropo-Medium.ttf | Bin .../FiraCodeNerdFontPropo-Regular.ttf | Bin .../FiraCodeNerdFontPropo-Retina.ttf | Bin .../FiraCodeNerdFontPropo-SemiBold.ttf | Bin .../extension.js | 0 .../metadata.json | 0 .../linux-gnu}/i3/.config/i3/config | 0 .../linux-gnu}/i3/.config/i3status/config | 0 {linux-gnu => home/linux-gnu}/i3/.i3/config | 0 .../linux-gnu}/i3/.i3/i3status.conf | 0 .../user/default.target.wants/xbanish.service | 0 .../.config/systemd/user/xbanish.service | 0 .../wordgrinder/.wordgrinder/kitty.conf | 0 .../wordgrinder/.wordgrinder/kitty.session | 0 .../wordgrinder/.wordgrinder/settings.dat | 0 {openbsd => home/msys}/.gitkeep | 0 {netbsd => home/netbsd}/ctwm/.ctwmrc | 0 {netbsd => home/netbsd}/ctwm/.xprofile | 0 {netbsd => home/netbsd}/ctwm/.xsession | 0 {solaris => home/openbsd}/.gitkeep | 0 home/solaris/.gitkeep | 0 stowall.sh | 11 +- 110 files changed, 535 insertions(+), 1 deletion(-) create mode 100644 _backup/.bak_acpi/acpi/events/lidconf create mode 100755 _backup/.bak_acpi/acpi/lid.sh create mode 100644 etc/any/bash/bash.bashrc create mode 100644 etc/any/bash/bashrc.d/00-functions.sh create mode 100644 etc/any/bash/bashrc.d/aliases.sh create mode 100644 etc/any/bash/bashrc.d/editor.sh create mode 100644 etc/any/bash/bashrc.d/less.sh create mode 100644 etc/any/bash/bashrc.d/prompt.sh create mode 100644 etc/any/bash/bashrc.d/vi.sh create mode 100644 etc/any/bash/profile create mode 100644 etc/linux-gnu/bash/profile.d/Z99-Z99-vt220.sh rename any/bash/.sudo_as_admin_successful => etc/linux-gnu/issue/issue (100%) create mode 100644 etc/linux-gnu/issue/issue.diverted create mode 100644 etc/linux-gnu/issue/issue.net create mode 100644 etc/linux-gnu/issue/issue.net.diverted create mode 120000 etc/linux-gnu/systemd/systemd/system/getty.target.wants/serial-getty@ttyUSB0.service create mode 100644 etc/linux-gnu/systemd/systemd/system/serial-getty@ttyUSB0.service rename {any => home/any}/bash/.bash_aliases (100%) rename {any => home/any}/bash/.bash_functions (100%) rename {any => home/any}/bash/.bash_logout (100%) rename {any => home/any}/bash/.bash_profile (100%) rename {any => home/any}/bash/.bashrc (100%) rename any/vim/.vim/plugged/.gitkeep => home/any/bash/.sudo_as_admin_successful (100%) rename {any => home/any}/git/.gitconfig (100%) rename {any => home/any}/gpg/.gnupg/gpg-agent.conf (100%) rename {any => home/any}/gpg/.gnupg/gpg.conf (100%) rename {any => home/any}/kitty/.config/kitty/kitty.conf (100%) rename {any => home/any}/scripts/.local/bin/aws-assume-role.sh (100%) rename {any => home/any}/scripts/.local/bin/aws-creds (100%) rename {any => home/any}/scripts/.local/bin/export_x_info (100%) rename {any => home/any}/scripts/.local/bin/irc (100%) rename {any => home/any}/scripts/.local/bin/irc-bounce-and-notify.sh (100%) rename {any => home/any}/scripts/.local/bin/lsix (100%) rename {any => home/any}/scripts/.local/bin/termtest.sh (100%) rename {any => home/any}/scripts/.local/bin/utf16-2-utf8.sh (100%) rename {any => home/any}/ssh/.ssh/config (100%) rename {any => home/any}/tmux/.tmux.conf (100%) rename {any => home/any}/tmux/.tmux/sessions/workspace (100%) rename {any => home/any}/vi/.exrc (100%) rename {any => home/any}/vim/.config/nvim (100%) rename {any => home/any}/vim/.vim/.gitignore (100%) rename {any => home/any}/vim/.vim/autoload/plug.vim (100%) rename {any => home/any}/vim/.vim/autoload/plug.vim.old (100%) rename {any => home/any}/vim/.vim/bak.vimrc (100%) rename {any => home/any}/vim/.vim/coc-settings.json (100%) rename {any => home/any}/vim/.vim/colors/Czar.vim (100%) rename {any => home/any}/vim/.vim/colors/inkpot.vim (100%) rename {any => home/any}/vim/.vim/colors/srcery.vim (100%) rename {any => home/any}/vim/.vim/colors/synthwave.vim (100%) rename {any => home/any}/vim/.vim/colors/twilight.vim (100%) rename {any => home/any}/vim/.vim/init.vim (100%) rename {any/vim/.vim/tmp/backup => home/any/vim/.vim/plugged}/.gitkeep (100%) rename {any => home/any}/vim/.vim/spell/en.utf-8.add (100%) rename {any => home/any}/vim/.vim/spell/en.utf-8.add.spl (100%) rename {any => home/any}/vim/.vim/tmp/.gitignore (100%) rename {any/vim/.vim/tmp/swap => home/any/vim/.vim/tmp/backup}/.gitkeep (100%) rename {any/vim/.vim/tmp/undo => home/any/vim/.vim/tmp/swap}/.gitkeep (100%) rename {cygwin => home/any/vim/.vim/tmp/undo}/.gitkeep (100%) rename {any => home/any}/vim/.vim/vimrc (100%) rename {any => home/any}/vim/.vim/vimrc.d/todo-comments.lua (100%) rename {any => home/any}/vim/.vim/vimrc.d/treesitter.lua (100%) rename {any => home/any}/vim/.vim/vimrc.d/venv-selector.lua (100%) rename {any => home/any}/vim/.vim/vimrc.d/zls.lua (100%) rename {any => home/any}/wezterm/.wezterm.lua (100%) rename {freebsd => home/cygwin}/.gitkeep (100%) rename {darwin => home/darwin}/karabiner/.config/karabiner/karabiner.json (100%) rename {haiku => home/freebsd}/.gitkeep (100%) rename {linux-android => home/haiku}/.gitkeep (100%) rename {msys => home/linux-android}/.gitkeep (100%) rename {linux-gnu => home/linux-gnu}/dunst/.config/dunst/dunstrc (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/Misc/.uuid (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/Misc/Glass_TTY_VT220.ttf (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/Misc/decterm_modern.ttf (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/NerdFonts/.uuid (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Bold.ttf (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Light.ttf (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Medium.ttf (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Regular.ttf (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Retina.ttf (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-SemiBold.ttf (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Bold.ttf (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Light.ttf (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Medium.ttf (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Regular.ttf (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Retina.ttf (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-SemiBold.ttf (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Bold.ttf (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Light.ttf (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Medium.ttf (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Regular.ttf (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Retina.ttf (100%) rename {linux-gnu => home/linux-gnu}/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-SemiBold.ttf (100%) rename {linux-gnu => home/linux-gnu}/gnome-extensions/.local/share/gnome-shell/extensions/hide_clock@grantmcwilliams.com/extension.js (100%) rename {linux-gnu => home/linux-gnu}/gnome-extensions/.local/share/gnome-shell/extensions/hide_clock@grantmcwilliams.com/metadata.json (100%) rename {linux-gnu => home/linux-gnu}/i3/.config/i3/config (100%) rename {linux-gnu => home/linux-gnu}/i3/.config/i3status/config (100%) rename {linux-gnu => home/linux-gnu}/i3/.i3/config (100%) rename {linux-gnu => home/linux-gnu}/i3/.i3/i3status.conf (100%) rename {linux-gnu => home/linux-gnu}/systemd/.config/systemd/user/default.target.wants/xbanish.service (100%) rename {linux-gnu => home/linux-gnu}/systemd/.config/systemd/user/xbanish.service (100%) rename {linux-gnu => home/linux-gnu}/wordgrinder/.wordgrinder/kitty.conf (100%) rename {linux-gnu => home/linux-gnu}/wordgrinder/.wordgrinder/kitty.session (100%) rename {linux-gnu => home/linux-gnu}/wordgrinder/.wordgrinder/settings.dat (100%) rename {openbsd => home/msys}/.gitkeep (100%) rename {netbsd => home/netbsd}/ctwm/.ctwmrc (100%) rename {netbsd => home/netbsd}/ctwm/.xprofile (100%) rename {netbsd => home/netbsd}/ctwm/.xsession (100%) rename {solaris => home/openbsd}/.gitkeep (100%) create mode 100644 home/solaris/.gitkeep diff --git a/_backup/.bak_acpi/acpi/events/lidconf b/_backup/.bak_acpi/acpi/events/lidconf new file mode 100644 index 0000000..1567070 --- /dev/null +++ b/_backup/.bak_acpi/acpi/events/lidconf @@ -0,0 +1,3 @@ +# run a script on lid open/close events +event=button/lid +action=/etc/acpi/lid.sh "%e" diff --git a/_backup/.bak_acpi/acpi/lid.sh b/_backup/.bak_acpi/acpi/lid.sh new file mode 100755 index 0000000..6cab537 --- /dev/null +++ b/_backup/.bak_acpi/acpi/lid.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +state=$(echo "$1" | cut -d " " -f 3) +case "$state" in + open) + # do what needs to be done when the lid is opened + if ! xbanish_loc="$(type -p "xbanish")" || [[ -z $xbanish_loc ]] + then + killall xbanish + xbanish & + fi + ;; + close) + # do what needs to be done when the lid is closed + ;; + *) + # panic: not a state I know about! +esac + diff --git a/etc/any/bash/bash.bashrc b/etc/any/bash/bash.bashrc new file mode 100644 index 0000000..55538ce --- /dev/null +++ b/etc/any/bash/bash.bashrc @@ -0,0 +1,108 @@ +# System-wide .bashrc file for interactive bash(1) shells. + +# To enable the settings / commands in this file for login shells as well, +# this file has to be sourced in /etc/profile. + +# If not running interactively, don't do anything +[ -z "$PS1" ] && return + +# case "$(basename $(tty))" in +# ttyS*|ttyUSB*|ttyACM*|ttyAMA) +# # Don't try to set the window title on serial ports +# shopt -u checkwinsize +# export TERM=vt220 +# ;; +# esac + +limited_terminal() { + case $TERM in + *-color*|*-256color*) + return 1 + ;; + *unicode*) + return 1 + ;; + dumb|linux|hurd|vt*|mach*|wsvt*|tmux*|cons25*|rxvt*|screen*|sun) + return 0 + ;; + *) + return 1 + ;; + esac +} + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, overwrite the one in /etc/profile) +# but only if not SUDOing and have SUDO_PS1 set; then assume smart user. +if ! [ -n "${SUDO_USER}" -a -n "${SUDO_PS1}" ]; then + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +fi + +# Commented out, don't overwrite xterm -T "title" -n "icontitle" by default. +# If this is an xterm set the title to user@host:dir +#case "$TERM" in +#xterm*|rxvt*) +# PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' +# ;; +#*) +# ;; +#esac + +# enable bash completion in interactive shells +#if ! shopt -oq posix; then +# if [ -f /usr/share/bash-completion/bash_completion ]; then +# . /usr/share/bash-completion/bash_completion +# elif [ -f /etc/bash_completion ]; then +# . /etc/bash_completion +# fi +#fi + +# sudo hint +if [ ! -e "$HOME/.sudo_as_admin_successful" ] && [ ! -e "$HOME/.hushlogin" ] +then + case " $(groups) " in *\ admin\ *|*\ sudo\ *) + if [ -x /usr/bin/sudo ]; then + cat <<-EOF + To run a command as administrator (user "root"), use "sudo ". + See "man sudo_root" for details. + + EOF + fi + esac +fi + +# if the command-not-found package is installed, use it +if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ] +then + function command_not_found_handle { + # check because c-n-f could've been removed in the meantime + if [ -x /usr/lib/command-not-found ] + then + /usr/lib/command-not-found -- "$1" + return $? + elif [ -x /usr/share/command-not-found/command-not-found ] + then + /usr/share/command-not-found/command-not-found -- "$1" + return $? + else + printf "%s: command not found\n" "$1" >&2 + return 127 + fi + } +fi + +if [ -d /etc/bashrc.d ]; then + for i in /etc/bashrc.d/*.sh; do + if [ -r $i ]; then + . $i + fi + done +fi diff --git a/etc/any/bash/bashrc.d/00-functions.sh b/etc/any/bash/bashrc.d/00-functions.sh new file mode 100644 index 0000000..fa4e2e0 --- /dev/null +++ b/etc/any/bash/bashrc.d/00-functions.sh @@ -0,0 +1,111 @@ +function cl() { + cd $1 + ls +} + +function cll() { + cd $1 + ls -l +} + +function inline_exrc() { + local file_path="$1" + + if [[ ! -f "$file_path" ]]; then + echo "File not found: $file_path" + return 1 + fi + + # Read the file and process it + local processed_content=$(sed '/^$/d; /^"/d' "$file_path" | tr '\n' '|') + + # Remove the trailing | + processed_content=$(echo "$processed_content" | sed 's/|$//') + + # Output the processed content + echo "$processed_content" +} + +function whence() { + local print_links=false + local command="" + local batch=false + + # Manual option parsing + for arg in "$@"; do + case "$arg" in + -p) + print_links=true + ;; + -h) + tabs 2 + echo "Usage:" + echo -e "\twhence [-q] [-p | -h] " + echo -e "\t\t-h: Print Usage" + echo -e "\t\t-p: Print each symlink path" + echo -e "\t\t-b: Batch mode, only print paths" + tabs + return + ;; + -b) + batch=true + ;; + -*) + echo "Invalid option: $arg" >&2 + return + ;; + *) + command="$arg" + ;; + esac + done + + # Ensure a command was provided + if [[ -z "$command" ]]; then + echo "No command provided" >&2 + return + fi + + # Find the initial path using which + local original_path=$(which "$command" 2> /dev/null) + local path=$original_path + if [[ -z "$path" ]]; then + if (type -t "$command" >/dev/null) + then + type=$(type -t "$command") + echo "$command is a $type" + if [[ "$type" == "function" ]] + then + echo "Run: \`type $command\` to see its definition." + fi + return + else + echo "$command not found" + return + fi + fi + + # Follow symlinks + while [[ -L "$path" ]]; do + if [[ "$print_links" == "true" ]] + then + if [[ "$batch" == "false" ]] + then + echo -ne "Link:\t\t" + fi + echo "$path -> $(readlink -f "$path")" + fi + path=$(readlink -f "$path") + done + + if [[ "$batch" == "false" ]] + then + if [[ "$path" == "$original_path" ]] + then + echo -ne "Executable:\t" + else + echo -ne "Ultimate Exe:\t" + fi + fi + echo "$path" +} diff --git a/etc/any/bash/bashrc.d/aliases.sh b/etc/any/bash/bashrc.d/aliases.sh new file mode 100644 index 0000000..7b910ea --- /dev/null +++ b/etc/any/bash/bashrc.d/aliases.sh @@ -0,0 +1,72 @@ +alias mv="mv -iv" +alias cp="cp -riv" +alias mkdir="mkdir -vp" + +alias red_october="ping -c1" +alias ro="red_october" + +if [ -n "$DISPLAY" ] +then + alias clipboard="xclip -selection c -i" + alias cb="clipboard" +fi + +if [ -f /usr/share/X11/locale/en_US.UTF-8/Compose ] +then + alias compose_ref="less /usr/share/X11/locale/en_US.UTF-8/Compose" +fi + +# Editors +alias ed="ed -p': '" +if [ -x "$(command -v nvim)" ] && ! limited_terminal +then + vim_path="$(command -v vim)" + vimdiff_path="$(command -v vimdiff)" + if [ -x "$vim_path" ] + then + alias vvim="$vim_path" + fi + if [ -x "$vimdiff_path" ] + then + alias vvimdiff="$vimdiff_path" + fi + alias vim=nvim + alias vimdiff="nvim -d" +fi +if [[ "$(whence -b vi)" == "/usr/local/bin/ex" ]] +then + alias vi='EXINIT="$(inline_exrc $HOME/.exrc)" vi' +fi + +if [ -x "$(command -v xdg-open)" ] +then + alias open="xdg-open" +fi + +# cat && less +if ! limited_terminal && [[ -x "$(command -v batcat)" || -x "$(command -v bat)" ]] +then + if [ -x "$(command -v batcat)" ] + then + alias bat=batcat + fi + alias ccat="$(which cat)" + alias lless="$(which less)" + alias less=bat + alias cat=bat +fi + +# ls +if ! limited_terminal +then + if [ -x "$(command -v lsd)" ] + then + alias lls="$(which ls)" + alias ls=lsd + else + alias ls='ls --color=auto' + fi +fi +alias la='ls -A' +alias ll='ls -lh' +alias lla='ls -lA' diff --git a/etc/any/bash/bashrc.d/editor.sh b/etc/any/bash/bashrc.d/editor.sh new file mode 100644 index 0000000..a5653f2 --- /dev/null +++ b/etc/any/bash/bashrc.d/editor.sh @@ -0,0 +1,8 @@ +if [ -x "$(which nvim)" ] +then + export EDITOR=nvim + export VISUAL=nvim +else + export EDITOR=vim + export VISUAL=vim +fi diff --git a/etc/any/bash/bashrc.d/less.sh b/etc/any/bash/bashrc.d/less.sh new file mode 100644 index 0000000..125b334 --- /dev/null +++ b/etc/any/bash/bashrc.d/less.sh @@ -0,0 +1,7 @@ +# Enable Source Highlighting in less +LESSPIPE=/usr/bin/src-hilite-lesspipe.sh +if [ -x $LESSPIPE ] +then + export LESSOPEN="| ${LESSPIPE} %s" + export LESS=' -R ' +fi diff --git a/etc/any/bash/bashrc.d/prompt.sh b/etc/any/bash/bashrc.d/prompt.sh new file mode 100644 index 0000000..788d005 --- /dev/null +++ b/etc/any/bash/bashrc.d/prompt.sh @@ -0,0 +1,89 @@ +BASE_COLOR=4 +[ "$(id -u)" -eq 0 ] && BASE_COLOR=1 + +REMOTE=false +if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then + REMOTE=true +else + case $(ps -o comm= -p $PPID) in + sshd|*/sshd) REMOTE=true;; + esac +fi + +if [ $REMOTE = true ] +then + if [ -f /etc/nickname ] + then + NICK="$(cat /etc/nickname | tr '[:lower:]' '[:upper:]' | xargs echo)" + else + NICK="SSH" + fi + PREFIX="\[$(tput setaf $BASE_COLOR)\]\[$(tput bold)\][\[$(tput setaf 1)\]$NICK\[$(tput setaf $BASE_COLOR)\]]\[$(tput sgr0)\]" +else + PREFIX= +fi + +prompt_cmd() { + EXITSTATUS=$? + tput bold + tput setaf $BASE_COLOR + echo -n "[" + tput setaf 3 + echo -n "$(date -u +%H:%M:%S) UTC" + tput setaf $BASE_COLOR + echo -n "]" + k8scontext=$(kubectl config current-context 2>/dev/null | perl -pe 's/\n$//') + if [ ! -z "$k8scontext" ] + then + tput setaf $BASE_COLOR + echo -n "[" + tput setaf 2 + echo -n "K8s: " + tput setaf 1 + echo -n "$k8scontext" + tput setaf $BASE_COLOR + echo -n "]" + fi + awsprofile=$(aws-creds 2>/dev/null) + if [ ! -z "$awsprofile" ] + then + tput setaf $BASE_COLOR + echo -n "[" + tput setaf 2 + echo -n "AWS: " + tput setaf 1 + echo -n "$awsprofile" + tput setaf $BASE_COLOR + echo -n "]" + fi + tput setaf 2 + echo -n "[" + if [[ $EXITSTATUS -eq 0 ]] + then + tput setaf 2 + else + tput setaf 1 + fi + echo -n "$EXITSTATUS" + tput setaf 2 + echo -n "]" + branch=$(hg branch 2>/dev/null || git branch 2>/dev/null | grep "\*" | perl -pe 's/\* ([^(]\S+)|\* \(HEAD detached at (\S+)\)/\1\2/') + if [ ! -z "$branch" ] + then + echo + tput setaf $BASE_COLOR + echo -n "[" + tput setaf 1 + echo -n "$branch" + tput setaf $BASE_COLOR + echo -n "]" + fi + tput sgr0 + echo +} + +if ! limited_terminal +then + export PROMPT_COMMAND="prompt_cmd" + export PS1="$PREFIX\[$(tput setaf $BASE_COLOR)\]\[$(tput bold)\][\[$(tput setaf 1)\]\u\[$(tput setaf $BASE_COLOR)\]@\h \[$(tput setaf 3)\]\W\[$(tput setaf $BASE_COLOR)\]]\[$(tput setaf 1)\]\\$ \[$(tput sgr0)\]" +fi diff --git a/etc/any/bash/bashrc.d/vi.sh b/etc/any/bash/bashrc.d/vi.sh new file mode 100644 index 0000000..e56cf86 --- /dev/null +++ b/etc/any/bash/bashrc.d/vi.sh @@ -0,0 +1,2 @@ +# enable vi key navigation +set -o vi diff --git a/etc/any/bash/profile b/etc/any/bash/profile new file mode 100644 index 0000000..5e6a1ca --- /dev/null +++ b/etc/any/bash/profile @@ -0,0 +1,27 @@ +# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) +# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). + +if [ -d /etc/profile.d ]; then + for i in /etc/profile.d/*.sh; do + if [ -r $i ]; then + . $i + fi + done + unset i +fi + +if [ "${PS1-}" ]; then + if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then + # The file bash.bashrc already sets the default PS1. + # PS1='\h:\w\$ ' + if [ -f /etc/bash.bashrc ]; then + . /etc/bash.bashrc + fi + else + if [ "$(id -u)" -eq 0 ]; then + PS1='# ' + else + PS1='$ ' + fi + fi +fi diff --git a/etc/linux-gnu/bash/profile.d/Z99-Z99-vt220.sh b/etc/linux-gnu/bash/profile.d/Z99-Z99-vt220.sh new file mode 100644 index 0000000..2f4a664 --- /dev/null +++ b/etc/linux-gnu/bash/profile.d/Z99-Z99-vt220.sh @@ -0,0 +1,22 @@ +if (locale -a | grep -q en_US.iso88591) +then + case $TERM in + vt*) + export LANG=en_US.ISO-8859-1 + export LANGUAGE= + export LC_CTYPE="en_US.ISO-8859-1" + export LC_NUMERIC="en_US.ISO-8859-1" + export LC_TIME="en_US.ISO-8859-1" + export LC_COLLATE="en_US.ISO-8859-1" + export LC_MONETARY="en_US.ISO-8859-1" + export LC_MESSAGES="en_US.ISO-8859-1" + export LC_PAPER="en_US.ISO-8859-1" + export LC_NAME="en_US.ISO-8859-1" + export LC_ADDRESS="en_US.ISO-8859-1" + export LC_TELEPHONE="en_US.ISO-8859-1" + export LC_MEASUREMENT="en_US.ISO-8859-1" + export LC_IDENTIFICATION="en_US.ISO-8859-1" + export LC_ALL=en_US.ISO-8859-1 + ;; + esac +fi diff --git a/any/bash/.sudo_as_admin_successful b/etc/linux-gnu/issue/issue similarity index 100% rename from any/bash/.sudo_as_admin_successful rename to etc/linux-gnu/issue/issue diff --git a/etc/linux-gnu/issue/issue.diverted b/etc/linux-gnu/issue/issue.diverted new file mode 100644 index 0000000..d5d863d --- /dev/null +++ b/etc/linux-gnu/issue/issue.diverted @@ -0,0 +1,2 @@ +Ubuntu 22.04.4 LTS \n \l + diff --git a/etc/linux-gnu/issue/issue.net b/etc/linux-gnu/issue/issue.net new file mode 100644 index 0000000..b7ecd00 --- /dev/null +++ b/etc/linux-gnu/issue/issue.net @@ -0,0 +1 @@ +Pop!_OS 22.04 LTS diff --git a/etc/linux-gnu/issue/issue.net.diverted b/etc/linux-gnu/issue/issue.net.diverted new file mode 100644 index 0000000..68bd29c --- /dev/null +++ b/etc/linux-gnu/issue/issue.net.diverted @@ -0,0 +1 @@ +Ubuntu 22.04.4 LTS diff --git a/etc/linux-gnu/systemd/systemd/system/getty.target.wants/serial-getty@ttyUSB0.service b/etc/linux-gnu/systemd/systemd/system/getty.target.wants/serial-getty@ttyUSB0.service new file mode 120000 index 0000000..f2b7132 --- /dev/null +++ b/etc/linux-gnu/systemd/systemd/system/getty.target.wants/serial-getty@ttyUSB0.service @@ -0,0 +1 @@ +../serial-getty@ttyUSB0.service \ No newline at end of file diff --git a/etc/linux-gnu/systemd/systemd/system/serial-getty@ttyUSB0.service b/etc/linux-gnu/systemd/systemd/system/serial-getty@ttyUSB0.service new file mode 100644 index 0000000..6a7a30e --- /dev/null +++ b/etc/linux-gnu/systemd/systemd/system/serial-getty@ttyUSB0.service @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Serial Getty on %I +Documentation=man:agetty(8) man:systemd-getty-generator(8) +Documentation=https://0pointer.de/blog/projects/serial-console.html +BindsTo=dev-%i.device +After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target +After=rc-local.service + +# If additional gettys are spawned during boot then we should make +# sure that this is synchronized before getty.target, even though +# getty.target didn't actually pull it in. +Before=getty.target +IgnoreOnIsolate=yes + +# IgnoreOnIsolate causes issues with sulogin, if someone isolates +# rescue.target or starts rescue.service from multi-user.target or +# graphical.target. +Conflicts=rescue.service +Before=rescue.service + +[Service] +# The '-o' option value tells agetty to replace 'login' arguments with an +# option to preserve environment (-p), followed by '--' for safety, and then +# the entered username. +# ExecStart=-/sbin/agetty -o '-p -- \\u' --keep-baud 115200,57600,38400,9600 %I $TERM +# ExecStart=-/sbin/agetty -8 -o '-p -- \\u' %I 19200 vt220 +ExecStart=/sbin/agetty -8 -L -h 19200 %I vt220 +Environment=TERM=vt220 +Type=idle +Restart=always +UtmpIdentifier=%I +StandardInput=tty +StandardOutput=tty +TTYPath=/dev/%I +TTYReset=yes +TTYVHangup=yes +IgnoreSIGPIPE=no +SendSIGHUP=yes +ImportCredential=agetty.* +ImportCredential=login.* + +[Install] +WantedBy=getty.target diff --git a/any/bash/.bash_aliases b/home/any/bash/.bash_aliases similarity index 100% rename from any/bash/.bash_aliases rename to home/any/bash/.bash_aliases diff --git a/any/bash/.bash_functions b/home/any/bash/.bash_functions similarity index 100% rename from any/bash/.bash_functions rename to home/any/bash/.bash_functions diff --git a/any/bash/.bash_logout b/home/any/bash/.bash_logout similarity index 100% rename from any/bash/.bash_logout rename to home/any/bash/.bash_logout diff --git a/any/bash/.bash_profile b/home/any/bash/.bash_profile similarity index 100% rename from any/bash/.bash_profile rename to home/any/bash/.bash_profile diff --git a/any/bash/.bashrc b/home/any/bash/.bashrc similarity index 100% rename from any/bash/.bashrc rename to home/any/bash/.bashrc diff --git a/any/vim/.vim/plugged/.gitkeep b/home/any/bash/.sudo_as_admin_successful similarity index 100% rename from any/vim/.vim/plugged/.gitkeep rename to home/any/bash/.sudo_as_admin_successful diff --git a/any/git/.gitconfig b/home/any/git/.gitconfig similarity index 100% rename from any/git/.gitconfig rename to home/any/git/.gitconfig diff --git a/any/gpg/.gnupg/gpg-agent.conf b/home/any/gpg/.gnupg/gpg-agent.conf similarity index 100% rename from any/gpg/.gnupg/gpg-agent.conf rename to home/any/gpg/.gnupg/gpg-agent.conf diff --git a/any/gpg/.gnupg/gpg.conf b/home/any/gpg/.gnupg/gpg.conf similarity index 100% rename from any/gpg/.gnupg/gpg.conf rename to home/any/gpg/.gnupg/gpg.conf diff --git a/any/kitty/.config/kitty/kitty.conf b/home/any/kitty/.config/kitty/kitty.conf similarity index 100% rename from any/kitty/.config/kitty/kitty.conf rename to home/any/kitty/.config/kitty/kitty.conf diff --git a/any/scripts/.local/bin/aws-assume-role.sh b/home/any/scripts/.local/bin/aws-assume-role.sh similarity index 100% rename from any/scripts/.local/bin/aws-assume-role.sh rename to home/any/scripts/.local/bin/aws-assume-role.sh diff --git a/any/scripts/.local/bin/aws-creds b/home/any/scripts/.local/bin/aws-creds similarity index 100% rename from any/scripts/.local/bin/aws-creds rename to home/any/scripts/.local/bin/aws-creds diff --git a/any/scripts/.local/bin/export_x_info b/home/any/scripts/.local/bin/export_x_info similarity index 100% rename from any/scripts/.local/bin/export_x_info rename to home/any/scripts/.local/bin/export_x_info diff --git a/any/scripts/.local/bin/irc b/home/any/scripts/.local/bin/irc similarity index 100% rename from any/scripts/.local/bin/irc rename to home/any/scripts/.local/bin/irc diff --git a/any/scripts/.local/bin/irc-bounce-and-notify.sh b/home/any/scripts/.local/bin/irc-bounce-and-notify.sh similarity index 100% rename from any/scripts/.local/bin/irc-bounce-and-notify.sh rename to home/any/scripts/.local/bin/irc-bounce-and-notify.sh diff --git a/any/scripts/.local/bin/lsix b/home/any/scripts/.local/bin/lsix similarity index 100% rename from any/scripts/.local/bin/lsix rename to home/any/scripts/.local/bin/lsix diff --git a/any/scripts/.local/bin/termtest.sh b/home/any/scripts/.local/bin/termtest.sh similarity index 100% rename from any/scripts/.local/bin/termtest.sh rename to home/any/scripts/.local/bin/termtest.sh diff --git a/any/scripts/.local/bin/utf16-2-utf8.sh b/home/any/scripts/.local/bin/utf16-2-utf8.sh similarity index 100% rename from any/scripts/.local/bin/utf16-2-utf8.sh rename to home/any/scripts/.local/bin/utf16-2-utf8.sh diff --git a/any/ssh/.ssh/config b/home/any/ssh/.ssh/config similarity index 100% rename from any/ssh/.ssh/config rename to home/any/ssh/.ssh/config diff --git a/any/tmux/.tmux.conf b/home/any/tmux/.tmux.conf similarity index 100% rename from any/tmux/.tmux.conf rename to home/any/tmux/.tmux.conf diff --git a/any/tmux/.tmux/sessions/workspace b/home/any/tmux/.tmux/sessions/workspace similarity index 100% rename from any/tmux/.tmux/sessions/workspace rename to home/any/tmux/.tmux/sessions/workspace diff --git a/any/vi/.exrc b/home/any/vi/.exrc similarity index 100% rename from any/vi/.exrc rename to home/any/vi/.exrc diff --git a/any/vim/.config/nvim b/home/any/vim/.config/nvim similarity index 100% rename from any/vim/.config/nvim rename to home/any/vim/.config/nvim diff --git a/any/vim/.vim/.gitignore b/home/any/vim/.vim/.gitignore similarity index 100% rename from any/vim/.vim/.gitignore rename to home/any/vim/.vim/.gitignore diff --git a/any/vim/.vim/autoload/plug.vim b/home/any/vim/.vim/autoload/plug.vim similarity index 100% rename from any/vim/.vim/autoload/plug.vim rename to home/any/vim/.vim/autoload/plug.vim diff --git a/any/vim/.vim/autoload/plug.vim.old b/home/any/vim/.vim/autoload/plug.vim.old similarity index 100% rename from any/vim/.vim/autoload/plug.vim.old rename to home/any/vim/.vim/autoload/plug.vim.old diff --git a/any/vim/.vim/bak.vimrc b/home/any/vim/.vim/bak.vimrc similarity index 100% rename from any/vim/.vim/bak.vimrc rename to home/any/vim/.vim/bak.vimrc diff --git a/any/vim/.vim/coc-settings.json b/home/any/vim/.vim/coc-settings.json similarity index 100% rename from any/vim/.vim/coc-settings.json rename to home/any/vim/.vim/coc-settings.json diff --git a/any/vim/.vim/colors/Czar.vim b/home/any/vim/.vim/colors/Czar.vim similarity index 100% rename from any/vim/.vim/colors/Czar.vim rename to home/any/vim/.vim/colors/Czar.vim diff --git a/any/vim/.vim/colors/inkpot.vim b/home/any/vim/.vim/colors/inkpot.vim similarity index 100% rename from any/vim/.vim/colors/inkpot.vim rename to home/any/vim/.vim/colors/inkpot.vim diff --git a/any/vim/.vim/colors/srcery.vim b/home/any/vim/.vim/colors/srcery.vim similarity index 100% rename from any/vim/.vim/colors/srcery.vim rename to home/any/vim/.vim/colors/srcery.vim diff --git a/any/vim/.vim/colors/synthwave.vim b/home/any/vim/.vim/colors/synthwave.vim similarity index 100% rename from any/vim/.vim/colors/synthwave.vim rename to home/any/vim/.vim/colors/synthwave.vim diff --git a/any/vim/.vim/colors/twilight.vim b/home/any/vim/.vim/colors/twilight.vim similarity index 100% rename from any/vim/.vim/colors/twilight.vim rename to home/any/vim/.vim/colors/twilight.vim diff --git a/any/vim/.vim/init.vim b/home/any/vim/.vim/init.vim similarity index 100% rename from any/vim/.vim/init.vim rename to home/any/vim/.vim/init.vim diff --git a/any/vim/.vim/tmp/backup/.gitkeep b/home/any/vim/.vim/plugged/.gitkeep similarity index 100% rename from any/vim/.vim/tmp/backup/.gitkeep rename to home/any/vim/.vim/plugged/.gitkeep diff --git a/any/vim/.vim/spell/en.utf-8.add b/home/any/vim/.vim/spell/en.utf-8.add similarity index 100% rename from any/vim/.vim/spell/en.utf-8.add rename to home/any/vim/.vim/spell/en.utf-8.add diff --git a/any/vim/.vim/spell/en.utf-8.add.spl b/home/any/vim/.vim/spell/en.utf-8.add.spl similarity index 100% rename from any/vim/.vim/spell/en.utf-8.add.spl rename to home/any/vim/.vim/spell/en.utf-8.add.spl diff --git a/any/vim/.vim/tmp/.gitignore b/home/any/vim/.vim/tmp/.gitignore similarity index 100% rename from any/vim/.vim/tmp/.gitignore rename to home/any/vim/.vim/tmp/.gitignore diff --git a/any/vim/.vim/tmp/swap/.gitkeep b/home/any/vim/.vim/tmp/backup/.gitkeep similarity index 100% rename from any/vim/.vim/tmp/swap/.gitkeep rename to home/any/vim/.vim/tmp/backup/.gitkeep diff --git a/any/vim/.vim/tmp/undo/.gitkeep b/home/any/vim/.vim/tmp/swap/.gitkeep similarity index 100% rename from any/vim/.vim/tmp/undo/.gitkeep rename to home/any/vim/.vim/tmp/swap/.gitkeep diff --git a/cygwin/.gitkeep b/home/any/vim/.vim/tmp/undo/.gitkeep similarity index 100% rename from cygwin/.gitkeep rename to home/any/vim/.vim/tmp/undo/.gitkeep diff --git a/any/vim/.vim/vimrc b/home/any/vim/.vim/vimrc similarity index 100% rename from any/vim/.vim/vimrc rename to home/any/vim/.vim/vimrc diff --git a/any/vim/.vim/vimrc.d/todo-comments.lua b/home/any/vim/.vim/vimrc.d/todo-comments.lua similarity index 100% rename from any/vim/.vim/vimrc.d/todo-comments.lua rename to home/any/vim/.vim/vimrc.d/todo-comments.lua diff --git a/any/vim/.vim/vimrc.d/treesitter.lua b/home/any/vim/.vim/vimrc.d/treesitter.lua similarity index 100% rename from any/vim/.vim/vimrc.d/treesitter.lua rename to home/any/vim/.vim/vimrc.d/treesitter.lua diff --git a/any/vim/.vim/vimrc.d/venv-selector.lua b/home/any/vim/.vim/vimrc.d/venv-selector.lua similarity index 100% rename from any/vim/.vim/vimrc.d/venv-selector.lua rename to home/any/vim/.vim/vimrc.d/venv-selector.lua diff --git a/any/vim/.vim/vimrc.d/zls.lua b/home/any/vim/.vim/vimrc.d/zls.lua similarity index 100% rename from any/vim/.vim/vimrc.d/zls.lua rename to home/any/vim/.vim/vimrc.d/zls.lua diff --git a/any/wezterm/.wezterm.lua b/home/any/wezterm/.wezterm.lua similarity index 100% rename from any/wezterm/.wezterm.lua rename to home/any/wezterm/.wezterm.lua diff --git a/freebsd/.gitkeep b/home/cygwin/.gitkeep similarity index 100% rename from freebsd/.gitkeep rename to home/cygwin/.gitkeep diff --git a/darwin/karabiner/.config/karabiner/karabiner.json b/home/darwin/karabiner/.config/karabiner/karabiner.json similarity index 100% rename from darwin/karabiner/.config/karabiner/karabiner.json rename to home/darwin/karabiner/.config/karabiner/karabiner.json diff --git a/haiku/.gitkeep b/home/freebsd/.gitkeep similarity index 100% rename from haiku/.gitkeep rename to home/freebsd/.gitkeep diff --git a/linux-android/.gitkeep b/home/haiku/.gitkeep similarity index 100% rename from linux-android/.gitkeep rename to home/haiku/.gitkeep diff --git a/msys/.gitkeep b/home/linux-android/.gitkeep similarity index 100% rename from msys/.gitkeep rename to home/linux-android/.gitkeep diff --git a/linux-gnu/dunst/.config/dunst/dunstrc b/home/linux-gnu/dunst/.config/dunst/dunstrc similarity index 100% rename from linux-gnu/dunst/.config/dunst/dunstrc rename to home/linux-gnu/dunst/.config/dunst/dunstrc diff --git a/linux-gnu/fonts/.local/share/fonts/Misc/.uuid b/home/linux-gnu/fonts/.local/share/fonts/Misc/.uuid similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/Misc/.uuid rename to home/linux-gnu/fonts/.local/share/fonts/Misc/.uuid diff --git a/linux-gnu/fonts/.local/share/fonts/Misc/Glass_TTY_VT220.ttf b/home/linux-gnu/fonts/.local/share/fonts/Misc/Glass_TTY_VT220.ttf similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/Misc/Glass_TTY_VT220.ttf rename to home/linux-gnu/fonts/.local/share/fonts/Misc/Glass_TTY_VT220.ttf diff --git a/linux-gnu/fonts/.local/share/fonts/Misc/decterm_modern.ttf b/home/linux-gnu/fonts/.local/share/fonts/Misc/decterm_modern.ttf similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/Misc/decterm_modern.ttf rename to home/linux-gnu/fonts/.local/share/fonts/Misc/decterm_modern.ttf diff --git a/linux-gnu/fonts/.local/share/fonts/NerdFonts/.uuid b/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/.uuid similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/NerdFonts/.uuid rename to home/linux-gnu/fonts/.local/share/fonts/NerdFonts/.uuid diff --git a/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Bold.ttf b/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Bold.ttf similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Bold.ttf rename to home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Bold.ttf diff --git a/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Light.ttf b/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Light.ttf similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Light.ttf rename to home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Light.ttf diff --git a/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Medium.ttf b/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Medium.ttf similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Medium.ttf rename to home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Medium.ttf diff --git a/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Regular.ttf b/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Regular.ttf similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Regular.ttf rename to home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Regular.ttf diff --git a/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Retina.ttf b/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Retina.ttf similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Retina.ttf rename to home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-Retina.ttf diff --git a/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-SemiBold.ttf b/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-SemiBold.ttf similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-SemiBold.ttf rename to home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFont-SemiBold.ttf diff --git a/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Bold.ttf b/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Bold.ttf similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Bold.ttf rename to home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Bold.ttf diff --git a/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Light.ttf b/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Light.ttf similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Light.ttf rename to home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Light.ttf diff --git a/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Medium.ttf b/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Medium.ttf similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Medium.ttf rename to home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Medium.ttf diff --git a/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Regular.ttf b/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Regular.ttf similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Regular.ttf rename to home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Regular.ttf diff --git a/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Retina.ttf b/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Retina.ttf similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Retina.ttf rename to home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-Retina.ttf diff --git a/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-SemiBold.ttf b/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-SemiBold.ttf similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-SemiBold.ttf rename to home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontMono-SemiBold.ttf diff --git a/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Bold.ttf b/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Bold.ttf similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Bold.ttf rename to home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Bold.ttf diff --git a/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Light.ttf b/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Light.ttf similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Light.ttf rename to home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Light.ttf diff --git a/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Medium.ttf b/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Medium.ttf similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Medium.ttf rename to home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Medium.ttf diff --git a/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Regular.ttf b/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Regular.ttf similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Regular.ttf rename to home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Regular.ttf diff --git a/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Retina.ttf b/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Retina.ttf similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Retina.ttf rename to home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-Retina.ttf diff --git a/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-SemiBold.ttf b/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-SemiBold.ttf similarity index 100% rename from linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-SemiBold.ttf rename to home/linux-gnu/fonts/.local/share/fonts/NerdFonts/FiraCodeNerdFontPropo-SemiBold.ttf diff --git a/linux-gnu/gnome-extensions/.local/share/gnome-shell/extensions/hide_clock@grantmcwilliams.com/extension.js b/home/linux-gnu/gnome-extensions/.local/share/gnome-shell/extensions/hide_clock@grantmcwilliams.com/extension.js similarity index 100% rename from linux-gnu/gnome-extensions/.local/share/gnome-shell/extensions/hide_clock@grantmcwilliams.com/extension.js rename to home/linux-gnu/gnome-extensions/.local/share/gnome-shell/extensions/hide_clock@grantmcwilliams.com/extension.js diff --git a/linux-gnu/gnome-extensions/.local/share/gnome-shell/extensions/hide_clock@grantmcwilliams.com/metadata.json b/home/linux-gnu/gnome-extensions/.local/share/gnome-shell/extensions/hide_clock@grantmcwilliams.com/metadata.json similarity index 100% rename from linux-gnu/gnome-extensions/.local/share/gnome-shell/extensions/hide_clock@grantmcwilliams.com/metadata.json rename to home/linux-gnu/gnome-extensions/.local/share/gnome-shell/extensions/hide_clock@grantmcwilliams.com/metadata.json diff --git a/linux-gnu/i3/.config/i3/config b/home/linux-gnu/i3/.config/i3/config similarity index 100% rename from linux-gnu/i3/.config/i3/config rename to home/linux-gnu/i3/.config/i3/config diff --git a/linux-gnu/i3/.config/i3status/config b/home/linux-gnu/i3/.config/i3status/config similarity index 100% rename from linux-gnu/i3/.config/i3status/config rename to home/linux-gnu/i3/.config/i3status/config diff --git a/linux-gnu/i3/.i3/config b/home/linux-gnu/i3/.i3/config similarity index 100% rename from linux-gnu/i3/.i3/config rename to home/linux-gnu/i3/.i3/config diff --git a/linux-gnu/i3/.i3/i3status.conf b/home/linux-gnu/i3/.i3/i3status.conf similarity index 100% rename from linux-gnu/i3/.i3/i3status.conf rename to home/linux-gnu/i3/.i3/i3status.conf diff --git a/linux-gnu/systemd/.config/systemd/user/default.target.wants/xbanish.service b/home/linux-gnu/systemd/.config/systemd/user/default.target.wants/xbanish.service similarity index 100% rename from linux-gnu/systemd/.config/systemd/user/default.target.wants/xbanish.service rename to home/linux-gnu/systemd/.config/systemd/user/default.target.wants/xbanish.service diff --git a/linux-gnu/systemd/.config/systemd/user/xbanish.service b/home/linux-gnu/systemd/.config/systemd/user/xbanish.service similarity index 100% rename from linux-gnu/systemd/.config/systemd/user/xbanish.service rename to home/linux-gnu/systemd/.config/systemd/user/xbanish.service diff --git a/linux-gnu/wordgrinder/.wordgrinder/kitty.conf b/home/linux-gnu/wordgrinder/.wordgrinder/kitty.conf similarity index 100% rename from linux-gnu/wordgrinder/.wordgrinder/kitty.conf rename to home/linux-gnu/wordgrinder/.wordgrinder/kitty.conf diff --git a/linux-gnu/wordgrinder/.wordgrinder/kitty.session b/home/linux-gnu/wordgrinder/.wordgrinder/kitty.session similarity index 100% rename from linux-gnu/wordgrinder/.wordgrinder/kitty.session rename to home/linux-gnu/wordgrinder/.wordgrinder/kitty.session diff --git a/linux-gnu/wordgrinder/.wordgrinder/settings.dat b/home/linux-gnu/wordgrinder/.wordgrinder/settings.dat similarity index 100% rename from linux-gnu/wordgrinder/.wordgrinder/settings.dat rename to home/linux-gnu/wordgrinder/.wordgrinder/settings.dat diff --git a/openbsd/.gitkeep b/home/msys/.gitkeep similarity index 100% rename from openbsd/.gitkeep rename to home/msys/.gitkeep diff --git a/netbsd/ctwm/.ctwmrc b/home/netbsd/ctwm/.ctwmrc similarity index 100% rename from netbsd/ctwm/.ctwmrc rename to home/netbsd/ctwm/.ctwmrc diff --git a/netbsd/ctwm/.xprofile b/home/netbsd/ctwm/.xprofile similarity index 100% rename from netbsd/ctwm/.xprofile rename to home/netbsd/ctwm/.xprofile diff --git a/netbsd/ctwm/.xsession b/home/netbsd/ctwm/.xsession similarity index 100% rename from netbsd/ctwm/.xsession rename to home/netbsd/ctwm/.xsession diff --git a/solaris/.gitkeep b/home/openbsd/.gitkeep similarity index 100% rename from solaris/.gitkeep rename to home/openbsd/.gitkeep diff --git a/home/solaris/.gitkeep b/home/solaris/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/stowall.sh b/stowall.sh index 05f6e45..a46b88e 100755 --- a/stowall.sh +++ b/stowall.sh @@ -5,11 +5,20 @@ mkdir -p $HOME/.gnupg > /dev/null 2>&1 chmod 700 $HOME/.gnupg mkdir -p $HOME/.local/bin +#set -x shopt -s extglob -for x in {any,"${OSTYPE%%+([[:digit:].])}"}/* +for x in home/{any,"${OSTYPE%%+([[:digit:].])}"}/* do if [[ -d $x ]] then stow -t $HOME -d $(dirname $x) $(basename $x) fi done + +for x in etc/{any,"${OSTYPE%%+([[:digit:].])}"}/* +do + if [[ -d $x ]] + then + sudo stow -t /etc -d $(dirname $x) $(basename $x) + fi +done