Compare commits

...

2 Commits

14 changed files with 74 additions and 11 deletions

View File

@ -77,8 +77,8 @@ export USER42='tischmid'
export EMAIL42='timo42@proton.me'
export MAIL='timo42@proton.me'
export LANG='en_US.UTF-8'
export LC_ALL='en_US.UTF-8'
# export LANG='en_US.UTF-8'
# export LC_ALL='en_US.UTF-8'
export GOPATH="${HOME}"/go

24
.bashrc
View File

@ -8,7 +8,7 @@
IFS="
"
POSIXLY_CORRECT='1'
declare -a __COMMANDS=(builtin unalias unset read printf command exit type tr fc compgen wc sed grep xargs sudo shopt kill ps head awk clear curl wget source check mv mkdir rm rmdir while do done cc gcc clang basename clone42 git alias export pwd docker shift until for in bash sh dash ash ksh zsh top shellcheck watch cmatrix alacritty tmux zellij ssh which date df du case esac crontab ping base64 apt paru pacman yum dnf aptitude yay rpm dpkg env awk apropos help info dirname bc dc break continue unzip zip tar untar gzip gunzip xz unxz base32 cal chattr cfdisk fdisk passwd chroot cmp cron split dd df dir declare diff dircolors dmesg eval complete exec egrep false true fg bg free fold find file gawk groupadd less more cat head tail chmod chown history trap sleep yes useradd adduser addgroup usermod groupdel userdel xxd groups users who w last hash hostname htop ip ifconfig install ifdown ifup jobs killall pkill pgrep klist link ln unlink let local logout logname lsblk lsof pidof lspci lsusb lscpu make mktemp mount umount nc ncat nmap nft iptables ufw nl nslookup open whereis whatis write wall agetty amixer pulsemixer ar cmake bzip2 ccrypt chvt column chsh ex od pushd popd pv pvs lvs vgs rsync screen sed seq wait ftp sftp shift shuf sort uniq su strace sync tee test time trap tr tty ulimit umask unix2dos dos2unix uptime paco francinette cd ls disown whoami reboot systemctl shutdown poweroff set x touch stat cp scp man locate xset kbdrate return cut batcat id ed vi vim nvim nano skill norminette bat echo if then fi else function PROMPT_COMMAND PS0 PS1 PS2 PS3 PS4 tabs xmodmap lesspipe CDPATH dotconf)
declare -a __COMMANDS=(builtin unalias unset read printf command exit type tr fc compgen wc sed grep xargs sudo shopt kill ps head awk clear curl wget source check mv mkdir rm rmdir while do done cc gcc clang basename clone42 git alias export pwd docker shift until for in bash sh dash ash ksh zsh top shellcheck watch cmatrix alacritty tmux zellij ssh which date df du case esac crontab ping base64 apt paru pacman yum dnf aptitude yay rpm dpkg env awk apropos help info dirname bc dc break continue unzip zip tar untar gzip gunzip xz unxz base32 cal chattr cfdisk fdisk passwd chroot cmp cron split dd df dir declare diff dircolors dmesg eval complete exec egrep false true fg bg free fold find file gawk groupadd less more cat head tail chmod chown history trap sleep yes useradd adduser addgroup usermod groupdel userdel xxd groups users who w last hash hostname htop ip ifconfig install ifdown ifup jobs killall pkill pgrep klist link ln unlink let local logout logname lsblk lsof pidof lspci lsusb lscpu make mktemp mount umount nc ncat nmap nft iptables ufw nl nslookup open whereis whatis write wall agetty amixer pulsemixer ar cmake bzip2 ccrypt chvt column chsh ex od pushd popd pv pvs lvs vgs rsync screen sed seq wait ftp sftp shift shuf sort uniq su strace sync tee test time trap tr tty ulimit umask unix2dos dos2unix uptime paco francinette cd ls disown whoami reboot systemctl shutdown poweroff set x touch stat cp scp man locate xset kbdrate return cut batcat id ed vi vim nvim nano skill norminette bat echo if then fi else function PROMPT_COMMAND PS0 PS1 PS2 PS3 PS4 tabs xmodmap lesspipe CDPATH dotconf pomo)
declare -a __ALL_COMMANDS=("${__COMMANDS[@]}" . : g++ firewall-cmd apt-get xdg-open) # commands that are not alnum
# shellcheck disable=SC2086
2>/dev/null \unset -f -- "${__ALL_COMMANDS[@]}" || true
@ -104,7 +104,6 @@ alias q='docker run --rm -it ghcr.io/natesales/q'
alias make='compiledb make'
alias dotconf='git --git-dir="${HOME-}"/.dotfiles/ --work-tree="${HOME-}"'
#################### CDPATHS #############################
CDPATH="${CDPATH}:${HOME}"
CDPATH="${CDPATH}:${HOME}/projects"
@ -124,6 +123,12 @@ function cd () {
1>/dev/null pushd "${pwd}" || return 1
}
function vimw () {
[ $# = 1 ] || { echo "Usage: vimw FILE"; return 1; }
vim $(type -P "$1")
}
complete -F _command vimw
function paruuu () {
read -p 'Do system upgrade (Y) or exit (n)' choice
if [ ! "${choice}" = "y" -a ! "${choice}" = "Y" -a -n "${choice}" ]; then
@ -190,12 +195,15 @@ function skill () {
if [ -n "${1-}" ] ; then
# shellcheck disable=SC2046,SC2009
2>/dev/null kill -9 \
-- $(ps auxww | grep "${1-}" | grep -v grep | awk '{print $2}') \
-- $(ps auxww | grep -v grep | grep "${1-}" | awk '{print $2}') \
&& return 0
ps auxww | grep -v grep | grep -q "${1-}" || { echo "Process not found"; return 2; }
2>/dev/null sudo kill -9 \
-- $(ps auxww | grep "${1-}" | grep -v grep | awk '{print $2}')
-- $(ps auxww | grep "${1-}" | grep -v grep | awk '{print $2}') ||
{ echo "Couldn't kill process"; return 3; }
else
echo 'Please provide one argument'
return 1;
fi
}
@ -205,8 +213,8 @@ function wpa_restart () {
}
function bat () {
2>/dev/null command -v batcat && { $(type -P batcat) "${@}"; return 0; }
2>/dev/null command -v bat && { $(type -P bat) "${@}"; return 0; }
2>/dev/null 1>&2 command -v batcat && { $(type -P batcat) "${@}"; return 0; }
2>/dev/null 1>&2 command -v bat && { $(type -P bat) "${@}"; return 0; }
$(type -P cat) "${@}"
}
@ -512,3 +520,7 @@ set -o emacs
# shellcheck disable=SC1091
if [ -f "${HOME}"/.userbashrc ]; then . "${HOME}"/.userbashrc; fi
# PS1='[${SHLVL}] '"${PS1}"
# export BAT_THEME='gruvbox-light'

View File

@ -30,11 +30,14 @@ white = "#abb2bf"
yellow = "#da8548"
[colors.primary]
background = "#282c34"
foreground = "#bbc2cf"
# outside
# foreground = "#000000"
# background = "#ffffff"
# inside
background = "#282c34"
foreground = "#bbc2cf"
[colors.selection]
background = "#3e4451"
text = "CellForeground"

View File

@ -1,6 +1,8 @@
function ColorMyPencils(color)
color = color or "rose-pine"
vim.cmd.colorscheme(color)
vim.opt.background = "dark"
-- vim.opt.background = "light"
-- vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
-- vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })

