-
Notifications
You must be signed in to change notification settings - Fork 113
Custom items (prompt segments)
Ilan Cosman edited this page Mar 7, 2022
·
11 revisions
-
Use the tide item naming scheme:
_tide_item_<ITEM NAME>
.function _tide_item_example # print item with this name and this icon with this text _tide_print_item example $tide_example_icon' ' (some_command --version | string split ' ')[2] end funcsave _tide_item_example # Save it to ~/.config/fish/functions
-
Color your item by setting some variables. Again, notice the naming scheme.
set -U tide_example_color CCFF00 set -U tide_example_bg_color normal
-
Set a corresponding icon for the item
set -U tide_example_icon ''
-
Finally, add it to your prompt
echo $tide_right_prompt_items set --append tide_right_prompt_items example
-
If you've gotten this far, and your item is working, Create a Pull Request!
- Add your new function to
/functions/_tide_item_{your item name}.fish
- Add the variables for colors and icons to all the files in
/functions/tide/configure/configs
- Add a test to
/tests
-
make
sure everything is working. You may have to uninstall tide if you've previously installed it using fisher.