{"id":1381,"date":"2021-12-11T22:34:31","date_gmt":"2021-12-11T17:04:31","guid":{"rendered":"https:\/\/smarttech101.com\/?p=1381"},"modified":"2023-03-25T00:50:08","modified_gmt":"2023-03-24T19:20:08","slug":"dmenu-what-it-is-and-how-i-use-it","status":"publish","type":"post","link":"https:\/\/smarttech101.com\/dmenu-what-it-is-and-how-i-use-it\/","title":{"rendered":"Dmenu – What It Is and How I Use It"},"content":{"rendered":"\n

Dmenu enables us to create something like right-click menu in Windows OS. You can use it in your shell scripts<\/a>. In these scripts, you just need to supply your list of menus to dmenu, and then you can choose any one of them. Now, based on the chosen menu, you can take any action.<\/p>\n\n\n\n

\"Right-Click
Figure: Right-click menu in Windows. Source: docs.microsoft.com <\/em><\/figcaption><\/figure>\n\n\n\n
\"dmenu
Figure: Dmenu like right-click menu<\/em> used with sxiv<\/em><\/figcaption><\/figure>\n\n\n\n

And it also comes with additional benefits:<\/p>\n\n\n\n

    \n
  1. It is based on keyboard so no hassel of going back and forth between mouse and keyboards.<\/li>\n\n\n\n
  2. You can use arrow keys or emacs key bindings<\/strong> – one of the widely used key bindings. Therefore, you don’t have to memorize any new key bindings.<\/li>\n\n\n\n
  3. For minimal dekstop environments such as those using tiling window managers, it is a gold mine. You will need it to create required features like power-menu, and application launcher such as i3-dmenu-desktop.<\/li>\n\n\n\n
  4. Despite Being a suckless utility <\/a>in nature, it works out of the box. Just supply your menu items using echo <\/strong>or printf<\/strong> and you are done.<\/li>\n\n\n\n
  5. It is a modular tool so it can be used with many other modular tools like sxiv. <\/li>\n<\/ol>\n\n\n\n

    Modularity<\/strong> brings many advantages. You can combine it with many modular packages like sxiv (an image viewer), systemctl<\/strong> suspend\/poweroff\/reboot, etc., and create your own package! This is one of the features I like about Linux. You don’t have to stay dependent on big corporates. They first create an application\/software which we want. At the start, they sell it for free or at a low cost to lure us in. And when we get dependent on these applications, they keep increasing the price. On top of that, you will have to wait for these big corporates to bring additional features you like. For example, you need to buy a whole new copy of Windows 11 for a feature called Tiling Windows available in Linux for decades. <\/p>\n\n\n\n

    In this article, you will learn about installation, available features, patches, modern-day useful examples, and how dmenu can replace many packages.<\/p>\n\n\n\n

    Table of Contents<\/h2>\n\n\n\n