View File

@ -22,7 +22,7 @@ vim.opt.backup = false
vim.opt.undodir = os.getenv('HOME') .. '/.vim/undodir'
vim.opt.undofile = true
vim.opt.hlsearch = false
vim.opt.hlsearch = true
vim.opt.incsearch = true
vim.opt.termguicolors = true

2
.local/bin/dp1_mirror Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output eDP-1 --auto --output DP-1 --same-as eDP-1 --auto

2
.local/bin/dp1_only Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output DP-1 --auto --output eDP-1 --off

2
.local/bin/dp1_right Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output eDP-1 --auto --output DP-1 --right-of eDP-1 --auto

2
.local/bin/edp1_only Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output eDP-1 --auto --output HDMI-1 --off --output DP-1 --off

2
.local/bin/hdmi1_mirror Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output eDP-1 --auto --output HDMI-1 --same-as eDP-1 --auto

2
.local/bin/hdmi1_only Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output HDMI-1 --auto --output eDP-1 --off

2
.local/bin/hdmi1_right Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output eDP-1 --auto --output HDMI-1 --right-of eDP-1 --auto

27
.local/bin/pub Executable file
View File

@ -0,0 +1,27 @@
#!/bin/sh
err () {
printf '\033[31m%s\033[m\n' "$*"
}
# mia's 0x0.st -- fast!
curl -sfSL -F"file=@${1:--}" 0x0.st && exit 0
err "Mia's (0x0.st) pastebin failed!"
# pb1n.de -- fast!
curl -sfSL -F"f=@${1:--}" pb1n.de && exit 0
err "pb1n.de pastebin failed!"
# chris titus' hastebin -- not that fast
response="$(curl -sfSL --data-binary @"${1:--}" bin.christitus.com/documents)" &&
{ hasteKey="$(printf %s "$response" | jq -r '.key')" && [ -n "${hasteKey}" ] &&
echo "http://bin.christitus.com/raw/$hasteKey" && exit 0 || err "Couldn't extract hasteKey. Sorry!"; }
err "Chris' pastebin failed!"
# paste.rs -- damn slow
curl -sfSL --data-binary @"${1:--}" paste.rs && exit 0
err "paste.rs pastebin failed!"
# ix.io, broken
curl -sfSL -F"f=@${1:--}" pb1n.de && exit 0
err "ix.io pastebin failed!"

5
.local/bin/qr Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
[ -t 1 ] &&
qrencode -m2 -t ANSI256UTF8 "$@" ||
qrencode -m2 -t UTF8 "$@"