eww signal toggle

This commit is contained in:
Jonas H
2026-06-19 10:43:05 +02:00
parent 5bef58f1cb
commit c51ea10b44
3 changed files with 25 additions and 0 deletions

View File

@@ -180,6 +180,18 @@ $foreground: $fg;
min-height: 0;
}
.signal-eventbox {
padding: 0;
min-width: 0;
min-height: 0;
}
.signal-icon {
color: $foreground;
font-weight: bold;
margin-right: 5px;
}
tooltip {
background-color: $bg-bar;
color: $fg;

View File

@@ -75,8 +75,14 @@
:class "volume-bar"
: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 []
(box :orientation "h" :halign "end" :spacing 0
(signal-widget)
(internet)
(brightness-widget)
(volume-widget)

View 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 &