From ea82cbb1c0b778dd946c717cceace53fab391ba8 Mon Sep 17 00:00:00 2001 From: Tom Li Dobnik Date: Sat, 9 Aug 2025 17:12:43 +0200 Subject: init --- .config/.gitignore-template | 26 + .config/Brewfile | 40 + .config/aerospace/aerospace.toml | 77 + .config/bat/config | 1 + .config/btop/btop.conf | 221 +++ .config/btop/btop.log | 6 + .config/config.yml | 2 + .config/fastfetch/config.jsonc | 115 ++ .config/fish/config.fish | 81 + .config/fish/fish_variables | 43 + .config/fish/functions/fish_prompt.fish | 91 + .config/ghostty/config | 19 + .config/install.sh | 43 + .config/karabiner/karabiner.json | 368 ++++ .config/lazygit/config.yml | 2 + .config/linearmouse/linearmouse.json | 255 +++ .config/nvim/.editorconfig | 3 + .config/nvim/.luarc.json | 10 + .config/nvim/after/ftplugin/css.lua | 3 + .config/nvim/after/ftplugin/html.lua | 3 + .config/nvim/after/ftplugin/htmldjango.lua | 15 + .config/nvim/after/ftplugin/javascript.lua | 3 + .config/nvim/after/ftplugin/javascriptreact.lua | 3 + .config/nvim/after/ftplugin/json.lua | 3 + .config/nvim/after/ftplugin/lua.lua | 5 + .config/nvim/after/ftplugin/md.lua | 3 + .config/nvim/after/ftplugin/rust.lua | 13 + .config/nvim/init.lua | 5 + .config/nvim/lazy-lock.json | 44 + .config/nvim/lua/autocmds.lua | 28 + .config/nvim/lua/config/lazy.lua | 36 + .config/nvim/lua/config/plugins/blink-cmp.lua | 114 ++ .config/nvim/lua/config/plugins/colorscheme.lua | 14 + .config/nvim/lua/config/plugins/conform.lua | 33 + .config/nvim/lua/config/plugins/flash.lua | 17 + .config/nvim/lua/config/plugins/fzflua.lua | 29 + .config/nvim/lua/config/plugins/gitsigns.lua | 36 + .config/nvim/lua/config/plugins/harpoon.lua | 49 + .config/nvim/lua/config/plugins/learn.lua | 8 + .config/nvim/lua/config/plugins/lsp.lua | 236 +++ .config/nvim/lua/config/plugins/lualine.lua | 218 +++ .config/nvim/lua/config/plugins/luasnip.lua | 21 + .config/nvim/lua/config/plugins/markdown.lua | 220 +++ .config/nvim/lua/config/plugins/mini.lua | 27 + .config/nvim/lua/config/plugins/obsidian.lua | 42 + .config/nvim/lua/config/plugins/oil.lua | 37 + .config/nvim/lua/config/plugins/rustacean.lua | 5 + .config/nvim/lua/config/plugins/snacks.lua | 83 + .config/nvim/lua/config/plugins/treesitter.lua | 41 + .config/nvim/lua/config/plugins/typst.lua | 9 + .config/nvim/lua/config/plugins/ufo.lua | 28 + .config/nvim/lua/config/plugins/utils.lua | 71 + .config/nvim/lua/config/plugins/which-key.lua | 29 + .config/nvim/lua/config/snippets/all.lua | 10 + .config/nvim/lua/mappings.lua | 143 ++ .config/nvim/lua/options.lua | 36 + .config/sesh/sesh.toml | 4 + .config/starship.toml | 4 + .../DO_NOT_MODIFY_ANYTHING_IN_THIS_DIRECTORY | 0 .config/yazi/flavors/nord.yazi/flavor.toml | 152 ++ .config/yazi/flavors/nord.yazi/tmtheme.xml | 1873 ++++++++++++++++++++ .config/yazi/keymap.toml | 9 + .config/yazi/keymap.toml-1748684127440481 | 9 + .config/yazi/package.toml | 12 + .config/yazi/plugins/compress.yazi/LICENSE | 21 + .config/yazi/plugins/compress.yazi/README.md | 48 + .config/yazi/plugins/compress.yazi/main.lua | 228 +++ .config/yazi/plugins/smart-enter.yazi/LICENSE | 21 + .config/yazi/plugins/smart-enter.yazi/README.md | 40 + .config/yazi/plugins/smart-enter.yazi/main.lua | 10 + .config/yazi/theme.toml | 2 + .config/yazi/yazi.toml | 2 + 72 files changed, 5558 insertions(+) create mode 100644 .config/.gitignore-template create mode 100644 .config/Brewfile create mode 100644 .config/aerospace/aerospace.toml create mode 100644 .config/bat/config create mode 100644 .config/btop/btop.conf create mode 100644 .config/btop/btop.log create mode 100644 .config/config.yml create mode 100644 .config/fastfetch/config.jsonc create mode 100644 .config/fish/config.fish create mode 100644 .config/fish/fish_variables create mode 100644 .config/fish/functions/fish_prompt.fish create mode 100644 .config/ghostty/config create mode 100644 .config/install.sh create mode 100644 .config/karabiner/karabiner.json create mode 100644 .config/lazygit/config.yml create mode 100644 .config/linearmouse/linearmouse.json create mode 100644 .config/nvim/.editorconfig create mode 100644 .config/nvim/.luarc.json create mode 100644 .config/nvim/after/ftplugin/css.lua create mode 100644 .config/nvim/after/ftplugin/html.lua create mode 100644 .config/nvim/after/ftplugin/htmldjango.lua create mode 100644 .config/nvim/after/ftplugin/javascript.lua create mode 100644 .config/nvim/after/ftplugin/javascriptreact.lua create mode 100644 .config/nvim/after/ftplugin/json.lua create mode 100644 .config/nvim/after/ftplugin/lua.lua create mode 100644 .config/nvim/after/ftplugin/md.lua create mode 100644 .config/nvim/after/ftplugin/rust.lua create mode 100644 .config/nvim/init.lua create mode 100644 .config/nvim/lazy-lock.json create mode 100644 .config/nvim/lua/autocmds.lua create mode 100644 .config/nvim/lua/config/lazy.lua create mode 100644 .config/nvim/lua/config/plugins/blink-cmp.lua create mode 100644 .config/nvim/lua/config/plugins/colorscheme.lua create mode 100644 .config/nvim/lua/config/plugins/conform.lua create mode 100644 .config/nvim/lua/config/plugins/flash.lua create mode 100644 .config/nvim/lua/config/plugins/fzflua.lua create mode 100644 .config/nvim/lua/config/plugins/gitsigns.lua create mode 100644 .config/nvim/lua/config/plugins/harpoon.lua create mode 100644 .config/nvim/lua/config/plugins/learn.lua create mode 100644 .config/nvim/lua/config/plugins/lsp.lua create mode 100644 .config/nvim/lua/config/plugins/lualine.lua create mode 100644 .config/nvim/lua/config/plugins/luasnip.lua create mode 100644 .config/nvim/lua/config/plugins/markdown.lua create mode 100644 .config/nvim/lua/config/plugins/mini.lua create mode 100644 .config/nvim/lua/config/plugins/obsidian.lua create mode 100644 .config/nvim/lua/config/plugins/oil.lua create mode 100644 .config/nvim/lua/config/plugins/rustacean.lua create mode 100644 .config/nvim/lua/config/plugins/snacks.lua create mode 100644 .config/nvim/lua/config/plugins/treesitter.lua create mode 100644 .config/nvim/lua/config/plugins/typst.lua create mode 100644 .config/nvim/lua/config/plugins/ufo.lua create mode 100644 .config/nvim/lua/config/plugins/utils.lua create mode 100644 .config/nvim/lua/config/plugins/which-key.lua create mode 100644 .config/nvim/lua/config/snippets/all.lua create mode 100644 .config/nvim/lua/mappings.lua create mode 100644 .config/nvim/lua/options.lua create mode 100644 .config/sesh/sesh.toml create mode 100644 .config/starship.toml create mode 100644 .config/yazi/flavors/nord.yazi/DO_NOT_MODIFY_ANYTHING_IN_THIS_DIRECTORY create mode 100644 .config/yazi/flavors/nord.yazi/flavor.toml create mode 100644 .config/yazi/flavors/nord.yazi/tmtheme.xml create mode 100644 .config/yazi/keymap.toml create mode 100644 .config/yazi/keymap.toml-1748684127440481 create mode 100644 .config/yazi/package.toml create mode 100644 .config/yazi/plugins/compress.yazi/LICENSE create mode 100644 .config/yazi/plugins/compress.yazi/README.md create mode 100644 .config/yazi/plugins/compress.yazi/main.lua create mode 100644 .config/yazi/plugins/smart-enter.yazi/LICENSE create mode 100644 .config/yazi/plugins/smart-enter.yazi/README.md create mode 100644 .config/yazi/plugins/smart-enter.yazi/main.lua create mode 100644 .config/yazi/theme.toml create mode 100644 .config/yazi/yazi.toml (limited to '.config') diff --git a/.config/.gitignore-template b/.config/.gitignore-template new file mode 100644 index 0000000..6a6b95c --- /dev/null +++ b/.config/.gitignore-template @@ -0,0 +1,26 @@ +# macOS system files +**/.DS_Store + +# Node.js dependencies +node_modules/ + +# Environment variables +**/.env + +# Python cache files +**/__pycache__/ +*.py[cod] + +# Python virtual environments +venv/ +./venv +.env/ +uv.lock + +# .gitignore file +**/.gitignore + +# Jupyter +./.ipynb_checkpoints/ + + diff --git a/.config/Brewfile b/.config/Brewfile new file mode 100644 index 0000000..a008b76 --- /dev/null +++ b/.config/Brewfile @@ -0,0 +1,40 @@ +brew "git" +brew "nvim" +brew "bat" +brew "eza" +brew "fastfetch" +brew "ffmpeg" +brew "fish" +brew "fzf" +brew "fd" +brew "ripgrep" +brew "make" +brew "yazi" +brew "zoxide" +brew "node" +brew "btop" +brew "yarn" +brew "lazygit" +brew "atuin" +brew "starship" + +cask "visual-studio-code" +cask "google-chrome" +cask "middleclick" +cask "obs" +cask "betterdisplay" +cask "coconutbattery" +cask "jordanbaird-ice" +cask "raycast" +cask "karabiner-elements" +cask "keyboardcleantool" +cask "linearmouse" +cask "shottr" +cask "docker" +cask "vlc" +cask "discord" +cask "spotify" +cask "aldente" +cask "ghossty" +cask "vivaldi" +cask "brave" diff --git a/.config/aerospace/aerospace.toml b/.config/aerospace/aerospace.toml new file mode 100644 index 0000000..1e6ad54 --- /dev/null +++ b/.config/aerospace/aerospace.toml @@ -0,0 +1,77 @@ +# You can use it to add commands that run after login to macOS user session. +# 'start-at-login' needs to be 'true' for 'after-login-command' to work +# Available commands: https://nikitabobko.github.io/AeroSpace/commands +# after-login-command = ["exec-and-forget /bin/bash /Users/tomiko/.config/kanata/kanata.sh"] +after-login-command = [] + +# You can use it to add commands that run after AeroSpace startup. +# 'after-startup-command' is run after 'after-login-command' +# Available commands : https://nikitabobko.github.io/AeroSpace/commands +# Run Sketchybar together with AeroSpace +# sketchbar has a built-in detection of already running process, +# so it won't be run twice on AeroSpace restart +after-startup-command = [] + +start-at-login = true + +enable-normalization-flatten-containers = true +enable-normalization-opposite-orientation-for-nested-containers = true + +default-root-container-layout = 'accordion' + +accordion-padding = 0 + +default-root-container-orientation = 'horizontal' + +key-mapping.preset = 'qwerty' + +# Gaps between windows (inner-*) and between monitor edges (outer-*). +# Possible values: +# - Constant: gaps.outer.top = 8 +# - Per monitor: gaps.outer.top = [{ monitor.main = 16 }, { monitor."some-pattern" = 32 }, 24] +# In this example, 24 is a default value when there is no match. +# Monitor pattern is the same as for 'workspace-to-monitor-force-assignment'. +# See: https://nikitabobko.github.io/AeroSpace/guide#assign-workspaces-to-monitors +[gaps] +inner.horizontal = 0 +inner.vertical = 0 +outer.left = 0 +outer.bottom = 0 +outer.top = 0 +outer.right = 0 + +[mode.main.binding] + +# All possible keys: +# - Letters. a, b, c, ..., z +# - Numbers. 0, 1, 2, ..., 9 +# - Keypad numbers. keypad0, keypad1, keypad2, ..., keypad9 +# - F-keys. f1, f2, ..., f20 +# - Special keys. minus, equal, period, comma, slash, backslash, quote, semicolon, backtick, +# leftSquareBracket, rightSquareBracket, space, enter, esc, backspace, tab +# - Keypad special. keypadClear, keypadDecimalMark, keypadDivide, keypadEnter, keypadEqual, +# keypadMinus, keypadMultiply, keypadPlus +# - Arrows. left, down, up, right + +# All possible modifiers: cmd, alt, ctrl, shift + +# All possible commands: https://nikitabobko.github.io/AeroSpace/commands +alt-shift-p = 'focus left' +alt-shift-n = 'focus right' + +alt-1 = 'workspace 1' +alt-2 = 'workspace 2' +alt-3 = 'workspace 3' + +alt-shift-1 = 'move-node-to-workspace 1' +alt-shift-2 = 'move-node-to-workspace 2' +alt-shift-3 = 'move-node-to-workspace 3' + + +[[on-window-detected]] +if.app-id = 'com.mitchellh.ghostty' +run = 'move-node-to-workspace 2' +check-further-callbacks = false + +[[on-window-detected]] +run = 'move-node-to-workspace 1' diff --git a/.config/bat/config b/.config/bat/config new file mode 100644 index 0000000..83169f3 --- /dev/null +++ b/.config/bat/config @@ -0,0 +1 @@ +--theme 'Nord' diff --git a/.config/btop/btop.conf b/.config/btop/btop.conf new file mode 100644 index 0000000..21392cb --- /dev/null +++ b/.config/btop/btop.conf @@ -0,0 +1,221 @@ +#? Config file for btop v. 1.4.4 + +#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes. +#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes" +color_theme = "nord" + +#* If the theme set background should be shown, set to False if you want terminal background transparency. +theme_background = False + +#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false. +truecolor = True + +#* Set to true to force tty mode regardless if a real tty has been detected or not. +#* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols. +force_tty = False + +#* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets. +#* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box. +#* Use whitespace " " as separator between different presets. +#* Example: "cpu:0:default,mem:0:tty,proc:1:default cpu:0:braille,proc:0:tty" +presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty" + +#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists. +#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift. +vim_keys = False + +#* Rounded corners on boxes, is ignored if TTY mode is ON. +rounded_corners = True + +#* Default symbols to use for graph creation, "braille", "block" or "tty". +#* "braille" offers the highest resolution but might not be included in all fonts. +#* "block" has half the resolution of braille but uses more common characters. +#* "tty" uses only 3 different symbols but will work with most fonts and should work in a real TTY. +#* Note that "tty" only has half the horizontal resolution of the other two, so will show a shorter historical view. +graph_symbol = "braille" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_cpu = "default" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_mem = "default" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_net = "default" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_proc = "default" + +#* Manually set which boxes to show. Available values are "cpu mem net proc" and "gpu0" through "gpu5", separate values with whitespace. +shown_boxes = "cpu mem net proc" + +#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs. +update_ms = 2000 + +#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct", +#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly. +proc_sorting = "pid" + +#* Reverse sorting order, True or False. +proc_reversed = False + +#* Show processes as a tree. +proc_tree = False + +#* Use the cpu graph colors in the process list. +proc_colors = True + +#* Use a darkening gradient in the process list. +proc_gradient = True + +#* If process cpu usage should be of the core it's running on or usage of the total available cpu power. +proc_per_core = False + +#* Show process memory as bytes instead of percent. +proc_mem_bytes = True + +#* Show cpu graph for each process. +proc_cpu_graphs = True + +#* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate) +proc_info_smaps = False + +#* Show proc box on left side of screen instead of right. +proc_left = False + +#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop). +proc_filter_kernel = False + +#* In tree-view, always accumulate child process resources in the parent process. +proc_aggregate = False + +#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available. +#* Select from a list of detected attributes from the options menu. +cpu_graph_upper = "Auto" + +#* Sets the CPU stat shown in lower half of the CPU graph, "total" is always available. +#* Select from a list of detected attributes from the options menu. +cpu_graph_lower = "Auto" + +#* Toggles if the lower CPU graph should be inverted. +cpu_invert_lower = True + +#* Set to True to completely disable the lower CPU graph. +cpu_single_graph = False + +#* Show cpu box at bottom of screen instead of top. +cpu_bottom = False + +#* Shows the system uptime in the CPU box. +show_uptime = True + +#* Show cpu temperature. +check_temp = True + +#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors. +cpu_sensor = "Auto" + +#* Show temperatures for cpu cores also if check_temp is True and sensors has been found. +show_coretemp = True + +#* Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core. +#* Use lm-sensors or similar to see which cores are reporting temperatures on your machine. +#* Format "x:y" x=core with wrong temp, y=core with correct temp, use space as separator between multiple entries. +#* Example: "4:0 5:1 6:3" +cpu_core_map = "" + +#* Which temperature scale to use, available values: "celsius", "fahrenheit", "kelvin" and "rankine". +temp_scale = "celsius" + +#* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024. +base_10_sizes = False + +#* Show CPU frequency. +show_cpu_freq = True + +#* Draw a clock at top of screen, formatting according to strftime, empty string to disable. +#* Special formatting: /host = hostname | /user = username | /uptime = system uptime +clock_format = "%X" + +#* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort. +background_update = True + +#* Custom cpu model name, empty string to disable. +custom_cpu_name = "" + +#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ". +#* Only disks matching the filter will be shown. Prepend exclude= to only show disks not matching the filter. Examples: disk_filter="/boot /home/user", disks_filter="exclude=/boot /home/user" +disks_filter = "" + +#* Show graphs instead of meters for memory values. +mem_graphs = True + +#* Show mem box below net box instead of above. +mem_below_net = False + +#* Count ZFS ARC in cached and available memory. +zfs_arc_cached = True + +#* If swap memory should be shown in memory box. +show_swap = True + +#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk. +swap_disk = True + +#* If mem box should be split to also show disks info. +show_disks = True + +#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar. +only_physical = True + +#* Read disks list from /etc/fstab. This also disables only_physical. +use_fstab = True + +#* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool) +zfs_hide_datasets = False + +#* Set to true to show available disk space for privileged users. +disk_free_priv = False + +#* Toggles if io activity % (disk busy time) should be shown in regular disk usage view. +show_io_stat = True + +#* Toggles io mode for disks, showing big graphs for disk read/write speeds. +io_mode = False + +#* Set to True to show combined read/write io graphs in io mode. +io_graph_combined = False + +#* Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ". +#* Example: "/mnt/media:100 /:20 /boot:1". +io_graph_speeds = "" + +#* Set fixed values for network graphs in Mebibits. Is only used if net_auto is also set to False. +net_download = 100 + +net_upload = 100 + +#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest. +net_auto = True + +#* Sync the auto scaling for download and upload to whichever currently has the highest scale. +net_sync = False + +#* Starts with the Network Interface specified here. +net_iface = "" + +#* "True" shows bitrates in base 10 (Kbps, Mbps). "False" shows bitrates in binary sizes (Kibps, Mibps, etc.). "Auto" uses base_10_sizes. +base_10_bitrate = "Auto" + +#* Show battery stats in top right if battery is present. +show_battery = True + +#* Which battery to use if multiple are present. "Auto" for auto detection. +selected_battery = "Auto" + +#* Show power stats of battery next to charge indicator. +show_battery_watts = True + +#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG". +#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info. +log_level = "WARNING" diff --git a/.config/btop/btop.log b/.config/btop/btop.log new file mode 100644 index 0000000..0151b4c --- /dev/null +++ b/.config/btop/btop.log @@ -0,0 +1,6 @@ + +2025/03/03 (02:17:12) | ===> btop++ v.1.4.0 +2025/03/03 (02:17:12) | WARNING: Failed to set locale UTF-8 continuing anyway. + +2025/03/03 (02:17:28) | ===> btop++ v.1.4.0 +2025/03/03 (02:17:28) | WARNING: Failed to set locale UTF-8 continuing anyway. diff --git a/.config/config.yml b/.config/config.yml new file mode 100644 index 0000000..21ea0dc --- /dev/null +++ b/.config/config.yml @@ -0,0 +1,2 @@ +os: + edit: "nvim {{filename}}" diff --git a/.config/fastfetch/config.jsonc b/.config/fastfetch/config.jsonc new file mode 100644 index 0000000..2a40b45 --- /dev/null +++ b/.config/fastfetch/config.jsonc @@ -0,0 +1,115 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "type": "none" + }, + "modules": [ + "break", + { + "type": "custom", + "format": "\u001b[33m┌──────────────────────Hardware──────────────────────┐" + }, + { + "type": "host", + "key": " PC", + "keyColor": "red", + "format": "MacBook Pro (14-inch, 2024)" + }, + { + "type": "cpu", + "key": "│ ├", + "showPeCoreCount": true, + "keyColor": "red" + }, + { + "type": "gpu", + "key": "│ ├󰢮", + "keyColor": "red" + }, + { + "type": "memory", + "key": "│ ├", + "keyColor": "red" + }, + { + "type": "disk", + "key": "│ └", + "keyColor": "red", + "format": "{1} / {2} ({3}) - {9}" + }, + { + "type": "custom", + "format": "\u001b[33m└────────────────────────────────────────────────────┘" + }, + "break", + { + "type": "custom", + "format": "\u001b[33m┌──────────────────────Software──────────────────────┐" + }, + { + "type": "os", + "key": "󰀵 OS", + "keyColor": "green" + }, + { + "type": "kernel", + "key": "│ ├", + "keyColor": "green" + }, + { + "type": "packages", + "key": "│ ├󰏖", + "keyColor": "green" + }, + { + "type": "terminal", + "key": "│ ├", + "keyColor": "green" + }, + { + "type": "shell", + "key": "└ └", + "keyColor": "green" + }, + { + "type": "custom", + "format": "\u001b[33m└────────────────────────────────────────────────────┘" + }, + "break", + { + "type": "custom", + "format": "\u001b[33m┌───────────────────Miscellaneous────────────────────┐" + }, + { + "type": "uptime", + "key": " Uptime", + "keyColor": "magenta" + }, + { + "type": "battery", + "key": " Battery", + "keyColor": "magenta", + "format": "{4} ({12} hours, {13} minutes remaining)" + }, + { + "type": "media", + "key": " Music", + "keyColor": "magenta", + "format": "{1} - {4}" + }, + { + "type": "custom", + "format": " A star can only truly be seen in the darkness...", + "outputColor": "cyan" + }, + { + "type": "custom", + "format": "\u001b[33m└────────────────────────────────────────────────────┘" + }, + {"type": "colors", + "paddingLeft": 20, + "symbol": "star" + }, + "break" + ] +} diff --git a/.config/fish/config.fish b/.config/fish/config.fish new file mode 100644 index 0000000..9c5de4a --- /dev/null +++ b/.config/fish/config.fish @@ -0,0 +1,81 @@ +if status is-interactive + clear +end + +function fish_greeting; end + +function f + set tmp (mktemp -t "yazi-cwd.XXXXXX") + yazi $argv --cwd-file="$tmp" + if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] + builtin cd -- "$cwd" + end + rm -f -- "$tmp" +end + +function lt; + eza --tree --color=always --icons=always --level=$argv +end + +function a + set max_depth 5 + set current_depth 0 + set dir (pwd) + + while test $current_depth -lt $max_depth + if test -d "$dir/venv" + source "$dir/venv/bin/activate.fish" + return 0 + end + set dir (dirname $dir) + set current_depth (math $current_depth + 1) + end + + echo "venv folder not found within $max_depth levels." + return 1 +end + +function gitzip + git ls-files | zip archive.zip -@ +end + +alias c=clear +alias g=fg +alias v=nvim +alias vv="nvim ." +alias ic="cd ~/Library/Mobile Documents/com~apple~CloudDocs" +alias cc="clear & cd" +alias l="eza --color=always --long --git --no-filesize --icons=always --no-time --no-user --no-permissions --group-directories-first" +alias ll="eza --color=always --long --git --icons=always --no-user --group-directories-first" +alias la="eza -a --color=always --long --git --no-filesize --icons=always --no-time --no-user --no-permissions --group-directories-first" +alias ff="fastfetch" +alias p=pgcli +alias t="tmux attach" +alias d="deactivate" +alias venv="python3 -m venv venv" +alias cd="z" +alias gi="git init && aig" +alias gs="git status" +alias aig="cp ~/.config/.gitignore-template ./.gitignore" +alias u="uv run" + + +function ga + git add -A + git commit -m "auto" +end + +# Created by `pipx` on 2024-11-25 11:43:56 +set PATH $PATH /Users/tom/.local/bin +# Cargo path +set PATH $HOME/.cargo/bin $PATH + +eval "$(/opt/homebrew/bin/brew shellenv)" +zoxide init fish | source +atuin init fish --disable-up-arrow | source +export EDITOR="nvim" + +# uv +fish_add_path "/Users/tomiko/.local/bin" + +starship init fish | source diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables new file mode 100644 index 0000000..eb2b27e --- /dev/null +++ b/.config/fish/fish_variables @@ -0,0 +1,43 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __fish_initialized:3800 +SETUVAR fish_color_autosuggestion:4c566a +SETUVAR fish_color_cancel:\x2d\x2dreverse +SETUVAR fish_color_command:88c0d0 +SETUVAR fish_color_comment:4c566a\x1e\x2d\x2ditalics +SETUVAR fish_color_cwd:5e81ac +SETUVAR fish_color_cwd_root:bf616a +SETUVAR fish_color_end:81a1c1 +SETUVAR fish_color_error:bf616a +SETUVAR fish_color_escape:ebcb8b +SETUVAR fish_color_history_current:e5e9f0\x1e\x2d\x2dbold +SETUVAR fish_color_host:a3be8c +SETUVAR fish_color_host_remote:ebcb8b +SETUVAR fish_color_keyword:81a1c1 +SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue +SETUVAR fish_color_normal:normal +SETUVAR fish_color_operator:81a1c1 +SETUVAR fish_color_option:8fbcbb +SETUVAR fish_color_param:d8dee9 +SETUVAR fish_color_quote:a3be8c +SETUVAR fish_color_redirection:b48ead\x1e\x2d\x2dbold +SETUVAR fish_color_search_match:\x2d\x2dbold\x1e\x2d\x2dbackground\x3d434c5e +SETUVAR fish_color_selection:d8dee9\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3d434c5e +SETUVAR fish_color_status:bf616a +SETUVAR fish_color_user:a3be8c +SETUVAR fish_color_valid_path:\x2d\x2dunderline +SETUVAR fish_key_bindings:fish_default_key_bindings +SETUVAR fish_pager_color_background:\x1d +SETUVAR fish_pager_color_completion:e5e9f0 +SETUVAR fish_pager_color_description:ebcb8b\x1e\x2d\x2ditalics +SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SETUVAR fish_pager_color_progress:3b4252\x1e\x2d\x2dbackground\x3dd08770 +SETUVAR fish_pager_color_secondary_background:\x1d +SETUVAR fish_pager_color_secondary_completion:\x1d +SETUVAR fish_pager_color_secondary_description:\x1d +SETUVAR fish_pager_color_secondary_prefix:\x1d +SETUVAR fish_pager_color_selected_background:\x2d\x2dbackground\x3d434c5e +SETUVAR fish_pager_color_selected_completion:\x1d +SETUVAR fish_pager_color_selected_description:\x1d +SETUVAR fish_pager_color_selected_prefix:\x1d +SETUVAR fish_user_paths:/Users/tomiko/\x2elocal/bin diff --git a/.config/fish/functions/fish_prompt.fish b/.config/fish/functions/fish_prompt.fish new file mode 100644 index 0000000..1e5e722 --- /dev/null +++ b/.config/fish/functions/fish_prompt.fish @@ -0,0 +1,91 @@ +function fish_prompt + set -l __last_command_exit_status $status + + if not set -q -g __fish_arrow_functions_defined + set -g __fish_arrow_functions_defined + function _git_branch_name + set -l branch (git symbolic-ref --quiet HEAD 2>/dev/null) + if set -q branch[1] + echo (string replace -r '^refs/heads/' '' $branch) + else + echo (git rev-parse --short HEAD 2>/dev/null) + end + end + + function _is_git_dirty + not command git diff-index --cached --quiet HEAD -- &>/dev/null + or not command git diff --no-ext-diff --quiet --exit-code &>/dev/null + end + + function _is_git_repo + type -q git + or return 1 + git rev-parse --git-dir >/dev/null 2>&1 + end + + function _hg_branch_name + echo (hg branch 2>/dev/null) + end + + function _is_hg_dirty + set -l stat (hg status -mard 2>/dev/null) + test -n "$stat" + end + + function _is_hg_repo + fish_print_hg_root >/dev/null + end + + function _repo_branch_name + _$argv[1]_branch_name + end + + function _is_repo_dirty + _is_$argv[1]_dirty + end + + function _repo_type + if _is_hg_repo + echo hg + return 0 + else if _is_git_repo + echo git + return 0 + end + return 1 + end + end + + set -l cyan (set_color -o cyan) + set -l yellow (set_color -o yellow) + set -l red (set_color -o red) + set -l green (set_color -o green) + set -l blue (set_color -o blue) + set -l normal (set_color normal) + + set -l arrow_color "$green" + if test $__last_command_exit_status != 0 + set arrow_color "$red" + end + + set -l arrow "$arrow_color➜ " + if fish_is_root_user + set arrow "$arrow_color# " + end + + set -l cwd $yellow(prompt_pwd) + + set -l repo_info + if set -l repo_type (_repo_type) + set -l repo_branch $red(_repo_branch_name $repo_type) + set repo_info "$cyan $repo_type:($repo_branch$cyan)" + + if _is_repo_dirty $repo_type + set -l dirty "$yellow ✗" + set repo_info "$repo_info$dirty" + end + end + + echo $arrow $cwd $repo_info $normal + # echo $arrow +end diff --git a/.config/ghostty/config b/.config/ghostty/config new file mode 100644 index 0000000..488a14b --- /dev/null +++ b/.config/ghostty/config @@ -0,0 +1,19 @@ +macos-window-shadow = false +theme = nord +font-size = 22 +#font-family = "Maple Mono" +font-family = "IosevkaTerm Nerd Font" +keybind = global:alt+c=toggle_quick_terminal +macos-option-as-alt = true +cursor-style = block +cursor-style-blink = false +shell-integration-features = no-cursor +confirm-close-surface = false +macos-titlebar-style = hidden +quick-terminal-animation-duration = 0 +background = #000000 +background-blur = 15 +background-opacity = 0.8 + +keybind = super+k=text:\x13\x4b +keybind = super+l=text:\x13\x4c diff --git a/.config/install.sh b/.config/install.sh new file mode 100644 index 0000000..89be1d3 --- /dev/null +++ b/.config/install.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +# Request sudo password at the start (only once) +echo "Requesting sudo privileges..." +sudo -v + +# Check if Homebrew is installed and install it if not +if ! command -v brew &> /dev/null +then + echo "Homebrew not found. Installing Homebrew..." + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +else + echo "Homebrew is already installed." +fi + +# macOS settings +echo "Configuring macOS system settings..." +defaults write -g NSWindowShouldDragOnGesture -bool true +defaults write com.apple.dock autohide -bool true +defaults write com.apple.dock tilesize -int 30 +defaults write com.apple.dock persistent-apps -array +defaults write com.apple.dock show-recents -bool false +defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false +defaults write -g NSGrammarCheckingEnabled -bool false +defaults write -g NSAutomaticQuoteSubstitutionEnabled -bool false +defaults write -g NSAutomaticDashSubstitutionEnabled -bool false +defaults write com.apple.dock autohide-time-modifier -float 0.15; +defaults delete com.apple.dock autohide-delay; +defaults write -g KeyRepeat -int 1 +defaults write -g InitialKeyRepeat -int 20 +killall Dock + +# Ensure Fish shell is available in /etc/shells and set it as the default +grep -qxF "/opt/homebrew/bin/fish" /etc/shells || echo "/opt/homebrew/bin/fish" | sudo tee -a /etc/shells +chsh -s /opt/homebrew/bin/fish + +# Instructions for additional apps +echo "Go to System Settings > Keyboard > Text Input and disable all" + +cd "~/dotfiles/" +stow . +# Install packages with Homebrew +brew bundle diff --git a/.config/karabiner/karabiner.json b/.config/karabiner/karabiner.json new file mode 100644 index 0000000..5f4d55c --- /dev/null +++ b/.config/karabiner/karabiner.json @@ -0,0 +1,368 @@ +{ + "global": { + "show_in_menu_bar": false + }, + "profiles": [ + { + "complex_modifications": { + "rules": [ + { + "description": "left_ctrl -> cmd+tab if pressed alone", + "enabled": false, + "manipulators": [ + { + "from": { + "key_code": "left_command" + }, + "to": [ + { + "key_code": "left_command" + } + ], + "to_if_alone": [ + { + "key_code": "tab", + "modifiers": [ + "command" + ] + } + ], + "type": "basic" + } + ] + }, + { + "description": "Disable Control + Left Click", + "enabled": false, + "manipulators": [ + { + "from": { + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "any" + ] + }, + "pointing_button": "button1" + }, + "to": [ + { + "pointing_button": "button1" + } + ], + "type": "basic" + } + ] + }, + { + "description": "Change caps_lock to Hyper Key (⌃⌥⇧⌘)", + "manipulators": [ + { + "from": { + "key_code": "caps_lock", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "left_option" + } + ], + "to_if_alone": [ + { + "key_code": "escape" + } + ], + "type": "basic" + } + ] + }, + { + "description": "Hyper+h -> left_arrow", + "enabled": false, + "manipulators": [ + { + "from": { + "key_code": "h", + "modifiers": { + "mandatory": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + }, + "to": [ + { + "key_code": "left_arrow", + "modifiers": [] + } + ], + "type": "basic" + } + ] + }, + { + "description": "Hyper+j -> down_arrow", + "enabled": false, + "manipulators": [ + { + "from": { + "key_code": "j", + "modifiers": { + "mandatory": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + }, + "to": [ + { + "key_code": "down_arrow", + "modifiers": [] + } + ], + "type": "basic" + } + ] + }, + { + "description": "Hyper+k -> up_arrow", + "enabled": false, + "manipulators": [ + { + "from": { + "key_code": "k", + "modifiers": { + "mandatory": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + }, + "to": [ + { + "key_code": "up_arrow", + "modifiers": [] + } + ], + "type": "basic" + } + ] + }, + { + "description": "Hyper+l -> right_arrow", + "enabled": false, + "manipulators": [ + { + "from": { + "key_code": "l", + "modifiers": { + "mandatory": [ + "left_command", + "left_control", + "left_option", + "left_shift" + ] + } + }, + "to": [ + { + "key_code": "right_arrow", + "modifiers": [] + } + ], + "type": "basic" + } + ] + }, + { + "description": "Hyper+s -> left_control+s", + "manipulators": [ + { + "from": { + "key_code": "s", + "modifiers": { + "mandatory": [ + "left_option" + ] + } + }, + "to": [ + { + "key_code": "s", + "modifiers": [ + "left_control" + ] + } + ], + "type": "basic" + } + ] + }, + { + "description": "Hyper+delete_or_backspace -> left_option+delete_or_backspace", + "enabled": false, + "manipulators": [ + { + "from": { + "key_code": "delete_or_backspace", + "modifiers": { + "mandatory": [ + "left_shift", + "left_command", + "left_control", + "left_option" + ] + } + }, + "to": [ + { + "key_code": "delete_or_backspace", + "modifiers": [ + "left_option" + ] + } + ], + "type": "basic" + } + ] + }, + { + "description": "Hyper+a -> left_control+a", + "manipulators": [ + { + "from": { + "key_code": "a", + "modifiers": { + "mandatory": [ + "left_option" + ] + } + }, + "to": [ + { + "key_code": "a", + "modifiers": [ + "left_control" + ] + } + ], + "type": "basic" + } + ] + }, + { + "description": "Hyper+tab -> left_command+t", + "enabled": false, + "manipulators": [ + { + "from": { + "key_code": "tab", + "modifiers": { + "mandatory": [ + "left_shift", + "left_command", + "left_control", + "left_option" + ] + } + }, + "to": [ + { + "key_code": "t", + "modifiers": [ + "left_command" + ] + } + ], + "type": "basic" + } + ] + }, + { + "description": "left_control+return_or_enter -> left click", + "enabled": false, + "manipulators": [ + { + "from": { + "key_code": "return_or_enter", + "modifiers": { + "mandatory": [ + "left_control" + ] + } + }, + "to": [ + { + "pointing_button": "button1" + } + ], + "type": "basic" + } + ] + }, + { + "description": "Hyper+q -> right_command+k", + "enabled": false, + "manipulators": [ + { + "from": { + "key_code": "q", + "modifiers": { + "mandatory": [ + "left_option", + "left_shift", + "left_command", + "left_control" + ] + } + }, + "to": [ + { + "key_code": "k", + "modifiers": [ + "right_command" + ] + } + ], + "type": "basic" + } + ] + } + ] + }, + "devices": [ + { + "identifiers": { + "is_keyboard": true, + "product_id": 53297, + "vendor_id": 13364 + }, + "ignore": true + }, + { + "identifiers": { + "is_keyboard": true, + "product_id": 166, + "vendor_id": 5426 + }, + "ignore": true + } + ], + "virtual_hid_keyboard": { + "keyboard_type_v2": "ansi" + } + } + ] +} diff --git a/.config/lazygit/config.yml b/.config/lazygit/config.yml new file mode 100644 index 0000000..21ea0dc --- /dev/null +++ b/.config/lazygit/config.yml @@ -0,0 +1,2 @@ +os: + edit: "nvim {{filename}}" diff --git a/.config/linearmouse/linearmouse.json b/.config/linearmouse/linearmouse.json new file mode 100644 index 0000000..9427db9 --- /dev/null +++ b/.config/linearmouse/linearmouse.json @@ -0,0 +1,255 @@ +{ + "schemes" : [ + { + "scrolling" : { + "distance" : { + "vertical" : 3 + }, + "acceleration" : { + "vertical" : 1 + }, + "reverse" : { + "vertical" : true + }, + "speed" : { + "vertical" : 0 + } + }, + "if" : { + "device" : { + "serialNumber" : "000000000000", + "productID" : "0xa6", + "productName" : "Razer Viper V2 Pro", + "category" : "mouse", + "vendorID" : "0x1532" + } + }, + "pointer" : { + "disableAcceleration" : true, + "acceleration" : 1.2 + } + }, + { + "scrolling" : { + "acceleration" : { + "vertical" : 1 + }, + "reverse" : { + "vertical" : true + }, + "speed" : { + "vertical" : 0 + }, + "distance" : { + "vertical" : 3 + } + }, + "if" : { + "device" : { + "productID" : "0x27da", + "serialNumber" : "pqrs.org:Karabiner-DriverKit-VirtualHIDPointing", + "category" : "mouse", + "productName" : "Karabiner DriverKit VirtualHIDPointing 1.7.0", + "vendorID" : "0x16c0" + } + }, + "pointer" : { + "disableAcceleration" : true + } + }, + { + "scrolling" : { + "speed" : 0, + "acceleration" : 1, + "reverse" : { + "vertical" : true + }, + "distance" : 3 + }, + "if" : { + "device" : { + "category" : "mouse", + "productName" : "Logitech Pebble", + "vendorID" : "0x46d", + "serialNumber" : "2E61FDC85A9743AE", + "productID" : "0xb021" + } + }, + "pointer" : { + "disableAcceleration" : true, + "acceleration" : 0.8663 + } + }, + { + "scrolling" : { + "reverse" : true, + "acceleration" : 1, + "speed" : 0, + "distance" : { + "horizontal" : 3, + "vertical" : "auto" + } + }, + "if" : { + "device" : { + "category" : "mouse", + "productID" : "0xd031", + "vendorID" : "0x3434", + "productName" : "Keychron Link " + } + }, + "pointer" : { + "acceleration" : 0.8655, + "disableAcceleration" : true + } + }, + { + "pointer" : { + "disableAcceleration" : true + }, + "if" : { + "device" : { + "category" : "mouse", + "vendorID" : "0x3434", + "serialNumber" : "SN1234567890", + "productID" : "0xd03f", + "productName" : "Keychron M6" + } + }, + "scrolling" : { + "acceleration" : 1, + "reverse" : true, + "distance" : 3, + "speed" : 0 + } + }, + { + "pointer" : { + "disableAcceleration" : true + }, + "if" : { + "device" : { + "category" : "mouse", + "productID" : "0xd03f", + "productName" : "Keychron M6 ", + "vendorID" : "0x3434" + } + }, + "scrolling" : { + "distance" : 3, + "speed" : 0, + "reverse" : true, + "acceleration" : 1 + } + }, + { + "buttons" : { + "universalBackForward" : true + }, + "pointer" : { + "disableAcceleration" : true, + "acceleration" : 0.6 + }, + "if" : { + "device" : { + "productID" : "0x27da", + "category" : "mouse", + "serialNumber" : "pqrs.org:Karabiner-DriverKit-VirtualHIDPointing", + "productName" : "Karabiner DriverKit VirtualHIDPointing 1.8.0", + "vendorID" : "0x16c0" + } + }, + "scrolling" : { + "distance" : { + "vertical" : 3 + }, + "speed" : { + "vertical" : 0 + }, + "reverse" : { + "vertical" : true + }, + "acceleration" : { + "vertical" : 1 + } + } + }, + { + "pointer" : { + "acceleration" : 0.8059 + }, + "if" : { + "device" : { + "category" : "trackpad", + "productID" : "0x0", + "productName" : "Apple Internal Keyboard \/ Trackpad", + "vendorID" : "0x0" + } + } + }, + { + "if" : { + "device" : { + "vendorID" : "0x0", + "productName" : "Apple Internal Keyboard \/ Trackpad", + "productID" : "0x0", + "category" : "trackpad" + }, + "app" : "org.pqrs.Karabiner-Elements.Settings" + }, + "scrolling" : { + "acceleration" : { + "vertical" : 1 + } + } + }, + { + "pointer" : { + "acceleration" : 0.2, + "disableAcceleration" : true, + "speed" : 0.1 + }, + "if" : { + "device" : { + "serialNumber" : "vial:f64c2b3c", + "category" : "mouse", + "vendorID" : "0xc2ab", + "productID" : "0x3939", + "productName" : "Ferris sweep" + } + }, + "scrolling" : { + "distance" : { + "vertical" : 3 + }, + "acceleration" : { + "vertical" : 1 + }, + "speed" : { + "vertical" : 0 + } + } + }, + { + "pointer" : { + "acceleration" : 1.0387, + "disableAcceleration" : true + }, + "if" : { + "device" : { + "category" : "mouse", + "productName" : "Keychron Link ", + "productID" : "0xd030", + "vendorID" : "0x3434" + } + }, + "scrolling" : { + "distance" : 3, + "acceleration" : 1, + "speed" : 0, + "reverse" : true + } + } + ], + "$schema" : "https:\/\/schema.linearmouse.app\/0.10.0" +} diff --git a/.config/nvim/.editorconfig b/.config/nvim/.editorconfig new file mode 100644 index 0000000..9a6cc75 --- /dev/null +++ b/.config/nvim/.editorconfig @@ -0,0 +1,3 @@ +[*.lua] +indent_style = space +indent_size = 2 diff --git a/.config/nvim/.luarc.json b/.config/nvim/.luarc.json new file mode 100644 index 0000000..59e3c38 --- /dev/null +++ b/.config/nvim/.luarc.json @@ -0,0 +1,10 @@ +{ + "diagnostics.globals": [ + "MiniFiles", + "Snacks", + "MiniSplitjoin", + "hipatterns", + "MiniDiff", + "vim" + ] +} \ No newline at end of file diff --git a/.config/nvim/after/ftplugin/css.lua b/.config/nvim/after/ftplugin/css.lua new file mode 100644 index 0000000..5b3770c --- /dev/null +++ b/.config/nvim/after/ftplugin/css.lua @@ -0,0 +1,3 @@ +local set = vim.opt_local + +set.shiftwidth = 2 diff --git a/.config/nvim/after/ftplugin/html.lua b/.config/nvim/after/ftplugin/html.lua new file mode 100644 index 0000000..5b3770c --- /dev/null +++ b/.config/nvim/after/ftplugin/html.lua @@ -0,0 +1,3 @@ +local set = vim.opt_local + +set.shiftwidth = 2 diff --git a/.config/nvim/after/ftplugin/htmldjango.lua b/.config/nvim/after/ftplugin/htmldjango.lua new file mode 100644 index 0000000..2a12368 --- /dev/null +++ b/.config/nvim/after/ftplugin/htmldjango.lua @@ -0,0 +1,15 @@ +local set = vim.opt_local + +-- set.shiftwidth = 2 + +vim.api.nvim_create_augroup("DjangoTemplates", { clear = true }) + +vim.api.nvim_create_autocmd("FileType", { + group = "DjangoTemplates", + pattern = "htmldjango", + callback = function() + vim.cmd("setlocal syntax=on") + vim.cmd("syntax include @Javascript syntax/javascript.vim") + vim.cmd("syntax region javascript start=/