Commit graph

380 commits

Author SHA1 Message Date
Aaron Sherber 7e4865779a feat: flexible matching for include/exclude folders 2021-09-21 06:31:50 +02:00
Jan De Dobbeleer b2515650c1 fix(battery): map battery behavior before returning 2021-09-20 07:19:01 +02:00
Aaron Sherber 5db251ce53
feat(path): flexible matching for mapped-locations 2021-09-18 22:03:00 +02:00
Jan De Dobbeleer e1be81e658 fix(battery): skip nil value batteries 2021-09-18 20:09:11 +02:00
Jan De Dobbeleer 3f2b89f475 fix(windows): get console width correctly 2021-09-18 20:03:02 +02:00
Nick Craver e27d34a1cb
feat: improved theme png rendering
* feat: improved theme png rendering

Overall this improves glyph rendering in the theme PNGs for docs.
Changes:
- Replaces VictorMono with latest Hack nerd font
- When calculating overall width, count glyphs as double wide
- When rendering a glyph, allow ~1.7x space (this seemed right testing many)

I hope this is a net improvement that helps theme renders be a bit more accurate and shine!

* move to 2x for overall width expansion

1.7 introduces some odd offset problems with some backgrounds - 2x is stable.

* Based on data from:
https://github.com/ryanoasis/nerd-fonts/wiki/Glyph-Sets-and-Code-Points
...checking those points for nerd font glyphs in play

I'm unfamiliar with Go here and maybe there's a better way to implement,
but the results are much improved.

* tweak ranges and bg position for font diff

* exclude pixelated (e0c4-e0c7) from doube-width

* simplify cyclomatic complexity

Go checks were unhappy - this isn't a hot path so breaking it out
into a format that matches the docs, for easier maintenance.

* I have no idea what I'm doing

...but I hope this works - bit simpler layout to maintain too.

* fix: add comments

Good PR feedback - adding some more commentary for anyone coming across these bits later

* typo
2021-09-18 15:37:15 +02:00
Jan De Dobbeleer 2ed5d31f4f
feat(az): use template for more flexibility
BREAKING CHANGE: this makes it so people have to remove the switches
in favor of the new template.
2021-09-18 13:21:28 +02:00
Aaron Sherber f412ef6644
feat: allow for custom text in place of shell names 2021-09-17 19:48:00 +00:00
Nick Craver bf51f59ceb
feat: image background color 2021-09-17 20:34:43 +02:00
Jan De Dobbeleer 6bef088b83 feat: allow auto hiding of rprompt on Windows 2021-09-17 09:40:12 +02:00
lnu cb9a090ec7 feat(battery): display_charged parameter added
display_charging splitted to two parameters instead of a single one

BREAKING CHANGE: from now display_charging will handle the charging
                 status only.
2021-09-16 20:17:41 +02:00
Jan De Dobbeleer 86b3e1cc62
fix(bash): remove leading space
relates to #953
2021-09-14 19:54:09 +02:00
Jan De Dobbeleer f7de8aed27 fix: support for windows arm64 2021-09-14 18:49:29 +02:00
Aaron Sherber 3ecdffd86c fix: recognize tag and commit merges 2021-09-14 07:10:13 +02:00
Aaron Sherber 18dcf4be21 fix: recognize remote branch merge 2021-09-13 17:46:49 +02:00
Jan De Dobbeleer fb1c704d14 refactor: adjust build directives for go 1.17 2021-09-09 20:15:43 +02:00
Jan De Dobbeleer 78d0a42556 fix(transient): do not run when no config 2021-09-09 20:15:43 +02:00
Jan De Dobbeleer 13cb9a6a58 fix: correct error printing for eval 2021-09-09 20:15:43 +02:00
Jan0660 ffad394a4f feat(memory): add use_available and memory_type 2021-09-04 23:23:38 +02:00
Jan De Dobbeleer 4305b3ad51 feat: support pnpm
resolves #926
2021-09-04 20:46:50 +02:00
Laurent Nullens bb246377ce
feat(git): display worktree count
resolves #913
2021-09-04 18:32:55 +00:00
Jan0660 75c357a7f0 fix(memory): improve code readability 2021-09-03 22:49:56 +02:00
Jan0660 daf91dc85a feat: memory segment 2021-09-03 22:49:56 +02:00
Jan De Dobbeleer 7fd3091187 chore: update go dependencies 2021-09-01 13:48:21 +02:00
Jan De Dobbeleer d16bade426 feat: update to go 1.17 2021-09-01 13:48:21 +02:00
Jan De Dobbeleer e6bc625564 fix(bash): quote the timer path
resolves #914
2021-09-01 13:48:21 +02:00
lnu d8c19d0c6d fix(owm): icon display at night
Icon id is different for day/night
2021-09-01 12:25:42 +02:00
Sebastian Mineur 2b53796c1a
feat(path): add 'max_depth' option for 'agnoster_short' 2021-08-20 15:06:37 +00:00
lnu e618163da3 feat(owm): support all units + hyperlink + http timeout
new http_timeout param for segments executing http request
doc updated
json schema updated(missing data for owm + timeout)
hyperlink replacement regex updated to support http/https, fix an inssue
when a segment with hyperlink was on the right prompt(pwsh)
2021-08-19 09:04:52 +02:00
lnu 5500530d9f chore: upgrade sprig to v3
#900
2021-08-16 08:33:17 +02:00
Nico Glas 4f08d660b9
feat(segment): open weather map 2021-08-15 19:11:02 +00:00
Laurent Nullens 3f02ad4eb3
fix: avoid variable expansion when using postfix in zsh
% must be escaped otherwise zsh try to apply variable expansion

