-
Notifications
You must be signed in to change notification settings - Fork 602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[REQUEST] Apply styling depending on the modi #1356
Comments
rofi is not designed to dynamically change it theme. I am not sure this can be implemented (without being a gigantic hack or with very limited options) without a major rewrite. |
I guess that's a good candidate for the "Crazy/Future" label then 😄 |
Have you seen what this user have done? I can switch themes and modes depending on the way I launch rofi. More generally, Its possible to cycle between themes in any order you want to configure for a fixed mode. Is it what you want? |
Yes, I know that repository, I don't think what he has done matches with what @dannycolin wants. (switching themes without closing and re-opening rofi. atleast that was my intrepetation.) Your last sentence I don't think I understand. |
Without closing Rofi I think it's not possible as well. About my last sentence, I have said that It's possible to cycle between themes (and modi) running Rofi a different number of times (using bash script for example like the repository I have posted). Since this technique does not depend on keyboard input, it's possible to do it with the same keyboard input. However, changing the theme without closing Rofi, like I said, I am not sure if it's possible. I have never seen even a GTK/Qt applications doing that. It would be interesting. =) |
A bit offtopic, but most toolkits can change theming on the fly, I am pretty sure GTK 2 and 3 can do this back in the time I wrote gmpc. |
That's exactly what I want.
Yes. I don't remember if it was possible in Gtk2 (or if it was a per app hack) but it's definitely possible with Gtk3+ |
Glad to have found this thread as I'm in the same boat having written a thing to drive base16 theme changes via flavours. Basically, I can change themes across i3, tmux, alacritty, gtk2, gtk3, and rofi using the script menu but only rofi doesn't take on the new look as it is obviously not reloading its config during runtime. So I'm fairly confident when I say the traditional way this is usually handled is through the use of SIGUSR1 or SIGUSR2. Of course that would mean rofi itself would need to support the signal and do the thing (reload config in this case) when it receives it. |
Hi, First of all; I have only recently started playing with customising Linux so I am currently trying to figure a lot of things out at once. Rofi and Github being two of them, please let me know if I say anything stupid! Apologies in advance. Currently, I am trying to create some menus for a custom DE project using Rofi. As somebody with more sense of design than coding, I really wanted to use different colour schemes per Rofi mode to better indicate what mode I am in, without even having to look at any buttons/icons/text.
This got me thinking. What if it doesn't have to swap themes? Would it potentially be an option to add a second class to each element? With an SCSS-like syntax such as This way current configs will remain compatible without rewrites, while it should also not require major code changes from the developer. At the same time, it would open up a lot of options. For instance, I could achieve my ideas by rewriting my config as such:
Whereas the OP of this issue could use:
Please let me know if there is any merit to this at all, or if there is anything that I can do to help make this a reality, because I genuinely believe this feature would make Rofi much, much more customiseable and easier to use. |
The problems is not in 'coloring', the difficulty lies in the dynamic build up of the UI. window {
children: [ entry, listview];
}
window:drun {
children: [ vertbox, listview];
}
vertbox:drun {
children: [prompt, entry];
} Or more complex restructuring. Hence the:
If we just limit to colors/margins/padding, yes it would work without to many changes, but is that what people expect? |
Definitely not what I would expect from something "dynamic". IMO, I agree with Dave here. It's better to not implement it than implementing a half-baked solution. |
I am interested into seeing if I can rewrite parts to make this possible. But I have very little time/energy to work on rofi (still did not manage to make a 1.7.6 release). I don't expect this anytime soon, unless somebody else steps up. |
Dave, Danny, thank you both very much for replying so quickly! Firstly: I fully agree that no implementation is better than a half-baked, confusing one.
I looked at this for a while to figure out what the problem is but I'm afraid I either misunderstood or rambled too much and didn't make it clear what I meant.
should still work. It's just that the properties in Much in the same way that in (S)CSS
would result in the item still having its padding on hover, because it gets its properties from both classes. Thinking about it, I think Rofi already works in this way with the My current config contains:
The selected button gets the accent colour according to Or does the difficulty lie in applying this tag? Specifically to non-stock Rofi items that users might add in their configs? |
You keep going to the syntax, but the syntax is not the issue. The issue is, on startup the interface layout is build up once, how items are packed cannot easily be changed once build up in the current implementation. (See the manpage for more on this). |
Dave, thank you for this explanation, this makes it much clearer and I understand what you meant in your earlier comment now. It now also makes sense why actually using I guess you ran into the exact same issue here, with no way to refresh the contents without essentially re-spawning the entire window? |
I did not run into it myself, given I hardly use 1/10 of the options I implemented on request.
|
Ha that's fair. I appreciate you taking the time mate! Wanna hear something funny though? That line is exactly what tripped me up. After reading that I was convinced I would be able to use this to change the Maybe that has to do with me being frankly, a noob at Rofi. Or maybe it's because I was specifically looking to make such changes. Now that you've explained how it works under the hood it makes complete sense, but before I had this information, everything after the first sentence just made it seem like those were exceptions to the rule. All that said; For me personally, I'd still LOVE to simply be able to change foreground/background colours, placeholders, maybe the icon pack and scroll bars per mode, however, sadly (for me) I still agree that if you are planning to do a full implementation of this at some point, including rebuilding the interface and allowing re-structuring, you should probably not waste your time on this right now. |
❗
First read the guidelines!
This is not optional for any report/question. People must be able to understand the full context of the report when reading it, at any time.
If you feel like you “just have a simple question”, please consider you’re wrong and still fill the full report.
Any report missing these informations will be labeled as “Incomplete Report - Please follow the guidelines” and may not be answered in a timely fashion.
❗
Before creating a feature request
I checked the next branch to see if the feature has already been
implemented
I searched existing reports to see if it is already requested.
What is the user problem or growth opportunity you want to see solved?
I use a theme that emulate the look of Gnome Shell which shows the desktop files as a grid. However, I'd like to only apply that grid style when I'm in drun.
How do you know that this problem exists today? Why is this important?
I made a theme using a grid and in run modi the text is truncated too early and so the line is unreadable. Same for ssh modi. So I wanted to use a list instead of a grid but I couldn't do it.
Here's an example of how it could looks like in a rasi file:
Who will benefit from it?
Users who wants a theme that display drun in a grid but still want a list for window, run, ssh and so on without having a different keybind to call rofi with a different theme. In other word, they can launch rofi, cycle through the different modi and the style will adapt accordingly.
Version
Output of
rofi -v
: Version: 1.6.1Configuration
Output of
rofi -help
(in a gist, please paste the full output): https://gist.github.com/dannycolin/a0397d1e8da22c1ff3211766cc712a60Additional details:
Please do not submit reports related to wayland, see
here for more
information.
Requesting a feature is no guarantee it will be added.
The text was updated successfully, but these errors were encountered: