Skip to content

Commit c0cdbf4

Browse files
committedJun 24, 2020
chore: init config on thinkpad-p1
1 parent 87022fa commit c0cdbf4

File tree

127 files changed

+3526
-3472
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+3526
-3472
lines changed
 

‎Makefile

+3-23
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,13 @@ all:
1010
ohmyzsh:
1111
sh -c "$$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
1212
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH}/custom/plugins/zsh-syntax-highlighting
13-
14-
# If OSX install brew and some nice soft
15-
brew:
16-
# if [ -x brew ] ; then
17-
# /usr/bin/ruby -e "$$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
18-
# else
19-
# echo "Updating && upgrading brew..."
20-
# brew update && brew upgrade
21-
# fi
22-
# needed for tmux
23-
brew install reattach-to-user-namespace
24-
brew install docker docker-machine docker-compose
25-
brew install tig tmux tree htop sl colordiff vim fzf
26-
brew install cask
27-
brew install gnupg gpg-agent pinentry-mac
28-
brew tap homebrew/services
13+
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
2914

3015
link:
31-
ln -Fs $(CONFIGDIR)/vim $(HOME)/.vim
32-
ln -fs $(CONFIGDIR)/vim/vimrc $(HOME)/.vimrc
16+
ln -fs $(CONFIGDIR)/vimrc $(HOME)/.vimrc
3317
ln -fs $(CONFIGDIR)/zshrc $(HOME)/.zshrc
34-
ln -fs $(CONFIGDIR)/zshenv $(HOME)/.zshenv
35-
ln -fs $(CONFIGDIR)/bashrc $(HOME)/.bashrc
36-
ln -fs $(CONFIGDIR)/alias $(HOME)/.alias
3718
ln -fs $(CONFIGDIR)/gitconfig $(HOME)/.gitconfig
3819
ln -fs $(CONFIGDIR)/tmux/tmux.conf $(HOME)/.tmux.conf
3920
ln -Fs $(CONFIGDIR)/irssi $(HOME)/.irssi
4021
ln -Fs $(CONFIGDIR)/weechat $(HOME)/.weechat
41-
ln -Fs $(CONFIGDIR)/profile $(HOME)/.profile
42-
22+
ln -Fs $(CONFIGDIR)/xprofile $(HOME)/.xprofile

‎alias

+26-47
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- mode: sh -*-
12
# vi:syntax=sh
23

34
alias vi="vim"
@@ -14,30 +15,12 @@ alias zen="curl https://api.github.com/zen"
1415
alias pubip="dig +short myip.opendns.com @resolver1.opendns.com"
1516
alias localip="sudo ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'"
1617

17-
##################################
18-
# Docker Aliases #
19-
##################################
20-
21-
alias dck="docker"
22-
alias dckc="docker-compose"
23-
alias dckm="docker-machine"
24-
alias dckdel="docker rm -f \$(docker ps -aq)"
25-
alias dckclr="docker rmi -f \$(docker images -q --filter 'dangling=true')"
26-
27-
dckirssi() {
28-
docker run --rm -it --name dckirssi \
29-
-e TERM \
30-
-u $(id -u):$(id -g) \
31-
--log-driver=none \
32-
-v $HOME/.irssi:/home/user/.irssi:ro \
33-
irssi
34-
}
35-
36-
dckweechat() {
37-
docker run --rm -it --name dckweechat \
38-
-v $DOTFILES/weechat:/home/guest/.weechat \
39-
fstab/weechat-otr
40-
}
18+
# Same keybinding as on MacOS
19+
# cat file.txt | pbcopy
20+
if [[ "$(uname)" == "Linux" ]]; then
21+
alias pbcopy='xclip -selection clipboard'
22+
alias pbpaste='xclip -selection clipboard -o'
23+
fi
4124

4225
loop() {
4326
nb=$1
@@ -60,31 +43,27 @@ d2h() {
6043
echo "obase=16; $@" | bc
6144
}
6245

63-
42Only() {
64-
if [ -d "$(hostname | grep -E 'e\d*r\d*p\d*$')" ]; then
65-
$@
66-
fi
67-
}
46+
##################################
47+
# Docker Aliases #
48+
##################################
6849

69-
VPOnly() {
70-
if [ -n "$(hostname | grep 'vp.42.fr')" ]; then
71-
$@
72-
fi
73-
}
50+
alias dck="docker"
51+
alias dckc="docker-compose"
52+
alias dckm="docker-machine"
53+
alias dckdel="docker rm -f \$(docker ps -aq)"
54+
alias dckclr="docker rmi -f \$(docker images -q --filter 'dangling=true')"
7455

75-
homeOnly () {
76-
if [ ! -d /goinfre ]; then
77-
$@
78-
fi
56+
dckirssi() {
57+
docker run --rm -it --name dckirssi \
58+
-e TERM \
59+
-u $(id -u):$(id -g) \
60+
--log-driver=none \
61+
-v $HOME/.irssi:/home/user/.irssi:ro \
62+
irssi
7963
}
8064

81-
function gitall() {
82-
git add .
83-
if [ -n "$1" ]
84-
then
85-
git commit -m "$1"
86-
else
87-
git commit -m update
88-
fi
89-
git push origin HEAD
65+
dckweechat() {
66+
docker run --rm -it --name dckweechat \
67+
-v $DOTFILES/weechat:/home/guest/.weechat \
68+
fstab/weechat-otr
9069
}

0 commit comments

Comments
 (0)
Please sign in to comment.