more cool stuff

This commit is contained in:
nold 2024-06-09 21:21:03 +02:00
parent 062dfd1f7e
commit 9258e0e213
7 changed files with 26 additions and 2 deletions

2
.gitignore vendored
View file

@ -1,3 +1,5 @@
*.swp *.swp
*.pyc *.pyc
/hosts/lb* /hosts/lb*
package.json
package-lock.json

3
bashrc
View file

@ -79,6 +79,9 @@ function json2yaml {
# Aliases # Aliases
alias ls="ls --color=always --time-style=long-iso -F" alias ls="ls --color=always --time-style=long-iso -F"
type lsd &>/dev/null && alias ls=lsd
alias ll="ls -ltrh"
alias lt="lsd -ltrh --tree --depth 3"
alias dfh="df -hT -t ext4 -t zfs -t xfs" alias dfh="df -hT -t ext4 -t zfs -t xfs"
alias lsof='lsof 2>/dev/null | grep' alias lsof='lsof 2>/dev/null | grep'
alias winekiller="ps -ef | grep 'fusion|wine|\.exe' -E -i | awk '{ print \$2}' | xargs kill -9" alias winekiller="ps -ef | grep 'fusion|wine|\.exe' -E -i | awk '{ print \$2}' | xargs kill -9"

View file

@ -14,11 +14,17 @@ function create_venv {
} }
function venv { function venv {
if [ -z "$1" ] ; then
ls -1 "${VENV_BASE}" | sed 's/^/\ \-\ /g'
return
fi
case "$1" in case "$1" in
l) ls -1 "${VENV_BASE}" | sed 's/^/\ \-\ /g' ;; l) ls -1 "${VENV_BASE}" | sed 's/^/\ \-\ /g' ;;
c) create_venv $2 ; shift ;; c) create_venv $2 ; shift ;;
s) create_venv $2 ; shift ; source "${VENV_BASE}/$1/bin/activate" ;; d) rm -rf "${VENV_BASE}/$2" ;;
*) source "${VENV_BASE}/$1/bin/activate" ;; s) create_venv "$1" ; shift ; source "${VENV_BASE}/$1/bin/activate" ;;
*) create_venv "$1" ; source "${VENV_BASE}/$1/bin/activate" ;;
esac esac
if [ -n "$1" ] ; then if [ -n "$1" ] ; then

View file

@ -46,6 +46,7 @@
prompt = false prompt = false
[safe] [safe]
directory = /home/nold/git/armbian-build directory = /home/nold/git/armbian-build
directory = /home/nold/git/dotfiles
[filter "lfs"] [filter "lfs"]
clean = git-lfs clean -- %f clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f smudge = git-lfs smudge -- %f

2
npm-packages.txt Normal file
View file

@ -0,0 +1,2 @@
yaml-language-server
bash-language-server

View file

@ -1,2 +1,3 @@
powerline-status powerline-status
powerline-gitstatus powerline-gitstatus
python-lsp-server

View file

@ -99,6 +99,15 @@ git-sync https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
mkdir -p ~/.fonts/ mkdir -p ~/.fonts/
cp fonts/* ~/.fonts/ cp fonts/* ~/.fonts/
# LSP Server
if type go &>/dev/null ; then
go install golang.org/x/tools/gopls@latest
fi
if type npm &>/dev/null ; then
xargs -a npm-packages.txt npm install
fi
# Inject bashrc sourcing # Inject bashrc sourcing
grep -qE "^source.*$(pwd)/bashrc" ~/.bashrc || echo "source $(pwd)/bashrc" >> ~/.bashrc grep -qE "^source.*$(pwd)/bashrc" ~/.bashrc || echo "source $(pwd)/bashrc" >> ~/.bashrc