ansible: sync templates with live system state

- hyprland: add pulseaudio + custom/gpu modules to waybar
- hyprland: template hyprlauncher.conf
- hyprland: add keybinding updates (yazi, chrome, screenshots, reload)
- hyprland: add uwsm package, replace wofi with hyprlauncher
- hyprland: add waybar GPU monitoring script
- greetd: update tuigreet command to uwsm start
- vars: add uwsm, hyprlauncher; remove wofi; add screenshot tools
This commit is contained in:
ja
2026-05-21 09:10:24 +02:00
parent 1fcb467c04
commit 2bf5f5c005
8 changed files with 97 additions and 9 deletions
@@ -2,7 +2,7 @@
# The VT to run the greeter on
vt = 1
# Default session: tuigreet greeter
# Default session: tuigreet greeter with uwsm-managed Hyprland as fallback
[default_session]
command = "tuigreet --time --remember --asterisks --cmd {{ hyprland_cmd | default('start-hyprland') }}"
command = "tuigreet --time --remember --asterisks --cmd 'uwsm start -e -D Hyprland hyprland.desktop'"
user = "greeter"
+20 -1
View File
@@ -16,10 +16,19 @@
loop:
- hypr
- waybar
- wofi
- hyprlauncher
- dunst
tags: [hyprland, config]
- name: Hyprland - ensure Waybar scripts directory exists
file:
path: "/home/{{ system_user }}/.config/waybar/scripts"
state: directory
owner: "{{ system_user }}"
group: "{{ system_user }}"
mode: '0755'
tags: [hyprland, config]
- name: Hyprland - configure NVIDIA DRM KMS (modeset=1)
lineinfile:
path: /etc/modprobe.d/nvidia.conf
@@ -70,5 +79,15 @@
- { src: 'hyprpaper.conf.j2', dest: 'hypr/hyprpaper.conf' }
- { src: 'waybar_config.j2', dest: 'waybar/config' }
- { src: 'waybar_style.css.j2', dest: 'waybar/style.css' }
- { src: 'hyprlauncher.conf.j2', dest: 'hypr/hyprlauncher.conf' }
- { src: 'dunstrc.j2', dest: 'dunst/dunstrc' }
tags: [hyprland, config]
- name: Hyprland - deploy Waybar GPU monitoring script
template:
src: 'waybar_gpu_script.sh.j2'
dest: "/home/{{ system_user }}/.config/waybar/scripts/gpu.sh"
owner: "{{ system_user }}"
group: "{{ system_user }}"
mode: '0755'
tags: [hyprland, config]
@@ -67,7 +67,7 @@ $mainMod = SUPER
bind = $mainMod, Q, exec, kitty
bind = $mainMod, C, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, E, exec, dolphin
bind = $mainMod, E, exec, kitty -e yazi
bind = $mainMod, V, togglefloating,
bind = $mainMod, D, exec, hyprlauncher
bind = $mainMod, P, pseudo
@@ -75,6 +75,7 @@ bind = $mainMod, J, layoutmsg, togglesplit
# Worktime safers
bind = $mainMod, F, fullscreen, 0 # Toggle fullscreen
bind = $mainMod, R, exec, hyprctl reload # Reload Hyprland config
bind = $mainMod, SPACE, togglefloating # Toggle float (popup window)
bind = $mainMod, TAB, cyclenext # Cycle through windows
bind = $mainMod SHIFT, TAB, cyclenext, prev # Cycle backwards
@@ -101,6 +102,12 @@ bind = $mainMod ALT, J, resizeactive, 0 40
# Lock screen
bind = $mainMod CTRL, L, exec, hyprlock
# Screenshots
bind = , Print, exec, grimblast copysave area
bind = $mainMod, Print, exec, grimblast copysave active
bind = $mainMod SHIFT, Print, exec, grimblast copysave output
bind = $mainMod ALT, Print, exec, grim -g "$(slurp)" - | satty -f -
# Focus
bind = $mainMod, left, movefocus, l
@@ -120,7 +127,7 @@ bind = $mainMod SHIFT, up, movewindow, u
bind = $mainMod SHIFT, down, movewindow, d
# Apps
bind = $mainMod, B, exec, chromium
bind = $mainMod, B, exec, google-chrome-stable
# Workspaces
bind = $mainMod, 1, workspace, 1
@@ -0,0 +1,16 @@
[general]
grab_focus = true
[cache]
enabled = true
[finders]
default_finder = desktop
unicode_prefix = .
math_prefix = =
font_prefix = '
desktop_launch_prefix = uwsm app --
desktop_icons = true
[ui]
window_size = 500 300
@@ -4,7 +4,7 @@
"height": 30,
"modules-left": ["hyprland/workspaces", "hyprland/mode"],
"modules-center": ["hyprland/window"],
"modules-right": ["network", "cpu", "memory", "clock", "tray"],
"modules-right": ["network", "cpu", "memory", "custom/gpu", "pulseaudio", "clock", "tray"],
"hyprland/workspaces": {
"disable-scroll": true,
"all-outputs": true,
@@ -25,5 +25,21 @@
"format-wifi": " {essid} ({signalStrength}%)",
"format-ethernet": "󰈀 {ifname}",
"format-disconnected": "⚠ Disconnected"
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-muted": "󰝟 Muted",
"format-icons": {
"default": ["", "", ""]
},
"on-click": "pavucontrol",
"on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
"on-scroll-up": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+",
"on-scroll-down": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
},
"custom/gpu": {
"exec": "~/.config/waybar/scripts/gpu.sh",
"interval": 5,
"return-type": "json"
}
}
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Waybar GPU usage module - NVIDIA
set -euo pipefail
GPU=$(nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits 2>/dev/null | head -1 | tr -d ' ')
TEMP=$(nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits 2>/dev/null | head -1 | tr -d ' ')
if [ -z "$GPU" ]; then
echo '{"text": "GPU N/A", "percentage": 0}'
exit 0
fi
if [ "$GPU" -ge 80 ]; then
ICON=""
elif [ "$GPU" -ge 50 ]; then
ICON=""
else
ICON="󰢮"
fi
echo "{\"text\": \"${ICON} ${GPU}%\", \"tooltip\": \"GPU Usage: ${GPU}% | Temp: ${TEMP}°C\", \"percentage\": ${GPU}}"
@@ -21,6 +21,10 @@ window#waybar {
border-bottom: 3px solid #ffffff;
}
#clock, #cpu, #memory, #network, #tray {
#clock, #cpu, #memory, #network, #tray, #pulseaudio, #custom-gpu {
padding: 0 10px;
}
#pulseaudio:hover {
background: #555;
}