From 3f9cd30676bb0a0b72cde60edd268162478abb22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=BAniak?= Date: Thu, 30 Jan 2025 22:44:01 +0100 Subject: [PATCH] Added into Update-pkg: fzf, programs via brew, streamlink, zsh --- .brew_programs | 19 ++++++++++++ .brew_programs_cask | 37 ++++++++++++++++++++++ .local/bin/Update-pkg | 72 ++++++++++++++++++++++++++++++++++++------- 3 files changed, 117 insertions(+), 11 deletions(-) create mode 100644 .brew_programs create mode 100644 .brew_programs_cask diff --git a/.brew_programs b/.brew_programs new file mode 100644 index 0000000..ab38d7f --- /dev/null +++ b/.brew_programs @@ -0,0 +1,19 @@ +bash +coreutils +dockutil +duti +fastfetch +git +gnu-sed +htop +imagemagick +ipcalc +neovim +newsboat +parallel +ripgrep +rsync +tmux +tree +wget +zsh diff --git a/.brew_programs_cask b/.brew_programs_cask new file mode 100644 index 0000000..16c7105 --- /dev/null +++ b/.brew_programs_cask @@ -0,0 +1,37 @@ +alfred +chatterino +dbeaver-community +displaylink +docker +firefox@nightly +font-hack-nerd-font +gimp +hiddenbar +iterm2 +jordanbaird-ice +karabiner-elements +keepassxc +macfuse +megasync +microsoft-auto-update +microsoft-teams +mongodb-compass +mpv +mysides +obsidian +platypus +qbittorrent +qview +scroll-reverser +signal +skype +spotify +stats +telegram +the-unarchiver +transfer +twingate +vlc +wine-crossover +wireshark +zed@preview diff --git a/.local/bin/Update-pkg b/.local/bin/Update-pkg index 55ed2cb..48c3f22 100755 --- a/.local/bin/Update-pkg +++ b/.local/bin/Update-pkg @@ -96,7 +96,7 @@ function install_neovim_module_for_python() { $pip install pynvim neovim imps $PIPEXTPRE } -function install_node(){ +function install_node() { if command_exists npm; then timestamp "Node has been found" else @@ -282,16 +282,21 @@ function install_spotifydl() { $pip install spotdl $PIPEXTPRE } -function update() { - if [ -d $CONFIG/fzf ]; then - FOLDER="$CONFIG/fzf" +function install_fzf() { + # Install fzf + FOLDER="$CONFIG/fzf" + mkdir -p $FOLDER + + if [ -d $FOLDER ]; then + cd $CONFIG || err "Folder $CONFIG has been NOT found" + git clone https://github.com/junegunn/fzf.git $FOLDER && timestamp "Cloning the FZF" cd $FOLDER || err "Folder $FOLDER has been NOT found" git pull -q && timestamp "Pulling the $FOLDER configuration" - else - FOLDER="$CONFIG/fzf" - git clone https://github.com/junegunn/fzf.git $FOLDER && timestamp "Cloning the FZF" - git pull -q && timestamp "Pulling the $FOLDER configuration" + make install fi +} + +function install_zsh_addons() { if [ ! -d $ZSHFOLDER/aws ]; then curl -s https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/plugins/aws/aws.plugin.zsh \ @@ -417,7 +422,6 @@ function install_tss_client() { ln -s $TSSFOLDER/tss $TSSLINK chmod +x $TSSLINK fi - } function install_taplo() { @@ -425,11 +429,54 @@ function install_taplo() { $install taplo } -function install_precommit(){ +function install_precommit() { # Install pre-commit $pip install pre-commit $PIPEXTPRE } +function install_streamlink() { + # Install streamlink + $pip install streamlink $PIPEXTPRE +} + +function install_brew_programs() { + # Install brew programs + INSTALLED_PROGRAMS=$(brew list) + while IFS='' read -r line; do LIST_OF_PROGRAMS+=("$line"); done < <(cat "$HOME"/.brew_programs) + while IFS='' read -r line; do LIST_OF_PROGRAMS_CASK+=("$line"); done < <(cat "$HOME"/.brew_programs_cask) + + for i in "${LIST_OF_PROGRAMS[@]}"; do + if [[ ! " ${INSTALLED_PROGRAMS[*]} " =~ ${i} ]]; then + brew install $i --force + fi + done + + for i in "${LIST_OF_PROGRAMS_CASK[@]}"; do + if [[ ! " ${INSTALLED_PROGRAMS[*]} " =~ ${i} ]]; then + brew install $i --cask --force + fi + done + + xattr -r -d com.apple.quarantine /Applications/Spotify.app + xattr -r -d com.apple.quarantine /Applications/Stats.app + + xattr -r -d com.apple.quarantine /opt/homebrew/bin/mpv /Applications/mpv.app + duti -s io.mpv avi all + duti -s io.mpv mkv all + duti -s io.mpv mp4 all + duti -s io.mpv ts all + + xattr -r -d com.apple.quarantine /Applications/qView.app + duti -s com.interversehq.qView public.jpeg all + duti -s com.interversehq.qView public.png all + duti -s com.interversehq.qView com.compuserve.gif all + duti -s com.interversehq.qView public.tiff all + + xattr -r -d com.apple.quarantine /Applications/chatterino.app + + brew cleanup --prune=all +} + function main() { command_start update_pip command_start install_neovim_module_for_python @@ -464,7 +511,10 @@ function main() { command_start install_tss_client command_start install_taplo command_start install_precommit - command_start update + command_start install_streamlink + command_start install_fzf + command_start install_zsh_addons + command_start install_brew_programs } main