dotfiles bugabingas dorkfiles
owned by bugabinga
README Source History Refs Compare Notes Search Merge branch 'trunk' of github.com:bugabinga/dotfiles into trunk
d273182e44d6f7ac1bd76d413b91de9cb710e1f2
Oliver Jan Krylow <oliver@bugabinga.net > · 16 Oct 2024
unsigned
Browse files Compare with HEAD
Changed files (8) neovim/lua/bugabinga/nugu/palette_dark.lua Modified 10 - content_normal =
'#d4d4d4' ,
11 - content_backdrop =
'#121212' ,
12 - content_accent =
'#750b75' ,
13 - content_minor =
'#4f4f4f' ,
14 - content_focus =
'#51818c' ,
15 - content_unfocus =
'#28454b' ,
16 - content_important_global =
'#6d5bb1' ,
17 - content_important_local =
'#483a7b' ,
10 + content_normal =
'#fafafa' ,
11 + content_backdrop =
'#020202' ,
12 + content_accent =
'#5d005d' ,
13 + content_minor =
'#757575' ,
14 + content_focus =
'#2eb3d1' ,
15 + content_unfocus =
'#016a85' ,
16 + content_important_global =
'#5e45c5' ,
17 + content_important_local =
'#5e45c5' ,
19 - ui_normal =
'#e6e6e6' ,
19 + ui_normal =
'#fcfcfc' ,
20 20 ui_backdrop =
'#000000' ,
21 21 ui_accent =
'#5a265a' ,
22 22 ui_minor =
'#242424' ,
21 21 ui_unfocus
= '#0c1010' ,
22 22 ui_important_global
= '#514a6c' ,
23 23 ui_important_local
= '#2a2638' ,
neovim/lua/bugabinga/nugu/palette_light.lua Modified 10 - content_normal =
'#2b2b2b' ,
11 - content_backdrop =
'#ededed' ,
12 - content_accent =
'#750b75' ,
13 - content_minor =
'#787878' ,
14 - content_focus =
'#267b8e' ,
15 - content_unfocus =
'#929292' ,
16 - content_important_global =
'#553d98' ,
17 - content_important_local =
'#8169c3' ,
10 + content_normal =
'#050505' ,
11 + content_backdrop =
'#fdfdfd' ,
12 + content_accent =
'#a300a3' ,
13 + content_minor =
'#525252' ,
14 + content_focus =
'#017b9a' ,
15 + content_unfocus =
'#40b8d6' ,
16 + content_important_global =
'#4a25a9' ,
17 + content_important_local =
'#4a25a9' ,
19 - ui_normal =
'#1a1a1a' ,
19 + ui_normal =
'#030303' ,
20 20 ui_backdrop =
'#ffffff' ,
21 21 ui_accent =
'#5a265a' ,
22 22 ui_minor =
'#a3a3a3' ,
21 21 ui_unfocus
= '#bdbdbd' ,
22 22 ui_important_global
= '#897bb1' ,
23 23 ui_important_local
= '#bab1d1' ,
wezterm/bugabinga/code_fonts.csv Modified wezterm/bugabinga/nugu/palette_dark.lua Modified 2 - {
palette = {
debug =
"#ff00ff" ,
error =
"#6f1d3a" ,
warning =
"#967653" ,
info =
"#5f7796" ,
content = {
normal =
"#d4d4d4" ,
backdrop =
"#121212" ,
accent =
"#750b75" ,
minor =
"#4f4f4f" ,
focus =
"#51818c" ,
unfocus =
"#28454b" ,
important_local =
"#483a7b" ,
important_global =
"#6d5bb1" },
ui = {
normal =
"#e6e6e6" ,
backdrop =
"#000000" ,
accent =
"#5a265a" ,
minor =
"#242424" ,
focus =
"#3d474a" ,
unfocus =
"#0c1010" ,
important_local =
"#2a2638" ,
important_global =
"#514a6c" }}}
2 + {
palette = {
debug =
"#ff00ff" ,
error =
"#6f1d3a" ,
warning =
"#967653" ,
info =
"#5f7796" ,
content = {
normal =
"#d4d4d4" ,
backdrop =
"#121212" ,
accent =
"#750b75" ,
minor =
"#4f4f4f" ,
focus =
"#51818c" ,
unfocus =
"#28454b" ,
important_local =
"#483a7b" ,
important_global =
"#6d5bb1" },
ui = {
normal =
"#e6e6e6" ,
backdrop =
"#000000" ,
accent =
"#230723" ,
minor =
"#242424" ,
focus =
"#3d474a" ,
unfocus =
"#0c1010" ,
important_local =
"#2a2638" ,
important_global =
"#514a6c" }}}
wezterm/bugabinga/nugu/palette_light.lua Modified 2 - {
palette = {
debug =
"#ff00ff" ,
error =
"#d6638b" ,
warning =
"#d9cbbb" ,
info =
"#c7d0db" ,
content = {
normal =
"#2b2b2b" ,
backdrop =
"#ededed" ,
accent =
"#750b75" ,
minor =
"#787878" ,
focus =
"#267b8e" ,
unfocus =
"#929292" ,
important_local =
"#8169c3" ,
important_global =
"#553d98" },
ui = {
normal =
"#1a1a1a" ,
backdrop =
"#ffffff" ,
accent =
"#5a265a" ,
minor =
"#a3a3a3" ,
focus =
"#53a5b7" ,
unfocus =
"#bdbdbd" ,
important_local =
"#bab1d1" ,
important_global =
"#897bb1" }}}
2 + {
palette = {
debug =
"#ff00ff" ,
error =
"#d6638b" ,
warning =
"#d9cbbb" ,
info =
"#c7d0db" ,
content = {
normal =
"#2b2b2b" ,
backdrop =
"#ededed" ,
accent =
"#750b75" ,
minor =
"#787878" ,
focus =
"#267b8e" ,
unfocus =
"#929292" ,
important_local =
"#8169c3" ,
important_global =
"#553d98" },
ui = {
normal =
"#1a1a1a" ,
backdrop =
"#ffffff" ,
accent =
"#b225b2" ,
minor =
"#a3a3a3" ,
focus =
"#53a5b7" ,
unfocus =
"#bdbdbd" ,
important_local =
"#bab1d1" ,
important_global =
"#897bb1" }}}
yazi/plugins/ouch.yazi/LICENSE Added new file mode 100644 3 + Copyright (c) 2024 ndtoan96
5 + Permission is hereby granted, free of charge, to any person obtaining a copy
6 + of this software and associated documentation files (the "Software"), to deal
7 + in the Software without restriction, including without limitation the rights
8 + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 + copies of the Software, and to permit persons to whom the Software is
10 + furnished to do so, subject to the following conditions:
12 + The above copyright notice and this permission notice shall be included in all
13 + copies or substantial portions of the Software.
15 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
yazi/plugins/ouch.yazi/README.md Added new file mode 100644 3 + [ouch](https://github.com/ouch-org/ouch) plugin for [Yazi](https://github.com/sxyazi/yazi).
5 + 
15 + git clone https://github.com/ndtoan96/ouch.yazi.git ~/.config/yazi/plugins/ouch.yazi
18 + git clone https://github.com/ndtoan96/ouch.yazi.git %AppData%
\y azi
\c onfig
\p lugins
\o uch.yazi
21 + Make sure you have [ouch](https://github.com/ouch-org/ouch) installed and in your `PATH`.
26 + For archive preview, add this to your `yazi.toml`:
30 + prepend_previewers = [
32 + { mime = "application/*zip", run = "ouch" },
33 + { mime = "application/x-tar", run = "ouch" },
34 + { mime = "application/x-bzip2", run = "ouch" },
35 + { mime = "application/x-7z-compressed", run = "ouch" },
36 + { mime = "application/x-rar", run = "ouch" },
37 + { mime = "application/x-xz", run = "ouch" },
41 + Now go to an archive on Yazi, you should see the archive's content in the preview pane. You can use `Alt-j` and `Alt-k` to roll up and down the preview.
43 + If you want to change the icon or the style of text, you can modify the `peek` function in `init.lua` file (all of them are stored in the `lines` variable).
46 + For compession, add this to your `keymap.toml`:
49 + [[manager.prepend_keymap]]
51 + run = "plugin ouch --args=zip"
52 + desc = "Compress with ouch"
55 + The `--args=zip` part tells the plugin that default format is `zip`. You can change that to whatever format you want.
58 + This plugin does not provide a decompression feature because it already is supported by Yazi.
59 + To decompress with `ouch`, configure the opener in `yazi.toml`.
64 + { run = 'ouch d -y "%*"', desc = "Extract here with ouch", for = "windows" },
65 + { run = 'ouch d -y "$@"', desc = "Extract here with ouch", for = "unix" },
yazi/plugins/ouch.yazi/init.lua Added new file mode 100644 4 + local child
= Command(
"ouch" )
5 + :args({
"l" ,
"-t" ,
"-y" ,
tostring (self.file.url) })
6 + :stdout(Command.PIPED)
7 + :stderr(Command.PIPED)
9 + local limit
= self.area.h
10 + local file_name
= string .
match (
tostring (self.file.url),
".*[/\\](.*)" )
11 + local lines
= string .
format (
"\x1b[2m📁 %s\x1b[0m\n" , file_name)
15 + local line, event
= child:read_line()
17 + ya.err(
tostring (event))
18 + elseif event
~= 0 then 22 + if line:find(
'Archive' ,
1 ,
true )
~= 1 and line:find(
'[INFO]' ,
1 ,
true )
~= 1 then 23 + if num_skip
>= self.skip
then 24 + lines
= lines
.. line
25 + num_lines
= num_lines
+ 1 27 + num_skip
= num_skip
+ 1 30 + until num_lines
>= limit
33 + if self.skip
> 0 and num_lines
< limit
then 36 + {
tostring (
math .
max (
0 , self.skip
- (limit
- num_lines))),
only_if =
tostring (self.file.url),
upper_bound =
"" }
39 + ya.preview_widgets(self, { ui.Paragraph.parse(self.area, lines) })
43 + function M:
seek (units)
44 + local h
= cx.active.current.hovered
45 + if h
and h.url
== self.file.url
then 46 + local step
= math .
floor (units
* self.area.h
/ 10 )
47 + ya.manager_emit(
"peek" , {
48 + math .
max (
0 , cx.active.preview.skip
+ step),
49 + only_if =
tostring (self.file.url),
55 + local function file_exists (name)
56 + local f
= io .
open (name,
"r" )
66 + local get_compression_target
= ya.sync(
function ()
67 + local tab
= cx.active
70 + if # tab.selected
== 0 then 71 + if tab.current.hovered
then 72 + local name
= tab.current.hovered.name
74 + table .
insert (paths, name)
79 + default_name
= tab.current.cwd:name()
80 + for _, url
in pairs (tab.selected)
do 81 + table .
insert (paths,
tostring (url))
84 + ya.manager_emit(
"escape" , {})
86 + return paths, default_name
89 + local function invoke_compress_command (paths, name)
90 + local cmd_output, err_code
= Command(
"ouch" )
91 + :args({
"c" ,
"-y" })
94 + :stderr(Command.PIPED)
96 + if err_code
~= nil then 98 + title =
"Failed to run ouch command" ,
99 + content =
"Status: " .. err_code,
103 + elseif not cmd_output.status.success
then 105 + title =
"Compression failed: status code " .. cmd_output.status.code,
106 + content = cmd_output.stderr,
113 + function M:
entry (args)
114 + local default_fmt
= args[
1 ]
117 + local paths, default_name
= get_compression_target()
120 + local output_name, name_event
= ya.input({
121 + title =
"Create archive:" ,
122 + value = default_name
.. "." .. default_fmt,
123 + position = {
"top-center" ,
y =
3 ,
w =
40 },
125 + if name_event
~= 1 then 130 + if file_exists(output_name)
then 131 + local confirm, confirm_event
= ya.input({
132 + title =
"Overwrite " .. output_name
.. "? (y/N)" ,
133 + position = {
"top-center" ,
y =
3 ,
w =
40 },
135 + if not (confirm_event
== 1 and confirm:lower()
== "y" )
then 140 + invoke_compress_command(paths, output_name)