Commit Graph

292 Commits

Author SHA1 Message Date
elkowar
0cccd9d74f
Fix for loop widget not removing scopes when value changes 2022-10-01 17:37:32 +02:00
elkowar
f0d4f40dcf
Fix panic on trailing backslash in string (fixes #551) 2022-10-01 17:24:34 +02:00
Josiah Hilden
37fc231761
Safe Access Operator (#577)
Co-authored-by: elkowar <5300871+elkowar@users.noreply.github.com>
2022-10-01 17:03:54 +02:00
elkowar
d58d91de78
Prepare 0.4.0 release 2022-09-04 20:20:13 +02:00
elkowar
7623e7e692
Improve CSS error handling by parsing GTK error output (see #446) 2022-09-04 16:16:37 +02:00
elkowar
58907eac4b
Add some comments 2022-09-03 21:06:50 +02:00
elkowar
d3b94cc76e
Factor out scss handling into it's own module 2022-09-03 20:33:18 +02:00
elkowar
89ea0a1fbc
Update dependencies 2022-09-03 18:49:07 +02:00
elkowar
b4d47956b5
Move from structopt to clap-derive 2022-09-03 18:41:23 +02:00
ElKowar
2c3b3ff260
Cleanup AstError and Error representation in general (#549) 2022-09-03 18:17:21 +02:00
elkowar
9e3df8be3b
Remove BREAKING CHANGE notification in calendar onchange 2022-09-03 10:18:53 +02:00
elkowar
bf532e63cc
Fix calendar months being indexed by 0 (fixes #544) 2022-09-03 10:16:01 +02:00
elkowar
44a8331417
Fix circular-progress showing 0 when value is 100 and clockwise is false (fixes #543) 2022-09-03 10:09:47 +02:00
elkowar
956f96fd76
Update dependencies 2022-08-29 16:34:19 +02:00
elkowar
28af00becd
Refactor app.rs, cleaning up run-while handling 2022-08-29 16:25:44 +02:00
elkowar
683936c23d
Remove some unused code 2022-08-29 14:53:02 +02:00
elkowar
e1d9e5cfff
Add check for duplicate variable definition (fixes #320) 2022-08-29 14:07:53 +02:00
elkowar
eba1c032ae
Add build commit hash to eww --version 2022-08-29 13:29:38 +02:00
elkowar
3c57ca59bf
Fix scale running onchange on scripted changes (fixes #482) 2022-08-29 12:43:01 +02:00
elkowar
abb7315215
Cleanup script-var-handler properly in drop impl 2022-08-29 11:51:52 +02:00
Carlos Pinto
535f21f5f9
Allow output names to select a monitor (#522)
Co-authored-by: elkowar <5300871+elkowar@users.noreply.github.com>
2022-08-29 11:20:36 +02:00
elkowar
e09c7364a5
Make max value for graph f64::MAX (fixes #540) 2022-08-29 11:11:38 +02:00
elkowar
ec7f982bdf
Add names to threads and tasks for easier debugging of crashes 2022-08-29 11:10:36 +02:00
ElKowar
17d91f8a44
Fix listen vars not being cleaned up when reloading config (#538) 2022-08-27 14:23:28 +02:00
elkowar
3ab53b0323
Make sure starting listenvars is idempodent (fixes #360) 2022-08-27 10:43:51 +02:00
Niclas
9977384b06
Cargo update and remove most duplicate dependencies (#531)
Co-authored-by: elkowar <5300871+elkowar@users.noreply.github.com>
2022-08-27 10:12:23 +02:00
viandox
d814edd0d5
Add support for :active on event box (#529) 2022-08-18 15:11:10 +02:00
gavynriebau
7a3e2f4448
Add support for "round-digits" property for scale widget (#509)
Co-authored-by: elkowar <5300871+elkowar@users.noreply.github.com>
2022-08-15 10:34:54 +02:00
elkowar
0a5d6f4ac9
set overlay passthrough to true (fixes #503) 2022-08-15 10:29:59 +02:00
elkowar
4004362633
Attempt to fix inconsistent window closing behavior w.r.t. script var cleanup and toggle 2022-08-15 10:17:26 +02:00
elkowar
9da37b8bd0
Add lexer test for empty string interpolation 2022-08-09 12:41:02 +02:00
elkowar
aac4c3aef4
hotfix: fix panic because of deallocated GTK widget being called in handler (fixes #478) 2022-07-27 18:50:29 +02:00
pentamassiv
d8bb8c4142
Updated dependencies (#449)
* Updated gtk dependencies

* Added badge for status of dependencies

* Updated remaining deps for eww and other crates

* Removed obsolete imports

* Fixed problems with PR and bumped deps

* Updated x11rb
2022-07-27 18:25:08 +02:00
viandox
962c06c0ee
Fixed #501 add password prop to input (#502) 2022-07-25 11:28:28 +02:00
Niclas
b2f60a1f43
Remove some unnecessary allocations (#480) 2022-07-03 00:00:49 +02:00
elkowar
0b0715fd50
Fix some types missing in widget docs 2022-05-26 15:00:34 +02:00
elkowar
fe7bc30fc9
Release version 0.3.0 2022-05-26 14:00:57 +02:00
elkowar
a85d35d919
Fix some comments in overlay 2022-05-26 13:41:30 +02:00
viandox
c855ec07d5
Add overlay widget (#457) 2022-05-26 13:40:09 +02:00
elkowar
3297c4eb70
Add format explanation to eww open position and size docs 2022-05-26 13:27:58 +02:00
elkowar
77adfbca6b
Set window class to window name 2022-05-26 13:17:11 +02:00
elkowar
00ff1dc492
Fix error message of enum_parse-based attributes 2022-05-26 13:13:35 +02:00
Yury Ankudinov
52e14d8263
Fix/signal disconnect (#445)
Co-authored-by: elkowar <5300871+elkowar@users.noreply.github.com>
2022-05-26 10:45:47 +02:00
elkowar
a37c2e435f
Fix magic vars not working anymore (fixes #462) 2022-05-23 22:22:37 +02:00
Lucas Ransan
1830fe8535
Fix build on Freebsd (#459)
* Fix get_battery_capacity type on BSD

* Update sysinfo: 0.16.5 -> 0.23.12
2022-05-23 19:27:20 +02:00
elkowar
4fb5c37a35
Add hint about width of progress (fixes #458) 2022-05-22 11:21:45 +02:00
elkowar
6b5c35cbf9
Add EWW_CONFIG_DIR, EWW_CMD, EWW_EXECUTABLE variables 2022-05-21 15:06:42 +02:00
elkowar
c0dcc43336
Improve error message for missing default monitor on wayland 2022-05-16 12:04:29 +02:00
elkowar
78ae9cb00a
Add error message when overriding builtin widgets accidentally (fixes #456) 2022-05-14 19:19:17 +02:00
elkowar
e810f2a67a
Add version to workspace dependencies 2022-05-09 18:58:55 +02:00
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