Compare commits
14 Commits
0d8cbde369
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 470ed4a7b2 | |||
| d613476129 | |||
| 2972d5c3dc | |||
| 0062fbf550 | |||
| 6c93ca5052 | |||
| c8ba38833f | |||
| 0a8c6c6553 | |||
| 4df23bbe78 | |||
| 9f75ebf473 | |||
| 05c6e1381b | |||
| bd49782e10 | |||
| e0aa301737 | |||
| d7857f2385 | |||
| b397c654b6 |
2
Makefile
2
Makefile
@@ -11,7 +11,7 @@ MV := ${Q}mv
|
||||
|
||||
# Make sure that all files moved during this invokation of make get the same
|
||||
# timestamp.
|
||||
TS := $(shell date -Iseconds)
|
||||
TS := $(shell date +%Y-%m-%d-T%H:%M:%S%z)
|
||||
|
||||
OHMYZSH_URL := https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
|
||||
VUNDLE_URL := https://github.com/gmarik/vundle.git
|
||||
|
||||
@@ -10,7 +10,7 @@ The configuration relies on Vundle and expects a Nerd Font.
|
||||
|
||||
### ZSH
|
||||
|
||||
The configuration relies on [Ho My Zsh](https://ohmyz.sh).
|
||||
The configuration relies on [Oh My Zsh](https://ohmyz.sh).
|
||||
|
||||
The target to install it is **not** automatically triggered at this time, even with `make all`.
|
||||
|
||||
|
||||
@@ -16,20 +16,31 @@ alias grep='grep --color=auto'
|
||||
|
||||
alias weather='curl -H "Accept-Language: en" http://wttr.in/Lausanne'
|
||||
|
||||
function dias() {
|
||||
n=$1
|
||||
shift
|
||||
ssh diascld$n.iccluster.epfl.ch -A -Y $@
|
||||
function _ssh_wrap() {
|
||||
if [ ! $# -gt 1 ]
|
||||
then
|
||||
echo "Usage: ${0} remote_host [ssh arguments] command"
|
||||
return
|
||||
fi
|
||||
local n="${1}"; shift
|
||||
ssh ${n} -A -Y "$@"
|
||||
}
|
||||
|
||||
function diasrange() {
|
||||
start=$1
|
||||
end=$2
|
||||
shift; shift;
|
||||
function ssh_range() {
|
||||
if [ ! $# -gt 3 ]
|
||||
then
|
||||
echo "Usage: ${0} remote_prefix start end [ssh arguments] command"
|
||||
return
|
||||
fi
|
||||
local prefix="${1}"; shift
|
||||
local start="${1}"; shift
|
||||
local end="${1}"; shift
|
||||
|
||||
for d in $(seq ${start} ${end})
|
||||
do
|
||||
echo diascld$d
|
||||
dias $d -x "$@"
|
||||
echo ------------------------------------------------------------------------------
|
||||
local remote="${prefix}${d}"
|
||||
echo "${remote}"
|
||||
_ssh_wrap "${remote}" -x "$@"
|
||||
echo "------------------------------------------------------------------------------"
|
||||
done
|
||||
}
|
||||
|
||||
@@ -46,6 +46,10 @@ Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
# App specific configurations
|
||||
.obsidian
|
||||
.idea
|
||||
|
||||
# Hidden files
|
||||
#.??* # Remove this comment in a project
|
||||
|
||||
|
||||
@@ -1,11 +1,34 @@
|
||||
#set -g default-terminal "screen-255color"
|
||||
# Enable 265 colors
|
||||
# https://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-a-256-colour-terminal
|
||||
set -g default-terminal "tmux-256color"
|
||||
|
||||
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
|
||||
#Does not work with Terminal.app?
|
||||
#set -as terminal-overrides ",*:RGB"
|
||||
|
||||
# Might be useful with Windows Terminal
|
||||
#set -g default-terminal "screen-255color"
|
||||
# Enable xterm scrolling
|
||||
#set -g terminal-overrides 'xterm*:smcup@:rmcup@'
|
||||
|
||||
# Enable mouse support
|
||||
set -g mouse on
|
||||
bind-key -T prefix m set -g mouse\; display 'Mouse: #{?mouse,ON,OFF}'
|
||||
|
||||
# Copy to system clipboard
|
||||
if-shell "uname | grep -q Darwin" \
|
||||
'bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"' \
|
||||
'bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard"'
|
||||
if-shell "uname | grep -q Darwin" \
|
||||
'bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"' \
|
||||
'bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection clipboard"'
|
||||
|
||||
# Highlight pane with activity
|
||||
setw -g monitor-activity on
|
||||
|
||||
# THEME
|
||||
set -g pane-border-lines double
|
||||
set -g pane-active-border-style fg=blue
|
||||
|
||||
set -g status-bg white
|
||||
set -g status-fg black
|
||||
set -g status-left-length 30
|
||||
@@ -13,5 +36,5 @@ set -g status-right-length 60
|
||||
set -g status-left '#[fg=black] [#S] #[default]'
|
||||
set -g status-right '#[fg=black]%H:%M#[default] '
|
||||
|
||||
setw -g window-status-format '#[fg=blue]#I#[fg=black]:#W#[default]'
|
||||
setw -g window-status-current-format '#[bg=black,fg=white]#I:#W#[default]'
|
||||
setw -g window-status-format '#[fg=red]#I#[fg=darkblue]:#W#F#[default]'
|
||||
setw -g window-status-current-format '#[bg=black,fg=white]#I:#W#F#[default]'
|
||||
|
||||
47
_profile
47
_profile
@@ -1,3 +1,5 @@
|
||||
[ $SHLVL -gt 1 ] && return
|
||||
|
||||
# ~/.profile: executed by the command interpreter for login shells.
|
||||
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
|
||||
# exists.
|
||||
@@ -8,6 +10,31 @@
|
||||
# for ssh logins, install and configure the libpam-umask package.
|
||||
#umask 022
|
||||
|
||||
# Store preferences on MacOS in .config
|
||||
export XDG_CONFIG_HOME=$HOME/.config
|
||||
|
||||
# Add brew
|
||||
if [ -x "/opt/homebrew/bin/brew" ]; then
|
||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
fi
|
||||
|
||||
# Add ~/bin
|
||||
if [ -e "${HOME}/bin" ]; then
|
||||
PATH="${HOME}/bin:${PATH}"
|
||||
fi
|
||||
|
||||
# Add cargo
|
||||
if [ -e "${HOME}/.cargo/env" ]; then
|
||||
. "${HOME}/.cargo/env"
|
||||
fi
|
||||
|
||||
export PATH
|
||||
|
||||
# Set language to English, UTF-8
|
||||
export LC_ALL=en_US.UTF-8
|
||||
export LC_CTYPE=en_US.UTF-8
|
||||
export LANG=en_US.UTF-8
|
||||
|
||||
# Host-specific alias definitions
|
||||
if [ -f "${HOME}/.host.profile" ]; then
|
||||
. "${HOME}/.host.profile"
|
||||
@@ -20,23 +47,3 @@ if [ -n "${BASH_VERSION}" ]; then
|
||||
. "${HOME}/.bashrc"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Add brew
|
||||
if [ -x "/opt/homebrew/bin/brew" ]; then
|
||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
fi
|
||||
|
||||
# Add ~/bin
|
||||
if [ -e "${HOME}/bin" ]; then
|
||||
PATH="${HOME}/bin:${PATH}"
|
||||
fi
|
||||
|
||||
# Add cargo
|
||||
if [ -f "${HOME}/.cargo/env" ]; then
|
||||
. "$HOME/.cargo/env"
|
||||
fi
|
||||
|
||||
# Set language to English, UTF-8
|
||||
export LC_ALL=en_US.UTF-8
|
||||
export LC_CTYPE=en_US.UTF-8
|
||||
export LANG=en_US.UTF-8
|
||||
|
||||
10
m1.epfl.ch.bash_aliases
Normal file
10
m1.epfl.ch.bash_aliases
Normal file
@@ -0,0 +1,10 @@
|
||||
alias dcb='devcontainer build --workspace-folder $(git rev-parse --show-toplevel)'
|
||||
alias dce='devcontainer exec --workspace-folder $(git rev-parse --show-toplevel)'
|
||||
alias dcu='devcontainer up --workspace-folder $(git rev-parse --show-toplevel)'
|
||||
|
||||
alias k='kubectl'
|
||||
alias meld=/Applications/Meld.app/Contents/MacOS/Meld
|
||||
|
||||
if /usr/bin/which -s pyenv; then
|
||||
alias brew='env PATH="${PATH//$(pyenv root)\/shims:/}" brew'
|
||||
fi
|
||||
39
m1.epfl.ch.profile
Normal file
39
m1.epfl.ch.profile
Normal file
@@ -0,0 +1,39 @@
|
||||
for d in \
|
||||
"${HOME}/.dotnet/tools" \
|
||||
"/opt/homebrew/opt/dotnet@9/bin" \
|
||||
"${HOME}/go/bin" \
|
||||
"${HOME}/.local/bin" \
|
||||
"${HOME}/.bun" \
|
||||
;
|
||||
do
|
||||
if [ -d ${d} ]; then
|
||||
PATH="${d}:${PATH}"
|
||||
fi
|
||||
done
|
||||
|
||||
# pyenv support
|
||||
export PYENV_ROOT="${HOME}/.pyenv"
|
||||
[[ -d ${PYENV_ROOT}/bin ]] && export PATH="${PYENV_ROOT}/bin:${PATH}"
|
||||
eval "$(pyenv init -)"
|
||||
|
||||
# pyenv-virtualenv
|
||||
eval "$(pyenv virtualenv-init -)"
|
||||
|
||||
# DotNet support
|
||||
export DOTNET_ROOT="/opt/homebrew/opt/dotnet@9/libexec"
|
||||
|
||||
export PATH
|
||||
|
||||
#export API_KEY_INPUT="d07304e9c314b20c7ac022d6b0c328a5"
|
||||
|
||||
# Terraform cache folder is 400MiB per projects...
|
||||
export TF_PLUGIN_CACHE_DIR="${HOME}/.cache/terraform/plugins"
|
||||
|
||||
# Set default config for k9s
|
||||
export K9S_CONFIG_DIR="${HOME}/.config/k9s"
|
||||
|
||||
# bun completions
|
||||
[ -s "/Users/sambuc/.bun/_bun" ] && source "/Users/sambuc/.bun/_bun"
|
||||
|
||||
# bun
|
||||
export BUN_INSTALL="$HOME/.bun"
|
||||
1
m1.epfl.ch.zshrc
Normal file
1
m1.epfl.ch.zshrc
Normal file
@@ -0,0 +1 @@
|
||||
p="${HOME}/Projects"
|
||||
Reference in New Issue
Block a user