rwx

eww (ElKowar's Wacky Widgets)

eww

a rust based widget system with a lisp (s-expression) based widget configuration and SCSS styling

Setup

Running

Building

Yuck

include

import configuration relative to eww root directory

 (include "./src/yuck/_variables.yuck")

defwindow

define a window with content "test window". windows can be normal , dock etc. based on X11 or Wayland window types. reserve provides space for non-overlapping windows like dock s. monitor and geometry are used for positioning and sizing

 (defwindow bar
   :monitor 1
   :windowtype "dock"
   :geometry (geometry :x "0%"
                       :y "0%"
                       :width "90%"
                       :height "10px"
                       :anchor "top center")
   :reserve (struts :side "bottom" :distance "4%")
   "test window")

defvar

define normal variable

 (defvar workspacelist "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]")

deflisten

define a variable that listens for changes at the end of a command's live output/log

 (deflisten music :intial ""
   "playerctl --follow metadata --format '{{ artist }} - {{ title }}' || true")

defpoll

define a variable that polls a command for given interval

 (defpoll time :interval "10s"
   "date '+%H:%M %b %d, %Y'")

defwidget

 (defwidget bar []
   (centerbox :orientation "h"
     (workspaces)
     (music)
     (sidestuff)))
 (defwidget workspaces []
   (box :class "workspace"
        :orientation "h"
        :space-evenly true
        :halign "start"
        :spacing 10
     (for entry in workspacelist
       (button :onclick "wmctrl -s ${entry - 1}" entry))))
external sources
  1. eww showcase: media/eww-showcase.png
  2. docs: https://elkowar.github.io/eww/eww.html
  3. example: https://github.com/janleigh/dotfiles/tree/master/cfg/eww
  4. more on EWMH: https://en.wikipedia.org/wiki/Extended_Window_Manager_Hints