From 13254e6132571df510c2c2b035a416b56b31801b Mon Sep 17 00:00:00 2001 From: Bahar KURT <168406273+kurtbahartr@users.noreply.github.com> Date: Sun, 10 Nov 2024 23:08:37 +0300 Subject: [PATCH] Shipping 1.1.3! (#47) * Shipping 1.1.3! The past week sure was a hurdle, and now it's time for a new version! * Add Noto fonts to be installed * Restart NetworkManager and Bluetooth post-config * Add a command to remove `pacman` lock file in ZSHRC * Enable experimental D-Bus interfaces for Bluetooth * Add new AUR package: `bluetooth-autoconnect` * Relocate where NetworkManager is enabled and started The same was already done for Bluetooth before. * Write changelog for 1.1.3 * Update VERSION --------- Co-authored-by: Bahar Kurt Co-authored-by: Diana <65094216+dianaw353@users.noreply.github.com> --- CHANGELOG.md | 13 +++++++++++++ README.md | 9 +++++---- dotfiles.sh | 4 ++++ group_vars/all.yml | 11 +++++++++-- pre_tasks/system/tasks/Archlinux.yml | 9 ++++++++- pre_tasks/system/tasks/main.yml | 29 ++++++++++++++++++++++++++++ roles/ags/tasks/main.yml | 1 - roles/core_apps/files/zsh/.zshrc | 1 + 8 files changed, 69 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0622b63..50712747 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +Version 1.1.3 +https://github.com/dianaw353/dotfiles/releases/tag/V1.1.3 +--------------------------------------------------------- +**Changes** +- Add a ZSH alias to remove `pacman`'s `db.lck` +- Enable experimental D-Bus interfaces for Bluetooth + +**Script** +- Add new AUR package: `bluetooth-autoconnect` +- Add Noto fonts +- Relocate where NetworkManager is enabled and started +- Restart NetworkManager and Bluetooth services + Version 1.1.2 https://github.com/dianaw353/dotfiles/releases/tag/V1.1.2 -------------------------------------------------------- diff --git a/README.md b/README.md index 2b53a2ff..4cd2c046 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ - Sane defaults for Pacman - Clean and minimal configurations for fastfetch, ZSH and OMP (Oh-My-Posh) + - ZSH configuration also includes a command called `rmpmlck` (ReMove PacMan LoCK) to remove the lock file if Pacman is not running. - Focus on GTK - Login skin by AGS - Uses GreetD as the greeter. @@ -135,11 +136,11 @@ ansible-playbook main.yml --ask-become-pass -t role1 [role2 [...]] ## To-Do -- [ ] Add `noto-fonts` and `noto-fonts-emoji` to the list of packages to install. +- [x] Add `noto-fonts` and `noto-fonts-emoji` to the list of packages to install. - [ ] Add configuration to install additional optional fonts. -- [ ] Add autoEnable and Experimental configurations for Bluetooth in `/etc/bluetooth/main.conf`. -- [ ] Restart all network and Bluetooth services. -- [ ] Command to remove `pacman` lock file (`/var/lib/pacman/db.lck`) for failsafe cleanup in case of a power outage mid-transaction. +- [x] Enable Experimental configurations for Bluetooth in `/etc/bluetooth/main.conf`. +- [x] Restart all network and Bluetooth services. +- [x] Command to remove `pacman` lock file (`/var/lib/pacman/db.lck`) for failsafe cleanup in case of a power outage mid-transaction. View [the relevant issues tag](https://github.com/dianaw353/dotfiles/issues?q=is%3Aissue+label%3AFeature+is%3Aopen) for a more comprehensive rough list of To-Dos and upcoming features. diff --git a/dotfiles.sh b/dotfiles.sh index 440ad656..6ed2f9b9 100644 --- a/dotfiles.sh +++ b/dotfiles.sh @@ -166,6 +166,10 @@ function arch_setup { _task "Installing Git" _cmd "sudo pacman -S --noconfirm git" fi + if ! pacman -Q noto-fonts-emoji >/dev/null 2>&1; then + _task "Installing Noto emoji fonts" + _cmd "sudo pacman -S --noconfirm noto-fonts-emoji" + fi } # Function to update Ansible Galaxy diff --git a/group_vars/all.yml b/group_vars/all.yml index 48821716..a6b7b1c4 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml @@ -6,7 +6,11 @@ system: # whether to enable bluetooth or not # true or false enable_bluetooth: true - + + # whether to install and enable bluetooth-autoconnect or not + # true or false + enable_bluetooth_autoconnect: true + # Audio Server # Weather to use pipewire or pluseaudio # pipewire or pulseaudio @@ -63,7 +67,6 @@ default_roles: post_tasks: - package_cleanup - - # TODO: In future this will be able to change hyprland keybinds to open these applications core_packages: # outside of WM/DE dependencies @@ -76,6 +79,10 @@ core_packages: # outside of WM/DE dependencies - helix # text editor - ttf-dejavu-nerd - mission-center # System Monitor + - noto-fonts + - noto-fonts-emoji + - noto-fonts-cjk + - noto-fonts-extra # user prefered packages outside of core_packages user_packages: diff --git a/pre_tasks/system/tasks/Archlinux.yml b/pre_tasks/system/tasks/Archlinux.yml index ee4ee216..adf23f52 100644 --- a/pre_tasks/system/tasks/Archlinux.yml +++ b/pre_tasks/system/tasks/Archlinux.yml @@ -15,7 +15,7 @@ - qt5-wayland - gtk4 - libadwaita - + - name: Install Audio Server Packages block: - name: Install Audio Packages | {{ ansible_distribution }} @@ -65,3 +65,10 @@ loop: - bluez - bluez-utils + + - name: Install Bluetooth-Autoconnect Package | {{ ansible_distribution }} + kewlfft.aur.aur: + name: bluetooth-autoconnect + state: present + become: false + when: "system.enable_bluetooth and system.enable_bluetooth_autoconnect" diff --git a/pre_tasks/system/tasks/main.yml b/pre_tasks/system/tasks/main.yml index 0159c8b4..733afcaa 100644 --- a/pre_tasks/system/tasks/main.yml +++ b/pre_tasks/system/tasks/main.yml @@ -22,8 +22,15 @@ - name: xdg-user-dirs-update.service scope: user become: false + - name: NetworkManager - name: bluetooth when: system.enable_bluetooth + - name: bluetooth-autoconnect + when: "system.enable_bluetooth and system.enable_bluetooth_autoconnect" + - name: pulseaudio-bluetooth-autoconnect + when: "system.enable_bluetooth and system.enable_bluetooth_autoconnect and system.audio_server == 'pulseaudio'" + scope: user + become: false - name: Start pipewire services ansible.builtin.systemd: @@ -37,6 +44,23 @@ - pipewire-pulse - wireplumber +- name: Restart Systemd Services + ansible.builtin.systemd: + state: restarted + name: "{{ item.name }}" + scope: "{{ item.scope | default(omit) }}" + become: "{{ item.become | default(true) }}" + loop: + - name: NetworkManager + - name: bluetooth + when: system.enable_bluetooth + - name: bluetooth-autoconnect + when: "system.enable_bluetooth and system.enable_bluetooth_autoconnect" + - name: pulseaudio-bluetooth-autoconnect + when: "system.enable_bluetooth and system.enable_bluetooth_autoconnect and system.audio_server == 'pulseaudio'" + scope: user + become: false + - name: Fixes block: - name: Gtk Window Buttons @@ -60,3 +84,8 @@ when: system.audio_server == 'pipewire' loop: - { src: '/usr/share/pipewire', dest: '/etc/pipewire' } + + - name: Enable experimental D-Bus interfaces in /etc/bluetooth/main.conf + command: "sed -i '/^#Experimental = false/ s/.*/Experimental = true/' /etc/bluetooth/main.conf" + become: true + when: system.enable_bluetooth diff --git a/roles/ags/tasks/main.yml b/roles/ags/tasks/main.yml index a7e2d5c0..40a077c0 100644 --- a/roles/ags/tasks/main.yml +++ b/roles/ags/tasks/main.yml @@ -45,7 +45,6 @@ become: true with_items: - greetd - - NetworkManager - name: Create directories and set ownership ansible.builtin.file: diff --git a/roles/core_apps/files/zsh/.zshrc b/roles/core_apps/files/zsh/.zshrc index 1a84b585..2a54c78f 100644 --- a/roles/core_apps/files/zsh/.zshrc +++ b/roles/core_apps/files/zsh/.zshrc @@ -63,6 +63,7 @@ zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls --color $realpath' # Aliases alias ls='eza --icons' alias c='clear' +alias rmpmlck='sudo ps -e -C pacman > /dev/null && sudo rm /var/lib/pacman/db.lck || echo "Pacman is already running, not removing the lock file."' # Shell integrations eval "$(fzf --zsh)"