From 832ce41b8e210d281281152ca387b11340d96475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Sun, 5 Nov 2023 16:43:01 +0100 Subject: [PATCH] nix: Finish desktop environment --- config/automatrop/playbooks/default.yml | 7 -- .../desktop_environment/default/main.yml | 1 - .../desktop_environment/handlers/main.yml | 10 -- .../roles/desktop_environment/tasks/main.yml | 106 ------------------ config/automatrop/roles/termux/tasks/main.yml | 10 +- config/lemonbar/display.py | 2 +- config/nix/hm/common.nix | 2 + config/polybar/config | 5 +- 8 files changed, 6 insertions(+), 137 deletions(-) delete mode 100644 config/automatrop/roles/desktop_environment/default/main.yml delete mode 100644 config/automatrop/roles/desktop_environment/handlers/main.yml delete mode 100644 config/automatrop/roles/desktop_environment/tasks/main.yml diff --git a/config/automatrop/playbooks/default.yml b/config/automatrop/playbooks/default.yml index b7760c4..e9da6a0 100644 --- a/config/automatrop/playbooks/default.yml +++ b/config/automatrop/playbooks/default.yml @@ -10,16 +10,9 @@ when: root_access - role: dotfiles tags: dotfiles - - role: mnussbaum.base16-builder-ansible # Required for desktop_environment - tags: - - color - - desktop_environment - role: termux tags: termux when: termux - - role: desktop_environment - tags: desktop_environment - when: display_server - role: extensions tags: extensions # TODO Dependencies diff --git a/config/automatrop/roles/desktop_environment/default/main.yml b/config/automatrop/roles/desktop_environment/default/main.yml deleted file mode 100644 index aaaf42b..0000000 --- a/config/automatrop/roles/desktop_environment/default/main.yml +++ /dev/null @@ -1 +0,0 @@ -base16_scheme: solarized-dark diff --git a/config/automatrop/roles/desktop_environment/handlers/main.yml b/config/automatrop/roles/desktop_environment/handlers/main.yml deleted file mode 100644 index c8b25b0..0000000 --- a/config/automatrop/roles/desktop_environment/handlers/main.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- name: I3-reload - ansible.builtin.command: i3-msg reload - listen: i3-reload -- name: Shell-reload - ansible.builtin.command: "{{ ansible_env.HOME }}/.local/bin/colorSchemeApply" - listen: shell-reload -- name: Fzf-reload - ansible.builtin.shell: source {{ ansible_env.HOME }}/.local/bin/colorSchemeApplyFzf - listen: fzf-reload diff --git a/config/automatrop/roles/desktop_environment/tasks/main.yml b/config/automatrop/roles/desktop_environment/tasks/main.yml deleted file mode 100644 index 748a00a..0000000 --- a/config/automatrop/roles/desktop_environment/tasks/main.yml +++ /dev/null @@ -1,106 +0,0 @@ ---- -- name: Ensure directories for desktop applications are present - ansible.builtin.file: - state: directory - path: "{{ ansible_user_dir }}/{{ item }}" - mode: u=rwx,g=rx,o=rx - with_items: - - .config/Xresources - - .config/rofi - - .local/bin - - .local/share/fonts - - .config/qutebrowser - - .config/tridactyl/themes - -# Download fonts -- name: Download Nerd fonts - ansible.builtin.get_url: - url: https://raw.githubusercontent.com/ryanoasis/nerd-fonts/704336735f576781b2a57b12a0c723e3316cbdec/patched-fonts/DejaVuSansMono/{{ item.folder }}/complete/{{ - item.filename | urlencode }} - dest: "{{ ansible_user_dir }}/.local/share/fonts/{{ item.filename }}" - mode: u=rw,g=r,o=r - loop: - - filename: DejaVu Sans Mono Bold Nerd Font Complete Mono.ttf - folder: Bold - - filename: DejaVu Sans Mono Bold Oblique Nerd Font Complete Mono.ttf - folder: Bold-Italic - - filename: DejaVu Sans Mono Nerd Font Complete Mono.ttf - folder: Regular - - filename: DejaVu Sans Mono Oblique Nerd Font Complete Mono.ttf - folder: Italic - -- name: Download icon fonts - ansible.builtin.get_url: - url: https://raw.githubusercontent.com/FortAwesome/Font-Awesome/a8386aae19e200ddb0f6845b5feeee5eb7013687/fonts/fontawesome-webfont.ttf - dest: "{{ ansible_user_dir }}/.local/share/fonts/fontawesome-webfont.ttf" - mode: u=rw,g=r,o=r -# TODO Either replace with ForkAwesome or Nerd Fonts - -- name: Install python dependencies for lemonbar - ansible.builtin.pip: - requirements: "{{ ansible_user_dir }}/.dotfiles/config/lemonbar/requirements.txt" - extra_args: --break-system-packages # It's fine, it's local anyways - -# Build a single color scheme and template and assign it to a variable -- base16_builder: - scheme: "{{ base16_scheme }}" - template: # This requires https://github.com/mnussbaum/base16-builder-ansible/pull/6 - - i3 - - xresources - - rofi - - alacritty - - shell - - fzf - - vim - - qutebrowser - - tridactyl - - dunst - register: base16_schemes - tags: - - color - - i3 - -- name: Download base16 theme for fzf - ansible.builtin.copy: - content: "{{ base16_schemes['schemes'][base16_scheme]['fzf']['bash']['base16-' + base16_scheme + '.config'] }}" - dest: "{{ ansible_env.HOME }}/.local/bin/colorSchemeApplyFzf" - mode: u=rw,g=r,o=r - notify: - - fzf-reload - tags: - - color - -- name: Download base16 theme for shell - ansible.builtin.copy: - content: "{{ base16_schemes['schemes'][base16_scheme]['shell']['script']['base16-' + base16_scheme + '.sh'] }}" - dest: "{{ ansible_env.HOME }}/.local/bin/colorSchemeApply" - mode: u=rwx,g=rx,o=rx - notify: - - shell-reload - when: false # Not currently used - tags: - - color - -- name: Set used base16 theme for vim - ansible.builtin.copy: - path: "{{ ansible_env.HOME }}/.config/vim/colorscheme.vim" - mode: u=rw,g=r,o=r - content: colorscheme base16-{{ base16_scheme }} - when: false # Not currently used - tags: - - color - -- name: Enable user services - ansible.builtin.systemd: - name: "{{ item }}" - state: started - enabled: true - scope: user - loop: - - pulseaudio - - mpd - when: has_systemd - -# TODO bar (might change bar in the future, so...) -# TODO highlight (there IS a template but the colors look different from vim and mostly the same from when there's no config) -# TODO https://github.com/makuto/auto-base16-theme ? :P diff --git a/config/automatrop/roles/termux/tasks/main.yml b/config/automatrop/roles/termux/tasks/main.yml index 8656d6d..35504f6 100644 --- a/config/automatrop/roles/termux/tasks/main.yml +++ b/config/automatrop/roles/termux/tasks/main.yml @@ -13,15 +13,7 @@ path: "{{ ansible_user_dir }}/.hushlogin" mode: u=rw,g=r,o=r -# Build a single color scheme and template and assign it to a variable -- base16_builder: - scheme: "{{ base16_scheme }}" - template: # This requires https://github.com/mnussbaum/base16-builder-ansible/pull/6 - - termux - register: base16_schemes - tags: - - color - +# https://github.com/kdrag0n/base16-termux/blob/master/templates/default.mustache - name: Download base16 theme for Termux ansible.builtin.copy: content: "{{ base16_schemes['schemes'][base16_scheme]['termux']['colors']['base16-' + base16_scheme + '.properties'] }}" diff --git a/config/lemonbar/display.py b/config/lemonbar/display.py index fecdae1..a109e01 100755 --- a/config/lemonbar/display.py +++ b/config/lemonbar/display.py @@ -54,7 +54,7 @@ class Bar: """ # Constants - FONTS = ["DejaVuSansMono Nerd Font Mono", "Font Awesome"] + FONTS = ["DejaVuSansMono Nerd Font Mono"] FONTSIZE = 10 @staticmethod diff --git a/config/nix/hm/common.nix b/config/nix/hm/common.nix index 017ed0f..bc454ed 100644 --- a/config/nix/hm/common.nix +++ b/config/nix/hm/common.nix @@ -50,6 +50,8 @@ trust = "ultimate"; }]; }; + fzf.enable = true; + # TODO highlight or bat }; home.packages = with pkgs; [ diff --git a/config/polybar/config b/config/polybar/config index 8927355..b3f1b77 100644 --- a/config/polybar/config +++ b/config/polybar/config @@ -51,9 +51,8 @@ padding-right = 2 module-margin-left = 1 module-margin-right = 1 -font-0 = "Font Awesome:size=10;0" -font-1 = "DejaVu Sans:size=10;0" -font-2 = "DejaVuSansMono Nerd Font Mono:pixelsize=10;0" +font-0 = "DejaVu Sans:size=10;0" +font-1 = "DejaVuSansMono Nerd Font Mono:pixelsize=10;0" modules-left = i3