Git Product home page Git Product logo

myos-archlinux / nbrowser Goto Github PK

View Code? Open in Web Editor NEW
31.0 3.0 6.0 59 KB

๐Ÿ”— ๐ŸŒ : an easy way to open links in browsers, mimic the "Open URL with..." dialog on Android, `nbrowser` help you open links in a browser

License: GNU General Public License v3.0

Makefile 2.54% Shell 97.46%
rofi-scripts rofi-menus browser bash search firefox ungoogled-chromium brave-browser url url-handler

nbrowser's Introduction

nbrowser

nbrowser started as browser prompter for Linux. It works by setting it as the default browser; any clicked links in non-browser apps are now sent to nbrowser where you are presented with a menu of all your installed browsers. You may now decide which app youโ€™d like to continue opening the link with and more.

screenshot rofi with DarkBlue theme

Features

- auto detect installed browsers
- auto remove tracking elements from URLs (basic)
- ?search engines
- !bangs
- !ubangs : url bangs
- !dbangs : direct bangs or domain bangs
- ...

Requirements

  • rofi
  • a browser
  • Video Player : mpv or vlc
  • Video Downloader : youtube-dl or yt-dlp
  • Image Viewer : sxiv or feh
  • Image Editor : gimp
  • Clipboard managers : xclip

Installation

git clone https://github.com/MyOS-ArchLinux/nbrowser
cd nbrowser/
sudo make install

Tips

  • set a keyboard shortcuts (ex: super+W) to open nbrowser easly

  • set nbrowser as the default browser so you can open each clicked URL with nbrowser (ex: using xdg-utils).

    xdg-mime default nbrowser.desktop x-scheme-handler/https x-scheme-handler/http x-scheme-handler/browser

  • some console applications us the variable $BROWSER to open default browser, so you may also need to set environment variable BROWSER=nbrowser

  • for one-click switch between browsers copy and paste this code into a bookmark URL of all your browser javascript:window.location='browser://'+location.href;

External links

Bug reports

Please use the issue tracker provided by GitHub to send us bug reports or feature requests.

License

GPLv3

nbrowser's People

Contributors

odnar-dev avatar rosseljost avatar vutung2311 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nbrowser's Issues

version 0.5

# done
- [X] moved engines.json to config dir (breaking changes)
- [X] add gemini handler
- [X] instead of showing error, list all available 'bangs' to chose from
- [X] instead of showing error, list all available 'ubangs' to chose from
- [X] instead of showing error, list all available 'engines' to chose from
	- [X] include $ENGINES
	- [X] include engines.json

add local ddg like bangs

add option to use a local file that has all duckduckgo shortcuts as a falback
if a ?engine is not found instead of redirecting the query to https://duckduckgo.com/?q=

- this is better for privacy

https://duckduckgo.com/bang
https://duckduckgo.com/bang_lite.html
https://duckduckgo.com/bang.js
# how to use
# you need to have at least nbrowser v0.5
wget https://duckduckgo.com/bang.js -O $HOME/.config/nbrowser/engines.json
# Progress
- [X] proof of concept
- [X] add how to use to wiki
	- [ ] improve 
- [X] testing

# todo
- [ ] add an update mechanism
	- [?] use cron job

add a better way to change the browser list

the problem if a browser is already in the list, adding a new one well only be added at bottom of the list
the way this working for now is assigning a number to every browser added in array like format , so the browser list will show up in order of added ones, this also allow the users to replace a item in the list if they want
by using installed_browsers[1]="browser_name : /dir/browser_path --args


the optimal way to do this is to allow user to change the sorting of the list to any way they want
and also allow the user to change the arguments of a browser using only the config file without the need to create a duplicated items
this can be done by assign an id to every browser , and the user can use that ID , to change the name, path, and args to any thing they want

protocol handler

  • remove hard-coded protocol handlers
  • add-on based protocol handler

dbangs - domain bangs

i know i suck at naming stuff ๐Ÿฅฑ

dbangs : domain bangs | direct bangs

the idea is when i run `nbrowser https://example.com/test` 
	it well check if i have a bang for that domain (example.com) then
	| if [ -f "${NBROWSER_CONFIG_DIR}/dbangs/example.com" ] ; then
		run the bang without any interaction,
		| nbrowser_dbang "https://example.com/test"
	else
		it well show the default menu
		| open_in_browser "https://example.com/test"
dbangs path = ${NBROWSER_CONFIG_DIR}/dbangs/${domain}

update Wiki [v0.5]

- [X] config
	- [X] Variables
	- [X] Browsers
	- [X] Search Engines
	- [X] Functions
	- [X] Custom Functions
- [ ] FAQ
	- [ ] How to add custom browsers ?
	- [ ] How to use ddg engines.json ?
- [ ] Addons
	- [ ] How to add custom search engine ?
	- [ ] How to add custom bang ?
	- [ ] How to add custom ubang ?
	- [ ] How to add custom dbang ?
- [ ] Stuff to do

v0.6

  • _input() function : easy way to ask for an input , using rofi.
  • ask for input if query not provided when searching

Adding custom browsers via config file doesn't work

I believe there was a change in the code to no longer use the installed_browsers config
browser_count=$((browser_count+1))
installed_browsers[$browser_count]="Browser Name : path/to/browser -args"

I've ensured I'm using the tab char before and after the :

Perhaps a change was made that isn't backwards compatible?

bangs for URLs

like bangs but for URLs
	!p : open url with player
	!d : open url with downloader
	!s : shortlink
	!b : bookmark url

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.