added a widget for swaync and added keybinds for swaync
This commit is contained in:
@@ -46,4 +46,5 @@
|
||||
:halign 'end'
|
||||
(hyprsunset)
|
||||
(datetime)
|
||||
(stray)))
|
||||
(stray)
|
||||
(swaync)))
|
||||
|
||||
@@ -6,3 +6,4 @@
|
||||
@import 'widgets/hypr_activewindow.scss';
|
||||
@import 'widgets/hypr_workspaces.scss';
|
||||
@import 'widgets/sysmon.scss';
|
||||
@import 'widgets/swaync.scss';
|
||||
|
||||
@@ -6,3 +6,4 @@
|
||||
(include "widgets/hypr_workspaces.yuck")
|
||||
(include "widgets/hypr_activewindow.yuck")
|
||||
(include "widgets/sysmon.yuck")
|
||||
(include "widgets/swaync.yuck")
|
||||
|
||||
13
eww/widgets/swaync.scss
Normal file
13
eww/widgets/swaync.scss
Normal file
@@ -0,0 +1,13 @@
|
||||
.swaync{
|
||||
background: aqua;
|
||||
color: black;
|
||||
&--dnd{
|
||||
background: rosybrown;
|
||||
color: black;
|
||||
}
|
||||
&--inhib{
|
||||
background: indianred;
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
|
||||
19
eww/widgets/swaync.yuck
Normal file
19
eww/widgets/swaync.yuck
Normal file
@@ -0,0 +1,19 @@
|
||||
(deflisten notification :initial '{ "count": 0, "dnd": false, "visible": false, "inhibited": false }' "swaync-client -s")
|
||||
|
||||
(defvar swaync_icon_act "")
|
||||
(defvar swaync_icon_inh "")
|
||||
(defvar swaync_icon_dnd "")
|
||||
|
||||
(defwidget swaync []
|
||||
(eventbox
|
||||
:class "swaync${notification.dnd == true ? " swaync--dnd" : ""}${notification.inhibited == true ? " swaync--inhib" : ""}"
|
||||
:cursor "pointer"
|
||||
:onclick "swaync-client -t"
|
||||
:onmiddleclick "swaync-client -d"
|
||||
:onrightclick "swaync-client -C"
|
||||
(box
|
||||
:orientation "horizontal"
|
||||
:spacing 3
|
||||
:space-evenly false
|
||||
(label :text "${notification.dnd == true ? swaync_icon_dnd : notification.inhibited == true ? swaync_icon_inh : swaync_icon_act}")
|
||||
(label :text "${notification.count}"))))
|
||||
@@ -6,14 +6,14 @@
|
||||
color: red
|
||||
}
|
||||
.ram{
|
||||
background: yellow;
|
||||
background: tan;
|
||||
}
|
||||
.disk{
|
||||
background: lightblue;
|
||||
background: mediumturquoise;
|
||||
}
|
||||
.cpu{
|
||||
background: green;
|
||||
background: lightgreen;
|
||||
}
|
||||
.net{
|
||||
background: purple;
|
||||
background: plum;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user