export PS1='\n($?, $(cat /proc/loadavg | colrm 5 | xargs), $(du -hs | colrm 8 | xargs), $(ls -1 | wc -l)) \u@\H:\w/\n\$ '
this outputs something like
(0, 0.85, 6.8g, 13) david@sixhat.net:~/
$
where the individual values are (in order):
- the last command exit code
$?
- the load on the cpu
$(cat /proc/loadavg | colrm 5 | xargs)
- the size of current directory
$(du -hs | colrm 8 | xargs)
- the number of files/dirs in current directory
$(ls -1 | wc -l)
- the user@host:folder
\u@\h:\w/
- the prompt type (normal $ |root #)
\$
notice that it has no colours. although colours are a nice feature to have, they don't work in every terminal, but within your .profile
you can do conditional prompts based on colour support by the terminal.
well, zsh prompts are a little bit different to configure, but a similar one that i use in my macs is this:
export PS1='
%T %(1d.%B[First Day of Month]%b .)%U(%?,%j)%u %n@%m %F{red}%0~%f
%F{green}%B%(!.%#.;)%b%f '
The expansions are different from bash, so you are better off reading the manual about expansions, but the above one can give you a nice start.
- Beamer slides with markdown and pandoc
- HTMX resources
- Apple buys Pixelmator
- Working on a blog generator in bash
- Reading texts on paper beats reading texts on a computer screen
- Eureka Labs, AI for Education
- Reading on Darwin Machines
- You are not a Parrot, and other AI stories
- On Rags - Retrieval Augmented Generation
- Assange is free
- Editors, Editors
- Adding something between the lines
- Some Games I Like
- AI Aesthetics
- Random Number Generator, Anyone
- veo, i veo google
- gpt-4o, the crazy over helpful assistant
- teaching physical computing notes
- making checklists and ai
- refactoring old code scares me
- quem não lê é menos livre
- haiper video generation
- qualcomm ai hub
- New macs are rubbish
- I'm giving Zed a try
- where has my disk space gone?
- stealing this one, on how to study
- styles for clean bw slides in marp
- array based languages
- all 2023 posts
- added a rss feed
- code snippet for highlight.js in markdown pages
- is this the only css you'll ever need?
- things I'm (re)learning as i play advent of code 2023
- spell checker for shell scripts
- a simple ps1 bash prompt
- axtel and epstein's levels for agent based performance
- arduino tip120 demo code for classes
- blogs without server side rendering
- data science handbook
- grimm's odd standard protocol for describing individual-based and agent based models
- models of creativity
- ants are amazing - what about organizations - reading
- creating indices with tree
- m3, m3 pro and m3 max
- i have to many rss feeds in my reader
- finder, explorer, nautilus, rox, ... spacedrive
- marginalia in the modern digital world. is it possible?
- computer related stuff---how these machines work
- disable macbook air autoboot when dis/connecting to power or open lid
- red led at 13, blue led at 12 - police lights
- the wei (web environment integrity) api proposal from google is dangerous and should not go forward.
- my approach to managing scratch projects with bash scripts
- avoid long urls extending past the margins of text in latex with xurl
- how we learn and how to organise a reading inbox
- I am back to social networks, and it is mastodon.
- organising stuff is hard until it is not
- writing slides structure from the topics slide in marp
- a simple css trick 4 dithered images
- readings on strange programming, art and electronics
- gpt4 experiments - sparks of agi
- interesting openstreet use for studying hospital accessibility
- a simple js range one-liner
- o fim das trotinetes de aluguer?
- still reading about ai and gpt and what is next in this space
- the ai races for march 22:
- two main developments in the ai generators world
- and it goes dark
- fuzzy logic shell prompt alias
- svelte link dump.
- senhor clemente, que oportunidade perdida para o arrependimento.
- toggling light bulb problem
- no arrendamento, quem se lixa é quem cumpre e já aluga
- in the slow movement you find great pearls of wisdom.
- beja e alverca
- websites que funcionam apenas em modo texto
- small is beautiful
- tools for modern research
- and we are in 2023
- reading
- ai
- me