├── README.md ├── install.sh ├── screenshot.png └── uninstall.sh /README.md: -------------------------------------------------------------------------------- 1 | # RPI-PowerlineShell-Installer 2 | ![screenshot](https://raw.githubusercontent.com/techcoder20/RPI-PowerlineShell-Installer/main/screenshot.png) 3 | Powerline Shell is a beautiful and useful prompt generator for Bash, ZSH, Fish, and tcsh: 4 | 5 | - Shows some important details about the git/svn/hg/fossil branch 6 | - Changes color if the last command exited with a failure code 7 | - If you're too deep into a directory tree, shortens the displayed path with an ellipsis 8 | - Shows the current Python virtualenv environment 9 | - It's easy to customize and extend. See below for 10 | - The generated prompts are designed to resemble powerline, but otherwise this project has no relation to powerline. 11 | 12 | **Note: This will only work with lxterminal and xfce4-terminal. If you want this script to work for other terminals please open a issue.** 13 | 14 | ## Installation 15 | Run this command to install powerline shell on the Raspberry Pi 16 | ``` 17 | git clone https://github.com/techcoder20/RPI-PowerlineShell-Installer.git ~/RPI-PowerlineShell-Installer 18 | sudo chmod +x ~/RPI-PowerlineShell-Installer/install.sh 19 | ~/RPI-PowerlineShell-Installer./install.sh 20 | ``` 21 | **OR** 22 | 23 | 24 | [![badge](https://github.com/Botspot/pi-apps/blob/master/icons/badge.png?raw=true)](https://github.com/Botspot/pi-apps) 25 | 26 | 27 | ## Uninstall 28 | `cd ~/RPI-PowerlineShell-Installer && sudo chmod +x uninstall.sh && ./uninstall.sh` 29 | 30 | ## Video Tutorial 31 | [![Video](https://raw.githubusercontent.com/techcoder20/YoutubeThumbnails/main/POWERLINE%20SHELL%20ON%20RASPBERRY%20PI.png)](https://youtu.be/lKNpP6Vq2fA) 32 | 33 | ## Join My Discord Server 34 | [![Join our Discord server!](https://invidget.switchblade.xyz/WKdBuBKhgm)](https://discord.gg/WKdBuBKhgm) 35 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function error { 4 | echo -e "\\e[91m$1\\e[39m" 5 | exit 1 6 | } 7 | 8 | #Installing dependencies 9 | sudo apt install python3 python3-pip fonts-powerline fonts-fantasque-sans || error "Failed to install dependencies" 10 | 11 | #Installing powerline shell with pip3 12 | sudo pip3 install powerline-shell || error "Failed to install powerline shell with pip3" 13 | 14 | echo fontname >> ~/.config/lxterminal/lxterminal.conf 15 | sed -i '/fontname/c\fontname=Fantasque Sans Mono Bold 11' ~/.config/lxterminal/lxterminal.conf 16 | echo FontName >> ~/.config/xfce4/terminal/terminalrc 17 | sed -i '/FontName/c\FontName=Fantasque Sans Mono 12' ~/.config/xfce4/terminal/terminalrc 18 | 19 | #Removing powerline in ~/.bashrc if already there 20 | sed -i '/function _update_ps1() {/,/fi/{d}' ~/.bashrc 21 | 22 | #Adding powerling to ~/.bashrc 23 | echo '''function _update_ps1() { 24 | PS1=$(powerline-shell $?) 25 | } 26 | 27 | if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then 28 | PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND" 29 | fi ''' >> ~/.bashrc 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/techcoder20/RPI-PowerlineShell-Installer/43ab5e5c3da38c9cd29672c54168b602bde8bb8f/screenshot.png -------------------------------------------------------------------------------- /uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #Removing powerline shell with pip 4 | sudo pip3 uninstall -y powerline-shell 5 | 6 | 7 | sed -i '/FontName/c\FontName=Monospace 10' ~/.config/xfce4/terminal/terminalrc 8 | sed -i '/fontname/c\fontname=Monospace 10' ~/.config/lxterminal/lxterminal.conf 9 | 10 | #Removing powerline shell from ~/.bashrc 11 | sed -i '/function _update_ps1() {/,/fi/{d}' ~/.bashrc 12 | 13 | --------------------------------------------------------------------------------