In a previous blog post (and another one), I showed how to install Arch Linux on a PineBook Pro.
In this blog post, I’m showing how I customize KDE on that installation (thus, it is similar to this other one for GNOME).
I’m not using Wayland because I still don’t find it usable in Plasma. Indeed, I haven’t even installed the Wayland session: I’m using X11.
First of all, the default screen resolution of KDE is too tiny for my eyes. Thus, I set 150% (fractional) scaling:
After that, you have to log out and log in to see the setting in effect.
I also enable “Tap-to-click” in the “Touchpad” settings.
Then, I set “Ctrl+Alt+T” as a shortcut for opening the terminal (Konsole). Actually, the shortcut is already configured in the “Custom Shortcuts”, but it’s not enabled by default in this distribution. It’s just a matter of selecting the corresponding checkbox (the “Examples” checkbox must be selected first to enable the other checkbox):
Then, I install an AUR helper. I like “yay,” so I first installed the needed dependencies:
1 |
sudo pacman -S --needed git base-devel |
And then
1 2 3 4 5 |
mkdir -p ~/git cd ~/git git clone https://aur.archlinux.org/yay.git cd yay makepkg -si |
I install, by using “yay”, the “touchegg” program for touchpad gestures. (Plasma Wayland already provides touchpad gestures, but I prefer to use the X11 session, as I said above). For ARM, we need to install the AUR package:
1 |
yay -S touchegg |
You will get this warning, but proceed anyway: it compiles and works fine:
1 2 3 4 |
:: (1/1) Parsing SRCINFO: touchegg -> The following packages are not compatible with your architecture: touchegg :: Try to build them anyway? [Y/n] |
I customize touchegg touchpad gestures for KDE by creating the file “~/.config/touchegg/touchegg.conf” with the following contents:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
<touchégg> <settings> <!-- Delay, in milliseconds, since the gesture starts before the animation is displayed. Default: 150ms if this property is not set. Example: Use the MAXIMIZE_RESTORE_WINDOW action. You will notice that no animation is displayed if you complete the action quick enough. This property configures that time. --> <property name="animation_delay">150</property> <!-- Percentage of the gesture to be completed to apply the action. Set to 0 to execute actions unconditionally. Default: 20% if this property is not set. Example: Use the MAXIMIZE_RESTORE_WINDOW action. You will notice that, even if the animation is displayed, the action is not executed if you did not move your fingers far enough. This property configures the percentage of the gesture that must be reached to execute the action. --> <property name="action_execute_threshold">10</property> <!-- Global animation colors can be configured to match your system colors using HEX notation: <color>909090</color> <borderColor>FFFFFF</borderColor> You can also use auto: <property name="color">auto</property> <property name="borderColor">auto</property> Notice that you can override an specific animation color. --> <property name="color">auto</property> <property name="borderColor">auto</property> </settings> <!-- Configuration for every application. --> <application name="All"> <gesture type="SWIPE" fingers="3" direction="UP"> <action type="RUN_COMMAND"> <repeat>false</repeat> <command>qdbus org.kde.kglobalaccel /component/kwin invokeShortcut 'Expose'</command> <on>begin</on> </action> </gesture> <gesture type="SWIPE" fingers="3" direction="DOWN"> <action type="SHOW_DESKTOP"> <animate>true</animate> </action> </gesture> <gesture type="SWIPE" fingers="3" direction="RIGHT"> <action type="CHANGE_DESKTOP"> <direction>previous</direction> <animate>true</animate> <animationPosition>left</animationPosition> <color>000000</color> <borderColor>000000</borderColor> </action> </gesture> <gesture type="SWIPE" fingers="3" direction="LEFT"> <action type="CHANGE_DESKTOP"> <direction>next</direction> <animate>true</animate> <animationPosition>right</animationPosition> <color>000000</color> <borderColor>000000</borderColor> </action> </gesture> <gesture type="PINCH" fingers="3" direction="IN"> <action type="RUN_COMMAND"> <repeat>false</repeat> <command>qdbus org.kde.kglobalaccel /component/kwin invokeShortcut 'ShowDesktopGrid'</command> <on>begin</on> </action> </gesture> <gesture type="PINCH" fingers="3" direction="OUT"> <action type="RUN_COMMAND"> <repeat>false</repeat> <command>qdbus org.kde.kglobalaccel /component/kwin invokeShortcut 'ShowDesktopGrid'</command> <on>begin</on> </action> </gesture> <gesture type="SWIPE" fingers="4" direction="UP"> <action type="RUN_COMMAND"> <repeat>true</repeat> <command>qdbus org.kde.kglobalaccel /component/kmix invokeShortcut 'increase_volume'</command> <decreaseCommand>qdbus org.kde.kglobalaccel /component/kmix invokeShortcut 'decrease_volume'</decreaseCommand> <on>begin</on> </action> </gesture> <gesture type="SWIPE" fingers="4" direction="DOWN"> <action type="RUN_COMMAND"> <repeat>true</repeat> <command>qdbus org.kde.kglobalaccel /component/kmix invokeShortcut 'decrease_volume'</command> <decreaseCommand>qdbus org.kde.kglobalaccel /component/kmix invokeShortcut 'increase_volume'</decreaseCommand> <on>begin</on> </action> </gesture> </application> <!-- Configuration for specific applications. --> <application name="Google-chrome,Chromium,Firefox,Brave-browser,brave-browser"> <gesture type="PINCH" fingers="2" direction="IN"> <action type="SEND_KEYS"> <repeat>true</repeat> <modifiers>Control_L</modifiers> <keys>KP_Subtract</keys> <decreaseKeys>KP_Add</decreaseKeys> </action> </gesture> <gesture type="PINCH" fingers="2" direction="OUT"> <action type="SEND_KEYS"> <repeat>true</repeat> <modifiers>Control_L</modifiers> <keys>KP_Add</keys> <decreaseKeys>KP_Subtract</decreaseKeys> </action> </gesture> <!-- Change KP_Left to KP_Right if you prefer the other direction --> <gesture type="SWIPE" fingers="4" direction="RIGHT"> <action type="SEND_KEYS"> <repeat>false</repeat> <modifiers>Alt_L</modifiers> <keys>KP_Left</keys> <on>begin</on> </action> </gesture> <!-- Change KP_Right to KP_Left if you prefer the other direction --> <gesture type="SWIPE" fingers="4" direction="LEFT"> <action type="SEND_KEYS"> <repeat>false</repeat> <modifiers>Alt_L</modifiers> <keys>KP_Right</keys> <on>begin</on> </action> </gesture> <gesture type="PINCH" fingers="4" direction="IN"> <action type="SEND_KEYS"> <repeat>true</repeat> <modifiers>Control_L</modifiers> <keys>Shift_L+Tab</keys> <decreaseKeys>Shift_L+Tab</decreaseKeys> <on>begin</on> </action> </gesture> <gesture type="PINCH" fingers="4" direction="OUT"> <action type="SEND_KEYS"> <repeat>true</repeat> <modifiers>Control_L</modifiers> <keys>Tab</keys> <decreaseKeys>Shift_L+Tab</decreaseKeys> <on>begin</on> </action> </gesture> </application> </touchégg> |
In particular, note the 3-finger gestures (for the “Expose” effect, hide all windows, switch workspace, etc.).
Let’s start “touchegg” and verify that gestures work
1 |
touchegg |
And then let’s enable it so that it automatically starts on the subsequent boots:
1 |
sudo systemctl enable touchegg.service |
Let’s move on to ZSH, which I prefer as a shell:
1 |
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”):
1 |
sudo pacman -S powerline-fonts fzf curl |
Let’s install “Oh My Zsh” by running the following command as documented on its website:
1 |
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”:
I then install some external plugins:
1 2 3 4 5 |
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):
1 |
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:
1 |
curl -sS https://starship.rs/install.sh | sh |
Now, let’s edit the ~/.zshrc file again; we comment the line starting with “ZSH_THEME,” and we add to the end of the file:
1 |
eval "$(starship init zsh)" |
Opening another ZSH shell, we should see the fantastic Starship prompt in action, e.g.,
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):
1 2 3 4 5 |
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 “Baloo” for file indexing and searching, e.g., from “KRunner” (Alt+Space) or the application launcher (Alt+F1 or simply Meta). I like it, and it quickly keeps the index up to date. However, by default, baloo also indexes the file contents, which uses too many resources, so I disable the content indexing feature. I blogged about configuring baloo in another post.
Speaking about KRunner, I find it extremely slow on this laptop; especially the first time you run it, it might take a few seconds to show up. I often use it to search for files or programs, and I need such a mechanism to be fast. I found that the application launcher is instead fast to start (Meta key). However, when you start typing to search, the results are all mixed: applications, files, and settings are all together, and it might not be easy to find what you need:
For this reason, I right-click on the KDE icon and select the “Alternative” “Application Menu”:
This launcher has a valuable feature to categorize the search results. For example, with the exact search string as above, I get results clearly separated:
I also use the “yakuake” drop-down terminal a lot:
1 |
sudo pacman -S yakuake |
I run it once (it’s enabled by default by pressing “F12”), and it will start automatically upon logging in.
That’s all! I hope you enjoyed this post. 🙂
You might also look at my other posts on this PineBook Pro laptop.