Getting Started with Tiling WM [Part 2] - Rofi

In the part1, I’ve used rofi instead of dmenu. This part will show you how to start with rofi.

Introduction

Getting started

sudo apt install rofi -y
rofi -lines 12 -padding 18 -width 60 -location 0 -show drun -sidebar-mode -columns 3 -font 'DejaVu Sans 8'
Details
       -show mode

       Open  rofi in a certain mode. Available modes are window, run, drun, ssh, combi. The
       special argument keys can be used to open a searchable list of supported  key  bind‐
       ings (see KEY BINDINGS)

       To show the run-dialog:

           rofi -show run

       -lines

       Maximum number of lines to show before scrolling.

           rofi -lines 25

       Default: 15

       -location

       Specify  where  the window should be located. The numbers map to the following loca‐
       tions on screen:

             1 2 3
             8 0 4
             7 6 5

       Default: 0

       -padding

       Define the inner margin of the window.

       Default: 5

       -sidebar-mode

       Open in sidebar-mode. In this mode a list of all enabled modes is shown at the  bot‐
       tom. (See -modi option) To show sidebar, use:

           rofi -show run -sidebar-mode -lines 0

Tweaking

mkdir -p ~/.config/rofi/themes
touch ~/.config/rofi/themes/onedark.theme
configuration {
  show-icons: true;
  font: "DejaVu Sans Mono 10";
  modi: "window,run,drun";
}

* {
  background: #282c34;
  foreground: #abb2bf;
  background-color: @background;
  selected-normal-foreground: @foreground;
  selected-normal-background: #98c379;
  selected-urgent-background: #e5c07b;
  selected-urgent-foreground: @foreground;
  border: 5;
  lines: 12;
  padding: 0;
  margin: 0;
  spacing: 0;
}

window {
  width: 50%;
  transparency: "real";
}

mainbox {
  children: [inputbar, listview];
}

listview {
  columns: 1;
}

element {
  padding: 12;
  orientation: vertical;
  text-color: @foreground;
}

element selected {
  background-color: @selected-normal-background;
  text-color: @background;
}

inputbar {
  background-color: @background;
  children: [prompt, entry];
}

prompt {
  enabled: true;
  font: "DejaVu Sans Mono 10";
  padding: 12 0 0 12;
  text-color: @selected-urgent-background;
}

entry {
  padding: 12;
  text-color: @selected-urgent-background;
}
rofi -theme ~/.config/rofi/themes/onedark.theme -show drun
bindsym $mod+d exec rofi -theme ~/.config/rofi/themes/onedark.theme -show drun