Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rofi launch calculator #1566

Closed
savaobay opened this issue Jun 5, 2024 · 18 comments
Closed

Add rofi launch calculator #1566

savaobay opened this issue Jun 5, 2024 · 18 comments
Labels
enhancement New feature or request

Comments

@savaobay
Copy link

savaobay commented Jun 5, 2024

Feature Request

Description

Can you add https://github.com/svenstaro/rofi-calc

Use Case

Makes calculations easy based on rofi without having to install additional applications

Proposed Solution

Launch rofi calculator with theme using keybinding Command+Shift+C

@savaobay savaobay added the enhancement New feature or request label Jun 5, 2024
@kRHYME7
Copy link
Collaborator

kRHYME7 commented Jun 6, 2024

This plugin of rofi got this deps.

https://archlinux.org/packages/extra/x86_64/libqalculate/
https://archlinux.org/packages/extra/x86_64/rofi-calc/

Also can you check if the aur package is working?
https://archlinux.org/packages/extra/x86_64/rofi-calc/

If we can pull this off we can theme this to follow Hyde

Here's some extra tools we have using rofi
image

@savaobay
Copy link
Author

savaobay commented Jun 6, 2024

yes it works but i don't know how to make it follow the theme :V
240607_00h19m01s_screenshot

@Sitolam
Copy link
Contributor

Sitolam commented Jun 28, 2024

Would like to see this themed too 😃

@se7en-x230
Copy link

se7en-x230 commented Jun 29, 2024

I just use my old dmenu script with rofi

image

image

@kRHYME7
Copy link
Collaborator

kRHYME7 commented Jun 29, 2024

I see so this way we will only need qalc, right?

@se7en-x230
Copy link

se7en-x230 commented Jun 29, 2024

yes the lib
1 extra/libqalculate 5.2.0-1 [0 B 15.49 MiB] [Installed]

I forgot if you need the gui version to run updates on currency to be able to convert. I might have found a cli command to do that but I forgot

Edit: I do not have qalculate-qt installed so I guess I managed to update.
But calculations work with only the lib

@kRHYME7
Copy link
Collaborator

kRHYME7 commented Jun 29, 2024

That's perfect! I only got the Flatpak qt one. Didn't know the lib exposes an executable. Can I get inspiration from your script? Will add a Hyde show calc option if anyone would like to use it.

@se7en-x230
Copy link

se7en-x230 commented Jun 29, 2024

Welcome

qalc -e
updates the currency rate
I added to my script
...
qalc -e &
sleep 1
...
to always run a quick update

Meaning minimum requirements besides rofi is libqalculate

@kRHYME7
Copy link
Collaborator

kRHYME7 commented Jun 29, 2024

to always run a quick update

hmm can we make it run every 24 hours by default? or every after reboot/relogin. I takes much time for me to always fetch.

@se7en-x230
Copy link

Sounds like a plan

@kRHYME7
Copy link
Collaborator

kRHYME7 commented Jun 30, 2024

Hyde show calc

At launch :
image

After some calcualtions:

  • last result becomes the entry message
  • the message will be added to pasteboard
  • also being notified too
    image

image

regarding the currency rate, updated it every launch in background, and works like a charm.

@se7en-x230
Copy link

Very nice.

But dunst is a bit unreadable in Mocha

240630_09h21m32s_screenshot

@kRHYME7
Copy link
Collaborator

kRHYME7 commented Jun 30, 2024

Reverted it back to default for now. Soon if we had a single executable for wallbash. We might as well generate the color scheme on the go.

(we can cater for both light and dark modes, but this might be start of having a bloated icon pack stored in the repo)

@se7en-x230
Copy link

se7en-x230 commented Jun 30, 2024

image

for now I helped myself :)

@Sitolam
Copy link
Contributor

Sitolam commented Jun 30, 2024

That's perfect! I only got the Flatpak qt one. Didn't know the lib exposes an executable. Can I get inspiration from your script? Will add a Hyde show calc option if anyone would like to use it.

I can use the Hyde show calc option. But I was wondering how to implement this little program in my setup. So when I want to set a keybind for that, do I need to use Hyde show calc or is it better to use something else (like the actual shell script and if so where can I find that).

@kRHYME7
Copy link
Collaborator

kRHYME7 commented Jun 30, 2024

image

edit your keybinds at ~/.config/hypr/keybindings.conf

@Sitolam
Copy link
Contributor

Sitolam commented Jun 30, 2024

image

edit your keybinds at ~/.config/hypr/keybindings.conf

Why do you use bindd and not just bind.

@kRHYME7
Copy link
Collaborator

kRHYME7 commented Jun 30, 2024

Why do you use bindd and not just bind.

Upon the latest update we can now have explicit description for keybinds hence adding 'd' flag.

image

@kRHYME7 kRHYME7 closed this as completed Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants