first commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# Bash aliases for the claudaris container
|
||||
|
||||
# ls long hidden and human readable
|
||||
alias ll='ls -lah'
|
||||
alias l1='ls -1'
|
||||
alias ls='ls --color=auto'
|
||||
|
||||
# up levels (up #_of_dir_up)
|
||||
function cd_up() {
|
||||
cd $(printf "%0.0s../" $(seq 1 $1));
|
||||
}
|
||||
alias up='cd_up'
|
||||
|
||||
# or just ctrl+d
|
||||
alias quit='exit'
|
||||
alias e='exit'
|
||||
|
||||
# tmux
|
||||
alias tl='tmux list-sessions'
|
||||
|
||||
# git
|
||||
alias gs='git status'
|
||||
|
||||
alias btw='fastfetch'
|
||||
alias cd='z'
|
||||
@@ -0,0 +1,51 @@
|
||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
HISTCONTROL=ignoreboth
|
||||
HISTSIZE=10000
|
||||
HISTFILESIZE=20000
|
||||
HISTTIMEFORMAT="%F %T "
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# Prints " (branch)" when inside a git repo, nothing otherwise.
|
||||
__git_branch() {
|
||||
local branch
|
||||
branch=$(git symbolic-ref --short HEAD 2>/dev/null) || branch=$(git rev-parse --short HEAD 2>/dev/null) || return
|
||||
printf ' (%s)' "$branch"
|
||||
}
|
||||
|
||||
# Tokyo Night palette, matching files/tmux.conf: purple user@host, blue cwd,
|
||||
# green git branch, gray prompt symbol.
|
||||
PS1='\[\033[38;2;187;154;247;1m\]\u@\h\[\033[0m\] \[\033[38;2;122;162;247m\]\w\[\033[0m\]\[\033[38;2;158;206;106m\]$(__git_branch)\[\033[0m\]\n\[\033[38;2;86;95;137m\]\$\[\033[0m\] '
|
||||
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
fi
|
||||
|
||||
if [ -f /opt/dotfiles/bash_aliases ]; then
|
||||
. /opt/dotfiles/bash_aliases
|
||||
fi
|
||||
|
||||
if ! shopt -oq posix; then
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
# Claude Code CLI installer env
|
||||
[ -f /root/.local/bin/env ] && . /root/.local/bin/env
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# Staying logged in across rebuilds is handled entirely by `claudaris start`,
|
||||
# which bind-mounts ~/.claude/.credentials.json and ~/.claude.json individually
|
||||
# from the host (see claudaris) — nothing to seed or symlink here.
|
||||
|
||||
# Create the main tmux session if it does not exist.
|
||||
/usr/bin/tmux new-session -d -s main 2>/dev/null || true
|
||||
|
||||
# tmux's defaults apply here (remain-on-exit off, exit-empty on): a window
|
||||
# closes when its shell exits, the session closes when its last window does,
|
||||
# and the server exits when its last session does. Poll for that and exit
|
||||
# the container once it happens, instead of running forever.
|
||||
while /usr/bin/tmux has-session -t main 2>/dev/null; do
|
||||
sleep 2
|
||||
done
|
||||
exit 0
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -eq 0 ]; then
|
||||
exec /usr/bin/tmux new-session -A -s main
|
||||
else
|
||||
exec /usr/bin/tmux "$@"
|
||||
fi
|
||||
@@ -0,0 +1,73 @@
|
||||
##### Terminal #####
|
||||
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -ga terminal-overrides ",*:Tc"
|
||||
|
||||
##### General #####
|
||||
|
||||
set -g mouse on
|
||||
set -g history-limit 100000
|
||||
set -g escape-time 0
|
||||
set -g focus-events on
|
||||
|
||||
# Always use bash interactively
|
||||
set-option -g default-shell /bin/bash
|
||||
set-option -g default-command "bash -i"
|
||||
|
||||
##### Status Bar #####
|
||||
|
||||
set -g status-position bottom
|
||||
set -g status-interval 5
|
||||
set -g status-justify left
|
||||
|
||||
# Deep indigo background
|
||||
set -g status-style "bg=#24283b,fg=#c0caf5"
|
||||
|
||||
# Remove default spacing
|
||||
set -g status-left-length 40
|
||||
set -g status-right-length 100
|
||||
|
||||
# Left
|
||||
set -g status-left "#[fg=#bb9af7,bold] #S #[fg=#565f89]|"
|
||||
|
||||
# Right
|
||||
set -g status-right "#[fg=#7aa2f7]%H:%M #[fg=#565f89]| #[fg=#9ece6a]%Y-%m-%d "
|
||||
|
||||
##### Windows #####
|
||||
|
||||
set -g window-status-format " #I:#W "
|
||||
set -g window-status-style "fg=#565f89,bg=#24283b"
|
||||
|
||||
set -g window-status-current-format " #I:#W "
|
||||
set -g window-status-current-style "fg=#1a1b26,bg=#bb9af7,bold"
|
||||
|
||||
set -g window-status-activity-style "fg=#e0af68,bold"
|
||||
|
||||
##### Pane Borders #####
|
||||
|
||||
set -g pane-border-style "fg=#414868"
|
||||
set -g pane-active-border-style "fg=#bb9af7"
|
||||
|
||||
##### Messages #####
|
||||
|
||||
set -g message-style "fg=#1a1b26,bg=#bb9af7"
|
||||
set -g message-command-style "fg=#1a1b26,bg=#7aa2f7"
|
||||
|
||||
##### Copy Mode #####
|
||||
|
||||
set -g mode-style "fg=#1a1b26,bg=#7dcfff"
|
||||
|
||||
##### Clock #####
|
||||
|
||||
set -g clock-mode-colour "#bb9af7"
|
||||
|
||||
##### Pane Numbers #####
|
||||
|
||||
set -g display-panes-active-colour "#bb9af7"
|
||||
set -g display-panes-colour "#565f89"
|
||||
|
||||
##### Bell #####
|
||||
|
||||
set -g visual-bell off
|
||||
set -g bell-action none
|
||||
|
||||
Reference in New Issue
Block a user