added a good bit of things :D
This commit is contained in:
103
README.md
103
README.md
@ -14,9 +14,11 @@ simple tui for keeping track of all your config files in one place. no more hunt
|
||||
* **multiple sort modes** - sort by name, date modified, or file size
|
||||
* **open in $EDITOR** - edit files with one keypress
|
||||
* **remembers last file** - quick access to recently edited configs
|
||||
* **customizable config dir** - change base directory for file picker
|
||||
* **built-in file picker** - no external dependencies, navigate with vim keys
|
||||
* **rollback** - automatic compressed backups before every edit, restore with `:rb`
|
||||
* **custom colors** - set colors via config.json, supports hex and named colors
|
||||
* **vim-style keybinds** - j/k navigation, command mode
|
||||
* **lightweight and fast** - pure python with curses
|
||||
* **lightweight and fast** - pure python with curses, zero dependencies
|
||||
* **cross-platform** - works on linux, macos, bsd, windows
|
||||
|
||||
## installation
|
||||
@ -30,18 +32,20 @@ yay -S confy-tui
|
||||
### manual install
|
||||
|
||||
```bash
|
||||
git clone https://github.com/Phluxjr23/confy.git
|
||||
git clone https://gitlab.com/phluxjr/confy.git
|
||||
cd confy
|
||||
chmod +x main.py
|
||||
# optionally symlink to PATH
|
||||
sudo ln -s $(pwd)/main.py /usr/local/bin/confy
|
||||
# optionally install the man page
|
||||
sudo install -Dm644 confy.1 /usr/share/man/man1/confy.1
|
||||
```
|
||||
|
||||
## dependencies
|
||||
|
||||
* python3
|
||||
* ranger (for file picker)
|
||||
* curses (usually included with python)
|
||||
* curses (included with python)
|
||||
|
||||
that's it. no ranger, no external tools.
|
||||
|
||||
## usage
|
||||
|
||||
@ -61,8 +65,9 @@ just run `confy` in your terminal
|
||||
#### file management
|
||||
* `:ac` - add config to ungrouped
|
||||
* `:ac <group>` - add config to specific group
|
||||
* `:rm` - remove selected file
|
||||
* `:rm` - remove selected file from tracking (does not delete the file)
|
||||
* `:l` - open last edited file
|
||||
* `:rb` - rollback selected file to last backup
|
||||
|
||||
#### group management
|
||||
* `:ag <group>` - add new group
|
||||
@ -77,29 +82,83 @@ just run `confy` in your terminal
|
||||
* `/` then type - search files and groups in real-time
|
||||
|
||||
#### configuration
|
||||
* `:cd` - change config directory (opens ranger)
|
||||
* `:cd reset` - reset to ~/.config (or default)
|
||||
* `:cd` - change config directory (opens built-in file picker)
|
||||
* `:cd reset` - reset to ~/.config
|
||||
* `:q` - quit
|
||||
|
||||
### rollback
|
||||
|
||||
confy automatically saves a compressed backup of any file to `/tmp/<filename>.confbak` before you open it for editing. if you make a mess of your config, select the file and run `:rb` to restore it.
|
||||
|
||||
rollback can be disabled in config.json:
|
||||
```json
|
||||
"settings": {
|
||||
"rollback": false
|
||||
}
|
||||
```
|
||||
|
||||
### colors
|
||||
|
||||
customize colors in `~/.config/confy/config.json` under `settings.colors`. values can be named colors or hex codes:
|
||||
|
||||
```json
|
||||
"settings": {
|
||||
"colors": {
|
||||
"bg": "default",
|
||||
"fg": "default",
|
||||
"highlight": "#cba6f7",
|
||||
"group": "#89b4fa"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
named colors: `black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`, `default`, `lavender`, `pink`, `purple`, `orange`
|
||||
|
||||
hex colors require a terminal that supports 256 colors (most do).
|
||||
|
||||
### search mode
|
||||
|
||||
press `/` to enter search mode, then start typing:
|
||||
- filters both files and groups in real-time
|
||||
- case-insensitive fuzzy matching
|
||||
- case-insensitive matching
|
||||
- `enter` to accept and keep filtering
|
||||
- `esc` to clear search and show all files
|
||||
|
||||
### groups
|
||||
|
||||
groups are purely organizational - your actual config files stay in their original locations. groups help you organize your list of tracked configs into logical categories like "hyprland", "nvim", "shell", etc.
|
||||
groups are purely organizational - your actual config files stay in their original locations. groups help you organize your tracked configs into logical categories like "hyprland", "nvim", "shell", etc.
|
||||
|
||||
groups are collapsible - press `space` or `enter` on a group header to toggle.
|
||||
|
||||
## configuration file
|
||||
|
||||
confy stores everything in `~/.config/confy/config.json`. if you're upgrading from an older version with `tracked.json`, confy will automatically migrate it on first run.
|
||||
|
||||
full example config.json:
|
||||
```json
|
||||
{
|
||||
"groups": {
|
||||
"ungrouped": [],
|
||||
"hyprland": ["/home/user/.config/hypr/hyprland.conf"],
|
||||
"nvim": ["/home/user/.config/nvim/init.lua"]
|
||||
},
|
||||
"settings": {
|
||||
"rollback": true,
|
||||
"colors": {
|
||||
"bg": "default",
|
||||
"fg": "default",
|
||||
"highlight": "#cba6f7",
|
||||
"group": "#89b4fa"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## why confy?
|
||||
|
||||
tired of doing `cd ~/.config/whatever` a million times a day? same. confy keeps all your important configs in one list so you can jump to them instantly.
|
||||
|
||||
organize related configs into groups, search through everything, sort however you want, and open files in your editor with a single keypress.
|
||||
organize related configs into groups, search through everything, sort however you want, and open files in your editor with a single keypress. if you break something, roll it back.
|
||||
|
||||
simple, fast, does one thing well.
|
||||
|
||||
@ -115,8 +174,8 @@ confy
|
||||
:ag shell
|
||||
|
||||
# add configs to groups
|
||||
:ac hyprland # opens ranger, pick hyprland.conf
|
||||
:ac nvim # opens ranger, pick init.lua
|
||||
:ac hyprland # opens file picker, navigate to hyprland.conf
|
||||
:ac nvim # opens file picker, navigate to init.lua
|
||||
|
||||
# move existing files between groups
|
||||
# (select file first, then)
|
||||
@ -129,9 +188,8 @@ confy
|
||||
:sort date
|
||||
:reverse # newest first
|
||||
|
||||
# change where ranger starts
|
||||
:cd # pick new directory
|
||||
:cd reset # back to default
|
||||
# oops, broke your config
|
||||
:rb # rollback to last backup
|
||||
```
|
||||
|
||||
## tips
|
||||
@ -141,6 +199,7 @@ confy
|
||||
* use `:sort date` to quickly find recently edited configs
|
||||
* search with `/` to quickly jump to specific configs
|
||||
* collapse groups you don't use often to keep view clean
|
||||
* missing files show up in red so you know when a config has moved
|
||||
|
||||
## windows support
|
||||
|
||||
@ -150,13 +209,17 @@ on windows, change the config directory to where you keep your configs:
|
||||
# navigate to C:\Users\YourName\AppData\Local or wherever
|
||||
```
|
||||
|
||||
ranger should work on windows via WSL or you can modify the code to use a different file picker.
|
||||
|
||||
## license
|
||||
|
||||
GPL-3.0
|
||||
GPL-3.0-or-later
|
||||
|
||||
## contributing
|
||||
|
||||
prs welcome! this is a simple tool but if you have ideas for improvements, open an issue or submit a pr.
|
||||
|
||||
## man page
|
||||
|
||||
a man page is included. after installing via AUR it's available automatically:
|
||||
```bash
|
||||
man confy
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user