diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 84479f6..b589d80 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,7 @@ Run Workstation playbook on fedora: - dnf install -y ansible python3-pip - pip3 install -r ci-requirements.txt - mkdir /tmp/artifacts - - bash play_workstation.sh + - ./play_workstation.sh - cp /tmp/artifacts/workstation-*.xml report.xml - ls /tmp/artifacts artifacts: @@ -26,7 +26,7 @@ Run Workstation playbook on ubuntu: - apt-get install -y ansible python3-pip python3-apt - pip3 install -r ci-requirements.txt - mkdir /tmp/artifacts - - bash play_workstation.sh + - ./play_workstation.sh - mv /tmp/artifacts/workstation-*.xml report.xml - ls /tmp/artifacts artifacts: diff --git a/playbooks/files/dotfiles/alacritty.yml b/files/dotfiles/alacritty.yml similarity index 88% rename from playbooks/files/dotfiles/alacritty.yml rename to files/dotfiles/alacritty.yml index d1df20d..0a08c75 100644 --- a/playbooks/files/dotfiles/alacritty.yml +++ b/files/dotfiles/alacritty.yml @@ -131,6 +131,41 @@ schemes: - { index: 19, color: '0x504945' } - { index: 20, color: '0xbdae93' } - { 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 # Mike Barkmin (http://github.com/mikebarkmin) based on Dracula Theme (http://github.com/dracula) dracula: &drakula @@ -274,4 +309,5 @@ schemes: cyan: '#6d96a5' white: '#aeb3bb' +draw_bold_text_with_bright_colors: true colors: *nord diff --git a/playbooks/files/dotfiles/gitconfig b/files/dotfiles/gitconfig similarity index 100% rename from playbooks/files/dotfiles/gitconfig rename to files/dotfiles/gitconfig diff --git a/playbooks/files/dotfiles/shellconfig/aliases.sh b/files/dotfiles/shellconfig/aliases.sh similarity index 100% rename from playbooks/files/dotfiles/shellconfig/aliases.sh rename to files/dotfiles/shellconfig/aliases.sh diff --git a/playbooks/files/dotfiles/shellconfig/common.sh b/files/dotfiles/shellconfig/common.sh similarity index 100% rename from playbooks/files/dotfiles/shellconfig/common.sh rename to files/dotfiles/shellconfig/common.sh diff --git a/playbooks/files/dotfiles/shellconfig/environment.sh b/files/dotfiles/shellconfig/environment.sh similarity index 100% rename from playbooks/files/dotfiles/shellconfig/environment.sh rename to files/dotfiles/shellconfig/environment.sh diff --git a/playbooks/files/dotfiles/shellconfig/functions.sh b/files/dotfiles/shellconfig/functions.sh similarity index 100% rename from playbooks/files/dotfiles/shellconfig/functions.sh rename to files/dotfiles/shellconfig/functions.sh diff --git a/playbooks/files/dotfiles/tmux.conf b/files/dotfiles/tmux.conf similarity index 73% rename from playbooks/files/dotfiles/tmux.conf rename to files/dotfiles/tmux.conf index 02a75c9..fb79ee5 100644 --- a/playbooks/files/dotfiles/tmux.conf +++ b/files/dotfiles/tmux.conf @@ -1,17 +1,19 @@ -# Send prefix +# Send prefix - Ctrl+a set-option -g prefix C-a unbind-key C-a bind-key C-a send-prefix -# Use Alt-arrow keys to switch panes -bind-key h select-pane -L -bind-key l select-pane -R -bind-key k select-pane -U -bind-key j select-pane -D +# Use Alt+[hjkl] to switch panes - also (esc - h|j|k|l) +bind -n M-h select-pane -L +bind -n M-l select-pane -R +bind -n M-k select-pane -U +bind -n M-j select-pane -D -# Shift arrow to switch windows -bind -n M-h previous-window -bind -n M-l next-window +# -h|l|Left|Right +bind-key h previous-window +bind-key Right previous-window +bind-key l next-window +bind-key Left next-window # Mouse mode setw -g mouse on @@ -49,3 +51,7 @@ bind -n C-k clear-history # Default Colors set -g default-terminal "xterm-256color" + +# Home/End support +bind -n End send-key C-e +bind -n Home send-key C-a diff --git a/playbooks/files/dotfiles/vimrc b/files/dotfiles/vimrc similarity index 94% rename from playbooks/files/dotfiles/vimrc rename to files/dotfiles/vimrc index 9c4384e..ec0f1f4 100644 --- a/playbooks/files/dotfiles/vimrc +++ b/files/dotfiles/vimrc @@ -6,11 +6,13 @@ call plug#begin('~/.vim/plugged') Plug 'sheerun/vim-polyglot' " A ton of language syntax 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 'arcticicestudio/nord-vim' " Nord theme Plug 'itchyny/lightline.vim' " vim status bar Plug 'shinchu/lightline-gruvbox.vim' " Gruvbox theme for status line Plug 'airblade/vim-gitgutter' " Git gutter + Plug 'zivyangll/git-blame.vim' " Git blame Plug 'lilydjwg/colorizer' " Displays the colors in file Plug 'jiangmiao/auto-pairs' " Auto create bracket/parens/quote pairs Plug 'vim-syntastic/syntastic' " coding-errors checker @@ -56,6 +58,8 @@ map :BLines " Indent Guides auto start let g:indent_guides_enable_on_vim_startup = 1 +" Toggle git blame s in normal mode +nnoremap s :call gitblame#echo() " Tab navigation and creation map :tabnew @@ -115,7 +119,7 @@ let NERDTreeIgnore=['\.git$'] let &t_8f = "\[38;2;%lu;%lu;%lum" let &t_8b = "\[48;2;%lu;%lu;%lum" -"set termguicolors +set termguicolors " Theme colorscheme nord " Setting dark mode @@ -125,14 +129,22 @@ set background=dark " line number "============================================================================== -" set relative number on visual mode and absolute number on insert mode -set relativenumber -set number -autocmd InsertEnter * :set number norelativenumber -autocmd InsertLeave * :set nonumber relativenumber +" turn hybrid line numbers on +:set number relativenumber +:set nu rnu + +: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 if has("autocmd") @@ -142,7 +154,6 @@ if has("autocmd") \| endif endif - "============================================================================== " TAB settings "============================================================================== @@ -297,7 +308,7 @@ let g:lightline = { \ }, \ } " lightline colorscheme -let g:lightline.colorscheme = 'nord' +" let g:lightline.colorscheme = 'nord' " function to get the filename from vim to lightline.vim function! LightlineFilename() return &filetype ==# 'vimfiler' ? vimfiler#get_status_string() : diff --git a/playbooks/files/dotfiles/zshrc b/files/dotfiles/zshrc similarity index 100% rename from playbooks/files/dotfiles/zshrc rename to files/dotfiles/zshrc diff --git a/playbooks/files/fonts/hack_nerd_font.ttf b/files/fonts/hack_nerd_font.ttf similarity index 100% rename from playbooks/files/fonts/hack_nerd_font.ttf rename to files/fonts/hack_nerd_font.ttf diff --git a/files/images/LightBulb.jpg b/files/images/LightBulb.jpg new file mode 100644 index 0000000..4f4183c Binary files /dev/null and b/files/images/LightBulb.jpg differ diff --git a/play_server.sh b/play_server.sh old mode 100644 new mode 100755 diff --git a/play_workstation.sh b/play_workstation.sh old mode 100644 new mode 100755 index a609070..ef79268 --- a/play_workstation.sh +++ b/play_workstation.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # Install Dependencies ansible-galaxy collection install community.general diff --git a/playbooks/files b/playbooks/files new file mode 120000 index 0000000..68b44c4 --- /dev/null +++ b/playbooks/files @@ -0,0 +1 @@ +../files/ \ No newline at end of file diff --git a/playbooks/roles b/playbooks/roles new file mode 120000 index 0000000..7b9ade8 --- /dev/null +++ b/playbooks/roles @@ -0,0 +1 @@ +../roles/ \ No newline at end of file diff --git a/playbooks/workstation.yml b/playbooks/workstation.yml index 64699e4..bd69e70 100644 --- a/playbooks/workstation.yml +++ b/playbooks/workstation.yml @@ -1,7 +1,7 @@ - hosts: localhost vars: - # Theme options: monokai, gruvbox, nord - theme: gruvbox + # Theme options: monokai, gruvbox, nord, tomorrow-night + theme: tomorrow-night # The running user running_user: "{{ ansible_user_id }}" roles: diff --git a/playbooks/roles/.empty b/roles/.empty similarity index 100% rename from playbooks/roles/.empty rename to roles/.empty diff --git a/playbooks/roles/alacritty_user/tasks/main.yml b/roles/alacritty_user/tasks/main.yml similarity index 100% rename from playbooks/roles/alacritty_user/tasks/main.yml rename to roles/alacritty_user/tasks/main.yml diff --git a/playbooks/roles/base/tasks/main.yml b/roles/base/tasks/main.yml similarity index 100% rename from playbooks/roles/base/tasks/main.yml rename to roles/base/tasks/main.yml diff --git a/playbooks/roles/flatpaks/tasks/main.yml b/roles/flatpaks/tasks/main.yml similarity index 100% rename from playbooks/roles/flatpaks/tasks/main.yml rename to roles/flatpaks/tasks/main.yml diff --git a/playbooks/roles/fonts/tasks/main.yml b/roles/fonts/tasks/main.yml similarity index 100% rename from playbooks/roles/fonts/tasks/main.yml rename to roles/fonts/tasks/main.yml diff --git a/playbooks/roles/lsd_user/tasks/main.yml b/roles/lsd_user/tasks/main.yml similarity index 100% rename from playbooks/roles/lsd_user/tasks/main.yml rename to roles/lsd_user/tasks/main.yml diff --git a/playbooks/roles/tmux_user/tasks/main.yml b/roles/tmux_user/tasks/main.yml similarity index 100% rename from playbooks/roles/tmux_user/tasks/main.yml rename to roles/tmux_user/tasks/main.yml diff --git a/playbooks/roles/vim_user/tasks/main.yml b/roles/vim_user/tasks/main.yml similarity index 66% rename from playbooks/roles/vim_user/tasks/main.yml rename to roles/vim_user/tasks/main.yml index 8465d64..cd4d6c1 100644 --- a/playbooks/roles/vim_user/tasks/main.yml +++ b/roles/vim_user/tasks/main.yml @@ -23,10 +23,10 @@ ansible.builtin.lineinfile: path: "~/.vimrc" regexp: "^colorscheme" - line: "colorscheme {{theme}}" + line: "colorscheme base16-{{theme}}" -- name: "Set vim lightline colorscheme" - ansible.builtin.lineinfile: - path: "~/.vimrc" - regexp: "^let g:lightline.colorscheme" - line: "let g:lightline.colorscheme = '{{theme}}'" + #- name: "Set vim lightline colorscheme" + # ansible.builtin.lineinfile: + # path: "~/.vimrc" + # regexp: "^let g:lightline.colorscheme" + # line: "let g:lightline.colorscheme = '{{theme}}'"