Add rust item, fix os item and configs

This commit is contained in:
Ilan Cosman 2020-08-19 10:35:04 -07:00
parent 28caddfb6e
commit 650d3e6988
9 changed files with 50 additions and 9 deletions

View File

@ -140,7 +140,8 @@ Open each file and click "Install". This will make the `MesloLGS NF` font availa
## Acknowledgments
- [Powerlevel10k][] - Inspired much of Tide's documentation, resources, ideas, and design.
- [Starship][] - Inspired elements of the documentation and community health files.
- [Starship][] - Inspired elements of Tide's documentation and community health files.
- [Spacefish][] - Inspired some of Tide's items.
[actions]: https://github.com/IlanCosman/tide/actions
[ci_badge]: https://github.com/IlanCosman/tide/workflows/CI/badge.svg
@ -159,5 +160,6 @@ Open each file and click "Install". This will make the `MesloLGS NF` font availa
[powerlevel10k]: https://github.com/romkatv/powerlevel10k/
[items]: https://github.com/IlanCosman/tide/wiki/Items
[pure]: https://github.com/rafaelrinaldi/pure
[spacefish]: https://github.com/matchai/spacefish
[starship]: https://github.com/starship/starship
[wiki]: https://github.com/IlanCosman/tide/wiki

View File

@ -1,3 +1,4 @@
function _tide_item_os
set_color $tide_os_color
printf '%s' $_tide_os_icon
end

View File

@ -0,0 +1,14 @@
function _tide_item_rust
if not type --quiet rustc || not test -e Cargo.toml || test (count *.rs) -gt 0
return
end
set -l rustVersion (rustc --version | string split ' ')[2]
if test "$tide_rust_verbose_version" = false
set rustVersion (string split '-' $rustVersion)[1] # Cut off -suffixes from version. "v1.30.0-beta" vs "v1.30.0"
end
set_color $tide_rust_color
printf '%s' {$tide_rust_icon}' ' $rustVersion
end

View File

@ -104,6 +104,11 @@ _set fake_tide_time_color 5F8787
_set fake_tide_time_format '%T'
_set fake_tide_time_bg_color 444444
# ---------------OS---------------
_set fake_tide_os_color normal
_set fake_tide_os_bg_color normal
_set fake_tide_os_use_nearest true
_set fake_tide_os_color EEEEEE
_set fake_tide_os_bg_color 444444
_set fake_tide_os_use_nearest true
# ---------------Rust---------------
_set fake_tide_rust_color 00AFAF
_set fake_tide_rust_bg_color 444444
_set fake_tide_rust_icon ''
_set fake_tide_rust_verbose_version false

View File

@ -106,4 +106,9 @@ _set fake_tide_time_bg_color normal
# ---------------OS---------------
_set fake_tide_os_color normal
_set fake_tide_os_bg_color normal
_set fake_tide_os_use_nearest true
_set fake_tide_os_use_nearest true
# ---------------Rust---------------
_set fake_tide_rust_color 00AFAF
_set fake_tide_rust_bg_color normal
_set fake_tide_rust_icon ''
_set fake_tide_rust_verbose_version false

View File

@ -105,4 +105,9 @@ _set fake_tide_time_bg_color normal
# ---------------OS---------------
_set fake_tide_os_color normal
_set fake_tide_os_bg_color normal
_set fake_tide_os_use_nearest true
_set fake_tide_os_use_nearest true
# ---------------Rust---------------
_set fake_tide_rust_color 00AFAF
_set fake_tide_rust_bg_color normal
_set fake_tide_rust_icon ''
_set fake_tide_rust_verbose_version false

View File

@ -104,6 +104,11 @@ _set fake_tide_time_color 000000
_set fake_tide_time_format '%T'
_set fake_tide_time_bg_color D3D7CF
# ---------------OS---------------
_set fake_tide_os_color normal
_set fake_tide_os_bg_color normal
_set fake_tide_os_use_nearest true
_set fake_tide_os_color 080808
_set fake_tide_os_bg_color CED7CF
_set fake_tide_os_use_nearest true
# ---------------Rust---------------
_set fake_tide_rust_color 2E3436
_set fake_tide_rust_bg_color FF8700
_set fake_tide_rust_icon ''
_set fake_tide_rust_verbose_version false

View File

@ -0,0 +1,2 @@
function _fake_tide_item_os
end

View File

@ -0,0 +1,2 @@
function _fake_tide_item_rust
end