Skip to content

Instantly share code, notes, and snippets.

@Strykar
Created December 3, 2023 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Strykar/d4e46c3b9344f6fee07ca337f5a2435f to your computer and use it in GitHub Desktop.
Save Strykar/d4e46c3b9344f6fee07ca337f5a2435f to your computer and use it in GitHub Desktop.
Open URLs from Kitty terminal in a browser on Ctrl + Shift + left click
To kitty.conf, add:
map kitty_mod+o pass_selection_to_program ~/.bin/selectiontobrowser.sh
$ cat ~/.bin/selectiontobrowser.sh
#!/bin/bash
URL="http://www.google.com/search?q="
PRE_FORMAT_QUERY=$1
QUERY="${PRE_FORMAT_QUERY// /+}"
#/usr/bin/google-chrome-stable -new-tab ${URL}${QUERY}
#/usr/bin/brave "${URL}""${QUERY}"
/usr/bin/firefox "${URL}""${QUERY}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment