diff --git a/_home/dot_sz.shrc.d/byobu b/_home/dot_sz.shrc.d/00_byobu similarity index 100% rename from _home/dot_sz.shrc.d/byobu rename to _home/dot_sz.shrc.d/00_byobu diff --git a/_home/dot_sz.shrc.d/bin.path b/_home/dot_sz.shrc.d/10_bin.path similarity index 100% rename from _home/dot_sz.shrc.d/bin.path rename to _home/dot_sz.shrc.d/10_bin.path diff --git a/_home/dot_sz.shrc.d/aliases b/_home/dot_sz.shrc.d/21_aliases similarity index 100% rename from _home/dot_sz.shrc.d/aliases rename to _home/dot_sz.shrc.d/21_aliases diff --git a/_home/dot_sz.shrc.d/21_gcp.shortcuts b/_home/dot_sz.shrc.d/21_gcp.shortcuts new file mode 100644 index 0000000..b3598f9 --- /dev/null +++ b/_home/dot_sz.shrc.d/21_gcp.shortcuts @@ -0,0 +1,21 @@ +function gcp_project() { + gcloud config get-value core/project 2> /dev/null +} + +function gcp_get_project_id() { + gcloud projects list \ + --filter="$1" \ + --format="value(project_id)" \ + 2> /dev/null +} + +function gcp_get_project_number() { + gcloud projects list \ + --filter="project_id:$1" \ + --format='value(project_number)' \ + 2> /dev/null +} + +function gcp_region() { + gcloud config get-value compute/region 2> /dev/null +} diff --git a/_home/dot_sz.shrc.d/chezmoi.changes b/_home/dot_sz.shrc.d/99_chezmoi.changes similarity index 100% rename from _home/dot_sz.shrc.d/chezmoi.changes rename to _home/dot_sz.shrc.d/99_chezmoi.changes diff --git a/_home/dot_sz.shrc.d/99_keyboard_mappings b/_home/dot_sz.shrc.d/99_keyboard_mappings new file mode 100644 index 0000000..4790b4e --- /dev/null +++ b/_home/dot_sz.shrc.d/99_keyboard_mappings @@ -0,0 +1,3 @@ +setxkbmap -option +setxkbmap -option caps:escape +setxkbmap -option caps:ctrl_modifier diff --git a/_home/dot_sz.shrc.d/bash.post/oh-my-posh b/_home/dot_sz.shrc.d/bash.post/10_oh-my-posh similarity index 100% rename from _home/dot_sz.shrc.d/bash.post/oh-my-posh rename to _home/dot_sz.shrc.d/bash.post/10_oh-my-posh diff --git a/_home/dot_sz.shrc.d/bash.post/11_persistent.history b/_home/dot_sz.shrc.d/bash.post/11_persistent.history new file mode 100644 index 0000000..0a5fcde --- /dev/null +++ b/_home/dot_sz.shrc.d/bash.post/11_persistent.history @@ -0,0 +1,7 @@ +export HISTCONTROL=ignoreboth:erasedups # no duplicate entries +export HISTSIZE=100000 # big big history +export HISTFILESIZE=100000 # big big history +shopt -s histappend # append to history, don't overwrite it + +# Save and reload the history after each command finishes +export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" diff --git a/_home/dot_sz.shrc.d/bash.post/99_pip.completion b/_home/dot_sz.shrc.d/bash.post/99_pip.completion new file mode 100644 index 0000000..b34f2ef --- /dev/null +++ b/_home/dot_sz.shrc.d/bash.post/99_pip.completion @@ -0,0 +1,2 @@ +source <(pip completion --bash) +