From be124761d4a3bbc9888f0fed57bf2e0ee1bd4e3a Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Mon, 24 Apr 2023 04:04:17 +0200 Subject: [PATCH] Fix fix asusctl --- .../systemd/system/battery-charge-threshold.service | 2 +- roles/laptop/tasks/asusctl.yml | 10 ++++++++-- roles/laptop/tasks/supergfxctl.yml | 13 +++---------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/roles/laptop/files/lib/systemd/system/battery-charge-threshold.service b/roles/laptop/files/lib/systemd/system/battery-charge-threshold.service index be18e16..ebfd1f4 100644 --- a/roles/laptop/files/lib/systemd/system/battery-charge-threshold.service +++ b/roles/laptop/files/lib/systemd/system/battery-charge-threshold.service @@ -6,7 +6,7 @@ StartLimitBurst=0 [Service] Type=oneshot Restart=on-failure -ExecStart=/bin/bash -c 'echo 80 > /sys/class/power_supply/BAT0/charge_control_end_threshold' +ExecStart=/bin/bash -c 'echo 60 > /sys/class/power_supply/BAT0/charge_control_end_threshold' [Install] WantedBy=multi-user.target \ No newline at end of file diff --git a/roles/laptop/tasks/asusctl.yml b/roles/laptop/tasks/asusctl.yml index 80bd017..3a8216c 100644 --- a/roles/laptop/tasks/asusctl.yml +++ b/roles/laptop/tasks/asusctl.yml @@ -3,10 +3,16 @@ apt: update_cache: yes pkg: - - rust-all + - cmake + - libayatana-appindicator3-1 - libclang-dev + - libgtk-3-dev + - libglib2.0-dev + - libgdk-pixbuf-2.0-dev + - libpango1.0-dev - libudev-dev - make + - rust-all - name: checkout asusctl repo git: @@ -28,6 +34,6 @@ - name: "Enable service" become: yes ansible.builtin.systemd: - name: asusctl + name: asusd state: started enabled: yes \ No newline at end of file diff --git a/roles/laptop/tasks/supergfxctl.yml b/roles/laptop/tasks/supergfxctl.yml index 3cddd0b..1bb8182 100644 --- a/roles/laptop/tasks/supergfxctl.yml +++ b/roles/laptop/tasks/supergfxctl.yml @@ -10,24 +10,17 @@ - name: checkout supergfxctl repo git: - repo: "{{ asusctl.repo }}" + repo: "{{ supergfxctl.repo }}" dest: "{{ ansible_user_dir }}/src/supergfxctl" clone: yes update: yes -- name: build asusctl +- name: build supergfxctl make: chdir: "{{ ansible_user_dir }}/src/supergfxctl" -- name: install asusctl +- name: install supergfxctl become: yes make: chdir: "{{ ansible_user_dir }}/src/supergfxctl" target: install - -- name: "Enable service" - become: yes - ansible.builtin.systemd: - name: asusctl - state: started - enabled: yes \ No newline at end of file