diff --git a/configDots/alacritty/active_colourscheme.yml b/configDots/alacritty/active_colourscheme.yml index ab8c348..199bea3 120000 --- a/configDots/alacritty/active_colourscheme.yml +++ b/configDots/alacritty/active_colourscheme.yml @@ -1 +1 @@ -ayu-light.colourscheme \ No newline at end of file +sourcerer.colourscheme \ No newline at end of file diff --git a/simpleDots/bin/p b/simpleDots/bin/p new file mode 100755 index 0000000..79764a4 --- /dev/null +++ b/simpleDots/bin/p @@ -0,0 +1,14 @@ +#!/bin/bash + +## A wrapper for pass to use fzf to find passwords. + +prefix=${PASSWORD_STORE_DIR-~/.password-store} +password_files=( "$prefix"/**/*.gpg ) +password_files=( "${password_files[@]#"$prefix"/}" ) +password_files=( "${password_files[@]%.gpg}" ) + +password=$(printf '%s\n' "${password_files[@]}" | fzf "$@") + +[[ -n $password ]] || exit + +pass show -c "$password" 2>/dev/null diff --git a/simpleDots/bin/reconnectfritzbox.sh b/simpleDots/bin/reconnectfritzbox.sh index 4e58173..07646ed 100755 --- a/simpleDots/bin/reconnectfritzbox.sh +++ b/simpleDots/bin/reconnectfritzbox.sh @@ -2,7 +2,7 @@ # Reconnect a Fritz.Box with activated UPnP -oldIp=$(curl -s https://canihazip.com/s) +oldIp=$(curl -s https://v4.ident.me) curl "http://fritz.box:49000/igdupnp/control/WANIPConn1" \ -H 'Content-Type: text/xml; charset="utf-8"' \ @@ -19,7 +19,7 @@ curl "http://fritz.box:49000/igdupnp/control/WANIPConn1" \ sleep 5 -newIp=$(curl -s https://canihazip.com/s) +newIp=$(curl -s https://v4.ident.me) notify-send "Renew IP" "Old IP: $oldIp\nNew IP: $newIp" diff --git a/simpleDots/bin/sanitize_files.sh b/simpleDots/bin/sanitize_files.sh new file mode 100755 index 0000000..d9ed410 --- /dev/null +++ b/simpleDots/bin/sanitize_files.sh @@ -0,0 +1,19 @@ +#! /bin/bash + +sanitize() { + shopt -s extglob; + + filename=$(basename "$1") + directory=$(dirname "$1") + + #filename_clean="${filename//+([^[:alnum:]_-\.])/_}" + filename_clean=$(echo -n $filename | tr --complement --squeeze-repeats "[:alnum:]./" "_") + + if (test "$filename" != "$filename_clean") + then + mv -v --backup=numbered "$1" "$directory/$filename_clean" + fi +} + +export -f sanitize +find $1 -depth -exec bash -c 'sanitize "$0"' {} \; diff --git a/simpleDots/functions b/simpleDots/functions index c9e2533..4630e5b 100644 --- a/simpleDots/functions +++ b/simpleDots/functions @@ -415,7 +415,7 @@ k-sel(){ } k-ns(){ - kubectl config set-context + kubectl config set-context \ --current \ --namespace=$(kubectl get namespace | grep Active \ | cut -d " " -f1 \ diff --git a/simpleDots/i3/config b/simpleDots/i3/config index ab3eeaa..18ac116 100644 --- a/simpleDots/i3/config +++ b/simpleDots/i3/config @@ -248,7 +248,7 @@ bindsym $mod+$alt+n exec ~/.bin/startAltBrowserPrivat.sh bindsym $mod+m exec ~/.bin/dmenu_dir2menu.sh ~/.screenlayout/ # Get current public IP or restart a fritz.box connection -bindsym $mod+i exec --no-startup-id notify-send "Public IPv4 address" "$(curl --silent https://ident.me)" +bindsym $mod+i exec --no-startup-id notify-send "Public IPv4 address" "$(curl --silent https://v4.ident.me)" bindsym $mod+Shift+i exec --no-startup-id "~/.bin/reconnectfritzbox.sh" # Get current uptime diff --git a/simpleDots/vim/vimrc b/simpleDots/vim/vimrc index cfe800d..9d7bc0c 100755 --- a/simpleDots/vim/vimrc +++ b/simpleDots/vim/vimrc @@ -163,6 +163,7 @@ set shiftround set smarttab au BufNewFile,BufRead *.vim setlocal noet ts=4 sw=4 sts=4 +au BufNewFile,BufRead *.ino setlocal noet ts=4 sw=4 sts=4 au BufNewFile,BufRead *.txt setlocal noet ts=4 sw=4 sts=4 au BufNewFile,BufRead *.md setlocal noet ts=4 sw=4 sts=4 au BufNewFile,BufRead *.json setlocal et ts=2 sw=2 sts=2