Turn your Linux Productivity just like a Mac

Turn your Linux Productivity just like a Mac

An article on its journey to be a handbook for Linux Developer Productivity

ยท

3 min read

Inspiration

Curiosity drives Inspiration. Stay Curious!

I got my first hands-on experience on MacBook M1, while doing my internship at Affinidi, Singapore. With due course of time, I found Macbook super productive, from the developer's perspective.

This inspired me to do research, try and build a similar experience on Linux. The distros, I use here is Ubuntu. And I am pretty sure that, this will be helpful for your developer productivity

Future Note: My aim to make this article kind of a handbook, so I will keep adding more to this article with time


Here is the updated list, currently we will cover!

  1. Spotlight Search on Linux [ covers the system wide file search, applications, web-search, and even adding your own tool, just like a mac ]

Lets get started.

Spotlight Search On Linux. ๐Ÿ”

banner

Spending around 8 hours of searching, testing and trying out various tools, I could come up with the certainly the most flexible, efficient and pluggable one ULauncher.io

Wait, we have to do lot of configuration, to make it for our use
Follow these super simple steps

Installation of ULauncher happens here:

sudo add-apt-repository ppa:agornostal/ulauncher && sudo apt update && sudo apt install ulauncher

Once installed, and after launching the application, press Ctrl+Space, you can get the first glimpse of a search bar, just like spotlight search.

Wait, this is just a search for app, we have to configure it for system wide searches

To do it, click on the gear icon on the right.

image.png

This opens up a new configuration window, like this

image.png

Once opened, now head over to Extensions Tab, and click on + Add Extension And Paste these URLs one by one. We will discuss what they do below.

image.png

https://github.com/leogouveia/ulauncher-npmjs
https://github.com/plibither8/ulauncher-vscode-recent
https://github.com/NastuzziSamy/ulauncher-youtube-search
https://github.com/melianmiko/ulauncher-nmcli
https://github.com/Ulauncher/ulauncher-emoji

The most important extension

Add this extension to enable file-search. And wait, this is quite a bit slow, but we will make it faster.

https://github.com/brpaz/ulauncher-file-search

So before making it faster, we need to know, why is it slow. The tool uses the following cli tool behind the scenes. Install it, if you havent. Otherwise it wont work

sudo apt install fd-find

Lets go back to Ulauncher Preferences aka configuration window. Head over to Extensions tab, and click on File Search extension, and you can see something like this on the screen. And focus on Base Directory

image.png

You may observe, your base directory is /, that means, the extension is trying to search over every file, including OS, Registries. And thats the reason why its slow.

Fixing the Slow File Search

Now we know why File Search is slow, lets fix it by replacing Base Dir Location from / to /home/<user-name>

Replace <user-name> with the root user name of the linux machine, for my case its imabp

image.png

This makes sure, it searches the files you want to see under your username.

What about other extensions ?

Well we installed,

  • NPMJS extension, press Ctrl+Space and try searching NPMJS <somepackage>, wait for 4-5 seconds, depends on your internet network and search list.

  • Youtube Extension, press Ctrl+Space and try searching yt lorem, wait for 2-3 seconds, you get the list. Click and view.

  • Emoji Extension, press Ctrl+Space and try searching em smile you get the emoji, click on any emoji, it gets copied to clipboard, you can paste it on notepad, twitter, even this ๐Ÿ” is being pasted using emoji extension


This covers the first part of this article, building a spotlight search. With time, I will try to add more to this article on the list on developer productivity

To know and stay/start being connected, here's my twitter: twitter.com/imabptweets image.png