Cleanup and refactoring.

This commit is contained in:
Sagi Dayan 2021-11-18 10:59:41 +02:00
parent 1c0a79731a
commit e62187e510
Signed by: sagi
GPG key ID: FAB96BFC63B46458
25 changed files with 86 additions and 29 deletions

View file

@ -10,7 +10,7 @@ Run Workstation playbook on fedora:
- dnf install -y ansible python3-pip - dnf install -y ansible python3-pip
- pip3 install -r ci-requirements.txt - pip3 install -r ci-requirements.txt
- mkdir /tmp/artifacts - mkdir /tmp/artifacts
- bash play_workstation.sh - ./play_workstation.sh
- cp /tmp/artifacts/workstation-*.xml report.xml - cp /tmp/artifacts/workstation-*.xml report.xml
- ls /tmp/artifacts - ls /tmp/artifacts
artifacts: artifacts:
@ -26,7 +26,7 @@ Run Workstation playbook on ubuntu:
- apt-get install -y ansible python3-pip python3-apt - apt-get install -y ansible python3-pip python3-apt
- pip3 install -r ci-requirements.txt - pip3 install -r ci-requirements.txt
- mkdir /tmp/artifacts - mkdir /tmp/artifacts
- bash play_workstation.sh - ./play_workstation.sh
- mv /tmp/artifacts/workstation-*.xml report.xml - mv /tmp/artifacts/workstation-*.xml report.xml
- ls /tmp/artifacts - ls /tmp/artifacts
artifacts: artifacts:

View file

@ -131,6 +131,41 @@ schemes:
- { index: 19, color: '0x504945' } - { index: 19, color: '0x504945' }
- { index: 20, color: '0xbdae93' } - { index: 20, color: '0xbdae93' }
- { index: 21, color: '0xebdbb2' } - { index: 21, color: '0xebdbb2' }
# Base16 Tomorrow Night - alacritty color config
# Chris Kempson (http://chriskempson.com)
tomorrow-night: &tomorrow-night
# Default colors
primary:
background: '0x1d1f21'
foreground: '0xc5c8c6'
# Colors the cursor will use if `custom_cursor_colors` is true
cursor:
text: '0x1d1f21'
cursor: '0xc5c8c6'
# Normal colors
normal:
black: '0x1d1f21'
red: '0xcc6666'
green: '0xb5bd68'
yellow: '0xf0c674'
blue: '0x81a2be'
magenta: '0xb294bb'
cyan: '0x8abeb7'
white: '0xc5c8c6'
# Bright colors
bright:
black: '0x969896'
red: '0xde935f'
green: '0x282a2e'
yellow: '0x373b41'
blue: '0xb4b7b4'
magenta: '0xe0e0e0'
cyan: '0xa3685a'
white: '0xffffff'
# Base16 Dracula 256 - alacritty color config # Base16 Dracula 256 - alacritty color config
# Mike Barkmin (http://github.com/mikebarkmin) based on Dracula Theme (http://github.com/dracula) # Mike Barkmin (http://github.com/mikebarkmin) based on Dracula Theme (http://github.com/dracula)
dracula: &drakula dracula: &drakula
@ -274,4 +309,5 @@ schemes:
cyan: '#6d96a5' cyan: '#6d96a5'
white: '#aeb3bb' white: '#aeb3bb'
draw_bold_text_with_bright_colors: true
colors: *nord colors: *nord

View file

@ -1,17 +1,19 @@
# Send prefix # Send prefix - Ctrl+a
set-option -g prefix C-a set-option -g prefix C-a
unbind-key C-a unbind-key C-a
bind-key C-a send-prefix bind-key C-a send-prefix
# Use Alt-arrow keys to switch panes # Use Alt+[hjkl] to switch panes - also (esc - h|j|k|l)
bind-key h select-pane -L bind -n M-h select-pane -L
bind-key l select-pane -R bind -n M-l select-pane -R
bind-key k select-pane -U bind -n M-k select-pane -U
bind-key j select-pane -D bind -n M-j select-pane -D
# Shift arrow to switch windows # <prefix>-h|l|Left|Right
bind -n M-h previous-window bind-key h previous-window
bind -n M-l next-window bind-key Right previous-window
bind-key l next-window
bind-key Left next-window
# Mouse mode # Mouse mode
setw -g mouse on setw -g mouse on
@ -49,3 +51,7 @@ bind -n C-k clear-history
# Default Colors # Default Colors
set -g default-terminal "xterm-256color" set -g default-terminal "xterm-256color"
# Home/End support
bind -n End send-key C-e
bind -n Home send-key C-a

View file

