Page MenuHomePhabricator

Scripts
Updated 841 Days AgoPublic

"Here I am, brain the size of a planet and they ask me to take you down to the bridge. Call that job satisfaction? 'Cos I don't." - Marvin the Paranoid Android, Hitchhiker's Guide to the Galaxy by Douglas Adams

About

Sometimes, we need something to do the heavy lifting for us. This is a catalog of useful BASH scripts for Linux.

Feel free to add your own scripts here. To add your file, simply drag-and-drop onto the wiki editing screen. The file will be uploaded, and the link automatically created. Otherwise, you can create a Paste and embed it by its code below (in curly braces):

Bash Scripts

System Update


OS: Ubuntu 14.04, 16.04, 18.04, 19.10
Prorequisites: None
Instructions: Set this as one of your startup scripts to automatically update everything. If you want logs, run the following...

$ sudo bash sys_update.sh > ~/logs/update.sh

Drop the sudo if this is going in a startup script.

Wacom Touch On/Off


OS: Ubuntu 14.04, 16.04, 18.04, 19.10
Prerequisites: pcregrep, xsetwacom
Instructions: After attaching your Wacom tablet, run the script as follows, depending on whether you want to turn your tablet's touch on or off.

$ bash wacom.sh off
$ bash wacom.sh on

Add Working Git Branch to Terminal Prompt

Modify your $PS1 variable. Alternatively, you can use an external tool such as starship to manage this for you. To modify it manually, add a line like this to your ~/.bashrc file:

PS1 += "`__git_ps1`"

You can add colors to this or any other part of your terminal line:

PS1 += "$ICyan`__git_ps1`$Color_Off"

Macro _marvin_: Here I am, brain the size of a planet and they ask me to take you down to the bridge.

Last Author
jcmcdonald
Last Edited
Apr 20 2020, 3:24 PM

Event Timeline

jcmcdonald edited the content of this document. (Show Details)
jcmcdonald edited the content of this document. (Show Details)
jcmcdonald edited the content of this document. (Show Details)
jcmcdonald edited the content of this document. (Show Details)
jcmcdonald edited the content of this document. (Show Details)
jcmcdonald edited the content of this document. (Show Details)
jcmcdonald changed the title from Bash Scripts to Scripts.Jan 16 2017, 11:00 AM