That's simply a skin though; if you look at the official themes that come with Rofi (can be changed through Rofi itself, no config file needed), one of the themes is called "dmenu" and is literally just a thin strip at the top and looks/works exactly like dmenu: https://github.com/davatorium/rofi-themes/tree/master/Official%20Themes
Rofi themes don't all involve being in the center in a "window". They can be moved and docked and resized in all kinds of ways.
Sorry, again, I want to stress, I am not trying to shit on OP's work, it is very cool!
It is indeed very similar to ccs, but they use different property names, values, and keywords, and css doesn't support variables the same way rasi does. This results in files that crawl of red lines for errors that do not exist.
You can have a look at the specifics for the rasi format here.
It definitely depends on what the scripts are doing and why you want a gui. It is more for a learning experience? Or do you just want something easier to use?
Depending on what the scripts do, hooking them up into another script using rofi could be a good solution. I use rofi for a few things on my desktop, including switching themes and connecting to bluetooth devices. Hearing you say it's very menu driven makes me thing rofi would be a good option.
I swear i am not doing this full time... Anyways here are dots and apps running - awesomeWm config and theme modified from copycats - Terminal - kitty - Zathura - fancied with zathura-pywal - Rofi - Using solarized-darker theme
other terminal applications nvim(editor), cmus(music player) , cava(visulaizer)
URL: https://github.com/davatorium/rofi/wiki
colors.webpage.prefers_color_scheme_dark = false
colors.webpage.darkmode.algorithm = lightness celia
Was having the same issue. This might help https://github.com/davatorium/rofi/blob/next/themes/Indego.rasi. For me, what fixed it was this:
element-text { background-color: inherit; text-color: inherit; }
Hope this helps!
Fair enough, I will admit I'm jumping into the config without fully reading the docs, which I'm sure is a bad idea. I just find it's hard to absorb the information in the docs before I've actually started working.
Like I said, my motivation is to use rofi blezz to navigate the tree of things I want to launch from single key-presses. I'll read more about modes, but can they integrate with rofi? My main worry is that I want some kind of visual indicator of the keypress trees, so (at first at least) I don't need to memorize all my bindings.
The blezz content file seemed like a lightweight way to define my own sequences. And rofi is just... so pretty...
Step 1:
download and extract rofi-1.6.1.tar.gz( I don't think there is a difference between the gz and xz)
use this commands:
wget https://github.com/davatorium/rofi/releases/download/1.6.1/rofi-1.6.1.tar.gz && tar -xzf rofi-1.6.1.tar.gz
this will download rofi 1.6.1 and extract it to
a directory called "rofi-1.6.1"
change in to the directory:
cd rofi-1.6.1
Step 2:
mkdir build && cd build
this will create a directory( using the command mkdir
) called "build".
and change your working directory( to know where is your current directory use pwd
command ) into "build".
Step 3:
../configure --prefix=${HOME}/.local/
this will configure rofi to install it to $HOME/.local
where $HOME is your home directory(/home/[username])
omit --prefix=${HOME}/.local/
to install it to /usr/local
I recommend installing it to $HOME/.local because in the future ubuntu will upgrade their rofi package to 1.6.1
the step is straight-forward from here, just follow instruction in the github.
Step 4:
make
Step 5:
make install
this will install rofi
...
sudo make install
use this instead if you want to install it to /usr/local
To uninstall:
make uninstall
or
sudo make uninstall
to uninstall from /usr/local
> Package manager
This is a big one I feel most Windows users don't really fully appreciate. On windows you have to find the website (might find the wrong one, shitty download button surrounded by download now adverts, find the installed/executable, download it, run it, click "next next next", and now you have an icon).
On Arch, if I want to install firefox, I only run the "yay -S firefox" and then to run it I double click on the icon or in my case (I run arch btw, and I3, and rofi as a launcher) ctrl-d and type fire, let auto complete finish it, and press enter). I want to update? Just yay -Syua and that's it. It's a rolling release distro, so unlike Ubuntu, all my packages are at most a day or two behind, and stuff very rarely breaks, maybe once a year tops.
Windows hash chocolatey, but it's not as integrated into windows as packages are into linux.
Yes, they have a complete manpage available to consult on your terminal with the command man rofi
. You can also see it online here
Glad to see this, hope windows follows suite. In the meantime I highly recommend you install the ROFI application launcher. It handles documents too, I find it works great as a replacement for the gnome launcher. https://github.com/davatorium/rofi
Yeah I don't have much in ssh_config, if it isn't in history the autocomplete feeds it from the known_hosts
file (I turned off option to anonymize hosts there so I get the full name). It's mostly company stuff so the login is same everywhere.
There is also rofi which is kinda generalized and graphical version of what you did, it can either pick an option from the list and get that option returned on cmdline (kind of generic menu for scripting, I used it in my git hooks to ask for ticket ID when I forget to put it in commit), or use it as window switcher and few other things. It does have SSH mode but nowhere as fancy as yours.
Summarizing the findings from https://github.com/davatorium/rofi/discussions/1585
The root cause seems to be a bug in the xfce window manager that doesn't respect setting the focus by wmctrl.
Since this bug is from 2016 and not fixed, I don't have much optimism for it to be solved soon.
The workaround is that I'm using the alternative accept command, redefines it to "Return" and calls a shell script with a wrapper. This shell script is located at /home/vk/src/switch-to-windowid.sh
at my side:
#!/bin/bash WINID="${1}" /usr/bin/wmctrl -i -a "${WINID}" /usr/bin/xdotool mousemove -window "${WINID}" 200 200
The rofi command line is now: rofi -monitor -2 -show window -kb-accept-alt 'Return' -kb-accept-entry 'Shift+Return' -window-command "/home/vk/src/switch-to-windowid.sh {window}"
With that, I am able to use rofi for switching to any arbitrary window and give it the focus even though I do have "focus follows mouse" and a buggy xfce window manager.
Yes, I'm using pywal to generate the color scheme and then I'm importing it.
I have an script to pop up wallpapers list from a rofi menu then after selecting a wallpaper, pywal generate a color scheme and set wallpaper. then I'm importing those color schemes inside different configs.
If you want to find my theme switcher it's in .local/bin/utils/theme_mgr
Is there a way to get rofi to start without results available/shown.
as in, empty-input ➠ no results. ^(which should in my mind be the easiest way to implement it :/)
I was doing some digging, and I think I found it.
In the .rasi file for whatever menu you're using, you're probably gonna have to add these two lines to the beginning of the element-text
and element-icon
groups (or whatever they're called):
background-color: inherit; text-color: inherit;
This is to make pre-1.6.1 rasi themes work with 1.7.0 and up, as detailed here.
Once rofi is open, it will grab exclusive access to the keyboard, sxhkd nor any other program will be able to react to the keys, so you can bind keys to exit out of rofi using only rofi's configuration options. This is something I see the other comments are failing to notice.
According to this issue, and this comment in particular, you need to bind it to -kb-cancel
, but binding Super
won't work, since it is a modifier, you need to use either Super_L
or Super_R
for the key itself.
Here's an example of a simple menu in rofi. On the top you just write list of buttons and in the case select you put commands to what each button is supposed to do.
If you want to make it look like a context menu, you need to create a custom .rasi config file for rofi and launch rofi with the '-config /path/to/config/file' argument.
Check out the wiki for more infor on all of that. There's also several user scripts that might interest you.
#!/bin/bash
MENU=() MENU+=("0%") MENU+=("25%") MENU+=("75%") MENU+=("100%") MENU+=("Windows") MENU+=("Linux") RESULT=$(printf '%s\n' "${MENU[@]}" | rofi -dmenu -p "Monitor control")
case "$RESULT" in "0%") ddcutil setvcp 10 0 ddcutil setvcp 10 0 -d 2 ;; "25%") ddcutil setvcp 10 25 ddcutil setvcp 10 25 -d 2 ;; "75%") ddcutil setvcp 10 75 ddcutil setvcp 10 75 -d 2 ;; "100%") ddcutil setvcp 10 100 ddcutil setvcp 10 100 -d 2 ;; "Windows") ddcutil setvcp 60 17 -d 2 ;; "Linux") ddcutil setvcp 60 3 -d 2 ;; esac
rofi — You’ll arguably start off thinking about it quite a bit, but once you’ve written enough scripts to prompt yourself for actions, and they hold up decently, you stop thinking too much about it, and it’s just a wonderful chooser (imo).
In relation to your choice of kcolorchooser, I went with xcolor with xclip (I know xcolor has the copy to clipboard option but didn’t really work for me for some reason). I can yank the colour straight to my clipboard with these. I also made a little script that’ll create a small around 50x50 box of just the colour with the hex code on it (as an image, using imagemagick), and show it using feh once I’ve picked the color. feh has this thing where you can let it run an arbitrary script when you click 0, which I use it to copy the hex code of the color. Now, whenever I need to hold a bunch of colors or make like a little palette, I just run this script, and I end up with a bunch of boxes with different colors whose hex can easily be grabbed, like an actual palette.
To tie the above together, I wrote a rofi script that’ll take my choice of hex or rgba, and whether I want to copy to my clipboard straight away, or make the box I mentioned above. If I pick rgba, the color boxes will show rgba instead, and if I copy the color, it’ll be rgba instead of hex.
That took me a bit of time to make, but I don’t think about it much now, and it saves me a lot of work and time.
I used this page to figure out the general model you need to understand in order to fully customize it, its a really good reference.
If you look specifically at the file for the <code>lower</code> theme that I set up you can see the styles I needed to get my current output. I had to build the most recent release from source though, as it is not updated yet in the repos.
There is also this repo (which is now archived and not maintained) that has some examples from an older version of rofi.
>No, I asked for version, as it changed slightly in last releases.
>
>How to change size, check release note:
>
>https://github.com/davatorium/rofi/releases/tag/1.6.0
thnxs you very much good sir.
No, I asked for version, as it changed slightly in last releases.
​
How to change size, check release note:
You can get full config file into .config by running this command rofi -dump-config > ~/.config/rofi/config.rasi
also there is a lot of great themes here
GitHub is the place to start. Sometimes logging back in makes a difference. Depends on the app.
What version and distro are you running? You should also post your config as per the rules. Help us help you type stuff.
I ran into the same problem a while back. I have other modi, and I prefer to have those other modi available. Even if I open one (i.e., window switcher) I like to have the ability to switch left and right to other modi. This is the "killer feature" of using modi instead of dmenu way of doing it, IMO. Anyway, I suspect I'm "preaching to the choir" on that point. lol
What I ended up doing is just storing the state I needed in a temp file. An inelegant solution from my point of view, however I couldn't really figure out how else to do it.
Other things to try:
I am guessing you are already aware of changes in latest v1.6 (I think that is where you got $ROFI_INFO
from)?
Other than that, are you trying to do this in a shell? Take care with environment there, only the same shell (and subshells) will have the same environment. Which is why I (personally) don't like the environment variable solution.
I have a couple shell based rofi modi that I have been working on, which I plan on publishing eventually. However in the meantime I suppose I could provide an (shell based) example if you would like. But I think you might prefer to work in Python? The main takeaway is "use a temp file" though (unless someone else comes along and explains some other (better?) way of doing this).
Oh that's pretty smart, I like that you have so much control over what gets displayed in the menu this way. Is your rofi config hosted on GitHub or somewhere? Would be interesting to see how you've done it.
The only issue I can see with this method is that you don't get the application icons. I think there's a way to add them though, since you can add icons to dmenu like this. It relies on the application having an icon in your icon pack, but for programs that don't, you can always manually add an icon for it to the icon pack. Could even automate it with a script.
I’m not too familiar with krunner TBH. Here’s a slant page comparing them: https://www.slant.co/versus/11688/16919/~krunner_vs_rofi
I like rofi because it has a great application launcher, window/app switcher built in, and you can have it run just about any command or script you can think of!
Bedrock works by translating files that wouldn't normally work across distro boundaries so that they do work with other distros. This translation adds some overhead when accessing certain classes of files. Most of the time this is not noticeable, but it can be if some programs reads those files excessively.
Application launchers like dmenu
and rofi
read the list of available programs across all the distros Bedrock is making available. Depending on they're implemented, they can run into this translation overhead for every single application they're presenting as an option, which adds up.
One solution to this is for the application launchers to cache the list built. dmenu_run
normally does this kind of caching, and in my experience it has no noticeable overhead on Bedrock vs off.
Poking around, it looks rofi added an optional cache. If you can figure out how to enable that, it might resolve performance concerns there for you.
I don't know why a terminal would be noticeably slower.
Here's a simple rofi script for searching files. You can use it to open the directory containing the file in a file explorer do everything else from there. It's not elegant but it works.
Rofi can be customised to do a lot.
In the configuration file (~/.config/rofi/config.rasi) you should have the entry "terminal: "rofi-sensible-terminal";". With this you should be able to set the desired terminal emulator. Termite seems to have had problems with rofi (https://github.com/davatorium/rofi/issues/982). No idea what the current status is.
If you don't have a configuration file, you can create one with rofi -dump-config > ~/.config/rofi/config.rasi (create the directory under ~/.config first if necessary).
The hard part will be building and installing the picom fork and a recent version of rofi. The readmes for each of these repos should be useful.
Once that's done my dots are posted further up in the thread, and it's basically just a matter of downloading them and putting each file in the right place.
Alright it took me a hot minute cause I needed to remember. Rofi has a theming tool. Use that to find a base you like and edit that theme in rofis theme files. This can get you started! https://github.com/davatorium/rofi/wiki/Themes
I also like it a lot. I even created a theme based on it for rofi (My Linux app launcher). Here's a few screenshots
> Rofi started as a clone of simpleswitcher, written by Sean Pringle - a popup window switcher roughly based on superswitcher. Simpleswitcher laid the foundations, and therefore Sean Pringle deserves most of the credit for this tool. Rofi (renamed, as it lost the simple property) has been extended with extra features, like an application launcher and ssh-launcher, and can act as a drop-in dmenu replacement, making it a very versatile tool.
> Rofi, like dmenu, will provide the user with a textual list of options where one or more can be selected. This can either be running an application, selecting a window, or options provided by an external script.
From here
It sounds like that model PC has a bug. The only other thing I can think of is to uninstall krunner
and installl <code>Rofi</code> instead.
Rofi is a very good alternative although you may need to configure it. People post their dot files if you search for them, or you could just use vanilla config.
Report the bug as well- that way it is more likely to be fixed.
There are other alternatives- just search for krunner alternatives
on the net.
To quote the github
"A window switcher, Application launcher and dmenu replacement"
Depending on your distro, you can install via your package manager.
Here are the installation instructions - distro based it located at the bottom. Install Rofi
Try to launch rofi like this:
rofi -show drun -sidebar-mode
if you want icons add -show-icons
If you prefer you can put options in the config file
It's tough to say from just a video, but that looks to me like XFCE with the panel at the top of the screen, plank (or similar) on the left side, and rofi for the launcher.
>rofi -show drun -theme-str 'entry { enabled: false;}'
Thank you!
Is it possible to add enable
to the property list in the docs then?
Part discussion on documentation here:https://github.com/davatorium/rofi/issues/1019
​
Most of the time there is 1.) part of the release notes 2.) an examples shipped with rofi, 3.) a blog post.
​
I am well aware that documentation sucks,my apologies. Regrettable for the foreseeable time I won't have time/energy to work on it.
https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown
Nothing in the theme documentation about loading external images, though that's something done with CSS. Without experimenting, I think transparency is as close as you'll get.
Maybe tiling WM is not suitable for your usage. This could be.
As for Alt-tab if you switch from workspace 1 to workspace 7 with win-7 you can still switch between them by pressing win-7. Win-7 becomes your alt-tab in this case.
I also think it is about preference. Maybe Gnome is the best environment for your usage and preference. Just pressing the win button you can get a preview of your windows. I use Gnome on my home desktop where I am not the only one using the machine. At work I strictly use i3 and it fits like a glove on my workstation.
In my case -rofi- does the job well. I also get a short hint with the client name and client title. Rofi has several other modes besides the -run- mode.
https://github.com/davatorium/rofi
-rofi- can switch between the windows and start ssh sessions. I use it to search among the programs I don't have assigned workspace on.
If you clone the rofi-themes : git clone https://github.com/davatorium/rofi-themesfrom GitHub the
install.sh
file creates a Directory in $XDG_DATA_HOME/.local/share/rofi/themes
for Arch Linux users.
On my system I have two locations for the .rasi
theme files
/usr/share/rofi/themes/example.rasi
~/.local/share/rofi/themes/example.rasi
When you escape selection in rofi, it returns nothing, so your script just calls thunar with no arguments. One way to avoid that would be to store rofi output to some variable and check if it has anything before you pass it to thunar.
Seeing your interest in scripting, I'd like to say having a cronjob updating a list file then searching that file seems too much unwanted processing for this task. Keeping it simple is usually the best.
There is a file finder as script in rofi rofi-finder which you might be interested in too. Have a look.
Relevant files for the launcher are drun.rasi and config.rasi.
The launcher is invoked with rofi -show drun -modi drun -theme drun
This configuration requires experimental features not yet mainlined in Rofi. Use the issue949 branch.
The Rofi wiki has all the answers you seek. Yes, rofi can be used as a replacement for dmenu see the section entitled "dmenu replacement" but I don't know of any taskbar or tray feature.
Good Luck!
To me that sounds probably like you have different versions of some dependency installed. I also use rofi as a launcher and have no problems with it at all.
​
Have you try to reinstall it? Compile yourself from git? Rofi needs quite few libs to work, glib, gtk, pango and some others usually used in Gnome apps. See that you have all dependencies installed with correct versions. It should be handled correctly by Pacman though.
If you like dmenu, than try Rofi. It can do anything dmenu can, but better and have some aditional features. I use it both as a launcher and as window switcher. Fuzzy search if much faster than alt-tab.
​
But anyway in Emacs, you are probably best with Helm which is fuzzy search completion system. It does not work same as dmenu, but you will understand why peopel say it is "like" dmenu (fuzzy search).