Remove laptop-specific code
Signed-off-by: Emmy D'Anello <ynerant@crans.org>
This commit is contained in:
@ -1,20 +1,21 @@
|
||||
---
|
||||
- name: Install cli utilities
|
||||
- name: Install useful utilities
|
||||
package:
|
||||
name:
|
||||
- bash
|
||||
- bash-completion
|
||||
- bat
|
||||
- curl
|
||||
- "{% if ansible_os_family == 'Debian' %}dnsutils{% else %}bind-tools{% endif %}"
|
||||
- dnsutils
|
||||
- git
|
||||
- htop
|
||||
- man
|
||||
- molly-guard
|
||||
- mtr-tiny
|
||||
- needrestart
|
||||
- "mtr{% if ansible_os_family == 'Debian' %}-tiny{% endif %}"
|
||||
- sl
|
||||
- htop
|
||||
- patch
|
||||
- rsync
|
||||
- sl
|
||||
- sudo
|
||||
- tmux
|
||||
- traceroute
|
||||
@ -24,30 +25,3 @@
|
||||
register: pkg_result
|
||||
retries: 3
|
||||
until: pkg_result is succeeded
|
||||
|
||||
- name: Create directory hierarchy
|
||||
file:
|
||||
path: '.config/{{ item }}'
|
||||
state: directory
|
||||
owner: '{{ user.name }}'
|
||||
group: '{{ user.name }}'
|
||||
mode: 0755
|
||||
with_items:
|
||||
- 'git/'
|
||||
- 'bash/'
|
||||
become_user: "{{ user.name }}"
|
||||
|
||||
- name: Deploying config files
|
||||
template:
|
||||
src: '{{ item.src }}'
|
||||
dest: '{{ item.dest }}'
|
||||
owner: '{{ user.name }}'
|
||||
group: '{{ user.name }}'
|
||||
mode: 0644
|
||||
with_items:
|
||||
- { src: bashrc.j2, dest: .bashrc }
|
||||
- { src: inputrc.j2, dest: .inputrc }
|
||||
- { src: bash_aliases.j2, dest: .config/bash/bash_aliases }
|
||||
- { src: gitconfig.j2, dest: .config/git/config }
|
||||
- { src: tmux.conf.j2, dest: .tmux.conf }
|
||||
become_user: '{{ user.name }}'
|
||||
|
@ -1,56 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
{{ ansible_header | comment }}
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
|
||||
alias grep='grep --color=always'
|
||||
alias fgrep='fgrep --color=always'
|
||||
alias egrep='egrep --color=always'
|
||||
fi
|
||||
|
||||
# some more ls aliases
|
||||
alias ll='ls -alF'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
|
||||
alias cd='cd -P'
|
||||
alias ip='ip -c'
|
||||
|
||||
alias less='less -R'
|
||||
{% if ansible_os_family == "Archlinux" -%}
|
||||
|
||||
alias startx='exec startx'
|
||||
{% endif %}
|
||||
|
||||
alias gst='git status -s'
|
||||
|
||||
alias proxy='ssh -q -C -N -D 8080'
|
||||
alias wip='watch -c ip -c'
|
||||
|
||||
# Shortcuts to open ports
|
||||
alias ldap_tealc="ssh -L 1636:tealc.adm.crans.org:636 tealc.adm.crans.org"
|
||||
alias sam="ssh -L 8006:sam.adm.crans.org:8006 sam.adm.crans.org"
|
||||
alias jack="ssh -L 8006:jack.adm.crans.org:8006 jack.adm.crans.org"
|
||||
alias daniel="ssh -L 8006:daniel.adm.crans.org:8006 daniel.adm.crans.org"
|
||||
|
||||
alias vi=vim
|
||||
{% if ansible_os_family == "Debian" -%}
|
||||
alias bat=batcat
|
||||
{% endif -%}
|
||||
alias cat=bat
|
||||
|
||||
# Add some emoji aliases
|
||||
alias 🦇=bat
|
||||
alias 🐈=cat
|
||||
alias 🚆=sl
|
||||
alias 🚂=sl
|
||||
alias 🚅=sl
|
||||
alias 💿=cd
|
||||
{% if ansible_os_family == "Archlinux" -%}
|
||||
{# Personal computer #}
|
||||
alias 🐿️="cd /home/ynerant/PycharmProjects/SquirrelBattle && venv/bin/python main.py"
|
||||
{% endif -%}
|
@ -1,59 +0,0 @@
|
||||
{{ ansible_header | comment }}
|
||||
|
||||
[ -z "$PS1" ] && return
|
||||
|
||||
HISTCONTROL=ignoredups:ignorespace
|
||||
HISTFILE=/dev/null
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
[ -x /usr/bin/lesspipe.sh ] && eval "$(SHELL=/bin/sh lesspipe.sh)"
|
||||
|
||||
|
||||
PROMPT_COMMAND=__prompt
|
||||
|
||||
__prompt() {
|
||||
retline=$?
|
||||
gitline=$(git branch 2> /dev/null | grep '^*' | awk '{print $2}')
|
||||
|
||||
# COLORS
|
||||
RED='\[\e[01;31m\]'
|
||||
GREEN='\[\e[01;32m\]'
|
||||
ORANGE='\[\e[01;33m\]'
|
||||
BLUE='\[\e[01;34m\]'
|
||||
NC='\[\e[0m\]'
|
||||
|
||||
PS1=""
|
||||
PS1+="$GREEN\u@\h$NC" # user@host
|
||||
PS1+=" $BLUE\W$NC" # pwd
|
||||
[ -z $gitline ] || PS1+=" $ORANGE$gitline$NC"
|
||||
PS1="[ $PS1 ]"
|
||||
[ $retline -ne 0 ] && PS1+=" $RED$retline$NC "
|
||||
PS1+="\$ "
|
||||
return $ret
|
||||
}
|
||||
|
||||
if [ -f ~/.config/bash/bash_aliases ]; then
|
||||
. ~/.config/bash/bash_aliases
|
||||
fi
|
||||
|
||||
rm -rf {{ cliutils.bash.bogus_dirs | join(" ") }}
|
||||
|
||||
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
fi
|
||||
|
||||
export XDG_CONFIG_HOME=~/.config/
|
||||
grep -q '/\.local/bin'<<<$PATH || export PATH=$PATH:~/.local/bin/
|
||||
|
||||
## REMOVING LESSHST
|
||||
LESSHISTFILE=/dev/null
|
||||
|
||||
export EDITOR='vim'
|
||||
|
||||
export PASSWORD_STORE_ENABLE_EXTENSIONS=true
|
||||
|
@ -1,15 +0,0 @@
|
||||
{{ ansible_header | comment }}
|
||||
|
||||
[user]
|
||||
email = {{ cliutils.git.email }}
|
||||
name = {{ cliutils.git.name }}
|
||||
signingkey = {{ cliutils.git.signingkey }}
|
||||
[commit]
|
||||
gpgsign = true
|
||||
[core]
|
||||
autocrlf = input
|
||||
editor = vim
|
||||
[format]
|
||||
signoff = true
|
||||
[pull]
|
||||
ff = only
|
@ -1,3 +0,0 @@
|
||||
{{ ansible_header | comment }}
|
||||
|
||||
set mark-symlinked-directories on
|
@ -1,34 +0,0 @@
|
||||
{{ ansible_header | comment }}
|
||||
|
||||
unbind r
|
||||
bind r source-file ~/.tmux.conf
|
||||
|
||||
set -g mouse on
|
||||
|
||||
## set the default TERM
|
||||
set -g default-terminal screen
|
||||
|
||||
## update the TERM variable of terminal emulator when creating a new session or attaching a existing session
|
||||
set -g update-environment 'DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY TERM'
|
||||
## determine if we should enable 256-colour support
|
||||
if "[[ ${TERM} =~ 256color || ${TERM} == fbterm ]]" 'set -g default-terminal screen-256color'
|
||||
|
||||
# use the vim motion keys to move between panes
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
setw -g mode-keys vi
|
||||
bind < resize-pane -L 10
|
||||
bind > resize-pane -R 10
|
||||
bind - resize-pane -D 10
|
||||
bind + resize-pane -U 10
|
||||
|
||||
bind-key -T copy-mode-vi 'v' send -X begin-selection;
|
||||
bind-key -T copy-mode-vi 'V' send -X select-line;
|
||||
bind-key -T copy-mode-vi 'r' send -X rectangle-toggle;
|
||||
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
|
||||
|
||||
set -g base-index 1
|
||||
set -g status-bg colour41
|
Reference in New Issue
Block a user