Closed nowakf closed 6 years ago
initially, i have chosen this width to fit comfortably in a tty with VGA (or less?) resolution (my old laptop has such a tty. grub looks huge on it).
i agree, pacui's UI does look horrible on terminals, which are less than 70 columns / spaces wide. if i am correct, the current UI needs 68 columns. i could reduce it by another 2.
i have reduced the width (and height) of the UI in the past. but i am not focused on reducing the width anymore, because whenever you actually use pacui, you will see a preview window on the right side with useful package information. in order to filter the displayed list (while having a preview window at the same time), you probably need at least twice the width of pacui's UI (this is my guess). i have tried to use the shortest descriptions possible, though (the length of the descriptions limits the minimum usable with of fzf's filter function while displaying a preview window at the same time).
pacui does not use a settings file yet. this means the thing you are asking for would currently be really hard to do. if i do something like this, i want to do it properly, which means that the preview window should not be displayed on narrow terminals, too!
but there is a simple solution to the problem you are describing: use pacui without its UI. this does NOT mean you have to remember all of pacui's options (and their "key" shortcuts) by heart. you can list all key shortcuts using "pacui h" or "pacui -h", eliminates the need for pacui's UI completely (and in some way replaces it). i do this all the time!
advantages of "pacui h" (and using pacui without UI) vs. "pacui" (which opens the UI):
disadvantages:
please test "pacui h" and tell me, whether you think it is a suitable replacement for pacui's UI. does it work for you?
That's almost perfect! Thanks! I should have read the manual.
The one problem is the 'enter string to filter list' is too long, so you can't type in a querry on narrow terminals. I'm gonna have a look at the script and see if there are any trivial ways to fix it.
If you subsitute "--preview-window=right:50%:wrap" with "--preview-window=bottom:50%:wrap" it works fine on narrow terminals. If it was surrounded with something like if $COLUMNS < 80, then it would only kick in for people that need it.
Or maybe something like tput cols? No idea whether tput is installed on every computer.
i have to test your recommendation. tput is part of "ncurses" package. type "pacui rt ncurses" to see that bash depends on ncurses. bash is part of the "base" group, which means it should be safe to assume that everybody has tput.
i have done some tests and decided that on a terminal width of 120 and below, the preview window looks better at the bottom (including terminal windows with just 16 lines of height).
i have also decreased the width of "pacui h" and "pacui" a little. decreasing it more makes it look bad, IMHO.
i have just updated pacui with commit https://github.com/excalibur1234/pacui/commit/56ddab38e6f1d3a1787c43c53bec5ed2042ffaef and https://github.com/excalibur1234/pacui/commit/41f69fcef71ddd459aa8ca29dc46e53bb1dcc61d. please test them.
i consider this solved.
Hey,
Previously, I've edited your script to get rid of the boxes and display all of the options in a simple list. This is because the fixed-width ui doesn't work well in a small terminal with fewer columns than the line-length of the UI.
Anyway, would you be up for including this as an option? I think it imroves usabillity for users with tiling window managers, small screens, or both.