<commit_before>#!/bin/bash

cd "$(dirname "${BASH_SOURCE[0]}")" \
    && . "../../utils.sh" \
    && . "./utils.sh"

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

print_in_purple "\n   Miscellaneous\n\n"

install_package "Gnome Tweak Tool" "gnome-tweak-tool"
install_package "HTop" "htop"
install_package "JQ" "jq"
install_package "NMap" "nmap"
install_package "Slack" "slack"
install_package "Thunderbird" "thunderbird"
install_package "Transmission" "transmission"
install_package "VLC" "vlc"

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# install_package "NFS Common" "nfs-common"
# install_package "OpenSSH Server" "openssh-server"
# install_package "Samba (Server)" "samba"
# install_package "Samba (Client)" "samba-client"

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# https://dbschema.com/download/DbSchema_linux_8_5_0.deb
if ! package_is_installed "DbSchema"; then
    execute \
        "wget -q -O /tmp/dbschema.deb http://www.dbschema.com/download/DbSchema_linux_8_5_0.deb \
            && sudo dpkg -i /tmp/dbschema.deb \
            && sudo apt-get install -f \
            && sudo cp /opt/DbSchema/DbSchema.desktop /usr/share/applications/ \
            && mkdir -p $HOME/.local/share/applications \
            && touch $HOME/.local/share/applications/mimeapps.list \
            && sudo echo \"application/xml=DbSchema.desktop\" >> $HOME/.local/share/applications/mimeapps.list \
            && rm /tmp/dbschema.deb" \
        "DbSchema"
fi

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# https://rg3.github.io/youtube-dl/download.html
if ! cmd_exists "youtube-dl"; then
    execute \
        "sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl \
            && sudo chmod a+rx /usr/local/bin/youtube-dl" \
        "youtube-dl"
fi

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

if ! package_is_installed "code"; then

    execute \
      "wget -q -O /tmp/vscode.deb https://go.microsoft.com/fwlink/?LinkID=760868 \
          && sudo dpkg -i /tmp/vscode.deb \
          && sudo apt-get install -f \
          && rm /tmp/vscode.deb" \
      "Visual Studio Code"
fi

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


if ! package_is_installed "sublime-text"; then

    execute \
      "wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - \
          && sudo apt install apt-transport-https -y \
          && echo \"deb https://download.sublimetext.com/ apt/stable/\" | sudo tee /etc/apt/sources.list.d/sublime-text.list \
          && sudo apt-get update -qq" \
      "Sublime Text (dependencies)"
fi

install_package "Sublime Text" "sublime-text"


# if ! package_is_installed "sublime-text-installer"; then

# #   wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
# # sudo apt install apt-transport-https
# # echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list



#     add_ppa "webupd8team/sublime-text-3" \
#         || print_error "Sublime Text (add PPA)"

#     # update &> /dev/null \
#     #     || print_error "Sublime Text (resync package index files)" \
#     #
#     execute \
#         "sudo apt-get update \
#             && sudo apt-get install -f" \
#         "Sublime Text (resync package index files)"

# fi

# install_package "Sublime Text" "sublime-text-installer"
<commit_msg>add caffeine to ubuntu 20 desktop<commit_after>#!/bin/bash

cd "$(dirname "${BASH_SOURCE[0]}")" \
    && . "../../utils.sh" \
    && . "./utils.sh"

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

print_in_purple "\n   Miscellaneous\n\n"

install_package "Caffeine" "caffeine"
install_package "Gnome Tweak Tool" "gnome-tweak-tool"
install_package "HTop" "htop"
install_package "JQ" "jq"
install_package "NMap" "nmap"
install_package "Slack" "slack"
install_package "Thunderbird" "thunderbird"
install_package "Transmission" "transmission"
install_package "VLC" "vlc"

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# install_package "NFS Common" "nfs-common"
# install_package "OpenSSH Server" "openssh-server"
# install_package "Samba (Server)" "samba"
# install_package "Samba (Client)" "samba-client"

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# https://dbschema.com/download/DbSchema_linux_8_5_0.deb
if ! package_is_installed "DbSchema"; then
    execute \
        "wget -q -O /tmp/dbschema.deb http://www.dbschema.com/download/DbSchema_linux_8_5_0.deb \
            && sudo dpkg -i /tmp/dbschema.deb \
            && sudo apt-get install -f \
            && sudo cp /opt/DbSchema/DbSchema.desktop /usr/share/applications/ \
            && mkdir -p $HOME/.local/share/applications \
            && touch $HOME/.local/share/applications/mimeapps.list \
            && sudo echo \"application/xml=DbSchema.desktop\" >> $HOME/.local/share/applications/mimeapps.list \
            && rm /tmp/dbschema.deb" \
        "DbSchema"
fi

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# https://rg3.github.io/youtube-dl/download.html
if ! cmd_exists "youtube-dl"; then
    execute \
        "sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl \
            && sudo chmod a+rx /usr/local/bin/youtube-dl" \
        "youtube-dl"
fi

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

if ! package_is_installed "code"; then

    execute \
      "wget -q -O /tmp/vscode.deb https://go.microsoft.com/fwlink/?LinkID=760868 \
          && sudo dpkg -i /tmp/vscode.deb \
          && sudo apt-get install -f \
          && rm /tmp/vscode.deb" \
      "Visual Studio Code"
fi

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


if ! package_is_installed "sublime-text"; then

    execute \
      "wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - \
          && sudo apt install apt-transport-https -y \
          && echo \"deb https://download.sublimetext.com/ apt/stable/\" | sudo tee /etc/apt/sources.list.d/sublime-text.list \
          && sudo apt-get update -qq" \
      "Sublime Text (dependencies)"
fi

install_package "Sublime Text" "sublime-text"


# if ! package_is_installed "sublime-text-installer"; then

# #   wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
# # sudo apt install apt-transport-https
# # echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list



#     add_ppa "webupd8team/sublime-text-3" \
#         || print_error "Sublime Text (add PPA)"

#     # update &> /dev/null \
#     #     || print_error "Sublime Text (resync package index files)" \
#     #
#     execute \
#         "sudo apt-get update \
#             && sudo apt-get install -f" \
#         "Sublime Text (resync package index files)"

# fi

# install_package "Sublime Text" "sublime-text-installer"

{'fraction_non_alphanumeric': 0.19139966273187184, 'fraction_numerical': 0.00477796514896009, 'mean_word_length': 1.7383609080415545, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 16, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 64, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2877589', 'n_tokens_mistral': 2766, 'n_tokens_neox': 2641, 'n_words': 448}