Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nojhan committed Dec 4, 2023
1 parent c20045e commit af19636
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 15 deletions.
10 changes: 5 additions & 5 deletions docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
CMake
GitHub
Kubernetes
Powerline
Terraform
chroot
config
CMake
GitHub
hostname
js
Kubernetes
Powerpuff
Powerline
runtime
Terraform
username
workspace
9 changes: 6 additions & 3 deletions docs/theme/power2lines.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
Power2lines
***********

This ``power2line`` theme rearranges the sections of :doc:`powerline_plus`, but on two rows instead of one.
That is, the data sections are displayed on a first row, and the interactive prompt forms a second row.
This gives room for long command lines, and let the user find the prompt always at the same location.
This ``power2line`` theme rearranges the sections of :doc:`powerline_plus`,
but on two rows instead of one.
That is, the data sections are displayed on a first row, and the interactive
prompt forms a second row.
This gives room for long command lines, and let the user find the prompt always
at the same location.


Preview
Expand Down
3 changes: 3 additions & 0 deletions docs/theme/powerline.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Powerline
*********

.. contents::
:local:

The ``powerline`` theme is a clone of the `Powerline prompt`_. It copies the
`default segments`_ of the Powerline prompt for Shell.

Expand Down
10 changes: 6 additions & 4 deletions docs/theme/powerpuff.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
Powerpuff
*********

This ``powerpuff`` theme go even further in rearranging the sections of the :doc:`powerline_plus` theme:
This ``powerpuff`` theme go even further in rearranging the sections of the
:doc:`powerline_plus` theme:

- Data sections are spread on two rows,
- each of which has a left-aligned and a right-aligned section.
- A third row hosts the actual interactive prompt.
- A horizontal line link the left and right sections of the first line.
- A new line is drawn before the first row.

The meta-sections are thus less prone to move around when more data is displayed,
and the user will find it easier to spot new information.
The horizontal line and the new line gap also helps in parsing screens with a lot of history.
The meta-sections are thus less prone to move around when more data is
displayed, and the user will find it easier to spot new information.
The horizontal line and the new line gap also helps in parsing screens with a
lot of history.


Preview
Expand Down
11 changes: 8 additions & 3 deletions powerline.theme
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,9 @@ _lp_power2lines_theme_prompt() {
local lp_terminal_format
_lp_powerline_plus_theme_prompt
lp_terminal_format "${POWERLINE_LINE_COLOR[@]}"
PS1="${lp_terminal_format}╭╢${NO_COL}$PS1\n${lp_terminal_format}╰╴${NO_COL}"
local n
n=$'\n'
PS1="${lp_terminal_format}╭╢${NO_COL}$PS1${n}${lp_terminal_format}╰╴${NO_COL}"
}

_lp_powerpuff_theme_activate() {
Expand Down Expand Up @@ -685,7 +687,8 @@ _lp_powerpuff_theme_prompt() {
__powerline_section "$jobs_string" "${POWERLINE_JOBS_COLOR[@]}"
__powerpuff_end_terminator

local right_sections="${powerline_sections}\r" # FIXME spacing problem
# local right_sections="${powerline_sections}\r" # FIXME spacing problem
local right_sections="${powerline_sections}" # FIXME spacing problem

lp_terminal_format "${POWERLINE_LINE_COLOR[@]}"
_lp_fill "${left_sections}${lp_terminal_format}" "${NO_COL}${right_sections}" "─" 0
Expand Down Expand Up @@ -805,5 +808,7 @@ _lp_powerpuff_theme_prompt() {

# Third line.
lp_terminal_format "${POWERLINE_LINE_COLOR[@]}"
PS1="\n${first_line}\n${second_line}\n${lp_terminal_format}╰╼${NO_COL}${POWERLINE_SPACER}"
local n
n=$'\n'
PS1="${n}${first_line}${n}${second_line}${n}${lp_terminal_format}╰╼${NO_COL}${POWERLINE_SPACER}"
}

0 comments on commit af19636

Please sign in to comment.