-
Notifications
You must be signed in to change notification settings - Fork 614
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
Allow for left/right scroll #399
Comments
right/left align is done based if the text is RTL or LTR
The scrolling is probably not that trivial. Scrolling text on hover/selected row might be useful. |
Thanks for the tip! Scrolling selected row would be useful, but I would rather dynamic R/L justification, if it were a choice. Usecase: I have written a small custom script to search files based on filename, in my homedir, for which the UI was via dmenu and was bound to hotkey (e.g. Caps+b then, type a keyword from a paper name). This works surprisingly well, and much faster than anything normal file managers give, for my usecase. The full paths can be quite long (e.g. take almost entire screen width in small font). In rofi, most of the path is obstructed by '...', and esp. the most important part, which is the actual filename. I got around this by piping to rofi just the filename and making rofi output just line number, which is used to select the line of actual output with the full filename. It would be better, however, if I could examine the entire path because sometimes I have similarly named files residing in different places. Scroll on select would help here, but I suspect that it will be painfully slow to sift through the files this way. |
If I get it right, you want to select between ellipsizing method at runtime.. (select between end, beginning or middle) |
This is not precisely what I want, but it would be a major step forward in functionality for my use case ideally I would still like to be able to see entire paths somehow, but I understand that since every path has a different length, it is not obvious what is the correct way to implement scrolling. Perhaps dynamic ellipsizing together with showing the entire text after a (selectable at invocation) amount of of time for selected text would be 95%+ of what I want. |
Having all the text 'scroll' all the time is not a good solution. This will be very annoying to watch (and hard to read), I have tried this in another program (gmpc's playlist) in the past: It does not work. Not sure what the right solution is here. |
I agree - I didn't want all the text autoscrolling all the time. I wanted functioning left/right keys :-) |
aah I see. (Those are already mapped for navigating the text box entry.) do you want to 'scroll' all entries at once? |
That was indeed my initial wish. Together with dynamic RTL/LTR switching (e,g, via C-\ key), it would be perfect. |
Can you try this patch: https://filebin.pw/index.php/Dbb/ Tried the scrolling on key,, it is really awkward when doing it on multiple rows with variable length. |
Thanks! I will take a look tomorrow, as I am already away from the linux PC for the day... |
It works well, with a couple of caveats;
Finally, I'd like to state that it was a bit hard for me to figure out what is the proper procedure to build with autoconf and friends, as ./configure was obviously not present in the code. If you don't mind, I'll send a pull request later with additional documentation for building from git source. |
What is missing in this https://github.com/DaveDavenport/rofi/blob/master/INSTALL.md#install-a-checkout-from-git explanation? |
Nothing is missing - I only saw the explanation above it, sorry. |
regarding 1, what I wrote is the behavior I'd like to see for RTL languages as well, and if it were easy for you, I'd also test it for hebrew. My logic is that if I'm throwing the left, then importance of characters goes down from right to left, and likewise (but reversed) if I throw stuff out from the right. But if you don't feel inclined, I'll just try to do this myself :-) |
I never use it myself (sticking to ascii in daily routine), so I am hesitant making changes in regards to this as I have no idea what it breaks.. |
Hi @DaveDavenport I'm trying to left align elements in Edit: My general script is as follows: THEME="\
window {
location: northwest;
anchor: northwest;
y-offset: 1em;
width: 15ch;
x-offset: 0;
}
mainbox {
children: [ listview ];
}
listview {
fixed-height: false;
dynamic: true;
padding: 0px 0px 0px ;
}"
menulist="\
\u200e Launcher
Reboot
襤 Shutdown
About"
category=$(echo -e "$menulist" | \
rofi -dmenu \
-i \
-no-custom \
-select "$category" \
-font "Noto Sans Mono 11" \
-theme-str "$THEME" \
| awk '{print $2}')
if [ -z "$category" ] ; then
exit
fi
if [ "$category" = "Launcher" ] ; then
rofi -combi-modi drun,run -show combi
elif [ "$category" = "Restart" ] ; then
xdotool key Super_L+Shift+r
elif [ "$category" = "Shutdown" ] ; then
xdotool key Super_L+Shift+s
elif [ "$category" = "About" ] ; then
WINIT_HIDPI_FACTOR=2.66 alacritty -t "About Arch" -e /usr/bin/bash -i -c "neofetch;bash"
fi
sleep 0.1 # pause to avoid instant menu closing with mouse
exit 0 My problem is that even when setting |
Is it possible, currently, to even have the ellipses on the left? I've tried combinations such as echo -e "\u200f Hello this is a really long line and it is super long\none" | rofi -dmenu -theme-str "#element{ horizontal-align: 0;}" where I use RTL (\u200f) or LTR (\u200e) with If it matters, my use case is finding files (via ripgrep) and quickly opening/launching them. So I'm piping filenames in to rofi which can get quite long, and what's most important is seeing the end of the path. |
The commit 52c5592#diff-bbf76b681ca634423325e1d2d7c7e21b does not document any option for permanently toggling this option in the configuration file.
This usecase is quite common and rofi would be much more useful showing the file name instead of the preceding directories. |
Because it does not add this. Please follow issue guidelines, if you have a feature request for this, open a new issue. |
we have ellipsizing and a |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hello,
It would be nice if, when run in 'dmenu' mode, one could scroll the results of long strings right and left, and if it was possible to select right/left justification of the list of results.
Would you care to comment on where in the source it would be proper to add this functionality?
The text was updated successfully, but these errors were encountered: