diff --git a/README.md b/README.md index d1b146f..6f6a8eb 100644 --- a/README.md +++ b/README.md @@ -6,91 +6,9 @@ This is a collection of dotfiles and scripts for my i3 setup, previewed below: ### Software: -All packages that are manually installed via pacman -S, dependencies not included. +All packages that are manually installed via pacman -S, can be found in the packages file, +dependencies are not included. - -- installed during installation - base - base-devel - sudo - iw - wpa_supplicant - dialog - -- installed after booting into system - git - openssh - pacaur - xorg-server - xorg-xinit - xorg-xrandr - xorg-xbacklight - xf86-video-intel - i3-gaps - rofi - feh - i3blocks - i3lock-color-git (AUR) - acpi - playerctl - alsa-utils - sysstat - screenfetch - scrot - imagemagick - rxvt-unicode - zsh - zsh-completions - libx264 - ttf-dejavu - ttf-dejavu-sans-mono-powerline-git (AUR) - firefox - libnotify - pulseaudio - pulseaudio-alsa - pavucontrol - thunar - thunar-volman - gvfs - tumbler - ffmpegthumbnailer - poppler-glib - gtk-theme-arc-git (AUR) - arc-icon-theme-git (AUR) - moka-icon-theme-git (AUR) - lxappearance - ntfs-3g - exfat-utils - gedit - thunderbird - qbittorrent - filezilla - tlp - smartmontools - x86_energy_perf_policy - intel-ucode - mpv - youtube-dl - rtmpdump - xarchiver - zip - unzip - unrar - p7zip - texlive-most - gvfs-mtp - gvfs-gphoto2 - chromium - zathura - zathura-pdf-mupdf - xdotool - python2-setuptools - python2-click-5.1 (AUR) - platformio (AUR) - gvim - checkbashisms (AUR) - xss-lock-git (AUR) - inkscape - cura - wpa_actiond ### Configuration: diff --git a/dotfiles.sh b/dotfiles.sh index 601a563..a45b2f3 100755 --- a/dotfiles.sh +++ b/dotfiles.sh @@ -5,21 +5,24 @@ if [ "$(dirname $0)" != "." ]; then exit fi +PACKAGE_FILE="./packages" + FILES=$(find . \( -path ./.git -o \ + -path ./dotfiles.sh -o \ + -path $PACKAGE_FILE -o \ -path ./README.md -o \ - -path ./screenshot.png -o \ - -path ./dotfiles.sh \) -prune -o -type f -print) + -path ./screenshot.png \) -prune -o -type f -print) if [ "$1" == "help" ] || [ "$1" == "" ]; then BOLD=$(tput bold) NORMAL=$(tput sgr0) - + echo "${BOLD}NAME${NORMAL}" echo " dotfiles - file copy script for this repository" echo "" echo "${BOLD}SYNOPSIS${NORMAL}" echo " ./dotfiles.sh []" - echo "" + echo "" echo "${BOLD}COMMANDS${NORMAL}" echo " list" echo " Prints all the dotfiles added to this directory." @@ -34,6 +37,16 @@ on the system to this directory." echo " push" echo " For each file in this directory, copy that file \ to its location on the system." + echo "" + echo " package [list]" + echo " List all the packages installed on the system." + echo "" + echo " package store" + echo " Store the list of all the installed packages on the \ +system." + echo "" + echo " package install" + echo " Install all the core packages of the list." elif [ "$1" == "list" ]; then for f in $FILES; do @@ -43,7 +56,7 @@ elif [ "$1" == "list" ]; then elif [ "$1" == "get" ] && [ "$2" != "" ]; then FILE=$(readlink -f $2) FILE_CUT_HOME="$(echo $FILE | sed -nr 's/^\/home\/'$USER'\/(.*)$/\1/p')" - + # /home// if [ -n "$FILE_CUT_HOME" ]; then mkdir -p $(pwd)/$(dirname $FILE_CUT_HOME) @@ -78,9 +91,29 @@ elif [ "$1" == "pull" ] || [ "$1" == "push" ]; then fi done +elif [ "$1" == "package" ]; then + PACKAGE_LIST=$(comm -23 <(pacman -Qeq | sort) <(pacman -Qgq base base-devel | sort)) + + if [ "$2" == "list" ] || [ "$2" == "" ]; then + echo "$PACKAGE_LIST" + elif [ "$2" == "store" ]; then + if [ ! -s $PACKAGE_FILE ]; then + touch "$PACKAGE_FILE" + else + truncate -s 0 "$PACKAGE_FILE" + fi + echo "$PACKAGE_LIST" > "$PACKAGE_FILE" + elif [ "$2" == "install" ]; then + # Install core packages + sudo pacman -S --needed $(comm -12 <(pacman -Slq | sort) <(sort $PACKAGE_FILE)) + # For AUR packages, run: -S - < packages + fi else echo "./dotfiles.sh: '$1' is not a dotfiles command. \ See './dotfiles.sh help'." fi +# @Todo: +# get function to support symlinks +# push function to push just one file diff --git a/packages b/packages new file mode 100644 index 0000000..855f8d7 --- /dev/null +++ b/packages @@ -0,0 +1,114 @@ +acpi +adobe-source-han-sans-otc-fonts +alsa-utils +arandr +arc-icon-theme-git +capitaine-cursors +checkbashisms +chromium +clang +cower +cura +dialog +domoticz-git +dos2unix +efibootmgr +exfat-utils +feh +ffmpegthumbnailer +filezilla +firefox +gedit +git +gnome-themes-standard +gtk-theme-arc-git +gucharmap +gvfs +gvfs-gphoto2 +gvfs-mtp +gvim +htop +i3blocks +i3-gaps +i3lock-color-git +imagemagick +inkscape +intel-ucode +iw +jdk9-openjdk +krita +libmtp +libnotify +libx264 +lxappearance +mariadb +moka-icon-theme-git +mpv +mysql-workbench +neofetch +ntfs-3g +openssh +os-prober +p7zip +pacaur +pavucontrol +platformio +playerctl +poppler-glib +powertop +pulseaudio +pulseaudio-alsa +python2-click-5.1 +python2-setuptools +qbittorrent +qt5ct +qt5-serialport +qt5-styleplugins +qt5-tools +rofi +rtmpdump +rxvt-unicode +scrot +sloccount +smartmontools +sysstat +texlive-bibtexextra +texlive-core +texlive-fontsextra +texlive-formatsextra +texlive-games +texlive-humanities +texlive-latexextra +texlive-music +texlive-pictures +texlive-pstricks +texlive-publishers +texlive-science +thunar +thunar-volman +thunderbird +tlp +ttf-dejavu +ttf-dejavu-sans-mono-powerline-git +tumbler +unrar +unzip +wpa_actiond +wpa_supplicant +x86_energy_perf_policy +xarchiver +xdotool +xf86-video-intel +xorg-server +xorg-xbacklight +xorg-xinit +xorg-xinput +xorg-xprop +xorg-xrandr +xss-lock-git +youtube-dl +zathura +zathura-pdf-mupdf +zip +zsh +zsh-completions