https://github.com/alichtman/rofi-insect
Imitation `macOS Spotlight Calculator` for Linux
https://github.com/alichtman/rofi-insect
dmenu dmenu-calc dmenu-scripts insect rofi rofi-calc rofi-calculator rofi-scripts
Last synced: 2 months ago
JSON representation
Imitation `macOS Spotlight Calculator` for Linux
- Host: GitHub
- URL: https://github.com/alichtman/rofi-insect
- Owner: alichtman
- License: mit
- Created: 2023-01-27T10:55:15.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-27T14:17:31.000Z (over 2 years ago)
- Last Synced: 2025-02-13T21:18:44.589Z (4 months ago)
- Topics: dmenu, dmenu-calc, dmenu-scripts, insect, rofi, rofi-calc, rofi-calculator, rofi-scripts
- Language: Shell
- Homepage:
- Size: 3.51 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rofi-insect
[insect](https://github.com/sharkdp/insect) plugin for [`rofi`](https://github.com/davatorium/rofi) / `dmenu`. This is an analog of [macOS Spotlight calculator functions](https://macandegg.com/2020/12/use-macos-spotlight-search-as-calculator/) for Linux.
https://user-images.githubusercontent.com/20600565/215080362-7c188e15-2d56-421d-abec-9bf88b44df60.mp4
> **Note**
> Watch the demo in full screen for much better quality.## Usage
`insect` is used as the calculator back-end. You can pass any operation `insect` can handle.
## Recommended Installation + Configuration
I integrate this with [`rofi-bangs.sh`](https://github.com/gotbletu/shownotes/blob/master/rofi-scripts-collection/rofi-bangs.sh).
```bash
## ~/.config/rofi/scripts/rofi-bangs.sh
...# Use calculator (insect)
COMMANDS["calc"]="$XDG_CONFIG_HOME/rofi/scripts/rofi-insect/rofi-insect.sh"
LABELS["calc"]=""
```And I have `rofi-bangs` integrated with [`sxhkd`](https://github.com/baskerville/sxhkd).
```bash
## ~/.config/sxhkd/sxhkdrc
...
alt + @m
~/.config/rofi/scripts/rofi-bangs.sh
```I press `Alt + m` on my keyboard, and get the `rofi-bangs` popup. I can then enter `calc` mode.
If you want faster access to the calculator, you can add an entry in your `sxhkdrc` like:
```bash
alt + 7
$XDG_CONFIG_HOME/rofi/scripts/rofi-insect/rofi-insect.sh
```## Dependencies
1. `insect`
2. `xsel`
3. `rofi` or `dmenu`