mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-22 08:18:08 +02:00
Implement auto reload of config
This commit is contained in:
@@ -37,6 +37,7 @@ import (
|
||||
"github.com/kovidgoyal/kitty/tools/cmd/update_self"
|
||||
"github.com/kovidgoyal/kitty/tools/tui"
|
||||
"github.com/kovidgoyal/kitty/tools/utils/images"
|
||||
"github.com/kovidgoyal/kitty/tools/watch"
|
||||
)
|
||||
|
||||
var _ = fmt.Print
|
||||
@@ -135,7 +136,7 @@ func KittyToolEntryPoints(root *cli.Command) {
|
||||
},
|
||||
})
|
||||
// __watch_conf__
|
||||
|
||||
watch.EntryPoint(root)
|
||||
// __convert_image__
|
||||
images.ConvertEntryPoint(root)
|
||||
// __atexit__
|
||||
|
||||
@@ -27,7 +27,9 @@ func watch_dirs(ctx context.Context, paths []string, debounce time.Duration, eve
|
||||
fswatcher.WithCooldown(debounce),
|
||||
}
|
||||
for _, path := range paths {
|
||||
opts = append(opts, fswatcher.WithPath(path))
|
||||
if unix.Access(path, unix.R_OK|unix.X_OK) == nil {
|
||||
opts = append(opts, fswatcher.WithPath(path))
|
||||
}
|
||||
}
|
||||
w, err := fswatcher.New(opts...)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user