From 1219325293bc270158ccd1fbd0ea36b0f2159e9d Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Mon, 18 Dec 2023 17:32:44 +0200 Subject: [PATCH] Update Removed all debian/ubuntu CI and tasks. Focusing on fedora. Moved some gh_releases tasks to dnf since they are all in the fedora repos. Signed-off-by: Sagi Dayan --- .gitlab-ci.yml | 53 --------- README.md | 2 +- files/dotfiles/nvim/lua/user/init_plugins.lua | 11 +- files/dotfiles/nvim/lua/user/keymaps.lua | 8 ++ files/dotfiles/nvim/lua/user/lsp/handlers.lua | 6 +- files/dotfiles/nvim/lua/user/lsp/init.lua | 2 +- files/dotfiles/shellconfig/common.sh | 6 +- files/dotfiles/tmux.conf | 2 +- roles/alacritty_user/tasks/main.yml | 8 -- roles/base/tasks/main.yml | 67 +++++++---- roles/flatpaks/tasks/main.yml | 6 - roles/modern_unix_tools/tasks/main.yml | 105 ++---------------- 12 files changed, 85 insertions(+), 191 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e656e46..8494e4a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,56 +33,3 @@ Run Workstation playbook on fedora: reports: junit: report.xml -Run cli-tools playbook on centos: - stage: x86 Systems - image: - name: quay.io/centos/centos:stream8 - script: - - dnf install -y epel-release dnf-plugins-core - - dnf install -y --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm - - dnf makecache - - dnf install -y ansible python3-pip - - pip3 install -r ci-requirements.txt - - mkdir /tmp/artifacts - - ./run_play.sh cli-tools - - mv /tmp/artifacts/cli-tools-*.xml report.xml - artifacts: - when: always - reports: - junit: report.xml - -Run Workstation playbook on ubuntu: - stage: x86 Systems - image: - name: ubuntu:latest - script: - - export DEBIAN_FRONTEND=noninteractive - - apt-get update - - apt install -y software-properties-common - - add-apt-repository -y --update ppa:ansible/ansible - - apt-get install -y ansible python3-pip python3-apt - - pip3 install -r ci-requirements.txt - - mkdir /tmp/artifacts - - ./run_play.sh workstation - - mv /tmp/artifacts/workstation-*.xml report.xml - artifacts: - when: always - reports: - junit: report.xml - -Run cli-tools playbook on debian: - stage: x86 Systems - image: - name: debian:latest - script: - - apt-get update - - apt-get install -y ansible python3-pip python3-apt - - pip3 install -r ci-requirements.txt - - mkdir /tmp/artifacts - - ./run_play.sh cli-tools - - mv /tmp/artifacts/cli-tools-*.xml report.xml - artifacts: - when: always - reports: - junit: report.xml - diff --git a/README.md b/README.md index a3bec95..7a7efb1 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Playbooks will install software and configure most of the tools. Since dotfiles are the most basic thing this repo provides, It is constantly a WIP. -I do try to make sure playbooks work on RHEL/Debian based distros via gitlab CI. +I do try to make sure playbooks work on fedora:latest via gitlab CI. This repo was created for my own use, But feel free to use it as you please. diff --git a/files/dotfiles/nvim/lua/user/init_plugins.lua b/files/dotfiles/nvim/lua/user/init_plugins.lua index 700466a..aeaf63a 100644 --- a/files/dotfiles/nvim/lua/user/init_plugins.lua +++ b/files/dotfiles/nvim/lua/user/init_plugins.lua @@ -17,7 +17,16 @@ end -- Git signs (Gutter) local gitsigns_status_ok, gitsigns = pcall(require, "gitsigns") if gitsigns_status_ok then - gitsigns.setup() + gitsigns.setup { + current_line_blame = true, -- Toggle with `:Gitsigns toggle_current_line_blame` + current_line_blame_opts = { + virt_text = true, + virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' + delay = 1000, + ignore_whitespace = false, + }, + current_line_blame_formatter = '[] , - ', + } end -- Telescope diff --git a/files/dotfiles/nvim/lua/user/keymaps.lua b/files/dotfiles/nvim/lua/user/keymaps.lua index 01fc0a7..e50702a 100644 --- a/files/dotfiles/nvim/lua/user/keymaps.lua +++ b/files/dotfiles/nvim/lua/user/keymaps.lua @@ -37,3 +37,11 @@ nnoremap('', '') nnoremap('', '') nnoremap('', '') nnoremap('', '') + +-- Wrap in... +nnoremap('w"', 'ciw""hp') +nnoremap("w'", "ciw''hp") +nnoremap('w]', 'ciw[]hp') +nnoremap('w[', 'ciw[]hp') +nnoremap('w(', 'ciw()hp') +nnoremap('w)', 'ciw()hp') diff --git a/files/dotfiles/nvim/lua/user/lsp/handlers.lua b/files/dotfiles/nvim/lua/user/lsp/handlers.lua index f71dee9..075725a 100644 --- a/files/dotfiles/nvim/lua/user/lsp/handlers.lua +++ b/files/dotfiles/nvim/lua/user/lsp/handlers.lua @@ -4,9 +4,9 @@ local M = {} M.setup = function() local signs = { { name = "DiagnosticSignError", text = "" }, - { name = "DiagnosticSignWarn", text = "" }, - { name = "DiagnosticSignHint", text = "" }, - { name = "DiagnosticSignInfo", text = "" }, + { name = "DiagnosticSignWarn", text = "" }, + { name = "DiagnosticSignHint", text = "" }, + { name = "DiagnosticSignInfo", text = "" }, } for _, sign in ipairs(signs) do diff --git a/files/dotfiles/nvim/lua/user/lsp/init.lua b/files/dotfiles/nvim/lua/user/lsp/init.lua index 2f44705..107e11d 100644 --- a/files/dotfiles/nvim/lua/user/lsp/init.lua +++ b/files/dotfiles/nvim/lua/user/lsp/init.lua @@ -1,6 +1,6 @@ local status_ok, _ = pcall(require, "lspconfig") if not status_ok then - return + return end require "user.lsp.mason" diff --git a/files/dotfiles/shellconfig/common.sh b/files/dotfiles/shellconfig/common.sh index 4103ace..ef52fa0 100644 --- a/files/dotfiles/shellconfig/common.sh +++ b/files/dotfiles/shellconfig/common.sh @@ -113,7 +113,7 @@ function ide() { pre_check_tmux_for_layout "ide" || return 1 clear; - tmux split-window -v -p 20 + tmux split-window -v -l 20 huh "${IDE_NAME}"; tmux split-window -h tmux select-pane -t 0 @@ -147,7 +147,7 @@ function layout() { for col in {1..$(($cols))} do H_SIZE=$((100 - (col * H_RATIO))) - tmux split-window -h -p $((H_SIZE)) + tmux split-window -h -l $((H_SIZE)) done fi @@ -165,7 +165,7 @@ function layout() { for row in {1..$((ROWS - 1))} do V_SIZE=$((100 - (row * V_RATIO))) - tmux split-window -v -p $((V_SIZE)) + tmux split-window -v -l $((V_SIZE)) done fi done diff --git a/files/dotfiles/tmux.conf b/files/dotfiles/tmux.conf index 35f2be8..25fae2c 100644 --- a/files/dotfiles/tmux.conf +++ b/files/dotfiles/tmux.conf @@ -26,7 +26,7 @@ setw -g mouse on # Set easier window split keys bind-key | split-window -h -c "#{pane_current_path}" -bind-key \ split-window -h -c "#{pane_current_path}" +bind-key \\ split-window -h -c "#{pane_current_path}" bind-key - split-window -v -c "#{pane_current_path}" # close window with bind-key q kill-window diff --git a/roles/alacritty_user/tasks/main.yml b/roles/alacritty_user/tasks/main.yml index 4b63521..792fcdb 100644 --- a/roles/alacritty_user/tasks/main.yml +++ b/roles/alacritty_user/tasks/main.yml @@ -1,11 +1,3 @@ -- name: Install Alacritty PPA (Debian Based) - become: true - apt_repository: - repo: "ppa:aslatter/ppa" - validate_certs: no - state: present - when: ansible_facts['os_family'] == "Debian" - - name: Install Alacritty become: true package: diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml index 70afb13..f96bebc 100644 --- a/roles/base/tasks/main.yml +++ b/roles/base/tasks/main.yml @@ -2,26 +2,27 @@ become: true package: name: - - zsh - - curl - - gcc - - make - - wget - - git - - ranger - - jq - - nodejs - - npm - - man-db - - clang - state: present - -- name: Some more packages (RedHat based) - become: true - package: - name: + - zsh + - curl + - gcc + - make + - wget + - git + - ranger + - jq + - nodejs + - npm + - man-db + - clang - podman - when: ansible_facts['os_family'] == "RedHat" + - ripgrep + - lsd + - gitui + - NetworkManager-tui + - tldr + - bat + - fzf + state: present - name: Copy gitconfig base copy: @@ -36,7 +37,6 @@ dest: ~/.oh-my-zsh version: master - - name: Making sure to use ZSH as shell become: true user: @@ -167,4 +167,31 @@ force: yes mode: preserve +# Gitui +- name: Verifying gitui config + file: + path: ~/.config/gitui + state: directory + mode: '0755' +- name: Copy gitui keybindings + copy: + src: dotfiles/gitui/key_bindings.ron + dest: ~/.config/gitui/key_bindings.ron + force: yes + mode: preserve +- name: Copy gitui theme config + copy: + src: dotfiles/gitui/theme.ron + dest: ~/.config/gitui/theme.ron + force: yes + mode: preserve + +# bat (cat) +- name: verify Bat (better Cat) theme + changed_when: false + ansible.builtin.lineinfile: + path: "~/.shellconfig/common.sh" + regexp: "^export BAT_THEME=" + line: 'export BAT_THEME="${{ theme }}"' + diff --git a/roles/flatpaks/tasks/main.yml b/roles/flatpaks/tasks/main.yml index b3a9bc6..6f2f955 100644 --- a/roles/flatpaks/tasks/main.yml +++ b/roles/flatpaks/tasks/main.yml @@ -17,17 +17,11 @@ name: - org.gimp.GIMP - org.telegram.desktop - - net.christianbeier.Gromit-MPX - com.logseq.Logseq - com.bitwarden.desktop - com.github.tchx84.Flatseal - - com.github.alexr4535.siglo - com.nextcloud.desktopclient.nextcloud - - com.github.unrud.VideoDownloader - - com.github.liferooter.textpieces - - nl.hjdskes.gcolor3 - re.sonny.Junction - - org.gnome.DejaDup state: present - name: Check if open function is set diff --git a/roles/modern_unix_tools/tasks/main.yml b/roles/modern_unix_tools/tasks/main.yml index 2e23768..f7fec3d 100644 --- a/roles/modern_unix_tools/tasks/main.yml +++ b/roles/modern_unix_tools/tasks/main.yml @@ -1,96 +1,13 @@ --- -- name: Installing fzf - ansible.builtin.include_role: - name: gh_release_bin - vars: - name: fzf - repo: junegunn/fzf - bin_path: "/fzf" - autocomplete_path: "/fzf-*/shell/completion.zsh" - man_path: "/fzf-*/man/man1/fzf.1" - include_source: yes - filter: linux_amd64.tar.gz - -- name: Installing bat (cat like) - ansible.builtin.include_role: - name: gh_release_bin - vars: - name: bat - repo: sharkdp/bat - bin_path: "/bat-*/bat" - man_path: "/bat-*/bat.1" - filter: x86_64-unknown-linux-gnu - -- name: verify Bat (better Cat) theme - changed_when: false - ansible.builtin.lineinfile: - path: "~/.shellconfig/common.sh" - regexp: "^export BAT_THEME=" - line: 'export BAT_THEME="${{ theme }}"' - -- name: Instaling TLDR (pip3) - become: true - shell: pip3 install tldr || true - changed_when: false - -- name: Installing bottom (btm) (Top like) - ansible.builtin.include_role: - name: gh_release_bin - vars: - name: btm - repo: ClementTsang/bottom - bin_path: "/btm" - #autocomplete_path: "/completion/btm.bash" - filter: bottom_x86_64-unknown-linux-gnu.tar.gz - -- name: Installing gitui - ansible.builtin.include_role: - name: gh_release_bin - vars: - name: gitui - repo: extrawurst/gitui - bin_path: "/gitui" - filter: gitui-linux-musl - -- name: Verifying gitui config - file: - path: ~/.config/gitui - state: directory - mode: '0755' - -- name: Copy gitui keybindings - copy: - src: dotfiles/gitui/key_bindings.ron - dest: ~/.config/gitui/key_bindings.ron - force: yes - mode: preserve - -- name: Copy gitui theme config - copy: - src: dotfiles/gitui/theme.ron - dest: ~/.config/gitui/theme.ron - force: yes - mode: preserve - -- name: Installing LSD (ls like) - ansible.builtin.include_role: - name: gh_release_bin - vars: - name: lsd - repo: lsd-rs/lsd - bin_path: "/lsd-*/lsd" - man_path: "/lsd-*/lsd.1" - autocomplete_path: "/lsd-*/autocomplete/lsd.bash-completion" - filter: x86_64-unknown-linux-gnu.tar.gz - -- name: Installing ripgrep (grep like) - ansible.builtin.include_role: - name: gh_release_bin - vars: - name: rg - repo: BurntSushi/ripgrep - bin_path: "/ripgrep-*/rg" - man_path: "/ripgrep-*/doc/rg.1" - autocomplete_path: "/ripgrep-*/complete/rg.bash" - filter: x86_64-unknown-linux-musl.tar.gz +#- name: Installing fzf +# ansible.builtin.include_role: +# name: gh_release_bin +# vars: +# name: fzf +# repo: junegunn/fzf +# bin_path: "/fzf" +# autocomplete_path: "/fzf-*/shell/completion.zsh" +# man_path: "/fzf-*/man/man1/fzf.1" +# include_source: yes +# filter: linux_amd64.tar.gz