mirror of
https://gitlab.com/sagidayan/linux-config.git
synced 2024-11-21 23:05:25 +00:00
Merge branch 'gitui' into 'main'
Gitui + ncspot See merge request sagidayan/linux-config!2
This commit is contained in:
commit
985049199d
9 changed files with 683 additions and 15 deletions
|
@ -1,10 +1,9 @@
|
|||
---
|
||||
stages:
|
||||
- dnf_systems
|
||||
- apt_systems
|
||||
- x86 Systems
|
||||
|
||||
Run Workstation playbook on fedora:
|
||||
stage: dnf_systems
|
||||
stage: x86 Systems
|
||||
image: fedora:latest
|
||||
script:
|
||||
- dnf install -y ansible python3-pip
|
||||
|
@ -18,7 +17,7 @@ Run Workstation playbook on fedora:
|
|||
junit: report.xml
|
||||
|
||||
Run cli-tools playbook on centos:
|
||||
stage: dnf_systems
|
||||
stage: x86 Systems
|
||||
image: centos:8
|
||||
script:
|
||||
- dnf install -y epel-release dnf-plugins-core
|
||||
|
@ -35,7 +34,7 @@ Run cli-tools playbook on centos:
|
|||
junit: report.xml
|
||||
|
||||
Run Workstation playbook on ubuntu:
|
||||
stage: apt_systems
|
||||
stage: x86 Systems
|
||||
image: ubuntu:latest
|
||||
script:
|
||||
- export DEBIAN_FRONTEND=noninteractive
|
||||
|
@ -53,7 +52,7 @@ Run Workstation playbook on ubuntu:
|
|||
junit: report.xml
|
||||
|
||||
Run cli-tools playbook on debian:
|
||||
stage: apt_systems
|
||||
stage: x86 Systems
|
||||
image: debian:latest
|
||||
script:
|
||||
- apt-get update
|
||||
|
|
553
files/dotfiles/gitui/key_config.ron
Normal file
553
files/dotfiles/gitui/key_config.ron
Normal file
|
@ -0,0 +1,553 @@
|
|||
// ************** Managed by Ansible ****************
|
||||
// src: https://github.com/extrawurst/gitui/blob/master/vim_style_key_config.ron
|
||||
// bit for modifiers
|
||||
// bits: 0 None
|
||||
// bits: 1 SHIFT
|
||||
// bits: 2 CONTROL
|
||||
//
|
||||
// Note:
|
||||
// If the default key layout is lower case,
|
||||
// and you want to use `Shift + q` to trigger the exit event,
|
||||
// the setting should like this `exit: Some(( code: Char('Q'), modifiers: ( bits: 1,),)),`
|
||||
// The Char should be upper case, and the shift modified bit should be set to 1.
|
||||
//
|
||||
// Note:
|
||||
// find `KeysList` type in src/keys/key_list.rs for all possible keys.
|
||||
// every key not overwritten via the config file will use the default specified there
|
||||
(
|
||||
|
||||
tab_status: (
|
||||
|
||||
code: Char('1'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
tab_log: (
|
||||
|
||||
code: Char('2'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
tab_files: (
|
||||
|
||||
code: Char('3'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
tab_stashing: (
|
||||
|
||||
code: Char('4'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
tab_stashes: (
|
||||
|
||||
code: Char('5'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
tab_toggle: (
|
||||
|
||||
code: Tab,
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
tab_toggle_reverse: (
|
||||
|
||||
code: BackTab,
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 1,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
toggle_workarea: (
|
||||
|
||||
code: Char('w'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
exit: (
|
||||
|
||||
code: Char('c'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 2,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
quit: (
|
||||
|
||||
code: Char('q'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
exit_popup: (
|
||||
|
||||
code: Esc,
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
open_commit: (
|
||||
|
||||
code: Char('c'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
open_commit_editor: (
|
||||
|
||||
code: Char('e'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 2,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
tree_collapse_recursive: (
|
||||
|
||||
code: Left,
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 1,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
tree_expand_recursive: (
|
||||
|
||||
code: Right,
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 1,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
enter: (
|
||||
|
||||
code: Enter,
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
blame: (
|
||||
|
||||
code: Char('B'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 1,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
status_stage_all: (
|
||||
|
||||
code: Char('a'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
status_ignore_file: (
|
||||
|
||||
code: Char('i'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
stashing_toggle_untracked: (
|
||||
|
||||
code: Char('u'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
stash_apply: (
|
||||
|
||||
code: Char('a'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
stash_drop: (
|
||||
|
||||
code: Char('D'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 1,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
cmd_bar_toggle: (
|
||||
|
||||
code: Char('.'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
log_tag_commit: (
|
||||
|
||||
code: Char('t'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
commit_amend: (
|
||||
|
||||
code: Char('a'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 2,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
copy: (
|
||||
|
||||
code: Char('y'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
create_branch: (
|
||||
|
||||
code: Char('c'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
rename_branch: (
|
||||
|
||||
code: Char('r'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
select_branch: (
|
||||
|
||||
code: Char('b'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
delete_branch: (
|
||||
|
||||
code: Char('D'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 1,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
merge_branch: (
|
||||
|
||||
code: Char('m'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
tags: (
|
||||
|
||||
code: Char('T'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 1,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
delete_tag: (
|
||||
|
||||
code: Char('D'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 1,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
select_tag: (
|
||||
|
||||
code: Enter,
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
push: (
|
||||
|
||||
code: Char('p'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
open_file_tree: (
|
||||
|
||||
code: Char('F'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 1,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
force_push: (
|
||||
|
||||
code: Char('P'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 1,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
pull: (
|
||||
|
||||
code: Char('f'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 0,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
undo_commit: (
|
||||
|
||||
code: Char('U'),
|
||||
|
||||
modifiers: (
|
||||
|
||||
bits: 1,
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
focus_right: ( code: Char('l'), modifiers: ( bits: 0,),),
|
||||
|
||||
focus_left: ( code: Char('h'), modifiers: ( bits: 0,),),
|
||||
|
||||
focus_above: ( code: Char('k'), modifiers: ( bits: 0,),),
|
||||
|
||||
focus_below: ( code: Char('j'), modifiers: ( bits: 0,),),
|
||||
|
||||
|
||||
|
||||
open_help: ( code: F(1), modifiers: ( bits: 0,),),
|
||||
|
||||
|
||||
|
||||
move_left: ( code: Char('h'), modifiers: ( bits: 0,),),
|
||||
|
||||
move_right: ( code: Char('l'), modifiers: ( bits: 0,),),
|
||||
|
||||
move_up: ( code: Char('k'), modifiers: ( bits: 0,),),
|
||||
|
||||
move_down: ( code: Char('j'), modifiers: ( bits: 0,),),
|
||||
|
||||
popup_up: ( code: Char('p'), modifiers: ( bits: 2,),),
|
||||
|
||||
popup_down: ( code: Char('n'), modifiers: ( bits: 2,),),
|
||||
|
||||
page_up: ( code: Char('b'), modifiers: ( bits: 2,),),
|
||||
|
||||
page_down: ( code: Char('f'), modifiers: ( bits: 2,),),
|
||||
|
||||
home: ( code: Char('g'), modifiers: ( bits: 0,),),
|
||||
|
||||
end: ( code: Char('G'), modifiers: ( bits: 1,),),
|
||||
|
||||
shift_up: ( code: Char('K'), modifiers: ( bits: 1,),),
|
||||
|
||||
shift_down: ( code: Char('J'), modifiers: ( bits: 1,),),
|
||||
|
||||
|
||||
|
||||
edit_file: ( code: Char('I'), modifiers: ( bits: 1,),),
|
||||
|
||||
|
||||
|
||||
status_reset_item: ( code: Char('U'), modifiers: ( bits: 1,),),
|
||||
|
||||
|
||||
|
||||
diff_reset_lines: ( code: Char('u'), modifiers: ( bits: 0,),),
|
||||
|
||||
diff_stage_lines: ( code: Char('s'), modifiers: ( bits: 0,),),
|
||||
|
||||
|
||||
|
||||
stashing_save: ( code: Char('w'), modifiers: ( bits: 0,),),
|
||||
|
||||
stashing_toggle_index: ( code: Char('m'), modifiers: ( bits: 0,),),
|
||||
|
||||
|
||||
|
||||
stash_open: ( code: Char('l'), modifiers: ( bits: 0,),),
|
||||
|
||||
|
||||
|
||||
abort_merge: ( code: Char('M'), modifiers: ( bits: 1,),),
|
||||
|
||||
)
|
19
files/dotfiles/gitui/theme.ron
Normal file
19
files/dotfiles/gitui/theme.ron
Normal file
|
@ -0,0 +1,19 @@
|
|||
(
|
||||
selected_tab: Cyan,
|
||||
command_fg: Black,
|
||||
selection_bg: Rgb(124, 156, 183),
|
||||
cmdbar_extra_lines_bg: Blue,
|
||||
disabled_fg: Gray,
|
||||
diff_line_add: Green,
|
||||
diff_line_delete: Red,
|
||||
diff_file_added: LightGreen,
|
||||
diff_file_removed: LightRed,
|
||||
diff_file_moved: LightMagenta,
|
||||
diff_file_modified: Yellow,
|
||||
commit_hash: Magenta,
|
||||
commit_time: LightCyan,
|
||||
commit_author: Green,
|
||||
danger_fg: Red,
|
||||
push_gauge_bg: Blue,
|
||||
push_gauge_fg: Reset,
|
||||
)
|
|
@ -75,7 +75,7 @@ function ide() {
|
|||
tmux send-keys "l" C-m
|
||||
tmux split-window -h -p 80
|
||||
tmux split-window -h -p 30
|
||||
tmux send-keys "lazygit" C-m
|
||||
tmux send-keys "gitui" C-m
|
||||
tmux select-pane -t 1
|
||||
tmux split-window -v -p 20
|
||||
tmux select-pane -t 1
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# If you come from bash you might have to change your $PATH.
|
||||
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH="/home/sdayan/.oh-my-zsh"
|
||||
export ZSH="${HOME}/.oh-my-zsh"
|
||||
|
||||
# Set name of the theme to load --- if set to "random", it will
|
||||
# load a random theme each time oh-my-zsh is loaded, in which case,
|
||||
|
|
|
@ -10,4 +10,5 @@
|
|||
- tmux_user
|
||||
- vim_user
|
||||
- alacritty_user
|
||||
- ncspot_user
|
||||
- flatpaks
|
||||
|
|
|
@ -41,12 +41,6 @@
|
|||
dest: ~/.zshrc
|
||||
force: yes
|
||||
|
||||
- name: Fix oh-my-zsh sourcing
|
||||
ansible.builtin.lineinfile:
|
||||
path: "~/.zshrc"
|
||||
regexp: "^export ZSH="
|
||||
line: 'export ZSH="/home/{{running_user}}/.oh-my-zsh"'
|
||||
|
||||
- name: Add ranger devicons plugin repo
|
||||
git:
|
||||
repo: https://github.com/alexanderjeurissen/ranger_devicons.git
|
||||
|
@ -101,10 +95,30 @@
|
|||
dest: ~/.shellconfig/environment.sh
|
||||
force: no
|
||||
|
||||
- name: Verifying gitui config folder
|
||||
file:
|
||||
path: ~/.config/gitui
|
||||
state: directory
|
||||
|
||||
- name: Copy gitui keybindings config file
|
||||
copy:
|
||||
src: dotfiles/gitui/key_config.ron
|
||||
dest: ~/.config/gitui/key_config.ron
|
||||
force: yes
|
||||
|
||||
- name: Copy gitui theme config file
|
||||
copy:
|
||||
src: dotfiles/gitui/theme.ron
|
||||
dest: ~/.config/gitui/theme.ron
|
||||
force: yes
|
||||
|
||||
- name: Install rust and common tooling
|
||||
vars:
|
||||
rustup_user: "{{ running_user }}"
|
||||
rustup_cargo_crates: [bat,lsd,bottom]
|
||||
ansible.builtin.include_role:
|
||||
name: hurricanehrndz.rustup
|
||||
|
||||
|
||||
- name: Gitui user
|
||||
include_role:
|
||||
name: gitui_user
|
||||
|
|
28
roles/gitui_user/tasks/main.yml
Normal file
28
roles/gitui_user/tasks/main.yml
Normal file
|
@ -0,0 +1,28 @@
|
|||
- name: Install gitui dependencies (RHEL)
|
||||
become: true
|
||||
package:
|
||||
name: &gitui_deps_rhel
|
||||
- perl
|
||||
state: present
|
||||
when: ansible_facts['os_family'] == "RedHat"
|
||||
|
||||
- name: Installing gitui
|
||||
vars:
|
||||
rustup_user: "{{ running_user }}"
|
||||
rustup_cargo_crates: [gitui]
|
||||
ansible.builtin.include_role:
|
||||
name: hurricanehrndz.rustup
|
||||
|
||||
- name: Setting up ncspot alias (spot)
|
||||
ansible.builtin.lineinfile:
|
||||
line: alias spot=ncspot
|
||||
state: present
|
||||
path: ~/.shellconfig/aliases.sh
|
||||
insertafter: EOF
|
||||
|
||||
- name: Remove gitui dependencies (RHEL)
|
||||
become: true
|
||||
package:
|
||||
name: *gitui_deps_rhel
|
||||
state: absent
|
||||
when: ansible_facts['os_family'] == "RedHat"
|
54
roles/ncspot_user/tasks/main.yml
Normal file
54
roles/ncspot_user/tasks/main.yml
Normal file
|
@ -0,0 +1,54 @@
|
|||
- name: Install ncspot dependencies (RHEL)
|
||||
become: true
|
||||
package:
|
||||
name: &ncspot_deps_rhel
|
||||
- pulseaudio-libs-devel
|
||||
- libxcb-devel
|
||||
- openssl-devel
|
||||
- ncurses-devel
|
||||
- dbus-devel
|
||||
state: present
|
||||
when: ansible_facts['os_family'] == "RedHat"
|
||||
|
||||
- name: Install ncspot dependencies (Debian)
|
||||
become: true
|
||||
package:
|
||||
name: &ncspot_deps_debian
|
||||
- libncursesw5-dev
|
||||
- libdbus-1-dev
|
||||
- libpulse-dev
|
||||
- libssl-dev
|
||||
- libxcb1-dev
|
||||
- libxcb-render0-dev
|
||||
- libxcb-shape0-dev
|
||||
- libxcb-xfixes0-dev
|
||||
state: present
|
||||
when: ansible_facts['os_family'] == "Debian"
|
||||
|
||||
- name: Installing nscpot
|
||||
vars:
|
||||
rustup_user: "{{ running_user }}"
|
||||
rustup_cargo_crates: [ncspot]
|
||||
ansible.builtin.include_role:
|
||||
name: hurricanehrndz.rustup
|
||||
|
||||
- name: Setting up ncspot alias (spot)
|
||||
ansible.builtin.lineinfile:
|
||||
line: alias spot=ncspot
|
||||
state: present
|
||||
path: ~/.shellconfig/aliases.sh
|
||||
insertafter: EOF
|
||||
|
||||
- name: Remove ncspot dependencies (RHEL)
|
||||
become: true
|
||||
package:
|
||||
name: *ncspot_deps_rhel
|
||||
state: absent
|
||||
when: ansible_facts['os_family'] == "RedHat"
|
||||
|
||||
- name: Remove ncspot dependencies (Debian)
|
||||
become: true
|
||||
package:
|
||||
name: *ncspot_deps_debian
|
||||
state: absent
|
||||
when: ansible_facts['os_family'] == "Debian"
|
Loading…
Reference in a new issue