diff --git a/eww/.config/eww/eww.scss b/eww/.config/eww/eww.scss index 7436db5..ebafd3f 100644 --- a/eww/.config/eww/eww.scss +++ b/eww/.config/eww/eww.scss @@ -84,6 +84,7 @@ eventbox, box, label, scale { // Every bar glyph and value shares one look. .signal-icon, +.localsend-icon, .net-icon, .brightness-icon, .volume-icon, @@ -101,6 +102,7 @@ eventbox, box, label, scale { .net-offline { color: $urgent; } .signal-eventbox, +.localsend-eventbox, .net-eventbox, .notification-eventbox, .dnd-eventbox { diff --git a/eww/.config/eww/eww.yuck b/eww/.config/eww/eww.yuck index 8b02be7..9f9e78f 100644 --- a/eww/.config/eww/eww.yuck +++ b/eww/.config/eww/eww.yuck @@ -202,6 +202,15 @@ :tooltip "Signal" (label :text "󰭹" :class "signal-icon"))) +;; --------------------------------------------------------------------------- +;; LocalSend +;; --------------------------------------------------------------------------- + +(defwidget localsend-widget [] + (eventbox :class "localsend-eventbox" :onclick "bash ~/.config/eww/scripts/localsend-toggle" + :tooltip "LocalSend" + (label :text "" :class "localsend-icon"))) + ;; --------------------------------------------------------------------------- ;; Bar ;; --------------------------------------------------------------------------- @@ -209,6 +218,7 @@ (defwidget system [popup monitor] (box :class "system" :orientation "h" :halign "end" :space-evenly false :spacing gap (signal-widget) + (localsend-widget) (internet :popup popup :monitor monitor) (brightness-widget) (volume-widget) diff --git a/eww/.config/eww/scripts/localsend-toggle b/eww/.config/eww/scripts/localsend-toggle new file mode 100755 index 0000000..5c4c6f5 --- /dev/null +++ b/eww/.config/eww/scripts/localsend-toggle @@ -0,0 +1,7 @@ +#!/bin/bash +# Toggle LocalSend scratchpad window. +# Falls back to regular focus if window was moved out of scratchpad, +# then to launching LocalSend if it's not running at all. +swaymsg '[app_id="org.localsend.localsend_app"] scratchpad show' 2>/dev/null || \ +swaymsg '[app_id="org.localsend.localsend_app"] focus' 2>/dev/null || \ +flatpak run org.localsend.localsend_app &