GithubHelp home page GithubHelp logo

skippyr / river-dreams Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 21.39 MB

A fast and full-featured tribal looking theme for the zsh shell for Linux.

License: MIT License

Makefile 1.86% Shell 1.71% C++ 96.43%
zsh zsh-theme terminal linux shell-theme cpp

river-dreams's Introduction

≥v≥v river-dreams ≥v≥v

     

❡ About

A fast and full-featured tribal looking theme for the zsh shell for Linux.

Caption: River Dreams applied on zsh in different contexts. The terminal theme used is Flamerial and font is Hack (Nerd Fonts patched).

Features

Its left prompt displays:

  • Your local IPV4 address or "No Address Found" in case no address is found.
  • Your disk usage and a warning symbol if it is almost full.
  • If you have a battery, its charge and a symbol to indicate its status: a warning symbol if is almost empty or a lightning one if it is charging.
  • A calendar displaying the week day, month and day with its ordinal.
  • A 24-hours clock with a symbol that changes depending on the day time: dawn, morning, afternoon and night.
  • An indicator with a hastag symbol when you are the root user.
  • The exit code of the last command you typed in.
  • The active mode of the zsh-vi-mode plugin if it has been sourced: normal (N), insert (I), visual (V) and replace (R).
  • The active Python virtual environment if you have sourced one.
  • The current working directory path, abbreviating parent directories and shorting it when inside of a git repository. The last path split and git repository names are always highlighted.
  • The active branch, when inside of a git repository.
  • A lock symbol when you do not have write access to the current working directory.

Its right prompt displays:

  • The total of each entry type in your active directory: blocks, characters, directories, fifos, files, hidden entries, sockets, symlinks and temporary entries. Symlinks are also followed.
  • The total of background jobs.

❡ Install

Dependencies

The following dependencies must be installed before installing it:

  • git: it will be used to clone this repository.
  • g++, make: they will be used to compile this software.
  • Noto Sans, Nerd Font Symbols: these fonts provide the pretty symbols used in the software.

Procedures

Manual Procedures

If you want to install this software without a plugin manager or for a specific framework, using a terminal, follow these steps:

  • Clone this repository using git:
git clone --depth 1 https://github.com/skippyr/river-dreams ~/.config/zsh/themes/river-dreams;
  • Source the file river-dreams.zsh-theme that is inside of the repository you cloned in your ~/.zshrc configuration file:
source ~/.config/zsh/themes/river-dreams/river-dreams.zsh-theme;
  • Open a new zsh session.
  • Wait for the theme to compile.

Procedures For OhMyZSH

If you want to install and use this software with the ohmyzsh framework, using a terminal, follow these steps:

  • Clone this repository using git:
git clone --depth 1 https://github.com/skippyr/river-dreams                                        \
                    ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/river-dreams;
  • Apply the theme in your ~/.zshrc configuration file by setting the ZSH_THEME variable:
ZSH_THEME=river-dreams/river-dreams;
  • Open a new zsh session.
  • Wait for the theme to compile.

Procedures For Antidote

If you want to install this software with the antidote plugin manager, using a terminal, follow these steps:

  • Add this repository to your plugins file, usually ~/.zsh_plugins.txt.
skippyr/river-dreams
  • Use antidote to load your plugins.
antidote load ~/.zsh_plugins.txt;
  • Wait for the theme to compile.

❡ Help

If you need help related to this project, open a new issue in its issues pages or send me an e-mail describing what is going on.

❡ Contributing

This project is open to review and possibly accept contributions, specially fixes and suggestions. If you are interested, send your contribution to its pull requests page or to my e-mail.

By contributing to this project, you agree to license your work under the same license that the project uses.

❡ License

This is free software licensed under the MIT License that comes WITH NO WARRANTY. Refer to the LICENSE file that comes in its source code for license and copyright details.

≥v≥v Here Be Dragons! ≥v≥
Made with love by skippyr <3

river-dreams's People

Contributors

skippyr avatar

Stargazers

 avatar  avatar

Watchers

 avatar

river-dreams's Issues

Improve Performance

River Dreams has a command lag of 250ms-300ms. Ideals values are of 0ms-150ms. It is not bad, but there is a room for improvement. A tool to make benchmarks is zsh-bench.

For reference, these are the results of benchmarks of the main branch:

creates_tty=0
has_compsys=0
has_syntax_highlighting=0
has_autosuggestions=0
has_git_prompt=1
first_prompt_lag_ms=253.285
first_command_lag_ms=253.704
command_lag_ms=280.340
input_lag_ms=0.213
exit_time_ms=19.655

Add Vi Mode Module

Add a module that can show the status of Vi mode, like insert, visual, normal and replace modes. It should be similar as how the fish shell does.

A reference can be seen in the coffeenostor-zsh-theme theme.