@ -6,11 +6,13 @@
call plug#begin('~/.vim/plugged') call plug#begin('~/.vim/plugged')
Plug 'sheerun/vim-polyglot' " A ton of language syntax Plug 'sheerun/vim-polyglot' " A ton of language syntax
Plug 'morhetz/gruvbox' " Gruvbox theme Plug 'morhetz/gruvbox' " Gruvbox theme
Plug 'chriskempson/base16-vim' " Base 16 Themes - https://github.com/chriskempson/base16-vim
Plug 'sickill/vim-monokai' " Monokai Theme Plug 'sickill/vim-monokai' " Monokai Theme
Plug 'arcticicestudio/nord-vim' " Nord theme Plug 'arcticicestudio/nord-vim' " Nord theme
Plug 'itchyny/lightline.vim' " vim status bar Plug 'itchyny/lightline.vim' " vim status bar
Plug 'shinchu/lightline-gruvbox.vim' " Gruvbox theme for status line Plug 'shinchu/lightline-gruvbox.vim' " Gruvbox theme for status line
Plug 'airblade/vim-gitgutter' " Git gutter Plug 'airblade/vim-gitgutter' " Git gutter
Plug 'zivyangll/git-blame.vim' " Git blame
Plug 'lilydjwg/colorizer' " Displays the colors in file Plug 'lilydjwg/colorizer' " Displays the colors in file
Plug 'jiangmiao/auto-pairs' " Auto create bracket/parens/quote pairs Plug 'jiangmiao/auto-pairs' " Auto create bracket/parens/quote pairs
Plug 'vim-syntastic/syntastic' " coding-errors checker Plug 'vim-syntastic/syntastic' " coding-errors checker
@ -56,6 +58,8 @@ map <C-f> :BLines<CR>
" Indent Guides auto start " Indent Guides auto start
let g:indent_guides_enable_on_vim_startup = 1 let g:indent_guides_enable_on_vim_startup = 1
" Toggle git blame <leader>s in normal mode
nnoremap <Leader>s :<C-u>call gitblame#echo()<CR>
" Tab navigation and creation " Tab navigation and creation
map <C-t> :tabnew<CR> map <C-t> :tabnew<CR>
@ -115,7 +119,7 @@ let NERDTreeIgnore=['\.git$']
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum" let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum" let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
"set termguicolors set termguicolors
" Theme " Theme
colorscheme nord colorscheme nord
" Setting dark mode " Setting dark mode
@ -125,14 +129,22 @@ set background=dark
" line number " line number
"============================================================================== "==============================================================================
" set relative number on visual mode and absolute number on insert mode " turn hybrid line numbers on
set relativenumber :set number relativenumber
set number :set nu rnu
autocmd InsertEnter * :set number norelativenumber
autocmd InsertLeave * :set nonumber relativenumber :augroup numbertoggle
: autocmd!
: autocmd BufEnter,FocusGained,InsertLeave,WinEnter * if &nu && mode() != "i" | set rnu | endif
: autocmd BufLeave,FocusLost,InsertEnter,WinLeave * if &nu | set nornu | endif
:augroup END
" Set current line number more visible
hi clear CursorLine
augroup CLClear
autocmd! ColorScheme * hi clear CursorLine
augroup END
" set backgrond and font color of line number
highlight LineNr ctermfg=grey ctermbg=black
" open files at the last remember line " open files at the last remember line
if has("autocmd") if has("autocmd")
@ -142,7 +154,6 @@ if has("autocmd")
\| endif \| endif
endif endif
"============================================================================== "==============================================================================
" TAB settings " TAB settings
"============================================================================== "==============================================================================
@ -297,7 +308,7 @@ let g:lightline = {
\ }, \ },
\ } \ }
" lightline colorscheme " lightline colorscheme
let g:lightline.colorscheme = 'nord' " let g:lightline.colorscheme = 'nord'
" function to get the filename from vim to lightline.vim " function to get the filename from vim to lightline.vim
function! LightlineFilename() function! LightlineFilename()
return &filetype ==# 'vimfiler' ? vimfiler#get_status_string() : return &filetype ==# 'vimfiler' ? vimfiler#get_status_string() :

BIN
files/images/LightBulb.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

0
play_server.sh Normal file → Executable file
View file

2
play_workstation.sh Normal file → Executable file
View file

@ -1,3 +1,5 @@
#!/bin/bash
# Install Dependencies # Install Dependencies
ansible-galaxy collection install community.general ansible-galaxy collection install community.general

1
playbooks/files Symbolic link
View file

@ -0,0 +1 @@
../files/

1
playbooks/roles Symbolic link
View file

@ -0,0 +1 @@
../roles/

View file

@ -1,7 +1,7 @@
- hosts: localhost - hosts: localhost
vars: vars:
# Theme options: monokai, gruvbox, nord # Theme options: monokai, gruvbox, nord, tomorrow-night
theme: gruvbox theme: tomorrow-night
# The running user # The running user
running_user: "{{ ansible_user_id }}" running_user: "{{ ansible_user_id }}"
roles: roles:

View file

@ -23,10 +23,10 @@
ansible.builtin.lineinfile: ansible.builtin.lineinfile:
path: "~/.vimrc" path: "~/.vimrc"
regexp: "^colorscheme" regexp: "^colorscheme"
line: "colorscheme {{theme}}" line: "colorscheme base16-{{theme}}"
- name: "Set vim lightline colorscheme" #- name: "Set vim lightline colorscheme"
ansible.builtin.lineinfile: # ansible.builtin.lineinfile:
path: "~/.vimrc" # path: "~/.vimrc"
regexp: "^let g:lightline.colorscheme" # regexp: "^let g:lightline.colorscheme"
line: "let g:lightline.colorscheme = '{{theme}}'" # line: "let g:lightline.colorscheme = '{{theme}}'"