Compare commits

...

13 Commits

Author SHA1 Message Date
bd49782e10 Use manual format for older 'date' commands
MacOS Big Sur's date command does not support `-Iseconds`.
2024-10-14 11:05:11 +02:00
e0aa301737 Rename and improve range ssh functions 2024-10-04 16:21:54 +02:00
d7857f2385 tmux config tweaks 2024-09-19 20:36:46 +02:00
b397c654b6 Fix typo in README 2024-09-15 14:41:36 +02:00
0d8cbde369 Update default configs 2024-09-15 12:53:34 +02:00
b5ee11e126 Update URXVT config 2024-09-15 10:21:04 +02:00
2c44cf17e2 Fix aliases file names 2024-09-15 10:20:24 +02:00
d2267c7529 Fixes 2023-04-08 16:42:03 +02:00
abe39a16f3 Improve Makefile & shell configs
* Add cross platform support in Makefile

 * Add host-specific configurations support.
2023-04-08 11:49:38 +02:00
ecff222168 Fix _xsession symlink 2023-04-06 06:53:18 +02:00
3cf804b159 Cleanup Makefile and shell configs 2023-04-06 06:45:09 +02:00
4f2a71c217 Cleanup of zsh theme 2023-04-02 10:38:06 +02:00
b7e3874312 Adding Makefile and zprofile/xsession 2023-04-01 20:50:36 +02:00
24 changed files with 356 additions and 247 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
omz-setup.sh

127
Makefile Normal file
View File

@@ -0,0 +1,127 @@
# Override on the command line, for example
# make Q=""
# would print on the console all the commands being run, instead of just their outputs
Q := @
# The role of echo is to print, so never print the command itsef
ECHO := @echo
LN := ${Q}ln -sf
MKDIR := ${Q}mkdir -p
MV := ${Q}mv
# Make sure that all files moved during this invokation of make get the same
# timestamp.
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
# Some things have to be done in varying ways depending on the OS
ARCH := $(shell uname -s)
# For GNU/Linux
ifeq (${ARCH},Linux)
ARCH_DEFINED := ok
HOSTNAME := $(shell hostname)
endif
# For MacOS X
ifeq (${ARCH},Darwin)
ARCH_DEFINED := ok
HOSTNAME := $(shell hostname -s)
endif
# For Windows
ifeq ($(word 2,$(subst -, ,$(subst _, ,${ARCH}))),NT)
ARCH_DEFINED := ok
HOSTNAME := $(shell hostname)
endif
ifneq (${ARCH_DEFINED},ok)
$(info )
$(info :: ERROR: Please add the necessary support or use one of:)
$(info :: Linux, Mac OS X (Darwin), Windows.)
$(info )
$(error Unsupported architecture: $(ARCH))
else
.PHONY:
help:
${ECHO} "help:\tShow this help"
${ECHO} "all:\tSetup all the dot files in one go"
${ECHO}
${ECHO} "omz:\tInstall oh-my-zsh"
${ECHO} "git:\tInstall GIT configuration files"
${ECHO} "bash:\tInstall BASH configuration files"
${ECHO} "zsh:\tInstall ZSH configuration files"
${ECHO} "vim:\tInstall VIM configuration files"
${ECHO} "tmux:\tInstall tmux configuration files"
${ECHO} "x11:\tInstall X configuration files"
${ECHO} "i3:\tInstall i3wm configuration files"
${ECHO}
.PHONY:
all: sh bash zsh git vim x11 i3
@# Prevent running the pattern rule
.PHONY:
git: config/git
@# Prevent running the pattern rule
config/git: config/dir
.PHONY:
sh: profile
@# Prevent running the pattern rule
.PHONY:
bash: profile bashrc bash_aliases bash_logout
@# Prevent running the pattern rule
.PHONY:
zsh: profile zprofile zshrc oh-my-zsh/themes/sambuc.zsh-theme
@# Prevent running the pattern rule
oh-my-zsh/themes/sambuc.zsh-theme: oh-my-zsh/themes/dir
.PHONY:
omz:
${MV} "${HOME}/.oh-my-zsh" "${HOME}/.oh-my-zsh-${TS}" || true
@curl -fsSL ${OHMYZSH_URL} > omz-setup.sh
@sh omz-setup.sh --unattended
.PHONY:
vim: vim/bundle/vundle
${ECHO}
vim +BundleInstall +qall
${ECHO}
${ECHO} Do not forget to install and set a Nerdfont enhanced font.
vim/bundle/vundle: vim/bundle/dir vimrc vim/filetype.vim vim/syntax
${MV} "${HOME}/.$@" "${HOME}/.$@-${TS}" || true
git clone "${VUNDLE_URL}" "${HOME}/.$@"
vim/filetype.vim vim/syntax: .vim/dir
.PHONY:
tmux: config/tmux
@# Prevent running the pattern rule
config/tmux: config/dir
.PHONY:
i3: config/i3 config/i3status.conf
@# Prevent running the pattern rule
config/i3 config/i3status.conf: config/dir
.PHONY:
x11: Xdefaults xinitrc xsession
@# Prevent running the pattern rule
%/dir:
${MKDIR} "${HOME}/.$(shell dirname $@)"
%:
@# Prevent generating link within links to folders
${Q}[ -e ${HOME}/.$* ] && mv ${HOME}/.$* ${HOME}/.$*-${TS} || true
${LN} $(shell pwd)/_$* ${HOME}/.$*
${Q}[ -e ${HOSTNAME}.$* ] && ( [ -e ${HOME}/.host.$* ] && mv ${HOME}/.host.$* ${HOME}/.host.$*-${TS}; ln -s $(shell pwd)/${HOSTNAME}.$* ${HOME}/.host.$* ) || true
endif

View File

@@ -2,11 +2,27 @@
This repository contains my personal profile configuration.
## VIM
## Notes
### VIM
The configuration relies on Vundle and expects a Nerd Font.
### ZSH
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`.
### Host-specific config
You can add host specific configuration by adding named it the following way:
```sh
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
vim +BundleInstall +qall
${hostname}.profile # Used by both zsh & bash
${hostname}.zshrc
${hostname}.bashrc
${hostname}.aliases # Used by both zsh & bash
```
If such files exist when you install the configuration files, symlink will be added and they will be automatically picked up by the configuration.

View File

@@ -1,26 +1,28 @@
!Clickable links:
URxvt.perl-ext-common: default,matcher
URxvt.url-launcher: /usr/bin/epiphany
URxvt.url-launcher: /usr/bin/firefox
URxvt.colorUL: #4682B4
URxvt.matcher.button: 1
!For use in ssh connexion to minix hosts
!For use in ssh connexion to remote hosts
URxvt*termName: rxvt-256color
!Urgent hint so that I get red borders in i3
XTerm*bellIsUrgent: true
Rxvt*urgentOnBell: true
Rxvt*background: black
Rxvt*foreground: grey
Rxvt*transparent: true
#Rxvt*transparent: true
Rxvt*shading: 25
Rxvt*font: xft:Droid Sans Mono for Powerline:12
URxvt*scrollBar: false
!Font name should be in lower case!
Rxvt*font: xft:jetbrainsmono nerd font mono:size=14
Rxvt*scrollBar: false
XTerm*background: black
XTerm*foreground: grey
XTerm*renderFont: true
XTerm*faceName: xft:Droid Sans Mono for Powerline:12
XTerm*faceName: xft:jetbrainsmono nerd font mono:size=14
XTerm*scrollBar: false
!black

View File

@@ -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
}

View File

@@ -80,9 +80,19 @@ if [ -x /bin/dircolors ]; then
alias ls='ls --color=auto'
fi
# Alias definitions.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
# Host-specific definitions
if [ -f "${HOME}/.host.bashrc" ]; then
. "${HOME}/.host.bashrc"
fi
# Alias definitions
if [ -f "${HOME}/.bash_aliases" ]; then
. "${HOME}/.bash_aliases"
fi
# Host-specific alias definitions
if [ -f "${HOME}/.host.bash_aliases" ]; then
. "${HOME}/.host.bash_aliases"
fi
#colorize stderr
@@ -90,28 +100,29 @@ function swapandcolorize()
{
# "$@" 3>&2 2>&1 1>&3 | while read line
# do
# echo -e "\e[91m$line\e[0m"
# echo -e "\e[91m$line\e[0m"
# done
"$@" 3>&2 2>&1 1>&3 | perl -e 'while(<>)
{
chomp;
#Print in LYELLOW and blue background xenomai stuff warning and such
if (m/^xenomai.+:\d+:(\d+:)?\s+warning.*/)
{print "\033[1;45m".$_."\033[m\n"; next;}
"$@" 3>&2 2>&1 1>&3 | perl -e 'while(<>)
{
chomp;
#Print in LYELLOW and blue background xenomai stuff warning and such
if (m/^xenomai.+:\d+:(\d+:)?\s+warning.*/)
{print "\033[1;45m".$_."\033[m\n"; next;}
#Print in DARKBLUE forced warnings
if (m/.*\#warning.*/)
{print "\033[1;34m".$_."\033[m\n"; next;}
#Print in LYELLOW warning and such
if (m/.+:\d+:(\d+:)?\s+warning.*/)
{print "\033[1;33m".$_."\033[m\n"; next;}
#print in LRED errors
if (m/.+:\d+:(\d+:)?\s+error.*/ ||
m/.+:\d+:(\d+:)? undefined reference to `/)
{print "\033[1;31m".$_."\033[m\n"; next;}
#Print in default colors
{print "\033[m".$_."\n"; next;}
};'
return ${PIPESTATUS[0]}
#Print in DARKBLUE forced warnings
if (m/.*\#warning.*/)
{print "\033[1;34m".$_."\033[m\n"; next;}
#Print in LYELLOW warning and such
if (m/.+:\d+:(\d+:)?\s+warning.*/)
{print "\033[1;33m".$_."\033[m\n"; next;}
#print in LRED errors
if (m/.+:\d+:(\d+:)?\s+error.*/ ||
m/.+:\d+:(\d+:)? undefined reference to `/)
{print "\033[1;31m".$_."\033[m\n"; next;}
#Print in default colors
{print "\033[m".$_."\n"; next;}
};'
return ${PIPESTATUS[0]}
}
export -f swapandcolorize

View File

@@ -19,7 +19,7 @@ font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec terminal
bindsym $mod+Return exec urxvt
# kill focused window
bindsym $mod+Shift+Q kill
@@ -27,8 +27,9 @@ bindsym $mod+Shift+Q kill
# start dmenu (a program launcher)
bindsym $mod+d exec dmenu_run
# Lock screen
bindsym $mod+Mod1+del exec xscreensaver-command -lock
# Lock screen
bindsym $mod+Mod1+l exec xscreensaver-command -lock
#bindsym $mod+Mod1+l exec i3lock -c cccccc -i ~/Pictures/bg.png
# change focus
bindsym $mod+j focus left
@@ -93,16 +94,28 @@ bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
# move focused container to workspace
bindsym $mod+Shift+plus move workspace 1
bindsym $mod+Shift+quotedbl move workspace 2
bindsym $mod+Shift+asterisk move workspace 3
bindsym $mod+Shift+ccedilla move workspace 4
# fr_CH layout
#bindsym $mod+Shift+plus move workspace 1
#bindsym $mod+Shift+quotedbl move workspace 2
#bindsym $mod+Shift+asterisk move workspace 3
#bindsym $mod+Shift+ccedilla move workspace 4
#bindsym $mod+Shift+percent move workspace 5
#bindsym $mod+Shift+ampersand move workspace 6
#bindsym $mod+Shift+slash move workspace 7
#bindsym $mod+Shift+parenleft move workspace 8
#bindsym $mod+Shift+parenright move workspace 9
#bindsym $mod+Shift+equal move workspace 10
# us_en Layout
bindsym $mod+Shift+exclam move workspace 1
bindsym $mod+Shift+at move workspace 2
bindsym $mod+Shift+numbersign move workspace 3
bindsym $mod+Shift+dollar move workspace 4
bindsym $mod+Shift+percent move workspace 5
bindsym $mod+Shift+ampersand move workspace 6
bindsym $mod+Shift+slash move workspace 7
bindsym $mod+Shift+parenleft move workspace 8
bindsym $mod+Shift+parenright move workspace 9
bindsym $mod+Shift+equal move workspace 10
bindsym $mod+Shift+asciicircum move workspace 6
bindsym $mod+Shift+ampersand move workspace 7
bindsym $mod+Shift+asterisk move workspace 8
bindsym $mod+Shift+parenleft move workspace 9
bindsym $mod+Shift+parenright move workspace 10
# reload the configuration file
bindsym $mod+Shift+C reload
@@ -153,14 +166,19 @@ bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
exec xscreensaver
exec eval $(cat ~/.fehbg)
#exec i3status | i3bar --dock=top --font '-misc-liberation mono-medium-r-*-*-*-*-*-*-*-*-iso8859-*'
exec xscreensaver -no-splash
exec alsactl restore
exec sh ~/.fehbg
#If you have several keyboard layout, to enable switching between them
#exec setxkbmap -option 'grp:menu_toggle' 'us,ch(fr)'
bar {
status_command i3status
position top
position top
workspace_buttons yes
font -misc-liberation mono-medium-r-*-*-*-*-*-*-*-*-iso8859-*
#font -misc-liberation mono-medium-r-*-*-*-*-*-*-*-*-iso8859-*
font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
colors {
background #333333

24
_config/tmux/tmux.conf Normal file
View File

@@ -0,0 +1,24 @@
# 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
# 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
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#F#[default]'
setw -g window-status-current-format '#[bg=black,fg=white]#I:#W#F#[default]'

View File

@@ -0,0 +1,39 @@
if [ "$(whoami)" = "root" ]
then
USERCOLOR="red"
else
USERCOLOR="green"
fi
local reset_color="%b%u%s%k%f"
local field_color="%b%F{white}"
local sep_color="%B%F{white}"
local time_field="%B%F{blue}%D{%H:%M}"
local user_field="%B%F{$USERCOLOR}%n"
local host_field="${field_color}%m"
local path_field="${field_color}%20<..<%~%<<"
local return_code="%(?.. %B%F{red}%?)"
# With Git status
PROMPT='${time_field}${sep_color} [${user_field}${sep_color}@${host_field}${sep_color}:${path_field}${sep_color}]$(git_prompt_info)${return_code} %B%F{yellow}»${reset_color} '
# Without Git status
#PROMPT='${time_field}${sep_color} [${user_field}${sep_color}@${host_field}${sep_color}:${path_field}${sep_color}]${return_code} %B%F{yellow}»${reset_color} '
# GIT Status theming
ZSH_THEME_GIT_PROMPT_PREFIX=" %b%F{red}"
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_CLEAN="%B%F{green}✔"
ZSH_THEME_GIT_PROMPT_DIRTY="%B%F{red}✗"
# LS colors, made with http://geoff.greer.fm/lscolors/
#export LSCOLORS="Gxfxcxdxbxegedabagacad"
#export LS_COLORS="rs=0:di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43"
# Redefine git_prompt_info, just grab the branch name, if there is one.
# This is much faster in large repositories.
function git_prompt_info () {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$ZSH_THEME_GIT_PROMPT_SUFFIX"
}

View File

@@ -8,27 +8,35 @@
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# Host-specific alias definitions
if [ -f "${HOME}/.host.profile" ]; then
. "${HOME}/.host.profile"
fi
# When running bash
if [ -n "$BASH_VERSION" ]; then
if [ -n "${BASH_VERSION}" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
if [ -f "${HOME}/.bashrc" ]; then
. "${HOME}/.bashrc"
fi
fi
# Add brew
if [ -x /opt/homebrew/bin/brew ]; then
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"
if [ -e "${HOME}/bin" ]; then
PATH="${HOME}/bin:${PATH}"
fi
# Add cargo
if [ -e "$HOME/.cargo/bin" ]; then
PATH="$HOME/.cargo/bin:$PATH"
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

View File

@@ -1,6 +1,7 @@
"
" PLUGINS IMPORT
""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible " be iMproved, required
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
@@ -21,13 +22,14 @@ filetype plugin indent on
"
" GLOBALS
""""""""""""""""""""""""""""""""""""""""""""""""""""""
filetype plugin indent on
colorscheme elflord
syntax on
let mapleader=","
set t_Co=256
colorscheme elflord
set gfn=terminus
set go=
syntax on
set encoding=utf-8
set hidden
set showcmd
@@ -51,7 +53,6 @@ set list
set listchars=tab:>.,trail:.,extends:#,nbsp:.
set ttyfast
set mouse=
set nocompatible
"set backup
"set backupdir=~/.vim_backup
"set noswapfile
@@ -60,7 +61,6 @@ set laststatus=2
"set expandtab
set softtabstop=8 tabstop=8 shiftwidth=4
set ruler
set nocompatible
"
" KEYBINDINGS
@@ -84,16 +84,10 @@ let g:CommandTMaxHeight = 12
"
" SPECIFIC CONFIGURATION
""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Insert date.
iab xdate <c-r>=strftime("%Y/%m/%d %H:%M:%S")<cr>
" What's my name?
iab xname Lionel Sambuc
autocmd BufNewFile,BufRead *.md set filetype=markdown
" Acronyme
iab xac (LSU)
" Default printk
iab xpk printk("(LSU) %s:%i:%s ## %s\n", __FILE__, __LINE__, __func__, "msg");
" Case sensitive search and replace by default
set noic
" Enable folding by indentation
" Use: zc, zo, zC, zO, zR, zM

View File

@@ -4,7 +4,6 @@
#
# Executed by startx (run your window manager from here)
# Qingy does not source profile...
[ -f /etc/profile ] && . /etc/profile
if [ -d /etc/X11/xinit/xinitrc.d ]; then
@@ -14,10 +13,6 @@ if [ -d /etc/X11/xinit/xinitrc.d ]; then
unset f
fi
# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice
#exec ck-launch-session dbus-launch --exit-with-session startxfce4
exec ck-launch-session ssh-agent dbus-launch --exit-with-session i3 --force-xinerama
exec ck-launch-session ssh-agent dbus-launch --exit-with-session i3 --force-xinerama

1
_xsession Symbolic link
View File

@@ -0,0 +1 @@
_xinitrc

1
_zprofile Symbolic link
View File

@@ -0,0 +1 @@
_profile

View File

@@ -11,7 +11,7 @@ export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="robbyrussell"
ZSH_THEME="clean" #all info, nice color, time on the right
ZSH_THEME="gnzh" # two liner, nice arrow
ZSH_THEME="lsambuc" # one liner, fixed path, time, hostname
ZSH_THEME="sambuc" # one liner, fixed path, time, hostname
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
@@ -109,7 +109,17 @@ unsetopt correct_all
export VISUAL=vi
export EDITOR=vi
# Alias definitions.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
# Host-specific definitions
if [ -f "${HOME}/.host.zshrc" ]; then
. "${HOME}/.host.zshrc"
fi
# Alias definitions
if [ -f "${HOME}/.bash_aliases" ]; then
. "${HOME}/.bash_aliases"
fi
# Host-specific alias definitions
if [ -f "${HOME}/.host.bash_aliases" ]; then
. "${HOME}/.host.bash_aliases"
fi

View File

@@ -1,30 +0,0 @@
if [ "$(whoami)" = "root" ]; then USERCOLOR="red"; else USERCOLOR="green"; fi
local return_code="%(?.. %{$fg[red]%}%?%{$reset_color%})"
local time_field="%{$fg_bold[blue]%}%D{%H:%M}"
local user_field="%{$fg_bold[$USERCOLOR]%}%n"
local path_field="%{$reset_color%}%20<..<%~%<<"
# With Git status
PROMPT='${time_field} %{$fg_bold[white]%}[${user_field}%{${reset_color}%}@%m%{$fg_bold[blue]%}:${path_field}%{$fg_bold[white]%}]$(git_prompt_info)${return_code} %{${fg_bold[yellow]}%}»%{${reset_color}%} '
# Without Git status
#PROMPT='${time_field} $fg_bold[white][${user_field}%{${reset_color}%}@%m%{$fg_bold[blue]%}:${path_field}$fg_bold[white]] %{${fg_bold[yellow]}%}»%{${reset_color}%} '
# GIT Status theming
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg_bold[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}✔"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}✗"
# LS colors, made with http://geoff.greer.fm/lscolors/
#export LSCOLORS="Gxfxcxdxbxegedabagacad"
#export LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:'
# Redefine git_prompt_info
function git_prompt_info () {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$ZSH_THEME_GIT_PROMPT_SUFFIX"
}

4
omoikane.profile Normal file
View File

@@ -0,0 +1,4 @@
# Add brew
if [ -x "/opt/homebrew/bin/brew" ]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi

123
tmux.conf
View File

@@ -1,123 +0,0 @@
set -g default-terminal "screen-256color"
set -g status-utf8 on
bind M source-file ~/.tmux/mac.session
bind L source-file ~/.tmux/linux.session
# set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# THEME
set -g status-bg black
set -g status-fg white
set -g status-left-length 30
set -g status-right-length 60
set -g status-left ' #[default]'
set -g status-right '#[fg=colour235]Inbox: #[fg=yellow]#(ls ~/Mails/INBOX/new | wc -l | tr -d " ")#[fg=colour235]/#(ls ~/Mails/INBOX/cur ~/Mails/INBOX/new | wc -l | tr -d " ") | Bugzilla: #[fg=yellow]#(ls ~/Mails/bugzilla/new | wc -l | tr -d " ")#[fg=colour235]/#(ls ~/Mails/bugzilla/cur ~/Mails/bugzilla/new| wc -l | tr -d " ") | ml: #[fg=yellow]#(ls ~/Mails/lists/new | wc -l | tr -d " ")#[fg=colour235]/#(ls ~/Mails/lists/cur ~/Mails/lists/new | wc -l | tr -d " ")#[default] #[fg=colour198]%H:%M#[default]'
setw -g window-status-format '#[fg=colour235]#I #[fg=white]#W#[default] '
#FIXME: I want to be able to use: ⮁
setw -g window-status-current-format '#[bg=white,fg=black]⮀ #W #[bg=black,fg=white]⮀'
######################### SCREEN BINDINGS ######################
# $Id: screen-keys.conf,v 1.7 2010/07/31 11:39:13 nicm Exp $
#
# By Nicholas Marriott. Public domain.
#
# This configuration file binds many of the common GNU screen key bindings to
# appropriate tmux key bindings. Note that for some key bindings there is no
# tmux analogue and also that this set omits binding some commands available in
# tmux but not in screen.
#
# Note this is only a selection of key bindings and they are in addition to the
# normal tmux key bindings. This is intended as an example not as to be used
# as-is.
# Set the prefix to ^A.
unbind C-b
set -g prefix ^A
bind a send-prefix
# Bind appropriate commands similar to screen.
# lockscreen ^X x
unbind ^X
bind ^X lock-server
unbind x
bind x lock-server
# screen ^C c
unbind ^C
bind ^C new-window
bind c new-window
# detach ^D d
unbind ^D
bind ^D detach
# displays *
unbind *
bind * list-clients
# next ^@ ^N sp n
unbind ^@
bind ^@ next-window
unbind ^N
bind ^N next-window
unbind " "
bind " " next-window
unbind n
bind n next-window
# title A
unbind A
bind A command-prompt "rename-window %%"
# other ^A
unbind ^A
bind ^A last-window
# prev ^H ^P p ^?
unbind ^H
bind ^H previous-window
unbind ^P
bind ^P previous-window
unbind p
bind p previous-window
unbind BSpace
bind BSpace previous-window
# windows ^W w
unbind ^W
bind ^W list-windows
unbind w
bind w list-windows
# quit \
unbind \
bind \ confirm-before "kill-server"
# kill K k
unbind K
bind K confirm-before "kill-window"
unbind k
bind k confirm-before "kill-window"
# redisplay ^L l
unbind ^L
bind ^L refresh-client
unbind l
bind l refresh-client
# split -v |
unbind |
bind | split-window
# :kB: focus up
unbind Tab
bind Tab select-pane -t:.+
unbind BTab
bind BTab select-pane -t:.-
# " windowlist -b
unbind '"'
bind '"' choose-window