diff --git a/bash/.bashrc b/.bashrc similarity index 71% rename from bash/.bashrc rename to .bashrc index 1d6883b..db99d5e 100644 --- a/bash/.bashrc +++ b/.bashrc @@ -3,14 +3,18 @@ export LC_CTYPE=en_US.UTF-8 export LC_ALL=en_US.UTF-8 +export GNUPGHOME="$HOME/.local/share/gnupg" export GPG_TTY=$(tty) export GOPATH=$HOME/dev/go export CARGO_HOME=$HOME/dev/cargo export PATH=$PATH:/opt:$HOME/.local/bin:$HOME/dev/go/bin:$HOME/dev/cargo/bin:$GOPATH/bin -[ -f $HOME/.bash_aliases ] && source $HOME/.bash_aliases -[ -f $HOME/.bash_functions ] && source $HOME/.bash_functions +export XINITRC="$HOME/.config/X11/xinitrc" + +for item in $(ls $HOME/.local/share/bash); do + source $HOME/.local/share/bash/$item +done if [ "$(id -u)" -eq 0 ]; then export PS1="\e[38;5;237m\T\e[0m \e[38;5;196m\u@\h\e[0m \e[38;5;226m\w \e[0m: " diff --git a/bash/.bashrc_thin b/bash/.bashrc_thin deleted file mode 100644 index 505e384..0000000 --- a/bash/.bashrc_thin +++ /dev/null @@ -1,37 +0,0 @@ -[[ $- != *i* ]] && return - -# colors -alias diff='diff --color=auto' -alias dmesg='dmesg --color=auto' -alias dir='dir --color=auto' -alias egrep='egrep --color=auto' -alias grep='grep --color=auto' -alias fgrep='fgrep --color=auto' -alias ip='ip -color=auto' -alias ls='ls --color=auto' -alias ncdu='ncdu --color dark -rr' -alias tree='tree -C' -alias vdir='vdir --color=auto' - -# rewrites -alias cp='cp -i' -alias mv='mv -i' -alias vlock='vlock -a' -alias wget='wget -q --show-progress' - -# scripts -alias dbc='~/.scripts/dbc' -alias pass='~/.scripts/pass' - -# random -alias up='sudo mount -o remount,rw /boot && sudo xbps-install -Su && sudo vkpurge rm all && sudo mount -o remount,ro /boot' - -rnd() { - cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $1 | head -n 1 -} - -if [ "$(id -u)" -eq 0 ]; then - export PS1="\e[38;5;237m\T\e[0m \e[38;5;196m\u@\h\e[0m \e[38;5;226m\w \e[0m: " -else - export PS1="\e[38;5;237m\T\e[0m \e[38;5;41m\u@\h\e[0m \e[38;5;69m\w \e[0m: " -fi diff --git a/xorg/.xinitrc b/config/X11/xinitrc similarity index 100% rename from xorg/.xinitrc rename to config/X11/xinitrc diff --git a/alacritty/.alacritty.toml b/config/alacritty/alacritty.toml similarity index 100% rename from alacritty/.alacritty.toml rename to config/alacritty/alacritty.toml diff --git a/cmus/autosave b/config/cmus/autosave similarity index 100% rename from cmus/autosave rename to config/cmus/autosave diff --git a/dunst/dunstrc b/config/dunst/dunstrc similarity index 100% rename from dunst/dunstrc rename to config/dunst/dunstrc diff --git a/git/.gitconfig b/config/git/gitconfig similarity index 100% rename from git/.gitconfig rename to config/git/gitconfig diff --git a/tmux/.tmux.conf b/config/tmux/tmux.conf similarity index 100% rename from tmux/.tmux.conf rename to config/tmux/tmux.conf diff --git a/scripts/art/cowboy.txt b/local/bin/scripts/art/cowboy.txt similarity index 100% rename from scripts/art/cowboy.txt rename to local/bin/scripts/art/cowboy.txt diff --git a/scripts/art/htp.txt b/local/bin/scripts/art/htp.txt similarity index 100% rename from scripts/art/htp.txt rename to local/bin/scripts/art/htp.txt diff --git a/scripts/art/pussybones.txt b/local/bin/scripts/art/pussybones.txt similarity index 100% rename from scripts/art/pussybones.txt rename to local/bin/scripts/art/pussybones.txt diff --git a/scripts/bomber b/local/bin/scripts/bomber similarity index 100% rename from scripts/bomber rename to local/bin/scripts/bomber diff --git a/scripts/cmus-now b/local/bin/scripts/cmus-now similarity index 100% rename from scripts/cmus-now rename to local/bin/scripts/cmus-now diff --git a/scripts/gitremote b/local/bin/scripts/gitremote similarity index 100% rename from scripts/gitremote rename to local/bin/scripts/gitremote diff --git a/scripts/gotimon b/local/bin/scripts/gotimon similarity index 100% rename from scripts/gotimon rename to local/bin/scripts/gotimon diff --git a/scripts/irc-post-commit-hook b/local/bin/scripts/irc-post-commit-hook similarity index 100% rename from scripts/irc-post-commit-hook rename to local/bin/scripts/irc-post-commit-hook diff --git a/scripts/mutag b/local/bin/scripts/mutag similarity index 100% rename from scripts/mutag rename to local/bin/scripts/mutag diff --git a/scripts/pmf b/local/bin/scripts/pmf similarity index 100% rename from scripts/pmf rename to local/bin/scripts/pmf diff --git a/scripts/shotz b/local/bin/scripts/shotz similarity index 100% rename from scripts/shotz rename to local/bin/scripts/shotz diff --git a/scripts/statusbar b/local/bin/scripts/statusbar similarity index 100% rename from scripts/statusbar rename to local/bin/scripts/statusbar diff --git a/scripts/todo b/local/bin/scripts/todo similarity index 100% rename from scripts/todo rename to local/bin/scripts/todo diff --git a/scripts/torwall b/local/bin/scripts/torwall similarity index 100% rename from scripts/torwall rename to local/bin/scripts/torwall diff --git a/scripts/zbm b/local/bin/scripts/zbm similarity index 100% rename from scripts/zbm rename to local/bin/scripts/zbm diff --git a/bash/.bash_aliases b/local/share/bash/bash_aliases similarity index 100% rename from bash/.bash_aliases rename to local/share/bash/bash_aliases diff --git a/bash/.bash_fun b/local/share/bash/bash_fun similarity index 100% rename from bash/.bash_fun rename to local/share/bash/bash_fun diff --git a/bash/.bash_functions b/local/share/bash/bash_functions similarity index 100% rename from bash/.bash_functions rename to local/share/bash/bash_functions diff --git a/bash/.bash_recon b/local/share/bash/bash_recon similarity index 100% rename from bash/.bash_recon rename to local/share/bash/bash_recon diff --git a/gpg/gpg.conf b/local/share/gnupg/gpg.conf similarity index 100% rename from gpg/gpg.conf rename to local/share/gnupg/gpg.conf diff --git a/setup b/setup index ee2b252..1a90630 100755 --- a/setup +++ b/setup @@ -98,7 +98,7 @@ setup_packages() { fi xbps-install -y cargo checkbashisms go make patch pkg-config python3 python3-pip xbps-install -y ansible aws-cli python3-aiodns python3-aiofiles python3-aiohttp python3-boto3 python3-Flask terraform - xbps-install -y bluetuith + xbps-install -y bluetuith # Essentials if [ $REMOTE = "dropbear" ]; then @@ -138,28 +138,26 @@ setup_packages() { setup_configs() { - wget -O $HOME/.alacritty.toml $GIT_URL/alacritty/.alacritty.toml - wget -O $HOME/.tmux.conf $GIT_URL/tmux/.tmux.conf - - for item in bashrc bash_aliases bash_functions; do - wget -O $HOME/.$item $GIT_URL/bash/.$item - done - - mkdir -p $HOME/.config/cmus && wget -O $HOME/.config/cmus/autosave $GIT_URL/cmus/autosave + mkdir -p $HOME/.config/alacritty/ && wget -O $HOME/.config/alacritty/alacritty.toml $GIT_URL/config/alacritty/alacritty.toml + mkdir -p $HOME/.config/cmus && wget -O $HOME/.config/cmus/autosave $GIT_URL/cmus/autosave mkdir -p $HOME/.config/dunst && wget -O $HOME/.config/dunst/dunstrc $GIT_URL/dunst/dunstrc + mkdir -p $HOME/.config/git && wget -O $HOME/.config/git/gitconfig $GIT_URL/config/git/gitconfig + mkdir -p $HOME/.config/tmux && wget -O $HOME/.config/tmux/tmux.conf $GIT_URL/config/tmux/tmux.conf + mkdir -p $HOME/.config/X11/ && wget -O $HOME/.config/X11/xinitrc $GIT_URL/config/X11/xinitrc - wget -O $HOME/.gitconfig $GIT_URL/git/.gitconfig + mkdir -p $HOME/.local/share/bash + for item in bash_aliases bash_functions bash_fun bash_recon; do + wget -O $HOME/.local/share/bash/$item $GIT_URL/local/share/bash/$item + done + wget -O $HOME/.bashrc $GIT_URL/.bashrc - mkdir $HOME/.gnupg && wget -O $HOME/.gnupg/gpg.conf $GIT_URL/gpg/gpg.conf - printf "pinentry-program /usr/bin/pinentry-curses\ndefault-cache-ttl 3600" > $HOME/.gnupg/gpg-agent.conf - #printf "pinentry-program /usr/bin/pinentry-dmenu\ndefault-cache-ttl 3600" > $HOME/.gnupg/gpg-agent.conf - chmod 700 $HOME/.gnupg && chmod 600 $HOME/.gnupg/* + mkdir -p $HOME/.local/share/gnupg && wget -O $HOME/.local/share/gnupg/gpg.conf $GIT_URL/local/share/gnupg/gpg.conf + printf "pinentry-program /usr/bin/pinentry-curses\ndefault-cache-ttl 3600" > $HOME/.local/share/gnupg/gpg-agent.conf + chmod 700 $HOME/.local/share/gnupg && chmod 600 $HOME/.local/share/gnupg/* - wget -O $HOME/.xinitrc $GIT_URL/xorg/.xinitrc - - mkdir $HOME/.scripts - for SCRIPT in cmus-now gitremote irc-post-commit-hook mutag pmf shotz statusbar todo torwall; do - wget -O $HOME/.scripts/$SCRIPT $GIT_URL/scripts/$SCRIPT && chmod +x $HOME/.scripts/$SCRIPT + mkdir -p $HOME/.local/bin/scripts + for SCRIPT in cmus-now gitremote irc-post-commit-hook mutag pmf shotz statusbar todo; do + wget -O $HOME/.local/bin/scripts/$SCRIPT $GIT_URL/scripts/$SCRIPT && chmod +x $HOME/.scripts/$SCRIPT done wget -O $HOME/.scripts/dbc https://raw.githubusercontent.com/acidvegas/dbc/main/dbc && chmod +x $HOME/.scripts/dbc