Co-authored-by: Jan De Dobbeleer <2492783+JanDeDobbeleer@users.noreply.github.com>
2021-08-15 09:45:44 +02:00
Jan De Dobbeleer dff3986258 refactor(git): fetch branch name from HEAD file 2021-08-10 06:27:50 +02:00
Jan De Dobbeleer f6c79050d0 fix: run commands faster 2021-08-10 06:27:50 +02:00
Jan De Dobbeleer 9e8a7182b6 refactor: better log output 2021-08-10 06:27:50 +02:00
Jan De Dobbeleer 995bd5c720 chore(go): update dependencies 2021-08-10 05:58:35 +02:00
Jan De Dobbeleer 9bd21c6573 feat(text): add template support
resolves #884
2021-08-10 05:58:35 +02:00
Jan De Dobbeleer 9f4f9d30db fix(init): quote path for spaces
resolves #879
2021-08-10 05:58:35 +02:00
Jan De Dobbeleer 68f576692b feat(path): use second letter for .folder
resolves #886
2021-08-10 05:58:35 +02:00
Evgeny Morozov 84183b7506
fix(aws): override default region if AWS_REGION is set
Co-authored-by: Evgenii Morozov <emorozov@goodgamestudios.com>
2021-08-04 20:46:59 +02:00
lnu 94e3d9e0fd perf(git): read origin url from config
new properties added: isWorktree and gitRootFolder
2021-08-02 20:06:15 +02:00
Jan De Dobbeleer 073f18f53a feat(debug): trace system calls to log file 2021-08-01 15:34:07 +02:00
Jan De Dobbeleer c4db62c644 feat(language): allow enabling or disabling HOME folder
closes #874
2021-07-31 18:02:05 +02:00
Chris Donnelly 1868e15137 fix(git): cherry-pick/revert tests actually pass now 2021-07-30 16:04:50 +02:00
Chris Donnelly da83ecee87 fix(git): additional mocks required
The mock environment was panicking because the test for `sequencer/todo`
checks the full path exists rather than checking for sequencer/ first.
The additional mock for the file covers this.

I am also reorganizing the mocks so they are sorted by type/method.
2021-07-30 16:04:50 +02:00
Chris Donnelly 27654dbd56 fix(git): tests covering revert/sequencer 2021-07-30 16:04:50 +02:00
Chris Donnelly c7b78c3de3 fix(git): support in-progress cherry-pick/revert
When a cherry-pick is in progress, .git/CHERRY_PICK_HEAD doesn't exist,
so read .git/sequencer/todo instead.

The canonical git prompt in git/git/contrib has this in the "sequencer" section,
which handles cherry-pick operations.

This includes support for "git revert", so I am also adding that.

I chose the fa-undo icon for "revert".

