Cool uses for dmenu/rofi/fzf?
I've just recently realized how awesome these fuzzy-finding menus are, and I want to know what kinds of uses you all have thought up for them. Obviously you need a .desktop application launcher, but here are some other ideas I just recently realized I could do:
- Copying usernames/passwords - I use
pass, and this eliminates my need for a browser plugin - Taking screenshots - A menu is much easier than remembering a bunch of different keyboard shortcuts for all the variations you might want
- SSH to configured servers - Fuzzy-finding > tab-key autocompletion
About this post
- Posted
- Archived
- Score
- 99 · 100% up
- Kind
- Text
- ID
- bg53as
40 comments
I have it set to open a random porno from a set directory with a keyword.
invaluable.
Lol, this is the outside-the-box kind of answer I was looking for!
Oh I see you are a man of culture as well
I have an alias named
pronthatmpv --shuffles on a directly that's hidden somewhere. I would bind it to a key but that's too risky of a convenience for its own good. :DThat's brilliant. I am humbled by ur dedication to your own self-fulfillment.
Greenclip turns rofi into a clipboard manager.
clipmenu does this as well and it's in community. +1 for Haskell though =]
Also if you use i3 (or any window manager I guess but I've not tested it with others) rofi can function as a fast window switcher
rofi -show windowPersonally i used the zsh
history-substring-matchfor years. Then I learned the proper pleasure of the simple^r/^s. Now i agument that with the standard fzf completion for it that comes with/usr/share/fzf/key-bindings.zsh.As for
rofiis just use it as a systems menu to launch IRC, mail and stuff.I didn't know about
/usr/share/fzf/key-bindings.zsh-- that's awesome! Thanks for the tip! I actually have a shell function that searches my history with fzf the same way, but I didn't know you could override^rto do the same. Snazzyvim-fzf with Ctrl-P for :Files!
https://github.com/junegunn/fzf.vim
Of course, how could I forget that one!
As for screenshots with rofi ... check out https://github.com/carnager/teiler
I use it to join wireless networks instead of nm-applet: https://github.com/firecat53/networkmanager-dmenu
This looks awesome, I was looking for an easy way of managing my laptop WiFi that was well integrated within i3, maybe is this.
E.g. filtering Git branches. Useful if you want to delete some branches for example. The command for that would be
Screenshot and script.
I have a bash function that pipes fzf into mimeo to open whatever file I search for into it's default app
Would you be willing to share that?
o() { local file
file="$(du -a --exclude={./.cache,./.mozilla, ... } | awk '{print $2}' | fzf -e -0 -1 --color=light | awk -F: '{print $1}')"
if [[ -n $file ]] then mimeo $file &>/dev/null fi }
I use it to input special characters with the help of splatmoji.
r/dmenu
[Rofi-Calc](https://github.com/svenstaro/rofi-calc), for quick calculation and rate conversion.
Package search!
My script uses either
yayorpacmanwith-Slqto list all available packages and then pipes it either torofiorfzfdepending on whether I'm in a terminal or not and then passes the selected choice to theyay/pacman -S.That last step must include a new terminal window in case rofi was used, since a sudo password is needed but works like a charm regardless.
Fish shell:
I think this is some older version, im on my phone now but I could find both newest fzf and rofi versions when I get home
I wrote git-fzf to be able to use certain git commands with fzf (with, for example, commit previews in
git fzf log)Opening multiple workspaces (useful if you use Go language with different GOPATH) with tmux session with rofi.
I think I have post the instructions here somewhere long time ago.
I will try to search and update later.
Ah, here it is: https://www.reddit.com/r/archlinux/comments/5ms98t/share_learn_to_create_rofi_module_list_and_open
I have a simple script to play certain music for a keyword. Mostly YouTube playlists through mpv.
Cool idea I've taken from Luke Smith (a dude who makes videos for youtube) is a dmenu script that lets you find and select a desired emoji easily. Generally if you want some cool dmenu uses you can check out his channel, he uses it quite a lot
I made a rofi script to search and open links from my firefox favourites: https://github.com/lamarios/dotfiles/blob/master/scripts/rofi-firefox
I do everything i can with fzf.
Some examples are
checkout / delete git branches and tags
git log
apply / delete git stash
selected and open urls from the current tmux pane
change kubernetes context
seleckt k8 pods to look at logs
list all trello tickets that are assigned to me and create a new git branch with the selection
kill processes
kill / attach to tmux sessions
list npm scripts from package.json to run
terminal bookmarks
I use rofi alongside lemonbar for shutdown options (Shutdown, Logout, Lock, etc.)
Finally a chance to mention dmenu-extended, which seems to be largely unknown and underappreciated.
Apart from being a dmenu replacement, it serves as an opener for files and folders, which it keeps indexed in a very simple text file. Locations and extensions to be indexed can be configured, and it is arguably faster than fzf, which cycles through your filesystem on the fly. While in the default config you have to refresh the index manually, there are simple integrations with incron and pacman in the README. Plus it integrates with rofi!
As long as you keep your file and folder structure neat and tidy, this is the fastest solution to access your files I came across. It is especially handy in use cases where you have to work with a library of e.g. scientific papers for research purposes.
I am wondering if there is a script that lets rofi work that it can choose a folder then search from the folder.
For me I have many pdf files in different folders. Only thing I achieved was to read from same directory.
You could use rofi to
cdinto one of those folders first. Basically using two distinct calls.This will probably meet your use case. I am constantly working on a huge library of PDFs and it made my life so much easier.
paperbenni.github.io/CloudPie
I used This a long time ago to get a Unity HUD appmenu using dmenu. Worked great! There's also this one which seems to be more updated for the same thing.
EDIT: Also to go along with your 1st thing, there's this one which displays/copies to clipboard TOTP codes using ROTP (which is an extension to Pass).
I have a script that upon invocation asks for a program name and then opens the contents of the clipboard with it. I can for example copy a youtube video link, then run my script and select mpv and the video plays. Same with sysyem paths and emacs or other software.
I have made different kinds of menus using dmenu.
netcfgprofiles and connect to chosen one. Makes it easy to select WiFi networks.I like the idea of combining fzf and dmenu/rofi for fuzzy file searching.