Yucky Ewwii!
Yucky Ewwii is a ewwii plugin that brings the yuck configuration language from eww to ewwii. This plugin is designed for those who prefer lisp-like languages or for those who want to benifit from the features of ewwii without much effort in porting their eww configuration over.
Installing Yucky Ewwii
To install and setup yucky-ewwii, go to the releases page, and grab the libyucky_ewwii.so file from the appropriate release. Choosing the appropriate release is easy. If you use ewwii v0.6.0, then you must download the file from the 0.6.0.x release. If you use the latest version of ewwii, then you can just download the file from latest release.
Once you have the libyucky_ewwii.so file, go to the configuration directory and create a directory named "plugins". And just move the libyucky_ewwii.so file in here.
That's it! ewwii will now automatically loading it!
NOTE:
Using multiple language plugins like
yucky-ewwiitogether will cause conflicts. Ensure thatyucky-ewwiiis the only language plugin that is present inside theplugins/directory.Additionally,
yucky-ewwiiand similar language plugins will disablerhaientirely. Meaning, configuration insideewwii.rhaiwill be ignored.
Migrating Eww Configuration
Most of the configuration can be ported over directly. But the following should be kept in mind for it to work:
Regarding yuck:
- The
eww.(css/scss/yuck)files should be renamed toewwii.(css/scss/yuck). - MAGIC VARIABLES LIKE 'EWW_CPU' ARE NOT PRESENT. So you would have to implement them manually using external scripts.
- Some widgets (like
center-box) that are present in eww might be missing in ewwii, so it is recommended to refer to the widget name and properties defined in ewwii_docs/widgets/props.
Regarding styling:
- The
eventboxwidget in ewwii cannot be styled usingeventbox { styles }in css/scss. To style them, adding a class is mandatory. - Some styling might not work as ewwii uses GTK4 instead of GTK3, which eww uses. But most of the time, it will port over nicely.
Suported Widgets
All the supported wigdets in yucky-ewwii. Do note that the properties of each widget follows the ewwii property names. If a property is not working, then refer to the properties of the actual widget provided here: Ewwii Docs.
all
These properties apply to all widgets, and can be used anywhere!
Properties
class:stringcss class namevalign:stringhow to align this vertically. possible values: "fill", "baseline", "center", "start", "end"halign:stringhow to align this horizontally. possible values: "fill", "baseline", "center", "start", "end"vexpand:boolshould this container expand vertically. Default: falsehexpand:boolshould this widget expand horizontally. Default: falseeval_ignore:boolskip the automatic re-evaluation of this widget.width:intwidth of this elementheight:intheight of this elementactive:boolIf this widget can be interacted withtooltip:stringtooltip text (on hover)visible:boolvisibility of the widgetstyle:stringinline scss style applied to the widgetcss:stringscss code applied to the widgetcan_target:boolmake the widget targettable to pointer events.focusable:boolmake widget focusablewidget_name:strongcustom widget name
combo-box-text
Properties
items:vecItems displayed in the combo boxtimeout:durationtimeout of the command. Default: "200ms"onchange:stringruns when an item is selected, replacing{}with the item
expander
Properties
name:stringname of the expanderexpanded:boolsets whether it's expanded
revealer
Properties
transition:stringanimation name ("slideright", "slideleft", etc.)reveal:boolwhether the child is revealedduration:durationhow long the transition lasts. Default: "500ms"
checkbox
Properties
checked:boolinitial checked statetimeout:durationcommand timeout. Default: "200ms"onchecked:stringcommand when checkedonunchecked:stringcommand when unchecked
color-button
Properties
use_alpha:booluse alpha channelonchange:stringcommand on color selecttimeout:durationDefault: "200ms"
color-chooser
Properties
use_alpha:booluse alpha channelonchange:stringcommand on color selecttimeout:durationDefault: "200ms"
scale
Properties
flipped:boolreverse directionmarks:stringdraw marksdraw_value:boolshow valuevalue_pos:stringwhere to show value ("left", "right", etc.)round_digits:intnumber of decimal placesvalue:floatcurrent valuemin:floatminimum valuemax:floatmaximum valuetimeout:durationDefault: "200ms"onchange:stringcommand on change (use{}for value)orientation:stringlayout direction
progress
Properties
text: text to show over the progressshow_text: whether to show the textflipped:boolreverse directionvalue:floatprogress (0–100)orientation:stringlayout direction
circular-progress
Properties
value:floatthe progression value, between (0-100)start_at:floatthe percentage that the circle should start atthickness:floatthe thickness of the circleclockwise:boolwether the progress bar spins clockwise or counter clockwisefg_color:stringforeground color of circlebg_color:stringbackground color of circle
input
Properties
value:stringset current textplaceholder:stringset a placeholder textonchange:stringcommand on change (use{}for value)timeout:durationDefault: "200ms"onaccept:stringcommand on Enter (use{}for value)password:boolobscure input
button
Properties
label:stringlabel to show on the buttontimeout:durationDefault: "200ms"onclick:stringcommand on activationonmiddleclick:stringcommand on middle clickonrightclick:stringcommand on right click
image
Properties
path:stringimage file pathcontent_fit:stringhow the image should fit ("fill", "contain", "cover", "scaledown")can_shrink:boolwhether the image can shrink or notimage_width:intimage widthimage_height:intimage heightpreserve_aspect_ratio:boolkeep aspect ratiofill_svg:stringfill color for SVGs
box
Properties
spacing:intspacing between childrenorientation:stringdirection of childrenspace_evenly:booldistribute children evenly
overlay
Properties
None
tooltip
Properties
None listed
scroll
Properties
hscroll:boolallow horizontal scrollingvscroll:boolallow vertical scrollingpropagate_natural_height:booluse the natural height if true
eventbox
Properties
orientation:stringlayout directionspacing:intspacing between childrenspace_evenly:booldistribute children evenlytimeout:durationDefault: "200ms"onscroll:stringcommand on scroll ({}becomes direction)onhover:stringcommand on hoveronhoverlost:stringcommand on hover exitcursor:stringcursor typeondropped:stringcommand on drop ({}is URI)dragvalue:stringURI to drag from this widgetdragtype:stringtype to drag ("file", "text")onclick:stringcommand on clickonmiddleclick:stringcommand on middle clickonrightclick:stringcommand on right clickonkeypress:stringcommand on any key press ({}becomes the id of the key pressed)onkeyrelease:stringcommand on any key release ({}becomes the id of the key released)
label
Properties
text:stringtext to displaytruncate:booltruncate textlimit_width:intmax characters to showtruncate_left:booltruncate beginningshow_truncated:boolshow truncationunindent:boolstrip leading spacesmarkup:stringPango markupwrap:boolwrap textgravity:stringtext gravityxalign:floathorizontal alignmentyalign:floatvertical alignmentjustify:stringtext justificationwrap_mode:stringwrap mode ("word", "char", etc.)lines:intmax lines (−1 = unlimited)
calendar
Properties
day:floatselected daymonth:floatselected monthyear:floatselected yearshow_heading:boolshow headingshow_day_names:boolshow day namesshow_week_numbers:boolshow week numbersonclick:stringcommand with{0},{1},{2}for day/month/yeartimeout:durationDefault: "200ms"
stack
Properties
selected:intchild indextransition:stringanimation nametransition_duration:intduration in millisecond as number
graph
Properties
value:floatcurrent valuetype:stringgraph type. possible values: "line" (default), "step-line", "fill", "step-fill"time_range:durationthe range of time to show. Default: "10s"min:floatminimum valuemax:floatmaximum valuedynamic:boolwhether the y range should dynamically change based on value. Default: trueanimate:boolenable smooth scrolling. Default: trueflip_x:boolflip the graph horizontally. Default: falseflip_y:boolflip the graph horizontally. Default: falsevertical:boolif set to true, the x and y axes will be exchanged. Default: falsethickness:floatthe thickness of the line (for line charts). Default: 1.0line_style:stringchanges the look of the edges in the graph (for line charts). possible values: "miter" (default), "bevel", "round"
Additional Features
-
Built in JSON support within string interpolation (version 0.7.0+)
; Example ; (defvar my-json-list "[1, 2, 3, 4]") (defvar my-json-obj '{ "key1": "value" }') (button :label "${my-json-list[0]}") (button :label "${my-json-obj.key1}")