mirror of
https://github.com/morten-olsen/configs.git
synced 2026-02-08 00:46:24 +01:00
first commit
This commit is contained in:
33
playbooks/roles/terminal/files/default/.scripts/rollout.sh
Executable file
33
playbooks/roles/terminal/files/default/.scripts/rollout.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#
|
||||
unset GITHUB_TOKEN
|
||||
|
||||
# Extract type and description from commit message
|
||||
type=$1; shift
|
||||
description="$@"
|
||||
commit_message="$type: $description"
|
||||
|
||||
# Check if a commit message was provided
|
||||
if [ -z "$1" ] || [ -z "$description" ]; then
|
||||
echo "Usage: rollout <type> <...description>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create branch name following Conventional Commit syntax
|
||||
branch_name="${type}/$(echo "$description" | tr ' ' '-' | tr '[:upper:]' '[:lower:]')"
|
||||
|
||||
echo "Creating and checking out branch: $branch_name"
|
||||
git checkout -b "$branch_name" || exit 1
|
||||
|
||||
# Add all changes
|
||||
git add . || exit 1
|
||||
|
||||
echo "Committing with message: \"$commit_message\""
|
||||
git commit -m "$commit_message" || exit 1
|
||||
|
||||
echo "Pushing branch to origin..."
|
||||
git push --set-upstream origin HEAD || exit 1
|
||||
|
||||
echo "Creating a Pull Request..."
|
||||
gh pr create --fill
|
||||
|
||||
echo "Rollout complete."
|
||||
@@ -0,0 +1,6 @@
|
||||
alias ls=eza
|
||||
alias cat=bat
|
||||
alias grep=rg
|
||||
alias diff=delta
|
||||
alias less=bat
|
||||
alias gr='if [ "`git rev-parse --show-cdup`" != "" ]; then cd `git rev-parse --show-cdup`; fi'
|
||||
@@ -0,0 +1 @@
|
||||
export TMPDIR="${TMPDIR:-/tmp}"
|
||||
@@ -0,0 +1,3 @@
|
||||
export EDITOR=nvim
|
||||
alias vim=nvim
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
export PATH="$PATH:$HOME/.scripts"
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
export GPG_TTY="$(tty)"
|
||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
gpgconf --launch gpg-agent
|
||||
gpg-connect-agent updatestartuptty /bye > /dev/null
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKDbZITpz5QrVIxPn9gKVWMPK+3W3YZZGszFOQvO/h7M
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCj8wspkAnOpEmipwB/xd8vpEx9aqNbyjD2xzv0msDJvYMn26ZO3cbtbWbMI9Uns55aHcL0bStdbaJQIcL8ZVzvQtKq+spdZYQpN4cFlN16HXKR/UjBYtJEdHVxb2cwb2DM04aLDuAlCAJGChEAqpIQFpvlByyAaxSPwor5Cy5JHmm5fMkvcJEvPtxQOo4yovY8qW9scWlOCrzNSAYtBwTGG8REcRuTaEW9EJlmn8QZA+T+cE7nFdZOlmm752jW9wBCAIKlg6W5gX0rysSxy+MkKB/2ohpLI+0SeWAM8+CEtZjO7GP6xRPXZgrZJssytzQsJoiMTs6rJM5ovHUMVNPGDLCB6+8lWM7Jk4hh0lIQTOC5AMucH2jRJSyQb2AA3kbPuWOwHDDIlSUnNFsI/xUVs1lfx3ikIZEb9oZcKwWBB2PeL/KT6ca7dsI3PyFL+hC5Wi7ll0Aj5w+dBZOxwW1agSo4ujPKO9oIVwqEA+PqoK/GZtIHAx6t/m3DK8T4HAo2GZMqyzRgcqk1bttaCFzX2h074yW1du8+l4yIqWrooqD474V3MT05HUxkA1+9S5ldEwK4J50WfKlhNuZn5YeiHLngisu8WyIGREYDGlkM+1qxwHiJGohigS20kpmTUkKvyLRXItAcvQYBknCV3qb8B1Kj1bvbN3sCaqQAeVWxDw==
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFaIAP/ZJ7+7jeR44e1yIJjfQAB6MN351LDKJAXVF62P
|
||||
10
playbooks/roles/terminal/files/default/.ssh/config
Normal file
10
playbooks/roles/terminal/files/default/.ssh/config
Normal file
@@ -0,0 +1,10 @@
|
||||
Include /Users/alice/.colima/ssh_config
|
||||
|
||||
Include ~/.ssh/config.d/*
|
||||
|
||||
Host *
|
||||
Controlmaster auto
|
||||
Controlpath ${TMPDIR}/ssh-%r@%h:%p
|
||||
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
||||
ForwardAgent yes
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
host github.com
|
||||
hostname ssh.github.com
|
||||
user git
|
||||
port 443
|
||||
107
playbooks/roles/terminal/files/default/.tmux.conf
Normal file
107
playbooks/roles/terminal/files/default/.tmux.conf
Normal file
@@ -0,0 +1,107 @@
|
||||
set -g mouse on
|
||||
set -g default-terminal "screen-256color-bce"
|
||||
#set -g status-justify centre
|
||||
|
||||
#set -ga terminal-overrides ',xterm-256color:Tc'
|
||||
set -ag terminal-overrides ",xterm-256color:RGB"
|
||||
|
||||
|
||||
set -g base-index 1
|
||||
set -g renumber-windows on
|
||||
bind q lock-client
|
||||
|
||||
unbind '"'
|
||||
unbind %
|
||||
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
bind -r H resize-pane -L 10
|
||||
bind -r J resize-pane -D 10
|
||||
bind -r K resize-pane -U 10
|
||||
bind -r L resize-pane -R 10
|
||||
|
||||
bind o attach -c "#{pane_current_path}"
|
||||
|
||||
# don't rename windows automatically
|
||||
set-option -g allow-rename off
|
||||
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
|
||||
run -b '~/.tmux/plugins/tpm/tpm'
|
||||
if "test ! -d ~/.tmux/plugins/tpm" \
|
||||
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
|
||||
|
||||
# set -g @plugin "arcticicestudio/nord-tmux"
|
||||
# set -g @plugin 'dracula/tmux'
|
||||
# set -g @dracula-show-powerline true
|
||||
# set -g @plugin 'wfxr/tmux-power'
|
||||
set -g @plugin 'catppuccin/tmux'
|
||||
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
set -g @treemux-tree-nvim-init-file '~/.tmux/plugins/treemux/configs/treemux_init.lua'
|
||||
set -g @plugin 'kiyoon/treemux'
|
||||
|
||||
# open pane in vim
|
||||
bind-key / capture-pane -S -102400 -J \; new-window 'vim -c ":read !tmux save-buffer - ; tmux delete-buffer;" -c ":normal gg" -c ":set buftype=nofile" -c ":silent! ChompWhitespace"'
|
||||
|
||||
set -g @catppuccin_date_time "%Y-%m-%d %H:%M"
|
||||
set -g @catppuccin_window_tabs_enabled "on"
|
||||
|
||||
# clear history
|
||||
# bind k send-keys -R \; clear-history
|
||||
|
||||
# copy mode
|
||||
setw -g mode-keys vi
|
||||
bind Escape copy-mode
|
||||
unbind [
|
||||
unbind p
|
||||
bind p paste-buffer
|
||||
bind -Tcopy-mode-vi v send -X begin-selection
|
||||
bind -Tcopy-mode-vi y send -X copy-selection
|
||||
bind -Tcopy-mode-vi Escape send -X cancel
|
||||
|
||||
# panes
|
||||
bind - split-window -v -c "#{pane_current_path}"
|
||||
bind | split-window -h -c "#{pane_current_path}"
|
||||
bind C-z resize-pane -Z
|
||||
bind g swap-pane -U
|
||||
bind æ swap-pane -D
|
||||
|
||||
# panes
|
||||
#set -g window-active-style 'bg=colour236'
|
||||
#set -g window-style 'bg=black'
|
||||
|
||||
|
||||
# Smart pane switching with awareness of Vim splits.
|
||||
# See: https://github.com/christoomey/vim-tmux-navigator
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
||||
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
|
||||
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
|
||||
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
|
||||
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
|
||||
|
||||
bind -n 'M-h' if-shell "$is_vim" 'send-keys M-h' 'resize-pane -L 1'
|
||||
bind -n 'M-j' if-shell "$is_vim" 'send-keys M-j' 'resize-pane -D 1'
|
||||
bind -n 'M-k' if-shell "$is_vim" 'send-keys M-k' 'resize-pane -U 1'
|
||||
bind -n 'M-l' if-shell "$is_vim" 'send-keys M-l' 'resize-pane -R 1'
|
||||
|
||||
tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
|
||||
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
|
||||
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
|
||||
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
|
||||
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
|
||||
|
||||
|
||||
bind-key -T copy-mode-vi 'C-h' select-pane -L
|
||||
bind-key -T copy-mode-vi 'C-j' select-pane -D
|
||||
bind-key -T copy-mode-vi 'C-k' select-pane -U
|
||||
bind-key -T copy-mode-vi 'C-l' select-pane -R
|
||||
bind-key -T copy-mode-vi 'C-\' select-pane -l
|
||||
|
||||
# Utils
|
||||
bind -r g display-popup -d '#{pane_current_path}' -w80% -h80% -E lazygit
|
||||
|
||||
73
playbooks/roles/terminal/files/default/.zshrc
Normal file
73
playbooks/roles/terminal/files/default/.zshrc
Normal file
@@ -0,0 +1,73 @@
|
||||
export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-$HOME/.cache}
|
||||
export LANG=en_US.UTF-8
|
||||
|
||||
# Load all files from .shell/rc.d directory
|
||||
if [ -d $HOME/.shellrc/rc.d ]; then
|
||||
for file in $HOME/.shellrc/rc.d/*.sh; do
|
||||
source $file
|
||||
done
|
||||
fi
|
||||
|
||||
# Load all files from .shell/zshrc.d directory
|
||||
if [ -d $HOME/.shellrc/zshrc.d ]; then
|
||||
for file in $HOME/.shellrc/zshrc.d/*.zsh; do
|
||||
source $file
|
||||
done
|
||||
fi
|
||||
export GPG_TTY=$(tty)
|
||||
if [[ -n "$SSH_CONNECTION" ]] ;then
|
||||
export PINENTRY_USER_DATA="USE_CURSES=1"
|
||||
fi
|
||||
|
||||
[ -f ~/.env ] && source ~/.env
|
||||
|
||||
if [ `tput cols` -gt "70" ]; then
|
||||
function PRINT_CENTER {
|
||||
COLS=`tput cols`
|
||||
OFFSET=$(( ($COLS - $1) / 2 ))
|
||||
PRE=""
|
||||
for i in `seq $OFFSET`; do
|
||||
PRE="$PRE "
|
||||
done
|
||||
while IFS= read -r line; do
|
||||
echo "$PRE$line"
|
||||
done <<< "$2"
|
||||
}
|
||||
PRINT_CENTER 60 "
|
||||
|
||||
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
|
||||
█░▄▄▀█▀▄▄▀█░▄▄░█▄░▄█▀▄▀██░▄░██░██░█░▄▄█░▄▄░█
|
||||
█░▀▀▄█░██░█░▀▄░██░██░█▀█░▀▀░▀█░██░█▄▄▀███▄██
|
||||
█▄█▄▄██▄▄██░▀▀░██▄███▄█████░███▄▄▄█▄▄▄█░▀▀░█
|
||||
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
|
||||
|
||||
⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆
|
||||
⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦
|
||||
⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄
|
||||
⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄
|
||||
⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀
|
||||
⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄
|
||||
⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄
|
||||
⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄
|
||||
⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄
|
||||
⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆
|
||||
⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃
|
||||
▄▄▄ . ▌ ▐·▪ ▄▄▌ ▄▄▌ ▐ ▄▌▪ ▄▄▄▄▄ ▄ .▄ ▄• ▄▌▄▄▄▄▄
|
||||
▀▄.▀·▪█·█▌██ ██• ██· █▌▐███ •██ ██▪▐█ ▄█▀▄ █▪██▌•██
|
||||
▐▀▀▪▄▐█▐█•▐█·██ ▪ ██▪▐█▐▐▌▐█· ▐█.▪██▀▀█▐█▌.▐▌█▌▐█▌ ▐█.▪
|
||||
▐█▄▄▌ ███ ▐█▌▐█▌ ▄ ▐█▌██▐█▌▐█▌ ▐█▌·██▌▐▀▐█▌.▐▌▐█▄█▌ ▐█▌·
|
||||
▀▀▀ . ▀ ▀▀▀.▀▀▀ ▀▀▀▀ ▀▪▀▀▀ ▀▀▀ ▀▀▀ · ▀█▄▀▪ ▀▀▀ ▀▀▀
|
||||
|
||||
> welcome x_x
|
||||
"
|
||||
fi
|
||||
|
||||
export FZF_DEFAULT_OPTS=" \
|
||||
--color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \
|
||||
--color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \
|
||||
--color=marker:#f5e0dc,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8"
|
||||
|
||||
which atuin &> /dev/null && eval "$(atuin init zsh)"
|
||||
which direnv &> /dev/null && eval "$(direnv hook zsh)"
|
||||
which starship &> /dev/null && eval "$(starship init zsh)"
|
||||
which zoxide &> /dev/null && eval "$(zoxide init zsh)"
|
||||
@@ -0,0 +1,6 @@
|
||||
host github-private
|
||||
hostname ssh.github.com
|
||||
user git
|
||||
port 443
|
||||
IdentityFile ~/.ssh/keys/github-private.pub
|
||||
IdentitiesOnly yes
|
||||
@@ -0,0 +1 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFaIAP/ZJ7+7jeR44e1yIJjfQAB6MN351LDKJAXVF62P
|
||||
@@ -0,0 +1,4 @@
|
||||
export NPM_GITHUB_TOKEN="op://jpksggxxmcuwnbwkooktr3iqcy/ut3yag6r7y4bsfrztahp7pcc6q/password"
|
||||
export NODE_AUTH_TOKEN=$NPM_GITHUB_TOKEN
|
||||
export GITHUB_TOKEN=$NPM_GITHUB_TOKEN
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
[user]
|
||||
email = morten@olsen.pro
|
||||
name = Morten Olsen
|
||||
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFaIAP/ZJ7+7jeR44e1yIJjfQAB6MN351LDKJAXVF62P
|
||||
|
||||
[url "git@github-private:morten-olsen/"]
|
||||
insteadOf = https://github.com/morten-olsen/
|
||||
|
||||
[url "ssh://git@giteaa.olsen.cloud:2202/"]
|
||||
insteadOf = ssh://git@gitea.olsen.cloud:2202/
|
||||
@@ -0,0 +1,3 @@
|
||||
@morten-olsen:registry=https://npm.pkg.github.com
|
||||
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
host github-zeronorth
|
||||
hostname ssh.github.com
|
||||
user git
|
||||
port 443
|
||||
IdentityFile ~/.ssh/keys/github-zeronorth.pub
|
||||
IdentitiesOnly yes
|
||||
@@ -0,0 +1 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKDbZITpz5QrVIxPn9gKVWMPK+3W3YZZGszFOQvO/h7M
|
||||
@@ -0,0 +1,4 @@
|
||||
export NPM_GITHUB_TOKEN="op://jpksggxxmcuwnbwkooktr3iqcy/ut3yag6r7y4bsfrztahp7pcc6q/password"
|
||||
export NODE_AUTH_TOKEN=$NPM_GITHUB_TOKEN
|
||||
export GITHUB_TOKEN="op://Employee/lobazchngpvla4opw4rwzjwnoi/credential"
|
||||
export AWS_PROFILE="zeronorth"
|
||||
@@ -0,0 +1,7 @@
|
||||
[user]
|
||||
email = morten.olsen@zeronorth.com
|
||||
name = Morten Olsen
|
||||
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKDbZITpz5QrVIxPn9gKVWMPK+3W3YZZGszFOQvO/h7M
|
||||
|
||||
[url "git@github-zeronorth:"]
|
||||
insteadOf = https://github.com/
|
||||
@@ -0,0 +1,2 @@
|
||||
@0north:registry=https://npm.pkg.github.com
|
||||
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
|
||||
Reference in New Issue
Block a user