New backup 2025-03-04 01:45:01
This commit is contained in:
parent
7d548e809d
commit
4c57c75b4d
2 changed files with 26 additions and 2 deletions
|
@ -1,9 +1,14 @@
|
|||
(defwidget bar []
|
||||
(centerbox :orientation "h"
|
||||
(workspaces :array workspacesArray)
|
||||
(leftgroup)
|
||||
(music)
|
||||
(rightgroup)))
|
||||
|
||||
(defwidget leftgroup []
|
||||
(box :class "leftgroup" :orientation "h" :space-evenly false :halign "start"
|
||||
(workspaces :array workspacesArray)
|
||||
(windowtitle)))
|
||||
|
||||
(defwidget rightgroup []
|
||||
(box :class "rightgroup" :orientation "h" :space-evenly false :halign "end"
|
||||
(idleinhibit)
|
||||
|
@ -30,6 +35,13 @@
|
|||
:class {entry.focused ? "focused" : ""}
|
||||
`${replace(entry.name,".*:","")}`))))
|
||||
|
||||
(deflisten active_window_name :initial false
|
||||
:interval "1s"
|
||||
"scripts/activewindow")
|
||||
(defwidget windowtitle []
|
||||
(box
|
||||
{active_window_name}))
|
||||
|
||||
(defwidget clock []
|
||||
(button :onclick 'notify-send "test"'
|
||||
{formattime(EWW_TIME,"%b %d, %Y | %H:%M")}))
|
||||
|
@ -78,7 +90,7 @@
|
|||
{(volume_level == 0) ? "" : ((volume_level > 50) ? "" : "")})
|
||||
(volume_children)))
|
||||
|
||||
(defpoll volume_level :initial false
|
||||
(defpoll volume_level :initial 0
|
||||
:interval "1s"
|
||||
"scripts/getvol")
|
||||
(defwidget volume_children []
|
||||
|
|
12
de/home/.config/eww/scripts/activewindow
Normal file → Executable file
12
de/home/.config/eww/scripts/activewindow
Normal file → Executable file
|
@ -1,2 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
function get_window_name() {
|
||||
output=$(swaymsg -t get_tree | jq -r '.. | (.nodes? // empty)[] | select(.focused==true).name')
|
||||
echo $output
|
||||
}
|
||||
|
||||
get_window_name
|
||||
|
||||
swaymsg -t subscribe '["window"]' --monitor | {
|
||||
while read -r event; do
|
||||
get_window_name
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue