Skip to content

Commit

Permalink
feat: add support for Arc browser
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvmanila committed May 20, 2023
1 parent e643372 commit 309cbf2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ A _Neovim plugin_ to open your browser bookmarks right from the editor!

| Browser | MacOS | Linux | Windows |
| ------------------ | :-----: | :-----: | :-------: |
| Arc | ☑️ | - | - |
| Brave | ☑️ | ☑️ | ☑️ |
| Brave Beta | ☑️ | ☑️ | ☑️ |
| Chromium | ☑️ | ☑️ | ☑️ |
Expand Down Expand Up @@ -327,6 +328,7 @@ the config value is as follows:

| Browser / Tool | Config value |
| ------------------ | :----------: |
| Arc | `arc` |
| buku | `buku` |
| Brave | `brave` |
| Brave Beta | `brave_beta` |
Expand All @@ -353,6 +355,7 @@ If the given profile does not exist or the plugin is unable to get the profile
related information, an appropriate warning message will be provided.

Following browsers are supported for the config option:
* Arc
* Brave
* Brave Beta
* Google Chrome
Expand All @@ -375,6 +378,7 @@ determining the custom path.

| Browser | MacOS | Linux | Windows |
| ------------------ | ---------------------------------------------------------------- | -------------------------------------------- | ------------------------------------------------------------ |
| Arc | `~/Library/Application Support/Arc/User Data` | - | - |
| Brave | `~/Library/Application Support/BraveSoftware/Brave-Browser` | `~/.config/BraveSoftware/Brave-Browser` | `~/AppData/Local/BraveSoftware/Brave-Browser/User Data` |
| Brave Beta | `~/Library/Application Support/BraveSoftware/Brave-Browser-Beta` | `~/.config/BraveSoftware/Brave-Browser-Beta` | `~/AppData/Local/BraveSoftware/Brave-Browser-Beta/User Data` |
| Google Chrome | `~/Library/Application Support/Google/Chrome` | `~/.config/google-chrome` | `~/AppData/Local/Google/Chrome/User Data` |
Expand Down
1 change: 1 addition & 0 deletions lua/browser_bookmarks/browsers/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ local supported_browsers = vim.tbl_values(Browser)
-- An array of all the chromium based browsers.
---@type Browser[]
local chromium_based_browsers = {
Browser.ARC,
Browser.BRAVE,
Browser.BRAVE_BETA,
Browser.CHROME,
Expand Down
1 change: 1 addition & 0 deletions lua/browser_bookmarks/enum.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ local M = {}

---@enum Browser
M.Browser = {
ARC = "arc",
BRAVE = "brave",
BRAVE_BETA = "brave_beta",
BUKU = "buku",
Expand Down
7 changes: 7 additions & 0 deletions lua/browser_bookmarks/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ local state = require "browser_bookmarks.state"

local default_config_dir = {
Darwin = {
[Browser.ARC] = {
"Library",
"Application Support",
"Arc",
"User Data",
},
[Browser.BRAVE] = {
"Library",
"Application Support",
Expand Down Expand Up @@ -363,6 +369,7 @@ end
-- A mapping from browser to the title to be displayed on the search bar.
---@type table<Browser, string>
local title = {
[Browser.ARC] = "Arc",
[Browser.BRAVE] = "Brave",
[Browser.BRAVE_BETA] = "Brave",
[Browser.BUKU] = "Buku",
Expand Down

0 comments on commit 309cbf2

Please sign in to comment.