Fix issue where livesession is updated automatically, tidy init scripts

This commit is contained in:
natemaia 2018-05-12 11:00:19 -07:00
parent 14637331e0
commit 34ef33b9a9
8 changed files with 35 additions and 49 deletions

View File

@ -4,11 +4,13 @@
# for any user being created from /etc/skel
# only after a valid internet connection is made
do_setup() {
keys=("AEFB411B072836CD48FF0381AE252C284B5DBA5D"
"9E4F11C6A072942A7B3FD3B0B81EB14A09A25EB0"
"35F52A02854DCCAEC9DD5CC410443C7F54B00041"
)
keys=(
"AEFB411B072836CD48FF0381AE252C284B5DBA5D"
"9E4F11C6A072942A7B3FD3B0B81EB14A09A25EB0"
"35F52A02854DCCAEC9DD5CC410443C7F54B00041"
)
setup() {
sudo dirmngr </dev/null
sudo pacman-key --init
sudo pacman-key --populate archlinux
@ -20,10 +22,9 @@ do_setup() {
fi
done
sudo pacman-key --populate archlabs
sudo pacman -Syyu --noconfirm
}
sleep 2
sleep 1
if grep -qi 'hypervisor' <<< "$(dmesg)"; then
$(grep "nitrogen" $HOME/config/openbox/autostart)
$(grep "polybar" $HOME/.config/openbox/autostart | sed 's/sleep 1; //g')
@ -33,6 +34,6 @@ while ! ping -c1 8.8.8.8 &>/dev/null; do
sleep 1
done
do_setup
setup
sed -i '/keypack/d' "$HOME/.config/openbox/autostart"
rm -f "$HOME/.config/keypack"

View File

@ -11,9 +11,6 @@ nitrogen --restore &
# start panel
sleep 1; polybar --config=/home/liveuser/.config/polybar/config openbox-bar &
# system tray
sleep 1; trayer --edge bottom --align left --widthtype request --SetDockType false --expand true &
# Openbox autostart
ob-autostart -d &

View File

@ -3,12 +3,3 @@
# To set your language for displaying messages and time/date formats, use the following:
# LANG=en_US.UTF8
# xdg-open applications
# export XDG_CURRENT_DESKTOP=XFCE
# export DE="xfce"
# # dbus with openbox
# if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
# eval "$(dbus-launch --sh-syntax --exit-with-session)"
# fi

View File

@ -168,7 +168,7 @@ format = <label>
;;;;;;;;;
[module/coreuse]
type = internal/cpu
interval = 1
interval = 3
format-padding = 1
format = <label><ramp-coreload>
label = %{A1:termite --exec=htop & disown:} %percentage%% %{A}

View File

@ -14,9 +14,6 @@ files=(
"$HOME/.mozilla/firefox/archlabs.default/sessionstore.js"
)
for f in "${files[@]}"; do
sed -i "s/liveuser/${USER}/g" "$f"
done
for f in "${files[@]}"; do sed -i "s/liveuser/${USER}/g" "$f"; done
sed -i '/setup/d' "$HOME/.config/openbox/autostart"
rm -f "$HOME/.config/setup"

View File

@ -3,8 +3,8 @@
# sourced at boot by xinit
[ -d "/sbin" ] && PATH="$PATH:/sbin"
[ -d "/usr/sbin" ] && PATH="$PATH:/usr/sbin"
[ -d "$HOME/bin" ] && PATH="$HOME/bin:$PATH"
[ -d /sbin ] && PATH="$PATH:/sbin"
[ -d /usr/sbin ] && PATH="$PATH:/usr/sbin"
[ -d ~/bin ] && PATH="$HOME/bin:$PATH"
export XDG_CONFIG_HOME="$HOME/.config"

View File

@ -9,9 +9,9 @@ while true; do
if ping -c1 8.8.8.8 &>/dev/null; then
ID=$(ip link | awk '/state UP/ {print $2}')
if [[ $ID == e* ]]; then
echo "$ethernet_connected" ; sleep 10
echo "$ethernet_connected" ; sleep 20
else
echo "$wireless_connected" ; sleep 10
echo "$wireless_connected" ; sleep 20
fi
else
echo "$disconnected" ; sleep 0.6

View File

@ -3,33 +3,33 @@
BAR_ICON=""
ICON=/usr/share/icons/gnome/32x32/apps/system-software-update.png
total() { UPD=$(checkupdates | wc -l) ;}
while true; do
updates=$(checkupdates | wc -l)
total
if hash notify-send &>/dev/null; then
if [[ $updates -gt 50 ]]; then
notify-send -u critical -i $ICON \
"You really need to update soon!!" "$updates New package updates"
elif [[ $updates -gt 25 ]]; then
notify-send -u normal -i $ICON \
"You should update soon" "$updates New package updates"
elif [[ $updates -gt 2 ]]; then
notify-send -u low -i $ICON "$updates New package updates"
if [[ $UPD -gt 50 ]]; then
notify-send -u critical -i $ICON "You really need to update!!" "$UPD New packages"
elif [[ $UPD -gt 25 ]]; then
notify-send -u normal -i $ICON "You should update soon" "$UPD New packages"
elif [[ $UPD -gt 2 ]]; then
notify-send -u low -i $ICON "$UPD New packages"
fi
fi
while [[ $updates -gt 0 ]]; do
if [[ $updates -eq 1 ]]; then
echo "$updates Update"
elif [[ $updates -gt 1 ]]; then
echo "$updates Updates"
while [[ $UPD -gt 0 ]]; do
if [[ $UPD -eq 1 ]]; then
echo "$UPD Update"
elif [[ $UPD -gt 1 ]]; then
echo "$UPD Updates"
fi
sleep 8
updates=$(checkupdates | wc -l)
sleep 10
total
done
while [[ $updates -eq 0 ]]; do
while [[ $UPD -eq 0 ]]; do
echo $BAR_ICON
sleep 1600
updates=$(checkupdates | wc -l)
sleep 1800
total
done
done