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 []
|
(defwidget bar []
|
||||||
(centerbox :orientation "h"
|
(centerbox :orientation "h"
|
||||||
(workspaces :array workspacesArray)
|
(leftgroup)
|
||||||
(music)
|
(music)
|
||||||
(rightgroup)))
|
(rightgroup)))
|
||||||
|
|
||||||
|
(defwidget leftgroup []
|
||||||
|
(box :class "leftgroup" :orientation "h" :space-evenly false :halign "start"
|
||||||
|
(workspaces :array workspacesArray)
|
||||||
|
(windowtitle)))
|
||||||
|
|
||||||
(defwidget rightgroup []
|
(defwidget rightgroup []
|
||||||
(box :class "rightgroup" :orientation "h" :space-evenly false :halign "end"
|
(box :class "rightgroup" :orientation "h" :space-evenly false :halign "end"
|
||||||
(idleinhibit)
|
(idleinhibit)
|
||||||
|
@ -30,6 +35,13 @@
|
||||||
:class {entry.focused ? "focused" : ""}
|
:class {entry.focused ? "focused" : ""}
|
||||||
`${replace(entry.name,".*:","")}`))))
|
`${replace(entry.name,".*:","")}`))))
|
||||||
|
|
||||||
|
(deflisten active_window_name :initial false
|
||||||
|
:interval "1s"
|
||||||
|
"scripts/activewindow")
|
||||||
|
(defwidget windowtitle []
|
||||||
|
(box
|
||||||
|
{active_window_name}))
|
||||||
|
|
||||||
(defwidget clock []
|
(defwidget clock []
|
||||||
(button :onclick 'notify-send "test"'
|
(button :onclick 'notify-send "test"'
|
||||||
{formattime(EWW_TIME,"%b %d, %Y | %H:%M")}))
|
{formattime(EWW_TIME,"%b %d, %Y | %H:%M")}))
|
||||||
|
@ -78,7 +90,7 @@
|
||||||
{(volume_level == 0) ? "" : ((volume_level > 50) ? "" : "")})
|
{(volume_level == 0) ? "" : ((volume_level > 50) ? "" : "")})
|
||||||
(volume_children)))
|
(volume_children)))
|
||||||
|
|
||||||
(defpoll volume_level :initial false
|
(defpoll volume_level :initial 0
|
||||||
:interval "1s"
|
:interval "1s"
|
||||||
"scripts/getvol")
|
"scripts/getvol")
|
||||||
(defwidget volume_children []
|
(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
|
#!/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