[core] Refactor engine
This is going to be a bit more comprehensive than anticipated. In order to cleanly refactor the core and the engine, basically start from scratch with the implementation. Goals: * Test coverage * Maintain backwards compatibility with module interface as much as possible (but still make modules easier to code) * Simplicity see #23
This commit is contained in:
parent
20858991b9
commit
a8a6c9bba2
72 changed files with 19 additions and 2155 deletions
|
@ -1,21 +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
|
|
@ -1,26 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [ ! -f ~/.i3/config.template ]; then
|
||||
cp ~/.i3/config ~/.i3/config.template
|
||||
else
|
||||
cp ~/.i3/config.template ~/.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 ~/.i3/config.$screen-$others ]; then
|
||||
cat ~/.i3/config.$screen-$others >> ~/.i3/config
|
||||
else
|
||||
if [ -f ~/.i3/config.$screen ]; then
|
||||
cat ~/.i3/config.$screen >> ~/.i3/config
|
||||
fi
|
||||
fi
|
||||
done <<< "$screens"
|
||||
|
||||
i3-msg restart
|
|
@ -1,12 +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
|
||||
$i3bar_update
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue