From 5735d0cabc065bcdca438e8c532d0c7b1fd58450 Mon Sep 17 00:00:00 2001 From: Matvey <35634442+ronanru@users.noreply.github.com> Date: Fri, 1 Dec 2023 15:42:09 +0300 Subject: [PATCH] feat: copy button on terminal commands (#641) --- data/distro.yml | 372 +++++++++++++++---------------- source/javascripts/command.js | 39 ++++ source/layouts/layout.haml | 1 + source/stylesheets/site.css.scss | 22 ++ 4 files changed, 237 insertions(+), 197 deletions(-) create mode 100644 source/javascripts/command.js diff --git a/data/distro.yml b/data/distro.yml index 1336aae2..2c6bc32c 100644 --- a/data/distro.yml +++ b/data/distro.yml @@ -5,30 +5,26 @@
To install Flatpak on Ubuntu 18.10 (Cosmic Cuttlefish) or later, simply run:
-
- $ sudo apt install flatpak
-
+ With older Ubuntu versions, the official Flatpak PPA is the recommended way to install Flatpak. To install it, run the following in a terminal:
-
- $ sudo add-apt-repository ppa:flatpak/stable
- $ sudo apt update
- $ sudo apt install flatpak
-
+ The Flatpak plugin for the Software app makes it possible to install apps without needing the command line. To install, run:
-
- $ sudo apt install gnome-software-plugin-flatpak
-
+ Note: the Software app is distributed as a Snap since Ubuntu 20.04 and does not support graphical installation of Flatpak apps. Installing the Flatpak plugin will also install a deb version of Software and result in two Software apps being installed at the same time.
Flathub is the best place to get Flatpak apps. To enable it, run:
-
- $ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ Flatpak is installed by default on Fedora Workstation, Fedora Silverblue, and Fedora Kinoite. To get started, all you need to do is enable Flathub, which is the best way to get Flatpak apps. Just download and install the Flathub repository file.
Now all you have to do is install some apps!
The above links should work on the default GNOME and KDE Fedora installations, but if they fail for some reason you can manually add the Flathub remote by running: -
- $ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ To install Flatpak, run the following in the terminal:
-
- $ sudo apt install flatpak
-
+ A more up to date flatpak package is available in the Debian backports repository.
Flathub is the best place to get Flatpak apps. To enable it, run:
-
- $ flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ Flatpak is installed by default on Red Hat Enterprise Linux Workstation 9 and newer. To get started, all you need to do is enable Flathub, which is the best way to get Flatpak apps. Just download and install the Flathub repository file.
To install Flatpak on Red Hat Enterprise Linux Workstation 8 or older, run the following in a terminal: -
- $ sudo yum install flatpak
-
+ Now all you have to do is install some apps!
The above links should work on the default Red Hat Enterprise Linux Workstation 9 installation, but if they fail for some reason you can manually add the Flathub remote by running: -
- $ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ Flatpak is available in the default repositories of all currently maintained openSUSE Leap and openSUSE Tumbleweed versions.
If you prefer a graphical installation, you can install Flatpak using a "1-click installer" from software.opensuse.org. If your distribution version is not shown by default, click Show flatpak for other distributions first and then select from the list.
Alternatively, install Flatpak from the command line using Zypper:
-
- $ sudo zypper install flatpak
-
+ Flathub is the best place to get Flatpak apps. To enable it, run:
-
- $ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ To install Flatpak, run the following in a terminal:
-
- $ sudo pacman -S flatpak
-
+ A flatpak package is available in Debian Buster and newer. To install it, run the following as root:
-
- # apt install flatpak
-
+ If you are running GNOME, it is also a good idea to install the Flatpak plugin for GNOME Software. To do this, run:
-
- # apt install gnome-software-plugin-flatpak
-
+ If you are running KDE Plasma, you can install the Flatpak plugin for KDE Discover instead:
-
- # apt install plasma-discover-backend-flatpak
-
+ Flathub is the best place to get Flatpak apps. To enable it, run:
-
- # flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ Flatpak is installed by default on Rocky Linux 8 and newer, when installed with a software selection that includes GNOME (Server with GUI, Workstation). If you are using such a system, you may skip this step. To install Flatpak on Rocky Linux, run the following in a terminal:
-
- $ sudo dnf install flatpak
-
+ Flathub is the best way to get Flatpak apps. To enable it, download and install the Flathub repository file, or run the following in a terminal:
-
- $ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ To complete setup, restart your system. Now all you have to do is install some apps!
@@ -267,20 +249,18 @@To install Flatpak, enable the ~amd64 keyword for sys-apps/flatpak, acct-user/flatpak and acct-group/flatpak:
-
- # echo -e 'sys-apps/flatpak ~amd64\nacct-user/flatpak ~amd64\nacct-group/flatpak ~amd64\ndev-util/ostree ~amd64' >> /etc/portage/package.accept_keywords/flatpak
-
+ Then, install Flatpak:
-
- # emerge sys-apps/flatpak
-
+ Flathub is the best place to get Flatpak apps. To enable it, run:
-
- $ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ To install Flatpak on Kubuntu 18.10 (Cosmic Cuttlefish), simply run:
-
- $ sudo apt install flatpak
-
+ With older Kubuntu versions, the official Flatpak PPA is the recommended way to install Flatpak. To install it, run the following in a terminal:
-
- $ sudo add-apt-repository ppa:alexlarsson/flatpak
- $ sudo apt update
- $ sudo apt install flatpak
-
+ The Flatpak plugin for the Software app makes it possible to install apps without needing the command line (available on Kubuntu 18.04 and newer). To install on 18.04, run:
-
- $ sudo apt install plasma-discover-flatpak-backend
-
+ On Kubuntu 20.04 or later, you should run this instead:
-
- $ sudo apt install plasma-discover-backend-flatpak
-
+ Flathub is the best place to get Flatpak apps. To enable it, run:
-
- $ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ To install Flatpak, run the following in a terminal:
-
- $ sudo eopkg install flatpak xdg-desktop-portal-gtk
-
+ Flathub is the best place to get Flatpak apps. To enable it, run:
-
- $ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ Flatpak can be installed from the community repository. Run the following in a terminal:
-
- $ doas apk add flatpak
-
+ You can install the Flatpak plugin for either the GNOME Software (since v3.13) or KDE Discover (since v3.11), making it possible to install apps without needing the command line. To install, for GNOME Software run:
-
- $ doas apk add gnome-software-plugin-flatpak
-
+ And for KDE Discover, run this instead:
-
- $ doas apk add discover-backend-flatpak
-
+ Flathub is the best place to get Flatpak apps. To enable it, run:
-
- $ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ A flatpak package is available for Mageia 6 and newer. To install with DNF, run the following as root:
-
- # dnf install flatpak
-
+ Or, to install with urpmi
, run:
- # urpmi flatpak
-
+ Flathub is the best place to get Flatpak apps. To enable it, run:
-
- $ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ To install Flatpak on Pop!_OS 19.10 and earlier, simply run:
-
- $ sudo apt install flatpak
-
+ Flathub is the best place to get Flatpak apps. To enable it, run:
-
- $ flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ A flatpak package is available in Raspberry Pi OS (previously called Raspbian) Stretch and newer. To install it, run the following as root:
-
- # apt install flatpak
-
+ Flathub is the best place to get Flatpak apps. To enable it, run:
-
- # flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ Important note: As of March 2021, Raspberry Pi computers still ship with the 32-bit version of Raspberry Pi OS. However Flathub started phasing out support for that architecture. If you consider Flathub as an important source of applications, it is recommended to use Raspberry Pi OS 64-bit as newer applications are more likely to be available for that platform.
Flatpak is installed and Flathub repository is pre-configured by default on Clear Linux when installing the desktop bundle.
-
- $ sudo swupd bundle-add desktop
-
+ Now all you have to do is install some apps!
To install Flatpak, run the following:
-
- $ sudo xbps-install -S flatpak
-
+ Flathub is the best place to get Flatpak apps. To enable it, run:
-
- $ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ services.flatpak.enable
to true
by putting the following into your /etc/nixos/configuration.nix
:
-
+
services.flatpak.enable = true;
-
+
Then, rebuild and switch to the new configuration with:
-
- $ sudo nixos-rebuild switch
-
+ For more details see the NixOS documentation.
Flathub is the best place to get Flatpak apps. To enable it, run:
-
- $ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ To install Flatpak on Turkman Linux, run the following in a terminal:
-
+
Emerge way
- # ymp install build-base --no-emerge
- # ymp install flatpak
+ ymp install build-base --no-emerge
+ ymp install flatpak
No emerge way
- # ymp install flatpak --no-emerge
-
+ ymp install flatpak --no-emerge
+
To enable services on Turkman Linux, run the following in a terminal:
-
- # rc-service add devfs
- # rc-service add fuse
- # rc-service add hostname
-
+ Flathub is the best place to get Flatpak apps. To enable it, run:
-
- $ flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
-
+ To install Flatpak, run the following:
-
- $ sudo neko em flatpak
-
+ Flathub is the best place to get Flatpak apps. To enable it, run:
-
- $ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ To install Flatpak, run the following:
-
- $ sudo apt install flatpak
-
+ Flathub is the best place to get Flatpak apps. To enable it, run:
-
- $ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ To install light and dark themes, run:
-
- $ flatpak install flathub org.gtk.Gtk3theme.deepin
- $ flatpak install flathub org.gtk.Gtk3theme.deepin-dark
-
+ A flatpak package is available in Pardus 2019 and newer. To install it, run the following as root:
-
- # apt install flatpak
-
+ For Pardus 2017 and older versions, a flatpak package is available in the official backports repository.
If you are running GNOME, it is also a good idea to install the Flatpak plugin for GNOME Software. To do this, run:
-
- # apt install gnome-software-plugin-flatpak
-
+ Flathub is the best place to get Flatpak apps. To enable it, run:
-
- # flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ A flatpak package is available in Pisi 2.1 and newer. To install it, run the following as root:
-
- $ sudo pisi it flatpak
-
+ Flathub is the best place to get Flatpak apps. To enable it, run:
-
- $ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ To install Flatpak on EndeavorOS, you must first make sure your installation is up to date, run the following in a terminal:
-
- $ sudo pacman -Syu
-
+ Then install Flatpak:
-
- $ sudo pacman -S flatpak
-
+ Flathub is the best place to get Flatpak apps. To enable it, run:
-
- $ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+ Flatpak can be installed from GNU Guix's default repositories. Run the following in a terminal:
-
- $ guix install flatpak
-
+ Flathub is the best place to get Flatpak apps. To enable it, run:
-
- $ flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
+