1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-18 10:40:08 +00:00
Commit graph

60 commits

Author SHA1 Message Date
romkatv
a405d8af70 optimize _p9k_g_expand a little 2019-05-27 19:11:09 +02:00
romkatv
784dc059cd add _p9k_prompt_length 2019-05-27 12:45:01 +02:00
romkatv
6539b1cb38 fix a typo 2019-05-23 00:02:51 +02:00
romkatv
88963159fd speed up ip, vpn_ip and public_ip prompts 2019-05-23 00:00:12 +02:00
romkatv
b92d510882 speed up ram and swap prompts 2019-05-22 19:14:57 +02:00
romkatv
3c5b52750e append POWERLEVEL9K_SHORTEN_DELIMITER when shortening with truncate_to_unique; use * as default in this case 2019-05-19 12:46:28 +02:00
romkatv
7cfe479c87 support dynamic directories in dir prompt and fix a dozen bugs 2019-05-18 23:50:06 +02:00
romkatv
361eec6f95 replace all -v checks with equivalents (trying to port to zsh 5.2) 2019-04-30 12:51:34 +02:00
romkatv
0e0132e8fa protect set_default from user-defined options 2019-04-22 17:06:41 +02:00
romkatv
5bd80d88f1 check for joined segments when figuring out whether vcs is enabled; fixes #41 2019-03-26 15:29:31 +01:00
romkatv
85e9f4955b expand string parameters with (g::) where appropriate 2019-03-18 17:24:56 +01:00
romkatv
5ee0054298 don't read configuration options until the first precmd; plus massive refactoring and cleanup 2019-03-13 17:04:27 +01:00
Dominik Ritter
1049bca473 Strip all newlines from ifconfig output 2019-02-22 18:16:33 +01:00
Dominik Ritter
fef639eb48 Fix regex 2019-02-22 18:16:15 +01:00
Dominik Ritter
1ab6a32c4b Interface States can be unsorted 2019-02-21 18:37:35 +01:00
Dominik Ritter
9f9bc62dc9 Avoid loopback interfaces and parse IPv4 on OSX 2019-02-06 08:53:46 +01:00
Dominik Ritter
a00cb84da4 Fix regular expression and test 2019-02-04 15:40:31 +01:00
Dominik Ritter
06151eeba9 Merge remote-tracking branch 'ben/master' into HEAD 2019-02-03 19:52:29 +01:00
Dominik Ritter
40e04e053c Parse IPs properly
This is done if we want to show a public IP, internal IP, or a VPN.
In the VPN case, what we actually want is to display an indicator
that a VPN is active, instead of the VPN IP itself. We parse the
IP here anyway, because we want to save some specific code there.
2019-02-03 19:20:14 +01:00
Dominik Ritter
938b0d49a1 Avoid externals when parsing the os release on linux 2019-01-23 23:11:01 +01:00
Paul Gierz
735994f82e Fix for #974 2018-09-07 11:52:21 +02:00
Ben Klein
45b0d68ec4
Replace typeset check with shellvar flag
More performance without changing functionality.
2018-07-12 15:37:33 -04:00
blackb1rd
592e765a95 Fix os detection for MSYS2 2018-06-30 22:20:02 +07:00
Max O'Cull
fcea56be5c Fix Linux distribution detection 2018-05-18 20:12:05 -04:00
Ben Hilburn
7234d52ebd
Merge pull request #791 from dritter/local_variables
Make variables local
2018-04-13 21:58:10 -04:00
Dominik Ritter
9a895bc7e4 Make variables local 2018-03-27 01:33:21 +02:00
Tim Otlik
7a8fcf98c1
update icons for nerd-fonts 2.0.0 2018-03-20 18:31:46 +01:00
Ben Hilburn
99f142de36 **LARGE MERGE THAT TOUCHES LOTS OF THINGS.**
From this point until the next tagged release, `next` will be in a state
of heavy flux as we make some significant and invasive changes.
2018-03-06 22:07:06 -05:00
Christo Kotze
2bd3e0f67e Fixed silly coding error
Did `local 3=...` instead of `3=...`
2018-02-22 22:33:43 +04:00
Christo Kotze
ec0f7bdacb Update for Travis
While zsh accepts the following code:

```
  local paths=(${(s:/:)${1//"~\/"/}})
```

Travis fails unless it is

```
  local paths=$1
  paths=(${(s:/:)${paths//"~\/"/}})
```
2018-02-22 22:22:04 +04:00
Christo Kotze
2214124327 Updated truncatePath()
Added variable `delim_len` with test when delim=""
2018-02-22 22:17:26 +04:00
Christo Kotze
d31ac26caa Another Travis test 2018-02-20 01:14:06 +04:00
Christo Kotze
f10a7daab0 Another change to test Travis 2018-02-19 23:59:41 +04:00
Christo Kotze
04726d21ef Changed path splitting to test Travis 2018-02-19 23:52:07 +04:00
Christo Kotze
4996e955e0 Updated path splitting line
Works in the console, but Travis doesn't like it.
2018-02-19 22:18:59 +04:00
Christo Kotze
21b7749075 Added truncatePath to utilities.zsh
Added `function truncatePath()` to utilities.zsh to take care of
truncation. This is pure zsh code, without calls to `sed`. Parameters
are:
   * $1 Path: string - the directory path to be truncated
   * $2 Length: integer - length to truncate to
   * $3 Delimiter: string - the delimiter to use
   * $4 From: string - "right" | "middle". If omited, assumes right.

Cleaned up code to use the new function instead.
2018-02-19 22:00:15 +04:00
Tim Otlik
80176c263f
fix $OS variable for battery segment 2018-02-19 18:48:21 +01:00
Tim Otlik
bba8bb883e
add check of /etc/os-release for linux distros 2018-02-16 16:45:09 +01:00
Tim Otlik
845e74c5c3
added LINUX_*_ICON for several OS 2018-02-16 12:56:47 +01:00
Ben Hilburn
02332d5962 Merge branch 'master' into next 2017-08-12 13:46:08 -04:00
Dominik Ritter
a234636982 Fix empty delimiter
Even if the delimiter is empty, the min length should be 1.
This fixes #558
2017-07-12 03:29:31 +02:00
guixxx
e6c37b6bc5 Icons for Windows/Cygwin + Refixes 32-bit support 2017-05-07 10:34:54 -03:00
Ben Hilburn
54a444535a Converting timer start time to hex 2017-04-18 18:02:37 -04:00
guixxx
421f506bf8 Improve logic 2017-04-18 18:02:37 -04:00
guixxx
c403ad6cd7 Adds Android icon/battery plugin support
Plus fixes bhilburn/powerlevel9k#479, which was causing integer overflow on 32-bit CPUs
2017-04-18 18:02:37 -04:00
Benoit Averty
9f4772f993 More possibilities with truncate folder marker 2017-01-31 23:49:46 +01:00
Benoit Averty
ebf808c533 Add dir_truncate_root option 2017-01-31 23:47:49 +01:00
Arav Singhal
1edb74ba91 Consider delimiter length in dir truncate right
Truncating the path from the right now takes in account the delimiter
length, so that directories with names shorter than truncated name +
delimiter are displayed properly.

For example, if SHORTEN_DIR_LENGTH is 4 and the delimiter is "..",
"../tests/.." and "../custom/.." are not incorrectly "truncated" to
"../test../.." and "../cust../..", both of which are longer or the same
length as the original.
2016-10-27 13:01:02 +05:30
Ben Hilburn
c4fdc8f708 Improved speed of prompt_vcs by 50%-66%. 2016-08-31 10:35:05 -04:00
Alex LaFroscia
4ca6938801 Apply max dir length to package name shortener 2016-03-22 13:14:10 -04:00