Compare commits

..

21 Commits

Author SHA1 Message Date
58bfcd5a02 Fixed lazyloading of git completion 2025-08-29 15:23:55 +02:00
ddcc6ccd55 histroy configuration 2025-08-29 14:00:13 +02:00
884e8260b7 Removed redundant sourcing of PS1 2025-08-21 21:18:17 +02:00
c0a3859797 Adds zoxide eval to bashrc 2025-08-21 19:46:13 +02:00
11c712056d QR wifi image creator 2025-08-03 13:13:02 +02:00
Jonas Forsberg
bfef7aadc2 changed to IP to tilix dns profile 2024-05-16 15:34:26 +02:00
Jonas Forsberg
6385528df8 added tilix config 2024-04-23 14:14:24 +02:00
Jonas Forsberg
cc9b7ac868 added ansible vault to ignore 2023-12-06 09:54:10 +01:00
Jonas Forsberg
3f165f2c00 added mariadb_backup alias 2023-11-07 15:56:06 +01:00
Jonas Forsberg
313b60d0a8 added spelling to cook files 2023-10-12 13:28:12 +02:00
Jonas Forsberg
e8b0f542b7 changed to main branch name 2023-09-25 08:58:47 +02:00
Jonas Forsberg
803b216631 Removed old keepassxc ini file 2023-09-12 10:44:15 +02:00
Jonas Forsberg
0c8fb4eeb4 Tools installation function added 2023-08-30 16:21:42 +02:00
Jonas Forsberg
e1ef38ef21 Added steps to new computer setup 2023-08-15 15:29:35 +02:00
c663d00719 added check to see if dotf was installed 2023-04-24 10:59:33 +02:00
b8ee31a757 added instructions on existing repo 2023-04-24 10:28:55 +02:00
Jonas Forsberg
beaa8fff5b added backup.sh 2022-09-30 10:59:55 +02:00
Jonas Forsberg
60584cbc68 removed virtctl, fixed stern 2022-09-30 10:51:55 +02:00
Jonas Forsberg
bb0f3ffc7b changed default work computer 2022-09-27 11:34:17 +02:00
Jonas Forsberg
6fed8d09b5 added delay 2022-09-27 11:02:05 +02:00
Jonas Forsberg
086435d6a7 added k8s_apps 2022-09-02 16:34:14 +02:00
20 changed files with 439 additions and 64 deletions

3
.alias
View File

@@ -4,6 +4,7 @@ alias weather='curl http://v2.wttr.in/Stockholm'
alias gpg='gpg2' alias gpg='gpg2'
alias ls_dotfiels='/usr/bin/git --git-dir=$HOME/.dotfiles ls-tree --full-tree -r --name-only HEAD' alias ls_dotfiels='/usr/bin/git --git-dir=$HOME/.dotfiles ls-tree --full-tree -r --name-only HEAD'
alias gl='git log --graph --pretty=format:'\''%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'' --abbrev-commit --date=relative' alias gl='git log --graph --pretty=format:'\''%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'' --abbrev-commit --date=relative'
alias mariadb='kubectl -n mariadb exec -it $(kubectl -n mariadb get pod --selector=app.kubernetes.io/instance=mariadb --template "{{range .items}}{{.metadata.name}}{{\"\n\"}}{{end}}") -- mysql' alias mariadb='kubectl -n mariadb exec -it $(kubectl -n mariadb get pod --selector=app.kubernetes.io/instance=mariadb --template "{{range .items}}{{.metadata.name}}{{\"\n\"}}{{end}}") -- mariadb'
alias mariadb_backup='kubectl -n mariadb create job --from=cronjob.batch/database-backup-job database-backup-job-manual-$(date +"%Y-%m-%d-%H-%M-%S")'
alias nodered='kubectl -n nodered exec -it $(kubectl -n nodered get pod --selector=app.kubernetes.io/name=node-red --template "{{range .items}}{{.metadata.name}}{{\"\n\"}}{{end}}") -- bash' alias nodered='kubectl -n nodered exec -it $(kubectl -n nodered get pod --selector=app.kubernetes.io/name=node-red --template "{{range .items}}{{.metadata.name}}{{\"\n\"}}{{end}}") -- bash'
alias hass='kubectl -n home-assistant exec -it $(kubectl -n home-assistant get pod --selector=app.kubernetes.io/name=home-assistant --template "{{range .items}}{{.metadata.name}}{{\"\n\"}}{{end}}") -- bash' alias hass='kubectl -n home-assistant exec -it $(kubectl -n home-assistant get pod --selector=app.kubernetes.io/name=home-assistant --template "{{range .items}}{{.metadata.name}}{{\"\n\"}}{{end}}") -- bash'

15
.bashrc
View File

@@ -1,8 +1,11 @@
#!/bin/bash #!/bin/bash
export LIBVIRT_DEFAULT_URI="qemu:///system" export LIBVIRT_DEFAULT_URI="qemu:///system"
export EDITOR="vim"
export HISTSIZE=-1 export HISTSIZE=-1
export HISTFILESIZE=-1 export HISTFILESIZE=-1
export EDITOR="vim" export HISTTIMEFORMAT="%y-%m/%d %T "
export HISTCONTROL=ignoreboth
export HISTIGNORE="ls *:cd *:pwd:history"
# used by systemd user unit file ssh-agent in ~/.config/systemd/user/ssh-agent.service # used by systemd user unit file ssh-agent in ~/.config/systemd/user/ssh-agent.service
#Also add "AddKeysToAgent yes" to ~/.ssh/config #Also add "AddKeysToAgent yes" to ~/.ssh/config
@@ -27,17 +30,13 @@ if [[ -d "$HOME"/.bash_completions.d ]];then
done done
fi fi
# PS1 Prompt
# shellcheck disable=1090
[[ -f "$HOME/.functions/ps1.sh" ]] && source "$HOME/.functions/ps1.sh"
# shellcheck disable=1090 # shellcheck disable=1090
[[ -d "$HOME/.functions" ]] && for f in ~/.functions/*.sh; do source "$f"; done [[ -d "$HOME/.functions" ]] && for f in ~/.functions/*.sh; do source "$f"; done
# shellcheck disable=1090 # shellcheck disable=1090
[[ -d "$HOME/.rbenv/bin" ]] && export PATH="$HOME/.rbenv/bin:$PATH" && eval "$(rbenv init -)" [[ -d "$HOME/.rbenv/bin" ]] && export PATH="$HOME/.rbenv/bin:$PATH" && eval "$(rbenv init -)"
[[ "$(hostname)" != "exsilio" ]] && export PS1_COLOR_HOSTNAME="\[\033[0;33m\]" [[ "$(hostname)" != "framer" ]] && export PS1_COLOR_HOSTNAME="\[\033[0;33m\]"
#exit with no error # shellcheck disable=1091
/bin/true type zoxide >/dev/null 2>&1 && eval "$(zoxide init bash --cmd cd)"

View File

@@ -8,3 +8,4 @@ Categories=Network
Type=Application Type=Application
StartupNotify=false StartupNotify=false
X-GNOME-Autostart-enabled=true X-GNOME-Autostart-enabled=true
X-GNOME-Autostart-Delay=10

View File

@@ -1,29 +0,0 @@
[General]
ConfigVersion=1
[Browser]
CustomProxyLocation=
Enabled=true
[GUI]
MinimizeOnClose=true
MinimizeOnStartup=true
ShowTrayIcon=true
TrayIconAppearance=colorful
[KeeShare]
Active="<?xml version=\"1.0\"?>\n<KeeShare xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n <Active/>\n</KeeShare>\n"
Foreign="<?xml version=\"1.0\"?>\n<KeeShare xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n <Foreign/>\n</KeeShare>\n"
Own="<?xml version=\"1.0\"?>\n<KeeShare xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n <PrivateKey/>\n <PublicKey/>\n</KeeShare>\n"
QuietSuccess=true
[PasswordGenerator]
AdditionalChars=
ExcludedChars=
Length=40
Logograms=true
[Security]
IconDownloadFallback=true
LockDatabaseScreenLock=false
Security_HideNotes=true

View File

@@ -0,0 +1,26 @@
{
"list": [
{
"command": "",
"host": "coronado",
"name": "coronado",
"params": "",
"port": 0,
"protocolType": "SSH",
"type": "REMOTE",
"user": "jonas"
},
{
"command": "",
"host": "chilaca",
"name": "chilaca",
"params": "",
"port": 0,
"protocolType": "SSH",
"type": "REMOTE",
"user": "jonas"
}
],
"name": "Root",
"type": "FOLDER"
}

View File

@@ -11,6 +11,96 @@ function asktobreak(){
printf "\n" printf "\n"
break; break;
fi fi
done
return $return_value return $return_value
done
} }
function new_log(){
# script output
printf "\n**** [%s] ***\n" "$*"
}
function install_tools(){
new_log "Install client tools"
echo "- kubectl"
echo "- helm"
echo "- stern"
echo "- virtctl"
if asktobreak; then
return
fi
set +e
echo "---- kubectl ----"
cd $HOME/bin
if [[ -f kubectl ]]; then
KUBECTL_CURRENT=$(./kubectl version --client 2> /dev/null| sed -n 's/.* GitVersion:"\(v[0-9]*\.[0-9]*\.[0-9]*\)".*/\1/p')
else
KUBECTL_CURRENT="N/A"
fi
KUBECTL_STABLE="$(curl -L -s https://dl.k8s.io/release/stable.txt)"
echo "Installed version: $KUBECTL_CURRENT"
echo "Latest stable version: $KUBECTL_STABLE"
if [[ "$KUBECTL_CURRENT" != "$KUBECTL_STABLE" ]]; then
echo "updating to $KUBECTL_STABLE"
curl -LO https://dl.k8s.io/release/$KUBECTL_STABLE/bin/linux/amd64/kubectl
chmod +x kubectl
fi
echo ""
echo "---- helm ----"
if [[ -f helm ]]; then
HELM_CURRENT=$(./helm version | sed -n 's/.*Version:"\(v[0-9]*\.[0-9]*\.[0-9]*\)".*/\1/p')
else
HELM_CURRENT="N/A"
fi
HELM_STABLE="$(curl -Ls https://github.com/helm/helm/releases | egrep 'href="/helm/helm/releases/tag/v[0-9]+.[0-9]+.[0-9]+\"' | head -n 1 | sed -n 's/.*tag\/\(v.*\)" data.*/\1/p')"
echo "Installed version: $HELM_CURRENT"
echo "Latest stable version: $HELM_STABLE"
if [[ "$HELM_CURRENT" != "$HELM_STABLE" ]]; then
echo "updating to $HELM_STABLE"
curl -LO https://get.helm.sh/helm-$HELM_STABLE-linux-amd64.tar.gz
tar xvzf helm-$HELM_STABLE-linux-amd64.tar.gz --strip-components=1 linux-amd64/helm
rm helm-$HELM_STABLE-linux-amd64.tar.gz
fi
echo ""
echo "---- stern ----"
if [[ -f stern ]]; then
STERN_CURRENT="v$(./stern -v | head -n1 | cut -d " " -f2)"
else
STERN_CURRENT="N/A"
fi
STERN_STABLE="$(curl -Ls https://github.com/stern/stern/releases | egrep 'href="/stern/stern/releases/tag/v[0-9]+.[0-9]+.[0-9]+*\"' | head -n 1 | sed -n 's/.*tag\/\(v.*\)" data.*/\1/p')"
echo "Installed version: $STERN_CURRENT"
echo "Latest stable version: $STERN_STABLE"
if [[ "$STERN_CURRENT" != "$STERN_STABLE" ]]; then
echo "updating to $STERN_STABLE"
curl -LO https://github.com/stern/stern/releases/download/$STERN_STABLE/stern_${STERN_STABLE:1}_linux_amd64.tar.gz
tar xvzf stern_${STERN_STABLE:1}_linux_amd64.tar.gz --strip-components=1 stern_${STERN_STABLE:1}_linux_amd64/stern
rm stern_${STERN_STABLE:1}_linux_amd64.tar.gz
fi
echo ""
echo "---- virtctl ----"
if [[ -f stern ]]; then
VIRTCTL_CURRENT="$(./virtctl version --client 2> /dev/null| sed -n 's/.*GitVersion:"\(v[0-9]*\.[0-9]*\.[0-9]*\)".*/\1/p')"
else
VIRTCTL_CURRENT="N/A"
fi
VIRTCTL_STABLE="$(curl -Ls https://github.com/kubevirt/kubevirt/releases | egrep 'href="/kubevirt/kubevirt/releases/tag/v[0-9]+.[0-9]+.[0-9]+*\"' | head -n 1 | sed -n 's/.*tag\/\(v.*\)" data.*/\1/p')"
echo "Installed version: $VIRTCTL_CURRENT"
echo "Latest stable version: $VIRTCTL_STABLE"
if [[ "$VIRTCTL_CURRENT" != "$VIRTCTL_STABLE" ]]; then
echo "updating to $VIRTCTL_STABLE"
curl -Lo virtctl https://github.com/kubevirt/kubevirt/releases/download/$VIRTCTL_STABLE/virtctl-$VIRTCTL_STABLE-linux-amd64
chmod +x ./virtctl
fi
echo ""
set -e
return
}

View File

@@ -30,4 +30,13 @@ status_dotfiles(){
esac esac
} }
[[ $(type -t __git_complete) == function ]] && __git_complete dotf __git_main # Load git completion explicitly
if command -v git >/dev/null 2>&1; then
# Source completion script (adjust path for your system)
if [ -f /usr/share/bash-completion/completions/git ]; then
# shellcheck disable=1091
source /usr/share/bash-completion/completions/git
fi
# Now __git_complete should exist
[[ $(type -t __git_complete) == "function" ]] && __git_complete dotf __git_main
fi

View File

@@ -79,3 +79,51 @@ function k8s_neuvector_cve_db_version(){
function k8s_node_taints(){ function k8s_node_taints(){
kubectl get nodes -o json | jq '.items[].spec.taints' kubectl get nodes -o json | jq '.items[].spec.taints'
} }
function k8s_apps(){
# parameters,
# stop = Set all deployments & statefultsets to replica=0
# start = set all deployments & statefulsets to replica=1
# show = show status of all deployments & statefulsets
CHOICE="$1"
if [[ ! "start stop show" =~ (" "|^)"$CHOICE"(" "|$) ]]; then
echo "no parameter given"
return 1
fi
local USER_PROJECT_IDS=(p-c5fcj p-q8pbm)
local OK='\e[32m\u2714\e[0m'
local NOT_OK='\u274c'
printf "%-22s %s\n" "namespace" "application"
printf -- '-%.0s' {1..34}
printf "\n"
for PROJECT in "${USER_PROJECT_IDS[@]}"; do
for NS in $(kubectl get namespaces --selector=field.cattle.io/projectId="$PROJECT" --template "{{range .items}}{{.metadata.name}}{{\"\n\"}}{{end}}"); do
for DEPLOYMENT in $(kubectl --namespace "$NS" get deployments --template "{{range .items}}{{.metadata.name}}{{\"\n\"}}{{end}}"); do
if [[ "$CHOICE" == "stop" ]];then
kubectl --namespace "$NS" scale deployment "$DEPLOYMENT" --replicas=0 > /dev/null
elif [[ "$CHOICE" == "start" ]];then
kubectl --namespace "$NS" scale deployment "$DEPLOYMENT" --replicas=1 > /dev/null
fi
if [[ $(kubectl --namespace "$NS" get deployments "$DEPLOYMENT" -o jsonpath='{.spec.replicas}') == "0" ]];then
echo -n -e "$NOT_OK "
else
echo -n -e "$OK "
fi
printf "%-20s %s\n" "$NS" "$DEPLOYMENT"
done
for STATEFULSET in $(kubectl --namespace "$NS" get statefulsets --template "{{range .items}}{{.metadata.name}}{{\"\n\"}}{{end}}"); do
if [[ "$CHOICE" == "stop" ]];then
kubectl --namespace "$NS" scale statefulset "$STATEFULSET" --replicas=0 > /dev/null
elif [[ "$CHOICE" == "start" ]];then
kubectl --namespace "$NS" scale statefulset "$STATEFULSET" --replicas=1 > /dev/null
fi
if [[ $(kubectl --namespace "$NS" get statefulsets "$STATEFULSET" -o jsonpath='{.spec.replicas}') == "0" ]];then
echo -n -e "$NOT_OK "
else
echo -n -e "$OK "
fi
printf "%-20s %s\n" "$NS" "$STATEFULSET"
done
done
done
}

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
function fetch_bash_ps1(){ function fetch_bash_ps1(){
local BASH_PS1_URL="${BASH_PS1_URL:-https://git.rre.nu/jonas/dotfiles/raw/branch/master/.functions/ps1.sh}" local BASH_PS1_URL="${BASH_PS1_URL:-https://git.rre.nu/jonas/dotfiles/raw/branch/main/.functions/ps1.sh}"
if ! command -v curl &> /dev/null;then if ! command -v curl &> /dev/null;then
echo "curl not found" echo "curl not found"

15
.functions/qr-wifi.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
qr-wifi(){
#create a qr-code for wifi access
# $1 SSID
# $2 Preshared key
# #3 (optional) png output file, default wifi.png
local outputfile="${3:-wifi.png}"
local ssid="$1"
local pass="$2"
qrencode -o "$outputfile" "WIFI:T:WPA;S:${ssid};P:${pass};;"
}

15
.functions/tilix.sh Normal file
View File

@@ -0,0 +1,15 @@
function tilix_backup(){
local TILIX_CONF_FOLDER="${TILIX_CONF_FOLDER:-$HOME/.tilix}"
local TILIX_CONF_BACKUPFILE="${TILIX_CONF_BACKUPFILE:-tilix.dconf}"
dconf dump '/com/gexperts/Tilix/' > ${TILIX_CONF_FOLDER}/${TILIX_CONF_BACKUPFILE}
echo "Dumped Tilix config"
}
function tilix_restore(){
local TILIX_CONF_FOLDER="${TILIX_CONF_FOLDER:-$HOME/.tilix}"
local TILIX_CONF_BACKUPFILE="${TILIX_CONF_BACKUPFILE:-tilix.dconf}"
dconf load '/com/gexperts/Tilix/' < ${TILIX_CONF_FOLDER}/${TILIX_CONF_BACKUPFILE}
echo "Tilix config loaded"
}

View File

@@ -5,8 +5,10 @@ function t(){
} }
function todo_status(){ function todo_status(){
NUM="$(todo.sh lsp "$1" | sed -n 's/.*TODO: \([0-9]\+\).*/\1/p')" if command -v todo.sh > /dev/null; then
[[ "$NUM" -ne 0 ]] && echo "YES" NUM="$(todo.sh lsp "$1" | sed -n 's/.*TODO: \([0-9]\+\).*/\1/p')"
[[ "$NUM" -ne 0 ]] && echo "YES"
fi
} }
_todo() _todo()

View File

@@ -1,15 +1,14 @@
function upgrade_tools(){ function upgrade_tools(){
new_log "Install client tools" echo "Install/Upgrade client tools"
echo "- kubectl" echo "- kubectl"
echo "- helm" echo "- helm"
echo "- stern" echo "- stern"
echo "- virtctl"
if asktobreak; then if asktobreak; then
return return
fi fi
set +e
echo "---- kubectl ----" echo "---- kubectl ----"
local CURRENT_PWD="$(pwd)"
cd $HOME/bin cd $HOME/bin
if [[ -f kubectl ]]; then if [[ -f kubectl ]]; then
KUBECTL_CURRENT=$(./kubectl version --client 2> /dev/null| sed -n 's/.* GitVersion:"\(v[0-9]*\.[0-9]*\.[0-9]*\)".*/\1/p') KUBECTL_CURRENT=$(./kubectl version --client 2> /dev/null| sed -n 's/.* GitVersion:"\(v[0-9]*\.[0-9]*\.[0-9]*\)".*/\1/p')
@@ -52,25 +51,10 @@ function upgrade_tools(){
echo "Latest stable version: $STERN_STABLE" echo "Latest stable version: $STERN_STABLE"
if [[ "$STERN_CURRENT" != "$STERN_STABLE" ]]; then if [[ "$STERN_CURRENT" != "$STERN_STABLE" ]]; then
echo "updating to $STERN_STABLE" echo "updating to $STERN_STABLE"
curl -LO https://github.com/stern/stern/releases/download/$STERN_STABLE/stern_${STERN_STABLE:1}_linux_amd64.tar.gz curl -LO https://github.com/stern/stern/releases/download/$STERN_STABLE/stern_${STERN_STABLE:1}_linux_amd64.tar.gz
tar xvzf stern_${STERN_STABLE:1}_linux_amd64.tar.gz --strip-components=1 stern_${STERN_STABLE:1}_linux_amd64/stern tar xvzf stern_${STERN_STABLE:1}_linux_amd64.tar.gz stern
rm stern_${STERN_STABLE:1}_linux_amd64.tar.gz rm stern_${STERN_STABLE:1}_linux_amd64.tar.gz
fi fi
echo "" echo ""
echo "---- virtctl ----" cd "$CURRENT_PWD"
if [[ -f stern ]]; then
VIRTCTL_CURRENT="$(./virtctl version --client 2> /dev/null| sed -n 's/.*GitVersion:"\(v[0-9]*\.[0-9]*\.[0-9]*\)".*/\1/p')"
else
VIRTCTL_CURRENT="N/A"
fi
VIRTCTL_STABLE="$(curl -Ls https://github.com/kubevirt/kubevirt/releases | egrep 'href="/kubevirt/kubevirt/releases/tag/v[0-9]+.[0-9]+.[0-9]+*\"' | head -n 1 | sed -n 's/.*tag\/\(v.*\)" data.*/\1/p')"
echo "Installed version: $VIRTCTL_CURRENT"
echo "Latest stable version: $VIRTCTL_STABLE"
if [[ "$VIRTCTL_CURRENT" != "$VIRTCTL_STABLE" ]]; then
echo "updating to $VIRTCTL_STABLE"
curl -Lo virtctl https://github.com/kubevirt/kubevirt/releases/download/$VIRTCTL_STABLE/virtctl-$VIRTCTL_STABLE-linux-amd64
chmod +x ./virtctl
fi
echo ""
set -e
} }

1
.gitignore vendored
View File

@@ -4,4 +4,5 @@
.restic/restic.env .restic/restic.env
.kube/ .kube/
.gotify.sh .gotify.sh
.ansible_vault
kubeconfig kubeconfig

View File

@@ -1 +1,9 @@
#AddKeysToAgent yes
Include config.d/* Include config.d/*
#Host cumin.rre.nu
# Hostname cumin.rre.nu
# User jonas
# IdentityFile ~/.ssh/id_ecdsa
# IdentitiesOnly yes

35
.tilix/dns-rre.json Normal file
View File

@@ -0,0 +1,35 @@
{
"child": {
"child1": {
"directory": "",
"height": 516,
"profile": "dffcc523-15a9-4428-9d45-11fad60393f4",
"readOnly": false,
"synchronizedInput": true,
"type": "Terminal",
"uuid": "8225c6c1-47a0-44eb-84be-05c541e13beb",
"width": 1920
},
"child2": {
"directory": "",
"height": 516,
"profile": "d902749d-345f-4b00-b074-1f8381b0c15a",
"readOnly": false,
"synchronizedInput": true,
"type": "Terminal",
"uuid": "edfabdb3-8e41-49b7-ab8e-5e38c7af99e2",
"width": 1920
},
"orientation": 1,
"position": 49,
"ratio": 0.499515972894482074,
"type": "Paned"
},
"height": 1033,
"name": "${title}",
"synchronizedInput": true,
"type": "Session",
"uuid": "7a0d8765-b614-48c6-9382-d345bdd7fd1c",
"version": "1.0",
"width": 1920
}

141
.tilix/tilix.dconf Normal file
View File

@@ -0,0 +1,141 @@
[/]
prompt-on-delete-profile=true
quake-hide-headerbar=true
quake-specific-monitor=0
recent-session-files=['/home/jonas/.tilix/dns-rre.json', '.tilix/dns-rre.json']
terminal-title-style='small'
warn-vte-config-issue=false
window-style='disable-csd'
[profiles]
list=['2b7c4080-0ddd-46c5-8f23-563fd3ba789d', 'dffcc523-15a9-4428-9d45-11fad60393f4', 'd902749d-345f-4b00-b074-1f8381b0c15a']
[profiles/2b7c4080-0ddd-46c5-8f23-563fd3ba789d]
background-color='#272822'
background-transparency-percent=5
badge-color='#AC7EA8'
badge-color-set=false
bold-color-set=false
cursor-colors-set=false
dim-transparency-percent=22
foreground-color='#F8F8F2'
highlight-colors-set=false
palette=['#272822', '#F92672', '#A6E22E', '#F4BF75', '#66D9EF', '#AE81FF', '#A1EFE4', '#F8F8F2', '#75715E', '#F92672', '#A6E22E', '#F4BF75', '#66D9EF', '#AE81FF', '#A1EFE4', '#F9F8F5']
use-theme-colors=false
visible-name='Default'
[profiles/d902749d-345f-4b00-b074-1f8381b0c15a]
allow-bold=true
automatic-switch=@as []
background-color='#272822'
background-transparency-percent=5
backspace-binding='ascii-delete'
badge-color='#AC7EA8'
badge-color-set=false
badge-font='Monospace 12'
badge-position='northeast'
badge-text=''
badge-use-system-font=true
bold-color='#ffffff'
bold-color-set=false
bold-is-bright=true
cell-height-scale=1.0
cell-width-scale=1.0
cjk-utf8-ambiguous-width='narrow'
cursor-background-color='#000000'
cursor-blink-mode='system'
cursor-colors-set=false
cursor-foreground-color='#ffffff'
cursor-shape='block'
custom-command='ssh 10.2.0.23'
custom-hyperlinks=@as []
default-size-columns=80
default-size-rows=24
delete-binding='delete-sequence'
dim-transparency-percent=22
draw-margin=80
encoding='UTF-8'
exit-action='close'
font='Monospace 12'
foreground-color='#F8F8F2'
highlight-background-color='#000000'
highlight-colors-set=false
highlight-foreground-color='#ffffff'
login-shell=false
notify-silence-enabled=false
notify-silence-threshold=0
palette=['#272822', '#F92672', '#A6E22E', '#F4BF75', '#66D9EF', '#AE81FF', '#A1EFE4', '#F8F8F2', '#75715E', '#F92672', '#A6E22E', '#F4BF75', '#66D9EF', '#AE81FF', '#A1EFE4', '#F9F8F5']
rewrap-on-resize=true
scroll-on-keystroke=true
scroll-on-output=false
scrollback-lines=8192
scrollback-unlimited=false
select-by-word-chars='-,./?%&#:_'
shortcut='disabled'
show-scrollbar=true
terminal-bell='sound'
terminal-title='${id}: ${title}'
text-blink-mode='always'
triggers=@as []
use-custom-command=true
use-system-font=true
use-theme-colors=false
visible-name='serrano'
[profiles/dffcc523-15a9-4428-9d45-11fad60393f4]
allow-bold=true
automatic-switch=@as []
background-color='#272822'
background-transparency-percent=5
backspace-binding='ascii-delete'
badge-color='#AC7EA8'
badge-color-set=false
badge-font='Monospace 12'
badge-position='northeast'
badge-text=''
badge-use-system-font=true
bold-color='#ffffff'
bold-color-set=false
bold-is-bright=true
cell-height-scale=1.0
cell-width-scale=1.0
cjk-utf8-ambiguous-width='narrow'
cursor-background-color='#000000'
cursor-blink-mode='system'
cursor-colors-set=false
cursor-foreground-color='#ffffff'
cursor-shape='block'
custom-command='ssh 10.2.0.24'
custom-hyperlinks=@as []
default-size-columns=80
default-size-rows=24
delete-binding='delete-sequence'
dim-transparency-percent=22
draw-margin=80
encoding='UTF-8'
exit-action='close'
font='Monospace 12'
foreground-color='#F8F8F2'
highlight-background-color='#000000'
highlight-colors-set=false
highlight-foreground-color='#ffffff'
login-shell=false
notify-silence-enabled=false
notify-silence-threshold=0
palette=['#272822', '#F92672', '#A6E22E', '#F4BF75', '#66D9EF', '#AE81FF', '#A1EFE4', '#F8F8F2', '#75715E', '#F92672', '#A6E22E', '#F4BF75', '#66D9EF', '#AE81FF', '#A1EFE4', '#F9F8F5']
rewrap-on-resize=true
scroll-on-keystroke=true
scroll-on-output=false
scrollback-lines=8192
scrollback-unlimited=false
select-by-word-chars='-,./?%&#:_'
shortcut='disabled'
show-scrollbar=true
terminal-bell='sound'
terminal-title='${id}: ${title}'
text-blink-mode='always'
triggers=@as []
use-custom-command=true
use-system-font=true
use-theme-colors=false
visible-name='coronado'

1
.vimrc
View File

@@ -142,6 +142,7 @@ if has("autocmd")
autocmd FileType markdown setlocal spell autocmd FileType markdown setlocal spell
autocmd BufRead,BufNewFile *.rst setlocal spell autocmd BufRead,BufNewFile *.rst setlocal spell
autocmd BufRead,BufNewFile *.txt setlocal spell autocmd BufRead,BufNewFile *.txt setlocal spell
autocmd BufRead,BufNewFile *.cook setlocal spell
" Set filetype tab settings " Set filetype tab settings
autocmd FileType python,doctest set ai ts=4 sw=4 sts=4 et autocmd FileType python,doctest set ai ts=4 sw=4 sts=4 et

View File

@@ -49,6 +49,19 @@ dotf remote add origin <username>@git.domain.tld/dotfiles.git
dotf push dotf push
``` ```
# Adding new computer to existing dotfile repo
```
mkdir $HOME/.dotfiles
alias dotf='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
dotf init
rm .inputrc
rm .bashrc
dotf remote add origin https://git.rre.nu/jonas/dotfiles.git
dotf config --local status.showUntrackedFiles no
dotf fetch origin
dotf checkout main
```
# To initialize my desktop run # To initialize my desktop run
```bash ```bash
bash <(curl -sL https://git.rre.nu/jonas/dotfiles/raw/branch/master/bin/initDesktop) bash <(curl -sL https://git.rre.nu/jonas/dotfiles/raw/branch/master/bin/initDesktop)

15
bin/backup.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
set -aeou pipefail
RESTIC=/usr/bin/restic
# some helpers and error handling:
trap 'echo $( date ) Backup interrupted >&2; exit 2' INT TERM
# shellcheck disable=SC1090
source "${HOME}"/.restic/restic.env
$RESTIC backup \
--exclude-file="$HOME"/.restic/excludes.txt \
--files-from="$HOME"/.restic/includes.txt \
--verbose