@see https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh
2021-07-30 16:04:50 +02:00
Jan De Dobbeleer 40238b8226 fix: adjust mapped_locations_enabled for hardcoded only
resolves #854
2021-07-24 19:55:08 +02:00
Justin Grote 5ed452eae5 fix: handle YAML/TOML key value entries 2021-07-18 19:01:11 +02:00
Jan De Dobbeleer 1f4d05415c feat(path): letter full path
resolves #851
2021-07-13 20:18:03 +02:00
Jan De Dobbeleer 07b9b82f9f fix(pwsh): set lastCommandSuccess first
resolves #849
2021-07-12 07:39:15 +02:00
Jan De Dobbeleer 2aa00da41b fix(windows): try HOME by default for user home 2021-07-10 15:00:23 +02:00
Jan De Dobbeleer 9576e8212e fix(transient): handle multiline prompts better in powershell
relates to #840
2021-07-10 15:00:23 +02:00
Jan De Dobbeleer 46b8cea72a fix: write post- and prefix separate
resolves #843
2021-07-10 13:56:28 +02:00
Tobias Hölzer c358d4fc4c
feat: rust segment 2021-07-04 22:53:10 +02:00
Jan De Dobbeleer 75253034b9 feat: enable transient prompt in zsh 2021-07-04 07:39:48 +02:00
Jan De Dobbeleer 8cf85a370d fix(transient): count newlines and not ;
relates to #807
2021-06-26 20:22:05 +02:00
Jan De Dobbeleer f19460a0c5 fix(transient): support multiline prompts
relates to #807
2021-06-25 20:14:32 +02:00
Jan De Dobbeleer db1f6bb751 fix(dotnet): correct exit code for different OS architectures
closes #819
2021-06-23 22:40:00 +02:00
Jan De Dobbeleer 3fd70ce716 refactor: remove vertical_offset for transient prompt
relates to #807
2021-06-23 22:40:00 +02:00
Jan De Dobbeleer fb83354186 fix: int comes in as float from json
resolves #755
2021-06-23 22:40:00 +02:00
Jan De Dobbeleer 7c72e76aff feat(pwsh): transient prompt 2021-06-22 08:42:35 +02:00
Jan De Dobbeleer 7bb0c9ae0b refactor(tooltips): better invocation for pwsh 2021-06-22 08:42:35 +02:00
Chris Donnelly 2ab35b0eec feat(dotnet): correct exit code on Windows
dotnet on windows returns a 32-bit exit code.

https://github.com/dotnet/runtime/blob/main/docs/design/features/host-error-codes.md
2021-06-18 20:34:24 +02:00
Jan De Dobbeleer dcada48c9d feat: tooltip support 2021-06-13 19:46:02 +02:00
Jan De Dobbeleer 08c0d9a957 fix(bash): fallback TIMER_START to HOME
resolves #802
2021-06-12 21:42:18 +02:00
Jan De Dobbeleer f6a675e8c4 fix(schema): remove invalid character 2021-06-09 07:19:04 +02:00
Jan De Dobbeleer 1f4242cfde chore: update go dependencies 2021-06-09 07:19:04 +02:00
Jan De Dobbeleer 3bc9448be2 refactor: do not render empty string 2021-06-09 07:19:04 +02:00
Jan De Dobbeleer b05a4573e7
revert: update dependencies
This reverts commit f372083039.
2021-06-08 12:16:46 +02:00
Jan De Dobbeleer f372083039 chore: update dependencies 2021-06-08 08:34:28 +02:00
Jan De Dobbeleer 24f87f8557 fix: use correct home on git bash
resolves #786
2021-06-08 08:34:28 +02:00
Jan De Dobbeleer b21670f35b fix: consistent naming for Oh My Posh
relates to https://github.com/microsoft/winget-pkgs/pull/16328
2021-06-06 13:42:33 +02:00
Jan De Dobbeleer 930f9de114 feat: nbgv segment
resolves #777
2021-06-05 11:25:28 +02:00
lnu 7eae98f8d7 fix(pwsh): use correct directory when exporting theme
resolves #768
2021-06-01 06:40:37 +02:00
Jan De Dobbeleer 8ef355db4c fix(pwsh): use correct directory when exporting theme
resolves #748
2021-05-29 18:46:59 +02:00
Jan De Dobbeleer bc50377850 feat: max branch length
resolves #755
2021-05-29 18:46:59 +02:00
Jan De Dobbeleer c27f542893 fix(az): use correct env var for account 2021-05-28 19:36:24 +02:00
Jan De Dobbeleer 83ac224e1f fix: validate if we have access to struct fields
resolves #743
2021-05-28 07:58:45 +02:00
lnu cdd4090c03 fix: export-poshtheme ~ issue
Fix regression introduced by previous commit(~)
2021-05-28 07:30:38 +02:00
lnu 46bdc4537d fix: export-poshtheme issue with relative path
Path.GetFullPath used to resolve full or relative paths
2021-05-28 06:52:46 +02:00
Jan De Dobbeleer 79fa990205 feat: env vars in templates
resolves #743
2021-05-27 22:06:33 +02:00
lnu 0075ac229c fix: escape backtick
in zsh or bash, text between backtick was interpreted
2021-05-27 21:41:46 +02:00
Jan De Dobbeleer 3b56c24b69 fix: add not charging state for battery info 2021-05-27 12:50:53 +02:00
lnu 2eb45b5863 fix: escape \ from segment value when in bash
fix #738
2021-05-25 22:25:40 +02:00
Jan De Dobbeleer 2cf288e46c fix: ignore 0 size terminals 2021-05-25 19:12:18 +02:00
Jan De Dobbeleer b9906b2f7a feat: hide rprompt when the prompt is too large
relates to #715
2021-05-23 07:28:10 +02:00
Jan De Dobbeleer 5e9b04ae2f revert: hide rprompt when the prompt is too large
This reverts commit a8d4e51d54.
2021-05-22 21:20:54 +02:00
Jan De Dobbeleer a8d4e51d54 feat: hide rprompt when the prompt is too large
relates to #715
2021-05-22 20:25:43 +02:00
Jan De Dobbeleer b67f625740 fix(bash): escape entire rprompt
resolves #717
2021-05-21 22:12:55 +02:00
Jan De Dobbeleer 50473767a7 chore(ci): replace golint with revive 2021-05-21 20:33:11 +02:00
Jan De Dobbeleer ed610c13ee feat(az): display account info 2021-05-21 20:33:11 +02:00
Jan De Dobbeleer c3b6f31d09 feat(pwsh): disable module support by default 2021-05-21 20:33:11 +02:00
Jan De Dobbeleer 894b84fa85 fix(pwsh): get filesystem path for configs
resolves #715
2021-05-21 20:33:11 +02:00
Jan De Dobbeleer 5f045431cf fix(executiontime): round values logically 2021-05-21 08:17:36 +02:00
Jan De Dobbeleer 8642b7bfd9 feat: round timing style 2021-05-20 19:55:46 +02:00
Jan De Dobbeleer 676da9e4d1 fix: set conda env var
relates to #133
2021-05-20 19:27:24 +02:00
Jan De Dobbeleer 7a85ee30d7 fix(osc99): append \ when inside a root directory
resolves #724
2021-05-20 19:27:24 +02:00
Jan De Dobbeleer 9999260e9e feat(git): disable status by default
resolves #723
2021-05-20 19:27:24 +02:00
Jan De Dobbeleer 4a16c3fc6c refactor(pwsh): postfix invoke-expression
relates to #708
2021-05-18 20:43:25 +02:00
Jan De Dobbeleer 30bccb06d2 fix: adjust fallback theme layout 2021-05-18 20:43:25 +02:00
Jan De Dobbeleer b623c5f190 feat: print config error 2021-05-18 20:43:25 +02:00
Jan De Dobbeleer 766dc1ac8b
fix: set powerline env var
resolves #133
2021-05-16 19:23:05 +02:00
Micah Rairdon 36feb76f20 feat: azure devops support for git upstream icons 2021-05-15 17:41:15 +02:00
Jan De Dobbeleer 4030c32279 feat: add dart support 2021-05-14 21:28:16 +02:00
Jan De Dobbeleer d96cb7989a refactor: add language tests 2021-05-14 21:28:16 +02:00
Jan De Dobbeleer 5d5d7f9e8a feat(julia): hyperlink support 2021-05-14 13:45:38 +02:00
Jan De Dobbeleer 8f473df62f feat: support crystal language 2021-05-14 13:45:38 +02:00
lnu 6671ed068c feat: export-poshtheme to clipboard if no file path provided 2021-05-06 11:37:07 +02:00
Jan De Dobbeleer 3c5129275e feat: join segments when omitting diamonds
relates to #697
2021-05-04 10:33:34 +02:00
Jan De Dobbeleer 248afec9fa feat: better mapped locations layout 2021-05-02 14:35:01 +02:00
gitolicious 52b66d1e5b
feat: add OS template property 2021-04-24 19:31:56 +00:00
Jan De Dobbeleer fb57ef18b6 feat: display message on az update needed
resolves #669
2021-04-22 20:23:34 +02:00
lnu 44ac09d356 fix(battery): disable segment when no batteries 2021-04-22 07:02:22 +02:00
Jan De Dobbeleer 3b7b854fdc fix(pwsh): only clear console after block write 2021-04-21 21:25:59 +02:00
Jan De Dobbeleer b11b69f0e8 refactor: ansi module cleanup 2021-04-21 19:54:43 +02:00
Jan De Dobbeleer c24ca82f17 feat: newline as part of block
this deprecates the "newline" block and favours using the newline
property on the Block component. For backwards compatibility we'll
keep recognizing the newline block for the time being.

resolves #607
2021-04-21 19:54:43 +02:00
Jan De Dobbeleer 7ad764ceee fix(ytdm): default to localhost IP
resolves #639
2021-04-20 21:37:09 +02:00
Chris Bargren f7841eb43c fix(zsh): store exit code first in precmd hook
Addresses an issue causing exit code segments to incorrectly report an
exit code of `0`
2021-04-20 07:03:28 +02:00
Jan De Dobbeleer 1f25cd4b1c fix(node): stop when yarn is detected 2021-04-18 07:18:34 +02:00
Jan De Dobbeleer 016d981baa fix(pwsh): invoke module support before context
relates to #655
2021-04-17 20:37:49 +02:00
Jan De Dobbeleer 52f260caf6 feat(node): show NPM/Yarn context
resolves #653
2021-04-17 14:51:20 +02:00
Jan De Dobbeleer c98c1b5425 feat(language): enable in home dir when always_enabled
resolves #649
2021-04-17 13:31:38 +02:00
Jan De Dobbeleer 212721c9e3 fix(battery): better state mapping
relates to #644
2021-04-16 07:54:05 +02:00
Jan De Dobbeleer 92a2f740e9 refactor: move battery logic to segment 2021-04-16 07:54:05 +02:00
lnu 9c4ba43871 fix: stack count variable names + compability with all init modes 2021-04-14 14:58:54 +02:00
lnu 4f96cc0f7c fix: wrong stack count when init from Set-PoshPrompt 2021-04-14 07:00:44 +02:00
lnu b9601b632a feat: show/hide stack count in path segment 2021-04-12 22:25:01 +02:00
Jan De Dobbeleer 434cd41faf fix(git): move untracked to added
resolves #628
2021-04-12 19:30:54 +02:00
Jan De Dobbeleer 90680f2c70 fix(battery): hide segment when no batteries
resolves #633
2021-04-12 19:17:58 +02:00
Richard Hooper fb203eba51 feat(themes): adding pixelrobots theme 2021-04-12 12:38:01 +02:00
Jan De Dobbeleer 66bddcc8c9 fix(git): track submodule changes too
resolves #627
2021-04-11 20:16:04 +02:00
Jan De Dobbeleer 2990bc2536 fix: return error on template render 2021-04-11 15:27:20 +02:00
Jan De Dobbeleer ee93191aac fix(battery): count all battery information 2021-04-11 15:27:20 +02:00
Jan De Dobbeleer afb69b4229 feat: export image of the current theme 2021-04-11 10:53:10 +02:00
Olivier Jullien 5134e11bc6
fix(bash): force temporary file deletion
forces the temporary file deletion when the user uses a security rm alias
2021-04-10 09:07:04 +02:00
TravisTX 4597f158c4 perf(az): improve performance for az powershell 2021-04-06 15:35:18 +02:00
lnu bb6a90a867 feat: toml intellisense + recommended extensions for toml and yaml 2021-04-05 14:05:08 +02:00
Jan De Dobbeleer 8afadc0bcd feat: azure functions segment 2021-04-02 19:46:32 +02:00
Jan De Dobbeleer 64aa66eebc feat: cfg.TerminalBackground as template 2021-04-01 21:51:06 +02:00
Jan De Dobbeleer 447ca4bb94 refactor: remove redundant rectangle filler 2021-04-01 21:51:06 +02:00
lnu 513794af46 fix: adoptopenjdk 16 version parsing 2021-04-01 17:13:19 +02:00
TravisTX 85fb7611bc feat(az): clear envvars 2021-03-31 07:11:43 +02:00
Jan De Dobbeleer 57d49658ea feat(battery): use template to render segment 2021-03-28 16:22:29 +02:00
TravisTX 7db7f13e51 feat(az): support az pwsh module 2021-03-28 11:24:49 +02:00
Jan De Dobbeleer 1e53daa687 refactor: replace deprecated linter 2021-03-27 17:52:53 +01:00
Jan De Dobbeleer 320ec1d7d3 feat(pwsh): posh-git segment 2021-03-27 17:52:53 +01:00
Jan De Dobbeleer f90840e3ec fix(config): export JSON correctly
resolves #581
2021-03-27 13:49:31 +01:00
Jan De Dobbeleer 61cb33f4f9 fix(pwsh): map home dir on theme export 2021-03-27 13:49:31 +01:00
Jan De Dobbeleer 4c992e65b3 feat: dependency update 2021-03-27 13:49:31 +01:00