Add sway for linux.

This commit is contained in:
Tom Alexander 2023-02-01 23:14:20 -05:00
parent 8bd1c8f79e
commit a808f81e27
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
12 changed files with 96 additions and 35 deletions

View File

@ -1,2 +1,3 @@
dependencies: dependencies:
- users - users
- gpg

View File

@ -1,10 +1,14 @@
# Enable power-saving display c-states (0=disable; 1=up to DC5; 2=up to DC6) # Enable power-saving display c-states (0=disable; 1=up to DC5; 2=up to DC6)
compat.linuxkpi.i915_enable_dc=2 hw.i915kms.enable_dc=2
# Enable frame buffer compression which allegedly saves power # Enable frame buffer compression which allegedly saves power
compat.linuxkpi.i915_enable_fbc=1 hw.i915kms.enable_fbc=1
# Skip extra modesets during boot # Skip extra modesets during boot
compat.linuxkpi.i915_fastboot=1 hw.i915kms.fastboot=1
# Disable display power wells (0=power wells always on, 1=power wells disabled when possible) # Disable display power wells (0=power wells always on, 1=power wells disabled when possible)
compat.linuxkpi.i915_disable_power_well=1 hw.i915kms.disable_power_well=1
# Reduce interrupt rate to make it more likely that a C3 sleep state can be hit. Should make the CPU wake up less often. # Reduce interrupt rate to make it more likely that a C3 sleep state can be hit. Should make the CPU wake up less often.
kern.hz=100 kern.hz=100
# Enable dpcd backlight control
hw.i915kms.enable_dpcd_backlight=1
# Enable panel self refresh
# hw.i915kms.enable_psr=1

View File

@ -1,3 +1,27 @@
- name: Install packages
package:
name:
- sway
- swaybg
- swayidle
- swaylock
- wofi
- mako
- grim
- qt5-wayland
# - gvfs
- slurp # screen coordinates for screenshots
- libnotify # mako doesn't seem to work without it
- pcmanfm # For mounting drives
- wf-recorder # screen recording
- xdg-desktop-portal
- xdg-desktop-portal-wlr # screen sharing
# - rofimoji
- wtype # for rofimoji to be able to insert characters
- dbus # for desktop notifications
- jq
state: present
- name: Install scripts - name: Install scripts
copy: copy:
src: "files/{{ item.src }}" src: "files/{{ item.src }}"

View File

@ -1,27 +1,8 @@
- name: Install packages - name: Install packages
package: package:
name: name:
- sway
- swaybg
- swayidle
- swaylock
- wofi
- mako
- grim
- xeyes - xeyes
- qt5-wayland
# - gvfs
- xauth # for ssh x11 forwarding - xauth # for ssh x11 forwarding
- slurp # screen coordinates for screenshots
- libnotify # mako doesn't seem to work without it
- pcmanfm # For mounting drives
- wf-recorder # screen recording
- xdg-desktop-portal
- xdg-desktop-portal-wlr # screen sharing
# - rofimoji
- wtype # for rofimoji to be able to insert characters
- dbus # for desktop notifications
- jq
- wev # For debugging input - wev # For debugging input
- wlogout # Log out prompt - wlogout # Log out prompt
state: present state: present

View File

@ -1,3 +1,27 @@
- name: Build aur packages
register: buildaur
become_user: "{{ build_user.name }}"
command: "aurutils-sync --no-view {{ item }}"
args:
creates: "/var/cache/pacman/custom/{{ item }}-*.pkg.tar.*"
loop:
- wev
- name: Update cache
when: buildaur.changed
pacman:
name: []
state: present
update_cache: true
- name: Install packages
package:
name:
- wev
- xorg-xauth
- xorg-xeyes
- xorg-xwayland
- name: Install scripts - name: Install scripts
copy: copy:
src: "files/{{ item.src }}" src: "files/{{ item.src }}"

View File

@ -13,6 +13,7 @@ while true; do
battery_percentage=$(apm -l) battery_percentage=$(apm -l)
battery_status=$(apm -b) battery_status=$(apm -b)
seconds_remaining=$(apm -t) seconds_remaining=$(apm -t)
# minutes remaining would be at sysctl hw.acpi.battery.time
class="" class=""
if [ $battery_status -eq 3 ]; then if [ $battery_status -eq 3 ]; then

View File

@ -3,6 +3,7 @@
name: name:
- bc # For waybar sound script - bc # For waybar sound script
- upower # Needed for waybar battery script - upower # Needed for waybar battery script
- waybar
state: present state: present
- name: Install scripts - name: Install scripts

View File

@ -10,6 +10,8 @@
group: "{{ group_name.stdout }}" group: "{{ group_name.stdout }}"
loop: loop:
- ".config/waybar" - ".config/waybar"
- ".config/sway"
- ".config/sway/config.d"
- name: Copy files - name: Copy files
copy: copy:

View File

@ -1,2 +1,3 @@
dependencies: dependencies:
- users - users
- build

View File

@ -1,9 +1,3 @@
- name: Install packages
package:
name:
- zrepl
state: present
- name: Create directories - name: Create directories
file: file:
name: "{{ item }}" name: "{{ item }}"
@ -14,6 +8,12 @@
loop: loop:
- /usr/local/etc/zrepl - /usr/local/etc/zrepl
- import_tasks: tasks/freebsd.yaml
when: 'os_flavor == "freebsd"'
- import_tasks: tasks/linux.yaml
when: 'os_flavor == "linux"'
- name: Configure zrepl - name: Configure zrepl
template: template:
src: templates/zrepl.yml.j2 src: templates/zrepl.yml.j2
@ -23,9 +23,3 @@
group: wheel group: wheel
validate: "zrepl configcheck --config %s" validate: "zrepl configcheck --config %s"
notify: "restart zrepl" notify: "restart zrepl"
- import_tasks: tasks/freebsd.yaml
when: 'os_flavor == "freebsd"'
- import_tasks: tasks/linux.yaml
when: 'os_flavor == "linux"'

View File

@ -1,3 +1,9 @@
- name: Install packages
package:
name:
- zrepl
state: present
- name: Enable services - name: Enable services
copy: copy:
src: "files/{{ item.src }}" src: "files/{{ item.src }}"

View File

@ -1,3 +1,25 @@
- name: Build aur packages
register: buildaur
become_user: "{{ build_user.name }}"
command: "aurutils-sync --no-view {{ item }}"
args:
creates: "/var/cache/pacman/custom/{{ item }}-*.pkg.tar.*"
loop:
- zrepl
- name: Update cache
when: buildaur.changed
pacman:
name: []
state: present
update_cache: true
- name: Install packages
package:
name:
- zrepl
state: present
- name: Enable services - name: Enable services
systemd: systemd:
enabled: yes enabled: yes