fzdwx

fzdwx

Hello , https://github.com/fzdwx

一個在Linux中的應用程式啟動器:Rofi

今天發現了一個在 Linux 下的應用程式啟動器 rofi,它可以快速切換視窗和啟動程式,
我使用它和wmctrl進行配合使用。

我的使用過程:

  1. Archlinux 安裝
yay -S rofi
  1. 添加自訂快捷鍵綁定 hotkey 為alt+space觸發rofi -show

  2. 按下alt+space,然後使用shift+leftright進行切換 mode。


更改主題以及顯示圖示

  1. 生成配置檔案
mkdir -p ~/.config/rofi
rofi -dump-config > ~/.config/rofi/config.rasi
  1. 顯示圖示
sed -i '8c show-icons: true;' ~/.config/rofi/config.rasi
  1. 更換主題

參考 https://github.com/lr-tech/rofi-themes-collection#installing-themes


我的wmctrl的配置示例

使用xprop WM_CLASS獲取前綴。

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 &"
載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。