mirror of
https://github.com/IlanCosman/tide.git
synced 2024-12-22 11:31:57 +03:00
0
Custom items (prompt segments)
Ilan Cosman edited this page 2022-03-07 12:38:15 -08:00
-
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.