https://github.com/mateconpizza/profiles-dmenu-browser
Simple Script for launching Brave's or Chromium's Profiles
https://github.com/mateconpizza/profiles-dmenu-browser
bash bash-script brave-browser brave-browser-profiles browser chromium-browser chromium-browser-profiles profile
Last synced: about 2 months ago
JSON representation
Simple Script for launching Brave's or Chromium's Profiles
- Host: GitHub
- URL: https://github.com/mateconpizza/profiles-dmenu-browser
- Owner: mateconpizza
- Created: 2022-03-30T15:27:29.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-04-07T15:36:48.000Z (about 4 years ago)
- Last Synced: 2026-04-12T20:39:24.429Z (3 months ago)
- Topics: bash, bash-script, brave-browser, brave-browser-profiles, browser, chromium-browser, chromium-browser-profiles, profile
- Language: Shell
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple Script for launching browser's Profiles
It takes care of reading the 'Preferences' file in each profile directory in `$XDG_CONFIG_HOME/BraveSoftware/Brave-Browser/` or `$XDG_CONFIG_HOME/chromium/`, gets the name of the profile, pipes to dmenu and opens browser with the selected profile.
__The profile name must be unique.__
### Dependencies
- [dmenu](https://tools.suckless.org/dmenu/)
- [fd](https://github.com/sharkdp/fd)
- [ripgrep](https://github.com/BurntSushi/ripgrep)
- [jq](https://github.com/stedolan/jq)
### Estructura
```
$XDG_CONFIG_HOME/browser/
├── Profile 1
│ └── Preferences
├── Profile 2
│ └── Preferences
└── Profile 3
└── Preferences
```
### Preferences Estructura
The `Preferences` file is a very long `json` file. I used [jq](https://github.com/stedolan/jq) so I could get the value of the `profile.name` key, which represents the name I gave the `profile`.
```json
"profile": {
"avatar_bubble_tutorial_shown": 2,
"avatar_index": 26,
"content_settings": {
"enable_quiet_permission_ui_enabling_method": {
"notifications": 1
},
"exceptions": {
"bluetooth_guard": {}
},
"pref_version": 1
}
"default_content_setting_values": {
"cookies": 1
}
=======> "name": "profile-name-im-looking-for",
}
```
### TODO
- [ ] Create profiles
- `browser` --user-data-dir=test2 --no-first-run --no-default-browser-check
- [ ] Delete profiles
- [ ] Maybe rename profiles