Skip to content

Instantly share code, notes, and snippets.

@CouldBeThis
Last active January 23, 2023 04:10
Show Gist options
  • Save CouldBeThis/160e70d9006ff4ea385fdc431f1aa163 to your computer and use it in GitHub Desktop.
Save CouldBeThis/160e70d9006ff4ea385fdc431f1aa163 to your computer and use it in GitHub Desktop.
🧰 🥽 [gui tools] fast access via keyboard with `rofi`

🧰 🥽 [gui tools] fast access via keyboard with rofi

repo: davatorium/rofi: Rofi: A window switcher, application launcher and dmenu replacement

use Keyboard > Application Shortcuts setting panel in WM to create shortcut (I used alt+space)

simple use

rofi -show drun  -show-icons -sidebar-mode -show-icons
rofi -modi "drun,window,run,ssh" -drun -show drun -show-icons -sidebar-mode -window-format "{w}{t}{c}" \   

-font "ProFont 24"

most useful features enabled

rofi -modi "drun,window,keys,filebrowser" \
  -drun -show drun -i \
  -sort -sorting-method fzf  \
 \
  -sidebar-mode \
  -scroll-method: 1 \
 \
  -drun-display-format "{name} {comment} {exec}" \
  -window-format "[{w}] {n} {t}{c}" \
  -show-icons \
 \
 -kb-clear-line "Alt+k" \
 -kb-mode-next "Alt+Right,Tab" \
 -kb-mode-previous "Alt+Left,Shift+Tab,Alt+Tab" \
 -kb-row-tab "" \
\
 -dpi 150 

with icing

should probably use a script of config file or something for these instead of running like this.

rofi -modi "drun,window,windowcd,emoji,keys,calc,filebrowser,run" \
  -drun -show drun -i \
  -sort -sorting-method fzf  \
 \
  -sidebar-mode \
  -scroll-method: 1 \
 \
  -drun-display-format "{name} {comment} {exec}" \
  -window-format "[{w}] {n} {t}{c}" \
  -show-icons \
 \
 -kb-clear-line "Alt+k" \
 -kb-mode-next "Alt+Right,Tab" \
 -kb-mode-previous "Alt+Left,Shift+Tab,Alt+Tab" \
 -kb-row-tab "" \
 -kb-mode-previous "Shift+Left,Control+ISO_Left_Tab" \
\
 -dpi 150 \
 -theme-str "window {width: 80%;}" \
 -keep-right

comments on the above:

  • -i - case insensitive

  • -sidebar-mode - if not set, will not show the menu of different modes

  • -kb-row-tab "" - it seems to be required to clear/reset deafult kb shortcuts prior to reassgning them

styling via command

specify font and size:

 -font "ProFont 24" 

themes

patrick-motard/dotfiles Wiki: Editing Themes + Live Reload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment