Updated alacritty config yml to toml, added new bash function scene for ansi art, updated dbc script for personal use, etc
This commit is contained in:
parent
d715d54205
commit
5b643c2e7a
|
@ -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"
|
|
@ -1,58 +0,0 @@
|
|||
font:
|
||||
normal:
|
||||
family: BlockZone
|
||||
style: Regular
|
||||
|
||||
bold:
|
||||
family: BlockZone
|
||||
style: Regular
|
||||
|
||||
italic:
|
||||
family: BlockZone
|
||||
style: Regular
|
||||
|
||||
bold_italic:
|
||||
family: BlockZone
|
||||
style: Regular
|
||||
|
||||
size: 8
|
||||
|
||||
|
||||
colors:
|
||||
primary:
|
||||
background: '0x000000'
|
||||
foreground: '0xC6C6C4'
|
||||
|
||||
normal:
|
||||
black: '0x10100E'
|
||||
red: '0xC40233'
|
||||
green: '0x009F6B'
|
||||
yellow: '0xFFD700'
|
||||
blue: '0x0087BD'
|
||||
magenta: '0x9A4EAE'
|
||||
cyan: '0x20B2AA'
|
||||
white: '0xC6C6C4'
|
||||
|
||||
bright:
|
||||
black: '0x696969'
|
||||
red: '0xFF2400'
|
||||
green: '0x03C03C'
|
||||
yellow: '0xFDFF00'
|
||||
blue: '0x007FFF'
|
||||
magenta: '0xFF1493'
|
||||
cyan: '0x00CCCC'
|
||||
white: '0xFFFAFA'
|
||||
|
||||
selection:
|
||||
save_to_clipboard: true
|
||||
|
||||
|
||||
key_bindings:
|
||||
- { key: Equals, mods: Control, action: IncreaseFontSize }
|
||||
- { key: Minus, mods: Control, action: DecreaseFontSize }
|
||||
- { key: Key0, mods: Control, action: ResetFontSize }
|
||||
|
||||
shell:
|
||||
program: /usr/bin/tmux
|
||||
args:
|
||||
- new-session
|
|
@ -1,4 +1,6 @@
|
|||
#!/bin/sh
|
||||
# .bash_functions - developed by acidvegas (https://git.acid.vegas/void)
|
||||
|
||||
cheat() {
|
||||
curl cht.sh/$1
|
||||
}
|
||||
|
@ -93,6 +95,13 @@ repo() {
|
|||
fi
|
||||
}
|
||||
|
||||
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
|
||||
#echo $x
|
||||
curl -L -k -s http://www.textfiles.com/artscene/ansi/bbs/$x | iconv -f 437 -t utf-8 | pv -q -L 600
|
||||
done
|
||||
}
|
||||
|
||||
qr() {
|
||||
curl qrenco.de/$1
|
||||
}
|
||||
|
|
106
scripts/dbc
106
scripts/dbc
|
@ -1,86 +1,48 @@
|
|||
#!/bin/sh
|
||||
# Dropbear Connect Script (DBC) - Developed by acidvegas (https://git.acid.vegas/void)
|
||||
|
||||
# Usage: dbc <NAME>
|
||||
#
|
||||
# You can store your SSH connections in the CONFIG_FILE or securely using pass.
|
||||
#
|
||||
# Store your SSH connections with the following format:
|
||||
# NAME USER HOST PORT [KEY]
|
||||
#
|
||||
# The [KEY] argument is optional and is the name of a key file in your CONFIG_DIR.
|
||||
# If you are using pass, the [KEY] argument can be a plain text password instead.
|
||||
# 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
|
||||
|
||||
# Config settings
|
||||
CONFIG_DIR="$HOME/.dropbear"
|
||||
CONFIG_FILE="$CONFIG_DIR/config" # Ignored if USE_PASS is set to 1
|
||||
load_host() {
|
||||
CONFIG_DATA="$1"
|
||||
NAME="$2"
|
||||
|
||||
# Pass settings
|
||||
CONFIG_PASS="dropbear" # Replace with your pass entry for the config
|
||||
USE_PASS=0 # Change to 1 to use pass
|
||||
# Use grep to find the matching line
|
||||
MATCHING_LINES=$(printf "%s\n" "$CONFIG_DATA" | grep "^$NAME ")
|
||||
|
||||
# Check if config file exists
|
||||
if [ $USE_PASS -eq 0 ] && [ ! -f $CONFIG_FILE ]; then
|
||||
echo "Error: Config file not found." && exit 1
|
||||
fi
|
||||
# Check if exactly one matching line is found
|
||||
LINE_COUNT=$(printf "%s\n" "$MATCHING_LINES" | grep -c .)
|
||||
if [ "$LINE_COUNT" -ne 1 ]; then
|
||||
echo "Error: The NAME '$NAME' matches multiple or no lines." && return 1
|
||||
fi
|
||||
|
||||
# Check if exactly one argument is provided
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: $0 NAME" && exit 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)
|
||||
|
||||
# Output the result
|
||||
printf "%s@%s^%s" "$line_user" "$line_host" "$line_port"
|
||||
}
|
||||
|
||||
# Read the name argument
|
||||
NAME=$1
|
||||
|
||||
# Load the config data
|
||||
if [ $USE_PASS -eq 1 ]; then
|
||||
CONFIG_DATA=$(pass $CONFIG_PASS)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to decrypt config with pass" && exit 1
|
||||
fi
|
||||
elif [ $USE_PASS -eq 0 ]; then
|
||||
if [ ! -f $CONFIG_FILE ]; then
|
||||
echo "Error: Config file not found." && exit 1
|
||||
fi
|
||||
CONFIG_DATA=$(cat $CONFIG_FILE)
|
||||
else
|
||||
echo "Error: Invalid value for USE_PASS." && exit 1
|
||||
# Read the config data
|
||||
CONFIG_DATA=$($HOME/.scripts/pass dropbear)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "error: can not read config data" && exit 1
|
||||
fi
|
||||
|
||||
# Use grep to find the matching line
|
||||
MATCHING_LINES=$(echo "$CONFIG_DATA" | grep "^$NAME ")
|
||||
# Load the host data
|
||||
JUMP_HOST=$(load_host "$CONFIG_DATA" "jump")
|
||||
END_HOST=$(load_host "$CONFIG_DATA" "$NAME")
|
||||
|
||||
# Check if exactly one matching line is found
|
||||
LINE_COUNT=$(echo "$MATCHING_LINES" | wc -l)
|
||||
if [ "$LINE_COUNT" -ne 1 ]; then
|
||||
echo "Error: The NAME '$NAME' matches multiple or no lines." && exit 1
|
||||
fi
|
||||
|
||||
# Remove extra whitespace from the matching line
|
||||
MATCHING_LINES=$(echo $MATCHING_LINES | tr -s '[:space:]' ' ')
|
||||
|
||||
# Read parameters from the matching line ("Failed reading termmodes" and "Failed to set raw TTY mode" errors when using read inside a while loop)
|
||||
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_key=$(echo $MATCHING_LINES | cut -d ' ' -f 5) # Can also be a password if using pass
|
||||
|
||||
# Set the initial dbclient command line arguments
|
||||
DBCLIENT_CMD="-p $line_port -l $line_user $line_host"
|
||||
|
||||
# Parse the optional key/password argument
|
||||
if [ -n "$line_key" ]; then
|
||||
KEY_PATH="$CONFIG_DIR/$line_key"
|
||||
if [ -f $KEY_PATH ]; then
|
||||
DBCLIENT_CMD="$DBCLIENT_CMD -i $KEY_PATH"
|
||||
else
|
||||
if [ $USE_PASS -eq 1 ]; then
|
||||
DROPBEAR_PASSWORD=$line_key dbclient $DBCLIENT_CMD
|
||||
else
|
||||
echo "Error: Key file not found. (If this is a password and not a key, you must use Pass)"
|
||||
fi
|
||||
|
||||
else
|
||||
dbclient $DBCLIENT_CMD
|
||||
fi
|
||||
# Connect to the host
|
||||
dbclient -K 0 -i $HOME/.dropbear/key $JUMP_HOST,$END_HOST
|
10
scripts/sync
10
scripts/sync
|
@ -1,4 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
rsync -avzhe 'dbclient -i .dropbear/key -p port' LOCAL_PATH username@hostname:REMOTE_PATH
|
||||
|
||||
|
||||
if [ "$#" = '0' ]; then
|
||||
DEST=backup/main
|
||||
rsync -avzhe ssh --progress --delete $HOME/dev blackbox:$DEST
|
||||
|
@ -24,4 +28,8 @@ fi
|
|||
elif [ $1 = 'acid' ]; then
|
||||
DEST=backup/enterthevoid
|
||||
ssh condore 'tar -zcvf ~/blackhole.tar.gz ~/data/scans/blackcore-routing/config/sirp/assets/i_like_you.jpg' && scp -O3 condore:enterthevoid.tar.gz warchest:$DEST
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
rsync -avz -e 'dbclient -i /path/to/key -p port' /path/to/local/file username@hostname:/path/to/remote/directory
|
3
setup
3
setup
|
@ -70,6 +70,7 @@ setup_root() {
|
|||
fi
|
||||
|
||||
printf "\nnohook resolv.conf\n" >> /etc/dhcpcd.conf
|
||||
printf "\nipv4only\nnodhcp6\n" >> /etc/dhcpcd.conf # For fixing "dhcpcd: ipv6nd_sendadvertisement: Operation not permitted" error
|
||||
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\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
|
||||
|
@ -79,7 +80,7 @@ setup_root() {
|
|||
|
||||
|
||||
setup_configs() {
|
||||
wget -O $HOME/.alacritty.yml $GIT_URL/alacritty/.alacritty.yml
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue