From 6fb0387ac6969db5b3b1da13e6685bf37fa20209 Mon Sep 17 00:00:00 2001 From: "flyingscorpio@clevo" Date: Tue, 22 Feb 2022 10:42:24 +0100 Subject: [PATCH] toansible: Add kitty installation --- configs.yml | 13 ---------- playbook.yml | 1 + {dotfiles => roles/kitty/files}/kitty.conf | 0 roles/kitty/tasks/main.yml | 29 ++++++++++++++++++++++ 4 files changed, 30 insertions(+), 13 deletions(-) rename {dotfiles => roles/kitty/files}/kitty.conf (100%) create mode 100644 roles/kitty/tasks/main.yml diff --git a/configs.yml b/configs.yml index 057f5da..a003907 100644 --- a/configs.yml +++ b/configs.yml @@ -24,19 +24,6 @@ grub: sudo sed -i -E 's/^#?GRUB_DISABLE_SUBMENU.+/GRUB_DISABLE_SUBMENU=y/' /etc/default/grub && sudo grub-mkconfig -o /boot/grub/grub.cfg -kitty: - - install: - - kitty - - symlink: - - dotfiles/kitty.conf - - ~/.config/kitty/kitty.conf - - clone: - - https://github.com/dexpota/kitty-themes.git - - ~/.git_clones/kitty-themes - - symlink: - - ~/.git_clones/kitty-themes/themes/gruvbox_dark.conf - - ~/.config/kitty/theme.conf - bash: - install: - bash-completion diff --git a/playbook.yml b/playbook.yml index 3078d17..072c650 100644 --- a/playbook.yml +++ b/playbook.yml @@ -3,6 +3,7 @@ - hosts: localhost roles: - base + - kitty - terminator - neovim - ssh-agent diff --git a/dotfiles/kitty.conf b/roles/kitty/files/kitty.conf similarity index 100% rename from dotfiles/kitty.conf rename to roles/kitty/files/kitty.conf diff --git a/roles/kitty/tasks/main.yml b/roles/kitty/tasks/main.yml new file mode 100644 index 0000000..29f9f5d --- /dev/null +++ b/roles/kitty/tasks/main.yml @@ -0,0 +1,29 @@ +--- + +- name: Install kitty (Archlinux) + become: true + pacman: + name: + - kitty + when: ansible_distribution == 'Archlinux' + +- name: Install kitty (Debian) + become: true + apt: + name: + - kitty + when: ansible_distribution == 'Debian' + +- name: Copy kitty config + copy: + src: kitty.conf + dest: ~/.config/kitty/kitty.conf + +- name: Clone kitty themes + command: git clone https://github.com/dexpota/kitty-themes.git ~/.git_clones/kitty-themes + +- name: Symlink the kitty theme + file: + src: ~/.git_clones/kitty-themes/themes/gruvbox_dark.conf + path: ~/.config/kitty/theme.conf + state: link