Update and minor changes to upgrade script

This commit is contained in:
natemaia 2018-02-04 08:09:32 -08:00
parent 92ada44d97
commit 927b334aa9
27 changed files with 166 additions and 188 deletions

View File

@ -49,7 +49,7 @@ xterm*loginShell: true
xterm*vt100*geometry: 90x34 xterm*vt100*geometry: 90x34
xterm*saveLines: 2000 xterm*saveLines: 2000
xterm*charClass: 33:48,35:48,37:48,43:48,45-47:48,64:48,95:48,126:48 xterm*charClass: 33:48,35:48,37:48,43:48,45-47:48,64:48,95:48,126:48
xterm*termName: xterm-color xterm*termName: xterm-256color
xterm*eightBitInput: false xterm*eightBitInput: false

View File

@ -49,7 +49,7 @@ xterm*loginShell: true
xterm*vt100*geometry: 90x34 xterm*vt100*geometry: 90x34
xterm*saveLines: 2000 xterm*saveLines: 2000
xterm*charClass: 33:48,35:48,37:48,43:48,45-47:48,64:48,95:48,126:48 xterm*charClass: 33:48,35:48,37:48,43:48,45-47:48,64:48,95:48,126:48
xterm*termName: xterm-color xterm*termName: xterm-256color
xterm*eightBitInput: false xterm*eightBitInput: false

View File

