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:
@@ -2,7 +2,7 @@
|
|||||||
# The VT to run the greeter on
|
# The VT to run the greeter on
|
||||||
vt = 1
|
vt = 1
|
||||||
|
|
||||||
# Default session: tuigreet greeter
|
# Default session: tuigreet greeter with uwsm-managed Hyprland as fallback
|
||||||
[default_session]
|
[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"
|
user = "greeter"
|
||||||
|
|||||||
@@ -16,10 +16,19 @@
|
|||||||
loop:
|
loop:
|
||||||
- hypr
|
- hypr
|
||||||
- waybar
|
- waybar
|
||||||
- wofi
|
- hyprlauncher
|
||||||
- dunst
|
- dunst
|
||||||
tags: [hyprland, config]
|
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)
|
- name: Hyprland - configure NVIDIA DRM KMS (modeset=1)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/modprobe.d/nvidia.conf
|
path: /etc/modprobe.d/nvidia.conf
|
||||||
@@ -70,5 +79,15 @@
|
|||||||
- { src: 'hyprpaper.conf.j2', dest: 'hypr/hyprpaper.conf' }
|
- { src: 'hyprpaper.conf.j2', dest: 'hypr/hyprpaper.conf' }
|
||||||
- { src: 'waybar_config.j2', dest: 'waybar/config' }
|
- { src: 'waybar_config.j2', dest: 'waybar/config' }
|
||||||
- { src: 'waybar_style.css.j2', dest: 'waybar/style.css' }
|
- { src: 'waybar_style.css.j2', dest: 'waybar/style.css' }
|
||||||
|
- { src: 'hyprlauncher.conf.j2', dest: 'hypr/hyprlauncher.conf' }
|
||||||
- { src: 'dunstrc.j2', dest: 'dunst/dunstrc' }
|
- { src: 'dunstrc.j2', dest: 'dunst/dunstrc' }
|
||||||
tags: [hyprland, config]
|
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, Q, exec, kitty
|
||||||
bind = $mainMod, C, killactive,
|
bind = $mainMod, C, killactive,
|
||||||
bind = $mainMod, M, exit,
|
bind = $mainMod, M, exit,
|
||||||
bind = $mainMod, E, exec, dolphin
|
bind = $mainMod, E, exec, kitty -e yazi
|
||||||
bind = $mainMod, V, togglefloating,
|
bind = $mainMod, V, togglefloating,
|
||||||
bind = $mainMod, D, exec, hyprlauncher
|
bind = $mainMod, D, exec, hyprlauncher
|
||||||
bind = $mainMod, P, pseudo
|
bind = $mainMod, P, pseudo
|
||||||
@@ -75,6 +75,7 @@ bind = $mainMod, J, layoutmsg, togglesplit
|
|||||||
|
|
||||||
# Worktime safers
|
# Worktime safers
|
||||||
bind = $mainMod, F, fullscreen, 0 # Toggle fullscreen
|
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, SPACE, togglefloating # Toggle float (popup window)
|
||||||
bind = $mainMod, TAB, cyclenext # Cycle through windows
|
bind = $mainMod, TAB, cyclenext # Cycle through windows
|
||||||
bind = $mainMod SHIFT, TAB, cyclenext, prev # Cycle backwards
|
bind = $mainMod SHIFT, TAB, cyclenext, prev # Cycle backwards
|
||||||
@@ -101,6 +102,12 @@ bind = $mainMod ALT, J, resizeactive, 0 40
|
|||||||
# Lock screen
|
# Lock screen
|
||||||
bind = $mainMod CTRL, L, exec, hyprlock
|
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
|
# Focus
|
||||||
bind = $mainMod, left, movefocus, l
|
bind = $mainMod, left, movefocus, l
|
||||||
|
|
||||||
@@ -120,7 +127,7 @@ bind = $mainMod SHIFT, up, movewindow, u
|
|||||||
bind = $mainMod SHIFT, down, movewindow, d
|
bind = $mainMod SHIFT, down, movewindow, d
|
||||||
|
|
||||||
# Apps
|
# Apps
|
||||||
bind = $mainMod, B, exec, chromium
|
bind = $mainMod, B, exec, google-chrome-stable
|
||||||
|
|
||||||
# Workspaces
|
# Workspaces
|
||||||
bind = $mainMod, 1, workspace, 1
|
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,
|
"height": 30,
|
||||||
"modules-left": ["hyprland/workspaces", "hyprland/mode"],
|
"modules-left": ["hyprland/workspaces", "hyprland/mode"],
|
||||||
"modules-center": ["hyprland/window"],
|
"modules-center": ["hyprland/window"],
|
||||||
"modules-right": ["network", "cpu", "memory", "clock", "tray"],
|
"modules-right": ["network", "cpu", "memory", "custom/gpu", "pulseaudio", "clock", "tray"],
|
||||||
"hyprland/workspaces": {
|
"hyprland/workspaces": {
|
||||||
"disable-scroll": true,
|
"disable-scroll": true,
|
||||||
"all-outputs": true,
|
"all-outputs": true,
|
||||||
@@ -25,5 +25,21 @@
|
|||||||
"format-wifi": " {essid} ({signalStrength}%)",
|
"format-wifi": " {essid} ({signalStrength}%)",
|
||||||
"format-ethernet": " {ifname}",
|
"format-ethernet": " {ifname}",
|
||||||
"format-disconnected": "⚠ Disconnected"
|
"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;
|
border-bottom: 3px solid #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
#clock, #cpu, #memory, #network, #tray {
|
#clock, #cpu, #memory, #network, #tray, #pulseaudio, #custom-gpu {
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pulseaudio:hover {
|
||||||
|
background: #555;
|
||||||
|
}
|
||||||
|
|||||||
@@ -49,13 +49,18 @@ hyprland_packages:
|
|||||||
- hypridle
|
- hypridle
|
||||||
- hyprshot
|
- hyprshot
|
||||||
- hyprcursor
|
- hyprcursor
|
||||||
|
- grim
|
||||||
|
- slurp
|
||||||
|
- wl-clipboard
|
||||||
|
- satty
|
||||||
|
- yazi
|
||||||
- xdg-desktop-portal-hyprland
|
- xdg-desktop-portal-hyprland
|
||||||
- waybar
|
- waybar
|
||||||
- wofi
|
- hyprlauncher
|
||||||
- dunst
|
- dunst
|
||||||
- kitty
|
- kitty
|
||||||
- cliphist
|
- cliphist
|
||||||
- wl-clipboard
|
- uwsm
|
||||||
- brightnessctl
|
- brightnessctl
|
||||||
- pipewire
|
- pipewire
|
||||||
- pipewire-pulse
|
- pipewire-pulse
|
||||||
|
|||||||
Reference in New Issue
Block a user