Fixes and updates
Added home variable for the home folder, defaults to username. Edited neofetch config so it runs faster. Added mukti and ctrl-c.club variables.
This commit is contained in:
@@ -2,35 +2,36 @@ print_info() {
|
||||
info title
|
||||
info underline
|
||||
|
||||
info "OS" distro
|
||||
info "Host" model
|
||||
info "Kernel" kernel
|
||||
info "Uptime" uptime
|
||||
info "Packages" packages
|
||||
info "Shell" shell
|
||||
# info "Resolution" resolution
|
||||
# info "DE" de
|
||||
# info "WM" wm
|
||||
# info "WM Theme" wm_theme
|
||||
# info "Theme" theme
|
||||
info "Icons" icons
|
||||
info "Terminal" term
|
||||
info "Terminal Font" term_font
|
||||
info "CPU" cpu
|
||||
info "GPU" gpu
|
||||
info "Memory" memory
|
||||
info "OS" distro &
|
||||
info "Host" model &
|
||||
info "Kernel" kernel &
|
||||
info "Uptime" uptime &
|
||||
info "Packages" packages &
|
||||
info "Shell" shell &
|
||||
# info "Resolution" resolution &
|
||||
# info "DE" de &
|
||||
# info "WM" wm &
|
||||
# info "WM Theme" wm_theme &
|
||||
# info "Theme" theme &
|
||||
info "Icons" icons &
|
||||
info "Terminal" term &
|
||||
info "Terminal Font" term_font &
|
||||
info "CPU" cpu &
|
||||
info "GPU" gpu &
|
||||
info "Memory" memory &
|
||||
|
||||
# info "GPU Driver" gpu_driver # Linux/macOS only
|
||||
# info "CPU Usage" cpu_usage
|
||||
info "Disk" disk
|
||||
# info "Battery" battery
|
||||
info "Font" font
|
||||
# info "Song" song
|
||||
# [[ "$player" ]] && prin "Music Player" "$player"
|
||||
info "Local IP" local_ip
|
||||
# info "Public IP" public_ip
|
||||
# info "Users" users
|
||||
# info "Locale" locale # This only works on glibc systems.
|
||||
# info "GPU Driver" gpu_driver & # Linux/macOS only
|
||||
# info "CPU Usage" cpu_usage &
|
||||
info "Disk" disk &
|
||||
# info "Battery" battery &
|
||||
info "Font" font &
|
||||
# info "Song" song &
|
||||
# [[ "$player" ]] && prin "Music Player" "$player" &
|
||||
info "Local IP" local_ip &
|
||||
# info "Public IP" public_ip &
|
||||
# info "Users" users &
|
||||
# info "Locale" locale & # This only works on glibc systems.
|
||||
wait
|
||||
|
||||
info cols
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
when: update
|
||||
block:
|
||||
- name: Install packages (pacman)
|
||||
when: "'pacman' in group_names"
|
||||
when: package_manager == 'pacman' or 'pacman' in group_names
|
||||
tags: pacman
|
||||
block:
|
||||
- name: Install the good stuff (pacman)
|
||||
@@ -19,7 +19,7 @@
|
||||
- "{{ packages }}"
|
||||
|
||||
- name: Install packages (apk)
|
||||
when: "'apk' in group_names or 'alpine' in group_names"
|
||||
when: package_manager == 'apk' or 'apk' in group_names or 'alpine' in group_names
|
||||
tags: apk
|
||||
block:
|
||||
- name: Install the good stuff (apk)
|
||||
@@ -36,7 +36,7 @@
|
||||
- "{{ packages }}"
|
||||
|
||||
- name: Install packages (apt)
|
||||
when: "'apt' in group_names"
|
||||
when: package_manager == 'apt' or 'apt' in group_names
|
||||
tags: apt
|
||||
block:
|
||||
- name: Install the good stuff (apt)
|
||||
@@ -60,8 +60,8 @@
|
||||
tags: system
|
||||
|
||||
- name: Configure user configs
|
||||
when: "'user' in setup"
|
||||
when: "'user' in setup and ('neofetch' in packages or 'neofetch' in extra_packages)"
|
||||
block:
|
||||
- name: Add ~/.config/neofetch/
|
||||
copy: src=neofetch dest=/home/{{ name }}/.config/neofetch owner={{ name }} group={{ name }} mode=0755
|
||||
copy: src=neofetch dest={{ home }}/.config owner={{ name }} group={{ group }} mode=0755
|
||||
tags: config
|
||||
|
@@ -1,14 +1,14 @@
|
||||
- name: Add .aliases
|
||||
copy: src=aliases.sh dest=/home/{{ name }}/.aliases owner={{ name }} group={{ group }} mode=0644
|
||||
copy: src=aliases.sh dest={{ home }}/.aliases owner={{ name }} group={{ group }} mode=0644
|
||||
- name: Add .bat.conf
|
||||
copy: src=bat.conf dest=/home/{{ name }}/.bat.conf owner={{ name }} group={{ group }} mode=0644
|
||||
copy: src=bat.conf dest={{ home }}/.bat.conf owner={{ name }} group={{ group }} mode=0644
|
||||
when: "'bat' in packages or 'bat' in extra_packages"
|
||||
|
||||
- name: Install zsh syntax highlighting (~/.zshrc.d folder)
|
||||
when: not zsh_opt_config
|
||||
git:
|
||||
repo: https://github.com/zsh-users/zsh-syntax-highlighting.git
|
||||
dest: /home/{{ name }}/.zshrc.d/zsh-syntax-highlighting
|
||||
dest: "{{ home }}/.zshrc.d/zsh-syntax-highlighting"
|
||||
single_branch: yes
|
||||
version: master
|
||||
- name: Install zsh syntax highlighting (/opt/zsh folder)
|
||||
@@ -21,6 +21,6 @@
|
||||
become: true
|
||||
- name: Add ~/.zshrc.d -> /opt/zsh symbolic link
|
||||
when: zsh_opt_config
|
||||
file: state=link dest=/home/{{ name }}/.zshrc.d src=/opt/zsh owner={{ name }} group={{ group }} mode=0755
|
||||
file: state=link dest={{ home }}/.zshrc.d src=/opt/zsh owner={{ name }} group={{ group }} mode=0755
|
||||
- name: Set owner ship of zsh syntax highlighting files
|
||||
file: state=directory recurse=yes dest=/home/{{ name }}/.zshrc.d owner={{ name }} group={{ group }}
|
||||
file: state=directory recurse=yes dest={{ home }}/.zshrc.d owner={{ name }} group={{ group }}
|
@@ -3,16 +3,16 @@
|
||||
tags: [user,zsh]
|
||||
block:
|
||||
- name: Add .zshrc
|
||||
template: src=zshrc.zsh.j2 dest=/home/{{ name }}/.zshrc owner={{ name }} group={{ group }} mode=0644
|
||||
template: src=zshrc.zsh.j2 dest={{ home }}/.zshrc owner={{ name }} group={{ group }} mode=0644
|
||||
- name: Add zsh zstyles config
|
||||
copy: src=zstyles.zsh dest=/home/{{ name }}/.zstyles owner={{ name }} group={{ group }} mode=0644
|
||||
copy: src=zstyles.zsh dest={{ home }}/.zstyles owner={{ name }} group={{ group }} mode=0644
|
||||
|
||||
- name: Setup user bash config
|
||||
when: "'bash' in setup"
|
||||
tags: [user,bash]
|
||||
block:
|
||||
- name: Add .bashrc
|
||||
template: src=bashrc.sh.j2 dest=/home/{{ name }}/.bashrc owner={{ name }} group={{ group }} mode=0644
|
||||
template: src=bashrc.sh.j2 dest={{ home }}/.bashrc owner={{ name }} group={{ group }} mode=0644
|
||||
|
||||
- name: Setup user extra config
|
||||
when: "'extra' in setup"
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
- name: Add .env file
|
||||
when: not revert
|
||||
copy: src=env.sh dest=/home/{{ name }}/.env owner={{ name }} group={{ group }} mode=0644
|
||||
copy: src=env.sh dest={{ home }}/.env owner={{ name }} group={{ group }} mode=0644
|
||||
|
||||
- name: Revert ansible shell setup
|
||||
when: revert
|
||||
|
@@ -2,14 +2,14 @@
|
||||
tags: [zsh]
|
||||
block:
|
||||
- name: Remove .zshrc
|
||||
file: state=absent path=/home/{{ name }}/.zshrc
|
||||
file: state=absent path={{ home }}/.zshrc
|
||||
- name: Remove zsh zstyles config
|
||||
file: state=absent path=/home/{{ name }}/.zstyles
|
||||
file: state=absent path={{ home }}/.zstyles
|
||||
- name: Remove .zshrc.d folder/link
|
||||
file: state=absent path=/home/{{ name }}/.zshrc.d
|
||||
file: state=absent path={{ home }}/.zshrc.d
|
||||
|
||||
- name: Remove zsh syntax highlighting
|
||||
file: state=absent path=/home/{{ name }}/.zshrc.d/zsh-syntax-highlighting
|
||||
file: state=absent path={{ home }}/.zshrc.d/zsh-syntax-highlighting
|
||||
when: not zsh_opt_config
|
||||
- name: Remove zsh syntax highlighting (/opt/zsh)
|
||||
file: state=absent path=/opt/zsh/zsh-syntax-highlighting
|
||||
@@ -20,8 +20,8 @@
|
||||
tags: [extra]
|
||||
block:
|
||||
- name: Remove .aliases
|
||||
file: state=absent path=/home/{{ name }}/.aliases
|
||||
file: state=absent path={{ home }}/.aliases
|
||||
- name: Remove .bat.conf
|
||||
file: state=absent path=/home/{{ name }}/.bat.conf
|
||||
file: state=absent path={{ home }}/.bat.conf
|
||||
- name: Remove .env file
|
||||
file: state=absent path=/home/{{ name }}/.env
|
||||
file: state=absent path={{ home }}/.env
|
||||
|
@@ -3,19 +3,19 @@
|
||||
tags: [doom,emacs]
|
||||
block:
|
||||
- name: Remove old emacs config
|
||||
file: state=absent path=/home/{{ name }}/.emacs.d
|
||||
file: state=absent path={{ home }}/.emacs.d
|
||||
- name: Git clone doom emacs
|
||||
git:
|
||||
repo: https://github.com/hlissner/doom-emacs
|
||||
dest: /home/{{ name }}/.emacs.d
|
||||
dest: "{{ home }}/.emacs.d"
|
||||
accept_newhostkey: yes
|
||||
single_branch: yes
|
||||
version: master
|
||||
depth: 1
|
||||
- name: Install doom emacs
|
||||
shell: |
|
||||
chown -R {{ name }} /home/{{ name }}/.emacs.d
|
||||
echo "y\ny"|su {{ name }} /home/{{ name }}/.emacs.d/bin/doom install
|
||||
chown -R {{ name }} {{ home }}/.emacs.d
|
||||
echo "y\ny"|su {{ name }} {{ home }}/.emacs.d/bin/doom install
|
||||
#* ^ Above we answer terminal prompts
|
||||
# - name: Add doom emacs config
|
||||
# - name: Run doom sync
|
Reference in New Issue
Block a user