mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-06 07:19:27 -05:00
user options: add search engine url
This commit is contained in:
@@ -153,11 +153,11 @@ export const CustomCommandButton = ({ text = '' }) => searchItem({
|
||||
|
||||
export const SearchButton = ({ text = '' }) => searchItem({
|
||||
materialIconName: 'travel_explore',
|
||||
name: 'Search Google',
|
||||
name: 'Search the web',
|
||||
actionName: 'Go',
|
||||
content: `${text}`,
|
||||
onActivate: () => {
|
||||
App.closeWindow('overview');
|
||||
execAsync(['bash', '-c', `xdg-open 'https://www.google.com/search?q=${text} ${['', ...userOptions.search.excludedSites].join(' -site:')}' &`]).catch(print);
|
||||
execAsync(['bash', '-c', `xdg-open '${userOptions.search.engineBaseUrl}${text} ${['', ...userOptions.search.excludedSites].join(' -site:')}' &`]).catch(print);
|
||||
},
|
||||
});
|
||||
@@ -140,7 +140,7 @@ export const SearchAndWindows = () => {
|
||||
|
||||
else {
|
||||
App.closeWindow('overview');
|
||||
execAsync(['bash', '-c', `xdg-open 'https://www.google.com/search?q=${text} ${['', ...userOptions.search.excludedSites].join(' -site:')}' &`]).catch(print);
|
||||
execAsync(['bash', '-c', `xdg-open '${userOptions.search.engineBaseUrl}${text} ${['', ...userOptions.search.excludedSites].join(' -site:')}' &`]).catch(print);
|
||||
}
|
||||
},
|
||||
onChange: (entry) => { // this is when you type
|
||||
|
||||
@@ -26,6 +26,7 @@ let userConfigOptions = {
|
||||
'wsNumMarginScale': 0.07,
|
||||
},
|
||||
'search': {
|
||||
'engineBaseUrl': 'https://www.google.com/search?q=',
|
||||
'excludedSites': ['quora.com'],
|
||||
},
|
||||
'weather': {
|
||||
|
||||
Reference in New Issue
Block a user