🖥️ Windows Terminal



Van de Windows App Store is een terminal te downloaden, die ook integreert met Windows Subsystem for Linux.

Dat maakt het voor mij mogelijk om binnen Windows 10 een linux ontwikkelomgeving te hebben, met een terminal waar ik ook linux commands kan gebruiken.


Daarnaast is deze Terminal ook helemaal naar wens te customizen.

Zie documentatie.


linkInstall Windows Terminal or Windows Terminal (Preview) from the Microsoft Store

Set up custom actions like keyboard shortcuts to make the terminal feel natural to your preferences

Learn how to use command line arguments like opening a terminal with multiple command lines split into window panes or tabs

Learn about the search feature

Find tips and tricks, like how to rename or color a tab, use mouse interactions, or enable "Quake mode"

Find tutorials on how to set up a customized command prompt, SSH profiles, or tab titles


linkUseful Commands

CTRL + Shift + P om het action panel te openen.

Daar kun je dan bijvoorbeeld naar de settings gaan.


linkSettings die ik heb aangepast

// Startup
Default Profile: Ubuntu 20.04
Launch on machine startup: On
New instance behaviour
 
// Color schemes
Solarized Dark
 
// Profiles -> Ubuntu
Starting directory: "/home/lldiegon/Projects/"
Appearance -> Color scheme: Solarized Dark
Appearance -> Acrylic: On
Appearance -> Background opacity: 50%
Advanced -> Text antialising: Grayscale


TODO Mijn configuration file delen zodra ik tevreden ben met alle instellingen


linkInstall Powerline Go Github

Dit zorgt ervoor dat je kunt zien in welke Git branch je momenteel bent.

Installeer het font 'Cascadia Code PL', download hem hier. 

Ga naar de map 'ttf'

sudo apt install golang-go -y
go get -u github.com/justjanne/powerline-go
sudo nano ~/.bashrc
// Voeg toe aan ~/.bashrc
 
GOPATH=$HOME/go
function _update_ps1() {
PS1="$($GOPATH/bin/powerline-go -error $?)"
}
if [ "$TERM" != "linux" ] && [ -f "$GOPATH/bin/powerline-go" ]; then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi

Verander in de profile settings van terminal de font naar 'Cascadia Code PL'


linkInstall nnn

Naar mijn mening de snelste en handigste File Explorer op Linux.


sudo apt-get install nnn -y
sudo nano ~/.bashrc


Voeg dit toe:

f ()
{
# Block nesting of nnn in subshells
if [ -n $NNNLVL ] && [ "${NNNLVL:-0}" -ge 1 ]; then
echo "nnn is already running"
return
fi
 
# The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set)
# To cd on quit only on ^G, either remove the "export" as in:
# NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
# (or, to a custom path: NNN_TMPFILE=/tmp/.lastd)
# or, export NNN_TMPFILE after nnn invocation
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
 
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
# stty start undef
# stty stop undef
# stty lwrap undef
# stty lnext undef
 
nnn -de "$@"
 
if [ -f "$NNN_TMPFILE" ]; then
. "$NNN_TMPFILE"
rm -f "$NNN_TMPFILE" > /dev/null
fi
}


Nu heb je een veel snellere vorm van cd

Als je 'f' als command intypt, kom je in nnn, en als je op 'q' drukt sluit je hem en ben je in de folder waar je in nnn gebleven was.