Initial commit
This commit is contained in:
commit
5c2f8c51a7
79
alacritty/.alacritty.toml
Normal file
79
alacritty/.alacritty.toml
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
[colors.bright]
|
||||||
|
black = "0x696969"
|
||||||
|
blue = "0x007FFF"
|
||||||
|
cyan = "0x00CCCC"
|
||||||
|
green = "0x03C03C"
|
||||||
|
magenta = "0xFF1493"
|
||||||
|
red = "0xFF2400"
|
||||||
|
white = "0xFFFAFA"
|
||||||
|
yellow = "0xFDFF00"
|
||||||
|
|
||||||
|
[colors.normal]
|
||||||
|
black = "0x10100E"
|
||||||
|
blue = "0x0087BD"
|
||||||
|
cyan = "0x20B2AA"
|
||||||
|
green = "0x009F6B"
|
||||||
|
magenta = "0x9A4EAE"
|
||||||
|
red = "0xC40233"
|
||||||
|
white = "0xC6C6C4"
|
||||||
|
yellow = "0xFFD700"
|
||||||
|
|
||||||
|
[colors.primary]
|
||||||
|
background = "0x000000"
|
||||||
|
foreground = "0xC6C6C4"
|
||||||
|
|
||||||
|
[font]
|
||||||
|
size = 8
|
||||||
|
|
||||||
|
[font.bold]
|
||||||
|
family = "BlockZone"
|
||||||
|
style = "Regular"
|
||||||
|
|
||||||
|
[font.bold_italic]
|
||||||
|
family = "BlockZone"
|
||||||
|
style = "Regular"
|
||||||
|
|
||||||
|
[font.italic]
|
||||||
|
family = "BlockZone"
|
||||||
|
style = "Regular"
|
||||||
|
|
||||||
|
[font.normal]
|
||||||
|
family = "BlockZone"
|
||||||
|
style = "Regular"
|
||||||
|
|
||||||
|
[[keyboard.bindings]]
|
||||||
|
action = "IncreaseFontSize"
|
||||||
|
key = "Equals"
|
||||||
|
mods = "Control"
|
||||||
|
|
||||||
|
[[keyboard.bindings]]
|
||||||
|
action = "DecreaseFontSize"
|
||||||
|
key = "Minus"
|
||||||
|
mods = "Control"
|
||||||
|
|
||||||
|
[[keyboard.bindings]]
|
||||||
|
action = "ResetFontSize"
|
||||||
|
key = "Key0"
|
||||||
|
mods = "Control"
|
||||||
|
|
||||||
|
[[keyboard.bindings]]
|
||||||
|
action = "ScrollPageUp"
|
||||||
|
key = "PageUp"
|
||||||
|
mods = "Control"
|
||||||
|
|
||||||
|
[[keyboard.bindings]]
|
||||||
|
action = "ScrollPageDown"
|
||||||
|
key = "PageDown"
|
||||||
|
mods = "Control"
|
||||||
|
|
||||||
|
[[keyboard.bindings]]
|
||||||
|
action = "ScrollToBottom"
|
||||||
|
key = "End"
|
||||||
|
mods = "Control"
|
||||||
|
|
||||||
|
[selection]
|
||||||
|
save_to_clipboard = true
|
||||||
|
|
||||||
|
[shell]
|
||||||
|
args = ["new-session"]
|
||||||
|
program = "/usr/bin/tmux"
|
51
bash/.bash_aliases
Normal file
51
bash/.bash_aliases
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# .bash_aliases - developed by acidvegas (https://git.acid.vegas/void)
|
||||||
|
|
||||||
|
# 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 exa='exa -aghl --git'
|
||||||
|
alias mv='mv -i'
|
||||||
|
alias pip='pip3'
|
||||||
|
alias progress='progress -m'
|
||||||
|
alias python='python3'
|
||||||
|
alias vlock='vlock -a'
|
||||||
|
alias wget='wget -q --show-progress'
|
||||||
|
|
||||||
|
# git
|
||||||
|
alias gitfix='git push -u origin HEAD'
|
||||||
|
alias rmcommits="git checkout --orphan latest_branch && git add -A && git commit -S -am \"Initial commit\" && git branch -D master && git branch -m master && git push -f origin master"
|
||||||
|
alias nrmcommits="git checkout --orphan latest_branch && git add -A && git commit -S -am \"Initial commit\" && git branch -D main && git branch -m main && git push -f origin main"
|
||||||
|
|
||||||
|
# random
|
||||||
|
alias ..="cd ../"
|
||||||
|
alias dropkey="dropbearkey -y -f .dropbear/key | head -n 2 | tail -n 1"
|
||||||
|
alias dump='setterm -dump 1 -file screen.dump'
|
||||||
|
alias newnym='echo -e "AUTHENTICATE \"CHANGEME\"\r\nSIGNAL NEWNYM\r\nQUIT" | nc 127.0.0.1 9051'
|
||||||
|
alias mkgz='tar -cvzf'
|
||||||
|
alias myip='curl 4.icanhazip.com && curl 6.icanhazip.com'
|
||||||
|
alias pubkey='ssh-keygen -y -f ~/.ssh/key'
|
||||||
|
alias pydebug='python -m trace -t'
|
||||||
|
alias torch='curl -s https://check.torproject.org | grep "Congratulations"'
|
||||||
|
alias y2m='youtube-dl --extract-audio --audio-format mp3 --audio-quality 0 -o "%(title)s.%(ext)s" --no-cache-dir --no-call-home'
|
||||||
|
alias up='sudo xbps install -Su && sudo xbps-install -u xbps && sudo xbps-remove -O' # What is this last command
|
||||||
|
|
||||||
|
# scripts
|
||||||
|
alias dbc='~/.scripts/dbc'
|
||||||
|
alias gitremote='~/.scripts/gitremote'
|
||||||
|
alias irc2ansi='python3 ~/.scripts/irc2ansi.py'
|
||||||
|
alias mutag='~/.scripts/mutag'
|
||||||
|
alias pass='~/.scripts/pass'
|
||||||
|
alias shotz='~/.scripts/shotz'
|
51
bash/.bash_fun
Normal file
51
bash/.bash_fun
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# .bash_fun - developed by acidvegas (https://git.acid.vegas/void)
|
||||||
|
|
||||||
|
alias ansi='python3 ~/.scripts/irc2ansi.py ~/dev/git/ircart/ircart/ircart/ansi'
|
||||||
|
alias ascii='python3 ~/.scripts/irc2ansi.py ~/dev/git/ircart/ircart/ircart'
|
||||||
|
alias bomber='sh $HOME/.scripts/bomber'
|
||||||
|
alias busy="cat /dev/urandom | hexdump -C | grep 'ca fe'"
|
||||||
|
alias cmatrix='cmatrix -ab -u 1 -C magenta -s'
|
||||||
|
alias crypto="curl rate.sx"
|
||||||
|
alias donut="curl ascii.live/donut"
|
||||||
|
alias fireworks='confetty fireworks'
|
||||||
|
alias lavat='lavat -c magenta -s 10 -r 1 -R 1 -k cyan -b 20'
|
||||||
|
alias mapscii='telnet mapscii.me'
|
||||||
|
alias rmatrix='cmatrix -ab -u 1 -C red'
|
||||||
|
alias pipes='sh $HOME/.scripts/pipes'
|
||||||
|
alias pokemon='curl pkmn.li'
|
||||||
|
alias starwars='telnet towel.blinkenlights.nl'
|
||||||
|
alias wh='curl wttr.in'
|
||||||
|
|
||||||
|
scene() {
|
||||||
|
for x in $(curl -L -k -s http://www.textfiles.com/artscene/ansi/bbs/ | tr ' ' '\n' | grep HREF | tr '"' ' ' | awk '{print $2}' | grep -P "(ans|vt)" | grep -v ".png" | grep "." | shuf); do
|
||||||
|
curl -L -k -s http://www.textfiles.com/artscene/ansi/bbs/$x | iconv -f 437 -t utf-8 | pv -q -L 600
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# Some of the commands below are from package installs or custom builds
|
||||||
|
fun() {
|
||||||
|
echo "COMMAND | DESCRIPTION"
|
||||||
|
echo "------------- | -----------"
|
||||||
|
echo "asciiquarium | Terminal-based aquarium"
|
||||||
|
echo "ansi | Play ANSI art in your terminal"
|
||||||
|
echo "ascii | Play ASCII art in your terminal"
|
||||||
|
echo "bomber | Bomberman in your terminal"
|
||||||
|
echo "busy | Make your terminal busy"
|
||||||
|
echo "confetty | Confetti in your terminal"
|
||||||
|
echo "cmatrix | Matrix-style animation"
|
||||||
|
echo "crypto | Show cryptocurrency rates"
|
||||||
|
echo "donut | Spinning donut"
|
||||||
|
echo "dvd | Bouncing DVD logo"
|
||||||
|
echo "fire | Fire animation"
|
||||||
|
echo "fireworks | Fireworks in your terminal"
|
||||||
|
echo "lavat | Lava lamp style animation"
|
||||||
|
echo "mapscii | Maps in your terminal"
|
||||||
|
echo "pipes | Pipes in your terminal"
|
||||||
|
echo "pokemon | Random Pokémon"
|
||||||
|
echo "scene | Play ANSI scene art in your terminal"
|
||||||
|
echo "starwars | Watch Star Wars in your terminal"
|
||||||
|
echo "tty-solitaire | Play solitaire in your terminal"
|
||||||
|
echo "wh | Weather in your terminal"
|
||||||
|
echo "wipe | Clear your terminal in style"
|
||||||
|
}
|
145
bash/.bash_functions
Normal file
145
bash/.bash_functions
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# .bash_functions - developed by acidvegas (https://git.acid.vegas/void)
|
||||||
|
|
||||||
|
cheat() {
|
||||||
|
curl cht.sh/$1
|
||||||
|
}
|
||||||
|
|
||||||
|
color() {
|
||||||
|
for color in {0..255}; do
|
||||||
|
printf "\e[48;5;%sm %3s \e[0m" $color $color
|
||||||
|
if [ $((($color + 1) % 6)) == 4 ]; then
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
ctainr() {
|
||||||
|
NAME=$1
|
||||||
|
lxc storage create $NAME-pool dir #Add "source=/path/to/storage" to use a different directory
|
||||||
|
lxc launch images:debian/12 $NAME-container -s $NAME-pool
|
||||||
|
sleep 10 # Delay to allow the container to start and get an IP address from the DHCP server
|
||||||
|
CONTAINER_IP=$(lxc list | grep $NAME-container | awk '{print $6}')
|
||||||
|
lxc config device override $NAME-container eth0
|
||||||
|
lxc config device set $NAME-container eth0 ipv4.address $CONTAINER_IP
|
||||||
|
lxc config set $NAME-container boot.autostart true
|
||||||
|
lxc exec $NAME-container -- apt update -y
|
||||||
|
lxc exec $NAME-container -- apt upgrade -y
|
||||||
|
lxc exec $NAME-container -- apt install unattended-upgrades -y
|
||||||
|
lxc exec $NAME-container -- useradd -m -s /bin/bash agent
|
||||||
|
lxc exec $NAME-container -- journalctl --vacuum-time=1d
|
||||||
|
lxc exec $NAME-container -- sh -c 'printf "[Journal]\nStorage=volatile\nSplitMode=none\nRuntimeMaxUse=500K\n" > /etc/systemd/journald.conf'
|
||||||
|
lxc exec $NAME-container -- systemctl restart systemd-journald
|
||||||
|
echo "The $NAME container has been created and is available at $CONTAINER_IP"
|
||||||
|
echo ""
|
||||||
|
echo "Forward ports to the container using the following command:"
|
||||||
|
echo " lxc config device add $NAME-container $NAME-PORT_NAME proxy listen=tcp:[0.0.0.0]:HOST_PORT connect=tcp:[$CONTAINER_IP]:CONTAINER_PORT"
|
||||||
|
echo ""
|
||||||
|
echo "Tap in to your container with the following command:"
|
||||||
|
echo " lxc exec $NAME-container -- bash"
|
||||||
|
}
|
||||||
|
|
||||||
|
extract() {
|
||||||
|
if [ ! -z "$1" ]; then
|
||||||
|
if [ -f $1 ]; then
|
||||||
|
case $1 in
|
||||||
|
*.tar.bz2) tar xvjf $1 ;;
|
||||||
|
*.tar.gz) tar xvzf $1 ;;
|
||||||
|
*.tar.xz) tar xvJf $1 ;;
|
||||||
|
*.lzma) unlzma $1 ;;
|
||||||
|
*.bz2) bunzip2 $1 ;;
|
||||||
|
*.rar) unrar x -ad $1 ;;
|
||||||
|
*.gz) gunzip $1 ;;
|
||||||
|
*.tar) tar xvf $1 ;;
|
||||||
|
*.tbz2) tar xvjf $1 ;;
|
||||||
|
*.tgz) tar xvzf $1 ;;
|
||||||
|
*.zip) unzip $1 ;;
|
||||||
|
*.Z) uncompress $1 ;;
|
||||||
|
*.7z) 7z x $1 ;;
|
||||||
|
*.xz) unxz $1 ;;
|
||||||
|
*) echo "$1 - unknown archive format" ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo "$1 - file does not exist"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
gcp() {
|
||||||
|
git add .
|
||||||
|
git commit -S -m "$*"
|
||||||
|
git push
|
||||||
|
}
|
||||||
|
|
||||||
|
hf() {
|
||||||
|
curl -F file=@$1 https://hardfiles.org/ # yeah thats right motherfucker, real bay shit, for real bay motherfuckers.
|
||||||
|
}
|
||||||
|
|
||||||
|
iso2usb() {
|
||||||
|
sudo dd bs=4M if=$1 of=$2 status=progress
|
||||||
|
sudo /bin/sync
|
||||||
|
}
|
||||||
|
|
||||||
|
keys() {
|
||||||
|
echo "Ctrl + a move to the beginning of line."
|
||||||
|
echo "Ctrl + d if you've type something, Ctrl + d deletes the character under the cursor, else, it escapes the current shell."
|
||||||
|
echo "Ctrl + e move to the end of line."
|
||||||
|
echo "Ctrl + k delete all text from the cursor to the end of line."
|
||||||
|
echo "Ctrl + l CLEAR"
|
||||||
|
echo "Ctrl + n DOWN"
|
||||||
|
echo "Ctrl + p UP"
|
||||||
|
echo "Ctrl + q to resume output to terminal after Ctrl + s."
|
||||||
|
echo "Ctrl + r begins a backward search through command history.(keep pressing Ctrl + r to move backward)"
|
||||||
|
echo "Ctrl + s to stop output to terminal."
|
||||||
|
echo "Ctrl + t transpose the character before the cursor with the one under the cursor, press Esc + t to transposes the two words before the cursor."
|
||||||
|
echo "Ctrl + u cut the line before the cursor; then Ctrl + y paste it"
|
||||||
|
echo "Ctrl + w cut the word before the cursor; then Ctrl + y paste it"
|
||||||
|
echo "Ctrl + x + backspace delete all text from the beginning of line to the cursor."
|
||||||
|
echo "Ctrl + x + Ctrl + e launch editor defined by \$EDITOR to input your command. Useful for multi-line commands."
|
||||||
|
echo "Ctrl + z stop current running process and keep it in background. You can use \`fg\` to continue the process in the foreground, or \`bg\` to continue the process in the background."
|
||||||
|
echo "Ctrl + _ UNDO"
|
||||||
|
}
|
||||||
|
|
||||||
|
mntusb() {
|
||||||
|
sudo mount $1 /mnt -o uid=$(id -u),gid=$(id -g)
|
||||||
|
}
|
||||||
|
|
||||||
|
repo() {
|
||||||
|
if [ ! -z "$1" ]; then
|
||||||
|
for d in $(find $HOME/dev/git -type d -name mirrors -prune -o -type d -name .git -print); do
|
||||||
|
r=$(basename $(dirname $d))
|
||||||
|
if [ $1 = $r ]; then
|
||||||
|
cd $d
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
qr() {
|
||||||
|
curl qrenco.de/$1
|
||||||
|
}
|
||||||
|
|
||||||
|
rnd() {
|
||||||
|
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $1 | head -n 1
|
||||||
|
}
|
||||||
|
|
||||||
|
backup() {
|
||||||
|
DATA="dev dl doc media .gnupg .ssh .bogoya"
|
||||||
|
DEST=backup/main
|
||||||
|
for d in $DATA; do
|
||||||
|
rsync -avzh --progress --delete $HOME/$d blackbox:$DEST
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
title() {
|
||||||
|
echo -ne "\033]0;$1\007"
|
||||||
|
}
|
||||||
|
|
||||||
|
updater() {
|
||||||
|
xbps-install -Su
|
||||||
|
xbps-install -u xbps
|
||||||
|
xbps-install -Su
|
||||||
|
vkpurge rm all
|
||||||
|
pdtm -ua
|
||||||
|
|
||||||
|
}
|
59
bash/.bash_recon
Normal file
59
bash/.bash_recon
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# .bash_recon - developed by acidvegas (https://git.acid.vegas/void)
|
||||||
|
|
||||||
|
asn2ranges() {
|
||||||
|
local cache_file="/tmp/.bgp_tools_table_cache"
|
||||||
|
local current_time=$(date +%s)
|
||||||
|
local update_interval=$((2 * 60 * 60)) # 2 hours in seconds
|
||||||
|
if [ -f "$cache_file" ]; then
|
||||||
|
local last_update=$(date -r "$cache_file" +%s)
|
||||||
|
local time_diff=$(($current_time - $last_update))
|
||||||
|
if [ $time_diff -gt $update_interval ]; then
|
||||||
|
curl -A 'acmeco bgp.tools - acid.vegas@acid.vegas' -s https://bgp.tools/table.txt -o "$cache_file"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
curl -A 'acmeco bgp.tools - acid.vegas@acid.vegas' -s https://bgp.tools/table.txt -o "$cache_file"
|
||||||
|
fi
|
||||||
|
awk -v asn="$1" '$NF == asn {print $1}' "$cache_file"
|
||||||
|
}
|
||||||
|
|
||||||
|
asn2search() {
|
||||||
|
local search_string="$1"
|
||||||
|
local cache_file="/tmp/.bgp_tools_asn_cache"
|
||||||
|
local current_time=$(date +%s)
|
||||||
|
local update_interval=$((24 * 60 * 60)) # 24 hours in seconds
|
||||||
|
if [ -f "$cache_file" ]; then
|
||||||
|
local last_update=$(date -r "$cache_file" +%s)
|
||||||
|
local time_diff=$(($current_time - $last_update))
|
||||||
|
if [ $time_diff -gt $update_interval ]; then
|
||||||
|
curl -A 'acmeco bgp.tools - acid.vegas@acid.vegas' -s https://bgp.tools/asns.csv -o "$cache_file"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
curl -A 'acmeco bgp.tools - acid.vegas@acid.vegas' -s https://bgp.tools/asns.csv -o "$cache_file"
|
||||||
|
fi
|
||||||
|
grep -i "$search_string" "$cache_file"
|
||||||
|
}
|
||||||
|
|
||||||
|
atlastream() {
|
||||||
|
curl -s "https://atlas-stream.ripe.net/stream/?streamType=result&msm=1001" # FOR COWBOYS ONLY
|
||||||
|
}
|
||||||
|
|
||||||
|
bgplookup() {
|
||||||
|
if [ -f "$1" ]; then
|
||||||
|
{ echo "begin"; echo "verbose"; echo "count"; cat "$1"; echo "end"; } | nc bgp.tools 43
|
||||||
|
else
|
||||||
|
whois -h bgp.tools " -v $1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
bgpstream() {
|
||||||
|
curl -s "https://ris-live.ripe.net/v1/stream/?format=json&client=hacktheplnet" # FOR COWBOYS ONLY
|
||||||
|
}
|
||||||
|
|
||||||
|
crtsh() {
|
||||||
|
curl -s "https://crt.sh/?q=$1&output=json" | jq -r '.[].name_value' | sort | uniq
|
||||||
|
}
|
||||||
|
|
||||||
|
shidb() {
|
||||||
|
curl https://internetdb.shodan.io/$1
|
||||||
|
}
|
11
bash/.bashrc
Normal file
11
bash/.bashrc
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[[ $- != *i* ]] && return
|
||||||
|
|
||||||
|
export LC_CTYPE=en_US.UTF-8
|
||||||
|
export LC_ALL=en_US.UTF-8
|
||||||
|
export GPG_TTY=$(tty)
|
||||||
|
export PATH=$HOME/.local/bin:$PATH
|
||||||
|
|
||||||
|
[ -f $HOME/.bash_aliases ] && source $HOME/.bash_aliases
|
||||||
|
[ -f $HOME/.bash_functions ] && source $HOME/.bash_functions
|
||||||
|
|
||||||
|
export PS1="\e[38;5;237m\T\e[0m \e[38;5;41m\u@\h\e[0m \e[38;5;69m\w \e[0m: "
|
59
cmus/autosave
Normal file
59
cmus/autosave
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
set aaa_mode=artist
|
||||||
|
set altformat_current= %f
|
||||||
|
set altformat_title=cmus: %f
|
||||||
|
set altformat_trackwin= %f
|
||||||
|
set auto_expand_albums_follow=false
|
||||||
|
set auto_expand_albums_search=false
|
||||||
|
set auto_expand_albums_selcur=false
|
||||||
|
set color_separator=gray
|
||||||
|
set color_statusline_bg=black
|
||||||
|
set color_statusline_fg=white
|
||||||
|
set color_titleline_bg=black
|
||||||
|
set color_trackwin_album_attr=default
|
||||||
|
set color_trackwin_album_fg=black
|
||||||
|
set color_win_bg=black
|
||||||
|
set color_win_cur=lightyellow
|
||||||
|
set color_win_cur_sel_bg=red
|
||||||
|
set color_win_cur_sel_fg=black
|
||||||
|
set color_win_fg=default
|
||||||
|
set color_win_inactive_cur_sel_fg=black
|
||||||
|
set color_win_sel_bg=gray
|
||||||
|
set color_win_sel_fg=black
|
||||||
|
set color_win_title_bg=default
|
||||||
|
set dsp.alsa.device=default
|
||||||
|
set dsp.jack.resampling_quality=2
|
||||||
|
set format_current= %t
|
||||||
|
set format_statusline= %{status} %{?show_playback_position?%{position} %{?duration?/ %{duration} }?%{?duration?%{duration} }}%=%{?volume>=0?vol: %{volume}}%%
|
||||||
|
set format_title=cmus: %a - %t
|
||||||
|
set format_trackwin= %t
|
||||||
|
set format_trackwin_album=
|
||||||
|
set format_treewin=
|
||||||
|
set format_treewin_artist=%a
|
||||||
|
set lib_sort=artist title filename
|
||||||
|
set mixer.alsa.channel=PCM
|
||||||
|
set mixer.alsa.device=hw:1
|
||||||
|
set mixer.oss.channel=PCM
|
||||||
|
set mixer.pulse.restore_volume=1
|
||||||
|
set output_plugin=alsa
|
||||||
|
set repeat=true
|
||||||
|
set set_term_title=true
|
||||||
|
set smart_artist_sort=false
|
||||||
|
set softvol=true
|
||||||
|
set softvol_state=0 0
|
||||||
|
set start_view=tree
|
||||||
|
set status_display_program=$HOME/.scripts/cmus-now
|
||||||
|
bind common , vol -10%
|
||||||
|
bind common . vol +10%
|
||||||
|
bind common down win-down
|
||||||
|
bind common enter win-activate
|
||||||
|
bind common left seek -5
|
||||||
|
bind common p player-pause
|
||||||
|
bind common page_down win-page-down
|
||||||
|
bind common page_up win-page-up
|
||||||
|
bind common q quit -i
|
||||||
|
bind common right seek +5
|
||||||
|
bind common s view settings
|
||||||
|
bind common tab win-next
|
||||||
|
bind common u shell cmus-remote -C clear && cmus-remote -C "add ~/music" && cmus-remote -C "update-cache -f"
|
||||||
|
bind common up win-up
|
||||||
|
fset mp3=filename="*.mp3"
|
29
dunst/dunstrc
Normal file
29
dunst/dunstrc
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
[global]
|
||||||
|
geometry = "1350x1+210+0"
|
||||||
|
separator_height = 0
|
||||||
|
padding = 1
|
||||||
|
font = Ohsnap 8
|
||||||
|
format = "%s"
|
||||||
|
alignment = center
|
||||||
|
ignore_newline = true
|
||||||
|
show_indicators = false
|
||||||
|
history_length = 10
|
||||||
|
always_run_script = false
|
||||||
|
mouse_left_click = close_current
|
||||||
|
mouse_middle_click = none
|
||||||
|
mouse_right_click = close_all
|
||||||
|
|
||||||
|
[urgency_low]
|
||||||
|
background = "#000000"
|
||||||
|
foreground = "#ffffff"
|
||||||
|
timeout = 10
|
||||||
|
|
||||||
|
[urgency_normal]
|
||||||
|
background = "#000000"
|
||||||
|
foreground = "#ffffff"
|
||||||
|
timeout = 10
|
||||||
|
|
||||||
|
[urgency_critical]
|
||||||
|
background = "#000000"
|
||||||
|
foreground = "#ffffff"
|
||||||
|
timeout = 0
|
80
dwm/config.h
Normal file
80
dwm/config.h
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
#define XF86AudioMute 0x1008ff12
|
||||||
|
#define XF86AudioLowerVolume 0x1008ff11
|
||||||
|
#define XF86AudioRaiseVolume 0x1008ff13
|
||||||
|
#define XF86AudioPlay 0x1008ff14
|
||||||
|
#define XF86MonBrightnessDown 0x1008ff03
|
||||||
|
#define XF86MonBrightnessUp 0x1008ff02
|
||||||
|
|
||||||
|
static const unsigned int borderpx = 0;
|
||||||
|
static const unsigned int snap = 32;
|
||||||
|
static const int showbar = 0;
|
||||||
|
static const int topbar = 1;
|
||||||
|
static const float mfact = 0.55;
|
||||||
|
static const int nmaster = 1;
|
||||||
|
static const int resizehints = 0;
|
||||||
|
static const int lockfullscreen = 1;
|
||||||
|
static const Layout layouts[] = { { "", tile } };
|
||||||
|
static const Rule rules[] = { { NULL, NULL, NULL, 0, False, -1 } };
|
||||||
|
static const char *tags[] = { "chat", "dev", "media", "work", "www", "other" };
|
||||||
|
static const char *fonts[] = { "Misc Ohsnap.Icons:style=Regular:size=11" };
|
||||||
|
static const char dmenufont[] = "Misc Ohsnap.Icons:style=Regular:size=11";
|
||||||
|
static const char *colors[][3] = {
|
||||||
|
[SchemeNorm] = { "#FFFFFF", "#000000", "#444444" },
|
||||||
|
[SchemeSel] = { "#00D787", "#000000", "#00D787" },
|
||||||
|
};
|
||||||
|
|
||||||
|
#define MODKEY Mod4Mask
|
||||||
|
#define TAGKEYS(KEY,TAG) \
|
||||||
|
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||||
|
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
||||||
|
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
|
||||||
|
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
|
||||||
|
|
||||||
|
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||||
|
|
||||||
|
static char dmenumon[2] = "0"; // TODO: Do we really need this?
|
||||||
|
static const char *dmenucmd[] = { "dmenu_run", "-m", "0", "-fn", dmenufont, "-nb", "#000000", "-nf", "#FFFFFF", "-sb", "#000000", "-sf", "#00D787", NULL };
|
||||||
|
static const char *termcmd[] = { "alacritty", NULL };
|
||||||
|
static const char *volume_toggle[] = { "pactl", "set-sink-mute", "0", "toggle", NULL };
|
||||||
|
static const char *volume_down[] = { "amixer", "-q", "set", "Master", "10-", NULL };
|
||||||
|
static const char *volume_up[] = { "amixer", "-q", "set", "Master", "10+", NULL };
|
||||||
|
static const char *music_toggle[] = { "cmus-remote", "-u", NULL };
|
||||||
|
static const char *backlight_down[] = { "xbacklight", "-dec", "10", NULL };
|
||||||
|
static const char *backlight_up[] = { "xbacklight", "-inc", "10", NULL };
|
||||||
|
|
||||||
|
static Key keys[] = {
|
||||||
|
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
|
||||||
|
{ MODKEY, XK_Down, incnmaster, {.i = +1 } },
|
||||||
|
{ MODKEY, XK_Up, incnmaster, {.i = -1 } },
|
||||||
|
{ MODKEY, XK_Left, setmfact, {.f = -0.05} },
|
||||||
|
{ MODKEY, XK_Right, setmfact, {.f = +0.05} },
|
||||||
|
{ MODKEY, XK_h, togglebar, {0} },
|
||||||
|
{ MODKEY, XK_k, killclient, {0} },
|
||||||
|
{ MODKEY, XK_q, quit, {0} },
|
||||||
|
{ MODKEY, XK_f, setlayout, {.v = &layouts[0] } },
|
||||||
|
{ MODKEY, XK_r, spawn, {.v = dmenucmd } },
|
||||||
|
{ 0, XF86AudioMute, spawn, {.v = volume_toggle } },
|
||||||
|
{ 0, XF86AudioLowerVolume, spawn, {.v = volume_down } },
|
||||||
|
{ 0, XF86AudioRaiseVolume, spawn, {.v = volume_up } },
|
||||||
|
{ 0, XF86AudioPlay, spawn, {.v = music_toggle } },
|
||||||
|
{ 0, XF86MonBrightnessDown, spawn, {.v = backlight_down } },
|
||||||
|
{ 0, XF86MonBrightnessUp, spawn, {.v = backlight_up } },
|
||||||
|
{ 0, XK_Print, spawn, SHCMD("~/.scripts/shot.sh") },
|
||||||
|
TAGKEYS( XK_1, 0)
|
||||||
|
TAGKEYS( XK_2, 1)
|
||||||
|
TAGKEYS( XK_3, 2)
|
||||||
|
TAGKEYS( XK_4, 3)
|
||||||
|
TAGKEYS( XK_5, 4)
|
||||||
|
TAGKEYS( XK_6, 5)
|
||||||
|
TAGKEYS( XK_7, 6)
|
||||||
|
TAGKEYS( XK_8, 7)
|
||||||
|
TAGKEYS( XK_9, 8)
|
||||||
|
};
|
||||||
|
|
||||||
|
static Button buttons[] = {
|
||||||
|
{ ClkWinTitle, 0, Button2, zoom, {0} },
|
||||||
|
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
|
||||||
|
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
|
||||||
|
{ ClkTagBar, 0, Button1, view, {0} },
|
||||||
|
{ ClkTagBar, MODKEY, Button1, tag, {0} },
|
||||||
|
};
|
13
dwm/patch_nosquares.diff
Normal file
13
dwm/patch_nosquares.diff
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
--- a/drw.c 2019-03-09 23:41:26.989923828 -0500
|
||||||
|
+++ b/drw.c 2019-03-09 23:41:35.459923639 -0500
|
||||||
|
@@ -241,10 +241,6 @@
|
||||||
|
if (!drw || !drw->scheme)
|
||||||
|
return;
|
||||||
|
XSetForeground(drw->dpy, drw->gc, invert ? drw->scheme[ColBg].pixel : drw->scheme[ColFg].pixel);
|
||||||
|
- if (filled)
|
||||||
|
- XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
|
||||||
|
- else
|
||||||
|
- XDrawRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w - 1, h - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
10
dwm/patch_notitles.diff
Normal file
10
dwm/patch_notitles.diff
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- a/dwm.c 2019-03-09 23:32:26.479935899 -0500
|
||||||
|
+++ b/dwm.c 2019-03-09 23:32:36.269935680 -0500
|
||||||
|
@@ -731,7 +731,6 @@
|
||||||
|
if ((w = m->ww - sw - x) > bh) {
|
||||||
|
if (m->sel) {
|
||||||
|
drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
|
||||||
|
- drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
|
||||||
|
if (m->sel->isfloating)
|
||||||
|
drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
|
||||||
|
} else {
|
223
enterthevoid
Executable file
223
enterthevoid
Executable file
@ -0,0 +1,223 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# enter the void - developed by acidvegas (https://git.acid.vegas/void)
|
||||||
|
|
||||||
|
set -xev
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
ARCH=x86_64 # x86_64 or x86_64-musl
|
||||||
|
CPU=intel # amd or intel
|
||||||
|
DRIVE=/dev/sdb # can be a single drive or an array if using raidz with zfs
|
||||||
|
HOSTNAME=blackhole
|
||||||
|
SWAP_SIZE=4 # In GB (set to 0 to disable)
|
||||||
|
ROOT_FS=btrfs # btrfs or ext4
|
||||||
|
TIMEZONE=America/New_York
|
||||||
|
USERNAME=acidvegas
|
||||||
|
WIFI_SSID= # Leave blank if you don't want to use wifi
|
||||||
|
WIFI_PASS=
|
||||||
|
WIFI_DEV=wlan0
|
||||||
|
|
||||||
|
if [ -d /sys/firmware/efi ]; then
|
||||||
|
BOOT_OPTION=UEFI
|
||||||
|
else
|
||||||
|
BOOT_OPTION=BIOS
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
check_config() {
|
||||||
|
if [ ! $ARCH = "x86_64" ] && [ ! $ARCH = "x86_64-musl" ]; then
|
||||||
|
printf "invalid ARCH\n" && exit 1
|
||||||
|
elif [ ! $CPU = "amd" ] && [ ! $CPU = "intel" ]; then
|
||||||
|
printf "invalid CPU\n" && exit 1
|
||||||
|
elif [ ! -b $DRIVE ]; then
|
||||||
|
printf "invalid DRIVE\n" && exit 1
|
||||||
|
elif [ -z $HOSTNAME ]; then
|
||||||
|
printf "invalid HOSTNAME\n" && exit 1
|
||||||
|
elif ! [ "$SWAP_SIZE" -eq "$SWAP_SIZE" ] 2>/dev/null; then
|
||||||
|
printf "invalid SWAP_SIZE\n" && exit 1
|
||||||
|
elif [ ! $ROOT_FS = "btrfs" ] && [ ! $ROOT_FS = "ext4" ] && [ ! $ROOT_FS = "zfs" ]; then
|
||||||
|
printf "invalid ROOT_FS\n" && exit 1
|
||||||
|
elif [ ! -f /usr/share/zoneinfo/$TIMEZONE ]; then
|
||||||
|
printf "invalid TIMEZONE\n" && exit 1
|
||||||
|
elif [ -z $USERNAME ]; then
|
||||||
|
printf "invalid USERNAME\n" && exit 1
|
||||||
|
elif [ ! -z $WIFI_SSID ]; then
|
||||||
|
if [ -z $(ip addr | grep '^[0-9]:' | awk '{print $2}' | tr -d ':' | grep $WIFI_DEV) ]; then
|
||||||
|
printf "invalid WIFI_DEV\n" && exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setup_network() {
|
||||||
|
if [ ! -z "$WIFI_SSID" ]; then
|
||||||
|
if rfkill list wifi | grep -q 'Soft blocked: yes\|Hard blocked: yes'; then
|
||||||
|
printf "Wifi is blocked, attempting to unblock... (make sure to handle this after reboot)\n"
|
||||||
|
rfkill unblock wifi
|
||||||
|
fi
|
||||||
|
wpa_passphrase "$WIFI_SSID" "$WIFI_PASS" | wpa_supplicant -i $WIFI_DEV -c /dev/stdin
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setup_partition() {
|
||||||
|
xbps-install -u xbps
|
||||||
|
xbps-install -Su
|
||||||
|
xbps-install parted
|
||||||
|
|
||||||
|
wipefs -a $DRIVE
|
||||||
|
if [ $BOOT_OPTION = "UEFI" ]; then
|
||||||
|
parted $DRIVE --script mklabel gpt
|
||||||
|
parted $DRIVE --script mkpart primary fat32 1MiB 513MiB
|
||||||
|
parted $DRIVE --script set 1 esp on
|
||||||
|
parted $DRIVE --script mkpart primary $ROOT_FS 513MiB 100%
|
||||||
|
partprobe $DRIVE
|
||||||
|
mkfs.vfat ${DRIVE}1
|
||||||
|
if [ $ROOT_FS = "btrfs" ]; then
|
||||||
|
mkfs.btrfs -f ${DRIVE}2
|
||||||
|
mount ${DRIVE}2 /mnt
|
||||||
|
btrfs subvolume create /mnt/@
|
||||||
|
btrfs subvolume create /mnt/@home
|
||||||
|
btrfs subvolume create /mnt/@snapshots
|
||||||
|
umount /mnt
|
||||||
|
mount -o subvol=@ ${DRIVE}2 /mnt
|
||||||
|
mkdir -p /mnt/{home,snapshots}
|
||||||
|
mount -o subvol=@home ${DRIVE}2 /mnt/home
|
||||||
|
mount -o subvol=@snapshots ${DRIVE}2 /mnt/snapshots
|
||||||
|
elif [ $ROOT_FS = "ext4" ]; then
|
||||||
|
mkfs.ext4 ${DRIVE}2
|
||||||
|
mount ${DRIVE}2 /mnt
|
||||||
|
fi
|
||||||
|
mkdir -p /mnt/boot/efi
|
||||||
|
mount ${DRIVE}1 /mnt/boot/efi
|
||||||
|
elif [ $BOOT_OPTION = "BIOS" ]; then
|
||||||
|
parted $DRIVE --script mklabel msdos
|
||||||
|
parted $DRIVE --script mkpart primary $ROOT_FS 1MiB 100%
|
||||||
|
parted $DRIVE --script set 1 boot on
|
||||||
|
partprobe $DRIVE
|
||||||
|
if [ $ROOT_FS = "btrfs" ]; then
|
||||||
|
mkfs.btrfs -f ${DRIVE}1
|
||||||
|
mount ${DRIVE}1 /mnt
|
||||||
|
btrfs subvolume create /mnt/@
|
||||||
|
btrfs subvolume create /mnt/@home
|
||||||
|
btrfs subvolume create /mnt/@snapshots
|
||||||
|
umount /mnt
|
||||||
|
mount -o subvol=@ ${DRIVE}1 /mnt
|
||||||
|
mkdir -p /mnt/{home,snapshots}
|
||||||
|
mount -o subvol=@home ${DRIVE}1 /mnt/home
|
||||||
|
mount -o subvol=@snapshots ${DRIVE}1 /mnt/snapshots
|
||||||
|
elif [ $ROOT_FS = "ext4" ]; then
|
||||||
|
mkfs.ext4 ${DRIVE}1
|
||||||
|
mount ${DRIVE}1 /mnt
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setup_install() {
|
||||||
|
REPO=https://repo-default.voidlinux.org/current
|
||||||
|
if [ $ARCH = 'x86_64-musl' ]; then
|
||||||
|
REPO=$REPO/musl
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p /mnt/var/db/xbps/keys
|
||||||
|
cp /var/db/xbps/keys/* /mnt/var/db/xbps/keys/
|
||||||
|
|
||||||
|
XBPS_ARCH=$ARCH xbps-install -S -r /mnt -R "$REPO" base-system linux
|
||||||
|
|
||||||
|
printf "entering chroot...remember to run setup_chroot() inside the chroot!\n"
|
||||||
|
xchroot /mnt /bin/bash
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setup_chroot() {
|
||||||
|
passwd
|
||||||
|
xbps-install -u xbps
|
||||||
|
xbps-install -Su
|
||||||
|
|
||||||
|
if [ $CPU = "intel" ]; then
|
||||||
|
xbps-install void-repo-nonfree
|
||||||
|
xbps-install -Su
|
||||||
|
xbps-install intel-ucode
|
||||||
|
ln -sf /etc/sv/intel-ucode /etc/runit/runsvdir/default/
|
||||||
|
elif [ $CPU = "amd" ]; then
|
||||||
|
xbps-install linux-firmware-amd
|
||||||
|
fi
|
||||||
|
|
||||||
|
useradd -m -s /bin/bash $USERNAME && passwd $USERNAME && gpasswd -a $USERNAME wheel
|
||||||
|
ln -sf /usr/share/zoneinfo/$TIMEZONE /etc/localtime
|
||||||
|
ln -sf /etc/sv/dhcpcd /etc/runit/runsvdir/default/
|
||||||
|
hwclock --systohc
|
||||||
|
printf "$HOSTNAME\n" > /etc/hostname
|
||||||
|
printf "HOSTNAME=\"$HOSTNAME\"\nHARDWARECLOCK=\"UTC\"\nTIMEZONE=\"$TIMEZONE\"\nKEYMAP=us\n" > /etc/rc.conf
|
||||||
|
|
||||||
|
if [ $ARCH = 'x86_64' ]; then
|
||||||
|
printf "en_US.UTF-8 UTF-8\n" > /etc/default/libc-locales
|
||||||
|
printf "LANG=en_US.UTF-8\n" > /etc/locale.conf
|
||||||
|
xbps-reconfigure -f glibc-locales
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $BOOT_OPTION = "UEFI" ]; then
|
||||||
|
if [ $ROOT_FS = "btrfs" ]; then
|
||||||
|
printf "UUID=$(blkid -s UUID -o value ${DRIVE}2) / $ROOT_FS defaults,noatime,subvol=@ 0 1\n"
|
||||||
|
printf "UUID=$(blkid -s UUID -o value ${DRIVE}2) /home $ROOT_FS defaults,subvol=@home 0 1\n"
|
||||||
|
printf "UUID=$(blkid -s UUID -o value ${DRIVE}2) /snapshots $ROOT_FS defaults,subvol=@snapshots 0 1\n"
|
||||||
|
elif [ $ROOT_FS = "ext4" ]; then
|
||||||
|
printf "UUID=$(blkid -s UUID -o value ${DRIVE}2) / $ROOT_FS defaults,noatime 0 1\n"
|
||||||
|
fi
|
||||||
|
printf "UUID=$(blkid -s UUID -o value ${DRIVE}1) /boot/efi vfat defaults,noatime 0 1\n"
|
||||||
|
elif [ $BOOT_OPTION = "BIOS" ]; then
|
||||||
|
if [ $ROOT_FS = "btrfs" ]; then
|
||||||
|
printf "UUID=$(blkid -s UUID -o value ${DRIVE}1) / btrfs defaults,noatime,subvol=@ 0 1\n"
|
||||||
|
printf "UUID=$(blkid -s UUID -o value ${DRIVE}1) /home btrfs defaults,subvol=@home 0 1\n"
|
||||||
|
printf "UUID=$(blkid -s UUID -o value ${DRIVE}1) /snapshots btrfs defaults,subvol=@snapshots 0 1\n"
|
||||||
|
elif [ $ROOT_FS = "ext4" ]; then
|
||||||
|
printf "UUID=$(blkid -s UUID -o value ${DRIVE}1) / $ROOT_FS defaults,noatime 0 1\n"
|
||||||
|
fi
|
||||||
|
fi > /etc/fstab
|
||||||
|
|
||||||
|
printf "tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0\n" >> /etc/fstab
|
||||||
|
|
||||||
|
if [ $SWAP_SIZE -gt 0 ]; then
|
||||||
|
touch /swapfile
|
||||||
|
if [ $ROOT_FS = "btrfs" ]; then
|
||||||
|
chattr +C /swapfile
|
||||||
|
fi
|
||||||
|
dd if=/dev/zero of=/swapfile bs=1M count=${SWAP_SIZE}k status=progress
|
||||||
|
chmod 0600 /swapfile
|
||||||
|
mkswap /swapfile
|
||||||
|
swapon /swapfile
|
||||||
|
printf "/swapfile none swap sw 0 0\n" >> /etc/fstab
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $BOOT_OPTION = "UEFI" ]; then
|
||||||
|
xbps-install gummiboot
|
||||||
|
gummiboot install
|
||||||
|
nano /boot/loader/void-options.conf
|
||||||
|
xbps-reconfigure -f linux$(unamer -r)
|
||||||
|
# Optional, copy the EFI /boot/efi/EFI/boot/bootx64.efi to for tricking compatability
|
||||||
|
elif [ $BOOT_OPTION = "BIOS" ]; then
|
||||||
|
xbps-install grub
|
||||||
|
grub-install /dev/$DRIVE
|
||||||
|
fi
|
||||||
|
|
||||||
|
xbps-reconfigure -fa
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$#" -ne 1 ]; then
|
||||||
|
printf "usage: $0 [install|partition|chroot|final]\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
check_config
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
network) setup_network ;;
|
||||||
|
partition) setup_partition ;;
|
||||||
|
install) setup_install ;;
|
||||||
|
chroot) setup_chroot ;;
|
||||||
|
final) umount -R /mnt; reboot ;;
|
||||||
|
*) printf "usage: $0 [install|partition|chroot|final]\n"; exit 1 ;;
|
||||||
|
esac
|
145
enterthezoid
Executable file
145
enterthezoid
Executable file
@ -0,0 +1,145 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# enter the zoid (zfs on root with zraid) - developed by acidvegas (https://git.acid.vegas/void)
|
||||||
|
# reference: https://docs.zfsbootmenu.org/en/v2.2.x/guides/void-linux/uefi.html
|
||||||
|
# https://docs.zfsbootmenu.org/en/v2.3.x/guides/void-linux/uefi.html (do we need to make any updates?)
|
||||||
|
|
||||||
|
set -xev
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
HOSTNAME=blackhole
|
||||||
|
BOOT_DRIVE=/dev/sde # Use the internal USB drive for the boot partition
|
||||||
|
POOL_DRIVES="/dev/sda /dev/sdb /dev/sdc /dev/sdd" # Verify these with lsblk before running
|
||||||
|
|
||||||
|
|
||||||
|
convert_pool_drives() {
|
||||||
|
local devices=$1
|
||||||
|
local by_id_drives=""
|
||||||
|
|
||||||
|
for dev in $devices; do
|
||||||
|
local device_by_id_path=""
|
||||||
|
for id in /dev/disk/by-id/*; do
|
||||||
|
if [ "$(readlink -f "$id")" = "$(readlink -f "$dev")" ] && ! [[ $id =~ .*-part[0-9]+ ]]; then
|
||||||
|
device_by_id_path="$id"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
by_id_drives+="${device_by_id_path} "
|
||||||
|
done
|
||||||
|
|
||||||
|
echo $by_id_drives
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setup_zfs() {
|
||||||
|
source /etc/os-release
|
||||||
|
export ID
|
||||||
|
zgenhostid -f 0x00bab10c
|
||||||
|
|
||||||
|
wipefs -a $BOOT_DRIVE
|
||||||
|
sgdisk --zap-all $BOOT_DRIVE
|
||||||
|
sgdisk -n "1:1m:+1g" -t "1:ef00" "$BOOT_DRIVE"
|
||||||
|
|
||||||
|
for d in $POOL_DRIVES; do
|
||||||
|
wipefs -a $d
|
||||||
|
sgdisk --zap-all $d
|
||||||
|
sgdisk -n "1:0:-10m" -t "1:bf00" "$d"
|
||||||
|
if zdb -l "$d" &> /dev/null; then
|
||||||
|
zpool labelclear -f "$d"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
POOL_DRIVES=$(convert_pool_drives "$POOL_DRIVES")
|
||||||
|
zpool create -f -o ashift=12 -O compression=lz4 -O acltype=posixacl -O xattr=sa -O relatime=on -o autotrim=on -o compatibility=openzfs-2.1-linux -m none zroot raidz $POOL_DRIVES
|
||||||
|
|
||||||
|
zfs create -o mountpoint=none zroot/ROOT
|
||||||
|
zfs create -o mountpoint=/ -o canmount=noauto zroot/ROOT/$ID
|
||||||
|
zfs create -o mountpoint=/home zroot/home
|
||||||
|
zpool set bootfs=zroot/ROOT/$ID zroot
|
||||||
|
|
||||||
|
zpool export zroot
|
||||||
|
zpool import -N -R /mnt zroot
|
||||||
|
zfs mount zroot/ROOT/$ID
|
||||||
|
zfs mount zroot/home
|
||||||
|
|
||||||
|
udevadm trigger
|
||||||
|
|
||||||
|
XBPS_ARCH=x86_64 xbps-install -S -R https://mirrors.servercentral.com/voidlinux/current -r /mnt base-system
|
||||||
|
cp /etc/hostid /mnt/etc
|
||||||
|
|
||||||
|
xchroot /mnt
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setup_chroot() {
|
||||||
|
passwd
|
||||||
|
|
||||||
|
xbps-install -Suy
|
||||||
|
xbps-install -y void-repo-nonfree
|
||||||
|
xbps-install -Suy
|
||||||
|
xbps-install -y intel-ucode
|
||||||
|
ln -sf /etc/sv/intel-ucode /etc/runit/runsvdir/default/
|
||||||
|
|
||||||
|
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
|
||||||
|
ln -sf /etc/sv/dhcpcd /etc/runit/runsvdir/default/
|
||||||
|
hwclock --systohc
|
||||||
|
printf "$HOSTNAME\n" > /etc/hostname
|
||||||
|
printf "HOSTNAME=\"$HOSTNAME\"\nHARDWARECLOCK=\"UTC\"\nTIMEZONE=\"America/New_York\"\nKEYMAP=us\n" > /etc/rc.conf
|
||||||
|
|
||||||
|
printf "en_US.UTF-8 UTF-8\nen_US ISO-8859-1\n" > /etc/default/libc-locales
|
||||||
|
xbps-reconfigure -f glibc-locales
|
||||||
|
|
||||||
|
printf "nofsck=\"yes\"\nadd_dracutmodules+=\" zfs \"\nomit_dracutmodules+=\" btrfs \"\n" > /etc/dracut.conf.d/zol.conf
|
||||||
|
|
||||||
|
xbps-install -y zfs
|
||||||
|
zfs set org.zfsbootmenu:commandline="quiet loglevel=4" zroot/ROOT
|
||||||
|
|
||||||
|
mkfs.vfat -F32 ${BOOT_DRIVE}1
|
||||||
|
BOOT_UUID=$(blkid -s UUID -o value ${BOOT_DRIVE}1)
|
||||||
|
echo "UUID=$BOOT_UUID /boot/efi vfat defaults 0 0" > /etc/fstab
|
||||||
|
mkdir -p /boot/efi
|
||||||
|
mount /boot/efi
|
||||||
|
|
||||||
|
# Everything below this line is a "hacky" solution to a problem I was having with the zfsbootmenu package
|
||||||
|
# https://github.com/zbm-dev/zfsbootmenu/issues/293
|
||||||
|
# The developers of zfsbootmenu are rude and unhelpful, so I had to figure this out on my own:
|
||||||
|
# 12:39 -- Mode #zfsbootmenu [+b *!*@big.dick.acid.vegas] by zdykstra
|
||||||
|
# 12:39 ◀▬▬ zdykstra has kicked acidvegas (acidvegas)
|
||||||
|
# 12:39 -- #zfsbootmenu: Cannot join channel (+b) - you are banned
|
||||||
|
|
||||||
|
xbps-install -S zfsbootmenu gummiboot-efistub yq
|
||||||
|
yq -iy '.Global.ManageImages=true | .Global.BootMountPoint="/boot/efi" | .Components.Enabled=false | .EFI.ImageDir="/boot/efi/EFI/zbm" | .EFI.Versions=false | .EFI.Enabled=true | .Kernel.CommandLine="quiet loglevel=0"' /etc/zfsbootmenu/config.yaml
|
||||||
|
generate-zbm
|
||||||
|
|
||||||
|
xbps-install -y refind
|
||||||
|
refind-install
|
||||||
|
rm /boot/refind_linux.conf
|
||||||
|
printf "\"Boot default\" \"quiet loglevel=0 zbm.skip\"\n\"Boot to menu\" \"quiet loglevel=0 zbm.show\"\n" > /boot/efi/EFI/ZBM/refind_linux.conf
|
||||||
|
|
||||||
|
mkdir -p /boot/efi/EFI/BOOT
|
||||||
|
mvrefind /boot/efi/EFI/refind /boot/efi/EFI/BOOT
|
||||||
|
temp=$(mktemp -d)
|
||||||
|
wget -O $temp/latest.tar.gz https://get.zfsbootmenu.org/latest.tar.gz
|
||||||
|
tar xvf $temp/latest.tar.gz -C $temp/
|
||||||
|
rm $temp/latest.tar.gz
|
||||||
|
mv $temp/zfs*/* /boot/efi/EFI/ZBM/
|
||||||
|
rm /boot/efi/EFI/ZBM/vmlinuz.efi
|
||||||
|
|
||||||
|
xbps-remove zfsbootmenu
|
||||||
|
xbps-reconfigure -fa
|
||||||
|
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$#" -ne 1 ]; then
|
||||||
|
printf "usage: $0 [zfs|chroot|final]\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
zfs) setup_zfs ;;
|
||||||
|
chroot) setup_chroot ;;
|
||||||
|
final) umount -n -R /mnt; zpool export zroot; reboot ;;
|
||||||
|
*) printf "usage: $0 [zfs|chroot|final]\n"; exit 1 ;;
|
||||||
|
esac
|
BIN
font/BlockZone.ttf
Normal file
BIN
font/BlockZone.ttf
Normal file
Binary file not shown.
BIN
font/ohsnap6x11r.psfu
Normal file
BIN
font/ohsnap6x11r.psfu
Normal file
Binary file not shown.
BIN
font/ohsnap7x12r.psfu
Normal file
BIN
font/ohsnap7x12r.psfu
Normal file
Binary file not shown.
BIN
font/ohsnap7x14r.psfu
Normal file
BIN
font/ohsnap7x14r.psfu
Normal file
Binary file not shown.
32
git/.gitconfig
Normal file
32
git/.gitconfig
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
[alias]
|
||||||
|
commits = log --color --graph --pretty=format:'%Cred%h%Creset - %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
|
||||||
|
mclone = clone --depth=1
|
||||||
|
stats = diff --stat
|
||||||
|
[color]
|
||||||
|
diff = auto
|
||||||
|
status = auto
|
||||||
|
branch = auto
|
||||||
|
interactive = auto
|
||||||
|
ui = true
|
||||||
|
pager = true
|
||||||
|
[commit]
|
||||||
|
gpgSign = true
|
||||||
|
[core]
|
||||||
|
editor = nano
|
||||||
|
pager = delta
|
||||||
|
[diff]
|
||||||
|
colorMoved = default
|
||||||
|
[interactive]
|
||||||
|
diffFilter = delta --color-only
|
||||||
|
[merge]
|
||||||
|
conflictstyle = diff3
|
||||||
|
[user]
|
||||||
|
signingkey = 441EB0F297E0DCF0AEF2F711EF4B922DB85DC9DE
|
||||||
|
name = acidvegas
|
||||||
|
email = acid.vegas@acid.vegas
|
||||||
|
[pull]
|
||||||
|
ff = only
|
||||||
|
[delta]
|
||||||
|
navigate = true
|
||||||
|
light = false
|
||||||
|
|
15
gpg/gpg.conf
Normal file
15
gpg/gpg.conf
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
default-key 441EB0F297E0DCF0AEF2F711EF4B922DB85DC9DE
|
||||||
|
keyid-format 0xlong
|
||||||
|
keyserver-options include-revoked no-honor-keyserver-url
|
||||||
|
list-options show-uid-validity
|
||||||
|
no-comments
|
||||||
|
no-emit-version
|
||||||
|
no-greeting
|
||||||
|
utf8-strings
|
||||||
|
verify-options show-uid-validity
|
||||||
|
with-fingerprint
|
||||||
|
|
||||||
|
personal-cipher-preferences AES256 AES192 AES CAST5
|
||||||
|
personal-digest-preferences SHA512 SHA384 SHA256 SHA224
|
||||||
|
cert-digest-algo SHA512
|
||||||
|
default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed
|
99
scripts/bomber
Executable file
99
scripts/bomber
Executable file
@ -0,0 +1,99 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#by necro
|
||||||
|
e="\e[0m"
|
||||||
|
bk="\e[38;2;1;1;1m"
|
||||||
|
bl="\e[48;2;101;166;232m"
|
||||||
|
wh="\e[48;2;251;253;252m"
|
||||||
|
pi="\e[48;2;229;139;121m"
|
||||||
|
while true; do
|
||||||
|
clear
|
||||||
|
echo -e "
|
||||||
|
$bk██████████ $bk████$e
|
||||||
|
$bk████$wh ████$e$bk ██$bl ██$e
|
||||||
|
$bk██$wh ██████$bl $bk██$e
|
||||||
|
$bk██$pi $wh ██$e$bk ████$e
|
||||||
|
$bk██$pi ██ $wh ██$e
|
||||||
|
$bk██$pi ██ $wh ██$e
|
||||||
|
$bk██$pi ██ $wh ██$e
|
||||||
|
$bk██$pi $wh ██$e
|
||||||
|
$bk████$wh ██ ██$e
|
||||||
|
$bk████████$wh ████████$e
|
||||||
|
$bk██$bl ██$wh ██$bl ██$e
|
||||||
|
$bk██$bl ██$wh ██$bl ██$e
|
||||||
|
$bk██$wh ██$bl ██████$e
|
||||||
|
$bk██$bl ██$bl ██$bl ██$e
|
||||||
|
$bk████████████████$e
|
||||||
|
$bk██$wh ██$e
|
||||||
|
$bk██████████████$e
|
||||||
|
$bk██$bl ██$e
|
||||||
|
$bk████████████████$e"
|
||||||
|
sleep 0.1
|
||||||
|
clear
|
||||||
|
echo -e "
|
||||||
|
$bk██████████ ████$e
|
||||||
|
$bk████$wh ██████$bl ██$e
|
||||||
|
$bk██$wh ██$bl ██$e
|
||||||
|
$bk██$pi $wh ████$e
|
||||||
|
$bk████$pi ██ $wh ██$e
|
||||||
|
$bk████$pi ██ $wh ██$e
|
||||||
|
$bk████$pi ██ $wh ██$e
|
||||||
|
$bk██$pi $wh ██$e
|
||||||
|
$bk████$wh ████ ██$e
|
||||||
|
$bk██$bl ████$wh ██████████$e
|
||||||
|
$bk██$bl ██$wh ██$bl ██$wh ██$e
|
||||||
|
$bk████$wh ██$bl ██$wh ██$e
|
||||||
|
$bk████$wh ████████████████$e
|
||||||
|
$bk██$bl ██████ ████$bl ██$e
|
||||||
|
$bk████$wh $bl $wh ██████$e
|
||||||
|
$bk██$bl ██$wh ████ ██$e
|
||||||
|
$bk██$bl ████████$e$bk ██$wh ██$bl ██$e
|
||||||
|
$bk████ ████$bl ██$e
|
||||||
|
$bk██$bl ██$e
|
||||||
|
$bk████$e"
|
||||||
|
sleep 0.3
|
||||||
|
clear
|
||||||
|
echo -e "
|
||||||
|
$bk██████████ $bk████$e
|
||||||
|
$bk████$wh ████$e$bk ██$bl ██$e
|
||||||
|
$bk██$wh ██████$bl $bk██$e
|
||||||
|
$bk██$pi $wh ██$e$bk ████$e
|
||||||
|
$bk██$pi ██ $wh ██$e
|
||||||
|
$bk██$pi ██ $wh ██$e
|
||||||
|
$bk██$pi ██ $wh ██$e
|
||||||
|
$bk██$pi $wh ██$e
|
||||||
|
$bk████$wh ██ ██$e
|
||||||
|
$bk████████$wh ████████$e
|
||||||
|
$bk██$bl ██$wh ██$bl ██$e
|
||||||
|
$bk██$bl ██$wh ██$bl ██$e
|
||||||
|
$bk██$wh ██$bl ██████$e
|
||||||
|
$bk██$bl ██$bl ██$bl ██$e
|
||||||
|
$bk████████████████$e
|
||||||
|
$bk██$wh ██$e
|
||||||
|
$bk██████████████$e
|
||||||
|
$bk██$bl ██$e
|
||||||
|
$bk████████████████$e"
|
||||||
|
sleep 0.1
|
||||||
|
clear
|
||||||
|
echo -e "
|
||||||
|
$bk██████████ ████
|
||||||
|
$bk████$wh ████$e $bk██$bl ██$e
|
||||||
|
$bk██$wh ████$bl ██$e
|
||||||
|
$bk██$pi $wh ██████████$e
|
||||||
|
$bk██$pi ██ $wh ██$e
|
||||||
|
$bk██$pi ██ $wh ██$e
|
||||||
|
$bk██$pi ██ $wh ██$e
|
||||||
|
$bk██$pi $wh ██$e
|
||||||
|
$bk████████$wh ██████ ██$e
|
||||||
|
$bk██$bl ██████████$wh ████$e
|
||||||
|
$bk██$bl ████ ██$wh ██$e
|
||||||
|
$bk██$wh ██$bl ██$wh ████$e
|
||||||
|
$bk██$wh ██ ███████ ██$bl ██$e
|
||||||
|
$bk████$bl ██ ██$e
|
||||||
|
$bk████$bl ████$e
|
||||||
|
$bk██████$wh $bl ██████$wh ████$e
|
||||||
|
$bk██$bl ██$wh ██$e$bk ██$wh ██$bl ██$e
|
||||||
|
$bk██$bl ██$e$bk ████$bl ██$e
|
||||||
|
$bk████$e$bk ██$bl ██$e
|
||||||
|
$bk████"
|
||||||
|
sleep 0.3
|
||||||
|
done
|
5
scripts/cmus-now
Executable file
5
scripts/cmus-now
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# cmus 'now playing' notifications in dunst - developed by acidvegas (https://git.acid.vegas/void)
|
||||||
|
artist=`cmus-remote -Q | grep --text '^tag artist' | sed '/^tag artistsort/d' | awk '{gsub("tag artist ", "");print}'`
|
||||||
|
title=`cmus-remote -Q | grep --text '^tag title' | sed -e 's/tag title //' | awk '{gsub("tag title ", "");print}'`
|
||||||
|
notify-send "♫ $artist - $title"
|
75
scripts/dbc
Executable file
75
scripts/dbc
Executable file
@ -0,0 +1,75 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Dropbear Connect Script (DBC) - Developed by acidvegas (https://git.acid.vegas/void)
|
||||||
|
|
||||||
|
# Dropbear config must be stored in pass in the following format:
|
||||||
|
# NAME USER HOST PORT JUMP
|
||||||
|
#
|
||||||
|
# JUMP is optional and can be used to specify a host that should use your jump host.
|
||||||
|
# If JUMP is set to x, the script will use the jump host to connect to the end host.
|
||||||
|
# There should only be one jump host in the config file and it should be named 'jump'.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# jump acidvegas 68.192.37.5 5902
|
||||||
|
# hatebox acidvegas 100.151.45.10 2023 x
|
||||||
|
# aws admin 45.16.150.203 22
|
||||||
|
#
|
||||||
|
# Useful commands:
|
||||||
|
# Git usage : git config core.sshCommand "dbclient -i ~/.ssh/key"
|
||||||
|
# Generate private key : dropbearkey -t ed25519 -f ~/.dropbear/key
|
||||||
|
# Get public key : dropbearkey -y -f ~/.dropbear/key | head -n 2 | tail -n 1
|
||||||
|
|
||||||
|
load_host() {
|
||||||
|
CONFIG_DATA="$1"
|
||||||
|
NAME="$2"
|
||||||
|
|
||||||
|
# Use grep to find the matching line
|
||||||
|
MATCHING_LINES=$(printf "%s\n" "$CONFIG_DATA" | grep "^$NAME ")
|
||||||
|
|
||||||
|
# Check if exactly one matching line is found
|
||||||
|
LINE_COUNT=$(printf "%s\n" "$MATCHING_LINES" | wc -l)
|
||||||
|
if [ "$LINE_COUNT" -ne 1 ]; then
|
||||||
|
echo "Error: The NAME '$NAME' matches multiple or no lines." && return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove extra whitespace from the matching line
|
||||||
|
MATCHING_LINES=$(printf "%s\n" "$MATCHING_LINES" | tr -s '[:space:]' ' ')
|
||||||
|
|
||||||
|
# Read parameters from the matching line
|
||||||
|
line_name=$(echo $MATCHING_LINES | cut -d ' ' -f 1)
|
||||||
|
line_user=$(echo $MATCHING_LINES | cut -d ' ' -f 2)
|
||||||
|
line_host=$(echo $MATCHING_LINES | cut -d ' ' -f 3)
|
||||||
|
line_port=$(echo $MATCHING_LINES | cut -d ' ' -f 4)
|
||||||
|
line_jump=$(echo $MATCHING_LINES | cut -d ' ' -f 5)
|
||||||
|
|
||||||
|
# Output the result
|
||||||
|
printf "%s@%s^%s%s" "$line_user" "$line_host" "$line_port" "$line_jump"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check if the name argument is provided
|
||||||
|
if [ $# -ne 1 ]; then
|
||||||
|
echo "usage: $0 [name]" && exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Read the name argument
|
||||||
|
NAME=$1
|
||||||
|
|
||||||
|
# Read the config data
|
||||||
|
CONFIG_DATA=$($HOME/.scripts/pass dropbear)
|
||||||
|
|
||||||
|
# Check if the config data is read successfully
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "error: can not read config data" && exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Load the host data
|
||||||
|
JUMP_HOST=$(load_host "$CONFIG_DATA" "jump")
|
||||||
|
END_HOST=$(load_host "$CONFIG_DATA" "$NAME")
|
||||||
|
JUMP_CHECK=$(printf "$END_HOST" | rev | cut -c1)
|
||||||
|
|
||||||
|
# Connect to the host
|
||||||
|
if [ $JUMP_CHECK = "x" ]; then
|
||||||
|
END_HOST=$(printf $END_HOST | rev | cut -c2- | rev)
|
||||||
|
dbclient -K 60 -i $HOME/.dropbear/key $JUMP_HOST,$END_HOST
|
||||||
|
else
|
||||||
|
dbclient -K 60 -i $HOME/.dropbear/key $END_HOST
|
||||||
|
fi
|
62
scripts/gitremote
Executable file
62
scripts/gitremote
Executable file
@ -0,0 +1,62 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# git remote setup script - developed by acidvegas (https://git.acid.vegas)
|
||||||
|
#
|
||||||
|
# note: This assumes the directory structure of $HOME/dev/git/$USER/$REPO for each repository.
|
||||||
|
#
|
||||||
|
# usage:
|
||||||
|
# gitremote | Update current working directory repository
|
||||||
|
# gitremote -a | Update every repository
|
||||||
|
|
||||||
|
SIGNING_KEY='441EB0F297E0DCF0AEF2F711EF4B922DB85DC9DE'
|
||||||
|
|
||||||
|
update_repo() {
|
||||||
|
DIR=$1
|
||||||
|
USER=$(basename $(dirname $(dirname $DIR)))
|
||||||
|
REPO=$(basename $(dirname $DIR))
|
||||||
|
echo "updating $USER/$REPO..."
|
||||||
|
git -C $DIR remote remove origin
|
||||||
|
if [ $USER = 'internetrelaychat' ]; then
|
||||||
|
git -C $DIR remote add origin git@github.com:internet-relay-chat/$REPO.git
|
||||||
|
git -C $DIR remote set-url --add --push origin git@github.com:internet-relay-chat/$REPO.git
|
||||||
|
git -C $DIR remote set-url --add --push origin git@gitlab.com:$USER/$REPO.git
|
||||||
|
git -C $DIR remote set-url --add --push origin git@codeberg.org:$USER/$REPO.git
|
||||||
|
git -C $DIR remote set-url --add --push origin supergit:$USER/$REPO.git
|
||||||
|
git -C $DIR remote set-url --add --push origin acidgit:$REPO.git
|
||||||
|
else
|
||||||
|
git -C $DIR remote add origin git@github.com:$USER/$REPO.git
|
||||||
|
git -C $DIR remote set-url --add --push origin git@github.com:$USER/$REPO.git
|
||||||
|
git -C $DIR remote set-url --add --push origin git@gitlab.com:$USER/$REPO.git
|
||||||
|
git -C $DIR remote set-url --add --push origin git@codeberg.org:$USER/$REPO.git
|
||||||
|
git -C $DIR remote set-url --add --push origin supergit:$USER/$REPO.git
|
||||||
|
git -C $DIR remote set-url --add --push origin acidgit:$REPO.git
|
||||||
|
fi
|
||||||
|
git -C $DIR config user.signingkey $SIGNING_KEY
|
||||||
|
if [ -f $DIR/description ]; then
|
||||||
|
if [ "$(cat $1/description)" = "Unnamed repository; edit this file 'description' to name the repository." ]; then
|
||||||
|
echo "Enter a description for $REPO:"
|
||||||
|
read DESC
|
||||||
|
echo "$DESC" > $DIR/description
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Enter a description for $REPO:"
|
||||||
|
read DESC
|
||||||
|
echo "$DESC" > $DIR/description
|
||||||
|
fi
|
||||||
|
cp $HOME/.scripts/irc-post-commit-hook $DIR/hooks/post-commit
|
||||||
|
echo $USER > $DIR/owner
|
||||||
|
echo "https://git.acid.vegas/$REPO.git" > $DIR/url
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$#" = '1' ]; then
|
||||||
|
if [ $1 = '-a' ]; then
|
||||||
|
for d in $(find $HOME/dev/git -type d -name mirror -prune -o -type d -name .git -print | sort); do
|
||||||
|
update_repo $d
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ -d $PWD/.git ]; then
|
||||||
|
update_repo $PWD/.git
|
||||||
|
else
|
||||||
|
echo "invalid repository: missing .git directory"
|
||||||
|
fi
|
||||||
|
fi
|
26
scripts/irc-post-commit-hook
Normal file
26
scripts/irc-post-commit-hook
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# irc post-commit hook - developed by acidvegas (https://git.acid.vegas/void)
|
||||||
|
|
||||||
|
# Place this file in .git/hooks/post-commit and chmod +x
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
WEECHAT_NETWORK="irc.supernets.org"
|
||||||
|
WEECHAT_CHANNEL="#dev"
|
||||||
|
WEECHAT_FIFO="/home/acidvegas/.local/share/weechat/weechat_fifo"
|
||||||
|
SSH_SERVER="war"
|
||||||
|
|
||||||
|
# Get commit data for the message
|
||||||
|
_data=$(git log -1 --graph --pretty=format:"%h|%s|%cn")
|
||||||
|
_hash=$(echo "$_data" | cut -d'|' -f1 | cut -c 3-)
|
||||||
|
_msg=$(echo "$_data" | cut -d'|' -f2)
|
||||||
|
_name=$(echo "$_data" | cut -d'|' -f3)
|
||||||
|
#_name=$(basename $(dirname $(git rev-parse --show-toplevel))) # For locally parsing organization names
|
||||||
|
_repo=$(basename -s .git $(git config --get remote.origin.url))
|
||||||
|
_summary=$(git show $_hash --stat | grep -E "fil(e|es) changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {printf "%s|+%s|-%s", files, inserted, deleted }')
|
||||||
|
_files=$(echo $_summary | cut -d'|' -f1)
|
||||||
|
_inserts=$(echo $_summary | cut -d'|' -f2)
|
||||||
|
_deletes=$(echo $_summary | cut -d'|' -f3)
|
||||||
|
_ircmsg="irc.$WEECHAT_NETWORK.$WEECHAT_CHANNEL *^C14[^C11GitHub^C14]^O Commit pushed to ^C08$_name/$_repo^O (^C06$_hash^O) ^C14[^O$_files^C14|^C03$_inserts^C14|^C04$_deletes^C14]^O : $_msg"
|
||||||
|
|
||||||
|
# Send the message to weechat
|
||||||
|
echo "$_ircmsg" | ssh $SSH_SERVER tee $WEECHAT_FIFO > /dev/null
|
13
scripts/mutag
Executable file
13
scripts/mutag
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# mutag - developed by acidvegas (https://git.acid.vegas/void)
|
||||||
|
# removes all metadata & album art from mp3 files and sets the artist and title based on the directory and filename
|
||||||
|
# requires: id3v2 python-eyed3
|
||||||
|
find $HOME/music -type f | while read SONG; do
|
||||||
|
DIR=$(dirname "$SONG")
|
||||||
|
ARTIST=$(basename "$DIR")
|
||||||
|
TITLE=$(basename "$SONG" .mp3)
|
||||||
|
echo "$DIR | $ARTIST | $TITLE"
|
||||||
|
eyeD3 --remove-all-images "$SONG"
|
||||||
|
id3v2 --delete-all "$SONG"
|
||||||
|
id3v2 --artist "$ARTIST" --song "$TITLE" -2 "$SONG"
|
||||||
|
done
|
59
scripts/pmf
Executable file
59
scripts/pmf
Executable file
@ -0,0 +1,59 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# poor mans firewall - developed by acidvegas (https://git.acid.vegas/void)
|
||||||
|
|
||||||
|
set -xev
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
SSH_PORT='22'
|
||||||
|
|
||||||
|
# Kernel hardening settings
|
||||||
|
mkdir -p /etc/sysctl.d
|
||||||
|
{
|
||||||
|
printf "net.ipv4.conf.all.accept_source_route = 0\n"
|
||||||
|
printf "net.ipv6.conf.all.accept_source_route = 0\n"
|
||||||
|
printf "net.ipv4.conf.all.rp_filter = 1\n"
|
||||||
|
printf "net.ipv4.conf.default.rp_filter = 1\n"
|
||||||
|
printf "net.ipv4.conf.all.accept_redirects = 0\n"
|
||||||
|
printf "net.ipv6.conf.all.accept_redirects = 0\n"
|
||||||
|
printf "net.ipv4.conf.default.accept_redirects = 0\n"
|
||||||
|
printf "net.ipv6.conf.default.accept_redirects = 0\n"
|
||||||
|
printf "net.ipv4.conf.all.log_martians = 1\n"
|
||||||
|
printf "kernel.randomize_va_space = 2\n"
|
||||||
|
printf "fs.suid_dumpable = 0\n"
|
||||||
|
} > /etc/sysctl.d/99-custom-hardening.conf
|
||||||
|
|
||||||
|
# Apply hardening settings
|
||||||
|
sysctl -p /etc/sysctl.d/99-custom-hardening.conf
|
||||||
|
|
||||||
|
# Flush existing rules
|
||||||
|
iptables -F
|
||||||
|
iptables -X
|
||||||
|
iptables -t nat -F
|
||||||
|
iptables -t nat -X
|
||||||
|
iptables -t mangle -F
|
||||||
|
iptables -t mangle -X
|
||||||
|
|
||||||
|
# Default chain policies
|
||||||
|
iptables -P INPUT DROP
|
||||||
|
iptables -P FORWARD DROP
|
||||||
|
iptables -P OUTPUT ACCEPT
|
||||||
|
|
||||||
|
# Common Firewall rules
|
||||||
|
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
|
||||||
|
iptables -A INPUT -p icmp --icmp-type echo-request -j DROP # Disable response to ping requests
|
||||||
|
iptables -A INPUT -p icmp --icmp-type port-unreachable -j DROP
|
||||||
|
iptables -A INPUT -i lo -j ACCEPT
|
||||||
|
|
||||||
|
# Allow SSH access from the Pi server
|
||||||
|
iptables -A INPUT -p tcp -s $PI_SERVER --dport $PORT_SSH -j ACCEPT
|
||||||
|
|
||||||
|
# Save rules
|
||||||
|
iptables-save > /etc/iptables/iptables.rules
|
||||||
|
|
||||||
|
# Create and configure the iptables service
|
||||||
|
printf '#!/bin/sh\nexec 2>&1\niptables-restore < /etc/iptables/iptables.rules\nexec chpst -b iptables pause\n' > /etc/sv/iptables/run
|
||||||
|
chmod +x /etc/sv/iptables/run
|
||||||
|
ln -sf /etc/sv/iptables /var/service/ && sv restart iptables
|
||||||
|
|
||||||
|
# Show rules
|
||||||
|
iptables -L -v -n
|
13
scripts/shotz
Executable file
13
scripts/shotz
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# shotz - developed by acidvegas (https://acid.vegas/void)
|
||||||
|
# take a screenshot with selection and optionally upload it to hardfiles.org
|
||||||
|
|
||||||
|
output_dir="$HOME/media/i/scrots"
|
||||||
|
output_file=$(date "+scrot_%y-%m_%d_%T.png")
|
||||||
|
|
||||||
|
mkdir -p "$output_dir"
|
||||||
|
scrot -s "$output_dir/$output_file"
|
||||||
|
|
||||||
|
if [ "$1" = "-u" ]; then
|
||||||
|
curl -F file=@"$output_dir/$output_file" https://hardfiles.org/ | xclip -selection clipboard
|
||||||
|
fi
|
5
scripts/statusbar
Executable file
5
scripts/statusbar
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
while true; do
|
||||||
|
xsetroot -name "$(date '+%I:%M @ %m/%')"
|
||||||
|
sleep 60
|
||||||
|
done
|
17
scripts/todo
Executable file
17
scripts/todo
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# dmenu todo script - developed by acidvegas (https://git.acid.vegas/void)
|
||||||
|
db=$HOME/.todo
|
||||||
|
touch $db
|
||||||
|
while :
|
||||||
|
do
|
||||||
|
cmd=$(dmenu -l 10 -m 0 -fn "Misc Ohsnap.Icons:style=Regular:size=11" -nb "#000000" -nf "#FFFFFF" -sb "#000000" -sf "#00D787" "$@" < "$db")
|
||||||
|
if [ -z "$cmd" ]; then
|
||||||
|
break
|
||||||
|
elif grep -q "^$cmd\$" "$db"; then
|
||||||
|
grep -v "^$cmd\$" "$db" > "$db.$$"
|
||||||
|
mv "$db.$$" "$db"
|
||||||
|
else
|
||||||
|
echo "$cmd" >> "$db"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
exit 0
|
56
scripts/torwall
Executable file
56
scripts/torwall
Executable file
@ -0,0 +1,56 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# tor firewall script - developed by acidvegas (https://git.acid.vegas/void)
|
||||||
|
|
||||||
|
# All traffic is routed through Tor.
|
||||||
|
# printf "DNSPort 53\nTransPort 9040\nSocksPort 9050\nControlPort 9051\n" > /etc/tor/torrc
|
||||||
|
|
||||||
|
|
||||||
|
start_tor() {
|
||||||
|
iptables -t nat -A OUTPUT -o lo -j RETURN
|
||||||
|
iptables -t nat -A OUTPUT -p tcp --syn -j REDIRECT --to-ports 9040
|
||||||
|
iptables -t nat -A OUTPUT -p udp --dport 53 -j REDIRECT --to-ports 9053
|
||||||
|
iptables -t nat -A OUTPUT -p tcp --dport 53 -j REDIRECT --to-ports 9053
|
||||||
|
iptables -A OUTPUT ! -o lo ! -d 127.0.0.1/8 ! -p tcp -j DROP
|
||||||
|
echo "repository=http://lysator7eknrfl47rlyxvgeamrv7ucefgrrlhk7rouv3sna25asetwid.onion/pub/voidlinux/current/musl" > /etc/xbps.d/00-repository-main.conf
|
||||||
|
echo "nameserver 127.0.0.1" > /etc/resolv.conf && chattr +i /etc/resolv.conf
|
||||||
|
export SOCKS_PROXY="socks5://127.0.0.1:9050"
|
||||||
|
echo "All traffic is now routed through Tor."
|
||||||
|
}
|
||||||
|
|
||||||
|
new_tor() {
|
||||||
|
iptables -F
|
||||||
|
iptables -t nat -F
|
||||||
|
|
||||||
|
# Allow local-only connections
|
||||||
|
iptables -A OUTPUT -o lo -j ACCEPT
|
||||||
|
|
||||||
|
# Allow the tor process to establish connections
|
||||||
|
iptables -A OUTPUT -m owner --uid-owner $(id -u debian-tor) -j ACCEPT
|
||||||
|
|
||||||
|
# Redirect all non-local TCP connections to Tor's TransPort
|
||||||
|
iptables -t nat -A OUTPUT -p tcp --syn -j REDIRECT --to-ports 9040
|
||||||
|
|
||||||
|
# Redirect DNS queries to Tor's DNSPort
|
||||||
|
iptables -t nat -A OUTPUT -p udp --dport 53 -j REDIRECT --to-ports 9053
|
||||||
|
iptables -t nat -A OUTPUT -p tcp --dport 53 -j REDIRECT --to-ports 9053
|
||||||
|
|
||||||
|
# Reject any other outbound traffic
|
||||||
|
iptables -A OUTPUT -j REJECT
|
||||||
|
}
|
||||||
|
|
||||||
|
stop_tor() {
|
||||||
|
iptables -F
|
||||||
|
iptables -t nat -F
|
||||||
|
echo "repository=https://repo-default.voidlinux.org/current/musl" > /etc/xbps.d/00-repository-main.conf
|
||||||
|
echo "nameserver 1.1.1.1" > /etc/resolv.conf && chattr +i /etc/resolv.conf
|
||||||
|
unset SOCKS_PROXY
|
||||||
|
echo "Tor-only mode is now off."
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ $1 == "start" ]]; then
|
||||||
|
start_tor
|
||||||
|
elif [[ $1 == "stop" ]]; then
|
||||||
|
stop_tor
|
||||||
|
else
|
||||||
|
echo "Usage: $0 [start|stop]"
|
||||||
|
fi
|
157
scripts/vps
Executable file
157
scripts/vps
Executable file
@ -0,0 +1,157 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# enter the void (vps) - developed by acidvegas (https://git.acid.vegas/void)
|
||||||
|
|
||||||
|
# Notes:
|
||||||
|
# MUSL builds for Void Linux are having an issue where `su` is segfaulting or returning "Bad address"
|
||||||
|
#
|
||||||
|
# Bootstrap:
|
||||||
|
# xbps-install -Su && xbps-install -u xbps && xbps-install wget nano && wget https://git.supernets.org/acidvegas/void/raw/branch/master/scripts/vps && chmod +x vps && ./vps root
|
||||||
|
|
||||||
|
set -xev
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
ARCH=x86_64 # x86_64 or x86_64-musl
|
||||||
|
DRIVE=/dev/vda
|
||||||
|
SSH_KEY="ssh-ed25519 REDACTED acidvegas@paloalto"
|
||||||
|
SWAP_SIZE=$((1 * 1024)) # 1GB
|
||||||
|
TIMEZONE="America/New_York"
|
||||||
|
USERNAME=supernets
|
||||||
|
|
||||||
|
# Let's dynamically set the hostname so we don't have to hardcode it
|
||||||
|
echo "Hostname:"
|
||||||
|
read HOSTNAME
|
||||||
|
|
||||||
|
setup_root() {
|
||||||
|
xbps-install -y parted
|
||||||
|
wipefs -a -f $DRIVE
|
||||||
|
parted --script $DRIVE mklabel msdos
|
||||||
|
parted --script $DRIVE mkpart primary ext4 1MiB 100%
|
||||||
|
parted --script $DRIVE set 1 boot on
|
||||||
|
mkfs.ext4 ${DRIVE}1
|
||||||
|
mkdir -p /mnt
|
||||||
|
mount ${DRIVE}1 /mnt
|
||||||
|
mkdir -p /mnt/var/db/xbps/keys
|
||||||
|
cp /var/db/xbps/keys/* /mnt/var/db/xbps/keys/
|
||||||
|
REPO=https://repo-default.voidlinux.org/current
|
||||||
|
[ $ARCH = 'x86_64-musl' ] && REPO=$REPO/musl
|
||||||
|
XBPS_ARCH=$ARCH xbps-install -y -S -r /mnt -R "$REPO" base-system linux
|
||||||
|
cp vps /mnt/root/
|
||||||
|
xchroot /mnt /bin/bash
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_chroot() {
|
||||||
|
passwd
|
||||||
|
|
||||||
|
xbps-install -u xbps
|
||||||
|
xbps-remove -y base-system openssh
|
||||||
|
xbps-install -Syu curl dropbear git htop lxd iptables nano net-tools runit-iptables tmux socklog-void wget
|
||||||
|
|
||||||
|
# Set up networking
|
||||||
|
IP_ADDR=$(ip addr show eth0 | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1)
|
||||||
|
GATEWAY=$(ip route show default | awk '/default/ {print $3}')
|
||||||
|
printf "ip link set eth0 up\nip addr add ${IP_ADDR}/24 dev eth0\nip route add default via $GATEWAY\n" > /etc/rc.local
|
||||||
|
printf "printf \"nameserver 208.67.222.222\\\nnameserver 208.67.220.220\\\nnameserver 2620:119:35::35\\\nnameserver 2620:119:53::53\" > /etc/resolv.conf" >> /etc/rc.local
|
||||||
|
|
||||||
|
echo "$HOSTNAME" > /etc/hostname
|
||||||
|
printf "set boldtext\nset minibar\nset nohelp\nset nowrap\nset quickblank\nset tabsize 4\nunbind ^J main\nset selectedcolor black,red\ninclude \"/usr/share/nano/*.nanorc\"\n" > /etc/nanorc
|
||||||
|
printf "\nexport HISTFILE=/dev/null\nexport LESSHISTFILE=/dev/null\nexport PYTHONHISTFILE=/dev/null\n" >> /etc/profile
|
||||||
|
printf "Defaults lecture = always\nDefaults lecture_file = /etc/sudoers.d/sudoers.lecture\nroot ALL=(ALL) ALL\n%%wheel ALL=(ALL) ALL\n" > /etc/sudoers
|
||||||
|
printf "\n\033[1m \033[32m\"Bee\" careful \033[34m__\n \033[32mwith sudo! \033[34m// \ \n \\\\\\_/ \033[33m//\n \033[35m''-.._.-''-.._.. \033[33m-(||)(')\n '''\033[0m\n" > /etc/sudoers.d/sudoers.lecture
|
||||||
|
printf '#!/bin/sh\nexec 2>&1\n[ -r conf ] && . ./conf\nexec dropbear -K 0 -p %s -R -w -t -T 1 -F 2>&1\n' "$(shuf -i 10000-65534 -n 1)" > /etc/sv/dropbear/run
|
||||||
|
echo "hsts=0" >> /etc/wgetrc
|
||||||
|
>/var/log/lastlog && chattr +i /var/log/lastlog
|
||||||
|
|
||||||
|
# Enable services (Using the runit dir because the system is not running yet)
|
||||||
|
ln -s /etc/sv/socklog-unix/ /etc/runit/runsvdir/default/
|
||||||
|
ln -s /etc/sv/nanoklogd/ /etc/runit/runsvdir/default/
|
||||||
|
ln -s /etc/sv/dropbear/ /etc/runit/runsvdir/default/
|
||||||
|
ln -s /etc/sv/lxd /etc/runit/runsvdir/default/
|
||||||
|
ln -s /usr/share/zoneinfo/$TIMEZONE /etc/localtime
|
||||||
|
|
||||||
|
touch /swapfile
|
||||||
|
dd if=/dev/zero of=/swapfile bs=1M count=${SWAP_SIZE} status=progress
|
||||||
|
chmod 0600 /swapfile
|
||||||
|
mkswap /swapfile && swapon /swapfile
|
||||||
|
|
||||||
|
hwclock --systohc
|
||||||
|
chsh -s /bin/bash
|
||||||
|
|
||||||
|
useradd -m -s /bin/bash $USERNAME && passwd $USERNAME
|
||||||
|
gpasswd -a $USERNAME lxd
|
||||||
|
cp vps /home/$USERNAME/ && chown $USERNAME:$USERNAME /home/$USERNAME/vps
|
||||||
|
|
||||||
|
if [ ! $ARCH = 'x86_64-musl' ]; then
|
||||||
|
xbps-reconfigure -f glibc-locales
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Setup fstab
|
||||||
|
echo "UUID=$(blkid -s UUID -o value ${DRIVE}1) / ext4 rw,errors=remount-ro,noatime 0 1" > /etc/fstab
|
||||||
|
echo "tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0" >> /etc/fstab
|
||||||
|
echo "/swapfile none swap sw 0 0" >> /etc/fstab
|
||||||
|
echo "proc /proc proc defaults,hidepid=2 0 0" >> /etc/fstab
|
||||||
|
mount -o remount /proc
|
||||||
|
|
||||||
|
# Preseed LXD initialization
|
||||||
|
{
|
||||||
|
echo "config:"
|
||||||
|
echo " images.auto_update_interval: \"0\""
|
||||||
|
echo "networks:"
|
||||||
|
echo "- config:"
|
||||||
|
echo " ipv4.address: auto"
|
||||||
|
echo " ipv6.address: none" # Do we need IPv6
|
||||||
|
echo " description: \"\""
|
||||||
|
echo " name: lxdbr0"
|
||||||
|
echo " type: \"\""
|
||||||
|
echo " project: default"
|
||||||
|
echo "storage_pools: []"
|
||||||
|
echo "profiles:"
|
||||||
|
echo "- config: {}"
|
||||||
|
echo " description: \"\""
|
||||||
|
echo " devices:"
|
||||||
|
echo " eth0:"
|
||||||
|
echo " name: eth0"
|
||||||
|
echo " network: lxdbr0"
|
||||||
|
echo " type: nic"
|
||||||
|
echo " name: default"
|
||||||
|
echo "projects: []"
|
||||||
|
echo "cluster: null"
|
||||||
|
} | lxd init --preseed
|
||||||
|
|
||||||
|
# Add the official SuperNETs seal of HARD FUCKIGN CORE INTERNET USAGE into the MOTD
|
||||||
|
{
|
||||||
|
echo ""
|
||||||
|
echo " \033[37;104m \033[0m \033[0m"
|
||||||
|
echo " \033[37;104m \033[37;101m \033[37;104m \033[0m \033[0m"
|
||||||
|
echo " \033[37;104m \033[37;101m \033[37;103m \033[37;101m \033[37;103m \033[37;101m \033[37;103m \033[37;101m \033[37;104m \033[0m \033[0m"
|
||||||
|
echo "\033[37;104m \033[37;101m \033[37;103m \033[37;101m \033[37;103m \033[37;101m \033[37;103m \033[37;101m \033[37;104m \033[0m \033[0m"
|
||||||
|
echo "\033[37;104m \033[37;101m \033[37;103m \033[37;101m \033[37;103m \033[37;101m \033[37;104m \033[0m \033[0m"
|
||||||
|
echo " \033[37;104m \033[37;101m \033[37;103m \033[37;101m \033[37;103m \033[37;101m \033[37;104m \033[0m \033[0m"
|
||||||
|
echo " \033[37;104m \033[37;101m \033[37;104m \033[0m \033[0m"
|
||||||
|
echo " \033[37;104m \033[37;101m \033[37;103m \033[37;101m \033[37;104m \033[0m \033[0m"
|
||||||
|
echo " \033[37;104m \033[37;101m \033[37;103m \033[37;101m \033[37;103m \033[37;101m \033[37;104m \033[0m \033[0m"
|
||||||
|
echo " \033[37;104m \033[37;101m \033[37;104m \033[0m \033[0m"
|
||||||
|
echo " \033[37;104m \033[37;101m \033[37;103m \033[37;101m \033[37;104m \033[0m \033[0m"
|
||||||
|
echo " \033[37;104m \033[37;101m \033[37;103m \033[37;101m \033[37;104m \033[0m \033[0m"
|
||||||
|
echo " \033[37;104m \033[37;101m \033[37;104m \033[0m \033[0m"
|
||||||
|
echo "┏┓┳┳┏┓┏┓┳┓ \033[37;104m \033[37;101m \033[37;104m \033[0m ┳┓┏┓┏┳┓┏┓"
|
||||||
|
echo "┗┓┃┃┣┛┣ ┣┫ \033[37;104m \033[0m ┃┃┣ ┃ ┗┓"
|
||||||
|
echo "┗┛┗┛┻ ┗┛┛┗ \033[37;104m \033[0m\033[0m ┛┗┗┛ ┻ ┗┛"
|
||||||
|
echo ""
|
||||||
|
} > /etc/motd
|
||||||
|
|
||||||
|
# Set up user SSH keys
|
||||||
|
mkdir -p /home/$USERNAME/.ssh
|
||||||
|
echo "$SSH_KEY" > /home/$USERNAME/.ssh/authorized_keys
|
||||||
|
chmod 700 $HOME/.ssh && chown -R $USERNAME:$USERNAME /home/$USERNAME/.ssh
|
||||||
|
chmod 400 $HOME/.ssh/authorized_keys && chattr +i $HOME/.ssh/authorized_keys && chattr +i $HOME/.ssh
|
||||||
|
|
||||||
|
xbps-install -Sy grub
|
||||||
|
grub-install $DRIVE
|
||||||
|
grub-mkconfig -o /boot/grub/grub.cfg
|
||||||
|
|
||||||
|
xbps-reconfigure -fa
|
||||||
|
}
|
||||||
|
|
||||||
|
[ $1 = "root" ] && setup_root
|
||||||
|
[ $1 = "chroot" ] && setup_chroot
|
||||||
|
[ $1 = "user" ] && setup_user
|
163
setup
Executable file
163
setup
Executable file
@ -0,0 +1,163 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# void setup script - developed by acidvegas (https://git.acid.vegas/void)
|
||||||
|
|
||||||
|
# note: After importing keys: printf "FINGERPRINTHERE:6:" | gpg --import-ownertrust
|
||||||
|
|
||||||
|
set -xev
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
CPU=intel # amd or intel
|
||||||
|
DISPLAY_SERVER=xorg # xorg or blank for none
|
||||||
|
GFX_DRIVER=intel # amd or intel (leave blank for none)
|
||||||
|
REMOTE_PORT=2023 # CHANGE THIS
|
||||||
|
|
||||||
|
GIT_URL="https://raw.githubusercontent.com/acidvegas/void/master"
|
||||||
|
|
||||||
|
setup_root() {
|
||||||
|
useradd -m -s /bin/bash acidvegas && gpasswd -a acidvegas wheel && passwd acidvegas
|
||||||
|
|
||||||
|
wget -O /usr/share/kbd/consolefonts/ohsnap6x11r.psfu $GIT_URL/font/ohsnap6x11r.psfu
|
||||||
|
wget -O /usr/share/kbd/consolefonts/ohsnap7x12r.psfu $GIT_URL/font/ohsnap7x12r.psfu
|
||||||
|
wget -O /usr/share/kbd/consolefonts/ohsnap7x14r.psfu $GIT_URL/font/ohsnap7x14r.psfu
|
||||||
|
|
||||||
|
printf "\nnohook resolv.conf\n" >> /etc/dhcpcd.conf
|
||||||
|
printf "\nipv4only\nnodhcp6\n" >> /etc/dhcpcd.conf # For fixing "dhcpcd: ipv6nd_sendadvertisement: Operation not permitted" error
|
||||||
|
echo "proc /proc proc defaults,hidepid=2 0 0" >> /etc/fstab && mount -o remount /proc
|
||||||
|
printf "set boldtext\nset minibar\nset nohelp\nset nowrap\nset quickblank\nset tabsize 4\nunbind ^J main\nset selectedcolor black,red\ninclude \"/usr/share/nano/*.nanorc\"\n" > /etc/nanorc
|
||||||
|
printf "\nexport HISTFILE=/dev/null\nexport LESSHISTFILE=/dev/null\nexport PYTHONHISTFILE=/dev/null\n" >> /etc/profile
|
||||||
|
printf "#\!/bin/sh\nclear && (printf \"\" && printf \" E N T E R T H E V O I D\" && printf \"\") | nms -af red\n" > /etc/profile.d/motd.sh
|
||||||
|
printf "\nFONT=\"ohsnap6x11r\"\n" >> /etc/rc.conf
|
||||||
|
printf "Defaults lecture = always\nDefaults lecture_file = /etc/sudoers.d/sudoers.lecture\nroot ALL=(ALL) ALL\n%%wheel ALL=(ALL) ALL\n" > /etc/sudoers
|
||||||
|
printf "\n\033[1m \033[32m\"Bee\" careful \033[34m__\n \033[32mwith sudo! \033[34m// \ \n \\\\\\_/ \033[33m//\n \033[35m''-.._.-''-.._.. \033[33m-(||)(')\n '''\033[0m\n" > /etc/sudoers.d/sudoers.lecture
|
||||||
|
printf '#!/bin/sh\nexec 2>&1\n[ -r conf ] && . ./conf\nexec dropbear -p CHANGE:ME -w -s -R -F\n' > /etc/sv/dropbear/run
|
||||||
|
printf "\nhsts=0\n" >> /etc/wgetrc
|
||||||
|
|
||||||
|
ln -sfv /etc/sv/socklog-unix /var/service
|
||||||
|
ln -sfv /etc/sv/nanoklogd /var/service
|
||||||
|
ln -sf /etc/sv/dropbear /var/service/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setup_packages() {
|
||||||
|
xbps-install -Suy void-repo-nonfree
|
||||||
|
|
||||||
|
if [ $CPU = "intel" ]; then
|
||||||
|
xbps-install -y intel-ucode
|
||||||
|
xbps-reconfigure -f $(xbps-query -s linux | grep pkgver | cut -d " " -f 2) # Must regenerate initramfs
|
||||||
|
elif [ $CPU = "amd" ]; then
|
||||||
|
xbps-install -y linux-firmware-amd
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $DISPLAY_SERVER = "xorg" ]; then
|
||||||
|
if [ $GFX_DRIVER = "intel" ]; then
|
||||||
|
xbps-install -y linux-firmware-intel mesa-dri vulkan-loader mesa-vulkan-intel intel-video-accel
|
||||||
|
fi
|
||||||
|
xbps-install -y xorg libX11-devel libX11 libXft-devel libXft libXinerama-devel libXinerama libXrandr-devel libXrandr
|
||||||
|
xbps-install -y alacritty dmenu dunst firefox pinentry-dmenu scrot signal-desktop unclutter xclip
|
||||||
|
xbps-install -y ohsnap-font font-unifont-bdf freefont-ttf noto-fonts-ttf noto-fonts-ttf-extra noto-fonts-cjk noto-fonts-emoji
|
||||||
|
xbps-install -y alsa-utils cmus ffmpeg id3v2 eyeD3 youtube-dl # Revamp audio setup at some point
|
||||||
|
xbps-install -y vscode
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Development
|
||||||
|
xbps-install -y checkbashisms gcc go make patch pkg-config python3 python3-pip shellcheck
|
||||||
|
|
||||||
|
# Essentials
|
||||||
|
xbps-install -y curl dropbrear git lxc lxd socklog-void tmux tor tree unzip zip
|
||||||
|
xbps-install -y bandwhich glow gnupg2-scdaemon lazygit oath-toolkit progress rsync tmate
|
||||||
|
xbps-install -y earlyoom && ln -sfv /etc/sv/earlyoom /var/service/
|
||||||
|
|
||||||
|
# Alternatives
|
||||||
|
xbps-install -y bat btop delta exa
|
||||||
|
|
||||||
|
# Recon
|
||||||
|
xbps-install -y masscan termshark
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setup_configs() {
|
||||||
|
wget -O $HOME/.alacritty.toml $GIT_URL/alacritty/.alacritty.toml
|
||||||
|
wget -O $HOME/.tmux.conf $GIT_URL/tmux/.tmux.conf
|
||||||
|
|
||||||
|
wget -O $HOME/.bashrc $GIT_URL/bash/.bashrc
|
||||||
|
wget -O $HOME/.bash_aliases $GIT_URL/bash/.bash_aliases
|
||||||
|
wget -O $HOME/.bash_functions $GIT_URL/bash/.bash_functions
|
||||||
|
. $HOME/.bashrc # POSIX shell doesn't support source
|
||||||
|
|
||||||
|
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
|
||||||
|
wget -O $HOME/.gitconfig $GIT_URL/git/.gitconfig
|
||||||
|
mkdir $HOME/.gnupg && wget -O $HOME/.gnupg/gpg.conf $GIT_URL/gpg/gpg.conf
|
||||||
|
|
||||||
|
if [ $DISPLAY_SERVER = "xorg" ]; then
|
||||||
|
printf "pinentry-program $HOME/.gnupg/pinentry-wrapper\ndefault-cache-ttl 3600\n" > $HOME/.gnupg/gpg-agent.conf
|
||||||
|
printf "if [ \"\$PINENTRY_USER_DATA\" = \"dmenu\" ]; then\n\texec /usr/local/bin/pinentry-dmenu \"$@\"\nelse\n\texec /usr/bin/pinentry-curses \"$@\"\nfi\n" > $HOME/.gnupg/pinentry-wrapper && chmod +x $HOME/.gnupg/pinentry-wrapper
|
||||||
|
fi
|
||||||
|
chmod 700 $HOME/.gnupg && chmod 600 $HOME/.gnupg/*
|
||||||
|
|
||||||
|
mkdir $HOME/.ssh && touch $HOME/.ssh/config && chown -R $USER $HOME/.ssh && chmod 700 $HOME/.ssh && chmod 600 $HOME/.ssh/config
|
||||||
|
wget -O $HOME/.xinitrc $GIT_URL/xorg/.xinitrc
|
||||||
|
|
||||||
|
mkdir $HOME/.scripts
|
||||||
|
for SCRIPT in cmus-now dbc 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
|
||||||
|
done
|
||||||
|
|
||||||
|
mkdir -p $HOME/.local/share/fonts && wget -O $HOME/.local/share/fonts/BlockZone.ttf $GIT_URL/font/BlockZone.ttf
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setup_fun() {
|
||||||
|
BUILD=$HOME/dev/build
|
||||||
|
mkdir -p $BUILD
|
||||||
|
|
||||||
|
sudo xbps-install -y asciiquarium cmatrix no-more-secrets tty-solitaire
|
||||||
|
|
||||||
|
wget -O $HOME/.scripts/irc2ansi.py https://github.com/internet-relay-chat/archive/blob/master/art/irc2ansi.py
|
||||||
|
wget -O $HOME/.scripts/bomber $GIT_URL/scripts/bomber && chmod +x $HOME/.scripts/bomber
|
||||||
|
wget -O $HOME/.scripts/pipes https://raw.githubusercontent.com/pipeseroni/pipes.sh/master/pipes.sh && chmod +x $HOME/.scripts/pipes
|
||||||
|
|
||||||
|
git clone https://github.com/AngelJumbo/lavat.git $BUILD/lavat
|
||||||
|
sudo make -C $BUILD/lavat clean install
|
||||||
|
|
||||||
|
git clone https://github.com/lptstr/fire --recurse $BUILD/fire
|
||||||
|
sudo make -C $BUILD/fire clean install
|
||||||
|
|
||||||
|
git clone https://github.com/ricoriedel/wipe $BUILD/wipe
|
||||||
|
cargo build --release --manifest-path $BUILD/wipe/Cargo.toml # Need to install
|
||||||
|
|
||||||
|
git clone https://github.com/pythops/bouncinamation $BUILD/bouncinamation
|
||||||
|
cargo build --release --manifest-path $BUILD/bouncinamation/Cargo.toml # Need to install
|
||||||
|
|
||||||
|
go install github.com/maaslalani/confetty@latest # Need to revise
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setup_builds() {
|
||||||
|
BUILD=$HOME/dev/build
|
||||||
|
mkdir -p $BUILD
|
||||||
|
|
||||||
|
git clone --depth 1 http://git.suckless.org/dwm $BUILD/dwm
|
||||||
|
wget -O $BUILD/dwm/config.h $GIT_URL/dwm/config.h
|
||||||
|
wget -O $BUILD/dwm/patch_nosquares.diff $GIT_URL/dwm/patch_nosquares.diff
|
||||||
|
wget -O $BUILD/dwm/patch_notitles.diff $GIT_URL/dwm/patch_notitles.diff
|
||||||
|
patch $BUILD/dwm/drw.c $BUILD/dwm/patch_nosquares.diff
|
||||||
|
patch $BUILD/dwm/dwm.c $BUILD/dwm/patch_notitles.diff
|
||||||
|
sudo make -C $BUILD/dwm clean install
|
||||||
|
|
||||||
|
go install -v github.com/projectdiscovery/pdtm/cmd/pdtm@latest && pdtm --all
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$#" -ne 1 ]; then
|
||||||
|
echo "usage: $0 [root|config|build|fun]" && exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
root) setup_root ;;
|
||||||
|
config) setup_configs ;;
|
||||||
|
build) setup_builds ;;
|
||||||
|
fun) setup_fun ;;
|
||||||
|
*) echo "usage: $0 [root|config|build|fun]\n"; exit 1 ;;
|
||||||
|
esac
|
37
tmux/.tmux.conf
Normal file
37
tmux/.tmux.conf
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# Sessions
|
||||||
|
bind -n C-M-k kill-session
|
||||||
|
bind -n C-M-t command-prompt -p "New session name:" "rename-session '%%'"
|
||||||
|
bind -n C-M-n new-session
|
||||||
|
bind -n C-M-s choose-tree -Z
|
||||||
|
bind -n C-M-Left switch-client -n
|
||||||
|
bind -n C-M-Right switch-client -p
|
||||||
|
|
||||||
|
# Tabs
|
||||||
|
bind -n C-k kill-window
|
||||||
|
bind -n C-n new-window
|
||||||
|
bind -n C-t command-prompt -p "New title:" "rename-window '%%'"
|
||||||
|
bind -n C-Left previous-window
|
||||||
|
bind -n C-Right next-window
|
||||||
|
bind -n C-S-Left swap-window -t -1 \; previous-window
|
||||||
|
bind -n C-S-Right swap-window -t +1 \; next-window
|
||||||
|
|
||||||
|
# Panes
|
||||||
|
bind -n C-Up split-window -h
|
||||||
|
bind -n C-Down split-window -v
|
||||||
|
bind -n C-S-Up select-pane -t :.+
|
||||||
|
bind -n C-S-Down select-pane -t :.-
|
||||||
|
|
||||||
|
set -g mouse on
|
||||||
|
|
||||||
|
set -g status-interval 3
|
||||||
|
set -g status-style bg=black
|
||||||
|
set -g status-right-length 100
|
||||||
|
set -g status-right "#[fg=yellow]#H#[default] | #[fg=cyan]Disk:#[default] #(df -h | grep '/dev/sda2' | awk '{printf \"%3.0f%\", $5}') | #[fg=cyan]CPU: #[default]#(top -bn1 | grep 'Cpu(s)' | awk '{printf \"%3.0f%\", $2 + $4}') | #[fg=cyan]MEM: #[default]#(free | awk '/^Mem/ {printf \"%3.0f%\", $3/$2 * 100.0}') | %I:%M"
|
||||||
|
|
||||||
|
setw -g window-status-current-style fg=cyan,bg=default
|
||||||
|
setw -g window-status-activity-style fg=yellow,bg=default
|
||||||
|
setw -g window-status-style fg=grey,bg=black
|
||||||
|
setw -g window-status-format "#I: #W"
|
||||||
|
setw -g window-status-current-format "#[bold]#I: #W"
|
||||||
|
|
||||||
|
set-option -g detach-on-destroy off
|
12
xorg/.xinitrc
Normal file
12
xorg/.xinitrc
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
xset +fp /usr/share/fonts/local
|
||||||
|
xset fp rehash
|
||||||
|
|
||||||
|
dunst &
|
||||||
|
unclutter &
|
||||||
|
$HOME/.scripts/statusbar.sh &
|
||||||
|
|
||||||
|
# Example of dual monitor setup
|
||||||
|
#{ sleep 2; xrandr --output HDMI1 --mode 1920x1080 --output DP1 --mode 1920x1080 --above HDMI1; } &
|
||||||
|
|
||||||
|
exec dwm
|
Loading…
Reference in New Issue
Block a user