Open BardiyaFeili opened 1 week ago
What should the category for it in the configuration be called? Is "Modes" good or something else?
What should the category for it in the configuration be called? Is "Modes" good or something else?
yes modes is fine, eventually we will add drun run and dmenu modes as well, so its perfect
Is xclip support really needed
yes
I've tried doing something like this and some other things but they don't work.
Command::new("sh")
.arg("-c")
.arg(format!("echo {} | xclip -i", &app.name))
.spawn()
.unwrap();
The reason is rust gives the arguments to sh without quotes but quotes are required for the pipe which is the only way I found to copy something to xclip
Using evalexpr
is inferior to what other launchers do. Krunner, Walker, pop-launcher etc. all use libqalculate
. In Rust you'd try to use Rink
, as f.e. Anyrun is doing.
Anything else isn't adequate.
I've tried doing something like this and some other things but they don't work.
Command::new("sh") .arg("-c") .arg(format!("echo {} | xclip -i", &app.name)) .spawn() .unwrap();
The reason is rust gives the arguments to sh without quotes but quotes are required for the pipe which is the only way I found to copy something to xclip
https://doc.rust-lang.org/std/process/index.html#handling-io
Using
evalexpr
is inferior to what other launchers do. Krunner, Walker, pop-launcher etc. all uselibqalculate
. In Rust you'd try to useRink
, as f.e. Anyrun is doing.Anything else isn't adequate.
I had a look at it and it looks like it will be better than the evalexpr crate I was using.
I will switch to it tomorrow.
What's the state here? Last commit was 2 days ago.
What's the state here? Last commit was 2 days ago.
I have been busy for a few days. I think that I will have time to work on this on Sunday.
What's the state here? Last commit was 2 days ago.
I have been busy for a few days. I think that I will have time to work on this on Sunday.
I just wasn't sure, because the last thing you wrote was about switching to Rink, which i thought happened in the last commit. No worries.
I just wasn't sure, because the last thing you wrote was about switching to Rink, which i thought happened in the last commit. No worries.
The switch to rink is complete and the calculator if working fine right now, The only thing left is supporting xclip.
Hello,
Most launchers have a calculation functionality to quickly calculate equations and copy them to the clipboard.
My code uses the evalexpr crate to do the calculations and wl-copy to copy the result to the clipboard. wl-copy is available as wl-clipboard in most distros' repos.
you can enter calculation mode but typing '=' and then you can enter your expression. Pressing 'enter' on the result will copy it to the clipboard using the
wl-copy -t text/plain "result"
command.I was not exactly sure how the score system works but the rest of the app is working as intended so there doesn't seem to be a problem.
I also did not know how to put a calculator icon for the result so right no there is no icon.
This is my first pr so If there are any issues with the code please tell me so I can fix them.