eww: Show current keyboard layout
This commit is contained in:
@ -175,17 +175,15 @@
|
||||
: "wmutils xwayland start && ${EWW_CMD} update xwayland_on=true"
|
||||
}
|
||||
:hexpand true
|
||||
:class "thingy clickable"
|
||||
(label :text {
|
||||
xwayland_on ? "Xwa" : "Way"
|
||||
})
|
||||
:class {"thingy clickable toggleable" + (xwayland_on ? " on" : "")}
|
||||
(label :text "XWL")
|
||||
))
|
||||
|
||||
(defwidget kb_layout []
|
||||
(button :onclick "niri msg action switch-layout next"
|
||||
(button :onclick "wmutils next-keyboard-layout"
|
||||
:hexpand true
|
||||
:class "thingy clickable"
|
||||
(label :text "KBL")
|
||||
(label :text keyboard_layout)
|
||||
))
|
||||
|
||||
(defwidget date []
|
||||
@ -254,6 +252,8 @@
|
||||
(defpoll current_month :interval "60s" "date +%b")
|
||||
(defpoll current_temp :interval "5s" "cat /sys/class/thermal/thermal_zone*/temp")
|
||||
|
||||
(defpoll keyboard_layout :interval "5s" "wmutils keyboard-layout --short")
|
||||
|
||||
(defpoll xwayland_on :interval "5s" "wmutils xwayland is-running")
|
||||
|
||||
(defvar vpn_status "{'icon': '-', 'class': 'disconnected'}" )
|
||||
|
||||
Reference in New Issue
Block a user