diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-02-29 17:33:05 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2024-02-29 17:33:05 +0100 |
| commit | e18e989e51b6dfc57327dee3bb02c1ee1050be0a (patch) | |
| tree | 96ba9e487908310c82bacc8b3f1b17c17d77109a /config | |
| parent | aa3a69e0d72cdb1d239058792461d9343ea72800 (diff) | |
| download | dotfiles-e18e989e51b6dfc57327dee3bb02c1ee1050be0a.tar.gz dotfiles-e18e989e51b6dfc57327dee3bb02c1ee1050be0a.zip | |
[vis] use vis-inotify to reload the theme
Diffstat (limited to 'config')
| m--------- | config/vis/plugins/vis-inotify | 0 | ||||
| -rw-r--r-- | config/vis/visrc.lua | 11 |
2 files changed, 8 insertions, 3 deletions
diff --git a/config/vis/plugins/vis-inotify b/config/vis/plugins/vis-inotify new file mode 160000 +Subproject dc13dfb5d77ae6c6a34802b4dbf0cac68648058 diff --git a/config/vis/visrc.lua b/config/vis/visrc.lua index c8ebc11..3a44a6a 100644 --- a/config/vis/visrc.lua +++ b/config/vis/visrc.lua @@ -42,12 +42,17 @@ end) require('plugins/suw') +local theme = "theme" vis.events.subscribe(vis.events.INIT, function() - -- Your global configuration options - local theme = "theme" - vis:command("set theme ".. theme) + -- Your global configuration options + vis:command("set theme " .. theme) end) +local inotify = require('plugins/vis-inotify') +inotify.add_recreate_watch('/home/muhq/.config/vis/themes/theme.lua', function(msg) + vis:command("set theme " .. theme) -- reload vis theme +end, '-P') + -- seperate default settings into per file and per window to not override settings from -- vis-editorconf which are set on FILE_OPEN -- default file settings |
