--- /dev/null
+#!/usr/bin/env bash
+
+# https://linuxcommando.blogspot.com/2008/08/how-to-show-apt-log-history.html
+
+### pars for fun: install | remove | rollback
+function apt-history(){
+
+ case "$1" in
+ install)
+ grep 'install ' /var/log/dpkg.log
+ ;;
+ upgrade|remove)
+ grep $1 /var/log/dpkg.log
+ ;;
+ rollback)
+ grep upgrade /var/log/dpkg.log | \
+ grep "$2" -A10000000 | \
+ grep "$3" -B10000000 | \
+ awk '{print $4"="$5}'
+ ;;
+ *)
+ cat /var/log/dpkg.log
+ ;;
+ esac
+}
+
+++ /dev/null
-# General purpose extraction function, from Ubuntu bashrc
-#!/usr/bin/env sh
-
-ex() {
- if [ -f $1 ] ; then
- case $1 in
- *.tar.bz2) tar xjf $1 ;;
- *.tar.gz) tar xzf $1 ;;
- *.bz2) bunzip2 $1 ;;
- *.rar) unrar x $1 ;;
- *.gz) gunzip $1 ;;
- *.tar) tar xf $1 ;;
- *.tbz2) tar xjf $1 ;;
- *.tgz) tar xzf $1 ;;
- *.zip) unzip $1 ;;
- *.Z) uncompress $1;;
- *.7z) 7z x $1 ;;
- *.deb) ar x $1 ;;
- *.tar.xz) tar xf $1 ;;
- *.tar.zst) unzstd $1 ;;
- *) echo ''$1' cannot be extracted via ex()' ;;
- esac
- else
- echo ''$1' is not a valid file'
- fi
-}
-
--- /dev/null
+# General purpose extraction function, from Ubuntu bashrc
+#!/usr/bin/env sh
+
+ex() {
+ if [ -f $1 ] ; then
+ case $1 in
+ *.tar.bz2) tar xjf $1 ;;
+ *.tar.gz) tar xzf $1 ;;
+ *.bz2) bunzip2 $1 ;;
+ *.rar) unrar x $1 ;;
+ *.gz) gunzip $1 ;;
+ *.tar) tar xf $1 ;;
+ *.tbz2) tar xjf $1 ;;
+ *.tgz) tar xzf $1 ;;
+ *.zip) unzip $1 ;;
+ *.Z) uncompress $1;;
+ *.7z) 7z x $1 ;;
+ *.deb) ar x $1 ;;
+ *.tar.xz) tar xf $1 ;;
+ *.tar.zst) unzstd $1 ;;
+ *) echo ''$1' cannot be extracted via ex()' ;;
+ esac
+ else
+ echo ''$1' is not a valid file'
+ fi
+}
+
-#!/usr/bin/env sh
+#!/usr/bin/env bash
function time_set() {
date +%A" "%B" "%e" | "%1l:%M:%S
export POWER=$(power_set)
notify-send -i "clock" "`echo $TIME`" "`echo $POWER`"
-
-