repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

sync

97f822f8e283f25d40a3bf7250890879f50b4e2d

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (5)

environment.d/path.conf

Added
new file mode 100644
1 +CARGO_HOME = /home/oli/.cargo
2 +PATH = $CARGO_HOME/bin:$PATH

hypr/hyprland2.conf

Added
new file mode 100644
1 +# █ █ █▄█ █▀█ █▀█ █ ▄▀█ █▄ █ █▀▄
2 +# █▀█ █ █▀▀ █▀▄ █▄▄ █▀█ █ ▀█ █▄▀
3 +#
4 +#
5 +#
6 +#
7 +#
8 +#
9 +#
11 +# █▀▄▀█ █▀█ █▄ █ █ ▀█▀ █▀█ █▀█
12 +# █ ▀ █ █▄█ █ ▀█ █ █ █▄█ █▀▄
14 +monitor = ,preferred,auto,auto

neovim/lua/bugabinga/plugins/autotag.lua

Added
new file mode 100644
1 +return {
2 + 'windwp/nvim-ts-autotag',
3 + branch = 'main',
4 + lazy = false,
5 + opts = {
6 + enable_close_on_tag = true,
7 + },
8 +}

neovim/lua/bugabinga/plugins/textobjects.lua

Added
new file mode 100644
1 +return {
2 + 'nvim-treesitter/nvim-treesitter-textobjects',
3 + branch = 'master',
4 + event = 'VeryLazy',
5 + dependencies = 'nvim-treesitter/nvim-treesitter',
6 + config = function ()
7 + require 'nvim-treesitter.configs'.setup {
8 + textobjects = {
9 + select = {
10 + enable = true,
11 + disable = should_disable,
12 + lookahead = true,
13 + keymaps = {
14 + ['af'] = { query = '@call.outer', desc = 'outer function call' },
15 + ['if'] = { query = '@call.inner', desc = 'inner function call' },
17 + ['am'] = { query = '@function.outer', desc = 'outer function definition' },
18 + ['im'] = { query = '@function.inner', desc = 'inner function definition' },
20 + ['ai'] = { query = '@conditional.outer', desc = 'outer conditional' },
21 + ['ii'] = { query = '@conditional.inner', desc = 'inner conditional' },
23 + ['aa'] = { query = '@parameter.outer', desc = 'outer parameter' },
24 + ['ia'] = { query = '@parameter.inner', desc = 'inner parameter' },
26 + ['ac'] = { query = '@comment.outer', desc = 'outer comment' },
27 + ['ic'] = { query = '@comment.inner', desc = 'inner comment' },
28 + },
29 + selection_modes = {
30 + ['@parameter.outer'] = 'v',
31 + ['@function.outer'] = 'v',
32 + ['@class.outer'] = '<c-v>',
33 + ['@scope'] = 'v',
34 + },
35 + include_surroundig_whitespace = true,
36 + },
38 + move = {
39 + enable = true,
40 + disable = should_disable,
41 + set_jumps = true,
42 + goto_next = {
43 + [']m'] = { query = '@function.outer', desc = 'goto next function definition' },
44 + },
45 + goto_previous = {
46 + ['[m'] = { query = '@function.outer', desc = 'goto previous function definition' },
47 + },
48 + },
49 + },
50 + }
51 + end,

nushell/scripts/notes.nu

Added
new file mode 100644
1 +### bugabingas custom note taking and organizing system
2 +###
3 +### notes are grouped into contexts (folders), so that i can distinguish between
4 +### personal and work related notes.
8 +def validate_context [
9 + context: string
10 +] {
11 + if not ($env.NOTES | path exists) {
12 + error make {
13 + msg: "No notes folder found in environment variables.
14 + Make sure a NOTES variable exists in $env."
15 + }
16 + }
17 + if not ($env.NOTES | path join $context | path exists) {
18 +error make {
19 + msg: $"The given context ($context) does not exist in ($env.NOTES).
20 + Create it and try again."
21 + }
22 + }
25 + export def main [
26 + --context: string = "bugabinga" # which context do the notes belong to
27 +] {
28 + # TODO: the context needs to get overridden by env var, so that switch between work and personal is easy
30 + validate_context $context
32 + ls --short-names ($env.NOTES | path join $context)
33 + # TODO: print some high level view of the notes. tree, graph, text ?
36 +def new_note_id [] { random binary 3 | encode new-base64 --nopad --url }
38 +def new_note [
39 + title: string # title of note. will be used for title and initial heading
40 + author: string # author, usually me...
41 + date: string # creation date of note
42 + tags: list<string> # a list of tags, if already known
43 + context: string # note context
44 +] {
45 + $"---
46 +title: ($title)
47 +author: ($author)
48 +date: ($date)
49 +tags:
50 +- ($context)
51 +($tags | each { '- ' + $in } | str join (char nl))
52 +---
57 +export def new [
58 + title?: string # title of new node
59 + --tags: list<string> # some optional tags for the note
60 + --context: string = "bugabinga" # which context do the notes belong to
61 +] {
62 + validate_context $context
64 + let title = if ($title | is-empty) { input "gimme title: " } else { $title }
65 + let author = 'Oliver Jan Krylow'
66 + let now = date now | date to-record
67 + let date = $"($now.day)/($now.month)/($now.year)" # german dates. what can i say...
68 + let tags = if ($tags == null) { [] } else { $tags }
70 + let note_content = new_note $title $author $date $tags $context
71 + let note_file_name = $"(new_note_id)-($title | str kebab-case).md"
72 + let note_file = [ $env.NOTES $context $note_file_name] | path join
74 + if ($note_file | path exists) {
75 + error make {
76 + msg: "the note you are trying to create exists already"
77 + }
78 + }
80 + $note_content | save --raw $note_file
82 + let editor = if ( $env.EDITOR == null ) { 'vi' } else { $env.EDITOR }
83 + let editor = if ( $env.VISUAL == null ) { $editor } else { $env.VISUAL }
84 + run-external $editor $note_file