VegOwOtenks

joined 6 months ago
 

Up until now I simply used Element, it just works and it doesn't look too bad. Unfortunately, I now have two Matrix accounts, my personal account and the account my university automatically created on their own matrix instance.
I need to communicate using both my accounts now, but Element couldn't handle two accounts at the same time, so I went on to install a second client, Fractal, which also supports multiple accounts. However, I am somewhat unhappy with Fractal because I cannot select text in messages.

Please share your experiences and recommendations with or on matrix clients.

[–] VegOwOtenks@lemmy.world 1 points 2 months ago (1 children)

You could wrap the entirety of your file in a monster macro but you'd still have to assign the macro result to a variable you need to register, which doesn't sound viable to me at least.

Maybe you can use a script that would extract all the trait implementations and create the boilerplate glue code for you, something like this:

grep --recursive --only-matching "impl PluginFunction for \w*" functions/ | sed --quiet "s/functions\/\(.*\)\.rs:impl PluginFunction for \(\w*\)/crate::functions::\1::\2{}.register(\&mut functions_map)/p"

I tried to recreate your situation locally but it may not match perfectly, maybe you'll have to adjust it a little. When I run it on my file tree which looks like this

functions
├── attr.rs
├── export.rs
└── render.rs

1 directory, 3 files

where every file has a content like this

// comment

pub struct MyAttrStructName {}

impl PluginFunction for MyAttrStructName {

}

Then I receive the following output:

crate::functions::attr::MyAttrStructName{}.register(&mut functions_map)
crate::functions::export::MyExportStructName{}.register(&mut functions_map)
crate::functions::render::MyRenderStructName{}.register(&mut functions_map)
 
[–] VegOwOtenks@lemmy.world 4 points 6 months ago

Love seeing a GNOME rice, I tried some GNOME ricing on a Fedora myself, however I was unable to get any further than installing Extensions 'Just Perfection' to hide some elements or using 'Burn my Windows', which I loved.

What did you use to style your GNOME-Shell Components?