added new widgets

This commit is contained in:
2025-03-08 17:44:11 +01:00
parent 6bab674c4d
commit e04868b5d0
15 changed files with 261 additions and 3 deletions

View File

@@ -0,0 +1,32 @@
(deflisten activewindow :initial "..." "hyprman -a 2>>/tmp/eww_hyprman_activewindow.log")
(defvar windowIcons
`{
"generic": "",
"spotify": "",
"mpv": "",
"firefox": "",
"chromium": "",
"zen": "",
"Alacritty": "",
"steam": "󰓓",
"discord": "󰙯"
}`)
(defwidget windowIcon []
(image
:icon-size: 12
:icon {activewindow.class}))
(defwidget hypr_active_window []
(tooltip
(label :text {activewindow.title})
(box
:class "activewindow${activewindow.xwayland == true ? '--xwayland' : ''}"
:halign "left"
:valign "center"
:spacing 3
(label
:limit-width 25
:unindent true
:text "${windowIcons[activewindow.class] ?: windowIcons['generic']} ${activewindow.class}"))))