Merge branch 'trunk' of github.com:bugabinga/dotfiles into trunk
239ef29d07c6c417f614f852bb2756cc0af29e0b
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
- Parent 1: bc5c50774b89 · Diff against parent 1
- Parent 2: d7dbe193daec · Showing diff
bugabingas dorkfiles
239ef29d07c6c417f614f852bb2756cc0af29e0b
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
+155 / −147 text lines · 1 binary (striped old/new sizes in 64-byte units, not churn) · lines and sizes scale separately
+3 / −0 text lines
+1 / −0 text lines
Binary size (old → new): 1393 → 1398 bytes.
+1 / −0 text lines
new file mode 100644+85 / −0 text lines
### bugabingas custom note taking and organizing system###### notes are grouped into contexts (folders), so that i can distinguish between### personal and work related notes.def validate_context [ context: string] { if not ($env.NOTES | path exists) { error make { msg: "No notes folder found in environment variables. Make sure a NOTES variable exists in $env." } } if not ($env.NOTES | path join $context | path exists) {error make { msg: $"The given context ($context) does not exist in ($env.NOTES). Create it and try again." } }} export def main [ --context: string = "bugabinga" # which context do the notes belong to] { # TODO: the context needs to get overridden by env var, so that switch between work and personal is easy validate_context $context ls --short-names ($env.NOTES | path join $context) # TODO: print some high level view of the notes. tree, graph, text ?}def new_note_id [] { random binary 3 | encode new-base64 --nopad --url }def new_note [ title: string # title of note. will be used for title and initial heading author: string # author, usually me... date: string # creation date of note tags: list<string> # a list of tags, if already known context: string # note context] { $"---title: ($title)author: ($author)date: ($date)tags:- ($context)($tags | each { '- ' + $in } | str join (char nl))---"}export def new [ title?: string # title of new node --tags: list<string> # some optional tags for the note --context: string = "bugabinga" # which context do the notes belong to] { validate_context $context let title = if ($title | is-empty) { input "gimme title: " } else { $title } let author = 'Oliver Jan Krylow' let now = date now | date to-record let date = $"($now.day)/($now.month)/($now.year)" # german dates. what can i say... let tags = if ($tags == null) { [] } else { $tags } let note_content = new_note $title $author $date $tags $context let note_file_name = $"(new_note_id)-($title | str kebab-case).md" let note_file = [ $env.NOTES $context $note_file_name] | path join if ($note_file | path exists) { error make { msg: "the note you are trying to create exists already" } } $note_content | save --raw $note_file let editor = if ( $env.EDITOR == null ) { 'vi' } else { $env.EDITOR } let editor = if ( $env.VISUAL == null ) { $editor } else { $env.VISUAL } run-external $editor $note_file}deleted file mode 100644+0 / −116 text lines
Anonymous ProAnonymous Pro MinusAurulent Sans MonoAverageMonoBPmonoBigBlue TerminalPlusBitstream Vera Sans MonoBrontCMU Typewriter TextCPMono_v07CamingoCodeCascadia CodeCode New RomanCodingFontTobiConsola MonoCourier Prime CodeCousineCrispCutive MonoD2CodingDejaVu Sans MonoDina ttf 10pxDroid Sans MonoEdloEnvy Code RFantasque Sans MonoFira CodeFira MonoFixedsys Excelsior 3.01FreeMonoGeist MonoGeneric Mono IIGohuFontHackHaskligHermit# IBM Plex MathIBM Plex Mono# IBM Plex Sans# IBM Plex Sans Condensed# IBM Plex SerifInconsolataInconsolata LGCInconsolata-dzInconsolata-gIntel One MonoIosevkaIosevka SlabJetBrains MonoJetBrains Mono NLKawkab MonoLatin Modern Mono LightLektonLiberation MonoLilexLinux Libertine MonoLuculentLuxi MonoM+ 1mM+ 1mnM+ 2mMartian MonoMenschMeslo LG M DZMetrickalMonaspace Argon VarMonaspace Krypton VarMonaspace Neon VarMonaspace Radon VarMonaspace Xenon VarMonoSpatialMonoidMonospaceMonospaceTypewriterMonteCarlo Fixed 12NanumGothic_CodingNimbus MonoNotCourierSansOffice Code ProOffice Code Pro DOxygen MonoPT MonoPanic SansPixelCarnageMonoTTPointfreeProFontWindowsProggyCleanTTProggyCleanTTSZProggySmallTTProggySquareTTProggySquareTTSZProggyTinyTTProggyTinyTTSZRec Mono CasualRec Mono LinearRoboto MonoSV Basic ManualShare Tech MonoShare-TechMonoTrueSmallTypeWritingSource Code ProSudoSymbols Nerd FontSymbols Nerd Font MonoTeX Gyre CursorTerminusUbuntu MonoVerily Serif MonoVictor MonoWhoisagaveiA Writer Mono VmonoOnemonofurmononokisaxMono+2 / −2 text lines
+22 / −0 text lines
{ key = 'm', mods = 'LEADER', action = custom_action( function ( window, pane ) local unix_domain = 'unix' wez.log_info( 'Current pane domain name: ', pane:get_domain_name() ) if pane:get_domain_name() == unix_domain then wez.log_info( 'Detaching from: ', unix_domain ) window:perform_action( wez.action.DetachDomain { DomainName = unix_domain, }, pane ) else wez.log_info( 'Switching to: ', unix_domain ) window:perform_action( wez.action.AttachDomain( unix_domain ), pane ) end end ), },+1 / −0 text lines
+27 / −19 text lines
return function(cfg) cfg.default_cwd = wez.home_dir cfg.inactive_pane_hsb = { saturation = 0.42, brightness = 0.69, } cfg.default_cursor_style = 'SteadyBlock' cfg.check_for_updates = false cfg.audible_bell = 'Disabled' cfg.visual_bell = { fade_in_duration_ms = 69, fade_out_duration_ms = 69, target = 'CursorColor', } cfg.cursor_blink_rate = 0 cfg.front_end = 'WebGpu' cfg.max_fps = 144 cfg.unzoom_on_switch_pane = true cfg.scrollback_lines = 16777216return function ( cfg ) cfg.default_cwd = wez.home_dir cfg.inactive_pane_hsb = { saturation = 0.42, brightness = 0.69, } cfg.default_cursor_style = 'SteadyBlock' cfg.check_for_updates = false cfg.audible_bell = 'Disabled' cfg.visual_bell = { fade_in_duration_ms = 69, fade_out_duration_ms = 69, target = 'CursorColor', } cfg.cursor_blink_rate = 0 cfg.front_end = 'WebGpu' cfg.max_fps = 144 cfg.unzoom_on_switch_pane = true cfg.scrollback_lines = 16777216 cfg.unix_domains = { { name = 'unix', no_serve_automatically = true, -- managed via systemd -- multiplexing = "WezTerm", local_echo_threshold_ms = 10, }, }+12 / −8 text lines
+1 / −2 text lines