fzdwx

fzdwx

Hello , https://github.com/fzdwx

An application launcher in Linux: Rofi

Today I discovered an application launcher for Linux called rofi, which can quickly switch windows and launch programs. I used it in conjunction with wmctrl.

My usage process:

  1. Archlinux install
yay -S rofi
  1. Add custom shortcut key binding, set hotkey as alt+space to trigger rofi -show.

  2. Press alt+space, then use shift+left or right to switch mode.


Change theme and display icons:

  1. Generate configuration file
mkdir -p ~/.config/rofi
rofi -dump-config > ~/.config/rofi/config.rasi
  1. Display icons
sed -i '8c show-icons: true;' ~/.config/rofi/config.rasi
  1. Change theme

Refer to https://github.com/lr-tech/rofi-themes-collection#installing-themes


My wmctrl configuration example:

Use xprop WM_CLASS to get the prefix.

alias chrome="wmctrl -x -a google-chrome || google-chrome-stable > /dev/null 2>&1 &"
alias note="wmctrl -x -a obsidian || /usr/bin/obsidian > /dev/null 2>&1 &"
alias codew="wmctrl -x -a code || /opt/code/code > /dev/null 2>&1 &"
alias idea="wmctrl -x -a jetbrains-idea || /opt/idea/bin/idea.sh > /dev/null 2>&1 &"
alias discord="wmctrl -x -a discord || /opt/discord/Discord > /dev/null 2>&1 &"
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.