dotfiles/config/scripts/softwareList

382 lines
10 KiB
Plaintext
Raw Normal View History

2019-10-24 19:35:00 +02:00
#!/usr/bin/env sh
# List of the software I use divided by categories.
# Oh and it asks the category you want to install on
# the running machine too.
# TODO Not tested with Debian derivate
# TODO Not tested on home folder
CONFIG_FILE="${XDG_CONFIG_DIR:=$HOME/.config}/softwareList"
mkdir -p $XDG_CONFIG_DIR
touch $CONFIG_FILE
. $CONFIG_FILE
prompt() { # text
res="none"
while [ "$res" = "none" ]
do
printf "%s [yn] " "$1"
read -r yn
case $yn in
[Yy]* ) return 0;;
[Nn]* ) return 1;;
* ) echo "Please answer y or n.";;
esac
done
}
uservar() { # var text
if [ -z "${!1}" ]
then
prompt "${2}" && res=true || res=false
export "$1"="$res"
echo "$1"="$res" >> "$CONFIG_FILE"
fi
}
echo "Please answer some questions about this machine and what you want to do on it:"
# Setting variables
[ -d /data/data/com.termux/files ] && TERMUX=true || TERMUX=false
$TERMUX && INSTALL_GUI=false
[ "$USER" = "root" ] && SUPERUSER=true
uservar SUPERUSER "Have root permissions?"
uservar INSTALL_GUI "Install a GUI environment?"
$INSTALL_GUI && INSTALL_X=true
INSTALL_WAYLAND=false
uservar INSTALL_PASSWORD "Handle password?"
uservar INSTALL_MAIL "Read/send mail?"
uservar INSTALL_ORGANISATION "Handle agenda/contacts?"
uservar INSTALL_HOUSEKEEPING "Do some housekeeping?"
uservar INSTALL_FPGA "Handle FPGAs?"
uservar INSTALL_UTILITIES "Extra utilities?"
uservar INSTALL_DOCUMENT "Create documents?"
uservar INSTALL_IMAGE "Do image editing?"
uservar INSTALL_MUSIC "Play/edit music?"
uservar INSTALL_VIDEO "Play/edit videos?"
2020-01-18 23:17:09 +01:00
if $INSTALL_GUI
then
uservar INSTALL_WINE "Run Windows applications?"
2020-01-21 22:40:47 +01:00
else
INSTALL_WINE=false
2020-01-18 23:17:09 +01:00
fi
2019-10-24 19:35:00 +02:00
echo "(you can change those answers later in $CONFIG_FILE)"
# Preparing installers
. $HOME/.config/scripts/common/installSoftware
2019-10-24 19:35:00 +02:00
resetInstallers
2020-01-21 23:11:13 +01:00
$SUPERUSER && ! $TERMUX && addSystemInstallers
2019-10-24 19:35:00 +02:00
addUserInstallers
echo "Installers that will be used:"
listInstallers | sed 's/^/- /'
echo "Updating databases & packages"
# updateInstallers # DEBUG put back
echo "Finding packages to install"
# Note: i A B: will try A then B for each installer
# i A || i B: will try A for each installer, then B for each installer
# Package managers (install first)
2020-03-12 17:56:10 +01:00
i yay-bin
2019-10-24 19:35:00 +02:00
i python-pip python3-pip pip3
# TODO Install first and recharge installers
# Utils used by those scripts
i base coreutils # Basic shell commands (ls, rm, cp...)
i bash # Shell
i grep # Text finder
i sed # Text replacer
i tar # Archive tool
2020-01-21 23:11:13 +01:00
i openssl-tool openssl-tools # machines script verification
2019-10-24 19:35:00 +02:00
# Various utilities
$SUPERUSER && i sudo tsu
2020-01-21 22:40:47 +01:00
$TERMUX && i termux-api
2019-10-24 19:35:00 +02:00
# Shell utilities
i moreutils # Advanced shell commands (ts, sponge...)
i tmux # Terminal multiplexer
i bash-completion # Shell completions
i fzf # Fancy file finder
2020-01-21 22:25:38 +01:00
i highlight # Syntax highlighter (TODO No termux)
2020-03-12 17:56:10 +01:00
i powerline-go-bin powerline-go # Nice prompt (potential problem: requires go-pie)
2019-10-24 19:35:00 +02:00
i zsh # Shell
2020-04-10 14:19:42 +02:00
i antigen # ZSH plugins
# TODO Arch only for the following (antigen takes over else)
2019-10-24 19:35:00 +02:00
i zsh-autosuggestions # Shell suggestions
i zsh-completions # Shell completions
i zsh-history-substring-search # Shell config
i zsh-syntax-highlighting # Shell highlighting
2020-02-17 07:01:26 +01:00
i rxvt-unicode-terminfo # So it doesn't act weird in root
2019-10-24 19:35:00 +02:00
# Text edition
(i neovim nvim && i python-neovim python3-neovim) || i vim || i vi # Text editor
# Monitoring utilities
i ncdu # Explore directories by weight on disk
2020-01-21 22:25:38 +01:00
i lsof # Find who/what uses the files (TODO No termux)
2019-10-24 19:35:00 +02:00
i pv # Allow to show progress in pipe
# Network utilities
i openssh # SSH connections
2020-01-21 22:25:38 +01:00
# i proxytunnel # Proxy connections through HTTPS (TODO No termux)
2019-10-24 19:35:00 +02:00
i curl # Transfer URL
i wget # Download URL
2020-01-21 22:25:38 +01:00
i gnu-netcat netcat # Network piping
2019-10-24 19:35:00 +02:00
i socat # Multi-purpose relay
i rsync # Remote file-copying tool
2020-01-21 22:25:38 +01:00
i speedtest-cli # Network speed benchmarker (TODO No termux)
i bind-tools dnsutils # DNS queryier
2020-03-12 17:56:10 +01:00
i whois # Domain name queryier
2019-10-24 19:35:00 +02:00
# Archives utilities
i unzip # Unarchive ZIP files
i unrar # Unarchive RAR files
i p7zip # Unarchive 7z files
# Password handling
if $INSTALL_PASSWORD
then
i pwgen # Password generator
2020-06-28 11:23:02 +02:00
i pass # Password manager
2019-10-24 19:35:00 +02:00
if $INSTALL_GUI
then
i rofi-pass # Password selector
2020-06-28 11:23:02 +02:00
# i autopass.cr # Password selector
2019-10-24 19:35:00 +02:00
fi
fi
if $INSTALL_MAIL
then
# i offlineimap # Synchronize IMAP (legacy)
i isync mbsync # Synchronize IMAP
i msmtp # Send mail via SMTP
i notmuch # Index mail
i neomutt || i mutt # CLI mail client
i lynx # CLI web browser (for HTML mail)
2019-11-01 18:34:45 +01:00
i tiv # CLI image viewer
2019-10-24 19:35:00 +02:00
if $INSTALL_GUI
then
i thunderbird # GUI mail client (just in case)
fi
fi
if $INSTALL_ORGANISATION
then
i vdirsyncer # Synchronize DAV
i khard # Contacts editor
i khal # Calendar editor
i task # Todo-list
i timew # Time-tracker
fi
if $INSTALL_HOUSEKEEPING
then
i syncthing # Synchronize files amongst devices
2020-02-03 08:33:27 +01:00
i borg # Backups
2019-10-24 19:35:00 +02:00
i jdupes # Find duplicates
i duperemove # Find and merge dupplicates on BTRFS partitions
i optipng # Optimize PNG files
i jpegtran libjpeg-turbo # Compress JPEG files
2019-11-01 18:34:45 +01:00
i reflac # Recompress FLAC files
i pacman-contrib # Pactree and more
i shred # Delete sensititve data
2020-01-21 21:47:08 +01:00
i android-tools && i android-udev # Android Debug Bridge
2020-04-10 14:19:42 +02:00
i tigervnc # Remote desktop
2019-10-24 19:35:00 +02:00
fi
# Dev utilities
i base-devel build-essential || (i make; i gcc)
i git
[ -z "$INSTALL_DEV" ] && $TERMUX && INSTALL_DEV=false
if $INSTALL_DEV
then
# Misc/Reusable
i man # Documentation
2019-10-24 19:35:00 +02:00
i strace # Tracer
i ctags universal-ctags exuberant-ctags # Tags generator
2020-03-12 17:56:10 +01:00
i perf # Allow verifying performance of software
2019-10-24 19:35:00 +02:00
# C/C++
i cmake # C++ Build system
i clang # C/C++ Compiler
i ccache # Build cache
i gdb # Debugger
# JS
i jq # CLI JSON file handler
# Python
i python-language-server # Python language server
i mypy && i pyls-mypy # Static typing checker for Python
2020-04-10 14:19:42 +02:00
i python-language-server-black # Python code formatter
2019-10-24 19:35:00 +02:00
# Bash
i bash-language-server # Bash / SH language server
fi
if $INSTALL_FPGA
then
i yosys # Verilog processor
i iverilog # Verilog simulator
i ghdl # VHDL simulator
i gtkwave # Simulation file viewer
fi
if $INSTALL_UTILITIES
then
i visidata # CSV file reader
i insect # Unit calculator
i zbar # Read QR codes
2020-01-06 16:23:50 +01:00
i htop # View process usage
$SUPERUSER && i iotop # View process I/O
i progress # Show progress of functions
2019-10-24 19:35:00 +02:00
fi
if $INSTALL_DOCUMENT
then
i pandoc # Document converter
i texlive-most && i texlive-lang # LaTeX renderer
i pdftk # PDF manipulator
i translate-shell # Translator
i inkscape # Vector image converter
i optipng # Optimize PNG files
i jpegtran libjpeg-turbo # Compress JPEG files
2020-03-12 17:56:10 +01:00
i libreoffice-fresh # Office suite
i hunspell-en_GB # Spell checker British english
i hunspell-en_US # Spell checker American english
# i libreoffice-extension-grammalecte-fr # Spell checker French
i libreoffice-extension-languagetool # Complimentary spell checker various
# TODO The last two can't cohabit
2019-10-24 19:35:00 +02:00
fi
if $INSTALL_IMAGE
then
i imagemagick # CLI Image manipulator
i gimp # Photo editor
i darktable # Raw photo editor
i inkscape # Vectorial image editor
i optipng # Optimize PNG files
i jpegtran libjpeg-turbo # Compress JPEG files
fi
if $INSTALL_MUSIC
then
i mpv # Audio/Video player
i puddletag-qt5-git puddletag # Musig tag editor
# (remove -qt5 once it has been merged upstream)
2019-10-24 19:35:00 +02:00
i mpd # Music player daemon
i mpc # CLI MPD client
i vimpc-git # CLI UI MPD client
i musescore # Music sheet editor
i ashuffle # Auto-fill MPD playlist
2020-02-17 07:01:26 +01:00
i audacity # Audio editor
2019-10-24 19:35:00 +02:00
fi
if $INSTALL_VIDEO
then
i vlc # Video player
i mpv # Audio/Video player
i ffmpeg # Video/Audio file handler
i youtube-dl # Downloader for videos
i megatools # Downloader for mega.nz
if $INSTALL_X
then
i simplescreenrecorder # Screen recorder
fi
fi
2020-01-18 23:17:09 +01:00
if $INSTALL_WINE
then
# TODO Add multilib repo and pacman -Sy
i wine # Wine
i wine-gecko # Wine Internet Explorer
i wine-mono # Wine .NET
i mono # Mono .NET
i lib32-libpulse # Sound for Wine with pulseaudio
fi
2019-10-24 19:35:00 +02:00
# Desktop environment
if $INSTALL_GUI
then
i firefox # Web browser
2020-04-10 14:19:42 +02:00
# Extensions: Dark reader, Decentraleyes, Tridactyl, uBlock Origin, Containers, No Tab
i xkb-qwerty-fr # French QWERTY disposition
2019-10-24 19:35:00 +02:00
i thunar # Directory browser (just in case)
i gedit # Visual editor (just in case)
2019-10-24 19:35:00 +02:00
i feh # Background / Image viewer
i zathura && i zathura-pdf-mupdf # PDF viewer
2020-01-18 23:17:09 +01:00
i ttf-dejavu # Font
2019-10-24 19:35:00 +02:00
i ttf-twemoji # Emoji fonts
2020-01-18 23:17:09 +01:00
i adobe-source-han-sans-otc-fonts # Chinese/Japanese/Korean fonts
i sox # For beeps and stuff
i meld # For comparison
2020-04-10 14:19:42 +02:00
i python-magic # Dependency of o
2020-09-11 18:59:59 +02:00
i yubikey-touch-detector # Show a notification when Yubikey needs pressing
2019-10-24 19:35:00 +02:00
if $INSTALL_X
then
i i3-wm # WM
2020-01-09 13:12:01 +01:00
i libgnomekbd # Show keyboard layout
2019-10-24 19:35:00 +02:00
i dunst # Notifications
i i3lock # Locker
i numlockx # Numlock auto-unlock
i rofi # HUD selector
2020-04-10 14:19:42 +02:00
i rofimoji # emoji selector
2019-10-24 19:35:00 +02:00
i rxvt-unicode # Terminal emulator
i urxvt-resize-font-git # Resize fonts for urxvt
2019-10-24 19:35:00 +02:00
i scrot # Screenshot taker
i trayer # Tray icons (just in case)
i unclutter # Auto mask mouse
i xautolock # Auto lock screen
i xclip # Copy/paste
i lemonbar-xft-git lemonbar # Bottom bar
2020-02-03 08:33:27 +01:00
i wireless_tools # Bottom bar WiFi Indicator (iwgetid)
2019-10-24 19:35:00 +02:00
i autorandr # Multiple screen configurations
i keynav-enhanced keynav # Use mouse with keyboard
i pacmixer # To change PA volumes
i sct # Red filter # TODO Autocompile
i xorg-xinit # To launch X
i xorg-xbacklight xbacklight # For laptop brightness
i pulseaudio # To get ausdio
# TODO Bluetooth headset stuff
fi
if $INSTALL_WAYLAND
then
i sway
fi
fi
echo "Listing software to install"
listInstallers | while read -r installerName
do
echo " Installer $installerName will install:"
listPackagesForInstaller "$installerName" | sed 's/^/ - /'
done
prompt "Okay with those?" || exit 0
echo "Installing packages"
installPackages