[core] Rework core implementation

Experimental re-implementation of core functionality with the aim:
- Depend only on the Python Standard Library for core
- If modules are missing elsewhere, *never* throw
- Unit test *everything*
- Cleaner and more minimal implementation
- Better integration points for existing implementations (charts,
  braille, etc.)
- Full backwards-compatibility with existing module system (except where
  modules can be vastly simplified)
This commit is contained in:
Tobias Witek 2020-01-19 13:29:34 +01:00
parent 72f88b3409
commit e931bb93c6
214 changed files with 45 additions and 13040 deletions

View file

@ -1,30 +0,0 @@
#!/usr/bin/env bash
if [ ! -f ~/.config/i3/config.template ]; then
cp ~/.config/i3/config ~/.config/i3/config.template
else
cp ~/.config/i3/config.template ~/.config/i3/config
fi
if [ -f ~/.config/i3/config.template.private ]; then
cat ~/.config/i3/config.template.private >> ~/.config/i3/config
fi
screens=$(xrandr -q|grep ' connected'| grep -P '\d+x\d+' |cut -d' ' -f1)
echo "screens: $screens"
while read -r line; do
screen=$(echo $line | cut -d' ' -f1)
others=$(echo $screens|tr ' ' '\n'|grep -v $screen|tr '\n' '-'|sed 's/.$//')
if [ -f ~/.config/i3/config.$screen-$others ]; then
cat ~/.config/i3/config.$screen-$others >> ~/.config/i3/config
else
if [ -f ~/.config/i3/config.$screen ]; then
cat ~/.config/i3/config.$screen >> ~/.config/i3/config
fi
fi
done <<< "$screens"
i3-msg restart

View file

@ -1,22 +0,0 @@
#!/usr/bin/bash
if ! type -P fakeroot >/dev/null; then
error 'Cannot find the fakeroot binary.'
exit 1
fi
if [[ -z $CHECKUPDATES_DB ]]; then
CHECKUPDATES_DB="${TMPDIR:-/tmp}/checkup-db-${USER}/"
fi
trap 'rm -f $CHECKUPDATES_DB/db.lck' INT TERM EXIT
DBPath="${DBPath:-/var/lib/pacman/}"
eval $(awk -F' *= *' '$1 ~ /DBPath/ { print $1 "=" $2 }' /etc/pacman.conf)
mkdir -p "$CHECKUPDATES_DB"
ln -s "${DBPath}/local" "$CHECKUPDATES_DB" &> /dev/null
fakeroot -- pacman -Sy --dbpath "$CHECKUPDATES_DB" --logfile /dev/null &> /dev/null
fakeroot pacman -Su -p --dbpath "$CHECKUPDATES_DB"
exit 0

View file

@ -1,15 +0,0 @@
#!/usr/bin/env bash
echo $(dirname $(readlink -f "$0"))
i3bar_update=$(dirname $(readlink -f "$0"))/load-i3-bars.sh
xrandr "$@"
if [ -f $i3bar_update ]; then
sleep 1
if [ -f ~/.config/i3/images/background.png ]; then
feh --bg-fill ~/.config/i3/images/background.png
fi
$i3bar_update
fi