Feature: Enhanced Calculator (rofi-calc plugin)#58
Conversation
There was a problem hiding this comment.
Pull request overview
This PR replaces the existing bash-based calculator launcher with the native rofi-calc mode and updates the calculator Rasi override to better suit live calculation + history display in rofi.
Changes:
- Reworked
config-calc.rasito configure rofi’scalcmode and adjust layout (input/message/history styling). - Removed the old
RofiCalc.shloop that calledqalcand copied results to the clipboard. - Updated the Hyprland keybind to invoke
rofi -show calcdirectly.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| config/rofi/config-calc.rasi | Adds rofi-calc configuration + UI overrides for calculator mode (input/message/history). |
| config/hypr/UserScripts/RofiCalc.sh | Removes the old rofi+dmenu+qalc calculator script. |
| config/hypr/configs/Keybinds.conf | Switches the calculator keybind from the script to a direct rofi -show calc invocation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| bindlnd = ALT_L, SHIFT_L, switch keyboard layout globally, exec, $scriptsDir/KeyboardLayout.sh switch | ||
| bindlnd = SHIFT_L, ALT_L, switch keyboard layout per-window, exec, $scriptsDir/Tak0-Per-Window-Switch.sh | ||
| bindd = $mainMod ALT, C, calculator, exec, $UserScripts/RofiCalc.sh | ||
| bindd = $mainMod ALT, C, calculator (rofi-calc), exec, rofi -show calc -modi calc -no-show-match -no-sort -config ~/.config/rofi/config-calc.rasi |
|
Thank you. Sorry to make you re-do it. One suggestion. When you update something like a menu or GUI post a screenshot also. That is very helpful I'll have to check out the theme, b/c we prefer it to follow the existing themes for consistency. But I'll check it out Thx |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Thx. sorry but that theme doesn't work for me. Too different from existing themes for rofi |
|
@dwilliam62 I apologize for that! You are completely right—I accidentally copied over my local I just pushed a fix that completely reverts the theme back to the pristine LinuxBeginnings style. The only changes made to your original
Thank you for catching that! |
What I changed • Restored config/hypr/UserScripts/RofiCalc.sh (no longer deleted). • Added wl-copy behavior back in that script after qalc evaluation. • Repointed calculator keybind in config/hypr/configs/Keybinds.conf to: ◦ bindd = $mainMod ALT, C, calculator, exec, $UserScripts/RofiCalc.sh • Removed PR custom calculator theming from config/rofi/config-calc.rasi and reduced it to use the normal/global rofi theme flow (@import "~/.config/rofi/config.rasi" with minimal calc mode config). This effectively reverts the PR’s custom calc UI override and restores script-based calculator behavior with clipboard copy. On branch pr-58-test Your branch is up to date with 'origin/feat-calculator-dev'. Changes to be committed: new file: config/hypr/UserScripts/RofiCalc.sh modified: config/hypr/configs/Keybinds.conf modified: config/rofi/config-calc.rasi
|
@dwilliam62 Ah, that makes complete sense. I didn't realize the new Lua architecture was strictly bound to the Thank you for taking the time to test it so thoroughly and patching it up to fit the project's UX standards (especially restoring the clipboard functionality). Your changes look great, and I completely understand why you reverted the custom theme to maintain consistency across the ecosystem. Feel free to merge your adjusted version whenever it fits into your workflow, or close this out if you'd prefer to just keep the original script as-is for the Lua transition. Thanks again for the detailed review and feedback! |
|
I do like this. I will need to update all the distro installers as well. TBH I am tempted to replace it with a flatpak. And have a "real" calculator. Then users could actually chose their own as well. IDK. Something to think about. Thanks again but for sure this is better than what we have today. |

Replaces the clunky bash
RofiCalc.shscript with the nativerofi-calcplugin for zero-latency live results and complex math support. Includes a custom Rasi theme.Preview
Note: Re-submitted against the development branch as requested.