mirror of
https://github.com/Lissy93/dotfiles.git
synced 2024-11-24 16:33:14 +01:00
Merge branch 'master' of github.com:Lissy93/dotfiles
This commit is contained in:
commit
d487b6bdab
38
.github/README.md
vendored
38
.github/README.md
vendored
@ -20,6 +20,7 @@
|
||||
- [Aliases](#aliases)
|
||||
- [Utilities](#utilities)
|
||||
- [Packages](#packages)
|
||||
- [System Preferences](#system-preferences)
|
||||
- [ZSH](#zsh)
|
||||
- [Vim](#vim)
|
||||
- [Tmux](#tmux)
|
||||
@ -203,6 +204,7 @@ Once the repo is cloned, you can modify whatever files you like before running t
|
||||
├── <a href="https://github.com/Lissy93/dotfiles/tree/master/tmux" title="Tmux Configs">tmux/</a>
|
||||
├── <a href="https://github.com/Lissy93/dotfiles/tree/master/vim" title="Vim Configs">vim/</a>
|
||||
├── <a href="https://github.com/Lissy93/dotfiles/tree/master/zsh" title="ZSH Configs">zsh/</a>
|
||||
├── <a href="https://github.com/Lissy93/dotfiles/tree/master/installs" title="List of packages to install">installs/</a>
|
||||
├── <a href="https://github.com/Lissy93/dotfiles/tree/master/.github" title="Repo Meta">.github/</a>
|
||||
├── <a href="https://github.com/Lissy93/dotfiles/blob/master/lets-go.sh" title="Remote Setup Initiator">lets-go.sh</a>
|
||||
└── <a href="https://github.com/Lissy93/dotfiles/blob/master/install.sh" title="Setup Script">install.sh</a>
|
||||
@ -621,17 +623,39 @@ bash <(curl -s https://raw.githubusercontent.com/Lissy93/dotfiles/master/utils/w
|
||||
|
||||
### Packages
|
||||
|
||||
The dotfile installation script can also, detect which system and environemnt you're running, and optionally prompt to install packages and applications.
|
||||
|
||||
The dotfiles can also optionally install any packages that you may need. This is useful for quickly setting up new systems, but it's important that you remove / comment out any packages that you don't need.
|
||||
Package lists are stored in [`installs/`](https://github.com/Lissy93/dotfiles/tree/master/installs) directory, with separate files for different OSs. The install script will [pick the appropriate file](https://github.com/Lissy93/dotfiles/blob/22c6a04fdb22c140448b7d15ef8187c3a424ab47/install.sh#L243-L260) based on your distro.
|
||||
|
||||
The list of software is stored in the [`installs/`]() directory, and the file that's used will vary depending on the host operating system.
|
||||
You will be prompted before anything is installed. Be sure to remove / comment out anything you do not need before proceeding.
|
||||
|
||||
- Arch (and Arch-based systems, like Manjaro) - []() uses pacman
|
||||
- Debian (and Debian-based systems, like Ubuntu) - []() uses apt
|
||||
- Alpine - []() uses [apk](https://docs.alpinelinux.org/user-handbook/0.1a/Working/apk.html)
|
||||
- Mac OS - [`.Brewfile`]() uses [Homebrew](https://brew.sh/)
|
||||
- Windows - [`windows.sh`]() uses [winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/) and [scoop](https://scoop.sh/)
|
||||
- Linux (desktop): [`flatpak.sh`](https://github.com/Lissy93/dotfiles/blob/master/installs/flatpak.sh) - Desktop apps can be installed on Linux systems via [Flatpack](https://flatpak.org/)
|
||||
- Mac OS: [`.Brewfile`](https://github.com/Lissy93/dotfiles/blob/master/installs/Brewfile) - Mac apps installed via [Homebrew](https://brew.sh/)
|
||||
- Arch (and Arch-based systems, like Manjaro): [`pacman.sh`](https://github.com/Lissy93/dotfiles/blob/master/installs/pacman.sh) - Arch CLI apps installed via [pacman](https://wiki.archlinux.org/title/Pacman)
|
||||
- Debian (and Debian-based systems, like Ubuntu): [`apt.sh`](https://github.com/Lissy93/dotfiles/blob/master/installs/apt.sh) - Debian CLI apps installed via [apt](https://wiki.debian.org/Apt)
|
||||
- Alpine: [`apk.sh`](https://github.com/Lissy93/dotfiles/blob/master/installs/apk.sh) - Alpine CLI apps installed via [apk](https://docs.alpinelinux.org/user-handbook/0.1a/Working/apk.html)
|
||||
|
||||
---
|
||||
|
||||
### System Preferences
|
||||
|
||||
The installation script can also prompt you to confiture system settings and user preferences. This is useful for setting up a completely fresh system in just a few seconds.
|
||||
|
||||
#### MacOS
|
||||
|
||||
MacOS includes a utility named [`defaults`](https://real-world-systems.com/docs/defaults.1.html), which lets you configure all system and app preferences programatically through the command line. This is very powerful, as you can write a script that configures every aspect of your system enabling you to setup a brand new machine in seconds.
|
||||
|
||||
All settings are then updated in the `.plist` files stored in `~/Library/Preferences`. This can also be used to configure preferences for any installed app on your system, where the application is specified by its domain identifier - you can view a full list of your configurable apps by running `defaults domains`.
|
||||
|
||||
|
||||
In my dotfiles, the MacOS preferences will configure everything from system security to launchpad layout. The Mac settings are located in [`system-specific/macos/system-settings/`](https://github.com/Lissy93/dotfiles/tree/master/system-specific/macos/system-settings), and are split into three files:
|
||||
- [`macos-security.sh`](https://github.com/Lissy93/dotfiles/blob/master/system-specific/macos/system-settings/macos-security.sh) - Sets essential security settings, disables telementry, disconnects unused ports, enforces signing, sets logout timeouts, and much more
|
||||
- [`macos-preferences.sh`](https://github.com/Lissy93/dotfiles/blob/master/system-specific/macos/system-settings/macos-preferences.sh) - Configures all user preferences, including computer name, highlight color, finder options, spotlight settings, hardware preferences and more
|
||||
- [`macos-apps.sh`](https://github.com/Lissy93/dotfiles/blob/master/system-specific/macos/system-settings/macos-apps.sh) - Applies preferences to any installed desktop apps, such as Terminal, Time Machine, Photos, Spotify, and many others
|
||||
|
||||
Upon running each script, a summary of what will be changed will be shown, and you'll be prompted as to weather you'd like to continue. Each script also handles permissions, compatibility checking, and graceful fallbacks. Backup of original settings will be made, and a summary of all changes made will be logged as output when the script is complete.
|
||||
|
||||
If you choose to run any of these scripts, take care to read it through first, to ensure you understand what changes will be made, and optionally update or remove anything as you see fit.
|
||||
|
||||
---
|
||||
|
||||
|
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"makefile.extensionOutputFolder": "./.vscode"
|
||||
}
|
6
Vagrantfile
vendored
Normal file
6
Vagrantfile
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
VAGRANTFILE_API_VERSION = "2"
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/arch"
|
||||
end
|
@ -268,9 +268,3 @@
|
||||
smudge = git-lfs smudge -- %f
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
[difftool "sourcetree"]
|
||||
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
|
||||
path =
|
||||
[mergetool "sourcetree"]
|
||||
cmd = /Users/alicia/Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
|
||||
trustExitCode = true
|
||||
|
14
install.sh
14
install.sh
@ -168,7 +168,7 @@ function apply_preferences () {
|
||||
fi
|
||||
|
||||
# Install / update vim plugins with Plug
|
||||
echo -e "${PURPLE}Installing Vim Plugins${RESET}"
|
||||
echo -e "\n${PURPLE}Installing Vim Plugins${RESET}"
|
||||
vim +PlugInstall +qall
|
||||
|
||||
# Install / update Tmux plugins with TPM
|
||||
@ -207,8 +207,7 @@ function intall_macos_packages () {
|
||||
fi
|
||||
fi
|
||||
# Update / Install the Homebrew packages in ~/.Brewfile
|
||||
if command_exists brew && [ -f "$DOTFILES_DIR/installs/Brewfile" ]
|
||||
then
|
||||
if command_exists brew && [ -f "$DOTFILES_DIR/installs/Brewfile" ]; then
|
||||
echo -e "\n${PURPLE}Updating homebrew and packages...${RESET}"
|
||||
brew update
|
||||
brew upgrade
|
||||
@ -243,14 +242,21 @@ function intall_macos_packages () {
|
||||
# Based on system type, uses appropriate package manager to install / updates apps
|
||||
function install_packages () {
|
||||
read -t $PROMPT_TIMEOUT -p "$(echo -e $CYAN_B)Would you like to install / update system packages? (y/N) " -n 1 -r
|
||||
echo
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo -e "\n${PURPLE}Skipping package installs${RESET}"
|
||||
echo -e "${PURPLE}Skipping package installs${RESET}"
|
||||
return
|
||||
fi
|
||||
# Mac OS
|
||||
if [ "$system_type" = "Darwin" ]; then
|
||||
intall_macos_packages
|
||||
fi
|
||||
# If running in Linux desktop mode, prompt to install desktop apps via Flatpak
|
||||
flatpak_script="${DOTFILES_DIR}/installs/flatpak.sh"
|
||||
if [[ $(uname -s) == "Linux" ]] && [ ! -z $XDG_CURRENT_DESKTOP ] && [ -f $flatpak_script ]; then
|
||||
chmod +x $flatpak_script
|
||||
$flatpak_script
|
||||
fi
|
||||
}
|
||||
|
||||
# Updates current session, and outputs summary
|
||||
|
48
installs/arch.sh
Normal file
48
installs/arch.sh
Normal file
@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# List of packages to be installed on Arch-based systems
|
||||
# Desktop apps installed via Flatpak, PKGBUILDs via Pacman
|
||||
# Apps are sorted by category, and arranged alphabetically
|
||||
# Be sure to delete / comment out anything you do not need
|
||||
|
||||
set -e
|
||||
|
||||
# Apps to be installed via Pacman
|
||||
pacman_apps=(
|
||||
# Apps
|
||||
|
||||
|
||||
# Development
|
||||
|
||||
|
||||
# Utils
|
||||
|
||||
# Security Utils
|
||||
|
||||
|
||||
# Netowking
|
||||
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
CYAN_B='\033[1;96m'
|
||||
YELLOW_B='\033[1;93m'
|
||||
RED_B='\033[1;31m'
|
||||
GREEN_B='\033[1;32m'
|
||||
RESET='\033[0m'
|
||||
|
||||
echo "${CYAN_B}Installing Arch Packages...${RESET}"
|
||||
|
||||
# Pacman
|
||||
if hash pacman 2> /dev/null; then
|
||||
for app in ${pacman_apps[@]}; do
|
||||
# If pacman -Qk ${app}
|
||||
# And If: flatpak list --columns=ref | grep 'ch.protonmail.protonmail-bridge'
|
||||
pacman -S ${app}
|
||||
done
|
||||
else
|
||||
echo "${YELLOW_B}Pacman not present, skipping${RESET}"
|
||||
fi
|
||||
|
169
installs/flatpak.sh
Normal file
169
installs/flatpak.sh
Normal file
@ -0,0 +1,169 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
######################################################################
|
||||
# Linux Desktop Application Installations via Flatpak #
|
||||
######################################################################
|
||||
# This script will: #
|
||||
# - Check that Flatpak is installed / promt to install #
|
||||
# - Update currently installed Flatpak apps from FlatHub #
|
||||
# - Check app not already installed via system package manager #
|
||||
# - Then install any not-yet-installed that are apps listed #
|
||||
# #
|
||||
# IMPORTANT: Be sure to remove / comment any apps you do not want! #
|
||||
# #
|
||||
# Licensed under MIT (C) Alicia Sykes 2022 <https://aliciasykes.com> #
|
||||
######################################################################
|
||||
|
||||
# Remote origin to use for installations
|
||||
flatpak_origin='flathub'
|
||||
|
||||
# List of desktop apps to be installed via Flatpak
|
||||
flatpak_apps=(
|
||||
|
||||
# Communication
|
||||
'com.discordapp.Discord' # Team messaging and voice
|
||||
'im.riot.Riot' # Decentralized Matrix chat
|
||||
'info.mumble.Mumble' # Low latency VoIP client
|
||||
'org.jitsi.jitsi-meet' # Encrypted video calls
|
||||
'org.mozilla.Thunderbird' # Email + calendar client
|
||||
'org.signal.Signal' # Private messenger, mobile
|
||||
'com.slack.Slack' # Work and team messaging
|
||||
'com.github.eneshecan.WhatsAppForLinux' # WhatApp client
|
||||
|
||||
# Media
|
||||
'com.spotify.Client' # Music streaming
|
||||
'com.valvesoftware.Steam' # Gaming
|
||||
'org.gnome.Cheese' # Webcam client
|
||||
'org.libretro.RetroArch' # Retro game emulation
|
||||
'org.videolan.VLC' # Media player
|
||||
|
||||
# Creativity
|
||||
'com.ultimaker.cura' # 3D slicing
|
||||
'com.obsproject.Studio' # Video streaming
|
||||
'fr.handbrake.ghb' # Video transcoder
|
||||
'io.github.seadve.Kooha' # Screen recorder
|
||||
'org.audacityteam.Audacity' # Sound editor
|
||||
'org.blender.Blender' # 3D modeling
|
||||
'org.darktable.Darktable' # Video editor
|
||||
'org.gimp.GIMP' # Picture editor
|
||||
'org.inkscape.Inkscape' # Vector editor
|
||||
'org.shotcut.Shotcut' # Video editor
|
||||
'org.synfig.SynfigStudio' # 2D animation
|
||||
|
||||
# Software development
|
||||
'com.visualstudio.code' # Extendable IDE
|
||||
'com.getpostman.Postman' # API development
|
||||
'cc.arduino.IDE2' # IOT development
|
||||
'com.axosoft.GitKraken' # GUI git client
|
||||
'com.google.AndroidStudio' # Android dev IDE
|
||||
'io.podman_desktop.PodmanDesktop' # Docker / Podman UI
|
||||
|
||||
# Security testing
|
||||
'org.wireshark.Wireshark' # Packet capture and analyzer
|
||||
'org.zaproxy.ZAP' # Auto vulnerability scanning
|
||||
'org.nmap.Zenmap' # GUI for Nmap security scans
|
||||
|
||||
# Browsers
|
||||
'org.mozilla.firefox'
|
||||
'com.github.Eloston.UngoogledChromium'
|
||||
'com.github.micahflee.torbrowser-launcher'
|
||||
|
||||
# Office
|
||||
'org.libreoffice.LibreOffice'
|
||||
|
||||
# Personal
|
||||
'ch.protonmail.protonmail-bridge' # ProtonMail bridge
|
||||
'com.belmoussaoui.Authenticator' # OTP authenticator
|
||||
'org.cryptomator.Cryptomator' # Encryption for cloud
|
||||
'org.standardnotes.standardnotes' # Encrypted synced notes
|
||||
# Missing: Trewsorit, 1Password, EteSync, Veracrypt, Ledger
|
||||
)
|
||||
|
||||
# Color Variables
|
||||
CYAN_B='\033[1;96m'
|
||||
YELLOW='\033[0;93m'
|
||||
RED_B='\033[1;31m'
|
||||
RESET='\033[0m'
|
||||
GREEN='\033[0;32m'
|
||||
PURPLE='\033[0;35m'
|
||||
LIGHT='\x1b[2m'
|
||||
|
||||
PROMPT_TIMEOUT=15 # When user is prompted for input, skip after x seconds
|
||||
|
||||
# Helper function to install Flatpak for users current distro
|
||||
function install_flatpak () {
|
||||
# Arch, Manjaro
|
||||
if hash "pacman" 2> /dev/null; then
|
||||
echo -e "${PURPLE}Installing Flatpak via Pacman${RESET}"
|
||||
sudo pacman -S flatpak
|
||||
# Debian, Ubuntu, PopOS, Raspian
|
||||
elif hash "apt" 2> /dev/null; then
|
||||
echo -e "${PURPLE}Installing Flatpak via apt get${RESET}"
|
||||
sudo apt install flatpak
|
||||
# Alpine
|
||||
elif hash "apk" 2> /dev/null; then
|
||||
echo -e "${PURPLE}Installing Flatpak via apk add${RESET}"
|
||||
sudo apk add flatpak
|
||||
# Red Hat, CentOS
|
||||
elif hash "yum" 2> /dev/null; then
|
||||
echo -e "${PURPLE}Installing Flatpak via Yum${RESET}"
|
||||
sudo yum install flatpak
|
||||
fi
|
||||
echo -e "${PURPLE}Adding Flathub repo${RESET}"
|
||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
}
|
||||
|
||||
# Ask user if they'd like to proceed, and exit if not
|
||||
echo -e "${CYAN_B}Would you like to install Flatpak desktop apps? (y/N)${RESET}\n"
|
||||
read -t $PROMPT_TIMEOUT -n 1 -r
|
||||
echo
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo -e "${YELLOW}Skipping Flatpak installations..."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo -e "${CYAN_B}Starting Flatpak App Installation Script${RESET}"
|
||||
|
||||
# Check that Flatpak is present, prompt to install or exit if not
|
||||
if ! hash flatpak 2> /dev/null; then
|
||||
echo -e "${PURPLE}Flatpak isn't yet installed on your system${RESET}"
|
||||
echo -e "${CYAN_B}Would you like to install Flatpak now?${RESET}\n"
|
||||
read -t $PROMPT_TIMEOUT -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
install_flatpak
|
||||
else
|
||||
echo -e "${YELLOW}Skipping Flatpak installations, as Flatpack not installed"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# Update currently installed apps
|
||||
echo -e "${PURPLE}Updating installed apps${RESET}"
|
||||
yes "" | flatpak update
|
||||
|
||||
# Itterate over each app, check if already installed, otherwise install now
|
||||
echo -e "${PURPLE}Installing apps defined in manifest${RESET}"
|
||||
for app in ${flatpak_apps[@]}; do
|
||||
app_name=$(echo $app | rev | cut -d "." -f1 | rev)
|
||||
is_in_flatpak=$(echo $(flatpak list --columns=ref | grep $app))
|
||||
is_in_pacman=$(echo $(pacman -Qk $(echo $app_name | tr 'A-Z' 'a-z') 2> /dev/null ))
|
||||
is_in_apt=$(echo $(dpkg -s $(echo $app_name | tr 'A-Z' 'a-z') 2> /dev/null ))
|
||||
# Check app not already installed via Flatpak
|
||||
if [ -n "$is_in_flatpak" ]; then
|
||||
echo -e "${YELLOW}[Skipping] ${LIGHT}${app_name} is already installed.${RESET}"
|
||||
# Check app not installed via Pacman (Arch Linux)
|
||||
elif [[ "${is_in_pacman}" == *"total files"* ]]; then
|
||||
echo -e "${YELLOW}[Skipping] ${LIGHT}${app_name} is already installed via Pacman.${RESET}"
|
||||
# Check app not installed via apt get (Debian)
|
||||
elif [[ "${is_in_apt}" == *"install ok installed"* ]]; then
|
||||
echo -e "${YELLOW}[Skipping] ${LIGHT}${app_name} is already installed via apt-get.${RESET}"
|
||||
else
|
||||
# Install app using Flatpak
|
||||
echo -e "${GREEN}[Installing] ${LIGHT}Downloading ${app_name} (from ${flatpak_origin}).${RESET}"
|
||||
flatpak install -y --noninteractive $flatpak_origin $app
|
||||
echo
|
||||
fi
|
||||
done
|
||||
|
||||
echo -e "${PURPLE}Finished processing Flatpak apps${RESET}"
|
@ -20,7 +20,8 @@
|
||||
${XDG_DATA_HOME}/tmux/plugins/tpm: tpm
|
||||
${XDG_CONFIG_HOME}/tmux/tmux.conf: tmux/tmux.conf
|
||||
${XDG_CONFIG_HOME}/utils: utils
|
||||
~/.gitconfig: configs/.gitconfig
|
||||
${XDG_CONFIG_HOME}/git/.gitconfig: configs/.gitconfig
|
||||
# ~/.gitconfig: configs/.gitconfig
|
||||
${XDG_CONFIG_HOME}/.gitignore_global: configs/.gitignore_global
|
||||
# ${XDG_CONFIG_HOME}/curl/.curlrc: configs/.curlrc
|
||||
$XDG_CONFIG_HOME/yabai/yabairc:
|
||||
|
2
utils/radio.sh
Normal file
2
utils/radio.sh
Normal file
@ -0,0 +1,2 @@
|
||||
alias kiss='mplayer http://oom-cmg.streamguys1.com/atl1041/atl1041.mp3'
|
||||
#Kiss 104.1-WALR-FM-FM 104.1-Atlanta,GA :SOURCE:view-source:http://streema.com/radios/play/3806
|
Loading…
Reference in New Issue
Block a user