11

Customizing Gnome in Arch Linux on a PineBook Pro

 1 year ago
source link: https://www.lorenzobettini.it/2023/04/customizing-gnome-in-arch-linux-on-a-pinebook-pro/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Customizing Gnome in Arch Linux on a PineBook Pro

In a previous blog post, I showed how to install Arch Linux on a PineBook Pro.

In this blog post, I’m showing how I customize Gnome on that installation.

First, Gnome 43 has “Gnome Console” as the default terminal application. I wouldn’t say I like it since it’s too basic. So I install the traditional “Gnome Terminal”:

sudo pacman -S gnome-terminal

Then, I set “Ctrl+Alt+T” as a shortcut for opening the terminal:

gnome-terminal-shortcut-1.png?resize=625%2C540&ssl=1

gnome-terminal-shortcut-2.png?resize=625%2C388&ssl=1

Then, I install an AUR helper. I like “yay,” so I first installed the needed dependencies:

sudo pacman -S --needed git base-devel

And then

mkdir -p ~/git
cd ~/git
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si

I install, by using “yay”, the helper the “Gnome Browser Connector” to install Gnome extensions from Firefox (Some extensions are already installed by default as system extensions. You can use the “Extensions” application to enable/disable extensions):

yay -S gnome-browser-connector

Now I can navigate to https://extensions.gnome.org and install and enable a few extensions (you also need to install the Firefox extension add-on when asked). For example, “AppIndicator and KStatusNotifierItem Support” and “X11 Gestures”.

The last extension helps enable Touchpad gestures in the X11 session (Gnome Wayland already provides touchpad gestures, but I prefer to use the X11 session). This extension relies on “touchegg” that must be installed. For ARM, we need to install the AUR package:

yay -S touchegg

You will get this warning, but proceed anyway: it compiles and works fine:

:: (1/1) Parsing SRCINFO: touchegg
-> The following packages are not compatible with your architecture:
  touchegg
:: Try to build them anyway? [Y/n]

Let’s start “touchegg” and verify that gestures work

sudo systemctl start touchegg

And then let’s enable it so that it automatically starts on the subsequent boots:

sudo systemctl enable touchegg.service

Let’s move on to ZSH, which I prefer as a shell:

sudo pacman -S zsh

Since I’m going to install “Oh My Zsh” and other Zsh plugins, I install these fonts (remember from the previous post that I had already installed “noto-fonts” and “noto-fonts-emoji”) and finder tool (“curl” is required for the installation of “Oh My Zsh”):

sudo pacman -S powerline-fonts fzf curl

Let’s install “Oh My Zsh” by running the following command as documented on its website:

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

When asked, I agreed to change my default shell to Zsh. In the end, we should see the prompt changed to the default one of “Oh My Zsh”:

pinebook-pro-omz.png?resize=625%2C445&ssl=1

I then install some external plugins:

git clone --depth 1 https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone --depth 1 https://github.com/zsh-users/zsh-completions.git $ZSH_CUSTOM/plugins/zsh-completions
git clone --depth 1 https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting

And I enable them by editing the ~/.zshrc, in particular, the “plugins” line (I also enable other plugins that are part of the OMZ distribution):

plugins=(git aliases branch zsh-autosuggestions zsh-syntax-highlighting zsh-completions zsh-interactive-cd zsh-navigation-tools)

Once saved, you have to start a new terminal with zsh to see the plugins in action (remember that, until you log out and log in, the default shell is still BASH, so you might have to run “zsh” manually to switch to ZSH in the currently logged session).

Besides the syntax highlighting for commands, you have completion after “cd” (press TAB), excellent command history (with Ctrl+R), suggestions, etc.

Let’s switch to the “Starship” prompt. Let’s run the documented installation program:

curl -sS https://starship.rs/install.sh | sh

Now, let’s edit the ~/.zshrc file again; we comment out the line starting with “ZSH_THEME,” and we add to the end of the file:

eval "$(starship init zsh)"

Opening another ZSH shell, we should see the fantastic Starship prompt in action, e.g.,

pinebook-pro-starship-prompt.png?resize=364%2C286&ssl=1

To quickly search for file names from the command line, I install “locate”, enable its periodic indexing and run the indexing once the first time (if you’re on a BTRFS file system, you might want to have a look at this older post of mine):

sudo pacman -S plocate
sudo systemctl enable plocate-updatedb.timer
sudo updatedb

Then, you should be able to look for files with the command “locate” quickly.

Gnome uses “Tracker” (in the current version, the command is “tracker3”) for file indexing and searching, e.g., from the “Activities” view. I like it, and it quickly keeps the index up to date. However, the “tracker extract” service also indexes the file contents, and that uses too many resources, so I disable that service:

systemctl --user mask tracker-extract-3.service

I also use the “guake” drop-down terminal a lot:

sudo pacman -S guake

I run it once (it’s enabled by default by pressing “F12”), and I configure it to start automatically when Gnome starts (by running “Guake Preferences” -> “Start Guake at login”).

I hope you enjoyed this post! 🙂

Like this:

Loading...

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK