small utilities written in Rust
- build instructions (applies to all, unless stated)
- clone this repo
- cd to whichever directory
cargo build
- optionally
sudo mv ./target/debug/<filename> /bin/<filename>
to make it globally accessible
- create some aliases for config files that can be opened with short commands
- stored in ~/.config/rust-utils/configs.json
- Usage:
cfgedit add <alias> /path/to/config.file
adds an alias to a config file. path should be absolute, don't use ~ etccfgedit view
displays all aliasescfgedit delete <n>
deletes the nth alias with confirmation (starting from 1)cfgedit <alias>
opens the file in micro (this can be changed in the code if you prefer something else)
- create reminders and display them as dunst notifications
- stored in ~/.config/rust-utils/reminders.json
- Usage:
notify <add|create|a|c> "notification text" <low|med|high>
adds a notificationnotify <view|show|v|s>
displays all notificationsnotify <delete|remove|d|r> <n>
deletes the nth notification with confirmation (starting from 1)notify <notify|n>
fires all notifications with dunst. I have this tied to the unlock_cmd in my hypridle config.
- some astronomical calculations
- Usage:
-
astrocalc distance isdeg showwork alpha1 delta1 alpha2 delta2
- calculates approximate angular separation (deg and rad) and distance (arcseconds) between 2 Ra/Dec points.- isdeg: boolean, true = alpha/delta values are in degrees, false = radians
- showwork: boolean, true = display the steps to calculate, false = shut up and just give me the answer
- alpha 1/2: float, the Right Ascension (Ra) of each coordinate
- delta 1/2: float, the Declination (Dec) of each coordinate
-
astrocalc convert <rad-deg|deg-rad> input
- converts some values- input can be a float, int, or string. The substring 'pi' will be evaluated as pi. for example, `180, 2pi, 180.0 are all acceptable inputs.
-
- access the chatgpt API from the command line
- Usage:
chatgpt setkey <apikey>
- WARNING: this puts your api key under ~/.config/rust-utils/keychatgpt model <model>
- if no model provided, default is gpt-3.5-turbo
chatgpt <query>