Right Prompt Components Contains Extra Space

The right prompt component contains an extra space between the modules. This issue happens due to how the echo of an array works in shell scripting: if a module, in this case, the jobs module, returns an empty output, it will be printed as an extra space.
right_prompt_extra_space

Also, the time_elapsed's module icon can look bugged depending on the font in use and can also be replaced by an emoji if the right Noto Font family is installed.

Add Executable Files Module

I think that River Dreams should show the quantity of executable files in the current directory. I really find annoying to use ls or exa with -l to find out if I am leaving executable files behind in the directory I am in when they were not suppose to stay there.

Commands Separator Symbol Looks Glitchy

The commands separator looks glitchy if using some fonts patched by Nerd Fonts and in some terminal emulators. This was identified in st using inconsolata nerd font. Maybe it would be great to change that symbol.

Add Numeric Indicators To Git Module

It would be great to know how many:

  • files have been modified,
  • files being tracked to be to be committed, and
  • modifications to be pushed to the upstream
    instead of just showing a symbol indicating there is something different.

Add Fallback Symbols

Find a way to make river_dreams use text instead of Nerd Font symbols if that font is not installed or not supported by the current terminal, so even in circumstances a proper interface can not be accessed, it still usable.

Waste Of Space In Top And Right Prompt

There are modules that return useless information and that can be replace by a simpler output or be removed. This can be good, as it opens more space in the prompt for more useful modules. Some examples are:

  • user module is not necessary. The only information needed is to know if you are root.
  • IP address may only show the IP as the host name is mostly not used.
  • clock module can just use the time's icon and not use the clock symbol.
  • hidden files and untracked files modules are useless for most git/system operations and can be removed.

[BUG] Badly Rendered Symbols

Some symbols used in the left prompt (src/lprompt.c) are often badly rendered in some setups of terminal emulators and fonts. Those include:

  • The "Contains as Normal Subgroup or Equal To" (U+22B5) and "NAND operator" (U+22BC) used to compose the commands separator line.
  • The "Ring Equal To" (U+2257) and "Semidirect Product with Bottom Closed" (U+2A32) used to compose the exit status part.

Here are some images showing this issue:

issue
issue1
issue2

Give your suggestions: we are looking for tribal-like symbols that can replace those!

Here are some terminals you can use for testing:

  • gnome-terminal
  • terminator
  • st

Make Git Module Show Pulls Quantity

As git module already shows the quantity of pushes need to diff the upstream branch, it would be great if it show the quantity of pulls also if branch is behind it. I think it can be an idea to parse git status instead of just using git cherry, something like what pure does.

As this is not necessary right now, this can be something to be worked on when this module has become async.

Tmux Wrongly Uses 4-Bits Color Palette

By default, tmux admits wrong color palettes for the terminal you are using. I already identified that it tried to use 8-bits color palette when the terminal only supports the 4-bits color palette and vice-versa. The problem with it is that River Dreams will end up using fallback text even if the terminal supports the 8-bits color palette.

Tag Module

It would be great to see the name of the latest git tag in the prompt.

Add Battery Module

It would be great to see the battery level percentages of laptops with an icon that changes depending on its level.

Add Mpd Module

I think it can be a great idea to add a module, in the future, so the prompt could show the current song being played in mpd, its index in the playlist and its status: if it is paused or playing. It would be added on top of the current top_prompt_component and would be a stand alone async module.

Git Module Icons Looks Bugged

The icons of Git module can look bugged depending on the font you are using. This issue happens due to the characters width that expands for more than one character. This issue can make it hard to see the status of git.
git_module_bugged

Vi Mode Tr Parse Error

For some weird reason, vi_mode module throws an error for tr when it is at /usr/bin. What is strange is that the variable ${ZVM_MODE} still working fine, but tr cannot make it uppercase. The error is:

tr: misaligned [:upper:] and/or [:lower:] construct 

Possible Improvement For Fallback Text

If a session is started by startx in a terminal that only supports 4-bits color palette, any terminal that gets open will have RIVER_DREAMS_USE_FALLBACK_TEXT set to true. In this case, it would be better if that value could not be affected by parent terminals.

No Such Async Worker

When using River Dreams, rarely it throws an error that it has not found RIVER_DREAMS_ASYNC_WORKER or that it already exists.

async_start_worker:zpty:45: pty command name already used: RIVER_DREAMS_ASYNC_WORKER                                    
async_worker_eval: no such async worker: RIVER_DREAMS_ASYNC_WORKER
async_worker_eval: no such async worker: RIVER_DREAMS_ASYNC_WORKER

That is an strange behavior as every time precmd is run a new worker is started and there is no reason for it to show that there is no such worker.

Maybe there is a solution for this issue to be implemented.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.