eww signal toggle
This commit is contained in:
@@ -180,6 +180,18 @@ $foreground: $fg;
|
|||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.signal-eventbox {
|
||||||
|
padding: 0;
|
||||||
|
min-width: 0;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.signal-icon {
|
||||||
|
color: $foreground;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
tooltip {
|
tooltip {
|
||||||
background-color: $bg-bar;
|
background-color: $bg-bar;
|
||||||
color: $fg;
|
color: $fg;
|
||||||
|
|||||||
@@ -75,8 +75,14 @@
|
|||||||
:class "volume-bar"
|
:class "volume-bar"
|
||||||
:onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%"))))
|
:onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%"))))
|
||||||
|
|
||||||
|
(defwidget signal-widget []
|
||||||
|
(eventbox :class "signal-eventbox" :onclick "bash ~/.config/eww/scripts/signal-toggle"
|
||||||
|
:tooltip "Signal"
|
||||||
|
(label :text "" :class "signal-icon")))
|
||||||
|
|
||||||
(defwidget system []
|
(defwidget system []
|
||||||
(box :orientation "h" :halign "end" :spacing 0
|
(box :orientation "h" :halign "end" :spacing 0
|
||||||
|
(signal-widget)
|
||||||
(internet)
|
(internet)
|
||||||
(brightness-widget)
|
(brightness-widget)
|
||||||
(volume-widget)
|
(volume-widget)
|
||||||
|
|||||||
7
eww/.config/eww/scripts/signal-toggle
Executable file
7
eww/.config/eww/scripts/signal-toggle
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Toggle Signal scratchpad window.
|
||||||
|
# Falls back to regular focus if window was moved out of scratchpad,
|
||||||
|
# then to launching Signal if it's not running at all.
|
||||||
|
swaymsg '[app_id="signal"] scratchpad show' 2>/dev/null || \
|
||||||
|
swaymsg '[app_id="signal"] focus' 2>/dev/null || \
|
||||||
|
flatpak run org.signal.Signal &
|
||||||
Reference in New Issue
Block a user