Comments (7)
I'm working on an edited version of status.sh - It does not solve this issue, but it will make it MUCH easier to implement any option we might choose to; be it a matrix implementation or a smart multirow with overlapping text.
from synth-shell.
I've taken a look at your exit code suggestion, and its perfect!! Great idea!! :D
from synth-shell.
This might be an interesting reference http://bruxy.regnet.cz/web/linux/EN/matrix-sh/
from synth-shell.
http://www.termsys.demon.co.uk/vtansi.htm
from synth-shell.
So, I'm back from another journey; but I had time to think about the problem and put together all the pieces from our past discussion. The idea would be as follows:
-
Get terminal info: such as size, to compute where we want the logo and the info elements. On a wide terminal, they might be plotted further apart, on a narrow terminal (e.g. 80 chars broad), they should be packed tightly together. On a super narrow terminal, the logo should be omitted altogether.
-
Draw the logo
- Load the logo as a single string, where the end of the logo would obviously be delimited by a
\n
. - Move the cursor to the position where we want the logo to start (upper left corner).
- Reformat the logo (sed, tr, awk...) by replacing the new line characters
\n
with an escape character that tells the cursor to go to position[i+1,c]
; wherei+1
is such that sequential lines are drawn, andc
is the first column where we want to draw the logo. - Print the reformatted logo. Each new line will start at the correct position.
- Load the logo as a single string, where the end of the logo would obviously be delimited by a
-
Draw info
- Read a configuration line that contains the info elements that the user wants to plot, and their order. For example
stats="os, cpu, gpu, user"
means that the first info line should be OS related info, next line should be CPU info, next line should be GPU info (not implemented yet), and the last should be the USER/HOST info. This way, the user may omit or reorder the lines as wished. - For each word in the above configuration line, call a function that is basically a big switch-case that then calls the appropriate printing helper. But before printing, the cursor is relocated to the current position.
- Read a configuration line that contains the info elements that the user wants to plot, and their order. For example
from synth-shell.
First working draft in 472d98d
from synth-shell.
Solved in #105.
Realized there is a bug (maybe always there?), described in #106.
from synth-shell.
Related Issues (20)
- Synth-shell on Windows WSL HOT 2
- better-ls not listing subdirectory HOT 2
- How to limit the python environment length in the prompt?
- Prompt shows ".." instead of "~" for config dir HOT 1
- Glitched looking name system and directory blocks HOT 3
- prompt looks weird. HOT 5
- The cd command lists wrong information HOT 3
- uE0B0 Triangle Separator Char Border Bug HOT 2
- Unable to install. bash-tools: No such file or directory HOT 2
- Terminal no longer starts up in home directory HOT 2
- Additional built-in visual themes HOT 2
- bug in alias.sh and bashhrc HOT 2
- Greeter bug
- custom prompt only for root kali HOT 3
- Unwated 1px Line around WorkingDir HOT 2
- . HOT 1
- SYSTEMCTL FAILED SERVICES:
- Greeter, 'bc' not found. HOT 2
- the theme does not apply when Im in root HOT 2
- Separator between user/host/dir is a straight line instead of an angle HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from synth-shell.