Skip to content

Latest commit

 

History

History
780 lines (634 loc) · 23.6 KB

README.md

File metadata and controls

780 lines (634 loc) · 23.6 KB

Pop!_OS Post-Installation (POPPI) Script

POPPI is a highly-customisable set of Bash functions originally developed for and tested on Pop!_OS 22.04 LTS powered by Linux kernel v6.9.3. It will yield the best results when used on a fresh system installation. POPPI is a work in progress and will probably remain so as long as there is a strong interest from the user community.

Currently, POPPI does not support Cosmic DE and has not been tested on other Ubuntu derivatives.

Bash

Table of Contents

Features

POPPI screenshot

Usage

1. Get the script

Using the latest stable version (Recommended)

wget https://github.com/simurq/poppi/releases/latest/download/poppi.sh -O poppi.sh
chmod +x ./poppi.sh

Using the latest development branch

wget https://raw.githubusercontent.com/simurq/poppi/poppi-dev/poppi.sh -O poppi.sh
chmod +x ./poppi.sh

2. Setup the JSON configuration file configure.pop

The JSON configuration file configure.pop is a key component of POPPI. It is where you'll spend most of your time, adjusting POPPI's workflow to your individual needs. The script will read all the user settings from this file. You're strongly encouraged to modify the configuration file instead of making direct edits to the script.

By default, a new configuration file will be created in the same directory where you run the script, if one is not already there. You can then make necessary changes to the file. Both files—configure.pop and poppi.sh—should be in the same directory to make POPPI run properly. A detailed explanation of the JSON key/value pairs found in configure.pop is provided below.

Section GENERAL

This section specifies general settings pertinent to the script itself.

Option/td> Description
"gen.colour_head": "rgb(72,185,199)"
sets the colour of headings in RGB* format (default=#48b9c7)
"gen.colour_info": "#949494"
sets the colour of info messages in HEX format (default=#949494).
"gen.colour_okay": "rgb(78,154,10)"
sets the colour of messages indicating the successful completion of an operation in RGB format (default=#4e9a0a).
"gen.colour_stop": "#ff3232"
sets the colour of error messages in HEX format (default=#ff3232).
"gen.colour_warn": "rgb(240,230,115)"
sets the colour of warning messages in RGB format (default=#f0e673).
"gen.logfile_backup_no": "3"
sets the number of logfile backups (default=3 | max=99).
"gen.logfile_format": "Metric"
sets the textual format of logs (US/Metric | default=Metric).
"gen.logfile_on": 1
toggle to enable (default=1)/disable (0) logging.
"gen.maximise_window": 1
toggle to maximise (default=1)/disable (0) the main terminal window when running POPPI.
"gen.set_timer": 1
toggle to set the timer that calculates the running period of the script in hours, minutes, and seconds (default=1).
"gen.test_server": "duckduckgo.com"
sets the server to check the Internet connectivity (default=duckduckgo.com).

Note: Text colours for keys gen.colour_* accept values both in RGB and HEX format.

Section FIREFOX

This section covers all the operations with the Firefox browser, including:

  • the creation or identification of user profile;
  • the download and installation of browser extensions;
  • setting user's privacy environment (Arkenfox stuff reinforced with personal user overrides);
  • setting the persistent cookies.
Option Description
"ffx.configure": 1
toggle to enable (1)/disable (default=0) browser configuration. When disabled, POPPI will skip the browser configuration completely.
"ffx.extensions": [
  "groupspeeddial",
  "colorzilla",
  "diigo-web-collector",
  "downloader-4-reddit-redditsave",
  "gnome-shell-integration",
  "keepassxc-browser",
  "tampermonkey",
  "ublock-origin",
  "wikiwand-wikipedia-modernized"
    ]
downloads and installs Firefox extensions provided as a comma-separated array of extension titles. The title of extension must respect the naming convention supported by Mozilla. E.g.: https://addons.mozilla.org/en-US/firefox/addon/wikiwand-wikipedia-modernized (default=nul).
"ffx.cookies_to_keep": [
  "https://copilot.microsoft.com",
  "https://discord.com",
  "https://github.com",
  "https://web.telegram.org",
  "https://web.whatsapp.com",
  "https://www.bing.com",
  "https://www.wikiwand.com"
    ]
sets persistent cookies for select websites provided as a comma-separated array of website URLs (default=nul).
"ffx.set_privacy": 1
enables privacy, security, and anti-tracking options as specified in Arkenfox's JavaScript addon (default=1).
"ffx.set_homepage": 0
sets browser homepage to GroupSpeedDial, if the latter is installed (see: "ffx.extensions"). Otherwise the setting is ineffective. This is one of the options that can be modified either by the user or by request (default=0).

Section PACKAGES

This section provides a number of options for setting and configuring portable and installable packages.

Option Description
"pkg.autostart": [
  "keepassxc"
    ]
sets the indicated package to autostart on system reboot (e.g., KeePassXC). The title of the package must match the one provided under "pkg.portables" (default=nul).
"pkg.installers": {
  "Calibre": {
    "required": 1
  },
  "DConf-Editor": {
    "required": 1
  },
  "FFMPEG": {
    "required": 1
  },
  "LibreOffice": {
    "required": 1,
    "extensions": [
      "theme-sifr",
      "russian-dictionary-pack",
      "5814"
    ],
  },
  "pdftocgen": {
    "required": 1
  },
  "TeamViewer": {
    "required": 1
  },
  "Virt-Manager": {
    "required": 1
  }
}
specifies installable package(s) to download and install. Each package* can have individual sub-sections, e.g., "extensions" for LibreOffice above.The package will be downloaded and installed, if "required": 1. Otherwise, the download and install for that package will be skipped.
"pkg.portables": {
  "audacity": {
    "required": 1
  },
  "bleachbit": {
    "required": 0
  },
  "codium": {
    "required": 1,
    "extensions": [
      "arcticicestudio.nord-visual-studio-code",
      "basdp.language-gas-x86",
      "ms-vscode.cpptools",
      "equinusocio.vsc-material-theme"
      "vscodevim.vim"
    ]
  }
 }
specifies portable package(s) to download (and extract, if necessary). Each package* can have individual sub-sections, such as "extensions" or "settings" for VS Codium in the above example. The package will be downloaded, if "required": 1. Otherwise, the download for that package will be skipped.
"pkg.portables_dir": "/path/to/directory/Portables"
sets the directory to download and install portable packages. While currently only AppImages and archive files are supported, this feature is planned to be extended to allow for other types of portables (default=nul).

Note:

  • Currently, Section PACKAGES supports only the hard-coded packages shipped with the configure.pop. However, this number can and will be increased upon user request.

Section MISCOPS

This section specifies miscellaneous operations. Currently, it covers only those provided below, but can be extended further also upon user request.

Option Description
"msc.automount_drives": [
  "DriveLabel01",
  "DriveLabel02"
]
sets the external drive(s) provided as a comma-separated array of drive labels to automount on each system reboot, if the drives are mounted. Technically, the script will attempt to add the mounted drives to the system file /etc/fstab (default=nul).
"msc.avatar_enable": 0
enables (1)/disables (default=0) the user avatar displayed on system login.
"msc.avatar_image": "popos.png"
sets an image file for the user avatar, if "msc.avatar_enable": 1. Requires a JPEG or PNG image not greater than 512x512 pixels to be in ./data/misc (see: 3. Prepare your files) (default="popos.png").
"msc.bookmarked_dirs": [
  "/mnt/DriveLabel01/My-Docs",
  "/home/<username>/My-Books",
  "/home/<username>/My-Projects"
]
bookmarks the selected directories provided as a comma-separated array of GNOME Files/Nautilus paths for easy access (default=nul).
"msc.crontab_cmds": [
  "0 21 * * * fsearch -u >> /path/to/cron-jobs.log 2>&1",
  "3 22 * * * /bin/sh /path/to/Portables/rsync-script.sh"
]
sets cron jobs for the user provided as a comma-separated array of jobs (default=nul).
"msc.gnome_calc_functions": [
  "ratio(d;D)=(d÷2)^2÷(D÷2)^2@"
]
appends custom user functions provided as a comma-separated array of functions to GNOME Calc (default=nul).
"msc.gnome_custom_settings": [
  "org.gnome.calculator button-mode 'advanced'",
  "org.gnome.calculator show-thousands true",
  "org.gnome.desktop.input-sources per-window true",
  "org.gnome.desktop.interface clock-format '24h'",
  "org.gnome.desktop.interface font-antialiasing 'rgba'",
  "org.gnome.desktop.privacy old-files-age uint32 7",
  "org.gnome.desktop.privacy recent-files-max-age 30",
  "org.gnome.desktop.privacy remove-old-temp-files true",
  "org.gnome.desktop.privacy remove-old-trash-files true",
  "org.gnome.desktop.screensaver lock-enabled false",
  "org.gnome.desktop.session idle-delay uint32 0"
]
sets custom GNOME GSettings not specified under msc.gnome_settings and provided as a comma-separated array of individual settings. The relevant key/value pairs can be obtained using tools like GNOME's native GSettings or DConf-Editor. Please note the use of escaped characters (e.g., \") (default=nul).
"msc.gnome_extensions": [
  "gsconnect",
  "openweather",
  "transparent top bar adjustable transparency"
]
downloads and installs extensions provided as a comma-separated array of extension titles from GNOME Extensions (default=nul).
"msc.gnome_extension_settings": [
  "/org/gnome/shell/extensions/openweather/decimal-places 0",
  "/org/gnome/shell/extensions/openweather/disable-forecast false",
  "/org/gnome/shell/extensions/openweather/expand-forecast true",
  "/org/gnome/shell/extensions/openweather/pressure-unit \"'mmHg'\"",
  "/org/gnome/shell/extensions/openweather/refresh-interval-current 3600",
  "/org/gnome/shell/extensions/openweather/show-comment-in-panel true",
  "/org/gnome/shell/extensions/openweather/wind-direction true",
  "/org/gnome/shell/extensions/openweather/wind-speed-unit \"'m/s'\"",
  "/com/ftpix/transparentbar/transparency 0"
]
sets GNOME extension settings provided as a comma-separated array of DConf settings. The relevant key/value pairs can be obtained using tools like GNOME's native GSettings or DConf-Editor. Please note the use of escaped characters (e.g., \") (default=nul).
"msc.gnome_favourites": [
  "audacity",
  "codium",
  "deadbeef",
  "firefox",
  "gnome-control-center",
  "gnome-terminal",
  "libreoffice writer",
  "nautilus",
  "repoman"
]
pins user's favourite packages provided as a comma-separated array of package names (as found under "pkg.portables" or "pkg.installers") to dock (default=nul).
"msc.gnome_settings": {
  "button_layout": "close",
  "button_position": "right",
  "capslock_as_extra_escape": 0,
  "centre_windows_on_open": 0,
  "check_alive_timeout": 5000,
  "compose_key": "sclk",
  "font_scaling_factor": "1.0",
  "font_terminal": "Fira Mono 12",
  "font_ui": "Fira Sans Semi-Light 10",
  "keyboard_languages": "us,fr,it",
  "launch_browser": "<Super>b",
  "launch_files": "<Super>f",
  "launch_settings": "<Primary><Shift>s",
  "launch_terminal": "<Super>t",
  "set_wallpaper": "/path/to/my/fav/wallpaper.jpeg",
  "show_seconds": 1,
  "show_weekdays": 1,
  "switch_workspace_down": "<Primary><Super>bracketleft",
  "switch_workspace_up": "<Primary><Super>bracketright",
  "windows_close": "<Alt>q",
  "windows_maximise": "<Super>M",
  "windows_minimise": "<Super>Z"
}
provides an option to quickly and effectively set GNOME settings without dealing with the GSettings interface. For the list of options and syntax, please consult man 7 xkeyboard-config. If specified path(s) point to drive(s) to be mounted automatically upon system launch (see: msc.automount_drives), please make sure to indicate their pre-mount path(s).
"msc.ms_fonts": 0
downloads and installs up-to-date fonts by Microsoft, including Arial, Calibri, Segoe, Tahoma, etc., from an external source (default=0).
"msc.set_geary": 0
sets GNOME's email client Geary (default=0).
"msc.volume_overamplify": 0
sets the system volume to over-amplification mode disabled by default (default=0).
"msc.wallpaper_on": 0
copies or downloads wallpapers from an external location (default=0).
"msc.wallpaper_src_dir": "$HOME/Pictures/Wallpapers"
sets the source directory for wallpapers (default=nul).
"msc.wallpaper_ext_dir": "/path/to/external/directory/for/wallpapers"
sets the external directory for wallpapers (default=nul).
"msc.week_starts_on_monday": 0
sets Monday as the first day of the week (default=0).

3. Prepare your files

In addition to customising the configuration file, you will also need to feed POPPI with your custom files from the DATA directory, as described below. After the first run of the script, all the directories will be created in the same directory. But you will find most of them empty, waiting for your input.

Directory CONFIGS

A place to store all the configuration files for your installable packages. The contents of the directory will be copied directly to your $HOME, with no additional operations applied to the files or directories contained within. Therefore, please be careful about what you place in CONFIGS.

Directory CONFIGSP

A place to store all the configuration files for your portable packages. The contents of the directory will be copied directly to the location with your portables, as necessary, with no additional operations applied to the files or directories contained within. Therefore, please be careful about what you place in CONFIGSP.

Directory DOTFILES

A place to store all your .dotfiles. The files will be copied directly to your $HOME directory as well.

Directory FIREFOX

A place to store all the files to be copied to your Firefox profile directory, which is typically located at ~/.mozilla/firefox/<your_profile_directory>. E.g., customs CSS stylesheets, user-overrides.js, custom search engines, SQL databases, etc.

Directory ICONS

Contains all the icon files for packages shipped with POPPI. They will be copied to ~/.local/share/hicolor/scalable/apps along with the relevant package installed.

Directory LAUNCHERS

Contains all the launcher (*.desktop) files for packages shipped with POPPI. They will be copied to ~/.local/share/applications along with the relevant package installed.

Directory [LIBREOFFICE]*

This is an optional directory to hold all your downloaded LibreOffice extensions and will be created by POPPI, if the relevant option is selected in configuration file.

Directory MISC

Currently, this directory contains the following files:

  • popos.png - default avatar, if a custom one is not provided by the user.
  • poppi.desktop - a launcher file to ensure POPPI's autostart after a successful system update requiring reboot.
  • schema.json - a JSON schema to validate the user configuration file.
  • templates.tar.gz - an archive with a set of template files for LibreOffice and the default text editor, selectable from a context menu upon right-clicking the mouse in GNOME Nautilus/Files. The archive will be extracted to $HOME/Templates.

4. Run the script

Always run the script as user.

  chmod +x ./poppi.sh
  ./poppi.sh -[abcdfghipvx] [CONFIGURATION_FILE]

  Options:
  -a, --all                 Download, install and set everything
  -b, --bookmark            Bookmark select directories to GNOME Files/Nautilus
  -c, --connect             Check and configure Wi-Fi connection
  -d, --dock                Set your favourite programs on the dock
  -f, --set-firefox         Configure options for Firefox
  -g, --set-gsettings       Set GNOME GSettings
  -h, --help                Display this help message
  -i, --set-installers      Install/update non-portable programs
  -p, --set-portables       Install/update portable programs
  -v, --version             Display version info
  -x, --gnome-extensions    Get and enable GNOME extensions

Default external portables and repositories

Package Key
Audacity audacity
Bleachbit bleachbit
Calibre calibre
CPU-X cpux
cURL curl
DConf-Editor dconf-editor
Deadbeef deadbeef
FFMPEG ffmpeg
FSearch fsearch
GIMP gimp
HW-Probe hwprobe
ImageMagick imagemagick
Inkscape inkscape
jq jq
KeePassXC keepassxc
Krita krita
LibreOffice libreoffice
lmsensors lmsensors
MuseScore musescore
Neofetch neofetch
PDF TOC Generator pdftocgen
QBitTorrent qbittorrent
SMPlayer smplayer
SQLite Browser sqlitebrowser
Styli.sh stylish
TeamViewer teamviewer
Virt-Manager virt-manager
VS Codium codium
XnViewMP xnview
Xournal++ xournalpp
YouTube DLP ytdlp

Issues & Help

  • Please check known issues.
  • Please include the log file and terminal output while opening an issue.