@ -26,12 +26,12 @@ no-fading-destroyed-argb = false;
# Backend # Backend
backend = "xrender"; backend = "xrender";
vsync = "opengl";
mark-wmwin-focused = true; mark-wmwin-focused = true;
mark-ovredir-focused = true; mark-ovredir-focused = true;
detect-rounded-corners = true; detect-rounded-corners = true;
detect-client-opacity = true; detect-client-opacity = true;
refresh-rate = 0; refresh-rate = 0;
vsync = "opengl";
paint-on-overlay = true; paint-on-overlay = true;
unredir-if-possible = true; unredir-if-possible = true;
detect-transient = true; detect-transient = true;
@ -40,15 +40,9 @@ detect-client-leader = true;
# GLX backend # GLX backend
glx-no-stencil = true; glx-no-stencil = true;
glx-no-rebind-pixmap = true; glx-no-rebind-pixmap = true;
#glx-copy-from-front = false;
#glx-use-copysubbuffermesa = true;
#glx-swap-method = "undefined";
#glx-use-gpushader4 = true;
#xrender-sync = true;
#xrender-sync-fence = true;
opacity-rule = [ opacity-rule = [
"85:class_g = 'XTerm'", "85:class_g *?= 'xterm'",
"0:_NET_WM_STATE@:32a * = '_NET_WM_STATE_HIDDEN'" "0:_NET_WM_STATE@:32a * = '_NET_WM_STATE_HIDDEN'"
]; ];
@ -69,13 +63,6 @@ shadow-exclude = [
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'", "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
"_GTK_FRAME_EXTENTS@:c" "_GTK_FRAME_EXTENTS@:c"
]; ];
#"85:class_g *?= 'xterm'",
#"90:class_g *?= 'rofi'",
#"99:class_g *?= 'chrome'",
#"99:class_g *?= 'gimp'",
#"99:class_g *?= 'steam'",
#"99:class_g *?= 'qutebrowser'",
#"99:class_g *?= 'mpv'",
focus-exclude = [ focus-exclude = [
"class_g *?= 'Cairo-clock'", "class_g *?= 'Cairo-clock'",
@ -84,19 +71,7 @@ focus-exclude = [
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'", "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
"name *?= 'Authy'" "name *?= 'Authy'"
]; ];
#"class_g *?= 'steam'",
#"class_g *?= 'chrome'",
#"class_g *?= 'gimp'",
#"class_g *?= 'qutebrowser'",
#"class_g *?= 'mpv'",
invert-color-include = [
];
fade-exclude = [
];
# Window type settings
wintypes: wintypes:
{ {
tooltip = { fade = true; shadow = true; focus = true; }; tooltip = { fade = true; shadow = true; focus = true; };

View File

@ -15,6 +15,7 @@
# Xresources var value fallback # Xresources var value fallback
set_from_resource $bg background #19043C set_from_resource $bg background #19043C
set_from_resource $fg foreground #F1F1F1 set_from_resource $fg foreground #F1F1F1
set_from_resource $black color0 #19043C
set_from_resource $red color1 #EE79A9 set_from_resource $red color1 #EE79A9
set_from_resource $green color2 #8C9440 set_from_resource $green color2 #8C9440
set_from_resource $yellow color3 #DE935F set_from_resource $yellow color3 #DE935F
@ -22,10 +23,8 @@ set_from_resource $blue color4 #05C6F1
set_from_resource $purple color5 #85678F set_from_resource $purple color5 #85678F
set_from_resource $cyan color6 #5E8D87 set_from_resource $cyan color6 #5E8D87
set_from_resource $grey color7 #969CD3 set_from_resource $grey color7 #969CD3
set_from_resource $white color15 #F1F1F1
set_from_resource $black color0 #19043C
# class bd bg txt ind child_bordr # class bd bg txt ind child_bd
client.focused $grey $bg $fg $blue $grey client.focused $grey $bg $fg $blue $grey
client.unfocused $grey $bg $black $bg $bg client.unfocused $grey $bg $black $bg $bg
client.focused_inactive $grey $bg $black $bg $bg client.focused_inactive $grey $bg $black $bg $bg

View File

@ -7,14 +7,15 @@
do_setup() { do_setup() {
keys=('AEFB411B072836CD48FF0381AE252C284B5DBA5D' keys=('AEFB411B072836CD48FF0381AE252C284B5DBA5D'
'9E4F11C6A072942A7B3FD3B0B81EB14A09A25EB0' '9E4F11C6A072942A7B3FD3B0B81EB14A09A25EB0'
'35F52A02854DCCAEC9DD5CC410443C7F54B00041') '35F52A02854DCCAEC9DD5CC410443C7F54B00041'
)
sudo dirmngr </dev/null sudo dirmngr </dev/null
sudo pacman-key --init sudo pacman-key --init
sudo pacman-key --populate archlinux sudo pacman-key --populate archlinux
for k in ${keys[@]}; do for k in "${keys[@]}"; do
if ! sudo pacman-key --list-keys | grep -q $k; then if ! grep -q "$k" <<< "$(sudo pacman-key --list-keys)"; then
gpg --receive-keys $k gpg --receive-keys "$k"
sudo pacman-key -r $k sudo pacman-key -r "$k"
fi fi
done done
sudo pacman-key --populate archlabs sudo pacman-key --populate archlabs
@ -25,5 +26,5 @@ while ! [[ "$(ping -c1 8.8.8.8)" ]]; do
done done
do_setup do_setup
sed -i '/keypack/d' $HOME/.config/openbox/autostart sed -i '/keypack/d' "$HOME/.config/openbox/autostart"
rm -f $HOME/.config/keypack rm -f "$HOME/.config/keypack"

View File

@ -38,7 +38,7 @@ print_info() {
# info "Disk" disk # info "Disk" disk
# info "Battery" battery # info "Battery" battery
# info "Font" font # info "Font" font
info "Song" song # info "Song" song
# info "Local IP" local_ip # info "Local IP" local_ip
# info "Public IP" public_ip # info "Public IP" public_ip
# info "Users" users # info "Users" users

4
home/.config/openbox/autostart Executable file → Normal file
View File

@ -1,9 +1,9 @@
# launch compton if enabled # compton
al-compositor --start & al-compositor --start &
#$HOME/.config/setup & #$HOME/.config/setup &
# enable numlock, commented out for laptop users # enable numlock, commented out for laptop users
#numlockx on & # numlockx &
# restore wallpaper # restore wallpaper
nitrogen --restore & nitrogen --restore &

View File

@ -16,5 +16,3 @@ export DE="xfce"
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
eval `dbus-launch --sh-syntax --exit-with-session` eval `dbus-launch --sh-syntax --exit-with-session`
fi fi
QT_QPA_PLATFORMTHEME=qt5ct

0
home/.config/polybar/config Executable file → Normal file
View File

View File

@ -3,18 +3,19 @@
# this script will setup configs for any user created from /etc/skel # this script will setup configs for any user created from /etc/skel
# if this is not run immediately at startup, polybar WILL fail to load # if this is not run immediately at startup, polybar WILL fail to load
files=($HOME/.config/polybar/config files=("$HOME/.config/polybar/config"
$HOME/.config/polybar/sessions/i3-sessionfile "$HOME/.config/polybar/sessions/i3-sessionfile"
$HOME/.config/polybar/sessions/bspwm-sessionfile "$HOME/.config/polybar/sessions/bspwm-sessionfile"
$HOME/.config/polybar/sessions/openbox-sessionfile "$HOME/.config/polybar/sessions/openbox-sessionfile"
$HOME/.config/gtk-3.0/bookmarks "$HOME/.config/gtk-3.0/bookmarks"
$HOME/.gorice/templates/i3/data.json "$HOME/.gorice/templates/i3/data.json"
$HOME/.mozilla/firefox/archlabs.default/prefs.js "$HOME/.mozilla/firefox/archlabs.default/prefs.js"
$HOME/.mozilla/firefox/archlabs.default/sessionstore.js) "$HOME/.mozilla/firefox/archlabs.default/sessionstore.js"
)
for f in ${files[@]}; do for f in "${files[@]}"; do
sed -i "s/liveuser/${USER}/g" $f sed -i "s/liveuser/${USER}/g" "$f"
done done
sed -i '/setup/d' $HOME/.config/openbox/autostart sed -i '/setup/d' "$HOME/.config/openbox/autostart"
rm -f $HOME/.config/setup rm -f "$HOME/.config/setup"

0
home/.config/termite/config Executable file → Normal file
View File

2
home/.config/tint2/default.tint2rc Executable file → Normal file
View File

@ -214,7 +214,7 @@ ac_disconnected_cmd =
button = new button = new
button_icon = /usr/share/icons/ArchLabs-Dark/32x32/places/distributor-logo-archlabs.png button_icon = /usr/share/icons/ArchLabs-Dark/32x32/places/distributor-logo-archlabs.png
button_text = button_text =
button_lclick_command= jgmenu_run lx button_lclick_command= jgmenu_run
button_rclick_command= exo-open ~/.config/jgmenu/jgmenurc button_rclick_command= exo-open ~/.config/jgmenu/jgmenurc
button_mclick_command= button_mclick_command=
button_uwheel_command= button_uwheel_command=

2
home/.config/tint2/tint2rc Executable file → Normal file
View File

@ -214,7 +214,7 @@ ac_disconnected_cmd =
button = new button = new
button_icon = /usr/share/icons/ArchLabs-Dark/32x32/places/distributor-logo-archlabs.png button_icon = /usr/share/icons/ArchLabs-Dark/32x32/places/distributor-logo-archlabs.png
button_text = button_text =
button_lclick_command= jgmenu_run lx button_lclick_command= jgmenu_run
button_rclick_command= exo-open ~/.config/jgmenu/jgmenurc button_rclick_command= exo-open ~/.config/jgmenu/jgmenurc
button_mclick_command= button_mclick_command=
button_uwheel_command= button_uwheel_command=

0
home/.config/xfce4/al-xfce-configs/helpers.rc Executable file → Normal file
View File

View File

View File

View File

@ -7,18 +7,35 @@
# simply using startx, openbox is set as the default # simply using startx, openbox is set as the default
session=${1:-openbox} session=${1:-openbox}
export WM="$session"
export XDG_CONFIG_HOME="$HOME/.config"
export PATH=/home/smoke/bin:/usr/sbin:$PATH
# source files in /etc/X11/xinit/xinitrc.d
if [ -f /etc/X11/xinit/.Xmodmap ]; then
xmodmap /etc/X11/xinit/.Xmodmap
fi
if [ -d /etc/X11/xinit/xinitrc.d ]; then if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do for f in /etc/X11/xinit/xinitrc.d/*.sh; do
[ -x "$f" ] && . "$f" [ -x "$f" ] && . "$f"
done done
unset f
fi fi
# this must be before the 'exec' command if [ -f ~/.Xresources ]; then
# it sources ~/.xprofile for additional settings xrdb -load ~/.Xresources
[ -f ~/.xprofile ] && . ~/.xprofile fi
if [ -f ~/.Xmodmap ]; then
xmodmap ~/.Xmodmap
fi
if [ -f ~/.xprofile ]; then
. ~/.xprofile
fi
gnome-keyring-daemon --start --components=pkcs11 &
lxpolkit &
kbdrate -d 400 -r 50
xset r rate 400 50
xset s 3600 3600
# start the session # start the session
case $session in case $session in
@ -38,6 +55,5 @@ case $session in
exec openbox-session exec openbox-session
;; ;;
*) *)
exec $1 exec "$1"
;;
esac esac

View File

@ -6,41 +6,31 @@
# Written by Nathaniel Maia <natemaia10@gmail.com> # Written by Nathaniel Maia <natemaia10@gmail.com>
# #
yes="y" REPOS='
no="n"
REPO='
[archlabs_repo] [archlabs_repo]
Server = https://archlabs.github.io/archlabs_repo/$arch Server = https://archlabs.github.io/archlabs_repo/$arch
Server = https://downloads.sourceforge.net/project/archlabs-repo/archlabs_repo/$arch' Server = https://downloads.sourceforge.net/project/archlabs-repo/archlabs_repo/$arch'
HFILES=("$HOME/bin" "$HOME/.config" "$HOME/.themes" "$HOME/.gtkrc-2.0" HOME_FILES=("$HOME/bin" "$HOME/.config" "$HOME/.themes"
"$HOME/.gorice" "$HOME/.Xresources" "$HOME/.Xresources.template" "$HOME/.gorice" "$HOME/.Xresources" "$HOME/.Xresources.template"
"$HOME/.mozilla" "$HOME/.zshrc" "$HOME/.bashrc" "$HOME/.icons" "$HOME/.mozilla" "$HOME/.zshrc" "$HOME/.bashrc"
"$HOME/.local" "$HOME/.xprofile" "$HOME/.xserverrc" "$HOME/.xinitrc") "$HOME/.local" "$HOME/.xprofile" "$HOME/.xinitrc"
"$HOME/.icons" "$HOME/.gtkrc-2.0"
)
CFILES=("$HOME/.config/awesome" "$HOME/.config/jgmenu" "$HOME/.config/bspwm" SKEL_FILES=('/etc/skel/bin' '/etc/skel/.config' '/etc/skel/.themes'
"$HOME/.config/dunst" "$HOME/.config/i3" "$HOME/.config/obmenu-generator" '/etc/skel/.Xresources' '/etc/skel/.gorice' '/etc/skel/.icons'
"$HOME/.config/qt5ct" "$HOME/.config/Thunar" "$HOME/.config/conky" '/etc/skel/.gtkrc-2.0' '/etc/skel/.xprofile' '/etc/skel/.xinitrc'
"$HOME/.config/geany" "$HOME/.config/neofetch" "$HOME/.config/polybar" '/etc/skel/.mozilla' '/etc/skel/.Xresources.template'
"$HOME/.config/termite" "$HOME/.config/xfce4" "$HOME/.config/openbox" )
"$HOME/.config/ob-autostart")
SFILES=('/etc/skel/bin' '/etc/skel/.config' '/etc/skel/.themes' '/etc/skel/.gorice' WMS=(i3 openbox)
'/etc/skel/.Xresources' '/etc/skel/.Xresources.template' '/etc/skel/.mozilla' for i in "${WMS[@]}"; do
'/etc/skel/.zshrc' '/etc/skel/.bashrc' '/etc/skel/.icons' '/etc/skel/.local'
'/etc/skel/.xprofile' '/etc/skel/.xserverrc' '/etc/skel/.xinitrc' '/etc/skel/.gtkrc-2.0')
KEYS=('AEFB411B072836CD48FF0381AE252C284B5DBA5D'
'9E4F11C6A072942A7B3FD3B0B81EB14A09A25EB0'
'35F52A02854DCCAEC9DD5CC410443C7F54B00041')
WMS=(bspwm i3 openbox)
for i in ${WMS[@]}; do
if [[ "$(wmctrl -m | grep -i name | awk '{print tolower($2)}')" == "$i" ]]; then if [[ "$(wmctrl -m | grep -i name | awk '{print tolower($2)}')" == "$i" ]]; then
WM=$i && break WM=$i && break
elif [[ "$(xprop -root -notype | grep "WM_NAME =" | tr -d '"' | awk '{print tolower($3)}')" == "$i" ]]; then elif [[ "$(xprop -root -notype | grep "WM_NAME =" | tr -d '"' | awk '{print tolower($3)}')" == "$i" ]]; then
WM=$i && break WM=$i && break
elif [[ "$(awk '{print tolower($0)}' <<< $XDG_CURRENT_DESKTOP)" == "$i" ]]; then elif [[ "$(awk '{print tolower($0)}' <<< "$XDG_CURRENT_DESKTOP")" == "$i" ]]; then
WM=$i && break WM=$i && break
fi fi
done done
@ -51,76 +41,74 @@ while ! [[ $(ping -c1 8.8.8.8) ]]; do
clear; sleep 1 clear; sleep 1
done done
setupKeyring() { setup_keyring() {
KEYS=('AEFB411B072836CD48FF0381AE252C284B5DBA5D'
'9E4F11C6A072942A7B3FD3B0B81EB14A09A25EB0'
'35F52A02854DCCAEC9DD5CC410443C7F54B00041'
)
sudo dirmngr </dev/null sudo dirmngr </dev/null
sudo pacman-key --init sudo pacman-key --init
sudo pacman-key --populate archlinux sudo pacman-key --populate archlinux
for key in ${KEYS[@]}; do for key in "${KEYS[@]}"; do
if ! sudo pacman-key --list-keys | grep $key > /dev/null 2>&1; then if ! grep -q "$key" <<< "$(sudo pacman-key --list-keys)"; then
gpg --receive-keys $key gpg --receive-keys "$key"
sudo pacman-key -r $key sudo pacman-key -r "$key"
fi fi
done done
sudo pacman -S archlabs-keyring --needed --noconfirm sudo pacman -S archlabs-keyring --needed --noconfirm
sudo pacman-key --populate archlabs sudo pacman-key --populate archlabs
if grep "archlabs_repo" /etc/pacman.conf > /dev/null 2>&1; then if grep -q "archlabs_repo" /etc/pacman.conf; then
sudo sed -i '/archlabs_repo/d' /etc/pacman.conf sudo sed -i '/archlabs_repo/d' /etc/pacman.conf
fi fi
echo $REPO | sudo tee -a /etc/pacman.conf > /dev/null 2>&1 echo "$REPOS" | sudo tee -a /etc/pacman.conf >/dev/null 2>&1
} }
backupConfigs() { backup_configs() {
if ! [ -e "$HOME/Downloads/$USER-backup.tar.gz" ]; then if ! [[ -e "$HOME/Downloads/$USER-backup.tar.gz" ]]; then
tar czvf $HOME/Downloads/$USER-backup.tar.gz ${HFILES[@]} > /dev/null 2>&1 tar czvf "$HOME/Downloads/$USER-backup.tar.gz" "${HOME_FILES[@]}" >/dev/null 2>&1
else else
echo "[WARNING] Backup already exists... Not overwriting" echo "[WARNING] Backup already exists... Not overwriting"
sleep 2 sleep 2
fi fi
} }
setupConfigs() { setup_configs() {
sudo pacman -S clutter-gtk libgee archlabs-jgmenu --needed --noconfirm sudo pacman -S clutter-gtk libgee archlabs-jgmenu --needed --noconfirm
sudo pacman -S gdk-pixbuf2 pango python-yaml --needed --noconfirm sudo pacman -S gdk-pixbuf2 pango python-yaml --needed --noconfirm
rm -rf ${CFILES[@]} cp -rf "${SKEL_FILES[@]}" "$HOME/"
cp -rf ${SFILES[@]} /etc/skel/.zshrc /etc/skel/.bashrc $HOME/ cp -f /etc/skel/.{bashrc,zshrc} "$HOME/"
}
new_configs() {
clear
printf "\nThis step will get the latest configs for polybar, openbox, i3 etc.
\n\nYour existing configs will be archived to:
\n\t$HOME/Downloads/$USER-backup.tar.gz\n\n\n\nDo you want to continue? [y/N]:"
read -r answer
case "$answer" in
y|yes|Y|YES)
backup_configs
if [[ -e $HOME/Downloads/$USER-backup.tar.gz ]]; then
setup_configs
fi
rm -f "$HOME/.config/keypack"
sed -i '/keypack/d' "$HOME/.config/openbox/autostart"
~/.config/setup
esac
} }
# first setup Keyring
setupKeyring setupKeyring
# make sure skel package is installed and updated
if ! pacman -Q archlabs-user-skel >/dev/null 2>&1; then if ! pacman -Q archlabs-user-skel >/dev/null 2>&1; then
sudo rm -rf ${SFILES[@]} sudo rm -rf "${SKEL_FILES[@]}"
sudo pacman -S archlabs-user-skel --needed --noconfirm sudo pacman -S archlabs-user-skel --needed --noconfirm
else else
sudo pacman -Syyu --noconfirm sudo pacman -Syyu --noconfirm
fi fi
new_configs
clear
printf "\nThis step will get the latest configs for polybar, openbox, i3 etc.
\n\nYour existing configs will be archived to:
\n\t$HOME/Downloads/$USER-backup.tar.gz\n\n\n\nDo you want to continue? [y/N]:"
read -r answer
if [ "${answer,,}" = "${yes,,}" ]; then
backupConfigs
if [ -e "$HOME/Downloads/$USER-backup.tar.gz" ]; then
setupConfigs
fi
rm -f $HOME/.config/keypack
sed -i '/keypack/d' $HOME/.config/openbox/autostart
$HOME/.config/setup
if [[ "$WM" == "i3" ]]; then
i3-msg restart
elif [[ "$WM" == "openbox" ]]; then
al-polybar-session -r
fi
fi
clear clear
echo "########################################################## echo "##########################################################