New backup 2026-02-18 08:07:45
This commit is contained in:
parent
a0ddd01aa6
commit
6d11f1d651
1 changed files with 69 additions and 38 deletions
|
|
@ -50,6 +50,27 @@ devpod-arm(){
|
|||
podman container start debian-sid-arm-dev
|
||||
podman exec --env POD_PATH=$(pwd | sed "s|${HOME}|/root|") -it debian-sid-arm-dev /bin/bash
|
||||
}
|
||||
#db-create(){
|
||||
# if [ -z ${1} ] {
|
||||
# distro_array=()
|
||||
# while read distro;do
|
||||
# distro_array+=("${distro}" "${distro}")
|
||||
# done
|
||||
# if [[ ${#distro_array[@]} -eq 0 ]];then
|
||||
# "no matching distros found"
|
||||
# fi
|
||||
# dialog --no-tags --menu 'select an image' 0 0 0
|
||||
# }
|
||||
# if distrobox create --image
|
||||
#}
|
||||
#db-enter(){
|
||||
# if [ -z ${1} ] {
|
||||
# printf "no container name provided\nUSAGE:\n db-enter [container_name]\nAvailable containers:\n"
|
||||
# distrobox ls | awk '{print $3}' | tail -n +2 | sed 's/^/- /'
|
||||
# return 1
|
||||
# }
|
||||
# distrobox enter --additional-flags "--env DB_PATH=${PWD}" ${1}
|
||||
#}
|
||||
simplewebserver() {
|
||||
if [ "${1}" = "-n" ]; then
|
||||
screen bash -c "printf 'running [ /usr/bin/python3 -m http.server ] in screen...\nTo run with server-side includes, remove -n\n';/usr/bin/python3 -m http.server"
|
||||
|
|
@ -68,12 +89,24 @@ filecount-monitor(){
|
|||
pwatch() {
|
||||
local firstArg=$1
|
||||
if [ $(type -t $firstArg) = function ]; then
|
||||
shift && while true;do clear -x;command bash -c "$(declare -f $firstArg);$firstArg $*";sleep 2;done
|
||||
shift && while true; do
|
||||
clear -x
|
||||
command bash -c "$(declare -f $firstArg);$firstArg $*"
|
||||
sleep 2
|
||||
done
|
||||
elif [ $(type -t $firstArg) = alias ]; then
|
||||
# alias sudo='\sudo '
|
||||
while true;do clear -x;eval "$@";sleep 2;done
|
||||
while true; do
|
||||
clear -x
|
||||
eval "$@"
|
||||
sleep 2
|
||||
done
|
||||
else
|
||||
while true;do clear -x;command "$@";sleep 2;done
|
||||
while true; do
|
||||
clear -x
|
||||
command "$@"
|
||||
sleep 2
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
@ -203,7 +236,6 @@ eval "$(pyenv init - bash 2>/dev/null)"
|
|||
#PS1='\[\e[1m\e[95m\]${prompt_prefix}\[\e[m\]${debian_chroot:+($debian_chroot)}\[\e[01;32m\] \u ${TPUT_RED}\[\e[00m\] \[\e[01;34m\]$(pwd|sed "s|${HOME}|~|"|perl -pe "s/(?<!(^~))(\\/.*)(?=\\/.*\\/)/\\/…/s")\[\e[00m\]\n\$ '
|
||||
#PS1='\[\e[1m\e[95m\]${prompt_prefix}\[\e[m\]${debian_chroot:+($debian_chroot)}\[\e[01;32m\]\u@\h\[\e[00m\]:\[\e[01;34m\]$(pwd|sed "s|${HOME}|~|"|perl -pe "s/(?<!(^~))(\\/.*)(?=\\/.*\\/)/\\/…/s"|xargs printf "\\e]2;%s — Alacritty\007")\[\e[00m\]\n\$ '
|
||||
|
||||
|
||||
#Alacritty custom window title
|
||||
if [ "$TERM" = alacritty ]; then
|
||||
PROMPT_COMMAND='pwd|sed "s|${HOME}|~|"|perl -pe "s/(?<!(^~))(\/.*)(?=\/.*\/)/\/…/s"|xargs printf "\e]2;%s — Alacritty\007"'
|
||||
|
|
@ -215,4 +247,3 @@ eval "$(starship init bash)"
|
|||
#set show-all-if-ambiguous on
|
||||
bind 'set show-all-if-ambiguous on'
|
||||
bind 'set completion-ignore-case on'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue