Compare commits
117 Commits
master
...
db7a01f58e
| Author | SHA1 | Date | |
|---|---|---|---|
| db7a01f58e | |||
| 514dd44858 | |||
|
|
ccd61e553d | ||
| 2950c3df5c | |||
| da7ddfffb2 | |||
| cbd4e310e5 | |||
| 79c84b3eda | |||
| 79f0de702c | |||
| ff47473e0b | |||
| 7fa5fccedf | |||
| 93cc71411e | |||
| 3fb51b141d | |||
| 42e5a4e97a | |||
| 925dc2edb6 | |||
| 99b38f2872 | |||
| c5f8e3a21a | |||
| 755a02ac7a | |||
| 97112a5757 | |||
| 61de34fdb4 | |||
| 1ff4285cb5 | |||
| ea5b5126b6 | |||
| f43b2a2831 | |||
| 799387d91a | |||
| 9e332f7980 | |||
| fc1c304fdc | |||
|
|
02867aa246 | ||
|
|
f02c1cfbc7 | ||
|
|
44305865c9 | ||
|
|
3276d2aea3 | ||
|
|
5de841dda1 | ||
| ce5fb472d8 | |||
| e8d63cba72 | |||
| 0145882277 | |||
| 65dda2592a | |||
| f287a420c7 | |||
| 6d8bc3ec6b | |||
| b98177ef19 | |||
| 16c4cc9094 | |||
| 5a016d14ed | |||
|
|
829579ca90 | ||
| 74f1200c25 | |||
| 7737d68812 | |||
| 7f629e9b21 | |||
|
|
bf74b0e503 | ||
|
|
b6e12176a8 | ||
|
|
2c2479f0eb | ||
| d9375106a9 | |||
| dadc1433b5 | |||
| 9d17df58dc | |||
| f038875e1f | |||
| 855f669156 | |||
| 9c973380a1 | |||
| 04707c30c4 | |||
| a5ae3e496d | |||
| 1097d2947c | |||
| 3fd11f6524 | |||
| 38e6172d28 | |||
| f8cc38f5f0 | |||
| 5899239d7a | |||
| 923933a54e | |||
| ca14386132 | |||
| 8f77766ed6 | |||
| 665b9cc70b | |||
| bc9f171b94 | |||
| 69f610d776 | |||
| 7d25702d0d | |||
| e09f2cf730 | |||
| 093e29974c | |||
|
|
cb9ce1ce59 | ||
|
|
e70814accb | ||
|
|
34066227cc | ||
|
|
956f0fe231 | ||
|
|
cce09ab331 | ||
|
|
1c813a245c | ||
|
|
d5b7ff4dff | ||
|
|
3af68cdb8f | ||
|
|
1573eb4ce9 | ||
|
|
77f9458afb | ||
|
|
048b599636 | ||
|
|
1500a9f113 | ||
|
|
6f878edfe2 | ||
|
|
7b65517b06 | ||
|
|
58ebab4af2 | ||
|
|
a1aeef95c8 | ||
|
|
06c19651c0 | ||
|
|
e6121a2063 | ||
|
|
bf7e602d40 | ||
|
|
dbd0a31e3e | ||
|
|
61100c2321 | ||
|
|
feee3c0476 | ||
|
|
75c0464459 | ||
|
|
6f7fba09c7 | ||
|
|
9738f5facc | ||
|
|
f8b8d73a9f | ||
|
|
ace195d48e | ||
|
|
c5299b6d27 | ||
|
|
ae407bdff2 | ||
|
|
4d233a68a2 | ||
|
|
f8ef62623b | ||
|
|
594e40f661 | ||
|
|
dc30aa2f54 | ||
|
|
f422dcd8c7 | ||
|
|
da036dd7ee | ||
|
|
a504367cc3 | ||
|
|
2149d47aab | ||
|
|
84a3080a18 | ||
|
|
45a06d4f52 | ||
|
|
096c097f36 | ||
|
|
681fb493f7 | ||
|
|
3dbb02f338 | ||
|
|
b521468ae5 | ||
|
|
2b1eaa2c39 | ||
|
|
4a59e1b816 | ||
|
|
43f9c9d6e8 | ||
|
|
dd53257e10 | ||
|
|
6d977e397f | ||
|
|
b936d6c24f |
225
.bash_aliases
Executable file
225
.bash_aliases
Executable file
@@ -0,0 +1,225 @@
|
||||
# Detect distribution
|
||||
if [ -f /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
fi
|
||||
|
||||
# Application management
|
||||
case "$ID" in
|
||||
ubuntu|debian)
|
||||
# Install something bypassing the prompts
|
||||
alias inst='sudo apt-get install -y'
|
||||
# Do a basic update
|
||||
alias update='sudo apt-get update -y && sudo apt-get upgrade -y'
|
||||
# Upgrade everything
|
||||
alias upgrade_all='sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y && sudo apt-get autoclean -y && sudo apt-get --with-new-pkgs upgrade -y'
|
||||
# Search packages
|
||||
alias pacs='apt-cache search'
|
||||
# Uninstall
|
||||
alias burn='sudo apt-get autoremove'
|
||||
;;
|
||||
arch|archlinux)
|
||||
# Check if yay is installed
|
||||
if command -v yay >/dev/null 2>&1; then
|
||||
# Install something bypassing the prompts
|
||||
alias inst='yay -S --noconfirm'
|
||||
# Do a basic update
|
||||
alias update='yay -Syu --noconfirm'
|
||||
# Upgrade everything
|
||||
alias upgrade_all='yay -Syu --noconfirm && yay -Rns $(pacman -Qdtq) --noconfirm && sudo paccache -r'
|
||||
# Search packages
|
||||
alias pacs='yay -Ss'
|
||||
# Uninstall
|
||||
alias burn='yay -Rns --noconfirm'
|
||||
else
|
||||
# Install something bypassing the prompts
|
||||
alias inst='sudo pacman -S --noconfirm'
|
||||
# Do a basic update
|
||||
alias update='sudo pacman -Syu --noconfirm'
|
||||
# Upgrade everything
|
||||
alias upgrade_all='sudo pacman -Syu --noconfirm && sudo pacman -Rns $(pacman -Qdtq) --noconfirm && sudo paccache -r'
|
||||
# Search packages
|
||||
alias pacs='pacman -Ss'
|
||||
# Uninstall
|
||||
alias burn='sudo pacman -Rns --noconfirm'
|
||||
fi
|
||||
;;
|
||||
alpine)
|
||||
# Install something bypassing the prompts
|
||||
alias inst='sudo apk add'
|
||||
# Do a basic update
|
||||
alias update='sudo apk update && sudo apk upgrade'
|
||||
# Upgrade everything
|
||||
alias upgrade_all='sudo apk update && sudo apk upgrade && sudo apk cache clean'
|
||||
# Search packages
|
||||
alias pacs='apk search'
|
||||
# Uninstall
|
||||
alias burn='sudo apk del'
|
||||
;;
|
||||
*)
|
||||
# Add any other distribution-specific aliases here
|
||||
;;
|
||||
esac
|
||||
|
||||
# General
|
||||
# Get $HOME quick
|
||||
alias ~='cd ~/'
|
||||
# A Nice display of all files in a directory
|
||||
alias ll='ls -hog'
|
||||
# Above but...different I'm sure
|
||||
alias lsa='ls -lah'
|
||||
# List stuff sorted by size
|
||||
alias lt='ls --human-readable --size -1 -S --classify'
|
||||
# Grep command history fast-like
|
||||
alias gh='history|grep'
|
||||
# lol
|
||||
alias please='sudo'
|
||||
# sometimes it feels good
|
||||
alias fucking='sudo'
|
||||
# Install bat. It's better.
|
||||
alias cat='bat'
|
||||
# Source this very file
|
||||
alias src='source ~/.bashrc'
|
||||
# Big Boy edit something
|
||||
alias svim='sudo vim'
|
||||
# Ping but with sounds
|
||||
alias ding='ping -i 5 -a'
|
||||
# An extremely useful benchmark script
|
||||
alias yabs='curl -sL yabs.sh | bash'
|
||||
|
||||
# Utilities
|
||||
# A faster way to do the thing it does
|
||||
alias sysres='sudo systemctl restart'
|
||||
# This one too
|
||||
alias sysup='sudo systemctl enable --now'
|
||||
# Also this one
|
||||
alias sysdn='sudo systemctl disable --now'
|
||||
|
||||
#opens specified command in new window in screen session
|
||||
alias s='screen -X screen '
|
||||
# Resume screen or create a new one named main
|
||||
alias scr='screen -r || screen -S main'
|
||||
# press enter to continue. Occasionally useful
|
||||
alias cnfrm='read -p "Press enter to proceed" '
|
||||
|
||||
# A more intense ping for the professional on the go
|
||||
alias pang='ping -i 10 -v -a'
|
||||
# List the mounted things
|
||||
alias mnts='mount | column -t'
|
||||
# The history command but shorter
|
||||
alias h='history'
|
||||
|
||||
# Lazy docker composing. Set the variable somewhere.
|
||||
alias doco="$DOCKER_COMPOSE_COMMAND"
|
||||
alias redoco="$DOCKER_COMPOSE_COMMAND down && $DOCKER_COMPOSE_COMMAND up -d"
|
||||
alias redog="$DOCKER_COMPOSE_COMMAND down && $DOCKER_COMPOSE_COMMAND up -d; $DOCKER_COMPOSE_COMMAND logs -f"
|
||||
alias dolog="$DOCKER_COMPOSE_COMMAND up -d; $DOCKER_COMPOSE_COMMAND logs -f"
|
||||
# Regain all that space taken up by projects you abandoned
|
||||
alias docprune='docker image prune && docker network prune && docker container prune && docker volume prune'
|
||||
# Send things instantly to a pastebin. Pipe other commands into this to share their output.
|
||||
alias bin='nc termbin.com 9999'
|
||||
# Quicker Docker exec
|
||||
alias dex='docker exec'
|
||||
alias dps="docker ps --format 'CONTAINER ID: {{.ID}}\nIMAGE: {{.Image}}\nCOMMAND: {{.Command}}\nCREATED: {{.CreatedAt}}\nSTATUS: {{.Status}}\nPORTS: {{.Ports}}\nNAMES: {{.Names}}\n'|cat"
|
||||
alias lzd='docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v ~/lzd:/.config/jesseduffield/lazydocker lazyteam/lazydocker'
|
||||
|
||||
# Misc
|
||||
# Get the weather. Put your location after the command
|
||||
alias wttr='ansiweather -u imperial -s false -l'
|
||||
#Read the fucking manual
|
||||
rtfm() { help $@ || info $@ || man $@ || curl "http://cheat.sh/$@"; }
|
||||
# Get your public IP
|
||||
extip(){ ip=$(curl -s http://api.ipify.org);
|
||||
echo "Public IP address is $ip"
|
||||
}
|
||||
# Cheatsheet for linux commands
|
||||
ch() { curl "http://cheat.sh/$@"; }
|
||||
# You can go to noti.toad.city and generate your own code to get browser notifications. It's all explained there. You'll need to modify this value
|
||||
notica() { curl --data "d:$*" "https://noti.toad.city/?VFvu53" ; }
|
||||
|
||||
# A quick lil speedyboi
|
||||
alias speedTest='curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python3 -'
|
||||
# If you're runnng my exact mastodon setup, this will be useful
|
||||
alias tootctl='docker exec -it -w /app/www mastodon bin/tootctl'
|
||||
# HAHAHA Go for it. Hours of fun and profit or ruining all your stuff
|
||||
alias hackingtool='docker run -it --net=host --security-opt seccomp=unconfined --privileged blackarchlinux/blackarch:latest'
|
||||
# Do you need to reboot? Find out here!
|
||||
alias needrs='[ -f /var/run/reboot-required ] && echo "You need to reboot"'
|
||||
|
||||
# Countdown Timer
|
||||
countdown() {
|
||||
start="$(( $(date '+%s') + $1))"
|
||||
while [ $start -ge $(date +%s) ]; do
|
||||
time="$(( $start - $(date +%s) ))"
|
||||
printf '%s\r' "$(date -u -d "@$time" +%H:%M:%S)"
|
||||
sleep 0.1
|
||||
done
|
||||
}
|
||||
# Random quote to avoid making useful commit messages
|
||||
function rgcm() {
|
||||
api="https://whatthecommit.com/index.txt"
|
||||
message=$(curl -s $api)
|
||||
if [[ -z $message ]]; then
|
||||
echo "Error: Failed to retrieve a random commit message"
|
||||
return 1
|
||||
fi
|
||||
git add .
|
||||
git commit -m "$message"
|
||||
echo "Git commit submitted with message: $message"
|
||||
}
|
||||
function cntdn() {
|
||||
local count=$1
|
||||
while [ $count -gt 0 ]; do
|
||||
echo -en "\n$count... "
|
||||
if [ $count -eq 3 ]; then
|
||||
echo "You've still got a few seconds to live it up before your time runs out!"
|
||||
elif [ $count -eq 2 ]; then
|
||||
echo "Tick-tock, tick-tock, time's running out!"
|
||||
elif [ $count -eq 1 ]; then
|
||||
echo "You had a good run, but it's time to face the music!"
|
||||
fi
|
||||
sleep 1
|
||||
((count--))
|
||||
done
|
||||
echo "Time's up!"
|
||||
}
|
||||
|
||||
function ramdisk() {
|
||||
if [ -z "$1" ]; then
|
||||
echo "Error: Ramdisk size not specified."
|
||||
return 1
|
||||
fi
|
||||
if [ ! -d "$HOME/ramdown" ]; then
|
||||
mkdir "$HOME/ramdown"
|
||||
fi
|
||||
|
||||
size="$1"
|
||||
|
||||
sudo mount -t tmpfs -o size="$size" tmpfs "$HOME/ramdown"
|
||||
}
|
||||
|
||||
ipin() {
|
||||
local ip=$1
|
||||
local endpoint="https://ipinfo.io"
|
||||
# Append IP to the endpoint if provided
|
||||
if [[ -n $ip ]]; then
|
||||
endpoint+="/$ip"
|
||||
fi
|
||||
endpoint+="/json?token=4ea2457429bf23"
|
||||
# Make the API call and prettify the JSON response
|
||||
curl -s "$endpoint" | jq .
|
||||
}
|
||||
# Tere function
|
||||
tere() {
|
||||
local result=$(command tere "$@")
|
||||
[ -n "$result" ] && cd -- "$result"
|
||||
}
|
||||
# Compress files. Like the name says.
|
||||
function compress_files() {
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: compress_files <archive_name.zip> <file1> <file2> ..."
|
||||
else
|
||||
zip -r "$1" "${@:2}"
|
||||
fi
|
||||
}
|
||||
# See open ports
|
||||
alias ports='netstat -tuln '
|
||||
1
.bashlocal
Normal file
1
.bashlocal
Normal file
@@ -0,0 +1 @@
|
||||
$DOCKER_COMPOSE_COMMAND="docker-compose"
|
||||
168
.bashrc
Normal file
168
.bashrc
Normal file
@@ -0,0 +1,168 @@
|
||||
##########################################################
|
||||
# USE ALIASES WITH SUDO HOORAY #
|
||||
##########################################################
|
||||
alias sudo='sudo '
|
||||
|
||||
#what cd should do by default
|
||||
alias cd='cd_func'
|
||||
alias bat='batcat '
|
||||
cd_func ()
|
||||
{
|
||||
builtin cd "$@" && ls --color=auto --group-directories-first --format=single-column
|
||||
}
|
||||
# If not running interactively, don't do anything
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
export DOCKER_COMPOSE_COMMAND="docker compose"
|
||||
|
||||
# Don't put duplicate lines in the history and do not add lines that start with a space
|
||||
export HISTCONTROL=erasedups:ignoredups:ignorespace
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=1000
|
||||
HISTFILESIZE=2000
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
# set variable identifying the chroot you work in (used in the prompt below)
|
||||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||
debian_chroot=$(cat /etc/debian_chroot)
|
||||
fi
|
||||
|
||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||
case "$TERM" in
|
||||
xterm-color|*-256color) color_prompt=yes;;
|
||||
esac
|
||||
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
# off by default to not distract the user: the focus in a terminal window
|
||||
# should be on the output of commands, not on the prompt
|
||||
#force_color_prompt=yes
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
else
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# To have colors for ls and all grep commands such as grep, egrep and zgrep
|
||||
export CLICOLOR=1
|
||||
export LS_COLORS='no=00:fi=00:di=00;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:*.xml=00;31:'
|
||||
#export GREP_OPTIONS='--color=auto' #deprecated
|
||||
alias grep="/usr/bin/grep $GREP_OPTIONS"
|
||||
unset GREP_OPTIONS
|
||||
|
||||
# Color for manpages in less makes manpages a little easier to read
|
||||
export LESS_TERMCAP_mb=$'\E[01;31m'
|
||||
export LESS_TERMCAP_md=$'\E[01;31m'
|
||||
export LESS_TERMCAP_me=$'\E[0m'
|
||||
export LESS_TERMCAP_se=$'\E[0m'
|
||||
export LESS_TERMCAP_so=$'\E[01;44;33m'
|
||||
export LESS_TERMCAP_ue=$'\E[0m'
|
||||
export LESS_TERMCAP_us=$'\E[01;32m'
|
||||
|
||||
# Add an "alert" alias for long running commands. Use like so:
|
||||
# sleep 10; alert
|
||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||
|
||||
# Alias definitions.
|
||||
# You may want to put all your additions into a separate file like
|
||||
# ~/.bash_aliases, instead of adding them here directly.
|
||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
. ~/.bash_aliases
|
||||
fi
|
||||
|
||||
############################
|
||||
# This allows you to have #
|
||||
# a local aliases file #
|
||||
# not affected by this #
|
||||
# git repo #
|
||||
############################
|
||||
if [ -f ~/.bashlocal ]; then
|
||||
. ~/.bashlocal
|
||||
fi
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if ! shopt -oq posix; then
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
# Extracts any archive(s) (if unp isn't installed)
|
||||
extract () {
|
||||
for archive in $*; do
|
||||
if [ -f $archive ] ; then
|
||||
case $archive in
|
||||
*.tar.bz2) tar xvjf $archive ;;
|
||||
*.tar.gz) tar xvzf $archive ;;
|
||||
*.bz2) bunzip2 $archive ;;
|
||||
*.rar) rar x $archive ;;
|
||||
*.gz) gunzip $archive ;;
|
||||
*.tar) tar xvf $archive ;;
|
||||
*.tbz2) tar xvjf $archive ;;
|
||||
*.tgz) tar xvzf $archive ;;
|
||||
*.zip) unzip $archive ;;
|
||||
*.Z) uncompress $archive ;;
|
||||
*.7z) 7z x $archive ;;
|
||||
*) echo "don't know how to extract '$archive'..." ;;
|
||||
esac
|
||||
else
|
||||
echo "'$archive' is not a valid file!"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
export PATH="$HOME/.cargo/bin:$HOME/.local/bin:$PATH"
|
||||
export CDPATH=:..:~:~/dock:/dock
|
||||
45
.vimrc
Normal file
45
.vimrc
Normal file
@@ -0,0 +1,45 @@
|
||||
set number
|
||||
set cursorline
|
||||
set cursorcolumn
|
||||
" Set shift width to 4 spaces.
|
||||
set shiftwidth=4
|
||||
|
||||
" Set tab width to 4 columns.
|
||||
set tabstop=4
|
||||
|
||||
" Use space characters instead of tabs.
|
||||
set expandtab
|
||||
|
||||
" Do not save backup files.
|
||||
set nobackup
|
||||
|
||||
" Do not let cursor scroll below or above N number of lines when scrolling.
|
||||
set scrolloff=10
|
||||
|
||||
" Do not wrap lines. Allow long lines to extend as far as the line goes.
|
||||
set nowrap
|
||||
|
||||
" While searching though a file incrementally highlight matching characters as you type.
|
||||
set incsearch
|
||||
|
||||
" Ignore capital letters during search.
|
||||
set ignorecase
|
||||
|
||||
" Override the ignorecase option if searching for capital letters.
|
||||
" This will allow you to search specifically for capital letters.
|
||||
set smartcase
|
||||
|
||||
" Show partial command you type in the last line of the screen.
|
||||
set showcmd
|
||||
|
||||
" Show the mode you are on the last line.
|
||||
set showmode
|
||||
|
||||
" Show matching words during a search.
|
||||
set showmatch
|
||||
|
||||
" Use highlighting when doing a search.
|
||||
set hlsearch
|
||||
|
||||
" Set the commands to save in history default number is 20.
|
||||
set history=1000
|
||||
126
Arch/.bashrc
126
Arch/.bashrc
@@ -1,126 +0,0 @@
|
||||
#
|
||||
# ~/.bashrc
|
||||
#
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
alias ls='ls --color=auto'
|
||||
PS1='[\u@\h \W]\$ '
|
||||
|
||||
alias ~='cd ~/'
|
||||
alias nano='vim'
|
||||
alias trans='rsync -Pve ssh'
|
||||
alias update='yay -Syu --noconfirm'
|
||||
alias inst='yay --noconfirm -S'
|
||||
alias burn='yay -Rns'
|
||||
alias ls='ls --color=auto'
|
||||
alias pacs='yay -Ss'
|
||||
alias svim='sudo -E vim'
|
||||
alias vi='vim'
|
||||
alias h='history'
|
||||
alias mux='tmux new -s main'
|
||||
alias supd='sudo pacman -Syyuu'
|
||||
alias ncdu='ncdu --color dark'
|
||||
alias bigclock='watch -t -n 1 "date '+%D%n%I:%M:%S' | figlet -k"|lolcat'
|
||||
alias gitview='git log --graph --full-history --all --color --pretty=tformat:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s%x20%x1b[33m(%an)%x1b[0m"'
|
||||
alias cheat='/usr/bin/cheat'
|
||||
alias weather='curl wttr.in'
|
||||
alias whatthecom='git commit -am "$(whatcom)"'
|
||||
alias null='/dev/null'
|
||||
alias q='exit'
|
||||
alias lsa='ls -a'
|
||||
alias ....='cd ../../..;'
|
||||
alias ...='cd ../..'
|
||||
alias ..='cd ..'
|
||||
alias ll='ls -AlhGrti'
|
||||
alias ESC='cd ~/LocalGit/ESC618'
|
||||
alias ta='tmux -2 a -t'
|
||||
alias tn='tmux -2 new -s'
|
||||
alias tm='tmux -2 attach-session || tmux -2 new-session'
|
||||
alias nord='nordvpn connect'
|
||||
alias nordd='nordvpn disconnect'
|
||||
alias fucking='sudo'
|
||||
alias please='sudo'
|
||||
alias fuck='pkill -9'
|
||||
alias mirrorupdate='curl -s "https://www.archlinux.org/mirrorlist/?country=US&protocol=https&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 5 - | sudo tee /etc/pacman.d/mirrorlist'
|
||||
alias bashrc='source ~/.bashrc'
|
||||
|
||||
export PATH=$PATH:~/scripts:/usr/local/go/bin
|
||||
export npm_config_prefix=~/.node_modules
|
||||
export EDITOR='vim'
|
||||
export VISUAL='vim'
|
||||
|
||||
tempdrive () {
|
||||
if [ -z $@ ]
|
||||
then
|
||||
echo "Please provide a disk size in Mb."
|
||||
else
|
||||
sudo mount -t tmpfs tmpfs /mnt/RAM -o size=$@m; echo "$@M Disk created in RAM"
|
||||
fi
|
||||
}
|
||||
|
||||
cd () {
|
||||
builtin cd "$@" && ls -a
|
||||
}
|
||||
|
||||
bk () {
|
||||
if [ -z $1 ]
|
||||
then
|
||||
echo "Type a filename, dumbass"
|
||||
else
|
||||
cp $1{,.bak}
|
||||
fi
|
||||
}
|
||||
|
||||
md () {
|
||||
mkdir -p "$@" && cd "$@";
|
||||
}
|
||||
|
||||
function whatcom() {
|
||||
curl --silent --fail https://whatthecommit.com/index.txt
|
||||
}
|
||||
|
||||
teatimer() {
|
||||
sleep $1;
|
||||
mplayer "$HOME/Music/Tornado.mp3" & notify-send 'YOUR TEA IS READY OH FUCK';
|
||||
curl -X POST "https://api.lifx.com/v1/lights/group_id:58da90e73566e43f037c7b6d59e56d24/effects/pulse" -H "Authorization: Bearer cfbc4b9dd981f5d99d486d22cb75a44535a8e616b9315580cac4ff5d5147ed86" -d 'period=1' -d 'cycles=4' -d 'color='$2;
|
||||
fg
|
||||
exit
|
||||
}
|
||||
|
||||
mksketch(){
|
||||
mkdir "$1";
|
||||
if [ "$2" = 'adr' ]
|
||||
then
|
||||
cp "$HOME/skeletons/adr.ino" "$1/$1.ino"
|
||||
elif [ "$2" = "web" ]
|
||||
then
|
||||
cp "$HOME/skeletons/webserv.ino" "$1/$1.ino"
|
||||
else
|
||||
cp "$HOME/skeletons/basic.ino" "$1/$1.ino"
|
||||
fi
|
||||
vim "$1/$1.ino"
|
||||
}
|
||||
bigtext(){
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
curl --silent --fail curl 'artii.herokuapp.com/make?text='FUCK+IT'&font='univers''
|
||||
else
|
||||
printf "$1\n"
|
||||
curl --silent --fail curl 'artii.herokuapp.com/make?text='$1'&font='univers''
|
||||
fi
|
||||
}
|
||||
|
||||
branchdelete(){
|
||||
git branch -d $1
|
||||
git push --delete origin $1
|
||||
echo There you go;
|
||||
}
|
||||
|
||||
updateconfigs (){
|
||||
cd ~/GIT/configs
|
||||
whatthecom
|
||||
git push origin master
|
||||
cd ~
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
set-option -g activity-action other
|
||||
set-option -g assume-paste-time 1
|
||||
set-option -g base-index 0
|
||||
set-option -g bell-action any
|
||||
set-option -g default-command ""
|
||||
set-option -g default-shell "/bin/bash"
|
||||
set-option -g destroy-unattached off
|
||||
set-option -g detach-on-destroy on
|
||||
set-option -g display-panes-active-colour red
|
||||
set-option -g display-panes-colour blue
|
||||
set-option -g display-panes-time 1000
|
||||
set-option -g display-time 750
|
||||
set-option -g history-limit 2000
|
||||
set-option -g key-table "root"
|
||||
set-option -g lock-after-time 0
|
||||
set-option -g lock-command "lock -np"
|
||||
set-option -g message-command-style fg=yellow,bg=black
|
||||
set-option -g message-style fg=black,bg=yellow
|
||||
set-option -g mouse off
|
||||
set-option -g prefix C-b
|
||||
set-option -g prefix2 None
|
||||
set-option -g renumber-windows off
|
||||
set-option -g repeat-time 500
|
||||
set-option -g set-titles off
|
||||
set-option -g set-titles-string "#S:#I:#W - \"#T\" #{session_alerts}"
|
||||
set-option -g silence-action other
|
||||
set-option -g status on
|
||||
set-option -g status-interval 15
|
||||
set-option -g status-justify left
|
||||
set-option -g status-keys vi
|
||||
set-option -g status-left "[#S] "
|
||||
set-option -g status-left-length 10
|
||||
set-option -g status-left-style default
|
||||
set-option -g status-position bottom
|
||||
set-option -g status-right " \"#{=21:pane_title}\" %H:%M %d-%b-%y"
|
||||
set-option -g status-right-length 40
|
||||
set-option -g status-right-style default
|
||||
set-option -g status-style fg=black,bg=green
|
||||
set-option -g update-environment[0] "DISPLAY"
|
||||
set-option -g update-environment[1] "SSH_ASKPASS"
|
||||
set-option -g update-environment[2] "SSH_AUTH_SOCK"
|
||||
set-option -g update-environment[3] "SSH_AGENT_PID"
|
||||
set-option -g update-environment[4] "SSH_CONNECTION"
|
||||
set-option -g update-environment[5] "WINDOWID"
|
||||
set-option -g update-environment[6] "XAUTHORITY"
|
||||
set-option -g visual-activity off
|
||||
set-option -g visual-bell off
|
||||
set-option -g visual-silence off
|
||||
set-option -g word-separators " -_@"
|
||||
|
||||
# Set prefix to Ctrl-Space
|
||||
unbind C-b
|
||||
set -g prefix C-Space
|
||||
bind Space send-prefix
|
||||
|
||||
# split panes using | and -
|
||||
bind | split-window -h
|
||||
bind - split-window -v
|
||||
unbind '"'
|
||||
unbind %
|
||||
|
||||
# switch panes using Alt-arrow without prefix
|
||||
bind -n M-Left select-pane -L
|
||||
bind -n M-Right select-pane -R
|
||||
bind -n M-Up select-pane -U
|
||||
bind -n M-Down select-pane -D
|
||||
37
Arch/.vimrc
37
Arch/.vimrc
@@ -1,37 +0,0 @@
|
||||
let mapleader = "-"
|
||||
inoremap kj <Esc>
|
||||
nnoremap <left> <C-W>h
|
||||
nnoremap <right> <C-W>l
|
||||
nnoremap <up> <C-W>k
|
||||
nnoremap <down> <C-W>j
|
||||
map <F1> :bprevious<CR>
|
||||
map <F2> :bnext<CR>
|
||||
map <F3> :vertical resize -5<CR>
|
||||
map <F4> :vertical resize +5<CR>
|
||||
map <F5> :se fdm=manual<CR>
|
||||
map <F6> :se nofoldenable<CR>
|
||||
set foldmethod=manual
|
||||
set rnu
|
||||
set autoread
|
||||
set nowrap
|
||||
set shiftwidth=2
|
||||
set shiftround
|
||||
set showmatch
|
||||
set ignorecase
|
||||
set smarttab
|
||||
set incsearch
|
||||
set history=1000
|
||||
set undolevels=1000
|
||||
set visualbell
|
||||
set title
|
||||
set expandtab
|
||||
set autoindent
|
||||
set hlsearch
|
||||
set tabstop=2
|
||||
colo ron
|
||||
syntax on
|
||||
set shiftround
|
||||
|
||||
au CursorHoldI * stopinsert
|
||||
au InsertEnter * let updaterestore=&updatetime | set updatetime=7000
|
||||
au InsertLeave * let &updatetime=updaterestore
|
||||
115
RPi/.bashrc
115
RPi/.bashrc
@@ -1,115 +0,0 @@
|
||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||
# for examples
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=1000
|
||||
HISTFILESIZE=2000
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# If set, the pattern "**" used in a pathname expansion context will
|
||||
# match all files and zero or more directories and subdirectories.
|
||||
#shopt -s globstar
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
# set variable identifying the chroot you work in (used in the prompt below)
|
||||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||
debian_chroot=$(cat /etc/debian_chroot)
|
||||
fi
|
||||
|
||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||
case "$TERM" in
|
||||
xterm-color|*-256color) color_prompt=yes;;
|
||||
esac
|
||||
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
# off by default to not distract the user: the focus in a terminal window
|
||||
# should be on the output of commands, not on the prompt
|
||||
force_color_prompt=yes
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \$\[\033[00m\] '
|
||||
else
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
alias update='sudo apt-get update && sudo apt-get upgrade -y'
|
||||
alias svim='sudo vim'
|
||||
fi
|
||||
|
||||
# colored GCC warnings and errors
|
||||
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||
|
||||
# some more ls aliases
|
||||
#alias ll='ls -l'
|
||||
#alias la='ls -A'
|
||||
#alias l='ls -CF'
|
||||
|
||||
# Alias definitions.
|
||||
# You may want to put all your additions into a separate file like
|
||||
# ~/.bash_aliases, instead of adding them here directly.
|
||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
. ~/.bash_aliases
|
||||
fi
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if ! shopt -oq posix; then
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
61
alpine/answer.cfg
Executable file
61
alpine/answer.cfg
Executable file
@@ -0,0 +1,61 @@
|
||||
# Example answer file for setup-alpine script
|
||||
# If you don't want to use a certain option, then comment it out
|
||||
|
||||
# Use US layout with US variant
|
||||
# KEYMAPOPTS="us us"
|
||||
KEYMAPOPTS="us us"
|
||||
|
||||
# Set hostname to 'alpine'
|
||||
HOSTNAMEOPTS="burner"
|
||||
|
||||
# Set device manager to mdev
|
||||
DEVDOPTS=mdev
|
||||
|
||||
# Contents of /etc/network/interfaces
|
||||
INTERFACESOPTS="auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
auto eth0
|
||||
iface eth0 inet dhcp
|
||||
hostname burner
|
||||
"
|
||||
|
||||
# Search domain of example.com, Google public nameserver
|
||||
# DNSOPTS="-d example.com 8.8.8.8"
|
||||
|
||||
# Set timezone to UTC
|
||||
#TIMEZONEOPTS="UTC"
|
||||
TIMEZONEOPTS=America/Chicago
|
||||
|
||||
# set http/ftp proxy
|
||||
#PROXYOPTS="http://webproxy:8080"
|
||||
PROXYOPTS=none
|
||||
|
||||
# Add first mirror (CDN)
|
||||
APKREPOSOPTS="-1"
|
||||
|
||||
# Create admin user
|
||||
USEROPTS="-a -u -g audio,video,netdev juser"
|
||||
#USERSSHKEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOIiHcbg/7ytfLFHUNLRgEAubFz/13SwXBOM/05GNZe4 juser@example.com"
|
||||
#USERSSHKEY="https://example.com/juser.keys"
|
||||
|
||||
# Install Openssh
|
||||
SSHDOPTS=openssh
|
||||
#ROOTSSHKEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOIiHcbg/7ytfLFHUNLRgEAubFz/13SwXBOM/05GNZe4 juser@example.com"
|
||||
#ROOTSSHKEY="https://example.com/juser.keys"
|
||||
|
||||
# Use openntpd
|
||||
# NTPOPTS="openntpd"
|
||||
NTPOPTS=chronyd
|
||||
|
||||
# Use /dev/sda as a sys disk
|
||||
DISKOPTS="-m sys /dev/sda"
|
||||
# DISKOPTS=none
|
||||
|
||||
# Setup storage with label APKOVL for config storage
|
||||
#LBUOPTS="LABEL=APKOVL"
|
||||
LBUOPTS=none
|
||||
|
||||
#APKCACHEOPTS="/media/LABEL=APKOVL/cache"
|
||||
APKCACHEOPTS=none
|
||||
|
||||
68
arch/pkglist.txt
Normal file
68
arch/pkglist.txt
Normal file
@@ -0,0 +1,68 @@
|
||||
amd-ucode
|
||||
arp-scan
|
||||
barrier
|
||||
bat
|
||||
btrfs-progs
|
||||
chromium
|
||||
code
|
||||
cronie
|
||||
dd_rescue
|
||||
ddrescue
|
||||
debtap
|
||||
dhcpcd
|
||||
discord
|
||||
dosfstools
|
||||
exfat-utils
|
||||
f2fs-tools
|
||||
file-roller
|
||||
firefox
|
||||
flatpak
|
||||
gparted
|
||||
gptfdisk
|
||||
htop
|
||||
intel-ucode
|
||||
jfsutils
|
||||
lightdm-gtk-greeter
|
||||
lsof
|
||||
lzop
|
||||
neofetch
|
||||
network-manager-applet
|
||||
networkmanager
|
||||
nfs-utils
|
||||
nmap
|
||||
nmon
|
||||
notepadqq
|
||||
openssh
|
||||
os-prober
|
||||
p7zip
|
||||
plasma-meta
|
||||
powertop
|
||||
ristretto
|
||||
rsync
|
||||
samba
|
||||
sshfs
|
||||
tailscale
|
||||
thunar
|
||||
thunar-archive-plugin
|
||||
thunar-media-tags-plugin
|
||||
thunar-volman
|
||||
tixati
|
||||
ttf-inconsolata
|
||||
unrar
|
||||
unzip
|
||||
usbutils
|
||||
vim
|
||||
virtualbox
|
||||
virtualbox-host-modules-arch
|
||||
vlc
|
||||
xorg-docs
|
||||
xorg-font-util
|
||||
xorg-fonts-100dpi
|
||||
xorg-fonts-75dpi
|
||||
xorg-fonts-alias-100dpi
|
||||
xorg-fonts-alias-75dpi
|
||||
xorg-fonts-misc
|
||||
xorg-server
|
||||
xorg-xinit
|
||||
xorg-xinput
|
||||
xorg-xrandr
|
||||
16
bashset.sh
Normal file
16
bashset.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
mv ~/.bashrc ~/.bashrc.bak
|
||||
ln -s .bashrc ~/.bashrc
|
||||
ln -s .bash_aliases ~/.bash_aliases
|
||||
touch ~/.bashlocal
|
||||
|
||||
echo "Would you like to intall the contents of the package list in the arch foler? (yes/no)"
|
||||
read answer
|
||||
|
||||
if [ "$answer" == "yes" ] || [ "$answer" == "y" ]; then
|
||||
echo "Fuck yeah"
|
||||
sudo pacman -S --needed $(\cat arch/pkglist.txt)
|
||||
else
|
||||
echo "Exiting the script."
|
||||
exit 0
|
||||
fi
|
||||
135
i3/config
135
i3/config
@@ -19,28 +19,41 @@ font pango:monospace 8
|
||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||
#font pango:DejaVu Sans Mono 8
|
||||
|
||||
# Before i3 v4.8, we used to recommend this one as the default:
|
||||
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
|
||||
# The font above is very space-efficient, that is, it looks good, sharp and
|
||||
# clear in small sizes. However, its unicode glyph coverage is limited, the old
|
||||
# X core fonts rendering does not support right-to-left and this being a bitmap
|
||||
# font, it doesn’t scale on retina/hidpi displays.
|
||||
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
|
||||
# they are included here as an example. Modify as you see fit.
|
||||
|
||||
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
|
||||
# screen before suspend. Use loginctl lock-session to lock your screen.
|
||||
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
|
||||
|
||||
# NetworkManager is the most popular way to manage wireless networks on Linux,
|
||||
# and nm-applet is a desktop environment-independent system tray GUI for it.
|
||||
exec --no-startup-id nm-applet
|
||||
|
||||
# Use pactl to adjust volume in PulseAudio.
|
||||
set $refresh_i3status killall -SIGUSR1 i3status
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
|
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
|
||||
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec terminology
|
||||
bindsym $mod+Return exec terminator
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
bindsym $mod+d exec rofi -show run
|
||||
# There also is the (new) i3-dmenu-desktop which only displays applications
|
||||
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
|
||||
# installed.
|
||||
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
|
||||
#bindsym $mod+d exec --no-startup-id dmenu_run
|
||||
bindsym $mod+d exec --no-startup-id rofi -show run --theme solarized-dark
|
||||
# A more modern dmenu replacement is rofi:
|
||||
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
|
||||
# There also is i3-dmenu-desktop which only displays applications shipping a
|
||||
# .desktop file. It is a wrapper around dmenu, so you need that installed.
|
||||
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
|
||||
|
||||
# change focus
|
||||
bindsym $mod+h focus left
|
||||
@@ -55,10 +68,10 @@ bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Shift+j move left
|
||||
bindsym $mod+Shift+k move down
|
||||
bindsym $mod+Shift+l move up
|
||||
bindsym $mod+Shift+semicolon move right
|
||||
bindsym $mod+Shift+h move left
|
||||
bindsym $mod+Shift+j move down
|
||||
bindsym $mod+Shift+k move up
|
||||
bindsym $mod+Shift+l move right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
@@ -67,7 +80,7 @@ bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+semicolon split h
|
||||
bindsym $mod+0x2d split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+v split v
|
||||
@@ -106,35 +119,35 @@ set $ws9 "9"
|
||||
set $ws10 "10"
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace $ws1
|
||||
bindsym $mod+2 workspace $ws2
|
||||
bindsym $mod+3 workspace $ws3
|
||||
bindsym $mod+4 workspace $ws4
|
||||
bindsym $mod+5 workspace $ws5
|
||||
bindsym $mod+6 workspace $ws6
|
||||
bindsym $mod+7 workspace $ws7
|
||||
bindsym $mod+8 workspace $ws8
|
||||
bindsym $mod+9 workspace $ws9
|
||||
bindsym $mod+0 workspace $ws10
|
||||
bindsym $mod+1 workspace number $ws1
|
||||
bindsym $mod+2 workspace number $ws2
|
||||
bindsym $mod+3 workspace number $ws3
|
||||
bindsym $mod+4 workspace number $ws4
|
||||
bindsym $mod+5 workspace number $ws5
|
||||
bindsym $mod+6 workspace number $ws6
|
||||
bindsym $mod+7 workspace number $ws7
|
||||
bindsym $mod+8 workspace number $ws8
|
||||
bindsym $mod+9 workspace number $ws9
|
||||
bindsym $mod+0 workspace number $ws10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace $ws10
|
||||
bindsym $mod+Shift+1 move container to workspace number $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace number $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace number $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace number $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace number $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace number $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace number $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace number $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace number $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace number $ws10
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
# exit i3 (logs you out of your X session)
|
||||
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
|
||||
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
mode "resize" {
|
||||
@@ -144,10 +157,10 @@ mode "resize" {
|
||||
# Pressing right will grow the window’s width.
|
||||
# Pressing up will shrink the window’s height.
|
||||
# Pressing down will grow the window’s height.
|
||||
bindsym h resize shrink width 3 px or 5 ppt
|
||||
bindsym j resize grow height 3 px or 5 ppt
|
||||
bindsym k resize shrink height 3 px or 5 ppt
|
||||
bindsym l resize grow width 3 px or 5 ppt
|
||||
bindsym h resize shrink width 10 px or 10 ppt
|
||||
bindsym j resize grow height 10 px or 10 ppt
|
||||
bindsym k resize shrink height 10 px or 10 ppt
|
||||
bindsym l resize grow width 10 px or 10 ppt
|
||||
|
||||
# same bindings, but for the arrow keys
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
@@ -162,23 +175,33 @@ mode "resize" {
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
bindsym XF86AudioRaiseVolume exec amixer sset Master 5%+
|
||||
bindsym XF86AudioLowerVolume exec amixer sset Master 5%-
|
||||
bindsym XF86AudioMute exec amixer sset Master toggle
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
bar {
|
||||
status_command i3status
|
||||
mode hide
|
||||
hidden_state hide
|
||||
modifier $mod
|
||||
position top
|
||||
hidden_state hide
|
||||
modifier $mod
|
||||
position top
|
||||
}
|
||||
hide_edge_borders both
|
||||
new_window 1pixel
|
||||
exec_always xinput set-prop "SynPS/2 Synaptics TouchPad" "libinput Tapping Enabled" 1
|
||||
exec_always xinput set-prop "SynPS/2 Synaptics TouchPad" "libinput Natural Scrolling Enabled" 1
|
||||
exec_always feh --randomize --bg-fill /home/brad/walls
|
||||
exec_always nm-applet
|
||||
exec_always sensors-applet
|
||||
exec_always blueman-applet
|
||||
|
||||
# input settings
|
||||
exec_always xinput set-prop "ETPS/2 Elantech Touchpad" "libinput Natural Scrolling Enabled" 1
|
||||
exec_always xinput set-prop "ETPS/2 Elantech Touchpad" "libinput Tapping Enabled" 1
|
||||
bindsym 0x1008ff02 exec brightnessctl s +25
|
||||
bindsym 0x1008ff03 exec brightnessctl s 25-
|
||||
|
||||
# window shit
|
||||
default_border none
|
||||
|
||||
# Startup Executions
|
||||
|
||||
exec_always xinput set-prop "Atmel Atmel maXTouch Digitizer" "Device Enabled" 0
|
||||
exec --no-startup-id blueman-applet
|
||||
exec_always --no-startup-id nm-applet
|
||||
exec_always --no-startup-id parcellite
|
||||
exec_always --no-startup-id volumeicon
|
||||
exec --no-startup-id nextcloud
|
||||
exec --no-startup-id barrier
|
||||
exec_always --no-startup-id feh --bg-scale /home/brad/wall.png
|
||||
|
||||
37
transcribe.sh
Executable file
37
transcribe.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if an argument was passed
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
echo "Usage: $0 <audio file>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if the audio file exists
|
||||
if [ ! -f "$1" ]
|
||||
then
|
||||
echo "Error: File '$1' does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get the current date and time
|
||||
datetime=$(date +"%Y%m%d-%H%M%S")
|
||||
|
||||
# Determine the file extension
|
||||
extension="${1##*.}"
|
||||
|
||||
# Convert the audio file to text using Whisper
|
||||
response=$(curl -s \
|
||||
-H "Authorization: Bearer ${OPENAI_API_KEY}" \
|
||||
-F "file=@$1" \
|
||||
-F "model=whisper-1" \
|
||||
-F "response_format=json" \
|
||||
https://api.openai.com/v1/audio/transcriptions)
|
||||
|
||||
# Extract the text from the response
|
||||
text=$(echo "$response" | jq -r '.text')
|
||||
|
||||
# Save the text to a file with a unique filename based on the date
|
||||
echo "$text" > "${datetime}.${extension}.txt"
|
||||
echo "Transcription saved to ${datetime}.${extension}.txt"
|
||||
|
||||
Reference in New Issue
Block a user