-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add note about input prompt scaling, and add options to change the key to start and restart searches #10
base: master
Are you sure you want to change the base?
Conversation
This setting seems very important for high DPI displays
These change the default keybindings to open a search, as well as to restart a search, while a page is open
@@ -502,7 +506,7 @@ function list_meta:run_search() | |||
end | |||
|
|||
function list_meta:open_wrapper(advanced) | |||
if self.keyword == nil then self.empty_text = "Press f12 to enter search query" end | |||
if self.keyword == nil then self.empty_text = "Enter a new search query" end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this change.
{o.keybind_open_search, "open_search", function() temp:get_input(false) end, {}}, | ||
{o.keybind_open_flag_search, "open_flag_search", function() temp:get_input(true) end, {}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this PR is actually unnecessary. If we remove these two lines:
{o.keybind_open_search, "open_search", function() temp:get_input(false) end, {}}, | |
{o.keybind_open_flag_search, "open_flag_search", function() temp:get_input(true) end, {}} |
And change the open_wrapper
function to be:
function list_meta:open_wrapper(advanced)
if self.keyword == nil then self.empty_text = "Press f12 to enter search query" end
local hidden = self.hidden
if hidden then self:open() end
if self.keyword == nil or not hidden then self:get_input(advanced) end
end
Then the standard mpv keybind to open the page will be also be used when the page is open instead of being overridden. Then the keybinds can be changed by using standard input.conf
changes.
The scale of the input prompt can be changed with this setting in the `mpv.conf`: | ||
|
||
```txt | ||
script-opts-append=user_input-scale=1 | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of recommending an entry in mpv.conf
I would instead prefer to recommend an entry in ~~/script-opts/user_input.conf
which would contain scale=1
.
This PR has two commits:
The first one adds only a small note to the readme how the input prompt text scaling can be changed. This setting seems very important for high DPI displays. I have a UHD monitor and scale=1 is not readable and scale=7 comfortable.
I have the keybind to open the script on Ctrl+f instead of f12, because it is more intuitive and better for laptop keyboards and fancy keyboards, which have the F-keys hidden behind a second layer. Changing the keybinding only in
input.conf
leads to the issue, that restarting a search when a page is already opened is un-intuitive. So the second commit changes only a few lines of the code to allow options to change the f12 default.I also changed the text
Press f12 to enter search query
toEnter a new search query
, because this text is usually shown after the keybind has been pressed and is therefore misleading.