Commit Graph

292 Commits

Author SHA1 Message Date
elkowar
6f574e547a
Add a description and license to all Cargo.toml files 2022-05-09 18:56:32 +02:00
elkowar
7168ceafe3
small optimization to llvm codegen amount 2022-05-07 16:04:50 +02:00
elkowar
d1b222fa7f
Allow for floating point numbers in durations (fixes #447) 2022-04-29 14:20:14 +02:00
Alessio
34d929f097
Added support to label text alignment. (#412)
* Added support to label text alignment.

Since labels in gtk can't be aligned via css (I still don't know why)
and can be only aligned using code, this patch adds support for this
functionality by adding the properties :xalign and :yalign to the label
expression.
The exact behavior is described by the docs.

* Updated changelog with :xalign and :yalign for labels
2022-04-29 14:06:20 +02:00
elkowar
6211267e06
Add onclick to eventbox 2022-04-29 10:52:25 +02:00
elkowar
051d50c8fe
Add onaccept to input (fixes #441) 2022-04-29 10:32:38 +02:00
elkowar
982056f69f
Fix signal inexistant signal handler error 2022-04-27 17:44:38 +02:00
elkowar
1daeb0c77a
Fix unnumbered placeholders not working in commands 2022-04-24 16:01:53 +02:00
ElKowar
6b7fa5d55c
Implement loop widget (#350) 2022-04-23 12:54:48 +02:00
Pedro Burgos
4ffb7d4841
Transform Widget (#348) 2022-04-19 20:15:25 +02:00
Pedro Burgos
d1bbe32625
corrected start-angle to start-at (#433) 2022-04-19 19:11:59 +02:00
Biniam Bekele
fe4097c73e
EWW_BATTERY is empty string when its {total_avg} property would otherwise be NaN (#425)
Fixes #373
2022-04-19 13:50:52 +02:00
elkowar
776dc787e7
Add matches function to simplexpr 2022-04-19 13:49:28 +02:00
MartinJM
0f9847c518
Add several functions for simple expressions (#407)
Co-authored-by: elkowar <5300871+elkowar@users.noreply.github.com>
Co-authored-by: MartinJM <>
2022-04-19 13:29:17 +02:00
ElKowar
7648eb8086
Add drag and drop functionality to eventbox (Implements #409) (#432)
* Add drag and drop functionality to eventbox (fixes #409)

* Don't allow dragging empty string values

* Support dragging text

* Provide the type of drag element to the command, separate out day month and year in onclick event of calendar
2022-04-19 13:00:50 +02:00
elkowar
b3ac542e79
Add notification windowtype 2022-04-13 15:32:26 +02:00
elkowar
aa54487c47
Update to latest nightly 2022-04-13 15:19:39 +02:00
viandox
1e0a2a6341
Fixes #247 implement scroll widget (#406) 2022-04-13 15:07:38 +02:00
viandox
b100704bc7
fixes #424 allow tabs in simplexpr (#426) 2022-04-13 14:54:02 +02:00
Álvaro López
ee4d1d908a
Added desktop window type (#417) 2022-04-13 14:22:08 +02:00
viandox
fb0e57a014
fix: limit ipc socket filename length (#396) 2022-02-15 10:17:52 +01:00
viandox
3fc24a9c72
Add more operators (#401) 2022-02-15 10:12:35 +01:00
Pedro Burgos
ee07598a03
Fix anyhow's glob imports (#391) 2022-02-03 20:37:00 +01:00
legendofmiracles
bf7f49848d
Remove unindent crate (#357) 2022-02-02 21:33:26 +01:00
Sahil Chouksey
f8676f2bec
fix missing arguments (#361)
Co-authored-by: xix3r <xix3r@pop-os.localdomain>
2022-02-02 21:32:11 +01:00
Pedro Burgos
106106ade3
Graph widget (#338) 2021-12-19 16:46:15 +01:00
elkowar
b026be426e
Fix documentation not building because of missing container widget doc comment 2021-11-15 21:06:17 +01:00
ElKowar
6fec568176
State rework (#335) 2021-11-15 20:06:44 +01:00
Pedro Burgos
597625634d
Add doc comment (#345) 2021-11-10 14:42:13 +01:00
Pedro Burgos
89d4dfda27
Circular progress widget (#328)
* Basic implementation of circle: works

* Attempts to draw child widget

* Drawing a ring with a child widget inside

* Rotation

* thickness for circular progressbar

* upgraded glib-gtk to 0.14

* Clockwise and counterclockwise cicular progress widget

* Allow specifying a background color

* queue draw on value update

* ring background and foreground

* Update circular_progressbar.rs

* implament default values for CircProgPriv

* Remove useless comment

* Renamed circle-progress to circular-progress

* Actually handle multiple children widgets

* Clipping the childrens, allowing for background colors

* Clean comments of despair

* renamed c to center

* Removed commented code

* fix overflowing children allocating space outside the circle

* Removed unused import

* Fix resizing issues and implement margin via cairo

* Cleanup

* make margins work with empty widgets

* Set css name for the custom widget

Co-authored-by: elkowar <5300871+elkowar@users.noreply.github.com>
2021-11-10 00:20:01 +01:00
legendofmiracles
68e6d7b00d
add properties to magic vars (#343) 2021-11-08 17:51:00 +01:00
Pedro Burgos
45badb7f38
Implement eww get command (#319) 2021-11-05 12:37:37 +01:00
Pedro Burgos
08eef05ae8
Add support for :hover css selectors for eventbox (#323) 2021-10-25 01:03:21 +02:00
ElKowar
48bfb1e0c0
feat(config): Allow custom widgets to make use of children (#317) 2021-10-23 14:10:07 +02:00
Pedro Burgos
0aaaa2c2b8
[FEATURE] Added support for marks on scales (#293) 2021-10-17 13:39:44 +02:00
elkowar
c50bfb7184
feat: add --no-daemonize flag that disables daemonizing eww (fixes #288) 2021-10-16 14:15:44 +02:00
elkowar
d708902c03
fix(docs): mention orientation in scale properties 2021-10-16 14:01:54 +02:00
ZetaNumbers
90466ab9bf
fix: eww passes x11 and wayland features down to yuck (#306) 2021-10-16 13:44:59 +02:00
elkowar
5b52cd927a
fix: Remove accidental reference to x11 only feature in use statement in app.rs 2021-10-16 13:39:07 +02:00
elkowar
00bb0b4b0b
fix: allow windows to get moved when windowtype is normal (fixes #303) 2021-10-13 09:29:08 +02:00
Fenella
9c15e4c887
Fix typo (#283)
Co-authored-by: neralie <izzyro@tuta.io>
2021-10-01 13:38:16 +02:00
elkowar
1b2df75453
feat(cli): Add command to open the GTK debugger 2021-10-01 13:34:14 +02:00
Pedro Burgos
a07fb35eda
Fix onscroll direction issue (#280) 2021-09-13 16:19:24 +02:00
Animesh Sahu
4a56b74b9a
Adds :onhoverlost and separates out event based actions on eventbox widget (See #251 for more info). (#256)
* Adds :onhoverlost and fixes all the masks mistyped

* Adds eventbox widget and added deprecation error level warning on top-level widgets

* Run cargo fmt

* Fixes broken old link

* Fix nested element glitch by ignoring inferior events, improve deprecation arg processing into single operation

* Extract large deprecation msg to note
2021-09-12 12:01:56 +02:00
Florian Proksch
e1558965ff
chore: dependency update (#274)
Update dependencies of gtk and gdkx11 to 0.14
2021-09-11 18:02:35 +02:00
Animesh Sahu
80b89dd391
Implement trigger for defpoll variable (#273)
* Implement trigger for defpoll variable

* Rename functions and configuration properties, edit docs to show sample usage, improve nearby fields in docs.
2021-09-11 18:01:41 +02:00
Florian Proksch
3a486f181e
I3 dock fix (#258)
* fix: problem with docked widgets on i3

Show window only after settings x-props. According to the EWMH spec:
> _NET_WM_WINDOW_TYPE
> This SHOULD be set by the Client before mapping to a list of atoms
> indicating the functional type of the window.

So the _NET_WM_WINDOW_TYPE atom must be set before showing the window.

The callback to the configure event handle now checks the windows
current geometry to not move the window if it's already where it's
supposed to be. This prevents the eww daemon from endlessly chatting
with X11 in some instances.

* chore: cargo fmt
2021-09-11 17:34:53 +02:00
elkowar
5a581a5974
fix: remove no-op timeout on poll-vars 2021-09-11 14:02:28 +02:00
Pedro Burgos
df1168d6d0
Implement optional initial value for pollvars (#272)
* Implement optional initial value for pollvars

* Updated docs to include the atribute initial for pollvars
2021-09-11 13:50:45 +02:00
Ben Fiedler
089f617393
Indicate label truncation (#259)
Closes #257
2021-09-11 12:44:25 +02:00
legendofmiracles
634724bf29
Makes code more rusty/idiomatic (#264)
* makes eww code more idiomatic

* makes simplexpr more idiomatic

* makes yuck more idiomatic
2021-09-11 12:43:44 +02:00
legendofmiracles
87d4bc4c76
Checks if window is open to not flicker the window (#263) 2021-09-11 12:34:58 +02:00
Florian Proksch
07a9b97e5b
fix: correct gt and lt parsing 2021-09-05 17:51:30 +02:00
ElKowar
70285e0ebf
Add more information to EWW_RAM, fix documentation of magic variables
Better EWW_RAM / Docs update
2021-08-27 18:35:38 +02:00
druskus20
6ad999f299
Fixed percentages and ram usage 2021-08-27 18:34:44 +02:00
druskus20
fb2bff5137 Deprecation warning for EWW_CPU_USAGE 2021-08-26 02:26:40 +02:00
druskus20
0a71f3ccf8 This is now, how one calculates percentages 2021-08-26 01:38:00 +02:00
elkowar
3f65733d12
feat(simplexpr): allow json literals in simplexprs 2021-08-25 14:52:14 +02:00
druskus20
d216e8a723 EWW_NET fixed null interface error 2021-08-24 22:37:53 +02:00
elkowar
8de692da8a
fix: Fix listen-var process cleanup
listenvars now run in their own process-groups. Thus, when they get
stopped, not only does the main script get killed, but also the spawned
children, rather than them being adopted by init.
2021-08-24 14:01:58 +02:00
druskus20
905118f612 Added % used ram to EWW_RAM 2021-08-24 13:39:04 +02:00
elkowar
30868de604
fix(logs): remove variable updates from info logs 2021-08-23 10:15:17 +02:00
elkowar
bbcc8a3d29
fix: Wait 50ms before reloading config, to avoid reading an empty file 2021-08-23 10:12:31 +02:00
elkowar
17750289a5
fix: Run hot-reloading only on modify events 2021-08-23 10:06:28 +02:00
druskus20
5ca6ba03c4 Added used space to EWW_DISK 2021-08-23 00:06:45 +02:00
druskus20
86dce341ac Updated the docs, renamed EWW_CPU_USAGE to EWW_CPU 2021-08-21 19:55:04 +02:00
druskus20
4c9315a016 Adding more memory data to EWW_RAM as json fields 2021-08-21 19:12:28 +02:00
druskus20
8234145bf2 Renamed system stat functions 2021-08-21 18:30:06 +02:00
elkowar
77055b80e7
fix(diag): Add span to default values of custom widgets 2021-08-21 16:59:59 +02:00
elkowar
c380313ba7
feat(config): Add optional widget arguments prefixed with ? 2021-08-21 14:24:13 +02:00
elkowar
7aa8d8a404
fix(diag): Improve warning for unknown attributes 2021-08-21 12:33:37 +02:00
elkowar
9ce219a420
feat(cli): add --toggle to open-many, allow closing multiple windows at once 2021-08-19 15:45:07 +02:00
elkowar
7ffebf6903
Fix documentation of magic variables 2021-08-18 17:14:58 +02:00
elkowar
3830e003fe
Clean up example config further 2021-08-18 16:30:11 +02:00
elkowar
f83ad913be
Clean up example bar 2021-08-18 16:21:04 +02:00
elkowar
4942925859
Cleanup and update dependencies 2021-08-18 15:24:00 +02:00
elkowar
8faedb0e89
Fix documentation on literal widget 2021-08-17 12:04:42 +02:00
elkowar
7abf38cbfc
Include spans in var_refs of simplexpr 2021-08-17 11:53:45 +02:00
elkowar
c20b172662
Fix representation of string-interpolations by adding a dedicated concat AST variant 2021-08-17 11:10:48 +02:00
elkowar
f0b27d2ec1
Allow for aligned text using unindent 2021-08-14 16:08:43 +02:00
elkowar
398717b782
Add restart flag 2021-08-14 15:06:19 +02:00
elkowar
47e1301180
Slightly clean up error reporting 2021-08-14 14:56:49 +02:00
elkowar
b8d222384b
Make only some commands able to start the daemon 2021-08-14 14:44:22 +02:00
elkowar
e72a16a5bd
Fix daemonization 2021-08-14 14:03:16 +02:00
elkowar
096aedc0d4
Clean up some logging output 2021-08-14 13:32:09 +02:00
elkowar
91f714dc11
Add config validation step 2021-08-14 13:23:04 +02:00
elkowar
f7f718b94a
Some more error message improvements 2021-08-14 11:58:04 +02:00
elkowar
c0581e7769
Improve error messages for multiple chidren in a widget and config loading errors 2021-08-14 11:36:39 +02:00
elkowar
279785f420
Log errors in log even when a response-sender is listening, add error message when a monitor doesn't exist 2021-08-14 11:28:15 +02:00
elkowar
7647fcd2c4
Undo eww-state hotreloading change
it caused variables not to be linked to the state after the reload
2021-08-13 17:25:26 +02:00
elkowar
eb11c29e6a
fix some hot-reloading issues 2021-08-12 18:17:17 +02:00
elkowar
7bb5fddaa6
Fix windows closing eventhough they don't work 2021-08-12 16:39:10 +02:00
elkowar
9ee852c0fd
Add centerbox widget 2021-08-12 16:19:00 +02:00
elkowar
dcf27a0cbf
Some misc fixes and improvements 2021-08-10 19:23:52 +02:00
elkowar
ec8b12d206
Allow digits in identifiers in simplexpr 2021-08-10 14:30:33 +02:00
elkowar
142894c3ce
Add more concrete error messages for missing argument list 2021-08-02 16:35:43 +02:00
elkowar
eb3c2646a0
Add did you mean question to wrong variables 2021-08-02 15:54:38 +02:00
elkowar
9588f31861
Add timeout to widgets reading on-click commands 2021-08-02 14:20:00 +02:00
elkowar
2a7255c3d5
General refactors 2021-08-01 19:22:45 +02:00
elkowar
27ce9e798a
Fix error messages for script-var definitions 2021-08-01 17:36:49 +02:00
elkowar
e24cc0ac16
Fix missing attribute error message and add more span data 2021-08-01 15:52:44 +02:00
elkowar
afd0a47bf2
Remove redundant information 2021-07-31 20:01:42 +02:00
elkowar
a464a849f1
Add --toggle to open window 2021-07-31 17:45:59 +02:00
elkowar
ebf9c7e7ef
Unify error messages and remove unused code 2021-07-31 16:01:20 +02:00
elkowar
dd482987cd
Clean up ast structure 2021-07-31 13:59:02 +02:00
elkowar
24c9fee204
Fully implement string interpolation with ${} syntax 2021-07-31 13:44:23 +02:00
elkowar
5cde0228fb
Allow for string-interpolation in simplexpr 2021-07-30 16:33:28 +02:00
elkowar
41093cf0af
Replace lazy_static with once_cell 2021-07-29 15:30:00 +02:00
elkowar
ec4506d9e4
Make daemon start on server-commands when it's not running 2021-07-29 13:03:37 +02:00
elkowar
6f1118bda4
Improve error messages for unread elements in nodes and fix span handling in ast iterator 2021-07-28 19:58:51 +02:00
elkowar
8fea52bda9
Allow for comments in simplexpr 2021-07-28 17:16:01 +02:00
elkowar
fcd54abf91
Allow for different diagnostic severities in gen_diagnostic 2021-07-28 17:12:58 +02:00
elkowar
b836549232
Don't exit daemon when initial load fails 2021-07-27 17:38:01 +02:00
elkowar
99fd51dc12
Improve error messages for unknown variables in evalerror 2021-07-27 17:24:40 +02:00
elkowar
01c7ba6e2a
Add alternative string syntax with single quotes and backticks 2021-07-27 00:11:16 +02:00
elkowar
e698fd315e
Fix multi-point unicode glyphs in yuck lexer 2021-07-26 23:10:01 +02:00
elkowar
de8c79bc7d
Add magic variables again 2021-07-26 22:43:33 +02:00
elkowar
af38b09d5a
Fix all tests 2021-07-26 20:41:36 +02:00
elkowar
680ab9d633
Add Spanned trait and use it 2021-07-26 20:23:06 +02:00
elkowar
16ebf7683a
Get rid of Option<Span> by replacing it with dummy spans 2021-07-26 19:39:44 +02:00
elkowar
bb741f343d
Include file_id in LexicalError 2021-07-26 19:22:05 +02:00
elkowar
ee933fccf5
Readd some tests and as_vec dynval transformation 2021-07-26 18:48:15 +02:00
elkowar
44d7ea7a09
Fix wayland build by setting default-features=false in workspace member 2021-07-26 17:53:30 +02:00
elkowar
ed73938af1
implement ToDiagnostic for more things 2021-07-24 17:56:44 +02:00
elkowar
08cc28194b
Improve error messages for literal 2021-07-24 16:48:37 +02:00
elkowar
ae542b833d
Custom codespan_reporting::files implementation, unload files properly for literal tags 2021-07-24 14:19:06 +02:00
elkowar
680498df82
Fix lexer string escaping 2021-07-23 18:24:42 +02:00
elkowar
186c284a1a
Fix build on wayland and no display backend 2021-07-23 15:19:16 +02:00
elkowar
cff2f6beb8
Add ad-hoc diagnostic errors 2021-07-23 15:04:03 +02:00
elkowar
9f70a22cf0
significantly better error message handling everywhere 2021-07-23 13:45:30 +02:00
elkowar
a8b256987c
Simple implementation of error handling using globally stored files 2021-07-22 22:13:43 +02:00
elkowar
618e652389
Implement YuckFiles for include handling 2021-07-22 21:06:22 +02:00
elkowar
4bf3c6fd63
It compiles :o 2021-07-22 18:40:43 +02:00
elkowar
c752cc928e
good progress - state stuff is still broken, and I'm confused 2021-07-21 21:47:02 +02:00
elkowar
3efcafed84
Merge branch 'window_config_cleanup' into config_rework 2021-07-21 20:36:26 +02:00
elkowar
38f5307417
Start migration 2021-07-21 20:30:02 +02:00
elkowar
4f2e9cf063
Fix Cargo.toml files 2021-07-21 19:28:55 +02:00
elkowar
bcf3f18a24
Merge branch 'master' of ../../tmp/nomwut into config_rework 2021-07-21 19:25:32 +02:00
elkowar
4391e541b8
move to crates directory 2021-07-21 19:24:44 +02:00
elkowar
810dbb1368
Merge branch 'master' of ../simplexpr into config_rework 2021-07-21 19:21:15 +02:00
elkowar
f2b476aaf6
Setup cargo workspace 2021-07-21 19:21:11 +02:00
elkowar
0c137c8b20
Move to crates directory 2021-07-21 19:20:47 +02:00