Neamerjell

Bash Files

vconsole.conf

This is the biggest default font on Arch Linux.

FONT=latarcyrheb-sun32.psfu

lsinstalled

I've actually been more successful with

grep .bash_history "pacman -S"
#
# lsinstalled 
#
# Original code from http://wiki.archlinux.org/index.php/Pacman/Tips_and_Tricks#Listing_packages
#
# "To list explicitly installed packages not in base or base-devel with size and description:"

#!/bin/bash

expac -H M "%011m\t%-20n\t%10d" $(comm -23 <(pacman -Qen | sort) <(pacman -Qgg base base-devel |sort)) | sort -n | more
			

.bashrc

This .bashrc is set up with color variables and displays the username in red for root.

#
# ~/.bashrc
#

# Colors for prompt; use ${color-code} to use them in the prompt
cNormal="\[\033[0m\]"
cBlack="\[\033[0;30m\]"
cRed="\[\033[0;31m\]"
cGreen="\[\033[0;32m\]"
cYellow="\[\033[0;33m\]"
cBlue="\[\033[0;34m\]"
cMagenta="\[\033[0;35m\]"
cCyan="\[\033[0;36m\]"
cLtGrey="\[\033[0;37m\]"

cGrey="\[\033[1;30m\]"
cLtRed="\[\033[1;31m\]"
cLtGreen="\[\033[1;32m\]"
cLtYellow="\[\033[1;33m\]"
cLtBlue="\[\033[1;34m\]"
cLtMagenta="\[\033[1;35m\]"
cLtCyan="\[\033[1;36m\]"
cWhite="\[\033[1;37m\]"

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
alias dir='ls --color=always --group-directories-first -laFh | more -d'

alias cls='clear'
alias cd..='cd ..'
alias cd~='cd ~'

# i = interactive, prompt before overwrite
# v = verbose

alias md='mkdir'
alias rd='rmdir'
alias del='rm -iv'
alias move='mv -iv'
alias ren='mv -v'
alias mem='free'

#User Prompt
PS1="${cLtGreen}\u${cWhite}@${cLtCyan}\h ${cWhite}\W ${cLtGreen}\\$ ${cNormal}"

#Root Prompt
#PS1="${cLtRed}\u${cWhite}@${cLtCyan}\h ${cWhite}\W ${cLtRed} \\$ ${cNormal}"
			

stats.

This has been superceded by neofetch.

#!/bin/bash
clear

echo -ne '\033[1;37m' "Date:            " && . ~/Scripts/whatday
echo -ne '\033[1;37m' "Time:            " && . ~/Scripts/whattime
echo -ne '\033[1;37m' "Up Time:       " && uptime | cut -d'p' -f2 | cut -d',' -f1
echo ''
echo -ne '\033[1;32m' "IP Address:      " && ip addr show scope global | grep inet | cut -d' ' -f6 | cut -d/ -f1
echo -ne '\033[1;34m' "CPU 1 Frequency: " && awk '{printf("%.0f MHz\n", $1/1e3)}' /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
echo -ne '\033[1;34m' "CPU 2 Frequency: " && awk '{printf("%.0f MHz\n", $1/1e3)}' /sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq
echo -ne '\033[1;34m' "CPU 3 Frequency: " && awk '{printf("%.0f MHz\n", $1/1e3)}' /sys/devices/system/cpu/cpu2/cpufreq/scaling_cur_freq
echo -ne '\033[1;34m' "CPU 4 Frequency: " && awk '{printf("%.0f MHz\n", $1/1e3)}' /sys/devices/system/cpu/cpu3/cpufreq/scaling_cur_freq
echo -ne '\033[1;34m' "CPU Temperature: " && . ~/Scripts/cputemp
echo -ne '\033[1;33m' "Disk Used:       " && df -h | grep 'dev/sda2' | awk '{print $3}'
echo -ne '\033[1;33m' "Disk Free:       " && df -h | grep 'dev/sda2' | awk '{print $4}'
echo -ne '\033[1;36m' "Free Memory:     " && free | grep Mem: | awk '{printf("%.2f GB\n", $4/1024/1024)}'
echo -e '\033[0;0m'
			

motd.sh

This is a "Message of the Day script specifically for the Raspberry Pi. It is superceded by neofetch as well.

#!/bin/bash
#clear
diskused=`df -h | grep 'dev/root' | awk '{print $3}'`
diskfree=`df -h | grep 'dev/root' | awk '{print $4}'`

echo -ne '\033[0;32m' "   .~~.   .~~.    " '\033[1;32m' "Date:            " && whatday
echo -ne '\033[0;32m' "  '. \ ' ' / .'   " '\033[1;32m' "Time:            " && whattime
echo -e '\033[0;31m' "   .~ .~~~..~.    " '\033[1;31m' 
echo -ne '\033[0;31m' "  : .~.'~'.~. :   " '\033[1;31m' "IP Address:      " && ip addr show scope global | grep inet | cut -d' ' -f6 | cut -d/ -f1
echo -ne '\033[0;31m' " ~ (   ) (   ) ~  " '\033[1;31m' "CPU Frequency:   " && awk '{printf("%.0f MHz\n", $1/1e3)}' /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
echo -ne '\033[0;31m' "( : '~'.~.'~' : ) " '\033[1;31m' "CPU Temperature: " && cputemp
echo -ne '\033[0;31m' " ~ .~ (   ) ~. ~  " '\033[1;31m' "Up Time:        " && uptime | cut -d'p' -f2 | cut -d',' -f1
echo -e '\033[0;31m' "  (  : '~' :  )   " '\033[1;31m' "Disk Used:       " $diskused
echo -e '\033[0;31m' "   '~ .~~~. ~'    " '\033[1;31m' "Disk Free:       " $diskfree
echo -ne '\033[0;31m' "       '~'        " '\033[1;31m' "Free Memory:     " && cat /proc/meminfo | grep MemFree | awk '{print $2, $3}'
echo -e '\033[0;0m'

unset diskused diskfree
			

cputemp

This only seems to work for the Raspberry Pi.

#!/bin/bash
#This script outputs the current CPU temperature in degrees Celcius and Farenheit

awk '{printf("%.1fC ",$1/1e3)}' /sys/class/thermal/thermal_zone0/temp
awk '{printf("(%.1fF)\n",$1*1.8/1e3)}' /sys/class/thermal/thermal_zone0/temp
			

whatday

#!/bin/bash

# Display date as '[name of day], [name of month] [date day], [four digit year]'
# Saturday, February 28, 2015

date '+%A, %B %d, %Y'
			

whattime

#!/bin/bash

# display time as ' [hour with no leading zeros]:[minutes] [lower case am/pm] '

date '+%l:%M %P'