Browse Source

first draft initial commit

Casey DeLorme 5 năm trước cách đây
commit
e09118a113
65 tập tin đã thay đổi với 2070 bổ sung0 xóa
  1. 3 0
      .gitignore
  2. 24 0
      Vagrantfile
  3. 297 0
      arch.sh
  4. 7 0
      install/etc/X11/xorg.conf.d/00-keyboard.conf
  5. 32 0
      install/etc/iptables/iptables.rules
  6. 6 0
      install/etc/polkit-1/rules.d/00-mount-internal.rules
  7. 50 0
      install/etc/skel/.Xdefaults
  8. 3 0
      install/etc/skel/.bash_logout
  9. 7 0
      install/etc/skel/.bash_profile
  10. 103 0
      install/etc/skel/.bashrc
  11. 64 0
      install/etc/skel/.config/compton.conf
  12. 27 0
      install/etc/skel/.config/conky/conky.conf
  13. 16 0
      install/etc/skel/.config/gtk-3.0/settings.ini
  14. 45 0
      install/etc/skel/.config/libfm/libfm.conf
  15. 36 0
      install/etc/skel/.config/mpv/mpv.conf
  16. 16 0
      install/etc/skel/.config/openbox/autostart
  17. 18 0
      install/etc/skel/.config/openbox/menu.xml
  18. 105 0
      install/etc/skel/.config/openbox/rc.xml
  19. 27 0
      install/etc/skel/.config/pcmanfm/default/pcmanfm.conf
  20. 13 0
      install/etc/skel/.config/sublime-text-3/Packages/User/Default (Linux).sublime-keymap
  21. 6 0
      install/etc/skel/.config/sublime-text-3/Packages/User/GoSublime.sublime-settings
  22. 3 0
      install/etc/skel/.config/sublime-text-3/Packages/User/Markdown.sublime-settings
  23. 3 0
      install/etc/skel/.config/sublime-text-3/Packages/User/MarkdownPreview.sublime-settings
  24. 14 0
      install/etc/skel/.config/sublime-text-3/Packages/User/Preferences.sublime-settings
  25. 4 0
      install/etc/skel/.config/sublime-text-3/Packages/User/default_file_type.sublime-settings
  26. 10 0
      install/etc/skel/.config/systemd/user/ssh-agent.service
  27. 105 0
      install/etc/skel/.config/tint2/tint2rc
  28. 76 0
      install/etc/skel/.config/transmission-daemon/settings.json
  29. 15 0
      install/etc/skel/.config/user-dirs.dirs
  30. 19 0
      install/etc/skel/.config/viewnior/viewnior.conf
  31. 4 0
      install/etc/skel/.config/youtube-dl/config
  32. 17 0
      install/etc/skel/.gitconfig
  33. 3 0
      install/etc/skel/.gitignore
  34. 15 0
      install/etc/skel/.gtkrc-2.0
  35. 2 0
      install/etc/skel/.icons/default/index.theme
  36. 7 0
      install/etc/skel/.ssh/config
  37. 175 0
      install/etc/skel/.vim/colors/vividchalk.vim
  38. 0 0
      install/etc/skel/.vim/doc/.gitignore
  39. 0 0
      install/etc/skel/.vim/undo/.gitignore
  40. 90 0
      install/etc/skel/.vimrc
  41. 2 0
      install/etc/skel/.xinitrc
  42. 46 0
      install/usr/local/bin/disk-maintenance
  43. 59 0
      install/usr/local/bin/ea
  44. 36 0
      install/usr/local/bin/media-tester
  45. 3 0
      install/usr/local/bin/mpv-control
  46. 36 0
      install/usr/local/bin/pash
  47. 16 0
      install/usr/local/bin/pdf2jpg
  48. 9 0
      install/usr/local/bin/screenshot
  49. 3 0
      install/usr/local/bin/screenshot-selection
  50. 7 0
      install/usr/local/bin/system-updates
  51. 7 0
      install/usr/local/bin/transmission-remote-magnet
  52. 10 0
      install/usr/local/bin/urxvtq
  53. 26 0
      install/usr/local/bin/wallpaper
  54. 8 0
      install/usr/share/applications/flash.desktop
  55. 97 0
      install/usr/share/applications/mimeapps.list
  56. 7 0
      install/usr/share/applications/transmission-remote-magnet.desktop
  57. BIN
      install/usr/share/fonts/truetype/jis/epkyouka.ttf
  58. BIN
      install/usr/share/fonts/truetype/jis/formatekonave.ttf
  59. 4 0
      install/usr/share/thumbnailers/asf.thumbnailer
  60. 4 0
      install/usr/share/thumbnailers/psd.thumbnailer
  61. 80 0
      packer.json
  62. 53 0
      readme.md
  63. 14 0
      setup/clean.sh
  64. 67 0
      setup/install.sh
  65. 9 0
      setup/vbox.sh

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+packer_cache/
+dist/
+.vagrant/

+ 24 - 0
Vagrantfile

@@ -0,0 +1,24 @@
+Vagrant.configure("2") do |config|
+	config.vm.box_url = "file://" + File.dirname(__FILE__) + "/dist/arch-desktop.box"
+	config.vm.box = "arch-desktop"
+	config.vm.boot_timeout = 30
+	config.ssh.insert_key = false
+	config.vm.synced_folder '.', '/vagrant', disabled: true
+	config.vm.provider "virtualbox" do |v|
+		v.gui = true
+		v.memory = 2048
+		v.cpus = 2
+		v.customize ["modifyvm", :id, "--firmware", "efi"]
+		v.customize ["modifyvm", :id, "--vram", "128"]
+		v.customize ["modifyvm", :id, "--ioapic", "on"]
+		v.customize ["modifyvm", :id, "--hwvirtex", "on"]
+		v.customize ["modifyvm", :id, "--accelerate3d", "on"]
+		v.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
+		v.customize ["storageattach", :id, "--storagectl", "SATA Controller", "--port", 1, "--device", 0, "--type", "dvddrive", "--medium", "emptydrive"]
+		if RUBY_PLATFORM =~ /darwin/
+			v.customize ["modifyvm", :id, '--audio', 'coreaudio', '--audiocontroller', 'hda']
+		elsif RUBY_PLATFORM =~ /mingw|mswin|bccwin|cygwin|emx/
+			v.customize ["modifyvm", :id, '--audio', 'dsound', '--audiocontroller', 'ac97']
+		end
+	end
+end

+ 297 - 0
arch.sh

@@ -0,0 +1,297 @@
+#!/bin/bash -e
+#
+# Author: Casey DeLorme
+#
+# Description: fully automate installation and config after `arch-chroot`,
+# providing the user with a fully configured desktop environment and many
+# bells and whistles for developers.
+#
+# Dependencies: requires `base` and `base-devel` be installed with `pacstrap`,
+# and runs as root.  Expects `username`, `password`, and `root_password` to be
+# supplied.
+
+# verify supplied variables
+[ -z "$root_password" ] && echo "missing root password..." && exit 1
+[ -z "$username" ] && echo "missing username..." && exit 1
+[ -z "$password" ] && echo "missing password..." && exit 1
+
+# print all that transpires henceforth
+[ -n "$DEBUG" ] && set -x
+
+# initial time configuration
+ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
+hwclock -w --utc
+
+# setup locale
+# @todo: determine how to deal with dual-languages
+sed -i "/^en_US.UTF-8/d" /etc/locale.gen
+# sed -i "/^ja_JP.UTF-8/d" /etc/locale.gen
+echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
+# echo "ja_JP.UTF-8 UTF-8" >> /etc/locale.gen
+locale-gen
+echo "LANG=en_US.UTF-8" > /etc/locale.conf
+
+# setup hostname
+echo "arch" > /etc/hostname
+echo "127.0.0.1 localhost" > /etc/hosts
+echo "::1 localhost" >> /etc/hosts
+echo "127.0.1.1 $(cat /etc/hostname).localdomain $(cat /etc/hostname)" >> /etc/hosts
+
+# set default virtualconsole font
+setfont koi8u_8x16
+echo "FONT=koi8u_8x16" > /etc/vconsole.conf
+
+# enable multilib
+sed -i "/\[multilib\]/,/Include/"'s/^#//' /etc/pacman.conf
+
+# add sublime text source
+curl -O https://download.sublimetext.com/sublimehq-pub.gpg && sudo pacman-key --add sublimehq-pub.gpg && sudo pacman-key --lsign-key 8A8F901A && rm sublimehq-pub.gpg
+echo -e "\n[sublime-text]\nServer = https://download.sublimetext.com/arch/stable/x86_64" | sudo tee -a /etc/pacman.conf
+
+# update and install all packages
+pacman -Syu --noconfirm sudo bash-completion tmux vim linux-firmware linux-headers dkms smartmontools cryptsetup usbutils btrfs-progs gvfs dmidecode parted pkgfile pkgconf bison gcc gcc-libs cmake ccache ncurses xmlstarlet jq at bc cronie iptables rsync net-tools openssh sshfs ntp wget curl wireless_tools bluez bluez-utils lzop unzip p7zip xz unrar unace lrzip arj git mercurial subversion bzr postgresql mesa lib32-mesa dbus polkit xorg-server xorg-server-devel xorg-xinit xorg-xinit xorg-xdpyinfo xdotool xsel pulseaudio vulkan-tools arandr feh hsetroot openbox openbox-themes obmenu archlinux-xdg-menu compton xarchiver pavucontrol pasystray xdg-utils xdg-user-dirs tint2 conky pcmanfm gmrun rxvt-unicode urxvt-perls gnome-themes-extra gnome-icon-theme arc-gtk-theme gtk-engines gtk-engine-murrine lxappearance graphicsmagick imagemagick lame libwebp libid3tag libvorbis vorbis-tools faac x264 x265 libexif ffmpeg ffmpegthumbnailer tumbler joyutils evtest lm_sensors lshw gparted psensor gparted hardinfo fontconfig ttf-bitstream-vera ttf-droid ttf-dejavu ttf-freefont ttf-liberation ttf-hanazono mpv openshot gimp krita transmission-cli evince viewnior virtualbox-host-modules-arch virtualbox vagrant guvcview dia mednafen mame ppsspp lutris steam wine sublime-text
+
+# enable ccache and optimize cores for AUR
+sed -i 's/!ccache/ccache/' /etc/makepkg.conf
+sed -i 's/^#MAKEFLAGS.*/MAKEFLAGS="-j$(($(nproc) + 1)) -l$(nproc)"/' /etc/makepkg.conf
+
+# install CPU unicode based on model
+[ $(grep -c "Intel" /proc/cpuinfo) -gt 0 ] && pacman -Syu --noconfirm intel-ucode
+[ $(grep -c "AMD" /proc/cpuinfo) -gt 0 ] && pacman -Syu --noconfirm amd-ucode
+
+# install nvidia related packages
+if [ $(lspci | grep -i " vga" | grep -ci " nvidia") -gt 0 ]; then
+	pacman -Syu --noconfirm nvidia-dkms libglvnd nvidia-utils opencl-nvidia lib32-libglvnd lib32-nvidia-utils lib32-opencl-nvidia nvidia-settings
+
+	# update modules to load
+	[ $(grep -c "nvidia" /etc/mkinitcpio.conf) -eq 0 ] && sed -i 's/MODULES=(\(.*\))/MODULES=(\1 nvidia nvidia_modeset nvidia_uvm nvidia_drm)/' /etc/mkinitcpio.conf
+
+	# automatic updates in pacman.d
+	echo -e "[Trigger]\nOperation=Install\nOperation=Upgrade\nOperation=Remove\nType=Package\nTarget=nvidia\n\n[Action]\nDepends=mkinitcpio\nWhen=PostTransaction\nExec=/usr/bin/mkinitcpio -P" > /etc/pacman.d/hooks/nvidia.hook
+fi
+
+# install AMD/Radeon related packages
+if [ $(lspci | grep -i "vga" | grep -ci "amd") -gt 0 ]; then
+	pacman -Syu --noconfirm xf86-video-amdgpu vulkan-radeon lib32-vulkan-radeon libva-mesa-driver lib32-libva-mesa-driver
+
+	# update modules to load
+	[ $(grep -c "amd" /etc/mkinitcpio.conf) -eq 0 ] && sed -i 's/MODULES=(\(.*\))/MODULES=(\1 amdgpu radeon)/' /etc/mkinitcpio.conf
+fi
+
+# temporarily create a user to install aur packages
+export aur_username=$(head /dev/urandom | tr -dc a-z | head -c 13 ; echo '')
+useradd -r -m -s /bin/bash $aur_username
+echo "${aur_username} ALL= NOPASSWD: /usr/bin/pacman" > /etc/sudoers.d/${aur_username}
+
+# install xcursor-chameleon-skyblue
+sudo -u $aur_username git clone https://aur.archlinux.org/xcursor-chameleon-skyblue.git /home/${aur_username}/xcursor-chameleon-skyblue
+(cd /home/${aur_username}/xcursor-chameleon-skyblue && sudo -u ${aur_username} makepkg -rcsi --noconfirm)
+
+# install numix-icon-theme
+sudo -u $aur_username git clone https://aur.archlinux.org/numix-icon-theme-git.git /home/${aur_username}/numix-icon-theme-git
+(cd /home/${aur_username}/numix-icon-theme-git && sudo -u ${aur_username} makepkg -rcsi --noconfirm)
+
+# install kazam
+sudo -u $aur_username git clone https://aur.archlinux.org/kazam.git /home/${aur_username}/kazam
+(cd /home/${aur_username}/kazam && sudo -u ${aur_username} makepkg -rcsi --noconfirm)
+
+# install google-chrome (google-chrome-stable)
+sudo -u $aur_username git clone https://aur.archlinux.org/google-chrome.git /home/${aur_username}/google-chrome
+(cd /home/${aur_username}/google-chrome && sudo -u ${aur_username} makepkg -rcsi --noconfirm)
+
+# install libc++; a dependency of discord; has broken pgp and tests?
+sudo -u $aur_username git clone https://aur.archlinux.org/libc++.git /home/${aur_username}/libc++
+(cd /home/${aur_username}/libc++ && sudo -u ${aur_username} makepkg -rcsi --noconfirm --skippgpcheck --nocheck)
+
+# install discord; ignore tests to save time
+sudo -u $aur_username git clone https://aur.archlinux.org/discord.git /home/${aur_username}/discord
+(cd /home/${aur_username}/discord && sudo -u ${aur_username} makepkg --nocheck -rcsi --noconfirm)
+
+# install laptop packages and optimize system configuration
+export chassistype=$(dmidecode --string chassis-type)
+if [[ "$chassistype" = "Laptop" || "$chassistype" = "Portable" || "$chassistype" = "Sub Notebook" ]]; then
+	pacman -Syu --noconfirm xf86-input-synaptics connman
+
+	sudo -u $aur_username git clone https://aur.archlinux.org/laptop-mode-tools.git /home/${aur_username}/laptop-mode-tools
+	(cd /home/${aur_username}/laptop-mode-tools && sudo -u ${aur_username} makepkg -rcsi --noconfirm)
+
+	# @todo: configuration of laptop-mode-tools
+	# @link: https://wiki.archlinux.org/index.php/Laptop_Mode_Tools
+fi
+
+# cleanup temporary aur user
+rm -rf /etc/sudoers.d/${aur_username}
+userdel -fr $aur_username
+unset $aur_username
+
+# install youtube-dl
+if ! which youtube-dl &> /dev/null; then
+	curl -Lfs https://yt-dl.org/latest/youtube-dl > /usr/local/bin/youtube-dl
+	chmod a+rx /usr/local/bin/youtube-dl
+fi
+
+# install gifduration
+if ! which gifduration &> /dev/null; then
+	curl -Lfs https://raw.githubusercontent.com/alimony/gifduration-script/master/gifduration.py > /usr/local/bin/gifduration
+	chmod a+rx /usr/local/bin/gifduration
+fi
+
+# install prime95
+if ! which mprime &> /dev/null; then
+	curl -Lfs "http://www.mersenne.org/ftp_root/gimps/p95v294b8.linux64.tar.gz" > /tmp/prime.tar.gz
+	mkdir -p /usr/local/src/prime/
+	tar -xf /tmp/prime.tar.gz -C /usr/local/src/prime
+	ln -sf /usr/local/src/prime/mprime /usr/local/bin/
+fi
+
+# install packer
+if ! which packer &> /dev/null; then
+	curl -Lfs "https://releases.hashicorp.com/packer/1.3.5/packer_1.3.5_linux_amd64.zip" > /tmp/packer.zip
+	unzip /tmp/packer.zip -d /usr/local/bin/
+fi
+
+# install 64bit flash projector
+if ! which flashplayer &> /dev/null; then
+	curl -Lfs "https://fpdownload.macromedia.com/pub/flashplayer/updaters/32/flash_player_sa_linux.x86_64.tar.gz" > /tmp/flash.tar.gz
+	tar -xf /tmp/flash.tar.gz -C /usr/local/bin flashplayer
+fi
+
+# install urxvt perl enhancement for font resize support
+[ ! -f /usr/lib/urxvt/perl/font ] && curl -Lfs "https://raw.githubusercontent.com/noah/urxvt-font/master/font" > /usr/lib/urxvt/perl/font
+
+# create sudo group and add to sudoers
+groupadd -fr sudo
+[ ! -f /etc/sudoers.d/sudo ] && echo '%sudo ALL=(ALL) ALL' > /etc/sudoers.d/sudo
+
+# install base configuration files from repository
+[ -d /srv/arch-desktop/install ] || git clone https://git.caseydelorme.com/cdelorme/arch-desktop /srv/arch-desktop
+rsync -Pav /srv/arch-desktop/install/ /
+ln -sf .Xdefaults /etc/skel/.Xresources
+mkdir -p /etc/skel/.config/pulse
+sed "/module-suspend-on-idle/d" /etc/pulse/default.pa > /etc/skel/.config/pulse/default.pa
+rsync -Pav /etc/skel/ $(getent passwd root | cut -d: -f6)/
+
+# update font cache
+fc-cache -fr
+
+# secure ssh by disabling root access and only accepting ssh keys
+sed -i "/^#\?PermitRootLogin/d" /etc/ssh/sshd_config
+sed -i "/^#\?PasswordAuthentication/d" /etc/ssh/sshd_config
+sed -i "/^#\?X11Forwarding/d" /etc/ssh/sshd_config
+echo "PermitRootLogin no" >> /etc/ssh/sshd_config
+echo "PasswordAuthentication no" >> /etc/ssh/sshd_config
+echo "X11Forwarding yes" >> /etc/ssh/sshd_config
+
+# set root password
+printf "${root_password}\n${root_password}\n" | passwd
+
+# after 4 bad logins lock an account for 10 minutes; or one minute for root
+sed -i -re 's/^(auth\s*required\s*pam_tally2.so).*/\1 deny=4 even_deny_root unlock_time=600 root_unlock_time=60 onerr=fail file=\/var\/log\/tallylog/g' /etc/pam.d/system-login
+
+# initialize postgres database
+su - postgres -c "initdb --locale en_US.UTF-8 -D '/var/lib/postgres/data'"
+
+# create configuration to fix transmission errors
+echo "net.core.rmem_max = 4194304" > /etc/sysctl.d/transmission.conf
+echo "net.core.wmem_max = 1048576" >> /etc/sysctl.d/transmission.conf
+
+# check whether username and password are not empty
+if [[ -n "$username" && -n "$password" ]]; then
+
+	# create user if not exists, else (re)-install dot-files
+	if ! id $username &> /dev/null; then
+		useradd -m -s /bin/bash $username
+		echo "${username}:${password}" | chpasswd -c SHA256
+	else
+		[ $EUID -ne 0 ] && rsync -Pav /etc/skel/ $(getent passwd $username | cut -d: -f6)/
+	fi
+
+	# add user to standard groups
+	usermod -aG users,sudo,adm,input,audio,video,disk,storage,lp,vboxusers $username
+
+	# generate postgres user and user database
+	systemctl start postgresql
+	su postgres -c "cd && createuser -ds $username" 2> /dev/null && su $username -c "cd && createdb"
+
+	# configure home directories
+	su $username -c "cd && mkdir -p ~/{desktop,downloads,templates,public,documents,music,pictures,videos,git}"
+	su $username -c 'cd && xdg-user-dirs-update --set DESKTOP $HOME/desktop'
+	su $username -c 'cd && xdg-user-dirs-update --set DOWNLOAD $HOME/downloads'
+	su $username -c 'cd && xdg-user-dirs-update --set TEMPLATES $HOME/templates'
+	su $username -c 'cd && xdg-user-dirs-update --set PUBLICSHARE $HOME/public'
+	su $username -c 'cd && xdg-user-dirs-update --set DOCUMENTS $HOME/documents'
+	su $username -c 'cd && xdg-user-dirs-update --set MUSIC $HOME/music'
+	su $username -c 'cd && xdg-user-dirs-update --set PICTURES $HOME/pictures'
+	su $username -c 'cd && xdg-user-dirs-update --set VIDEOS $HOME/videos'
+	su $username -c 'cd && xdg-user-dirs-update'
+	update-desktop-database
+
+	# generate default (passwordless) ed25519 ssh key if none exists
+	su $username -c "cd; if [ ! -f ~/.ssh/id_ed25519 ]; then ssh-keygen -q -t ed25519 -N '' -f ~/.ssh/id_ed25519 && cd && chmod 600 ~/.ssh/id_ed25519 && chmod 600 ~/.ssh/id_ed25519.pub; fi"
+
+	# @note: during arch installation systemd will ignore chroot start for user
+	# so we have to take the manual route of generating the target symlink.
+	su $username -c 'cd; mkdir $HOME/.config/systemd/user/default.target.wants; ln -fs $HOME/.config/systemd/user/ssh-agent.service $HOME/.config/systemd/user/default.target.wants/ssh-agent.service'
+
+	# install gvm loading from ~/.bash_profile, and the latest go version
+	su $username -c "if [ ! -d ~/.gvm ]; then GVM_NO_UPDATE_PROFILE=1 bash < <(curl -Ls https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer 2> /dev/null); fi"
+	su $username -c 'grep "gvm" ~/.bash_profile &> /dev/null || echo -e "\n# load gvm\n! which gvm &> /dev/null && . ~/.gvm/scripts/gvm" >> ~/.bash_profile'
+	su $username -c ". ~/.gvm/scripts/gvm && gvm install go1.12 -B && gvm use go1.12 --default"
+
+	# setup user-space transmission
+	if [ ! -f "/etc/systemd/system/transmission.service.d/local.conf" ]; then
+		su $username -c "cd && mkdir -p ~/transmission/{done,incomplete}"
+		su $username -c 'cd && tmp=$(mktemp) && jq ".[\"download-dir\"] = \"${HOME}/transmission/done\"" $HOME/.config/transmission-daemon/settings.json | jq ".[\"incomplete-dir\"] = \"${HOME}/transmission/incomplete\"" | jq ".[\"watch-dir\"] = \"$(xdg-user-dir DOWNLOAD)\"" > $tmp && mv $tmp $HOME/.config/transmission-daemon/settings.json'
+		mkdir -p /etc/systemd/system/transmission.service.d
+		echo "[Service]" > "/etc/systemd/system/transmission.service.d/local.conf"
+		echo "User=${username}" >> "/etc/systemd/system/transmission.service.d/local.conf"
+		systemctl daemon-reload
+	fi
+fi
+
+# symlink shceduled maintenance tasks
+ln -sf /usr/local/bin/system-updates /etc/cron.daily/
+ln -sf /usr/local/bin/disk-maintenance /etc/cron.weekly/
+
+# symlink override vi to vim
+ln -sf /usr/bin/vim /usr/local/bin/vi
+
+# load iptables for security
+# @note: if during this the kernel was upgraded this may fail
+systemctl start iptables
+
+# enable services for next reboot
+systemctl enable iptables
+systemctl enable sshd
+systemctl enable bluetooth
+systemctl enable transmission
+systemctl enable postgresql
+systemctl enable cronie
+
+# extract active network device and if wired enable it so it works on reboot
+export active_network_device=$(ip addr | awk '/state UP/ {print $2}' | sed 's/.$//')
+[ ! -f "/sys/class/net/${active_network_device}/wireless" ] && systemctl enable dhcpcd@${active_network_device}
+
+# build the init module
+mkinitcpio -p linux
+
+# install the bootloader
+bootctl install
+
+# create boot loader entry
+echo "title arch" > /boot/loader/entries/arch.conf
+echo "linux vmlinuz-linux" >> /boot/loader/entries/arch.conf
+[ -f /boot/intel-ucode.img ] && echo "initrd /intel-ucode.img" >> /boot/loader/entries/arch.conf
+[ -f /boot/amd-ucode.img ] && echo "initrd /amd-ucode.img" >> /boot/loader/entries/arch.conf
+echo "initrd /initramfs-linux.img" >> /boot/loader/entries/arch.conf
+echo "options root=PARTUUID=$(blkid -s PARTUUID -o value /dev/sda3) rw" >> /boot/loader/entries/arch.conf
+[[ $(lspci | grep -i " vga" | grep -ci " nvidia") -gt 0 && $(grep -c "nvidia" /boot/loader/entires/arch.conf) -eq 0 ]] && sed -i 's/rw/rw nvidia-dkm.modeset=1/' /boot/loader/entires/arch.conf
+
+# set boot loader entry as default
+sed -i '/^default/d' /boot/loader/loader.conf
+echo "default arch" >> /boot/loader/loader.conf
+
+# check boot loader configuration
+bootctl status
+
+echo "instalation complete, please exit, umount -R /mnt, and reboot..."

+ 7 - 0
install/etc/X11/xorg.conf.d/00-keyboard.conf

@@ -0,0 +1,7 @@
+
+# disable caps lock
+Section "InputClass"
+    Identifier "system-keyboard"
+    MatchIsKeyboard "on"
+    Option "XkbOptions" "ctrl:nocaps"
+EndSection

+ 32 - 0
install/etc/iptables/iptables.rules

@@ -0,0 +1,32 @@
+*filter
+
+# accept established connections
+-A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
+
+# accept local traffic
+-A INPUT -i lo -j ACCEPT
+-A OUTPUT -o lo -j ACCEPT
+
+# accept ping
+-A INPUT -p icmp -m icmp --icmp-type 8 -m conntrack --ctstate NEW -j ACCEPT
+
+# accept ssh with rate limiting
+-N LOGREJECTSSH
+-A LOGREJECTSSH -j LOG --log-prefix "iptables deny: " --log-level 7
+-A LOGREJECTSSH -j REJECT
+-A INPUT -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW -m recent --set --name SSH --rsource
+-A INPUT -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW -m recent --update --seconds 60 --hitcount 4 --name SSH --rttl --rsource -j LOGREJECTSSH
+-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
+
+# drop invalid
+-A INPUT -m conntrack --ctstate INVALID -j DROP
+
+# reject all others (linux compliant blacklist)
+-A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable
+-A INPUT -p tcp -j REJECT --reject-with tcp-rst
+-A INPUT -j REJECT --reject-with icmp-proto-unreachable
+
+# drop forwards
+-A FORWARD -j DROP
+
+COMMIT

+ 6 - 0
install/etc/polkit-1/rules.d/00-mount-internal.rules

@@ -0,0 +1,6 @@
+polkit.addRule(function(action, subject) {
+	if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" && subject.local && subject.active && subject.isInGroup("storage")))
+	{
+		return polkit.Result.YES;
+	}
+});

+ 50 - 0
install/etc/skel/.Xdefaults

@@ -0,0 +1,50 @@
+Xft.dpi:                    96
+Xft.antialias:              true
+Xft.rgba:                   rgb
+Xft.hinting:                true
+Xft.hintstyle:              hintslight
+URxvt.depth:                32
+URxvt.geometry:             80x24
+URxvt*background:           [70]#001E27
+URxvt.fading:               0
+URxvt.loginShell:           true
+URxvt.internalBorder:       3
+URxvt.lineSpace:            0
+URxvt.scrollStyle:          rxvt
+URxvt.scrollBar:            false
+URxvt.cursorBlink:          true
+URxvt.cursorColor:          #657b83
+URxvt.cursorUnderline:      false
+URxvt.pointerBlank:         true
+URxvt*font:                 xft:ForMateKonaVe:pixelsize=14
+URxvt*letterSpace:          -1
+URxvt.perl-ext-common:      default,matcher,font,selection-to-clipboard
+URxvt.clipboard.pastecmd:   clipit -c
+URxvt.keysym.C-equal:       perl:font:increment
+URxvt.keysym.C-minus:       perl:font:decrement
+URxvt.matcher.button:       1
+URxvt.urlLauncher:          google-chrome-stable
+URxvt.inputMethod:          ibus
+URxvt.preeditType:          OverTheSpot
+*background:                #001E27
+*foreground:                #9CC2C3
+*fadeColor:                 #002832
+*cursorColor:               #F34F00
+*pointerColorBackground:    #003747
+*pointerColorForeground:    #9CC2C3
+*color0:                    #002831
+*color1:                    #D11C24
+*color2:                    #6CBE6C
+*color3:                    #A57706
+*color4:                    #2176C7
+*color5:                    #C61C6F
+*color6:                    #259286
+*color7:                    #EAE3CB
+*color8:                    #006488
+*color9:                    #F5163B
+*color10:                   #51EF84
+*color11:                   #B27E28
+*color12:                   #178EC8
+*color13:                   #E24D8E
+*color14:                   #00B39E
+*color15:                   #FCF4DC

+ 3 - 0
install/etc/skel/.bash_logout

@@ -0,0 +1,3 @@
+#!/bin/bash
+# clear on exit
+/usr/bin/clear

+ 7 - 0
install/etc/skel/.bash_profile

@@ -0,0 +1,7 @@
+#!/bin/bash
+
+# add local bin to path
+export PATH=/usr/local/bin:$PATH
+
+# if bashrc exists and the terminal has stdin load it
+[ -f ~/.bashrc ] && test -t 0 && . ~/.bashrc

+ 103 - 0
install/etc/skel/.bashrc

@@ -0,0 +1,103 @@
+#!/bin/bash
+
+# set language, editor, augment history behavior, enable dynamic resize, and show ~/Library
+export LANG=en_US.UTF-8
+export LANGUAGE=en_US.UTF-8
+export EDITOR=vim
+export HISTFILE=~/.bash_history
+export HISTCONTROL=ignoreboth:erasedups
+shopt -s histappend
+shopt -s checkwinsize
+
+# add aliases with optimized settings
+alias ls='ls -vhFA --color=auto'
+alias grep='grep --color=auto'
+alias ..='cd ..'
+alias ...='cd ../..'
+alias sshfs='sshfs -o cache=yes,compression=yes,large_read,kernel_cache'
+
+# define pretty man pages colors
+man() {
+	env \
+		LESS_TERMCAP_md=$'\e[1;36m' \
+		LESS_TERMCAP_me=$'\e[0m' \
+		LESS_TERMCAP_se=$'\e[0m' \
+		LESS_TERMCAP_so=$'\e[1;40;92m' \
+		LESS_TERMCAP_ue=$'\e[0m' \
+		LESS_TERMCAP_us=$'\e[1;32m' \
+			man "$@"
+}
+
+# colors for enhanced prompt
+c_bold="\033[1m"
+c_red="\033[31m"
+c_green="\033[32m"
+c_blue="\033[34m"
+c_purple="\033[35m"
+c_cyan="\033[36m"
+c_sgr0="\033[0m"
+
+# promptify is an updated prompt enhancement enabled by default
+promptify() {
+	local prompt_string
+	prompt_string="${c_blue}${0} ($(date +'%R:%S.%3N'):${timer_show}s) ${c_purple}$(whoami)${c_sgr0}@${c_green}$(hostname) ${c_bold}${c_blue}$(dirs)${c_sgr0}"
+	if git rev-parse --git-dir &> /dev/null; then
+		git_branch=$(git branch 2> /dev/null | sed -n 's/^\*[ ]*//p')
+		git_stats=$(git status --porcelain --untracked-files=all 2> /dev/null)
+		if [ $(echo "${git_stats}" | sed '/^\s*$/d' | wc -l) -gt 0 ]; then
+			prompt_string="${prompt_string} [${c_red}${git_branch}${c_sgr0}"
+			untracked_count=$(echo "${git_stats}" | grep -ce "^??")
+			new_file_count=$(echo "${git_stats}" | grep -ce "^A ")
+			renamed_count=$(echo "${git_stats}" | grep -ce "^R ")
+			modified_staged_count=$(echo "${git_stats}" | grep -ce "^M ")
+			modified_unstaged_count=$(echo "${git_stats}" | grep -ce "^ M")
+			deleted_staged_count=$(echo "${git_stats}" | grep -ce "^D ")
+			deleted_unstaged_count=$(echo "${git_stats}" | grep -ce "^ D")
+			[ $(($untracked_count + $new_file_count + $renamed_count + $modified_staged_count + $modified_unstaged_count + $deleted_staged_count + $deleted_unstaged_count)) -gt 0 ] && prompt_string="${prompt_string}:"
+			[ $untracked_count -gt 0 ] && prompt_string="${prompt_string} ${c_red}u${untracked_count}${c_sgr0}"
+			[ $new_file_count -gt 0 ] && prompt_string="${prompt_string} ${c_green}a${new_file_count}${c_sgr0}"
+			[ $renamed_count -gt 0 ] && prompt_string="${prompt_string} ${c_green}r${renamed_count}${c_sgr0}"
+			[ $modified_unstaged_count -gt 0 ] || [ $modified_staged_count -gt 0 ] && prompt_string="${prompt_string} ${c_red}m${c_sgr0}"
+			[ $modified_unstaged_count -gt 0 ] && prompt_string="${prompt_string}${c_red}${modified_unstaged_count}${c_sgr0}" && [ $modified_staged_count -gt 0 ] && prompt_string="${prompt_string}/"
+			[ $modified_staged_count -gt 0 ] && prompt_string="${prompt_string}${c_green}${modified_staged_count}${c_sgr0}"
+			[ $deleted_unstaged_count -gt 0 ] || [ $deleted_staged_count -gt 0 ] && prompt_string="${prompt_string} ${c_red}d${c_sgr0}"
+			[ $deleted_unstaged_count -gt 0 ] && prompt_string="${prompt_string}${c_red}${deleted_unstaged_count}${c_sgr0}" && [ $deleted_staged_count -gt 0 ] && prompt_string="${prompt_string}/"
+			[ $deleted_staged_count -gt 0 ] && prompt_string="${prompt_string}${c_green}${deleted_staged_count}${c_sgr0}"
+			prompt_string="${prompt_string}]"
+		else
+			prompt_string="${prompt_string} [${c_green}${git_branch}${c_sgr0}]"
+		fi
+	fi
+	echo -ne "\n${prompt_string}\n "
+}
+
+# time every command
+timer_start() {
+	timer=${timer:-$SECONDS}
+}
+timer_stop() {
+	timer_show=$(($SECONDS - $timer))
+	unset timer
+}
+trap 'timer_start' DEBUG
+
+# apply prompt enhancements
+PS2='continue-> '
+PS1='$(promptify)'
+if [ -z "$PROMPT_COMMAND" ]; then
+	PROMPT_COMMAND="timer_stop"
+else
+	PROMPT_COMMAND="$PROMPT_COMMAND; timer_stop"
+fi
+
+# load bash auto-completion and command-not-found
+. /usr/share/bash-completion/bash_completion
+. /usr/share/doc/pkgfile/command-not-found.bash
+
+# explicitly set and append to XDG_DATA_DIRS
+[ -z "$XDG_DATA_DIRS" ] && export XDG_DATA_DIRS="/usr/share:/usr/local/share"
+export XDG_DATA_DIRS="$XDG_DATA_DIRS:$HOME/.local/share"
+
+# use shared agent to load ssh-keys; expects systemd to manage agent
+export SSH_AUTH_SOCK=~/.ssh/socket
+ssh-add -l &> /dev/null || ssh-add

+ 64 - 0
install/etc/skel/.config/compton.conf

@@ -0,0 +1,64 @@
+
+# lean renderer
+backend = "xrender";
+
+# vsync optimizations
+sw-opti = true;
+unredir-if-possible = true;
+
+# shadow optimizations
+shadow = true;
+dock = { shadow = false; };
+dnd = { shadow = false; };
+shadow-ignore-shaped = false;
+shadow-radius = 4;
+shadow-offset-x = -5;
+shadow-offset-y = -3;
+shadow-opacity = 0.5;
+shadow-exclude-reg = "x28+0-0"; # block shadows from overlapping the taskbar at the bottom of the screen
+shadow-exclude = [
+	"! name~=''",
+	"name = 'Notification'",
+	"name *= 'compton'",
+	"name *= 'mpv'",
+	"class_g = 'conky'"
+];
+
+# menu optimizations
+popup_menu = { opacity = 1; };
+dropdown_menu = { opacity = 1; };
+inactive-opacity = 1;
+active-opacity = 1;
+frame-opacity = 1;
+inactive-opacity-override = false;
+
+# avoid blur
+blur-background-fixed = false;
+blur-background-exclude = [
+	"window_type = 'dock'",
+	"window_type = 'desktop'"
+];
+
+# fading disabled for responsive desktop
+fading = false;
+
+# window manager optimizations
+mark-wmwin-focused = true;
+mark-overdir-focused = true;
+use-ewmh-active-win = true;
+
+# window detection optimizations
+detect-rounded-corners = true;
+detect-transient = true;
+detect-client-opacity = true;
+detect-client-leader = true;
+
+# other behaviors
+wintypes = {
+    tooltip = {
+        fade = true;
+        shadow = false;
+        focus = true;
+    }
+};
+

+ 27 - 0
install/etc/skel/.config/conky/conky.conf

@@ -0,0 +1,27 @@
+conky.config = {
+    background = true,
+    update_interval = 2.0,
+    cpu_avg_samples = 5,
+    net_avg_samples = 5,
+    diskio_avg_samples = 5,
+    alignment = 'tm',
+    gap_y = 0,
+    gap_x = 0,
+    use_xft = true,
+    xftalpha = 0.8,
+    font = 'ForMateKonaVe:size=9',
+    uppercase = false,
+    override_utf8_locale = true,
+    default_color = '6CBE6C',
+    own_window = true,
+    own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
+    own_window_transparent = false,
+    own_window_argb_visual = true,
+    own_window_argb_value = 80,
+    double_buffer = true,
+}
+
+conky.text = [[
+${exec ip addr show | grep -v "127.0.0." | grep -v "169.254." | grep -o 'inet [0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+' | grep -o [0-9].*}    ${exec date +'%F %H:%M:%S'} (${uptime})    cpu (${cpu cpu0}%) ${cpubar cpu0 8,120}    ${mem}/${memmax} (${memperc}%) ${membar 5,120}    / (${fs_used_perc /}%) ${fs_bar 5,120 /}
+]]
+

+ 16 - 0
install/etc/skel/.config/gtk-3.0/settings.ini

@@ -0,0 +1,16 @@
+[Settings]
+gtk-theme-name=Arc-Dark
+gtk-icon-theme-name=Numix
+gtk-font-name=ForMateKonaVe 10
+gtk-cursor-theme-name=Chameleon-SkyBlue-Regular
+gtk-cursor-theme-size=0
+gtk-toolbar-style=GTK_TOOLBAR_BOTH
+gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
+gtk-button-images=1
+gtk-menu-images=1
+gtk-enable-event-sounds=0
+gtk-enable-input-feedback-sounds=0
+gtk-xft-antialias=1
+gtk-xft-hinting=1
+gtk-xft-hintstyle=hintslight
+gtk-xft-rgba=rgb

+ 45 - 0
install/etc/skel/.config/libfm/libfm.conf

@@ -0,0 +1,45 @@
+# Configuration file for the libfm version 1.3.1.
+# Autogenerated file, don't edit, your changes will be overwritten.
+
+[config]
+single_click=0
+use_trash=0
+confirm_del=1
+confirm_trash=1
+advanced_mode=0
+si_unit=0
+force_startup_notify=0
+backup_as_hidden=0
+no_usb_trash=1
+no_child_non_expandable=0
+show_full_names=1
+only_user_templates=0
+template_run_app=0
+template_type_once=0
+auto_selection_delay=600
+drop_default_action=auto
+defer_content_test=0
+quick_exec=1
+terminal=urxvt %s
+archiver=xarchiver
+thumbnail_local=0
+thumbnail_max=32768
+smart_desktop_autodrop=1
+
+[ui]
+big_icon_size=48
+small_icon_size=24
+pane_icon_size=24
+thumbnail_size=256
+show_thumbnail=1
+shadow_hidden=1
+
+[places]
+places_home=1
+places_desktop=0
+places_root=1
+places_computer=0
+places_trash=0
+places_applications=0
+places_network=1
+places_unmounted=1

+ 36 - 0
install/etc/skel/.config/mpv/mpv.conf

@@ -0,0 +1,36 @@
+
+# video driver
+profile=opengl-hq
+
+# default scale and image rendering
+scale=ewa_lanczossharp
+cscale=ewa_lanczossoft
+dscale=mitchell
+dither-depth=auto
+deband=yes
+hwdec=auto
+
+# subtitles and language
+alang=jpn,jp,ja,eng,en
+slang=eng,en,enUS,*
+
+# always display a gui with OSC
+player-operation-mode=pseudo-gui
+osc=yes
+
+# example of using credentials for stream
+# mpv --ytdl-raw-options="username=username,password=password" "url"
+
+# extensions
+[extension.webm]
+loop-file=inf
+
+[extension.gif]
+loop-file=inf
+
+[extension.png]
+pause
+
+[extension.jpg]
+pause
+

+ 16 - 0
install/etc/skel/.config/openbox/autostart

@@ -0,0 +1,16 @@
+#!/bin/sh
+(xset r rate 250 25; xset b off; xset m 7 5)
+(xset s 0 0; xset s noexpose; xset s noblank; xset s off; xset -dpms)
+xrdb -merge "$HOME/.Xresources"
+(update-desktop-database)
+(xdg-user-dirs-update)
+(compton) &
+
+# give the desktop time to launch
+(
+	sleep 3;
+	hsetroot -solid "#001E27" &
+	tint2 &
+	wallpaper &
+	conky -d -q &
+) &

+ 18 - 0
install/etc/skel/.config/openbox/menu.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openbox_menu xmlns="http://openbox.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://openbox.org/ file:///usr/share/openbox/menu.xsd">
+	<menu id="root-menu" label="Openbox 3">
+		<item label="web"><action name="Execute"><execute>google-chrome-stable</execute></action></item>
+		<item label="editor"><action name="Execute"><execute>subl</execute></action></item>
+		<item label="cli"><action name="Execute"><execute>urxvt</execute></action></item>
+		<item label="files"><action name="Execute"><execute>pcmanfm</execute></action></item>
+		<separator />
+		<menu id="applications" label="Applications" execute="xdg_menu --format openbox3-pipe --root-menu /etc/xdg/menus/arch-applications.menu" />
+		<separator />
+		<menu id="client-list-menu" />
+		<separator />
+		<item label="reload"><action name="Reconfigure" /></item>
+		<item label="logout"><action name="Exit"><prompt>no</prompt></action></item>
+		<item label='reboot'><action name='Execute'><command>systemctl reboot -i</command></action></item>
+		<item label='shutdown'><action name='Execute'><command>systemctl poweroff -i</command></action></item>
+	</menu>
+</openbox_menu>

+ 105 - 0
install/etc/skel/.config/openbox/rc.xml

@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
+	<resistance><strength>15</strength><screen_edge_strength>40</screen_edge_strength></resistance>
+	<focus><focusNew>yes</focusNew><followMouse>no</followMouse></focus>
+	<placement><policy>Smart</policy><center>yes</center><monitor>Active</monitor><primaryMonitor>Active</primaryMonitor></placement>
+	<desktops><number>3</number><firstdesk>1</firstdesk><popupTime>1000</popupTime></desktops>
+	<resize><drawContents>yes</drawContents><popupShow>Nonpixel</popupShow><popupPosition>Center</popupPosition></resize>
+	<menu><file>menu.xml</file><hideDelay>200</hideDelay><middle>no</middle><submenuShowDelay>100</submenuShowDelay><submenuHideDelay>400</submenuHideDelay><applicationIcons>yes</applicationIcons><manageDesktops>no</manageDesktops></menu>
+	<margins><top>0</top><bottom>0</bottom><left>0</left><right>0</right></margins>
+	<dock><position>TopLeft</position><floatingX>0</floatingX><floatingY>0</floatingY><noStrut>no</noStrut><stacking>Above</stacking><direction>Vertical</direction><autoHide>no</autoHide><hideDelay>300</hideDelay><showDelay>300</showDelay><moveButton>Middle</moveButton></dock>
+	<theme>
+		<name>Onyx-Citrus</name>
+		<titleLayout>NLIMC</titleLayout>
+		<keepBorder>no</keepBorder>
+		<animateIconify>yes</animateIconify>
+		<font place="ActiveWindow"><name>ForMateKonaVe</name><size>8</size><weight>bold</weight><slant>normal</slant></font>
+		<font place="InactiveWindow"><name>ForMateKonaVe</name><size>8</size><weight>bold</weight><slant>normal</slant></font>
+		<font place="MenuHeader"><name>ForMateKonaVe</name><size>9</size><weight>normal</weight><slant>normal</slant></font>
+		<font place="MenuItem"><name>ForMateKonaVe</name><size>9</size><weight>normal</weight><slant>normal</slant></font>
+		<font place="ActiveOnScreenDisplay"><name>ForMateKonaVe</name><size>9</size><weight>bold</weight><slant>normal</slant></font>
+		<font place="InactiveOnScreenDisplay"><name>ForMateKonaVe</name><size>9</size><weight>bold</weight><slant>normal</slant></font>
+	</theme>
+	<keyboard>
+		<keybind key="A-F4"><action name="Close"/></keybind>
+		<keybind key="W-Down"><action name="Iconify"/></keybind>
+		<keybind key="W-Tab"><action name="ShowMenu"><menu>root-menu</menu></action></keybind>
+		<keybind key="A-space"><action name="ShowMenu"><menu>client-menu</menu></action></keybind>
+		<keybind key="A-Escape"><action name="Lower"/><action name="FocusToBottom"/><action name="Unfocus"/></keybind>
+		<keybind key="A-Tab"><action name="NextWindow"><finalactions><action name="Focus"/><action name="Raise"/><action name="Unshade"/></finalactions></action></keybind>
+		<keybind key="A-S-Tab"><action name="PreviousWindow"><finalactions><action name="Focus"/><action name="Raise"/><action name="Unshade"/></finalactions></action></keybind>
+		<keybind key="W-Up"><action name="ToggleMaximizeFull"/></keybind>
+		<keybind key="W-C-Up"><action name="ToggleMaximizeFull"/></keybind>
+		<keybind key="W-Right"><action name="MoveResizeTo"><monitor>next</monitor></action></keybind>
+		<keybind key="W-Left"><action name="MoveResizeTo"><monitor>prev</monitor></action></keybind>
+		<keybind key="W-C-Right"><action name="Unmaximize"/><action name="MoveResizeTo"><width>50%</width><height>100%</height><x>-0</x><y>0</y><monitor>current</monitor></action></keybind>
+		<keybind key="W-C-Left"><action name="Unmaximize"/><action name="MoveResizeTo"><width>50%</width><height>100%</height><x>0</x><y>0</y><monitor>current</monitor></action></keybind>
+		<keybind key="C-A-Right"><action name="GoToDesktop"><to>right</to><wrap>no</wrap></action></keybind>
+		<keybind key="C-A-Left"><action name="GoToDesktop"><to>left</to><wrap>no</wrap></action></keybind>
+		<keybind key="S-A-Right"><action name="SendToDesktop"><to>right</to><wrap>no</wrap></action></keybind>
+		<keybind key="S-A-Left"><action name="SendToDesktop"><to>left</to><wrap>no</wrap></action></keybind>
+		<keybind key="XF86AudioRaiseVolume"><action name="Execute"><command>pash increase</command></action></keybind>
+		<keybind key="XF86AudioLowerVolume"><action name="Execute"><command>pash decrease</command></action></keybind>
+		<keybind key="XF86AudioMute"><action name="Execute"><command>pash mute</command></action></keybind>
+        <keybind key="XF86AudioPlay"><action name="Execute"><command>mpv-control p</command></action></keybind>
+        <keybind key="XF86AudioPrev"><action name="Execute"><command>mpv-control less</command></action></keybind>
+        <keybind key="XF86AudioNext"><action name="Execute"><command>mpv-control greater</command></action></keybind>
+		<keybind key="W-S-3"><action name="Execute"><command>screenshot</command></action></keybind>
+		<keybind key="W-S-4"><action name="Execute"><command>screenshot-selection</command></action></keybind>
+		<keybind key="W-grave"><action name="Execute"><execute>urxvtq</execute></action></keybind>
+		<keybind key="W-space"><action name="Execute"><command>gmrun</command></action></keybind>
+		<keybind key="A-F2"><action name="Execute"><command>gmrun</command></action></keybind>
+		<keybind key="W-w"><action name="Execute"><command>google-chrome-stable</command></action></keybind>
+		<keybind key="W-t"><action name="Execute"><command>urxvt</command></action></keybind>
+		<keybind key="W-e"><action name="Execute"><command>subl</command></action></keybind>
+		<keybind key="W-b"><action name="Execute"><command>pcmanfm</command></action></keybind>
+		<keybind key="W-x"><action name="Exit"><prompt>no</prompt></action></keybind>
+	</keyboard>
+	<mouse>
+		<dragThreshold>5</dragThreshold>
+		<doubleClickTime>200</doubleClickTime>
+		<screenEdgeWarpTime>400</screenEdgeWarpTime>
+		<context name="Root Desktop">
+			<mousebind button="Right" action="Press"><action name="ShowMenu"><menu>root-menu</menu></action></mousebind>
+		</context>
+		<context name="Client">
+			<mousebind button="Left" action="Press"><action name="Focus"/><action name="Raise"/></mousebind>
+			<mousebind button="Middle" action="Press"><action name="Focus"/><action name="Raise"/></mousebind>
+			<mousebind button="Right" action="Press"><action name="Focus"/><action name="Raise"/></mousebind>
+		</context>
+		<context name="Titlebar">
+			<mousebind button="Left" action="Drag"><action name="Move"/></mousebind>
+			<mousebind button="Left" action="DoubleClick"><action name="ToggleMaximize"/></mousebind>
+			<mousebind button="Right" action="Press"><action name="Focus"/><action name="Raise"/><action name="ShowMenu"><menu>client-menu</menu></action></mousebind>
+		</context>
+		<context name="Top Left Right Bottom TRCorner BRCorner TLCorner BLCorner">
+			<mousebind button="Left" action="Press"><action name="Focus"/><action name="Raise"/><action name="Unshade"/></mousebind>
+			<mousebind button="Left" action="Drag"><action name="Resize"/></mousebind>
+		</context>
+		<context name="Icon">
+			<mousebind button="Left" action="Press"><action name="Focus"/><action name="Raise"/><action name="ShowMenu"><menu>client-menu</menu></action></mousebind>
+			<mousebind button="Right" action="Press"><action name="Focus"/><action name="Raise"/><action name="ShowMenu"><menu>client-menu</menu></action></mousebind>
+		</context>
+		<context name="Iconify">
+			<mousebind button="Left" action="Click"><action name="Iconify"/></mousebind>
+		</context>
+		<context name="Maximize">
+			<mousebind button="Left" action="Click"><action name="ToggleMaximize"/></mousebind>
+		</context>
+		<context name="Close">
+			<mousebind button="Left" action="Press"><action name="Focus"/><action name="Raise"/></mousebind>
+			<mousebind button="Left" action="Click"><action name="Close"/></mousebind>
+		</context>
+		<context name="AllDesktops">
+			<mousebind button="Left" action="Press"><action name="Focus"/><action name="Raise"/><action name="Unshade"/></mousebind>
+			<mousebind button="Left" action="Click"><action name="ToggleOmnipresent"/></mousebind>
+		</context>
+		<context name="Shade">
+			<mousebind button="Left" action="Press"><action name="Focus"/><action name="Raise"/></mousebind>
+			<mousebind button="Left" action="Click"><action name="ToggleShade"/></mousebind>
+		</context>
+	</mouse>
+	<applications>
+		<application name="urxvtq"><decor>no</decor><position force="yes"><x>center</x><y>0</y></position><desktop>all</desktop><layer>above</layer><skip_pager>yes</skip_pager><skip_taskbar>yes</skip_taskbar><maximized>Horizontal</maximized></application>
+	</applications>
+</openbox_config>

+ 27 - 0
install/etc/skel/.config/pcmanfm/default/pcmanfm.conf

@@ -0,0 +1,27 @@
+[config]
+bm_open_method=0
+
+[volume]
+mount_on_startup=1
+mount_removable=1
+autorun=0
+
+[ui]
+always_show_tabs=0
+max_tab_chars=32
+win_width=640
+win_height=480
+maximized=1
+splitter_pos=150
+media_in_new_tab=0
+desktop_folder_new_win=0
+change_tab_on_drop=1
+close_on_unmount=0
+focus_previous=1
+side_pane_mode=places
+view_mode=thumbnail
+show_hidden=0
+sort=name;ascending;
+toolbar=newtab;navigation;home;
+show_statusbar=1
+pathbar_mode_buttons=0

+ 13 - 0
install/etc/skel/.config/sublime-text-3/Packages/User/Default (Linux).sublime-keymap

@@ -0,0 +1,13 @@
+[
+    { "keys": ["ctrl+tab"], "command": "next_view" },
+    { "keys": ["ctrl+shift+tab"], "command": "prev_view" },
+
+    // tmux hotkeys for origami
+	{ "keys": ["ctrl+b", "\""], "command": "create_pane", "args": {"direction": "down", "give_focus": true} },
+	{ "keys": ["ctrl+b", "%"], "command": "create_pane", "args": {"direction": "right", "give_focus": true} },
+	{ "keys": ["ctrl+b", "x"], "command": "destroy_pane", "args": {"direction": "self"} },
+	{ "keys": ["ctrl+b", "up"], "command": "travel_to_pane", "args": {"direction": "up"} },
+	{ "keys": ["ctrl+b", "right"], "command": "travel_to_pane", "args": {"direction": "right"} },
+	{ "keys": ["ctrl+b", "down"], "command": "travel_to_pane", "args": {"direction": "down"} },
+	{ "keys": ["ctrl+b", "left"], "command": "travel_to_pane", "args": {"direction": "left"} }
+]

+ 6 - 0
install/etc/skel/.config/sublime-text-3/Packages/User/GoSublime.sublime-settings

@@ -0,0 +1,6 @@
+{
+	"env": {
+		"GOPATH": "$GOPATH",
+		"GOROOT": "$GOROOT"
+	}
+}

+ 3 - 0
install/etc/skel/.config/sublime-text-3/Packages/User/Markdown.sublime-settings

@@ -0,0 +1,3 @@
+{
+  "spell_check": true
+}

+ 3 - 0
install/etc/skel/.config/sublime-text-3/Packages/User/MarkdownPreview.sublime-settings

@@ -0,0 +1,3 @@
+{
+    "build_action": "browser"
+}

+ 14 - 0
install/etc/skel/.config/sublime-text-3/Packages/User/Preferences.sublime-settings

@@ -0,0 +1,14 @@
+{
+	"auto_complete_commit_on_tab": true,
+	"caret_style": "phase",
+	"color_scheme": "Packages/Color Scheme - Default/Sunburst.tmTheme",
+	"font_face": "ForMateKonaVe",
+	"font_size": 14,
+	"highlight_line": true,
+	"highlight_modified_tabs": true,
+	"match_brackets_angle": true,
+	"scroll_past_end": true,
+	"scroll_speed": 2.0,
+	"show_encoding": true,
+	"trim_trailing_white_space_on_save": true
+}

+ 4 - 0
install/etc/skel/.config/sublime-text-3/Packages/User/default_file_type.sublime-settings

@@ -0,0 +1,4 @@
+{
+    "default_new_file_syntax": "Packages/Markdown/Markdown.tmLanguage",
+    "use_current_file_syntax": false
+}

+ 10 - 0
install/etc/skel/.config/systemd/user/ssh-agent.service

@@ -0,0 +1,10 @@
+[Unit]
+Description=SSH key agent
+
+[Service]
+Type=simple
+Environment=SSH_AUTH_SOCK=%h/.ssh/socket
+ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
+
+[Install]
+WantedBy=default.target

+ 105 - 0
install/etc/skel/.config/tint2/tint2rc

@@ -0,0 +1,105 @@
+
+# background & border
+
+rounded = 11
+border_width = 1
+background_color = #000000 80
+border_color = #ffffff 20
+
+rounded = 6
+border_width = 0
+background_color = #ffffff 20
+border_color = #ffffff 20
+
+
+# panel
+
+panel_items = LTSC
+panel_monitor = all
+panel_position = bottom center
+panel_size = 85% 28
+panel_margin = 4 2
+panel_padding = 0 0 2
+font_shadow = 0
+panel_background_id = 0
+
+
+# launchbar
+
+launcher_padding = 4 2 3
+launcher_background_id = 1
+launcher_icon_theme = gnome
+launcher_icon_size = 16
+launcher_item_app = /usr/share/applications/urxvt.desktop
+launcher_item_app = /usr/share/applications/sublime_text.desktop
+launcher_item_app = /usr/share/applications/google-chrome.desktop
+launcher_item_app = /usr/share/applications/pcmanfm.desktop
+
+
+# taskbar
+
+taskbar_mode = single_desktop
+taskbar_padding = 4 4 2
+taskbar_background_id = 1
+
+
+# tasks
+
+task_icon = 1
+task_text = 1
+task_maximum_size = 100 26
+task_centered = 1
+task_padding = 1 1
+task_font = ForMateKonaVe 7
+task_font_color = #ffffff 70
+task_active_font_color = #ffffff 85
+task_background_id = 3
+task_active_background_id = 2
+
+
+# mouse actions on tasks
+
+mouse_middle = maximize_restore
+mouse_right = none
+mouse_scroll_up = toggle
+mouse_scroll_down = iconify
+
+
+# systray
+
+systray = 1
+systray_padding = 4 2 3
+systray_background_id = 1
+systray_icon_size = 16
+
+
+# battery
+
+battery = 0
+battery_low_status = 7
+battery_low_cmd = zenity --warning --title="Battery" --text="Low power, please plug into the nearest outlet."
+bat1_font = ForMateKonaVe bold 8
+bat2_font = ForMateKonaVe 7
+battery_font_color = #ffffff 70
+battery_padding = 4 16
+battery_background_id = 1
+
+
+# clock
+
+time1_format = %T
+time1_font = ForMateKonaVe bold 8
+time2_format = %a. %Y/%m/%d
+time2_font = ForMateKonaVe 6
+clock_font_color = #ffffff 76
+clock_padding = 4 4
+clock_background_id = 1
+
+
+# autohide options
+
+autohide = 0
+autohide_show_timeout = 0.3
+autohide_hide_timeout = 2
+autohide_height = 2
+strut_policy = follow_size

+ 76 - 0
install/etc/skel/.config/transmission-daemon/settings.json

@@ -0,0 +1,76 @@
+{
+    "alt-speed-down": 50,
+    "alt-speed-enabled": false,
+    "alt-speed-time-begin": 540,
+    "alt-speed-time-day": 127,
+    "alt-speed-time-enabled": false,
+    "alt-speed-time-end": 1020,
+    "alt-speed-up": 50,
+    "bind-address-ipv4": "0.0.0.0",
+    "bind-address-ipv6": "::",
+    "blocklist-enabled": false,
+    "blocklist-url": "http://www.example.com/blocklist",
+    "cache-size-mb": 16,
+    "dht-enabled": true,
+    "download-dir": "",
+    "download-limit": 100,
+    "download-limit-enabled": 0,
+    "download-queue-enabled": false,
+    "download-queue-size": 5,
+    "encryption": 2,
+    "idle-seeding-limit": 300,
+    "idle-seeding-limit-enabled": true,
+    "incomplete-dir": "",
+    "incomplete-dir-enabled": true,
+    "lazy-bitfield-enabled": true,
+    "lpd-enabled": false,
+    "max-peers-global": 200,
+    "message-level": 1,
+    "peer-congestion-algorithm": "",
+    "peer-id-ttl-hours": 2,
+    "peer-limit-global": 640,
+    "peer-limit-per-torrent": 32,
+    "peer-port": 51413,
+    "peer-port-random-high": 65535,
+    "peer-port-random-low": 49152,
+    "peer-port-random-on-start": false,
+    "peer-socket-tos": "default",
+    "pex-enabled": true,
+    "port-forwarding-enabled": true,
+    "preallocation": 1,
+    "prefetch-enabled": true,
+    "queue-stalled-enabled": true,
+    "queue-stalled-minutes": 30,
+    "ratio-limit": 2,
+    "ratio-limit-enabled": true,
+    "rename-partial-files": true,
+    "rpc-authentication-required": false,
+    "rpc-bind-address": "0.0.0.0",
+    "rpc-enabled": true,
+    "rpc-host-whitelist": "",
+    "rpc-host-whitelist-enabled": true,
+    "rpc-password": "{16b97fb0b2939a6c688f03ef622882724f0c8f03/w4VKd96",
+    "rpc-port": 9091,
+    "rpc-url": "/bt/",
+    "rpc-username": "",
+    "rpc-whitelist": "*",
+    "rpc-whitelist-enabled": false,
+    "scrape-paused-torrents-enabled": true,
+    "script-torrent-done-enabled": false,
+    "script-torrent-done-filename": "",
+    "seed-queue-enabled": false,
+    "seed-queue-size": 10,
+    "speed-limit-down": 3000,
+    "speed-limit-down-enabled": true,
+    "speed-limit-up": 80,
+    "speed-limit-up-enabled": true,
+    "start-added-torrents": true,
+    "trash-original-torrent-files": true,
+    "umask": 2,
+    "upload-limit": 100,
+    "upload-limit-enabled": 0,
+    "upload-slots-per-torrent": 14,
+    "utp-enabled": true,
+    "watch-dir": "",
+    "watch-dir-enabled": true
+}

+ 15 - 0
install/etc/skel/.config/user-dirs.dirs

@@ -0,0 +1,15 @@
+# This file is written by xdg-user-dirs-update
+# If you want to change or add directories, just edit the line you're
+# interested in. All local changes will be retained on the next run.
+# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
+# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
+# absolute path. No other format is supported.
+# 
+XDG_DESKTOP_DIR="$HOME/desktop"
+XDG_DOWNLOAD_DIR="$HOME/downloads"
+XDG_TEMPLATES_DIR="$HOME/templates"
+XDG_PUBLICSHARE_DIR="$HOME/public"
+XDG_DOCUMENTS_DIR="$HOME/documents"
+XDG_MUSIC_DIR="$HOME/music"
+XDG_PICTURES_DIR="$HOME/pictures"
+XDG_VIDEOS_DIR="$HOME/videos"

+ 19 - 0
install/etc/skel/.config/viewnior/viewnior.conf

@@ -0,0 +1,19 @@
+[prefs]
+zoom-mode=0
+fit-on-fullscreen=true
+show-hidden=false
+smooth-images=true
+confirm-delete=true
+reload-on-save=false
+show-menu-bar=false
+show-toolbar=true
+show-scrollbar=true
+start-maximized=true
+slideshow-timeout=5
+auto-resize=false
+behavior-wheel=1
+behavior-click=0
+behavior-modify=0
+jpeg-quality=90
+png-compression=9
+desktop=9

+ 4 - 0
install/etc/skel/.config/youtube-dl/config

@@ -0,0 +1,4 @@
+# set sane defaults to ensure video and audio work always
+
+-f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'
+--audio-format=mp3

+ 17 - 0
install/etc/skel/.gitconfig

@@ -0,0 +1,17 @@
+[core]
+	editor = vim
+	excludesfile = ~/.gitignore
+[help]
+	autocorrect = 1
+[color]
+	ui = true
+[push]
+	default = simple
+[alias]
+	a = add
+	s = status -suall
+	c = commit
+	st = stash -u
+	sa = stash apply
+	l = !git log --graph --pretty=format:'%C(yellow)%h%Creset -%C(bold red)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
+	pp = !git pull && git push

+ 3 - 0
install/etc/skel/.gitignore

@@ -0,0 +1,3 @@
+# mac osx hidden files
+.DS_Store
+

+ 15 - 0
install/etc/skel/.gtkrc-2.0

@@ -0,0 +1,15 @@
+gtk-theme-name = "Arc-Dark"
+gtk-icon-theme-name = "Numix"
+gtk-font-name = "ForMateKonaVe 10"
+gtk-cursor-theme-name = "Chameleon-SkyBlue-Regular"
+gtk-cursor-theme-size = 0
+gtk-toolbar-style = GTK_TOOLBAR_BOTH
+gtk-toolbar-icon-size = GTK_ICON_SIZE_LARGE_TOOLBAR
+gtk-button-images = 1
+gtk-menu-images = 1
+gtk-enable-event-sounds = 0
+gtk-enable-input-feedback-sounds = 0
+gtk-xft-antialias = 1
+gtk-xft-hinting = 1
+gtk-xft-hintstyle = "hintslight"
+gtk-xft-rgba = "rgb"

+ 2 - 0
install/etc/skel/.icons/default/index.theme

@@ -0,0 +1,2 @@
+[icon theme]
+Inherits=Chameleon-SkyBlue-Regular

+ 7 - 0
install/etc/skel/.ssh/config

@@ -0,0 +1,7 @@
+Host *
+	ControlMaster auto
+	ControlPath ~/.ssh/%r@%h:%p
+	CompressionLevel 9
+	ControlPersist 2h
+	ServerAliveInterval 60
+	ForwardAgent yes

+ 175 - 0
install/etc/skel/.vim/colors/vividchalk.vim

@@ -0,0 +1,175 @@
+" Vim color scheme
+" Name:         vividchalk.vim
+" Author:       Tim Pope <vimNOSPAM@tpope.info>
+" Version:      2.0
+" GetLatestVimScripts: 1891 1 :AutoInstall: vividchalk.vim
+
+" Based on the Vibrank Ink theme for TextMate
+" Distributable under the same terms as Vim itself (see :help license)
+
+if has("gui_running")
+    set background=dark
+endif
+hi clear
+if exists("syntax_on")
+   syntax reset
+endif
+
+let colors_name = "vividchalk"
+
+" First two functions adapted from inkpot.vim
+
+" map a urxvt cube number to an xterm-256 cube number
+fun! s:M(a)
+    return strpart("0245", a:a, 1) + 0
+endfun
+
+" map a urxvt colour to an xterm-256 colour
+fun! s:X(a)
+    if &t_Co == 88
+        return a:a
+    else
+        if a:a == 8
+            return 237
+        elseif a:a < 16
+            return a:a
+        elseif a:a > 79
+            return 232 + (3 * (a:a - 80))
+        else
+            let l:b = a:a - 16
+            let l:x = l:b % 4
+            let l:y = (l:b / 4) % 4
+            let l:z = (l:b / 16)
+            return 16 + s:M(l:x) + (6 * s:M(l:y)) + (36 * s:M(l:z))
+        endif
+    endif
+endfun
+
+function! s:choose(mediocre,good)
+    if &t_Co != 88 && &t_Co != 256
+        return a:mediocre
+    else
+        return s:X(a:good)
+    endif
+endfunction
+
+function! s:hifg(group,guifg,first,second,...)
+    if a:0 && &t_Co == 256
+        let ctermfg = a:1
+    else
+        let ctermfg = s:choose(a:first,a:second)
+    endif
+    exe "highlight ".a:group." guifg=".a:guifg." ctermfg=".ctermfg
+endfunction
+
+function! s:hibg(group,guibg,first,second)
+    let ctermbg = s:choose(a:first,a:second)
+    exe "highlight ".a:group." guibg=".a:guibg." ctermbg=".ctermbg
+endfunction
+
+hi link rubyDefine          Keyword
+hi link rubySymbol          Constant
+hi link rubyEval            rubyMethod
+hi link rubyException       rubyMethod
+hi link rubyInclude         rubyMethod
+hi link rubyMacro           rubyMethod
+hi link rubyStringDelimiter rubyString
+hi link rubyRegexp          Regexp
+hi link rubyRegexpDelimiter rubyRegexp
+
+hi link javascriptRegexpString  Regexp
+
+hi link diffAdded               String
+hi link diffRemoved             Statement
+hi link diffLine                PreProc
+hi link diffSubname             Comment
+
+call s:hifg("Normal","#EEEEEE","White",87)
+if &background == "light" || has("gui_running")
+    hi Normal guibg=Black ctermbg=Black
+else
+    hi Normal guibg=Black ctermbg=NONE
+endif
+highlight StatusLine    guifg=Black   guibg=#aabbee gui=bold ctermfg=Black ctermbg=White  cterm=bold
+highlight StatusLineNC  guifg=#444444 guibg=#aaaaaa gui=none ctermfg=Black ctermbg=Grey   cterm=none
+"if &t_Co == 256
+    "highlight StatusLine ctermbg=117
+"else
+    "highlight StatusLine ctermbg=43
+"endif
+
+highlight Ignore        ctermfg=Black
+highlight WildMenu      guifg=Black   guibg=#ffff00 gui=bold ctermfg=Black ctermbg=Yellow cterm=bold
+highlight Cursor        guifg=Black guibg=White ctermfg=Black ctermbg=White
+call s:hibg("ColorColumn","#333333","DarkGrey",81)
+call s:hibg("CursorLine","#333333","DarkGrey",81)
+call s:hibg("CursorColumn","#333333","DarkGrey",81)
+highlight NonText       guifg=#404040 ctermfg=8
+highlight SpecialKey    guifg=#404040 ctermfg=8
+highlight Directory     none
+high link Directory     Identifier
+highlight ErrorMsg      guibg=Red ctermbg=DarkRed guifg=NONE ctermfg=NONE
+highlight Search        guifg=NONE ctermfg=NONE gui=none cterm=none
+call s:hibg("Search"    ,"#555555","DarkBlue",81)
+highlight IncSearch     guifg=White guibg=Black ctermfg=White ctermbg=Black
+highlight MoreMsg       guifg=#00AA00 ctermfg=Green
+highlight LineNr        guifg=#DDEEFF ctermfg=White
+call s:hibg("LineNr"    ,"#222222","DarkBlue",80)
+highlight Question      none
+high link Question      MoreMsg
+highlight Title         guifg=Magenta ctermfg=Magenta
+highlight VisualNOS     gui=none cterm=none
+call s:hibg("Visual"    ,"#555577","LightBlue",83)
+call s:hibg("VisualNOS" ,"#444444","DarkBlue",81)
+call s:hibg("MatchParen","#1100AA","DarkBlue",18)
+highlight WarningMsg    guifg=Red ctermfg=Red
+highlight Error         ctermbg=DarkRed
+highlight SpellBad      ctermbg=DarkRed
+" FIXME: Comments
+highlight SpellRare     ctermbg=DarkMagenta
+highlight SpellCap      ctermbg=DarkBlue
+highlight SpellLocal    ctermbg=DarkCyan
+
+call s:hibg("Folded"    ,"#110077","DarkBlue",17)
+call s:hifg("Folded"    ,"#aaddee","LightCyan",63)
+highlight FoldColumn    none
+high link FoldColumn    Folded
+highlight DiffAdd       ctermbg=4 guibg=DarkBlue
+highlight DiffChange    ctermbg=5 guibg=DarkMagenta
+highlight DiffDelete    ctermfg=12 ctermbg=6 gui=bold guifg=Blue guibg=DarkCyan
+highlight DiffText      ctermbg=DarkRed
+highlight DiffText      cterm=bold ctermbg=9 gui=bold guibg=Red
+
+highlight Pmenu         guifg=White ctermfg=White gui=bold cterm=bold
+highlight PmenuSel      guifg=White ctermfg=White gui=bold cterm=bold
+call s:hibg("Pmenu"     ,"#000099","Blue",18)
+call s:hibg("PmenuSel"  ,"#5555ff","DarkCyan",39)
+highlight PmenuSbar     guibg=Grey ctermbg=Grey
+highlight PmenuThumb    guibg=White ctermbg=White
+highlight TabLine       gui=underline cterm=underline
+call s:hifg("TabLine"   ,"#bbbbbb","LightGrey",85)
+call s:hibg("TabLine"   ,"#333333","DarkGrey",80)
+highlight TabLineSel    guifg=White guibg=Black ctermfg=White ctermbg=Black
+highlight TabLineFill   gui=underline cterm=underline
+call s:hifg("TabLineFill","#bbbbbb","LightGrey",85)
+call s:hibg("TabLineFill","#808080","Grey",83)
+
+hi Type gui=none
+hi Statement gui=none
+if !has("gui_mac")
+    " Mac GUI degrades italics to ugly underlining.
+    hi Comment gui=italic
+endif
+hi Identifier cterm=none
+" Commented numbers at the end are *old* 256 color values
+call s:hifg("Comment"        ,"#9933CC","DarkMagenta",34) " 92
+" 26 instead?
+call s:hifg("Constant"       ,"#339999","DarkCyan",21) " 30
+call s:hifg("String"         ,"#66FF00","LightGreen",44,82) " 82
+call s:hifg("Identifier"     ,"#FFCC00","Yellow",72) " 220
+call s:hifg("Statement"      ,"#FF6600","Brown",68) " 202
+call s:hifg("PreProc"        ,"#AAFFFF","LightCyan",47) " 213
+call s:hifg("Type"           ,"#AAAA77","Grey",57) " 101
+call s:hifg("Special"        ,"#33AA00","DarkGreen",24) " 7
+call s:hifg("Regexp"         ,"#44B4CC","DarkCyan",21) " 74
+call s:hifg("rubyMethod"     ,"#DDE93D","Yellow",77) " 191

+ 0 - 0
install/etc/skel/.vim/doc/.gitignore


+ 0 - 0
install/etc/skel/.vim/undo/.gitignore


+ 90 - 0
install/etc/skel/.vimrc

@@ -0,0 +1,90 @@
+
+" default state
+set nocompatible
+set modelines=0 enc=utf-8 ffs=unix
+set ts=4 sw=4 sts=4 shiftround
+set autoindent smartindent
+set showmode showcmd laststatus=2
+set hidden nowrap number ruler cursorline
+set ignorecase smartcase hlsearch incsearch showmatch scrolloff=3
+set backspace=indent,eol,start
+set ttyfast lazyredraw vb
+set wildmenu wildmode=list:longest
+set foldmethod=syntax foldlevelstart=20
+set nobackup noswapfile
+silent! set undodir=$HOME/.vim/undo undolevels=1000 undoreload=10000 undofile
+
+" set color scheme
+set background=dark
+silent! colorscheme vividchalk
+
+" set leader-key to comma
+let mapleader=","
+
+" clear search
+nnoremap <leader><space> :noh<cr>
+
+" remap inconvenient keys
+inoremap <f1> <esc>
+nnoremap <f1> <esc>
+vnoremap <f1> <esc>
+
+" shortcut ; to : for less keys
+nnoremap ; :
+
+" toggle paste mode with F2
+set pastetoggle=<leader>p
+
+" quickly edit/reload the vimrc file (,ev or ,sv)
+nmap <silent> <leader>ev :e $MYVIMRC<cr>
+nmap <silent> <leader>sv :so $MYVIMRC<cr>
+
+" shortcut to force permissions
+cmap w!! w !sudo tee > /dev/null %
+
+" disable noise makers
+set noeb vb t_vb=
+
+" auto syntax highlighting and fold-settings
+filetype on
+syntax on
+filetype indent on
+filetype plugin on
+set foldmethod=syntax
+
+" define highlight for bad formatting
+highlight BadWhitespace ctermbg=red guibg=red
+
+" define au-group to prevent stacking execution
+augroup cureall
+	" clear group
+	au!
+
+	" add markdown file recognition
+	au BufRead,BufNewFile *.{md,mdown,mkd,mkdn,markdown,mdwn} set filetype=markdown
+
+	" missing syntax recognition
+	au BufRead,BufNewFile *.py match BadWhitespace /*\t\*/
+	au BufRead,BufNewFile *.py match BadWhitespace /\s\+$/
+
+	" remove trailing whitespace automatically on save
+	au BufWritePre * :%s/\s\+$//e
+
+	" remove windows carriage returns automatically
+	au BufWritePre * :%s/\r//e
+augroup END
+
+" tab autocompletion
+function! Tab_Or_Complete()
+	if col('.')>1 && strpart( getline('.'), col('.')-2, 3 ) =~ '^\w'
+		return "\<c-n>"
+	else
+		return "\<tab>"
+	endif
+endfunction
+inoremap <tab> <c-r>=Tab_Or_Complete()<cr>
+set dictionary="/usr/share/dict/words"
+
+" load plugins
+silent! set runtimepath^=$HOME/.vim/bundle/ctrlp.vim
+silent! :helptags $HOME/.vim/doc

+ 2 - 0
install/etc/skel/.xinitrc

@@ -0,0 +1,2 @@
+[ -f ~/.screenlayout/default.sh ] && . ~/.screenlayout/default.sh
+exec openbox-session

+ 46 - 0
install/usr/local/bin/disk-maintenance

@@ -0,0 +1,46 @@
+#!/bin/bash
+
+# search and destroy garbage files in root
+find / -type f -iname "thumbs.db" -exec rm {} \; &
+find / -type f -iname ".ds_store" -exec rm {} \; &
+find / -type f -name '._*' -exec rm -rf {} \; &
+
+# functions for asynchronous operations
+cleanup_ext4() {
+	fstrim "$1"
+	e4defrag "$1"
+}
+
+cleanup_btrfs() {
+	fstrim "$1"
+
+	btrfs balance start -dusage=1 "$1"
+	btrfs balance start -musage=1 "$1"
+	btrfs balance start -dusage=5 "$1"
+	btrfs balance start -musage=5 "$1"
+	btrfs balance start -dusage=10 "$1"
+	btrfs balance start -musage=10 "$1"
+	btrfs balance start -dusage=25 "$1"
+	btrfs balance start -musage=25 "$1"
+	btrfs balance start -dusage=50 "$1"
+	btrfs balance start -musage=50 "$1"
+
+	btrfs scrub start -qdB "$1"
+
+	btrfs filesystem defragment -rfclzo "$1"
+}
+
+# defragment and fstrim ext4 weekly
+for filesystem in $(mount -t ext4 | awk '{print $3}'); do
+	cleanup_ext4 "$filesystem" &
+done
+
+# defragment and rebalance btrfs weekly
+for filesystem in $(mount -t btrfs | awk '{print $3}'); do
+	cleanup_btrfs "$filesystem" &
+done
+
+# wait for jobs to complete
+for j in $(jobs -p); do
+	wait $j
+done

+ 59 - 0
install/usr/local/bin/ea

@@ -0,0 +1,59 @@
+#!/bin/bash
+# a command line utility intended to simplify bulk decompression
+# by automating a pool sized by the processor of parallel operations
+# each of which creates a folder, decompresses, and if successful
+# removes the compressed file, finally checking each directory and
+# pulling out single items to avoid redundant parent directories.
+
+# execute extraction
+extract_locally() {
+	local extension="${1##*.}"
+
+	[ -d "$1" ] && return # skip/ignore directories
+	! [[ "$extension" =~ (7z|zip|rar) ]] && return # ignore unsupported types
+
+	# handle each case independently
+	local name="${1%.*}"
+	mkdir -p "$name"
+	case "$extension" in
+		zip)
+			if ! unzip -o "$1" -d "$name"; then
+				return
+			fi
+			;;
+		rar)
+			if ! unrar x -o+ -idp "$1" "$name"; then
+				return
+			fi
+			;;
+		7z)
+			if ! 7za x -aoa -bd "$1" -o"$name"; then
+				return
+			fi
+			;;
+	esac
+
+	# cleanup
+	rm "$1"
+
+	# @todo: fix redundant parent folders
+	if [ $(find "$name" -mindepth 1 -maxdepth 1 | wc -l) -eq 1 ]; then
+		mv "$name" "${name}.tmp"
+		mv "${name}.tmp"/* .
+		rmdir "${name}.tmp"
+	fi
+}
+
+# capture all files in directory
+shopt -s nullglob
+export files=(*)
+
+# execute up to nproc parallel extractions
+for file in "${files[@]}"; do
+	while ! [ $(jobs -p | wc -l) -lt $(nproc) ]; do sleep 1; done # this should wait for available threads
+	extract_locally "$file" &
+done
+
+# notify the process is complete
+wait
+echo "done"

+ 36 - 0
install/usr/local/bin/media-tester

@@ -0,0 +1,36 @@
+#!/bin/bash
+
+# A tool to scan the current directory for supported media files
+# and to verify whether any of them are corrupt using ffmpeg or
+# imagemagick accordingly, and bash >= 4.0 syntax.
+
+# Define an image scanner
+graphics=("gif" "bmp" "jpg" "png" "jpeg" "ico")
+scan_image() {
+	for t in ${graphics[*]}; do
+		if [ "${1##*.}" = "$t" ]; then
+			echo "scanning $1"
+			local o=$(gm identify "$1")
+			[ $? -eq 0 ] && echo "$o"
+		fi
+	done
+}
+
+# Define a video scanner
+av=("mkv" "mp3" "rm" "rmvp" "mp4" "m4v" "avi" "wmv" "flv" "mov" "mpg" "mpeg" "ogg" "ogm" "webm" "xvid" "wpl")
+scan_video() {
+	for t in ${av[*]}; do
+		if [ "${1##*.}" = "$t" ]; then
+			echo "scanning $1"
+			local o=$(ffmpeg -v error -i "$1" -f null - 2>&1)
+			[ $? -ne 0 ] && [ -n "$o" ] && echo "$o"
+		fi
+	done
+}
+
+# Recursively send all files and their extensions to defined scanners
+find "$PWD" -type f -print0 | while IFS= read -r -d $'\0' f; do
+	scan_image "$f"
+	scan_video "$f"
+done
+echo "scan complete"

+ 3 - 0
install/usr/local/bin/mpv-control

@@ -0,0 +1,3 @@
+#!/bin/bash
+win=$(xdotool search --class mpv)
+[ -n "$1" ] && [ -n "$win" ] && xdotool key --window "$win" $1

+ 36 - 0
install/usr/local/bin/pash

@@ -0,0 +1,36 @@
+#!/bin/bash
+
+# define functions to assist with operations
+pash_increase() {
+	echo "increasing volume on all active sinks..."
+	local sinks=$(pactl list short sinks | grep "RUNNING\|IDLE" | awk '{print $1}')
+	echo "$sinks" | while IFS= read -r sink ; do pactl set-sink-volume $sink +5%; done
+}
+
+pash_decrease() {
+	echo "decreasing volume on all active sinks..."
+	local sinks=$(pactl list short sinks | grep "RUNNING\|IDLE" | awk '{print $1}')
+	echo "$sinks" | while IFS= read -r sink ; do pactl set-sink-volume $sink -5%; done
+}
+
+pash_mute() {
+	echo "toggling mute on all active sinks..."
+	local sinks=$(pactl list short sinks | grep "RUNNING\|IDLE" | awk '{print $1}')
+	echo "$sinks" | while IFS= read -r sink ; do pactl set-sink-mute $sink toggle; done
+}
+
+# select operation from list
+case $1 in
+	increase)
+		pash_increase
+		;;
+	decrease)
+		pash_decrease
+		;;
+	mute)
+		pash_mute
+		;;
+	*)
+		echo "unknown command ${1}..."
+		;;
+esac

+ 16 - 0
install/usr/local/bin/pdf2jpg

@@ -0,0 +1,16 @@
+#!/bin/bash -eu
+# uses graphics magick to extract images from a pdf
+
+if ! which gm &>/dev/null; then
+	echo "requires gm convert..." && exit 1
+elif [ -z "${1:-}" ] || [ ! -f "$1" ]; then
+	echo "No file supplied..." && exit 1
+fi
+
+out="$(dirname "$1")"
+if [ -n "${2:-}" ] && [[ ! -f "$2" || -d "$2" ]]; then
+	out="$2"
+	mkdir -p "$out" &>/dev/null || true
+fi
+
+gm convert -density 300 "$1" +adjoin -quality 100 ${out}/%d.jpg

+ 9 - 0
install/usr/local/bin/screenshot

@@ -0,0 +1,9 @@
+#!/bin/bash
+[ -d $(xdg-user-dir PICTURES)/screenshots ] || mkdir -p $(xdg-user-dir PICTURES)/screenshots
+mx=$(xdotool getmouselocation | awk -F'[: ]' '{print $2}')
+my=$(xdotool getmouselocation | awk -F'[: ]' '{print $4}')
+xdpyinfo -ext XINERAMA | sed '/^  head #/!d;s///' | while IFS=' :x@,' read i w h x y; do
+	if [[ $mx -ge $x && $mx -le $(($x + $w)) && $my -ge $y && $my -le $(($y + $h)) ]]; then
+		import -window root -crop ${w}x$h+$x+$y "$(xdg-user-dir PICTURES)/screenshots/$(date +%F_%H%M%S_%N)-${i}.png"
+	fi
+done

+ 3 - 0
install/usr/local/bin/screenshot-selection

@@ -0,0 +1,3 @@
+#!/bin/bash
+[ -d $(xdg-user-dir PICTURES)/screenshots ] || mkdir -p $(xdg-user-dir PICTURES)/screenshots
+import -frame "$(xdg-user-dir PICTURES)/screenshots/$(date +'%F-%H.%M.%S-(%N).png')"

+ 7 - 0
install/usr/local/bin/system-updates

@@ -0,0 +1,7 @@
+#!/bin/bash
+
+LOG=/dev/null
+
+pacman -Syu --noconfirm
+
+youtube-dl -U

+ 7 - 0
install/usr/local/bin/transmission-remote-magnet

@@ -0,0 +1,7 @@
+#!/bin/bash
+# transmission-remote-magnet
+# Usage: transmission-remote-magnet <magnet URL>
+
+[ -z "$1" ] && exit 1
+SESSID="$(curl -sI http://localhost:9091/bt/rpc/  | grep 'X-Transmission-Session-Id' | tr -d '\r')"
+curl -s -H "$SESSID" -d "{\"method\":\"torrent-add\",\"arguments\":{\"filename\":\"${1}\"}}" http://localhost:9091/bt/rpc

+ 10 - 0
install/usr/local/bin/urxvtq

@@ -0,0 +1,10 @@
+#!/bin/bash
+if [ $(ps aux | grep -v grep | grep -c "urxvt -name urxvtq") -eq 0 ]; then
+	urxvt -name urxvtq -geometry 200x24 &
+	xdotool windowactivate --sync $(xdotool search -sync --onlyvisible --classname urxvtq)
+elif xdotool search --onlyvisible --classname urxvtq &> /dev/null; then
+	xdotool windowunmap $(xdotool search -sync --classname urxvtq)
+else
+	xdotool windowmap --sync $(xdotool search -sync --classname urxvtq)
+	xdotool windowactivate --sync $(xdotool search -sync --classname urxvtq)
+fi

+ 26 - 0
install/usr/local/bin/wallpaper

@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# set sane defaults
+[ -z "$wallpaper_sleep_for" ] && wallpaper_sleep_for="180"
+[ -z "$wallpaper_path" ] && wallpaper_path="$(xdg-user-dir PICTURES)/wallpaper"
+mkdir -p "$wallpaper_path"
+
+# validate wallpaper path
+[ $(find "$wallpaper_path" -type f | wc -l) -gt 0 ] || exit 1
+
+# there can be only one
+while [ $(ps aux | grep -v 'grep' | grep -c "$0") -gt 2 ]; do
+	kill $(ps aux | grep -v 'grep' | grep -v $$ | grep "$0" | awk '{print $2}') &> /dev/null
+done
+
+# infinitely change wallpaper
+while true; do
+	wallpaper_cmd="feh --no-fehbg"
+	monitor_count=$(xrandr -d :0 -q | grep -c " connected")
+	while [ $monitor_count -gt 0 ]; do
+		wallpaper_cmd="$wallpaper_cmd --bg-max \"$(find $wallpaper_path -type f | sort -R | tail -1)\""
+		let monitor_count=monitor_count-1
+	done
+	eval "$wallpaper_cmd"
+	sleep $wallpaper_sleep_for
+done

+ 8 - 0
install/usr/share/applications/flash.desktop

@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Flash Projector
+Comment=Run swf files locally
+Exec=/usr/local/bin/flashplayer
+Icon=swf
+Type=Application
+Categories=Multimedia;AudioVideo;Player;
+MimeType=application/x-shockwave-flash;

+ 97 - 0
install/usr/share/applications/mimeapps.list

@@ -0,0 +1,97 @@
+[Added Associations]
+image/gif=viewnior.desktop;
+image/bmp=viewnior.desktop;
+image/jpg=viewnior.desktop;
+image/jpeg=viewnior.desktop;
+image/png=viewnior.desktop;
+image/tiff=viewnior.desktop;
+text/html=google-chrome.desktop;
+text/htmls=google-chrome.desktop;
+application/x-shockwave-flash=flash.desktop;
+text/plain=sublime_text.desktop;
+text/x-c=sublime_text.desktop;
+text/css=sublime_text.desktop;
+text/x-python=sublime_text.desktop;
+text/x-log=sublime_text.desktop;
+text/x-go=sublime_text.desktop;
+text/x-markdown=sublime_text.desktop;
+application/x-php=sublime_text.desktop;
+application/x-shellscript=sublime_text.desktop;
+application/pdf=evince.desktop;
+video/x-msvideo=mpv.desktop;
+video/x-flv=mpv.desktop;
+video/quicktime=mpv.desktop;
+video/x-matroska=mpv.desktop;
+video/mp4=mpv.desktop;
+video/mpeg=mpv.desktop;
+video/x-theora+ogg=mpv.desktop;
+video/x-theora=mpv.desktop;
+video/theora=mpv.desktop;
+video/x-ogm+ogg=mpv.desktop;
+video/x-ogm=mpv.desktop;
+video/ogm=mpv.desktop;
+video/ogg=mpv.desktop;
+video/x-ogg=mpv.desktop;
+video/mp2t=mpv.desktop;
+video/MP2T=mpv.desktop;
+video/x-ms-wmv=mpv.desktop;
+video/webm=mpv.desktop;
+application/ogg=mpv.desktop;
+audio/flac=mpv.desktop;
+audio/midi=mpv.desktop;
+audio/mpeg=mpv.desktop;
+audio/x-wav=mpv.desktop;
+audio/x-ogg=mpv.desktop;
+application/x-bittorrent=transmission-remote-magnet.desktop;
+x-scheme-handler/magnet=transmission-remote-magnet.desktop;
+application/x-ms-dos-executable=wine.desktop;
+application/x-msdos-program=wine.desktop;
+
+[Default Applications]
+image/gif=viewnior.desktop;
+image/bmp=viewnior.desktop;
+image/jpg=viewnior.desktop;
+image/jpeg=viewnior.desktop;
+image/png=viewnior.desktop;
+image/tiff=viewnior.desktop;
+text/html=google-chrome.desktop;
+text/htmls=google-chrome.desktop;
+application/x-shockwave-flash=flash.desktop;
+text/plain=sublime_text.desktop;
+text/x-c=sublime_text.desktop;
+text/css=sublime_text.desktop;
+text/x-python=sublime_text.desktop;
+text/x-log=sublime_text.desktop;
+text/x-go=sublime_text.desktop;
+text/x-markdown=sublime_text.desktop;
+application/x-php=sublime_text.desktop;
+application/x-shellscript=sublime_text.desktop;
+application/pdf=evince.desktop;
+video/x-msvideo=mpv.desktop;
+video/x-flv=mpv.desktop;
+video/quicktime=mpv.desktop;
+video/x-matroska=mpv.desktop;
+video/mp4=mpv.desktop;
+video/mpeg=mpv.desktop;
+video/x-theora+ogg=mpv.desktop;
+video/x-theora=mpv.desktop;
+video/theora=mpv.desktop;
+video/x-ogm+ogg=mpv.desktop;
+video/x-ogm=mpv.desktop;
+video/ogm=mpv.desktop;
+video/ogg=mpv.desktop;
+video/x-ogg=mpv.desktop;
+video/mp2t=mpv.desktop;
+video/MP2T=mpv.desktop;
+video/x-ms-wmv=mpv.desktop;
+video/webm=mpv.desktop;
+application/ogg=mpv.desktop;
+audio/flac=mpv.desktop;
+audio/midi=mpv.desktop;
+audio/mpeg=mpv.desktop;
+audio/x-wav=mpv.desktop;
+audio/x-ogg=mpv.desktop;
+application/x-bittorrent=transmission-remote-magnet.desktop;
+x-scheme-handler/magnet=transmission-remote-magnet.desktop;
+application/x-ms-dos-executable=wine.desktop;
+application/x-msdos-program=wine.desktop;

+ 7 - 0
install/usr/share/applications/transmission-remote-magnet.desktop

@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=transmissionRemoteMagnet
+Type=Application
+Exec=/usr/local/bin/transmission-remote-magnet %u
+NoDisplay=true
+Terminal=true
+MimeType=x-scheme-handler/magnet;

BIN
install/usr/share/fonts/truetype/jis/epkyouka.ttf


BIN
install/usr/share/fonts/truetype/jis/formatekonave.ttf


+ 4 - 0
install/usr/share/thumbnailers/asf.thumbnailer

@@ -0,0 +1,4 @@
+[Thumbnailer Entry]
+TryExec=ffmpegthumbnailer
+Exec=ffmpegthumbnailer -i %i -o %o -s %s -f
+MimeType=application/vnd.ms-asf;

+ 4 - 0
install/usr/share/thumbnailers/psd.thumbnailer

@@ -0,0 +1,4 @@
+[Thumbnailer Entry]
+TryExec=convert
+Exec=convert -thumbnail x%s %i[0] png:%o
+MimeType=image/vnd.adobe.photoshop;

+ 80 - 0
packer.json

@@ -0,0 +1,80 @@
+{
+	"variables": {
+		"iso_url": "https://mirrors.kernel.org/archlinux/iso/{{isotime \"2006.01\"}}.01/archlinux-{{isotime \"2006.01\"}}.01-x86_64.iso",
+		"iso_checksum_url": "https://mirrors.kernel.org/archlinux/iso/{{isotime \"2006.01\"}}.01/sha1sums.txt",
+		"root_password": "arch",
+		"username": "vagrant",
+		"password": "vagrant"
+	},
+	"builders": [
+		{
+			"headless": false,
+			"type": "virtualbox-iso",
+			"iso_url": "{{ user `iso_url` }}",
+			"iso_checksum_url": "{{ user `iso_checksum_url` }}",
+			"iso_checksum_type": "sha1",
+			"vm_name": "arch-desktop",
+			"guest_os_type": "ArchLinux_64",
+			"guest_additions_mode": "disable",
+			"virtualbox_version_file": "",
+			"vboxmanage": [
+				["modifyvm", "{{.Name}}", "--firmware", "efi"],
+				["modifyvm", "{{.Name}}", "--memory", "1024"],
+				["modifyvm", "{{.Name}}", "--accelerate3d", "on"]
+			],
+			"boot_wait": "5s",
+			"boot_command": [
+				"<enter><wait40s>",
+				"printf \"{{user `root_password`}}\\n{{user `root_password`}}\\n\" | passwd<enter>",
+				"systemctl start sshd.service<enter>"
+			],
+			"disk_size": 65536,
+			"iso_interface": "sata",
+			"hard_drive_interface": "sata",
+			"output_directory": "dist/arch-desktop",
+			"ssh_username": "root",
+			"ssh_password": "{{user `root_password`}}",
+			"ssh_timeout": "20m",
+			"shutdown_command": "systemctl poweroff"
+		}
+	],
+	"provisioners": [
+		{
+			"type": "file",
+			"source": "arch.sh",
+			"destination": "arch.sh"
+		},
+		{
+			"type": "file",
+			"source": "install",
+			"destination": "install"
+		},
+		{
+			"type": "shell",
+			"skip_clean": true,
+			"expect_disconnect": true,
+			"environment_vars": [
+				"DEBUG=true",
+				"root_password={{user `root_password`}}",
+				"username={{user `username`}}",
+				"password={{user `password`}}"
+			],
+			"script": "setup/install.sh"
+		},
+		{
+			"type": "shell",
+			"script": "setup/vbox.sh"
+		},
+		{
+			"type": "shell",
+			"script": "setup/clean.sh"
+		}
+	],
+	"post-processors": [
+		{
+			"type": "vagrant",
+			"compression_level": 9,
+			"output": "dist/arch-desktop.box"
+		}
+	]
+}

+ 53 - 0
readme.md

@@ -0,0 +1,53 @@
+
+# [arch-desktop](https://git.caseydelorme.com/cdelorme/arch-desktop)
+
+This repository contains automation that matches [debian-stretch-desktop](https://git.caseydelorme.com/cdelorme/debian-stretch-desktop), but has been retooled for [arch](https://www.archlinux.org/) systems.
+
+As a rolling release, there will be no need to create new repositories, I will simply update this one as needed.
+
+There are two driving factors for me using arch:
+
+1. I want it on my laptop and arch has way better modern driver support as it is a rolling release.
+2. We have just entered the post-freeze on debian buster which is always a painful wait.
+
+_During the creation of this project I have been surprised at how stable arch is and while I will still use debian for servers I may consider moving to arch for my desktop and development machine._
+
+
+## usage
+
+If you want to test my build locally, you can do so with [`virtualbox`](https://www.virtualbox.org/), [`packer`](https://www.vagrantup.com/), and [`vagrant`](https://www.packer.io/) by running these commands with them installed.
+
+	packer build packer.json
+	vagrant up
+
+The first will build an entire image, which takes roughly 5GB of disk space, and the second will launch an instance from that image that is accessible with the username and password of `vagrant`.
+
+You can also run these commands from the installation terminal:
+
+	pacman -S git
+	git clone https://git.caseydelorme.com/cdelorme/arch-desktop.git
+	cd arch-desktop
+	./setup/install.sh
+
+
+## notes
+
+I ran into quite a few interesting caveats during the creation of this project, and wanted to comment on them.
+
+The pinned comments on the AUR are offensive to beginners and do not answer any questions, RTFM does not explain how to actually fix GPG signature errors.  The wiki is useful, but it is hard to pin down what you are looking for.  So good job being useless by threatening a ban hammer on comments with questions related to the lack of clear instructions on packages.
+
+The `makepkg` restriction that prevents execution as root is dumb as hell.  I get the security constraints, but the instructions to run as nobody are hella flawed; test suites basically can't run as nobody due to directory permissions (so many with loads of undocumented ENV variables), and creating a faux user from a script just to install some relatively common and popular packages seems like a ridiculous work-around.  So great job making automation harder and solving nothing.
+
+Finally, while I am not a fan of how `systemd` forced proliferation into all linux distributions, nor do I care for binary logs (_that seems like a major step backwards_), I am incredibly thankful for how simple `bootctl` made EFI bootloader setup, and also user-space unit files.  _I only wish there was a more clear way to deal with setting up user-space files from scripts during arch installation._
+
+
+# references
+
+- [Arch Installation Guide](https://wiki.archlinux.org/index.php/installation_guide)
+- [old arch docs in system-setup](https://github.com/cdelorme/system-setup/blob/6c0661c5556fae6126e2eb9e7525aafd143b7518/docs/linux/arch/gui.md)
+- [arch efi installation guide by GloriousEggroll](https://www.gloriouseggroll.tv/arch-linux-efi-install-guide/)
+- [Arch Wiki NVidia Documentation](https://wiki.archlinux.org/index.php/NVIDIA)
+- [Arch Wiki makepkg](https://wiki.archlinux.org/index.php/Makepkg)
+- [Arch Wiki AUR](https://wiki.archlinux.org/index.php/Arch_User_Repository)
+- [ip command cheatsheat](https://access.redhat.com/sites/default/files/attachments/rh_ip_command_cheatsheet_1214_jcs_print.pdf)
+- [packer-arch by elasticdog](https://github.com/elasticdog/packer-arch)

+ 14 - 0
setup/clean.sh

@@ -0,0 +1,14 @@
+#!/usr/bin/bash -x
+
+##
+# post execution steps to reduce image size
+##
+
+# Clean the pacman cache.
+yes | pacman -Scc
+
+# Write zeros to improve virtual disk compaction.
+zerofile=$(mktemp /zerofile.XXXXX)
+dd if=/dev/zero of="$zerofile" bs=1M
+rm -f "$zerofile"
+sync

+ 67 - 0
setup/install.sh

@@ -0,0 +1,67 @@
+#!/usr/bin/bash -eu
+#
+# Author: Casey DeLorme
+#
+# This is used by my packer build, but is wired to work for a complete install.
+#
+# Description: Thse are the pre-installation steps for Arch, where you may have
+# launched the iso and have a terminal, but you're working off a live system
+# and still need to partition the disk.
+#
+# Warning: This installation is wired for efi mode installations.  While it
+# may print a warning it won't stop the installation and may leave you with
+# a derelict system.
+#
+# Warning: This currently uses /dev/sda explicitly and may delete data or fail
+# if there are multiple disks connected or you are using alternative storage
+# such as M.2/NVME.
+
+[ ! -f /sys/firmware/efi/efivars ] && echo "efivars not mounted and this install may leave you with a derelict system..."
+
+# optionally print all commands
+[ -n "$DEBUG" ] && set -x
+
+# test network connection
+ping -c 3 archlinux.org
+
+# synchronize time (print for debug)
+timedatectl set-ntp true
+timedatectl status
+
+# @todo: future editions will intelligently check available disks,
+# may ask which disk to use, may detect if running on a laptop,
+# may automatically choose or ask if swap should be sized for
+# hibernation, and appropriately modify partition logic.
+
+# partition the hard drive
+parted /dev/sda -s 'mklabel gpt'
+parted /dev/sda -s 'mkpart primary fat32 1MiB 1024MiB'
+parted /dev/sda -s 'set 1 esp on'
+parted /dev/sda -s 'mkpart primary linux-swap 1024MiB 3072MiB'
+parted /dev/sda -s 'mkpart primary btrfs 3072MiB 100%'
+
+# format the partitions
+mkfs.fat -F32 -nEFI /dev/sda1
+mkswap -Larch /dev/sda2
+mkfs.btrfs -fLarch /dev/sda3
+
+# enable and mount partitions with appropriate settings
+swapon /dev/sda2
+mount -o "noatime,compress=lzo,space_cache,autodefrag,ssd" /dev/sda3 /mnt
+mkdir /mnt/boot
+mount /dev/sda1 /mnt/boot
+
+# install base and base-devel package sets, and generate the fstab
+pacstrap /mnt base base-devel
+genfstab -U -p /mnt >> /mnt/etc/fstab
+
+# this assumes that arch.sh and install/ exists and will copy them to continue
+# @note: would prefer to copy to `/tmp` but `/mnt/tmp` from iso is a separate tmpfs
+mkdir -p /mnt/srv/arch-desktop
+cp -r install /mnt/srv/arch-desktop/
+cp arch.sh /mnt/srv/arch-desktop/
+
+# proceed to automate arch-chroot installation then umount and reboot with an async delay
+arch-chroot /mnt /srv/arch-desktop/arch.sh
+umount -R /mnt
+(sleep 5 && systemctl reboot) &

+ 9 - 0
setup/vbox.sh

@@ -0,0 +1,9 @@
+#!/usr/bin/bash -x
+
+# VirtualBox Guest Additions
+# https://wiki.archlinux.org/index.php/VirtualBox
+pacman -S --noconfirm linux-headers virtualbox-guest-utils virtualbox-guest-modules-arch nfs-utils
+echo -e 'vboxguest\nvboxsf\nvboxvideo' > /etc/modules-load.d/virtualbox.conf
+
+systemctl enable vboxservice.service
+systemctl enable rpcbind.service