diff --git a/.config/markdownlint/.markdownlint.json b/.config/markdownlint/.markdownlint.json deleted file mode 100644 index 1f69f42..0000000 --- a/.config/markdownlint/.markdownlint.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "line-length": false, - "no-inline-html": false, - "no-alt-text": false, - "ul-style": { "style": "dash" } -} \ No newline at end of file diff --git a/.config/npm/.npmrc b/.config/npm/.npmrc deleted file mode 100644 index ad82c4c..0000000 --- a/.config/npm/.npmrc +++ /dev/null @@ -1,4 +0,0 @@ -# ~/.npmrc -# New-Item -ItemType SymbolicLink -Path ~\.npmrc -Target ~\.dotfiles\.npmrc -# ln -s $DOTFILES/.npmrc ~/.npmrc -# registry=https://registry.npmmirror.com diff --git a/.config/nvim.lazy.d/.neoconf.json b/.config/nvim.lazy.d/.neoconf.json deleted file mode 100644 index 6e89f00..0000000 --- a/.config/nvim.lazy.d/.neoconf.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "neodev": { - "library": { - "enabled": true, - "plugins": true - } - }, - "neoconf": { - "plugins": { - "lua_ls": { - "enabled": true - } - } - } -} diff --git a/.config/nvim.lazy.d/.options/obsidian.all.lua b/.config/nvim.lazy.d/.options/obsidian.all.lua deleted file mode 100644 index c8af391..0000000 --- a/.config/nvim.lazy.d/.options/obsidian.all.lua +++ /dev/null @@ -1,22 +0,0 @@ -return { - "epwalsh/obsidian.nvim", - version = "*", -- recommended, use latest release instead of latest commit - lazy = true, - ft = "markdown", - dependencies = { - -- Required. - "nvim-lua/plenary.nvim", - - -- see below for full list of optional dependencies ๐Ÿ‘‡ - }, - opts = { - workspaces = { - { - name = "Obsidian", - path = "~/Obsidian", - }, - }, - - -- see below for full list of options ๐Ÿ‘‡ - }, -} diff --git a/.config/nvim.lazy.d/README.md b/.config/nvim.lazy.d/README.md deleted file mode 100644 index e4c3da5..0000000 --- a/.config/nvim.lazy.d/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Colemak *LazyVim* - -- Replace the default `hjkl` movement keys with `hnei` -- `j->e`, `k->n`, `h->h`, `l->i` - -```sh -ln -sf $DOTFILES/.config/nvim/ $XDG_CONFIG_HOME/nvim -``` \ No newline at end of file diff --git a/.config/nvim.lazy.d/init.lua b/.config/nvim.lazy.d/init.lua deleted file mode 100644 index eded2d3..0000000 --- a/.config/nvim.lazy.d/init.lua +++ /dev/null @@ -1,8 +0,0 @@ --- bootstrap lazy.nvim, LazyVim and your plugins -if (vim.g.vscode) then - print("VSCode detected, skipping lazy loading") - require("vscode.code") -else - require("config.lazy") - -- require("config.lazy") -end diff --git a/.config/nvim.lazy.d/lazy-lock.json b/.config/nvim.lazy.d/lazy-lock.json deleted file mode 100644 index 43c566e..0000000 --- a/.config/nvim.lazy.d/lazy-lock.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" }, - "nvim-cmp": { "branch": "main", "commit": "be7bd4c5f860c79da97af3a26d489af50babfd4b" }, - "nvim-lspconfig": { "branch": "master", "commit": "c646154d6e4db9b2979eeb517d0b817ad00c9c47" }, - "nvim-treesitter": { "branch": "master", "commit": "efb2e9c607cab1e4f7171493b7c6f63bd39073fc" }, - "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, - "telescope.nvim": { "branch": "master", "commit": "85922dde3767e01d42a08e750a773effbffaea3e" } -} diff --git a/.config/nvim.lazy.d/lazyvim.json b/.config/nvim.lazy.d/lazyvim.json deleted file mode 100644 index bac2955..0000000 --- a/.config/nvim.lazy.d/lazyvim.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extras": [ - "lazyvim.plugins.extras.ai.copilot", - "lazyvim.plugins.extras.ai.copilot-chat" - ], - "news": { - "NEWS.md": "7429" - }, - "version": 7 -} \ No newline at end of file diff --git a/.config/nvim.lazy.d/lua/config/autocmds.lua b/.config/nvim.lazy.d/lua/config/autocmds.lua deleted file mode 100644 index d9ea6db..0000000 --- a/.config/nvim.lazy.d/lua/config/autocmds.lua +++ /dev/null @@ -1,3 +0,0 @@ --- Autocmds are automatically loaded on the VeryLazy event --- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua --- Add any additional autocmds here diff --git a/.config/nvim.lazy.d/lua/config/keymaps.lua b/.config/nvim.lazy.d/lua/config/keymaps.lua deleted file mode 100644 index 0105618..0000000 --- a/.config/nvim.lazy.d/lua/config/keymaps.lua +++ /dev/null @@ -1,146 +0,0 @@ --- Keymaps are automatically loaded on the VeryLazy event --- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua --- Add any additional keymaps here - -vim.g.mapleader = " " - --- ================= GENERAL KEYBINDS ================= --- SAVE/QUIT {{{ -vim.keymap.set("n", "Q", "q", { desc = "Q to quit" }) -vim.keymap.set("n", "", "w", { desc = "S to write file" }) ---}}} - --- NVIM CONFIG SHORTCUTS {{{ --- stylua: ignore -vim.keymap.set("n", "rc", "e $HOME/.config/nvim/lua/config/options.lua", { desc = "Open nvim options.lua" }) -vim.keymap.set("n", "rp", "e $HOME/.config/nvim/lua/plugins/.", { desc = "lazy plugins dir" }) ---}}} - --- UNDO -vim.keymap.set({ "n", "v" }, "l", "u", { desc = "Undo" }) - --- INSERT -vim.keymap.set({ "n", "v" }, "l", "i", { desc = "Insert" }) -vim.keymap.set({ "n", "v" }, "L", "I", { desc = "Insert at line start" }) - --- YANK TO SYSTEM CLIPBOARD -vim.keymap.set("v", "Y", '"+y', { desc = "Copy to (System) Clipboard" }) - --- SEARCH {{{ -vim.keymap.set("n", "", "nohlsearch", { desc = "clear search highlight" }) ---}}} - --- SPACE TO TAB{{{ -vim.keymap.set("n", "tt", "%s/ /\t/g", { desc = "space to tab" }) -vim.keymap.set("v", "tt", "s/ /\t/g", { desc = "space to tab" }) ---}}} - --- MISC {{{ -vim.keymap.set("n", "o", "za", { desc = "folding" }) -vim.keymap.set("i", "", "A {}iko", { desc = "insert a pair of {} and goto next line" }) ---}}} - --- ================= CURSOR MOVEMENT ===================== {{{ --- NEW CURSOR MOVEMENT (ARROW KEY RESIZE WINDOWS) --- ^ --- e --- < h i > --- n --- v --- -vim.keymap.set({ "n", "v", "", "s", "x" }, "e", "k", { desc = "move cursor โ‡ง" }) -vim.keymap.set({ "n", "v", "", "s", "x" }, "n", "j", { desc = "move cursor โ‡ฉ" }) -vim.keymap.set({ "n", "v", "", "s", "x" }, "h", "h", { desc = "move cursor โ‡ฆ" }) -vim.keymap.set({ "n", "v", "", "s", "x" }, "i", "l", { desc = "move cursor โ‡จ" }) - -vim.keymap.set({ "n", "v" }, "E", "5k", { desc = "Move 5up K -> U" }) -vim.keymap.set({ "n", "v" }, "N", "5j", { desc = "Move 5down J -> E" }) - -vim.keymap.set({ "n", "v" }, "H", "0", { desc = "Move start of line" }) -vim.keymap.set({ "n", "v" }, "I", "$", { desc = "Move end of line" }) - -vim.keymap.set("n", "gu", "gk", { desc = "move up gk -> gu" }) -vim.keymap.set("n", "ge", "gj", { desc = "move down gj -> ge" }) - -vim.keymap.set("n", "\v", "v$h", { desc = "???" }) - --- FASTER IN-LINE NAVIGATION - --- SET h (SAME AS n, CURSOR LEFT) TO 'END OF WORD' -vim.keymap.set("n", "j", "e", { desc = "Move cursor to end of word" }) --- CTRL + U OR E WILL MOVE UP/DOWN THE VIEW PORT WITHOUT MOVING THE CURSOR - -vim.keymap.set({ "n", "v" }, "", "5", { desc = "Move viewport โ‡ง" }) -vim.keymap.set({ "n", "v" }, "", "5", { desc = "Move viewport โ‡ฉ" }) - --- INSERT MODE CURSOR MOVEMENT -vim.keymap.set("i", "", "A") - --- COMMAND MODE CURSOR MOVEMENT -vim.keymap.set("c", "", "") -vim.keymap.set("c", "", "") -vim.keymap.set("c", "", "") -vim.keymap.set("c", "", "") -vim.keymap.set("c", "", "") -vim.keymap.set("c", "", "") -vim.keymap.set("c", "", "") -vim.keymap.set("c", "", "") ---}}} - --- ================= SPLIT MANAGMENT ===================== {{{ -vim.keymap.set("n", "E", "set nosplitbelowsplitset splitbelow", { desc = "Split โ‡ง" }) -vim.keymap.set("n", "N", "set splitbelowsplit", { desc = "Split โ‡ฉ" }) -vim.keymap.set("n", "H", "set nosplitrightvsplitset splitright", { desc = "Split โ‡ฆ" }) -vim.keymap.set("n", "I", "set splitrightvsplit", { desc = "Split โ‡จ" }) - -vim.keymap.set({ "n", "t" }, "e", "k", { desc = "Move cursor to split โ‡ง" }) -vim.keymap.set({ "n", "t" }, "n", "j", { desc = "Move cursor to split โ‡ฉ" }) -vim.keymap.set({ "n", "t" }, "h", "h", { desc = "Move cursor to split โ‡ฆ" }) -vim.keymap.set({ "n", "t" }, "i", "l", { desc = "Move cursor to split โ‡จ" }) - -vim.keymap.set({ "n", "t" }, "", "", { desc = "Move cursor to split โ‡ง" }) -vim.keymap.set({ "n", "t" }, "", "", { desc = "Move cursor to split โ‡ฉ" }) -vim.keymap.set({ "n", "t" }, "", "", { desc = "Move cursor to split โ‡ฆ" }) -vim.keymap.set({ "n", "t" }, "", "", { desc = "Move cursor to split โ‡จ" }) - -vim.keymap.set("n", "", "res -5", { desc = "Resize split 0,-5" }) -vim.keymap.set("n", "", "res +5", { desc = "Resize split 0,+5" }) -vim.keymap.set("n", "", "vertical resize +5", { desc = "Resize split +5,0" }) -vim.keymap.set("n", "", "vertical resize -5", { desc = "Resize split -5,0" }) - -vim.keymap.set("n", "H", "tK", { desc = "Make splits [H]orizontal" }) -vim.keymap.set("n", "V", "tH", { desc = "Make splits [V]ertical" }) - -vim.keymap.set("n", "ri", "bK", { desc = "Rotate splits 90" }) -vim.keymap.set("n", "rh", "bH", { desc = "Rotate splits -90" }) - -vim.keymap.set("n", "q", "jq", { desc = "Close Split โ‡ฉ (Below)" }) ---}}} - --- TAB MANAGEMENT {{{ -vim.keymap.set("n", "", "tabe", { desc = "New [Tab]" }) - -vim.keymap.set("n", "h", "-tabnext", { desc = "Select Tab โ‡ฆ" }) -vim.keymap.set("n", "i", "+tabnext", { desc = "Select Tab โ‡จ" }) - -vim.keymap.set("n", "H", "-tabmove", { desc = "Tab move โ‡ฆ" }) -vim.keymap.set("n", "I", "+tabmove", { desc = "Tab move โ‡จ" }) - --- NOTE: Doesn't seem to work: --- vim.keymap.set("n", "c", "tab split", { desc = "New Tab from [C]urrent" }) --- vim.keymap.set('n', 'dw', '/\(\<\w\+\>\)\_s*\1', {desc='adjacent duplicate words'}) - ---vim.keymap.del("n", "j") ---vim.keymap.del("n", "k") ---vim.keymap.del("n", "l") --- }}} - --- =================== TERM BEHAVIORS ==================== -vim.keymap.set("t", "", "", { desc = "escape terminal, allowing excmds" }) -vim.keymap.set("t", "", "", { desc = "close terminal" }) - ---vim: set fdm=marker fdl=0 - --- buffers -vim.keymap.set("n", "", "bprevious", { desc = "Prev Buffer" }) -vim.keymap.set("n", "", "bnext", { desc = "Next Buffer" }) diff --git a/.config/nvim.lazy.d/lua/config/lazy.lua b/.config/nvim.lazy.d/lua/config/lazy.lua deleted file mode 100644 index 532a434..0000000 --- a/.config/nvim.lazy.d/lua/config/lazy.lua +++ /dev/null @@ -1,53 +0,0 @@ -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end -end -vim.opt.rtp:prepend(lazypath) - -require("lazy").setup({ - spec = { - -- add LazyVim and import its plugins - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - -- import/override with your plugins - { import = "plugins" }, - }, - defaults = { - -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. - -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. - lazy = false, - -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, - -- have outdated releases, which may break your Neovim install. - version = false, -- always use the latest git commit - -- version = "*", -- try installing the latest stable version for plugins that support semver - }, - install = { colorscheme = { "tokyonight", "habamax" } }, - checker = { - enabled = true, -- check for plugin updates periodically - notify = false, -- notify on update - }, -- automatically check for plugin updates - performance = { - rtp = { - -- disable some rtp plugins - disabled_plugins = { - "gzip", - -- "matchit", - -- "matchparen", - -- "netrwPlugin", - "tarPlugin", - "tohtml", - "tutor", - "zipPlugin", - }, - }, - }, -}) diff --git a/.config/nvim.lazy.d/lua/config/options.lua b/.config/nvim.lazy.d/lua/config/options.lua deleted file mode 100644 index 415944a..0000000 --- a/.config/nvim.lazy.d/lua/config/options.lua +++ /dev/null @@ -1,3 +0,0 @@ --- Options are automatically loaded before lazy.nvim startup --- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua --- Add any additional options here diff --git a/.config/nvim.lazy.d/lua/plugins/catppuccin.lua b/.config/nvim.lazy.d/lua/plugins/catppuccin.lua deleted file mode 100644 index c6e52c7..0000000 --- a/.config/nvim.lazy.d/lua/plugins/catppuccin.lua +++ /dev/null @@ -1,54 +0,0 @@ -return { - "catppuccin/nvim", - lazy = true, - name = "catppuccin", - opts = { - integrations = { - aerial = true, - alpha = true, - cmp = true, - dashboard = true, - flash = true, - grug_far = true, - gitsigns = true, - headlines = true, - illuminate = true, - indent_blankline = { enabled = true }, - leap = true, - lsp_trouble = true, - mason = true, - markdown = true, - mini = true, - native_lsp = { - enabled = true, - underlines = { - errors = { "undercurl" }, - hints = { "undercurl" }, - warnings = { "undercurl" }, - information = { "undercurl" }, - }, - }, - navic = { enabled = true, custom_bg = "lualine" }, - neotest = true, - neotree = true, - noice = true, - notify = true, - semantic_tokens = true, - telescope = true, - treesitter = true, - treesitter_context = true, - which_key = true, - }, - }, - specs = { - { - "akinsho/bufferline.nvim", - optional = true, - opts = function(_, opts) - if (vim.g.colors_name or ""):find("catppuccin") then - opts.highlights = require("catppuccin.groups.integrations.bufferline").get() - end - end, - }, - }, -} diff --git a/.config/nvim.lazy.d/lua/plugins/colorscheme.lua b/.config/nvim.lazy.d/lua/plugins/colorscheme.lua deleted file mode 100644 index ab99258..0000000 --- a/.config/nvim.lazy.d/lua/plugins/colorscheme.lua +++ /dev/null @@ -1,13 +0,0 @@ -return { - -- add gruvbox - { "ellisonleao/gruvbox.nvim" }, - { "catppuccin/nvim", name = "catppuccin", priority = 1000 }, - - -- Configure LazyVim to load gruvbox - { - "LazyVim/LazyVim", - opts = { - colorscheme = "catppuccin", - }, - }, -} diff --git a/.config/nvim.lazy.d/lua/plugins/dashboard.lua b/.config/nvim.lazy.d/lua/plugins/dashboard.lua deleted file mode 100644 index 368524a..0000000 --- a/.config/nvim.lazy.d/lua/plugins/dashboard.lua +++ /dev/null @@ -1,65 +0,0 @@ -return { - "nvimdev/dashboard-nvim", - lazy = false, -- As https://github.com/nvimdev/dashboard-nvim/pull/450, dashboard-nvim shouldn't be lazy-loaded to properly handle stdin. - opts = function() - local logo = [[ - โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ•— Z - โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ•šโ•โ•โ–ˆโ–ˆโ–ˆโ•”โ•โ•šโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ•‘ Z - โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ–ˆโ•”โ• โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ• โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ–ˆโ–ˆโ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•‘ z - โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ–ˆโ•”โ• โ•šโ–ˆโ–ˆโ•”โ• โ•šโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘ z - โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ• โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ•šโ•โ• โ–ˆโ–ˆโ•‘ - โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ• โ•šโ•โ•โ•šโ•โ•โ•โ•โ•โ•โ• โ•šโ•โ• โ•šโ•โ•โ•โ• โ•šโ•โ•โ•šโ•โ• โ•šโ•โ• - ]] - - -- logo = string.rep("\n", 8) .. logo .. "\n\n" - - local opts = { - theme = "doom", - hide = { - -- this is taken care of by lualine - -- enabling this messes up the actual laststatus setting after loading a file - statusline = false, - }, - config = { - header = vim.split(logo, "\n"), - -- stylua: ignore - center = { - { action = 'lua LazyVim.pick()()', desc = " Find File", icon = "๏€‚ ", key = "f" }, - { action = "ene | startinsert", desc = " New File", icon = "๏…› ", key = "n" }, - { action = 'lua LazyVim.pick("oldfiles")()', desc = " Recent Files", icon = "๏ƒ… ", key = "r" }, - { action = 'lua LazyVim.pick("live_grep")()', desc = " Find Text", icon = "๏€ข ", key = "g" }, - { action = 'lua LazyVim.pick.config_files()()', desc = " Config", icon = "๏ฃ ", key = "c" }, - { action = 'lua require("persistence").load()', desc = " Restore Session", icon = "๎ˆ ", key = "s" }, - { action = "LazyExtras", desc = " Lazy Extras", icon = "๎ชŒ ", key = "x" }, - { action = "Lazy", desc = " Lazy", icon = "๓ฐ’ฒ ", key = "l" }, - { action = function() vim.api.nvim_input("qa") end, desc = " Quit", icon = "๏ฆ ", key = "q" }, - }, - footer = function() - local stats = require("lazy").stats() - local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) - return { "โšก Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" } - end, - }, - } - - for _, button in ipairs(opts.config.center) do - button.desc = button.desc .. string.rep(" ", 43 - #button.desc) - button.key_format = " %s" - end - - -- open dashboard after closing lazy - if vim.o.filetype == "lazy" then - vim.api.nvim_create_autocmd("WinClosed", { - pattern = tostring(vim.api.nvim_get_current_win()), - once = true, - callback = function() - vim.schedule(function() - vim.api.nvim_exec_autocmds("UIEnter", { group = "dashboard" }) - end) - end, - }) - end - - return opts - end, -} diff --git a/.config/nvim.lazy.d/lua/plugins/example.lua b/.config/nvim.lazy.d/lua/plugins/example.lua deleted file mode 100644 index 17f53d6..0000000 --- a/.config/nvim.lazy.d/lua/plugins/example.lua +++ /dev/null @@ -1,197 +0,0 @@ --- since this is just an example spec, don't actually load anything here and return an empty spec --- stylua: ignore -if true then return {} end - --- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim --- --- In your plugin files, you can: --- * add extra plugins --- * disable/enabled LazyVim plugins --- * override the configuration of LazyVim plugins -return { - -- add gruvbox - { "ellisonleao/gruvbox.nvim" }, - - -- Configure LazyVim to load gruvbox - { - "LazyVim/LazyVim", - opts = { - colorscheme = "gruvbox", - }, - }, - - -- change trouble config - { - "folke/trouble.nvim", - -- opts will be merged with the parent spec - opts = { use_diagnostic_signs = true }, - }, - - -- disable trouble - { "folke/trouble.nvim", enabled = false }, - - -- override nvim-cmp and add cmp-emoji - { - "hrsh7th/nvim-cmp", - dependencies = { "hrsh7th/cmp-emoji" }, - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - table.insert(opts.sources, { name = "emoji" }) - end, - }, - - -- change some telescope options and a keymap to browse plugin files - { - "nvim-telescope/telescope.nvim", - keys = { - -- add a keymap to browse plugin files - -- stylua: ignore - { - "fp", - function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end, - desc = "Find Plugin File", - }, - }, - -- change some options - opts = { - defaults = { - layout_strategy = "horizontal", - layout_config = { prompt_position = "top" }, - sorting_strategy = "ascending", - winblend = 0, - }, - }, - }, - - -- add pyright to lspconfig - { - "neovim/nvim-lspconfig", - ---@class PluginLspOpts - opts = { - ---@type lspconfig.options - servers = { - -- pyright will be automatically installed with mason and loaded with lspconfig - pyright = {}, - }, - }, - }, - - -- add tsserver and setup with typescript.nvim instead of lspconfig - { - "neovim/nvim-lspconfig", - dependencies = { - "jose-elias-alvarez/typescript.nvim", - init = function() - require("lazyvim.util").lsp.on_attach(function(_, buffer) - -- stylua: ignore - vim.keymap.set( "n", "co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" }) - vim.keymap.set("n", "cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer }) - end) - end, - }, - ---@class PluginLspOpts - opts = { - ---@type lspconfig.options - servers = { - -- tsserver will be automatically installed with mason and loaded with lspconfig - tsserver = {}, - }, - -- you can do any additional lsp server setup here - -- return true if you don't want this server to be setup with lspconfig - ---@type table - setup = { - -- example to setup with typescript.nvim - tsserver = function(_, opts) - require("typescript").setup({ server = opts }) - return true - end, - -- Specify * to use this function as a fallback for any server - -- ["*"] = function(server, opts) end, - }, - }, - }, - - -- for typescript, LazyVim also includes extra specs to properly setup lspconfig, - -- treesitter, mason and typescript.nvim. So instead of the above, you can use: - { import = "lazyvim.plugins.extras.lang.typescript" }, - - -- add more treesitter parsers - { - "nvim-treesitter/nvim-treesitter", - opts = { - ensure_installed = { - "bash", - "html", - "javascript", - "json", - "lua", - "markdown", - "markdown_inline", - "python", - "query", - "regex", - "tsx", - "typescript", - "vim", - "yaml", - }, - }, - }, - - -- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above - -- would overwrite `ensure_installed` with the new value. - -- If you'd rather extend the default config, use the code below instead: - { - "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - -- add tsx and treesitter - vim.list_extend(opts.ensure_installed, { - "tsx", - "typescript", - }) - end, - }, - - -- the opts function can also be used to change the default opts: - { - "nvim-lualine/lualine.nvim", - event = "VeryLazy", - opts = function(_, opts) - table.insert(opts.sections.lualine_x, { - function() - return "๐Ÿ˜„" - end, - }) - end, - }, - - -- or you can return new options to override all the defaults - { - "nvim-lualine/lualine.nvim", - event = "VeryLazy", - opts = function() - return { - --[[add your custom lualine config here]] - } - end, - }, - - -- use mini.starter instead of alpha - { import = "lazyvim.plugins.extras.ui.mini-starter" }, - - -- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc - { import = "lazyvim.plugins.extras.lang.json" }, - - -- add any tools you want to have installed below - { - "williamboman/mason.nvim", - opts = { - ensure_installed = { - "stylua", - "shellcheck", - "shfmt", - "flake8", - }, - }, - }, -} diff --git a/.config/nvim.lazy.d/lua/plugins/just.lua b/.config/nvim.lazy.d/lua/plugins/just.lua deleted file mode 100644 index 41ae68a..0000000 --- a/.config/nvim.lazy.d/lua/plugins/just.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - "NoahTheDuke/vim-just", - ft = { "just" }, -} diff --git a/.config/nvim.lazy.d/lua/plugins/lualine.lua b/.config/nvim.lazy.d/lua/plugins/lualine.lua deleted file mode 100644 index 756fd96..0000000 --- a/.config/nvim.lazy.d/lua/plugins/lualine.lua +++ /dev/null @@ -1,126 +0,0 @@ -return { - "nvim-lualine/lualine.nvim", - event = "VeryLazy", - init = function() - vim.g.lualine_laststatus = vim.o.laststatus - if vim.fn.argc(-1) > 0 then - -- set an empty statusline till lualine loads - vim.o.statusline = " " - else - -- hide the statusline on the starter page - vim.o.laststatus = 0 - end - end, - opts = function() - -- PERF: we don't need this lualine require madness ๐Ÿคท - local lualine_require = require("lualine_require") - lualine_require.require = require - - local icons = LazyVim.config.icons - - vim.o.laststatus = vim.g.lualine_laststatus - - local opts = { - options = { - theme = "auto", - globalstatus = vim.o.laststatus == 3, - disabled_filetypes = { statusline = { "dashboard", "alpha", "ministarter", "snacks_dashboard", "NvimTree_1" } }, - }, - sections = { - lualine_a = { "mode" }, - lualine_b = { "branch" }, - - lualine_c = { - LazyVim.lualine.root_dir(), - { - "diagnostics", - symbols = { - error = icons.diagnostics.Error, - warn = icons.diagnostics.Warn, - info = icons.diagnostics.Info, - hint = icons.diagnostics.Hint, - }, - }, - { "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } }, - { LazyVim.lualine.pretty_path() }, - }, - lualine_x = { - -- stylua: ignore - { - function() return require("noice").api.status.command.get() end, - cond = function() return package.loaded["noice"] and require("noice").api.status.command.has() end, - color = function() return LazyVim.ui.fg("Statement") end, - }, - -- stylua: ignore - { - function() return require("noice").api.status.mode.get() end, - cond = function() return package.loaded["noice"] and require("noice").api.status.mode.has() end, - color = function() return LazyVim.ui.fg("Constant") end, - }, - -- stylua: ignore - { - function() return "๏‘ฏ " .. require("dap").status() end, - cond = function() return package.loaded["dap"] and require("dap").status() ~= "" end, - color = function() return LazyVim.ui.fg("Debug") end, - }, - -- stylua: ignore - { - require("lazy.status").updates, - cond = require("lazy.status").has_updates, - color = function() return LazyVim.ui.fg("Special") end, - }, - { - "diff", - symbols = { - added = icons.git.added, - modified = icons.git.modified, - removed = icons.git.removed, - }, - source = function() - local gitsigns = vim.b.gitsigns_status_dict - if gitsigns then - return { - added = gitsigns.added, - modified = gitsigns.changed, - removed = gitsigns.removed, - } - end - end, - }, - }, - lualine_y = { - { "progress", separator = " ", padding = { left = 1, right = 0 } }, - { "location", padding = { left = 0, right = 1 } }, - }, - lualine_z = { - function() - return "๏บ " .. os.date("%R") - end, - }, - }, - extensions = { "neo-tree", "lazy" }, - } - - -- do not add trouble symbols if aerial is enabled - -- And allow it to be overriden for some buffer types (see autocmds) - if vim.g.trouble_lualine and LazyVim.has("trouble.nvim") then - local trouble = require("trouble") - local symbols = trouble.statusline({ - mode = "symbols", - groups = {}, - title = false, - filter = { range = true }, - format = "{kind_icon}{symbol.name:Normal}", - hl_group = "lualine_c_normal", - }) - table.insert(opts.sections.lualine_c, { - symbols and symbols.get, - cond = function() - return vim.b.trouble_lualine ~= false and symbols.has() - end, - }) - end - - return opts - end, -} diff --git a/.config/nvim.lazy.d/lua/plugins/neo-tree.lua b/.config/nvim.lazy.d/lua/plugins/neo-tree.lua deleted file mode 100644 index d9bccdf..0000000 --- a/.config/nvim.lazy.d/lua/plugins/neo-tree.lua +++ /dev/null @@ -1,138 +0,0 @@ -return { - "nvim-neo-tree/neo-tree.nvim", - cmd = "Neotree", - keys = { - { - "fe", - function() - require("neo-tree.command").execute({ toggle = true, dir = LazyVim.root() }) - end, - desc = "Explorer NeoTree (Root Dir)", - }, - { - "fE", - function() - require("neo-tree.command").execute({ toggle = true, dir = vim.uv.cwd() }) - end, - desc = "Explorer NeoTree (cwd)", - }, - { "e", "fe", desc = "Explorer NeoTree (Root Dir)", remap = true }, - { "E", "fE", desc = "Explorer NeoTree (cwd)", remap = true }, - { - "ge", - function() - require("neo-tree.command").execute({ source = "git_status", toggle = true }) - end, - desc = "Git Explorer", - }, - { - "be", - function() - require("neo-tree.command").execute({ source = "buffers", toggle = true }) - end, - desc = "Buffer Explorer", - }, - }, - deactivate = function() - vim.cmd([[Neotree close]]) - end, - init = function() - -- FIX: use `autocmd` for lazy-loading neo-tree instead of directly requiring it, - -- because `cwd` is not set up properly. - vim.api.nvim_create_autocmd("BufEnter", { - group = vim.api.nvim_create_augroup("Neotree_start_directory", { clear = true }), - desc = "Start Neo-tree with directory", - once = true, - callback = function() - if package.loaded["neo-tree"] then - return - else - local stats = vim.uv.fs_stat(vim.fn.argv(0)) - if stats and stats.type == "directory" then - require("neo-tree") - end - end - end, - }) - end, - opts = { - sources = { "filesystem", "buffers", "git_status" }, - open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" }, - filesystem = { - hide_dotfiles = false, - hide_hidden = false, - bind_to_cwd = false, - follow_current_file = { enabled = true }, - use_libuv_file_watcher = true, - hide_by_name = { - ".git", - "node_modules", - "requirements.txt", - "desktop.ini", - }, - never_show = { - ".DS_Store", - }, - }, - window = { - mappings = { - -- MARKED - ["i"] = "open", - -- MARKED - ["e"] = "noop", - ["h"] = "close_node", - [""] = "none", - ["Y"] = { - function(state) - local node = state.tree:get_node() - local path = node:get_id() - vim.fn.setreg("+", path, "c") - end, - desc = "Copy Path to Clipboard", - }, - ["O"] = { - function(state) - require("lazy.util").open(state.tree:get_node().path, { system = true }) - end, - desc = "Open with System Application", - }, - ["P"] = { "toggle_preview", config = { use_float = false } }, - }, - }, - default_component_configs = { - indent = { - with_expanders = true, -- if nil and file nesting is enabled, will enable expanders - expander_collapsed = "๏‘ ", - expander_expanded = "๏‘ผ", - expander_highlight = "NeoTreeExpander", - }, - git_status = { - symbols = { - unstaged = "๓ฐ„ฑ", - staged = "๓ฐฑ’", - }, - }, - }, - }, - config = function(_, opts) - local function on_move(data) - LazyVim.lsp.on_rename(data.source, data.destination) - end - - local events = require("neo-tree.events") - opts.event_handlers = opts.event_handlers or {} - vim.list_extend(opts.event_handlers, { - { event = events.FILE_MOVED, handler = on_move }, - { event = events.FILE_RENAMED, handler = on_move }, - }) - require("neo-tree").setup(opts) - vim.api.nvim_create_autocmd("TermClose", { - pattern = "*lazygit", - callback = function() - if package.loaded["neo-tree.sources.git_status"] then - require("neo-tree.sources.git_status").refresh() - end - end, - }) - end, -} diff --git a/.config/nvim.lazy.d/lua/plugins/nvim-tree.lua b/.config/nvim.lazy.d/lua/plugins/nvim-tree.lua deleted file mode 100644 index 40e9b7c..0000000 --- a/.config/nvim.lazy.d/lua/plugins/nvim-tree.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - "nvim-tree/nvim-tree.lua", - version = "*", - lazy = false, - dependencies = { - "nvim-tree/nvim-web-devicons", - }, - config = function() - require("nvim-tree").setup({}) - end, -} diff --git a/.config/nvim.lazy.d/lua/plugins/obsidian.lua b/.config/nvim.lazy.d/lua/plugins/obsidian.lua deleted file mode 100644 index 492e085..0000000 --- a/.config/nvim.lazy.d/lua/plugins/obsidian.lua +++ /dev/null @@ -1,22 +0,0 @@ -return { - "epwalsh/obsidian.nvim", - version = "*", -- recommended, use latest release instead of latest commit - lazy = true, - ft = "markdown", - dependencies = { - -- Required. - "nvim-lua/plenary.nvim", - - -- see below for full list of optional dependencies ๐Ÿ‘‡ - }, - opts = { - workspaces = { - { - name = "Obsidian", - path = "/mnt/c/Users/citoy/Obsidian", - }, - }, - - -- see below for full list of options ๐Ÿ‘‡ - }, -} diff --git a/.config/nvim.lazy.d/lua/plugins/wakatime.lua b/.config/nvim.lazy.d/lua/plugins/wakatime.lua deleted file mode 100644 index e37e7b5..0000000 --- a/.config/nvim.lazy.d/lua/plugins/wakatime.lua +++ /dev/null @@ -1,3 +0,0 @@ -return { - { 'wakatime/vim-wakatime', lazy = false }, -} \ No newline at end of file diff --git a/.config/nvim.lazy.d/stylua.toml b/.config/nvim.lazy.d/stylua.toml deleted file mode 100644 index 964e1aa..0000000 --- a/.config/nvim.lazy.d/stylua.toml +++ /dev/null @@ -1,3 +0,0 @@ -indent_type = "Spaces" -indent_width = 2 -column_width = 120 \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..d07910b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,10 @@ +# $DOTFILES/.gitattributes +# Date: 2024-11-30 +# Author: contact@js0ny.net +skhdrc linguist-language=Shell +yabairc linguist-language=Shell +sketchybarrc linguist-language=Shell +*.vimrc linguist-language=VimL +vsvimrc linguist-language=VimL +vimrc linguist-language=VimL +ideavimrc linguist-language=VimL diff --git a/.gitignore b/.gitignore index 0b80c5f..29e966f 100644 --- a/.gitignore +++ b/.gitignore @@ -15,25 +15,18 @@ test.* # Utils xdg-ninja/ -# IPython config cache -.config/ipython/profile_default/db -.config/ipython/profile_default/log -.config/ipython/profile_default/pid -.config/ipython/profile_default/security -.config/ipython/profile_default/history.sqlite - # nvim config cache -.config/nvim/tt.* -.config/nvim/.tests -.config/nvim/doc/tags -.config/nvim/debug -.config/nvim/.repro -.config/nvim/foo.* -.config/nvim/*.log -.config/nvim/data -.config/nvim/lazy-lock.json -.config/nvim/lazyvim.json -.config/nvim/lua/plugins/obsidian.lua +tools/nvim/tt.* +tools/nvim/.tests +tools/nvim/doc/tags +tools/nvim/debug +tools/nvim/.repro +tools/nvim/foo.* +tools/nvim/*.log +tools/nvim/data +tools/nvim/lazy-lock.json +tools/nvim/lazyvim.json +tools/nvim/lua/plugins/obsidian.lua # Undone # Windows PowerToys @@ -41,12 +34,11 @@ PowerToys/ # Just Script Justfile # Nushell -.config/nushell/ -# VSCode Neovim -vscode/ -.vscode/ +tools/nushell/ # OS generated files .DS_Store .venv/ + +platforms/win/komorebi/applications.json diff --git a/.vscode/dotfiles.code-snippets b/.vscode/dotfiles.code-snippets new file mode 100644 index 0000000..5a49f9e --- /dev/null +++ b/.vscode/dotfiles.code-snippets @@ -0,0 +1,29 @@ +{ + // Place your .dotfiles ๅทฅไฝœๅŒบ snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and + // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope + // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is + // used to trigger the snippet and the body will be expanded and inserted. Possible variables are: + // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. + // Placeholders with the same ids are connected. + // Example: + // "Print to console": { + // "scope": "javascript,typescript", + // "prefix": "log", + // "body": [ + // "console.log('$1');", + // "$2" + // ], + // "description": "Log output to console" + // } + "Dotfiles": { + "scope": "", + "prefix": "init", + "body": [ + "$LINE_COMMENT \\$DOTFILES/$RELATIVE_FILEPATH", + "$LINE_COMMENT Date: $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE", + "$LINE_COMMENT Author: contact@js0ny.net", + "$LINE_COMMENT $0", + ] + + } +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..7972763 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,31 @@ +{ + "material-icon-theme.files.associations": { + "ideavimrc": "vim", + "vsvimrc": "vim", + "vimrc": "vim", + "haskeline": "haskell", + "inputrc": "console", + "npmrc": "npm", + "lesskey": "less", + "config.kdl": "json", + "pip.conf": "python-misc", + "*.kdl": "json", + "gitconfig": "git", + "nvim/init.lua": "vim", + "markdownlint.json": "markdownlint", + "wslconfig": "settings", + "skhdrc": "console" + }, + "material-icon-theme.folders.associations": { + "bootstrap": "admin", + "ipython": "jupyter", + "zsh": "command", + "starship": "ui", + "nvim": "config", + "wsl": "linux" + }, + "files.associations": { + "ideavimrc": "Vimscript", + ".wslconfig": "properties", + }, +} diff --git a/setup/win_setup.ps1 b/bootstrap/Windows.ps1 similarity index 100% rename from setup/win_setup.ps1 rename to bootstrap/Windows.ps1 diff --git a/setup/mac_setup.sh b/bootstrap/macOS.zsh similarity index 97% rename from setup/mac_setup.sh rename to bootstrap/macOS.zsh index 62b9976..ef55894 100644 --- a/setup/mac_setup.sh +++ b/bootstrap/macOS.zsh @@ -1,8 +1,7 @@ -#! /bin/sh -# This script is used to setup a new mac -# In a new mac (Sequoia) -# Enter the following command in the terminal -#! curl -fsSL https://raw.githubusercontent.com/js0ny/dotfiles/refs/heads/master/setup/mac_setup.sh | sh # Do not use this command +#! /bin/zsh +# $DOTFILES/bootstrap/macOS.zsh +# Run this script to set up macOS +# ่ฟ่กŒๆญค่„šๆœฌไปฅ่ฎพ็ฝฎ macOS echo "Running the setup script" @@ -11,6 +10,9 @@ echo "[INFO] Installing Xcode Command Line Tools" echo "[ACTION] Request Human Takeover" xcode-select --install +# Press any key to continue (if Xcode Command Line Tools are installed) +read -n 1 -s -r -p "Press any key to continue when xcode CLI tools are installed" + # System Preferences # Installation Sources echo "[INFO] Setting Installation Sources" diff --git a/bootstrap/set_symlink_unix.bash b/bootstrap/set_symlink_unix.bash new file mode 100644 index 0000000..9191e28 --- /dev/null +++ b/bootstrap/set_symlink_unix.bash @@ -0,0 +1,40 @@ +#! /bin/bash +# $DOTFILES/bootstrap/set_symblink_unix.bash +# Date: 2024-12-01 +# Author: contact@js0ny.net +# Set symbolic links for Unix-like systems +mkdir -p $XDG_CONFIG_HOME/conda $XDG_CONFIG_HOME/git $XDG_CONFIG_HOME/ideavim $XDG_CONFIG_HOME/markdownlint $XDG_CONFIG_HOME/pip $XDG_CONFIG_HOME/neovide $XDG_CONFIG_HOME/powershell $XDG_CONFIG_HOME/vscode $XDG_CONFIG_HOME/NuGet $XDG_CONFIG_HOME/vim $XDG_CONFIG_HOME/tmux $XDG_CONFIG_HOME/npm $XDG_CONFIG_HOME/readline $XDG_CONFIG_HOME/ipython +# Not support XDG_CONFIG_HOME but same directory +mkdir -p ~/.config/zellij ~/.config/yazi ~/.config/glow +# mkdir -p $WAKATIME_HOME +# mkdir -p $XDG_STATE_HOME/vim/undo $XDG_STATE_HOME/vim/backup $XDG_STATE_HOME/vim/swap $XDG_STATE_HOME/vim/view +mkdir -p $HOME/Obsidian +# $DOTFILES/common +ln -sf $DOTFILES/common/condarc.yaml $XDG_CONFIG_HOME/conda/.condarc +ln -sf $DOTFILES/common/gitconfig $XDG_CONFIG_HOME/git/config +ln -sf $DOTFILES/common/glow.yaml ~/.config/glow/config.yml +ln -sf $DOTFILES/common/haskeline ~/.haskeline +ln -sf $DOTFILES/common/ideavimrc $XDG_CONFIG_HOME/ideavim/ideavimrc +ln -sf $DOTFILES/common/inputrc $XDG_CONFIG_HOME/readline/inputrc +ln -sf $DOTFILES/common/lesskey $XDG_CONFIG_HOME/lesskey +ln -sf $DOTFILES/common/npmrc $NPM_CONFIG_USERCONFIG +ln -sf $DOTFILES/common/NuGet.Config $XDG_CONFIG_HOME/NuGet/NuGet.Config +ln -sf $DOTFILES/common/obsidian.vimrc $HOME/Obsidian/.obsidian.vimrc +ln -sf $DOTFILES/common/pip.conf $XDG_CONFIG_HOME/pip/pip.conf +ln -sf $DOTFILES/common/tmux.conf $XDG_CONFIG_HOME/tmux/tmux.conf +ln -sf $DOTFILES/common/vimrc $XDG_CONFIG_HOME/vim/vimrc +ln -sf $DOTFILES/common/zellij.config.kdl ~/.config/zellij/config.kdl +# $DOTFILES/tools +ln -sf $DOTFILES/tools/ipython $XDG_CONFIG_HOME/ipython +ln -sf $DOTFILES/tools/nvim $XDG_CONFIG_HOME/nvim +ln -sf $DOTFILES/tools/yazi/config/keymap.toml ~/.config/yazi/keymap.toml +ln -sf $DOTFILES/tools/yazi/config/yazi.toml ~/.config/yazi/yazi.toml + + +if [ $(uname) = "Darwin"]; then + mkdir -p ~/.config/karabiner $XDG_CONFIG_HOME/skhd $XDG_CONFIG_HOME/yabai $XDG_CONFIG_HOME/sketchybar + ln -sf $DOTFILES/platforms/mac/karabiner/karabiner.json ~/.config/karabiner/karabiner.json + ln -sf $DOTFILES/platforms/mac/skhdrc $XDG_CONFIG_HOME/skhd/skhdrc + ln -sf $DOTFILES/platforms/mac/sketchybarrc $XDG_CONFIG_HOME/sketchybar/sketchybarrc + ln -sf $DOTFILES/platforms/mac/yabairc $XDG_CONFIG_HOME/yabai/yabairc +fi diff --git a/bootstrap/set_symlink_win.ps1 b/bootstrap/set_symlink_win.ps1 new file mode 100644 index 0000000..e709cb0 --- /dev/null +++ b/bootstrap/set_symlink_win.ps1 @@ -0,0 +1,38 @@ +# $DOTFILES\bootstrap\set_symlink_win.ps1 +# Date: 2024-12-01 +# Author: contact@js0ny.net +# Set symlinks for dotfiles on Windows +# ๅœจ Windows ไธŠ่ฎพ็ฝฎ dotfiles ็š„็ฌฆๅท้“พๆŽฅ + +$DOTFILES = Join-Path $env:UserProfile ".dotfiles" +$BASE_COMMON = Join-Path $DOTFILES "common" +$BASE_TOOLS = Join-Path $DOTFILES "tools" +$BASE_WIN = Join-Path $DOTFILES "platforms" "win" +$linkDots = @{ + "$BASE_WIN\wslconfig" = "$env:UserProfile\.wslconfig" + "$BASE_WIN\neovide.toml" = "$Env:AppData\neovide\config.toml" + "$BASE_WIN\vsvimrc" = "$Env:Vim\.vsvimrc" + "$BASE_WIN\komorebi" = "$env:KOMOREBI_CONFIG_HOME" + "$BASE_COMMON\condarc.yaml" = "$env:XDG_CONFIG_HOME\conda\.condarc" + "$BASE_COMMON\gitconfig" = "$env:UserProfile\.gitconfig" + "$BASE_COMMON\glow.yaml" = "$env:AppData\glow\glow.yml" + "$BASE_COMMON\haskeline" = "$env:UserProfile\.haskeline" + "$BASE_COMMON\ideavimrc" = "$env:XDG_CONFIG_HOME\ideavim\ideavimrc" + "$BASE_COMMON\lesskey" = "$env:LessKeyIn" + "$BASE_COMMON\npmrc" = "$env:NPM_CONFIG_USERCONFIG" + "$BASE_COMMON\NuGet.Config" = "$env:AppData\NuGet\NuGet.Config" + "$BASE_COMMON\obsidian.vimrc" = "$env:UserProfile\Obsidian\.obsidian.vimrc" + "$BASE_COMMON\pip.conf" = "$env:AppData\pip\pip.ini" + "$BASE_COMMON\vim.noxdg.vimrc" = "$env:Vim\_vimrc" + "$BASE_TOOLS\ipython" = "$env:IPYTHONDIR" + "$BASE_TOOLS\nvim" = "$env:XDG_CONFIG_HOME\nvim" +} + +# TODO: Auto create directories + +foreach ($target in $linkDots.Keys) { + $path = $linkDots[$target] + New-Item -ItemType SymbolicLink -Target $target -Path $path -Force +} + +New-Item -ItemType SymbolicLink -Target "$BASE_WIN\Microsoft.PowerShell_profile.ps1" -Path "$env:UserProfile\Documents\PowerShell\Microsoft.PowerShell_profile.ps1" -Force diff --git a/.config/NuGet/NuGet.Config b/common/NuGet.Config similarity index 100% rename from .config/NuGet/NuGet.Config rename to common/NuGet.Config diff --git a/.config/conda/condarc.yaml b/common/condarc.yaml similarity index 100% rename from .config/conda/condarc.yaml rename to common/condarc.yaml diff --git a/.config/git/.gitconfig b/common/gitconfig similarity index 100% rename from .config/git/.gitconfig rename to common/gitconfig diff --git a/.config/glow/glow.yaml b/common/glow.yaml similarity index 100% rename from .config/glow/glow.yaml rename to common/glow.yaml diff --git a/.haskeline b/common/haskeline similarity index 100% rename from .haskeline rename to common/haskeline diff --git a/.config/ideavim/ideavimrc.vimrc b/common/ideavimrc similarity index 100% rename from .config/ideavim/ideavimrc.vimrc rename to common/ideavimrc diff --git a/.config/readline/inputrc b/common/inputrc similarity index 100% rename from .config/readline/inputrc rename to common/inputrc diff --git a/.config/lesskey b/common/lesskey similarity index 100% rename from .config/lesskey rename to common/lesskey diff --git a/.config/npm/npmrc b/common/npmrc similarity index 100% rename from .config/npm/npmrc rename to common/npmrc diff --git a/.obsidian.vimrc b/common/obsidian.vimrc similarity index 100% rename from .obsidian.vimrc rename to common/obsidian.vimrc diff --git a/.config/pip/pip.conf b/common/pip.conf similarity index 100% rename from .config/pip/pip.conf rename to common/pip.conf diff --git a/.config/remote.bashrc b/common/remote.bashrc similarity index 100% rename from .config/remote.bashrc rename to common/remote.bashrc diff --git a/.config/tmux/tmux.conf b/common/tmux.conf similarity index 100% rename from .config/tmux/tmux.conf rename to common/tmux.conf diff --git a/.config/vim/noxdg.vimrc b/common/vim.noxdg.vimrc similarity index 100% rename from .config/vim/noxdg.vimrc rename to common/vim.noxdg.vimrc diff --git a/.config/vim/vimrc b/common/vimrc similarity index 100% rename from .config/vim/vimrc rename to common/vimrc diff --git a/.config/zellij/config.kdl b/common/zellij.config.kdl similarity index 100% rename from .config/zellij/config.kdl rename to common/zellij.config.kdl diff --git a/mac/.zshrc b/mac/.zshrc deleted file mode 100644 index 35da61f..0000000 --- a/mac/.zshrc +++ /dev/null @@ -1,48 +0,0 @@ -# $XDG_CONFIG_HOME/zsh/.zshrc -# ln -s $DOTFILES/mac/.zshrc $XDG_CONFIG_HOME/zsh/.zshrc -### Variables ### - -export DOTFILES="$HOME/.dotfiles" -export PATH=/opt/homebrew/bin:/opt/homebrew/sbin:$PATH -for file in $DOTFILES/zsh/*.zsh; do - source $file -done -export ARCHFLAGS="-arch arm64" - -### Navigation ### -# Absolute navigation -alias doku="cd ~/doku && ls" -alias docs="cd ~/Documents" -alias dt="cd ~/Desktop" -alias down="cd ~/Downloads" -alias one="cd ~/OneDrive" -alias gdrive="cd ~/Google\ Drive" - -# >>> conda initialize >>> -# !! Contents within this block are managed by 'conda init' !! -__conda_setup="$('/opt/homebrew/Caskroom/miniconda/base/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)" -if [ $? -eq 0 ]; then - eval "$__conda_setup" -else - if [ -f "/opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh" ]; then - . "/opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh" - else - export PATH="/opt/homebrew/Caskroom/miniconda/base/bin:$PATH" - fi -fi -unset __conda_setup -# <<< conda initialize <<< - -# >>> juliaup initialize >>> - -# !! Contents within this block are managed by juliaup !! - -path=('$HOME/.juliaup/bin' $path) -export PATH - -# <<< juliaup initialize <<< - -# macOS # - -alias xclip="pbcopy" -alias clip="pbcopy" diff --git a/mac/plum b/mac/plum deleted file mode 160000 index 4c28f11..0000000 --- a/mac/plum +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4c28f11f451facef809b380502874a48ba964ddb diff --git a/mac/set_mirror.sh b/mac/set_mirror.sh deleted file mode 100644 index 1c7b27b..0000000 --- a/mac/set_mirror.sh +++ /dev/null @@ -1,33 +0,0 @@ -# pip -alias pip=pip3 -alias python=python3 -python -m pip install --upgrade pip -pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple -# npm -npm config set registry https://registry.npmmirror.com - - - -# Homebrew -# ๆ‰‹ๅŠจ่ฎพ็ฝฎ -export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git" - -# ๆณจ๏ผš่‡ช brew 4.0 ่ตท๏ผŒๅคง้ƒจๅˆ† Homebrew ็”จๆˆทๆ— ้œ€่ฎพ็ฝฎ homebrew/core ๅ’Œ homebrew/cask ้•œๅƒ๏ผŒๅช้œ€่ฎพ็ฝฎ HOMEBREW_API_DOMAIN ๅณๅฏใ€‚ -# ๅฆ‚ๆžœ้œ€่ฆไฝฟ็”จ Homebrew ็š„ๅผ€ๅ‘ๅ‘ฝไปค (ๅฆ‚ `brew cat `)๏ผŒๅˆ™ไป็„ถ้œ€่ฆ่ฎพ็ฝฎ homebrew/core ๅ’Œ homebrew/cask ้•œๅƒใ€‚ -# ่ฏทๆŒ‰้œ€ๆ‰ง่กŒๅฆ‚ไธ‹ไธค่กŒๅ‘ฝไปค๏ผš -brew tap --custom-remote --force-auto-update homebrew/core https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git -brew tap --custom-remote --force-auto-update homebrew/cask https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git - -# ้™ค homebrew/core ๅ’Œ homebrew/cask ไป“ๅบ“ๅค–็š„ tap ไป“ๅบ“ไป็„ถ้œ€่ฆ่ฎพ็ฝฎ้•œๅƒ -brew tap --custom-remote --force-auto-update homebrew/cask-fonts https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-fonts.git -brew tap --custom-remote --force-auto-update homebrew/cask-versions https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-versions.git -brew tap --custom-remote --force-auto-update homebrew/command-not-found https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-command-not-found.git -brew tap --custom-remote --force-auto-update homebrew/services https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-services.git -brew update - -# ๆˆ–ไฝฟ็”จไธ‹้ข็š„ๅ‡ ่กŒๅ‘ฝไปค่‡ชๅŠจ่ฎพ็ฝฎ -export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git" -for tap in core cask{,-fonts,-versions} command-not-found services; do - brew tap --custom-remote --force-auto-update "homebrew/${tap}" "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-${tap}.git" -done -brew update diff --git a/mirror/set_mirror.ps1 b/mirror/set_mirror.ps1 deleted file mode 100644 index 48a3fdf..0000000 --- a/mirror/set_mirror.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -# pip -Set-Alias pip pip3 -Set-Alias python python3 -python -m pip install --upgrade pip -pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple -# npm -npm config set registry https://registry.npmmirror.com \ No newline at end of file diff --git a/mirror/set_mirror.sh b/mirror/set_mirror.sh deleted file mode 100644 index 1c04b24..0000000 --- a/mirror/set_mirror.sh +++ /dev/null @@ -1,22 +0,0 @@ -# pip -alias pip=pip3 -alias python=python3 -python -m pip install --upgrade pip -pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple -# npm -npm config set registry https://registry.npmmirror.com - - - -# Linuxbrew -export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git" - -# ๆณจ๏ผš่‡ช brew 4.0 ่ตท๏ผŒไฝฟ็”จ้ป˜่ฎค prefix (ๅณ "/home/linuxbrew/.linuxbrew") ็š„ๅคง้ƒจๅˆ† Homebrew ็”จๆˆทๆ— ้œ€่ฎพ็ฝฎ homebrew/core ้•œๅƒ๏ผŒๅช้œ€่ฎพ็ฝฎ HOMEBREW_API_DOMAIN ๅณๅฏใ€‚ -# ๅฆ‚ๆžœไธๆ˜ฏ้ป˜่ฎค prefix ๆˆ–่€…้œ€่ฆไฝฟ็”จ Homebrew ็š„ๅผ€ๅ‘ๅ‘ฝไปค (ๅฆ‚ `brew cat `)๏ผŒๅˆ™ไป็„ถ้œ€่ฆ่ฎพ็ฝฎ homebrew/core ้•œๅƒใ€‚ -# ่ฏทๆŒ‰้œ€ๆ‰ง่กŒๅฆ‚ไธ‹ๅ‘ฝไปค๏ผš -brew tap --custom-remote --force-auto-update homebrew/core https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git - -# ้™ค homebrew/core ไป“ๅบ“ๅค–็š„ tap ไป“ๅบ“ไป็„ถ้œ€่ฆ่ฎพ็ฝฎ้•œๅƒ -brew tap --custom-remote --force-auto-update homebrew/command-not-found https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-command-not-found.git -brew tap --custom-remote --force-auto-update homebrew/services https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-services.git -brew update diff --git a/mirror/tuna_ubuntu.list b/mirror/tuna_ubuntu.list deleted file mode 100644 index ca0d87a..0000000 --- a/mirror/tuna_ubuntu.list +++ /dev/null @@ -1,15 +0,0 @@ -# ้ป˜่ฎคๆณจ้‡Šไบ†ๆบ็ ้•œๅƒไปฅๆ้ซ˜ apt update ้€Ÿๅบฆ๏ผŒๅฆ‚ๆœ‰้œ€่ฆๅฏ่‡ช่กŒๅ–ๆถˆๆณจ้‡Š -deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse -# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse -deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse -# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse -deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse -# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse - -# ไปฅไธ‹ๅฎ‰ๅ…จๆ›ดๆ–ฐ่ฝฏไปถๆบๅŒ…ๅซไบ†ๅฎ˜ๆ–นๆบไธŽ้•œๅƒ็ซ™้…็ฝฎ๏ผŒๅฆ‚ๆœ‰้œ€่ฆๅฏ่‡ช่กŒไฟฎๆ”นๆณจ้‡Šๅˆ‡ๆข -deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse -# deb-src http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse - -# ้ข„ๅ‘ๅธƒ่ฝฏไปถๆบ๏ผŒไธๅปบ่ฎฎๅฏ็”จ -# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse -# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse \ No newline at end of file diff --git a/mirror/ubuntu.sh b/mirror/ubuntu.sh deleted file mode 100644 index 8657fb3..0000000 --- a/mirror/ubuntu.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Making Backup of /etc/apt/sources.list..." -sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak - -echo "Adding Ubuntu Repositories..." -sudo cp ./tuna_ubuntu.list /etc/apt/sources.list \ No newline at end of file diff --git a/mac/readme.md b/platforms/linux/.gitkeep similarity index 100% rename from mac/readme.md rename to platforms/linux/.gitkeep diff --git a/mac/karabiner/caps_to_esc_lcmd.json b/platforms/mac/karabiner/caps_to_esc_lcmd.json similarity index 100% rename from mac/karabiner/caps_to_esc_lcmd.json rename to platforms/mac/karabiner/caps_to_esc_lcmd.json diff --git a/mac/karabiner/fn-tab_to_cmd-tab.json b/platforms/mac/karabiner/fn-tab_to_cmd-tab.json similarity index 100% rename from mac/karabiner/fn-tab_to_cmd-tab.json rename to platforms/mac/karabiner/fn-tab_to_cmd-tab.json diff --git a/mac/karabiner/karabiner.json b/platforms/mac/karabiner/karabiner.json similarity index 100% rename from mac/karabiner/karabiner.json rename to platforms/mac/karabiner/karabiner.json diff --git a/mac/karabiner/readme.md b/platforms/mac/karabiner/readme.md similarity index 100% rename from mac/karabiner/readme.md rename to platforms/mac/karabiner/readme.md diff --git a/mac/neovide.toml b/platforms/mac/neovide.toml similarity index 100% rename from mac/neovide.toml rename to platforms/mac/neovide.toml diff --git a/mac/Microsoft.PowerShell_profile.ps1 b/platforms/mac/pwshProfile.ps1 similarity index 100% rename from mac/Microsoft.PowerShell_profile.ps1 rename to platforms/mac/pwshProfile.ps1 diff --git a/platforms/mac/readme.md b/platforms/mac/readme.md new file mode 100644 index 0000000..e69de29 diff --git a/mac/shortcuts/finder_open.applescript b/platforms/mac/shortcuts/finder_open.applescript similarity index 100% rename from mac/shortcuts/finder_open.applescript rename to platforms/mac/shortcuts/finder_open.applescript diff --git a/platforms/mac/sketchybarrc b/platforms/mac/sketchybarrc new file mode 100755 index 0000000..7486611 --- /dev/null +++ b/platforms/mac/sketchybarrc @@ -0,0 +1,102 @@ +# $DOTFILES/platforms/mac/sketchybarrc +# Date: 2024-11-30 +# Author: contact@js0ny.net +# TODO: Reorganize this file +# This is a demo config to showcase some of the most important commands. +# It is meant to be changed and configured, as it is intentionally kept sparse. +# For a (much) more advanced configuration example see my dotfiles: +# https://github.com/FelixKratz/dotfiles + +PLUGIN_DIR="$CONFIG_DIR/plugins" + +##### Bar Appearance ##### +# Configuring the general appearance of the bar. +# These are only some of the options available. For all options see: +# https://felixkratz.github.io/SketchyBar/config/bar +# If you are looking for other colors, see the color picker: +# https://felixkratz.github.io/SketchyBar/config/tricks#color-picker + +sketchybar --bar position=top height=40 blur_radius=30 color=0x40000000 +##### Changing Defaults ##### +# We now change some default values, which are applied to all further items. +# For a full list of all available item properties see: +# https://felixkratz.github.io/SketchyBar/config/items + +default=( + padding_left=5 + padding_right=5 + icon.font="CaskaydiaCove Nerd Font:Bold:17.0" + label.font="CaskaydiaCove Nerd Font:Bold:14.0" + icon.color=0xffffffff + label.color=0xffffffff + icon.padding_left=4 + icon.padding_right=4 + label.padding_left=4 + label.padding_right=4 +) +sketchybar --default "${default[@]}" + +##### Adding Mission Control Space Indicators ##### +# Let's add some mission control spaces: +# https://felixkratz.github.io/SketchyBar/config/components#space----associate-mission-control-spaces-with-an-item +# to indicate active and available mission control spaces. + +SPACE_ICONS=("1" "2" "3" "4" "5" "6" "7" "8" "9" "10") +for i in "${!SPACE_ICONS[@]}" +do + sid="$(($i+1))" + space=( + space="$sid" + icon="${SPACE_ICONS[i]}" + icon.padding_left=7 + icon.padding_right=7 + background.color=0x40ffffff + background.corner_radius=5 + background.height=25 + label.drawing=off + script="$PLUGIN_DIR/space.sh" + click_script="yabai -m space --focus $sid" + ) + sketchybar --add space space."$sid" left --set space."$sid" "${space[@]}" +done + +##### Adding Left Items ##### +# We add some regular items to the left side of the bar, where +# only the properties deviating from the current defaults need to be set + +sketchybar --add item chevron left \ + --set chevron icon=๏” label.drawing=off \ + --add item front_app left \ + --set front_app icon.drawing=off script="$PLUGIN_DIR/front_app.sh" \ + --subscribe front_app front_app_switched + +##### Adding Right Items ##### +# In the same way as the left items we can add items to the right side. +# Additional position (e.g. center) are available, see: +# https://felixkratz.github.io/SketchyBar/config/items#adding-items-to-sketchybar + +# Some items refresh on a fixed cycle, e.g. the clock runs its script once +# every 10s. Other items respond to events they subscribe to, e.g. the +# volume.sh script is only executed once an actual change in system audio +# volume is registered. More info about the event system can be found here: +# https://felixkratz.github.io/SketchyBar/config/events + +sketchybar --add item clock center \ + --set clock update_freq=10 icon=๏บ script="$PLUGIN_DIR/clock.sh" \ + --add item volume right \ + --set volume script="$PLUGIN_DIR/volume.sh" \ + --subscribe volume volume_change \ + --add item battery right \ + --set battery update_freq=120 script="$PLUGIN_DIR/battery.sh" \ + --subscribe battery system_woke power_source_change \ + --add item apple_music right + +sketchybar --add item music right +sketchybar --set music \ + script="$PLUGIN_DIR/music.sh" \ + update_freq=5 \ + label.color=0xffd7ba7d \ + background.corner_radius=5 + +##### Force all scripts to run the first time (never do this in a script) ##### +sketchybar --update diff --git a/platforms/mac/skhdrc b/platforms/mac/skhdrc new file mode 100644 index 0000000..2dc756f --- /dev/null +++ b/platforms/mac/skhdrc @@ -0,0 +1,36 @@ +# $DOTFILES/platforms/mac/skhdrc +# Date: 2024-11-30 +# Author: contact@js0ny.net + +# Location: $XDG_CONFIG_HOME/skhd/skhdrc +# Linking: +# ln -sf $DOTFILES/platforms/mac/skhdrc $XDG_CONFIG_HOME/skhd/skhdrc + +# Navigation +cmd - h : yabai -m window --focus west +cmd - n : yabai -m window --focus south +cmd - e : yabai -m window --focus north +cmd - i : yabai -m window --focus east + +# Moving windows +shift + cmd - h : yabai -m window --warp west +shift + cmd - n : yabai -m window --warp south +shift + cmd - e : yabai -m window --warp north +shift + cmd - i : yabai -m window --warp east + +shift + alt - h : \ + yabai -m window --resize left:-20:0 ; \ + yabai -m window --resize right:-20:0 + +shift + alt - n : \ + yabai -m window --resize bottom:0:20 ; \ + yabai -m window --resize top:0:20 + +shift + alt - e : \ + yabai -m window --resize top:0:-20 ; \ + yabai -m window --resize bottom:0:-20 + +shift + alt - i : \ + yabai -m window --resize right:20:0 ; \ + yabai -m window --resize left:20:0 + diff --git a/platforms/mac/yabairc b/platforms/mac/yabairc new file mode 100644 index 0000000..a9d6b8d --- /dev/null +++ b/platforms/mac/yabairc @@ -0,0 +1,51 @@ +#!/usr/bin/env sh +# $DOTFILES/platforms/mac/yabairc +# Date: 2024-11-30 +# Author: contact@js0ny.net +# TODO: Reorganize this file + +# +# for this to work you must configure sudo such that +# it will be able to run the command without password +# +# see this wiki page for information: +# - https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(latest-release)#configure-scripting-addition +# +# yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa" +# sudo yabai --load-sa +# + +# global settings +yabai -m config \ + top_padding 40 \ + external_bar off:40:0 \ + menubar_opacity 1.0 \ + mouse_follows_focus off \ + focus_follows_mouse off \ + display_arrangement_order default \ + window_origin_display default \ + window_placement second_child \ + window_zoom_persist on \ + window_shadow on \ + window_animation_duration 0.0 \ + window_animation_easing ease_out_circ \ + window_opacity_duration 0.0 \ + active_window_opacity 1.0 \ + normal_window_opacity 0.70 \ + window_opacity on \ + insert_feedback_color 0xffd75f5f \ + split_ratio 0.50 \ + split_type auto \ + auto_balance off \ + bottom_padding 12 \ + left_padding 12 \ + right_padding 12 \ + window_gap 06 \ + layout bsp \ + mouse_modifier fn \ + mouse_action1 move \ + mouse_action2 resize \ + mouse_drop_action swap + + +echo "yabai configuration loaded.." diff --git a/platforms/mac/zshrc b/platforms/mac/zshrc new file mode 100644 index 0000000..bf3d429 --- /dev/null +++ b/platforms/mac/zshrc @@ -0,0 +1,27 @@ +# $DOTFILES/platforms/mac/zshrc +# Date: 2024-11-30 +# Author: contact@js0ny.net +# Sourced by user's zshrc if is macOS ๅœจ็”จๆˆท็š„ zshrc ไธญ่ขซๅผ•็”จ๏ผŒmacOS ็‰นๅฎš้…็ฝฎ +# Entry point in $DOTFILES/tools/zsh/common.zshrc (ๅ…ฅๅฃ็‚น) + +# macOS # + +alias xclip="pbcopy" +alias clip="pbcopy" +alias paste="pbpaste" + +# >>> conda initialize >>> +# !! Contents within this block are managed by 'conda init' !! +__conda_setup="$('/opt/homebrew/Caskroom/miniconda/base/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)" +if [ $? -eq 0 ]; then + eval "$__conda_setup" +else + if [ -f "/opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh" ]; then + . "/opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh" + else + export PATH="/opt/homebrew/Caskroom/miniconda/base/bin:$PATH" + fi +fi +unset __conda_setup +# <<< conda initialize <<< + diff --git a/platforms/win/Microsoft.PowerShell_profile.ps1 b/platforms/win/Microsoft.PowerShell_profile.ps1 new file mode 100644 index 0000000..08a6cff --- /dev/null +++ b/platforms/win/Microsoft.PowerShell_profile.ps1 @@ -0,0 +1,74 @@ +# $DOTFILES/platforms\win\Microsoft.PowerShell_profile.ps1 +# Date: 2024-12-01 +# Author: contact@js0ny.net +# PowerShell profile for Windows + +### Load Configs ### +$DOTFILES = Join-Path $HOME ".dotfiles" +Get-ChildItem -Path $(Join-Path $DOTFILES "tools" "powershell") -Filter *.ps1 | ForEach-Object {. $_} + +### Aliases ### + + +# Toggle Theme # +# TODO: Change to `bat` script implementation +# function Set-SystemTheme { +# $regPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" +# $currentMode = Get-ItemProperty -Path $regPath -Name "AppsUseLightTheme" +# if ($currentMode.AppsUseLightTheme -eq 1) { +# Set-ItemProperty -Path $regPath -Name "AppsUseLightTheme" -Value 0 +# Write-Host "ๅทฒๅˆ‡ๆขๅˆฐๆทฑ่‰ฒๆจกๅผ" +# } +# else { +# Set-ItemProperty -Path $regPath -Name "AppsUseLightTheme" -Value 1 +# Write-Host "ๅทฒๅˆ‡ๆขๅˆฐๆต…่‰ฒๆจกๅผ" +# } +# } +# Set-Alias "dark-mode" "Set-SystemTheme" # Consistent with macOS (`dark-mode`) + +# Miscs # + +### Misc ### +${function:qwen} = "ollama run qwen2.5:14b" + +## Conda ## +#region conda initialize +# !! Contents within this block are managed by 'conda init' !! +If (Test-Path "$HOME\miniconda3\Scripts\conda.exe") { + (& "$HOME\miniconda3\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | Where-Object{$_} | Invoke-Expression +} +#endregion + +## Check Start Up ## +#$SystemlogFilePath = "$env:USERPROFILE\.PowerShellStartup.log" +## ๆฃ€ๆŸฅๆ—ฅๅฟ—ๆ–‡ไปถๆ˜ฏๅฆๅญ˜ๅœจ +#if (-not (Test-Path $SystemlogFilePath)) { +# New-Item -Path $SystemlogFilePath -ItemType File -Force | Out-Null +#} +## ่ฏปๅ–ๆ—ฅๅฟ—ๆ–‡ไปถ็š„ๆœ€ๅŽไธ€่กŒ๏ผˆๅณไธŠๆฌกๅฏๅŠจๆ—ฅๆœŸ๏ผ‰ +#$__lastStartup = Get-Content -Path $SystemlogFilePath -Tail 1 -ErrorAction SilentlyContinue +#$_currentDate = (Get-Date).ToString("yyyy-MM-dd") +#if (-not ($__lastStartup -eq $_currentDate)) { +# Get-Date +# Update-ForexData & +# Write-Host "ไปŠๅคฉๆ˜ฏ็ฌฌไธ€ๆฌกๅฏๅŠจ PowerShellใ€‚" +# # ่ฎฐๅฝ•ๅฝ“ๅ‰ๆ—ฅๆœŸๅˆฐๆ—ฅๅฟ—ๆ–‡ไปถ +# $_currentDate | Out-File -FilePath $SystemlogFilePath -Append +#} +#Remove-Variable SystemlogFilePath +#Remove-Variable __lastStartup +#Remove-Variable _currentDate + +# Set default applications + +$Env:PAGER = "less" +$Env:EDITOR = "code --wait" +$Env:VISUAL = "code --wait" +$Env:FILE_MANAGER = "dopus.exe" + + +${function:wsl2} = {wsl.exe --distribution Ubuntu} +${function:wini} = { winget install $args } +${function:winr} = { winget uninstall $args } +${function:wins} = { winget search $args } +${function:winu} = { winget upgrade $args } diff --git a/win/WindowsTerminal.json b/platforms/win/WindowsTerminal.json similarity index 100% rename from win/WindowsTerminal.json rename to platforms/win/WindowsTerminal.json diff --git a/win/ahk/main.ahk b/platforms/win/ahk/main.ahk similarity index 100% rename from win/ahk/main.ahk rename to platforms/win/ahk/main.ahk diff --git a/win/cmd/dark-mode.bat b/platforms/win/cmd/dark-mode.bat similarity index 80% rename from win/cmd/dark-mode.bat rename to platforms/win/cmd/dark-mode.bat index a2d3261..a8948ae 100644 --- a/win/cmd/dark-mode.bat +++ b/platforms/win/cmd/dark-mode.bat @@ -1,3 +1,4 @@ +@REM Not working @REM encoding: GBK @echo off set regPath="HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" @@ -5,8 +6,8 @@ for /f "usebackq tokens=2*" %%a in (`reg query %regPath% /v AppsUseLightTheme ^| if "%currentMode%"=="0x1" ( reg add %regPath% /v AppsUseLightTheme /t REG_DWORD /d 0 /f >nul - echo าัวะปปตฝษ๎ษซฤฃสฝ + echo ๏ฟฝ๏ฟฝ๏ฟฝะป๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝษซฤฃสฝ ) else ( reg add %regPath% /v AppsUseLightTheme /t REG_DWORD /d 1 /f >nul - echo าัวะปปตฝวณษซฤฃสฝ + echo ๏ฟฝ๏ฟฝ๏ฟฝะป๏ฟฝ๏ฟฝ๏ฟฝวณษซฤฃสฝ ) diff --git a/win/komorebi/komorebi.ahk b/platforms/win/komorebi/komorebi.ahk similarity index 100% rename from win/komorebi/komorebi.ahk rename to platforms/win/komorebi/komorebi.ahk diff --git a/win/komorebi/komorebi.bar.json b/platforms/win/komorebi/komorebi.bar.json similarity index 100% rename from win/komorebi/komorebi.bar.json rename to platforms/win/komorebi/komorebi.bar.json diff --git a/win/komorebi/komorebi.json b/platforms/win/komorebi/komorebi.json similarity index 100% rename from win/komorebi/komorebi.json rename to platforms/win/komorebi/komorebi.json diff --git a/win/neovide.toml b/platforms/win/neovide.toml similarity index 100% rename from win/neovide.toml rename to platforms/win/neovide.toml diff --git a/win/readme.md b/platforms/win/readme.md similarity index 100% rename from win/readme.md rename to platforms/win/readme.md diff --git a/.config/.vsvimrc b/platforms/win/vsvimrc similarity index 100% rename from .config/.vsvimrc rename to platforms/win/vsvimrc diff --git a/platforms/win/wslconfig b/platforms/win/wslconfig new file mode 100644 index 0000000..bd68ee5 --- /dev/null +++ b/platforms/win/wslconfig @@ -0,0 +1,19 @@ +# $DOTFILES\platforms\win\wslconfig +# Date: 2024-12-01 +# Author: contact@js0ny.net +# Config Files (mainly for networking) for WSL2 (Windows Subsystem for Linux 2) +# ้€‚็”จไบŽ Windows ็š„ Linux ๅญ็ณป็ปŸ 2 ็š„้…็ฝฎๆ–‡ไปถ๏ผˆไธป่ฆ็”จไบŽ็ฝ‘็ปœ๏ผ‰ + +# Location: ~/.wslconfig +# Linking: (PowerShell) +# New-Item -ItemType SymbolicLink -Path ~\.wslconfig -Target ~\.dotfiles\platforms\win\wslconfig +[wsl2] +# networkingMode=mirrored +# dnsTunneling=true +# firewall=true +# autoProxy=true + +[experimental] +# requires dnsTunneling but are also OPTIONAL +bestEffortDnsParsing=true +hostAddressLoopback=true diff --git a/wsl/.bashrc b/platforms/wsl/.bashrc similarity index 100% rename from wsl/.bashrc rename to platforms/wsl/.bashrc diff --git a/wsl/winterop.zsh b/platforms/wsl/winterop.zsh similarity index 58% rename from wsl/winterop.zsh rename to platforms/wsl/winterop.zsh index 50e780a..8e30dbc 100644 --- a/wsl/winterop.zsh +++ b/platforms/wsl/winterop.zsh @@ -1,3 +1,10 @@ +# $DOTFILES/platforms/wsl/winterop.zsh +# Sourced by $DOTFILES/platforms/wsl/zshrc ๅœจ $DOTFILES/platforms/wsl/zshrc ไธญ่ขซๅผ•็”จ + +# Defines the interop commands between WSL and Windows + +export FILE_EXPLORER="dopus.exe" # Directory Opus + alias clip="clip.exe" alias xclip="clip.exe" alias paste='pwsh.exe -NoProfile -Command "Get-Clipboard"' @@ -13,3 +20,14 @@ alias diskpart="diskpart.exe" alias winget="winget.exe" alias pastew='pwsh.exe -NoProfile -Command "Get-Clipboard"' alias ollama="ollama.exe" + +# WSL open +open() { + local target=$1 + + if command -v "$FILE_EXPLORER" > /dev/null; then + "$FILE_EXPLORER" "$target" + else + command open "$target" + fi +} diff --git a/platforms/wsl/zshrc b/platforms/wsl/zshrc new file mode 100644 index 0000000..fdc7691 --- /dev/null +++ b/platforms/wsl/zshrc @@ -0,0 +1,32 @@ +# $DOTFILES/platforms/wsl/zshrc +# Date: 2024-12-01 +# Author: contact@js0ny.net +# Sourced by user's zshrc if is WSL ๅœจ็”จๆˆท็š„ zshrc ไธญ่ขซๅผ•็”จ๏ผŒWSL ็‰นๅฎš้…็ฝฎ +# Entry point in $DOTFILES/tools/zsh/common.zshrc (ๅ…ฅๅฃ็‚น) + +### Variables ### +export IS_WSL=true +export ARCHFLAGS="-arch x86_64" +source $DOTFILES/platforms/wsl/winterop.zsh + + +### Misc ### + +export PATH=/opt/bin:$PATH + +# Conda # + +# >>> conda initialize >>> +# !! Contents within this block are managed by 'conda init' !! +__conda_setup="$('$HOME/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)" +if [ $? -eq 0 ]; then + eval "$__conda_setup" +else + if [ -f "$HOME/miniconda3/etc/profile.d/conda.sh" ]; then + . "$HOME/miniconda3/etc/profile.d/conda.sh" + else + export PATH="$HOME/miniconda3/bin:$PATH" + fi +fi +unset __conda_setup +# <<< conda initialize <<< diff --git a/powershell/Aliases.ps1 b/powershell/Aliases.ps1 deleted file mode 100644 index 4f5741b..0000000 --- a/powershell/Aliases.ps1 +++ /dev/null @@ -1,46 +0,0 @@ -### VARIABLES ### -$EDITOR = "code" -# Shell Equivalents # -Set-Alias "touch" "New-Item" -${function:ll} = { Get-ChildItem -Force } - -# Shell Configurations # -${function:shcfg} = { code $PROFILE } -Set-Alias "pwshcfg" "shcfg" -${function:reload} = { . $PROFILE } -${function:pulldots} = { Set-Location -Path $DOTFILES && git pull } - -# Editors # -Set-Alias "v" "nvim" -Set-Alias "c" "code" -Set-Alias "gvi" "neovide" - -# File Creation # -function mkcd { param ( [string] $dirname) mkdir $dirname && Set-Location $dirname } -function tc { param ( [string] $filename) New-Item $filename && code $filename } -function tv { param ( [string] $filename) New-Item $filename && nvim $filename } -function cdls { param( [string] $dirname) Set-Location $dirname && Get-ChildItem } - -### Dev ### - -# .NET # -${function:csi} = { dotnet repl --default-kernel csharp} -${function:fsi} = { dotnet repl --default-kernel fsharp} - -# Python & Conda # -Set-Alias "py" "python" -Set-Alias "ipy" "ipython" -${function:pyact} = { conda activate $args[0] } -${function:pydact} = { conda deactivate } -${function:pylsenvs} = { conda env list } -${function:pymkenv} = { conda create --name $args[0] } -${function:pyrmenv} = { conda remove --name $args[0] --all } - -# Winget # - -if ($isWindows) { - ${function:wini} = { winget install $args } - ${function:winr} = { winget uninstall $args } - ${function:wins} = { winget search $args } - ${function:winu} = { winget upgrade $args } -} diff --git a/powershell/Navigation.ps1 b/powershell/Navigation.ps1 deleted file mode 100644 index c4f120a..0000000 --- a/powershell/Navigation.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -# ${function:~} = { Set-Location -Path ~ } cd is better -${function:...} = { Set-Location -Path ..\.. } -${function:....} = { Set-Location -Path ..\..\.. } -${function:.....} = { Set-Location -Path ..\..\..\.. } -${function:......} = { Set-Location -Path ..\..\..\..\.. } - -# Absolute navigation -${function:docs} = { Set-Location -Path ~/Documents } -${function:down} = { Set-Location -Path ~/Downloads } -${function:dt} = { Set-Location -Path ~/Desktop } -${function:mytmp} = { Set-Location -Path ~/Temp } -${function:one} = { Set-Location -Path ~/OneDrive } -${function:doku} = { Set-Location -Path ~/doku && Get-ChildItem } - -Invoke-Expression (& { (zoxide init powershell | Out-String) }) \ No newline at end of file diff --git a/powershell/Completions.ps1 b/scripts/Completions.ps1 similarity index 100% rename from powershell/Completions.ps1 rename to scripts/Completions.ps1 diff --git a/powershell/Scripts.ps1 b/scripts/Scripts.ps1 similarity index 96% rename from powershell/Scripts.ps1 rename to scripts/Scripts.ps1 index 2878059..49f47f0 100644 --- a/powershell/Scripts.ps1 +++ b/scripts/Scripts.ps1 @@ -1,17 +1,17 @@ -function CsvToMarkdown { - param( [string]$csv) - $counter = 0 - $column = $csv.Split("`n")[0].Split(",").Length - $aHeader = " --- |" - $header = "|" + $aHeader * $column - $csv.replace(",", " | ").Split("`n") | ForEach-Object { - if ($counter -eq 0) { - Write-Output "| $_ |" - $counter++ - Write-Output $header - } - else { - Write-Output "| $_ |" - } - } +function CsvToMarkdown { + param( [string]$csv) + $counter = 0 + $column = $csv.Split("`n")[0].Split(",").Length + $aHeader = " --- |" + $header = "|" + $aHeader * $column + $csv.replace(",", " | ").Split("`n") | ForEach-Object { + if ($counter -eq 0) { + Write-Output "| $_ |" + $counter++ + Write-Output $header + } + else { + Write-Output "| $_ |" + } + } } \ No newline at end of file diff --git a/scripts/update.zsh b/scripts/update.zsh new file mode 100644 index 0000000..b110e81 --- /dev/null +++ b/scripts/update.zsh @@ -0,0 +1,41 @@ +#!/bin/zsh +# $DOTFILES/scripts/update.zsh +# call by `update` alias defined in tools/zsh/alias.zsh +# ไฝฟ็”จๅˆซๅ `update` ๅผ•็”จ๏ผŒๅˆซๅๅฎšไน‰ไบŽ tools/zsh/alias.zsh + +# Plugins # +# Auto `git pull` on $ZDOTDIR/plugins +for plugin in $ZDOTDIR/plugins/*; do + if [ -d "$plugin" ]; then + cd $plugin + git pull --quiet --no-edit + fi +done + +# Update package managers # +# Homebrew, macOS +if command -v brew > /dev/null; then + brew update + brew upgrade +fi + +# Arch +if command -v pacman > /dev/null; then + sudo pacman -Syu +fi + +# Debian +if command -v apt > /dev/null; then + sudo apt update + sudo apt upgrade +fi + +# Fedora +if command -v dnf > /dev/null; then + sudo dnf update +fi + +# WSL +if command -v winget.exe > /dev/null; then + winget.exe upgrade +fi diff --git a/setup/requirements.txt b/setup/requirements.txt deleted file mode 100644 index 2a0f048..0000000 --- a/setup/requirements.txt +++ /dev/null @@ -1,19 +0,0 @@ -# This file lists all the must-have libraries for installing a new computer -# For scripting use -# pip install -r requirements.txt -colorama -# Basic Mathemetics -numpy -matplotlib -# Data Analysis -pandas -# Image Processing -pillow -# Web Scraping -requests -beautifulsoup4 -# Testing -pytest -mypy -# Healthy Neovim -pynvim diff --git a/setup/set_symblink_unix.sh b/setup/set_symblink_unix.sh deleted file mode 100644 index b68006a..0000000 --- a/setup/set_symblink_unix.sh +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/sh -mkdir -p $XDG_CONFIG_HOME/conda $XDG_CONFIG_HOME/git $XDG_CONFIG_HOME/ideavim $XDG_CONFIG_HOME/markdownlint $XDG_CONFIG_HOME/pip $XDG_CONFIG_HOME/neovide $XDG_CONFIG_HOME/powershell $XDG_CONFIG_HOME/vscode $XDG_CONFIG_HOME/NuGet $XDG_CONFIG_HOME/vim $XDG_CONFIG_HOME/tmux $XDG_CONFIG_HOME/npm -mkdir -p ~/.config/zellij # Not support XDG_CONFIG_HOME but same directory -mkdir -p $WAKATIME_HOME -mkdir -p $XDG_STATE_HOME/vim/undo $XDG_STATE_HOME/vim/backup $XDG_STATE_HOME/vim/swap $XDG_STATE_HOME/vim/view -# $DOTFILES/.config -ln -sf $DOTFILES/.config/conda/condarc.yaml $XDG_CONFIG_HOME/conda/.condarc -ln -sf $DOTFILES/.config/git/.gitconfig $XDG_CONFIG_HOME/git/config -ln -sf $DOTFILES/.config/ideavim/ideavimrc.vimrc $XDG_CONFIG_HOME/ideavim/ideavimrc -ln -sf $DOTFILES/.config/markdownlint/.markdownlint.json $XDG_CONFIG_HOME/markdownlint/markdownlint.json -ln -sf $DOTFILES/.config/npm/npmrc $NPM_CONFIG_USERCONFIG -ln -sf $DOTFILES/.config/NuGet/NuGet.Config $XDG_CONFIG_HOME/NuGet/NuGet.Config -ln -sf $DOTFILES/.config/nvim/ $XDG_CONFIG_HOME/nvim -ln -sf $DOTFILES/.config/pip/pip.conf $XDG_CONFIG_HOME/pip/pip.conf -ln -sf $DOTFILES/.config/tmux/tmux.conf $XDG_CONFIG_HOME/tmux/tmux.conf -ln -sf $DOTFILES/.config/vim/vimrc $XDG_CONFIG_HOME/vim/vimrc -ln -sf $DOTFILES/.config/zellij/config.kdl ~/.config/zellij/config.kdl -ln -sf $DOTFILES/.config/lesskey $XDG_CONFIG_HOME/lesskey -# $DOTFILES/vscode -ln -sf $DOTFILES/vscode/vscode.vimrc $XDG_CONFIG_HOME/vscode.vimrc -# $DOTFILES root -ln -sf $DOTFILES/.haskeline ~/.haskeline \ No newline at end of file diff --git a/browser/surfingkeys.js b/tools/browser/surfingkeys.js similarity index 100% rename from browser/surfingkeys.js rename to tools/browser/surfingkeys.js diff --git a/.config/fastfetch/win.jsonc b/tools/fastfetch/win.jsonc similarity index 100% rename from .config/fastfetch/win.jsonc rename to tools/fastfetch/win.jsonc diff --git a/tools/ipython/.gitignore b/tools/ipython/.gitignore new file mode 100644 index 0000000..6b49931 --- /dev/null +++ b/tools/ipython/.gitignore @@ -0,0 +1,6 @@ +# IPython config cache +*/db/ +*/log/ +*/pid/ +*/security/ +*/history.sqlite diff --git a/.config/ipython/profile_default/ipython_config.py b/tools/ipython/profile_default/ipython_config.py similarity index 100% rename from .config/ipython/profile_default/ipython_config.py rename to tools/ipython/profile_default/ipython_config.py diff --git a/tools/ipython/profile_default/startup/README b/tools/ipython/profile_default/startup/README new file mode 100644 index 0000000..61d4700 --- /dev/null +++ b/tools/ipython/profile_default/startup/README @@ -0,0 +1,11 @@ +This is the IPython startup directory + +.py and .ipy files in this directory will be run *prior* to any code or files specified +via the exec_lines or exec_files configurables whenever you load this profile. + +Files will be run in lexicographical order, so you can control the execution order of files +with a prefix, e.g.:: + + 00-first.py + 50-middle.py + 99-last.ipy diff --git a/tools/ipython/profile_default/starup/README b/tools/ipython/profile_default/starup/README new file mode 100644 index 0000000..61d4700 --- /dev/null +++ b/tools/ipython/profile_default/starup/README @@ -0,0 +1,11 @@ +This is the IPython startup directory + +.py and .ipy files in this directory will be run *prior* to any code or files specified +via the exec_lines or exec_files configurables whenever you load this profile. + +Files will be run in lexicographical order, so you can control the execution order of files +with a prefix, e.g.:: + + 00-first.py + 50-middle.py + 99-last.ipy diff --git a/.config/ipython/profile_default/starup/keymap.py b/tools/ipython/profile_default/starup/keymap.py similarity index 100% rename from .config/ipython/profile_default/starup/keymap.py rename to tools/ipython/profile_default/starup/keymap.py diff --git a/.config/ipython/profile_default/starup/magic_ps.py b/tools/ipython/profile_default/starup/magic_ps.py similarity index 76% rename from .config/ipython/profile_default/starup/magic_ps.py rename to tools/ipython/profile_default/starup/magic_ps.py index 8800f71..351e003 100644 --- a/.config/ipython/profile_default/starup/magic_ps.py +++ b/tools/ipython/profile_default/starup/magic_ps.py @@ -2,7 +2,7 @@ from IPython.core.magic import register_line_magic @register_line_magic def ps(cmd): - output = get_ipython().getoutput(f"powershell -Command {cmd}") + output = get_ipython().getoutput(f"pwsh -NoProfile -Command {cmd}") # If no variable is assigned to the output, print it if get_ipython().last_execution_result is None: print("\n".join(output)) diff --git a/.config/nvim/.editorconfig b/tools/nvim/.editorconfig similarity index 100% rename from .config/nvim/.editorconfig rename to tools/nvim/.editorconfig diff --git a/.config/nvim/.gitignore b/tools/nvim/.gitignore similarity index 100% rename from .config/nvim/.gitignore rename to tools/nvim/.gitignore diff --git a/.config/nvim/init.lua b/tools/nvim/init.lua similarity index 100% rename from .config/nvim/init.lua rename to tools/nvim/init.lua diff --git a/.config/nvim/lua/config/colorscheme.lua b/tools/nvim/lua/config/colorscheme.lua similarity index 100% rename from .config/nvim/lua/config/colorscheme.lua rename to tools/nvim/lua/config/colorscheme.lua diff --git a/.config/nvim/lua/config/keymaps.lua b/tools/nvim/lua/config/keymaps.lua similarity index 100% rename from .config/nvim/lua/config/keymaps.lua rename to tools/nvim/lua/config/keymaps.lua diff --git a/.config/nvim/lua/config/options.lua b/tools/nvim/lua/config/options.lua similarity index 100% rename from .config/nvim/lua/config/options.lua rename to tools/nvim/lua/config/options.lua diff --git a/.config/nvim/lua/config/plugins.lua b/tools/nvim/lua/config/plugins.lua similarity index 100% rename from .config/nvim/lua/config/plugins.lua rename to tools/nvim/lua/config/plugins.lua diff --git a/.config/nvim/lua/config/servers.lua b/tools/nvim/lua/config/servers.lua similarity index 100% rename from .config/nvim/lua/config/servers.lua rename to tools/nvim/lua/config/servers.lua diff --git a/.config/nvim/lua/keymaps/basic.lua b/tools/nvim/lua/keymaps/basic.lua similarity index 100% rename from .config/nvim/lua/keymaps/basic.lua rename to tools/nvim/lua/keymaps/basic.lua diff --git a/.config/nvim/lua/keymaps/init.lua b/tools/nvim/lua/keymaps/init.lua similarity index 100% rename from .config/nvim/lua/keymaps/init.lua rename to tools/nvim/lua/keymaps/init.lua diff --git a/.config/nvim/lua/keymaps/language.lua b/tools/nvim/lua/keymaps/language.lua similarity index 92% rename from .config/nvim/lua/keymaps/language.lua rename to tools/nvim/lua/keymaps/language.lua index 0f8ad64..29f5d97 100644 --- a/.config/nvim/lua/keymaps/language.lua +++ b/tools/nvim/lua/keymaps/language.lua @@ -22,6 +22,8 @@ vim.api.nvim_create_autocmd("FileType", { pattern = "markdown", callback = function() set_markdown_keymaps(0) + vim.opt_local.shiftwidth = 2 + vim.opt_local.tabstop = 2 end, }) diff --git a/.config/nvim/lua/keymaps/leaders.lua b/tools/nvim/lua/keymaps/leaders.lua similarity index 100% rename from .config/nvim/lua/keymaps/leaders.lua rename to tools/nvim/lua/keymaps/leaders.lua diff --git a/.config/nvim/lua/keymaps/nvim-tree.lua b/tools/nvim/lua/keymaps/nvim-tree.lua similarity index 100% rename from .config/nvim/lua/keymaps/nvim-tree.lua rename to tools/nvim/lua/keymaps/nvim-tree.lua diff --git a/.config/nvim/lua/plugins/appearance.lua b/tools/nvim/lua/plugins/appearance.lua similarity index 100% rename from .config/nvim/lua/plugins/appearance.lua rename to tools/nvim/lua/plugins/appearance.lua diff --git a/.config/nvim/lua/plugins/completion.lua b/tools/nvim/lua/plugins/completion.lua similarity index 100% rename from .config/nvim/lua/plugins/completion.lua rename to tools/nvim/lua/plugins/completion.lua diff --git a/.config/nvim/lua/plugins/fileutils.lua b/tools/nvim/lua/plugins/fileutils.lua similarity index 100% rename from .config/nvim/lua/plugins/fileutils.lua rename to tools/nvim/lua/plugins/fileutils.lua diff --git a/.config/nvim/lua/plugins/init.lua b/tools/nvim/lua/plugins/init.lua similarity index 100% rename from .config/nvim/lua/plugins/init.lua rename to tools/nvim/lua/plugins/init.lua diff --git a/.config/nvim/lua/plugins/lsp.lua b/tools/nvim/lua/plugins/lsp.lua similarity index 59% rename from .config/nvim/lua/plugins/lsp.lua rename to tools/nvim/lua/plugins/lsp.lua index 2a35089..514a3c4 100644 --- a/.config/nvim/lua/plugins/lsp.lua +++ b/tools/nvim/lua/plugins/lsp.lua @@ -1,6 +1,17 @@ return { { import = "plugins.mod.lspconfig" }, + { "MeanderingProgrammer/render-markdown.nvim" }, + -- { + -- "OXY2DEV/markview.nvim", + -- lazy = false, -- Recommended + -- -- ft = "markdown" -- If you decide to lazy-load anyway + -- + -- dependencies = { + -- "nvim-treesitter/nvim-treesitter", + -- "nvim-tree/nvim-web-devicons" + -- } + -- }, { "williamboman/mason.nvim", config = true }, { "williamboman/mason-lspconfig.nvim", diff --git a/.config/nvim/lua/plugins/misc.lua b/tools/nvim/lua/plugins/misc.lua similarity index 100% rename from .config/nvim/lua/plugins/misc.lua rename to tools/nvim/lua/plugins/misc.lua diff --git a/.config/nvim/lua/plugins/mod/alpha-nvim.lua b/tools/nvim/lua/plugins/mod/alpha-nvim.lua similarity index 100% rename from .config/nvim/lua/plugins/mod/alpha-nvim.lua rename to tools/nvim/lua/plugins/mod/alpha-nvim.lua diff --git a/.config/nvim/lua/plugins/mod/auto-session.lua b/tools/nvim/lua/plugins/mod/auto-session.lua similarity index 100% rename from .config/nvim/lua/plugins/mod/auto-session.lua rename to tools/nvim/lua/plugins/mod/auto-session.lua diff --git a/.config/nvim/lua/plugins/mod/bufferline.lua b/tools/nvim/lua/plugins/mod/bufferline.lua similarity index 100% rename from .config/nvim/lua/plugins/mod/bufferline.lua rename to tools/nvim/lua/plugins/mod/bufferline.lua diff --git a/.config/nvim/lua/plugins/mod/lspconfig.lua b/tools/nvim/lua/plugins/mod/lspconfig.lua similarity index 100% rename from .config/nvim/lua/plugins/mod/lspconfig.lua rename to tools/nvim/lua/plugins/mod/lspconfig.lua diff --git a/.config/nvim/lua/plugins/mod/lualine.lua b/tools/nvim/lua/plugins/mod/lualine.lua similarity index 100% rename from .config/nvim/lua/plugins/mod/lualine.lua rename to tools/nvim/lua/plugins/mod/lualine.lua diff --git a/.config/nvim/lua/plugins/mod/nvim-cmp.lua b/tools/nvim/lua/plugins/mod/nvim-cmp.lua similarity index 100% rename from .config/nvim/lua/plugins/mod/nvim-cmp.lua rename to tools/nvim/lua/plugins/mod/nvim-cmp.lua diff --git a/.config/nvim/lua/plugins/mod/nvim-tree.lua b/tools/nvim/lua/plugins/mod/nvim-tree.lua similarity index 100% rename from .config/nvim/lua/plugins/mod/nvim-tree.lua rename to tools/nvim/lua/plugins/mod/nvim-tree.lua diff --git a/.config/nvim/lua/plugins/mod/nvim-treesitter.lua b/tools/nvim/lua/plugins/mod/nvim-treesitter.lua similarity index 100% rename from .config/nvim/lua/plugins/mod/nvim-treesitter.lua rename to tools/nvim/lua/plugins/mod/nvim-treesitter.lua diff --git a/.config/nvim/lua/plugins/mod/obsidian-nvim.lua b/tools/nvim/lua/plugins/mod/obsidian-nvim.lua similarity index 93% rename from .config/nvim/lua/plugins/mod/obsidian-nvim.lua rename to tools/nvim/lua/plugins/mod/obsidian-nvim.lua index 528036e..48ed3a7 100644 --- a/.config/nvim/lua/plugins/mod/obsidian-nvim.lua +++ b/tools/nvim/lua/plugins/mod/obsidian-nvim.lua @@ -1,7 +1,7 @@ return { "epwalsh/obsidian.nvim", version = "*", -- recommended, use latest release instead of latest commit - lazy = true, + lazy = false, ft = "markdown", -- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault: -- event = { @@ -21,7 +21,7 @@ return { workspaces = { { name = "personal", - path = "/mnt/c/Users/citoy/Obsidian", + path = "~/Obsidian", }, }, completion = { diff --git a/.config/nvim/lua/plugins/mod/projects.lua b/tools/nvim/lua/plugins/mod/projects.lua similarity index 100% rename from .config/nvim/lua/plugins/mod/projects.lua rename to tools/nvim/lua/plugins/mod/projects.lua diff --git a/.config/nvim/lua/plugins/mod/winbar-nvim.lua b/tools/nvim/lua/plugins/mod/winbar-nvim.lua similarity index 100% rename from .config/nvim/lua/plugins/mod/winbar-nvim.lua rename to tools/nvim/lua/plugins/mod/winbar-nvim.lua diff --git a/.config/nvim/lua/plugins/syntax.lua b/tools/nvim/lua/plugins/syntax.lua similarity index 100% rename from .config/nvim/lua/plugins/syntax.lua rename to tools/nvim/lua/plugins/syntax.lua diff --git a/.config/nvim/stylua.toml b/tools/nvim/stylua.toml similarity index 100% rename from .config/nvim/stylua.toml rename to tools/nvim/stylua.toml diff --git a/tools/powershell/Aliases.ps1 b/tools/powershell/Aliases.ps1 new file mode 100644 index 0000000..b835dc0 --- /dev/null +++ b/tools/powershell/Aliases.ps1 @@ -0,0 +1,31 @@ +# $DOTFILES/tools\powershell\Aliases.ps1 +# Date: 2024-12-01 +# Author: contact@js0ny.net +# Aliases for PowerShell +### VARIABLES ### +$EDITOR = "code" +# Shell Equivalents # +Set-Alias "touch" "New-Item" +${function:l} = { Get-ChildItem -Force } +${function:tree} = { lsd.exe --tree $args } +Set-Alias "which" "Get-Command" + +# Shell Configurations # +${function:pulldots} = { Set-Location -Path $DOTFILES && git pull } + +# Editors # +Set-Alias "v" "nvim" +Set-Alias "c" "code" +Set-Alias "gvi" "neovide" + +# File Creation # +function mkcd { param ( [string] $dirname) New-Item -ItemType Directory -Name $dirname && Set-Location $dirname } +function tc { param ( [string] $filename) New-Item $filename && code $filename } +function tv { param ( [string] $filename) New-Item $filename && nvim $filename } +function cdls { param( [string] $dirname) Set-Location $dirname && Get-ChildItem } + +### Dev ### + +# Python & Conda # +Set-Alias "py" "python" +Set-Alias "ipy" "ipython" diff --git a/powershell/Config.ps1 b/tools/powershell/Config.ps1 similarity index 91% rename from powershell/Config.ps1 rename to tools/powershell/Config.ps1 index b095745..e7cb656 100644 --- a/powershell/Config.ps1 +++ b/tools/powershell/Config.ps1 @@ -4,4 +4,4 @@ ${function:wget} = {wget --hsts-file $XDG_CACHE_HOME/wget-hsts $args} # yarn v1 -${function:yarn} = {yarn --use-yarnrc $XDG_CONFIG_HOME/yarn/config.yaml $args} \ No newline at end of file +${function:yarn} = {yarn --use-yarnrc $XDG_CONFIG_HOME/yarn/config.yaml $args} diff --git a/tools/powershell/Environment.ps1 b/tools/powershell/Environment.ps1 new file mode 100644 index 0000000..cf43c80 --- /dev/null +++ b/tools/powershell/Environment.ps1 @@ -0,0 +1,10 @@ +# $DOTFILES/tools\powershell\Environment.ps1 +# Date: 2024-12-01 +# Author: contact@js0ny.net +# Sourced by Microsoft.PowerShell_profile.ps1 + + +# This file stores only environment variables that only called by +# interactive session. + +$env:IPYTHONDIR = "$env:AppData\ipython" diff --git a/powershell/Keymap.ps1 b/tools/powershell/Keymap.ps1 similarity index 96% rename from powershell/Keymap.ps1 rename to tools/powershell/Keymap.ps1 index 657fa37..ca110f3 100644 --- a/powershell/Keymap.ps1 +++ b/tools/powershell/Keymap.ps1 @@ -6,7 +6,7 @@ Set-PSReadLineOption -PredictionSource HistoryAndPlugin # Set-PSReadLineOption -ContinuationPrompt "`e[36m CR > " # Use Starship instead # PSReadLineKeyHandlers ## Colemak hnei -Set-PSReadLineKeyHandler -Chord "n" -Function NextHistory -ViMode Command +Set-PSReadLineKeyHandler -Chord "n" -Function NextHistory -ViMode Command Set-PSReadLineKeyHandler -Chord "e" -Function PreviousHistory -ViMode Command Set-PSReadLineKeyHandler -Chord "i" -Function ViForwardChar -ViMode Command ## Similar position to [i] in QWERTY diff --git a/powershell/Modules.ps1 b/tools/powershell/Modules.ps1 similarity index 97% rename from powershell/Modules.ps1 rename to tools/powershell/Modules.ps1 index a0825a6..0137d59 100644 --- a/powershell/Modules.ps1 +++ b/tools/powershell/Modules.ps1 @@ -6,4 +6,4 @@ if ($IsWindows) { if (Test-Path($ChocolateyProfile)) { Import-Module "$ChocolateyProfile" } # WinGet Import-Module -Name Microsoft.WinGet.CommandNotFound #f45873b3-b655-43a6-b217-97c00aa0db58 -} \ No newline at end of file +} diff --git a/tools/powershell/Navigation.ps1 b/tools/powershell/Navigation.ps1 new file mode 100644 index 0000000..c5ad86e --- /dev/null +++ b/tools/powershell/Navigation.ps1 @@ -0,0 +1,14 @@ +# ${function:~} = { Set-Location -Path ~ } cd is better +${function:...} = { Set-Location -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) } +${function:....} = { Set-Location -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) } +${function:.....} = { Set-Location -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) -ChildPath ..) } +${function:......} = { Set-Location -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) -ChildPath ..) -ChildPath ..) } + +# Absolute navigation +${function:docs} = { Set-Location -Path (Join-Path -Path $HOME -ChildPath "Documents") } +${function:down} = { Set-Location -Path (Join-Path -Path $HOME -ChildPath "Downloads") } +${function:dt} = { Set-Location -Path (Join-Path -Path $HOME -ChildPath "Desktop") } +${function:one} = { Set-Location -Path (Join-Path -Path $HOME -ChildPath "OneDrive") } + + +Invoke-Expression (& { (zoxide init powershell | Out-String) }) diff --git a/powershell/Prompt.ps1 b/tools/powershell/Prompt.ps1 similarity index 89% rename from powershell/Prompt.ps1 rename to tools/powershell/Prompt.ps1 index 40806a3..e34817b 100644 --- a/powershell/Prompt.ps1 +++ b/tools/powershell/Prompt.ps1 @@ -1,7 +1,10 @@ +# $DOTFILES/tools\powershell\Prompt.ps1 +# Date: 2024-12-01 +# Author: contact@js0ny.net # Use starship to set prompt -$ENV:STARSHIP_CONFIG = "$DOTFILES/.config/starship/starship_pwsh.toml" +$ENV:STARSHIP_CONFIG = Join-Path $DOTFILES "tools" "starship" "starship_pwsh.toml" -Invoke-Expression (&starship init powershell) +# Invoke-Expression (&starship init powershell) # Below is the backup of original prompt function # $promptTime = $true @@ -16,7 +19,7 @@ Invoke-Expression (&starship init powershell) # } # # UserInfo # $prompt += " $Env:Username @ $Env:Userdomain" -# # Directory +# # Directory # $promptCurrentDirectory = $(PWD).Path # $promptCurrentDirectory = $promptCurrentDirectory.Replace("$HOME", "~") # $prompt += "`e[0m in `e[33m$promptCurrentDirectory " @@ -81,7 +84,7 @@ Invoke-Expression (&starship init powershell) # # if ( $global:promptWeather ) { # # $prompt += $(Write-WeatherCurrent -City "Edinburgh" -Country "UK" -Unit "metric" -Inline -Apikey $Env:WEATHER_API_KEY) # # } -# # Error on last command +# # Error on last command # ## TODO: Seems does not work # if ($?) { # $prompt += "`n`e[32m PS > `e[0m" @@ -89,4 +92,4 @@ Invoke-Expression (&starship init powershell) # $prompt += "`n`e[31m PS > `e[0m" # } # return $prompt -# } \ No newline at end of file +# } diff --git a/powershell/readme.md b/tools/powershell/readme.md similarity index 50% rename from powershell/readme.md rename to tools/powershell/readme.md index 2b31694..7cd9a86 100644 --- a/powershell/readme.md +++ b/tools/powershell/readme.md @@ -4,9 +4,9 @@ This is the cross-platform PowerShell profile for PowerShell Core ```text . -โ”œโ”€โ”€ Aliases.ps1 +โ”œโ”€โ”€ Aliases.ps1 โ”œโ”€โ”€ Keymap.ps1 # keymaps, optimize for Vi-Mode and Colemak -โ”œโ”€โ”€ Modules.ps1 +โ”œโ”€โ”€ Modules.ps1 โ”œโ”€โ”€ Navigation.ps1 โ”œโ”€โ”€ Prompt.ps1 โ”œโ”€โ”€ readme.md @@ -15,9 +15,8 @@ This is the cross-platform PowerShell profile for PowerShell Core 1 directory, 7 files ``` -| Keymap | Action | Mode | -| --- | --- | --- | -| `^a` | To Beginning of Line | All | -| `^e` | To End of Line | All | -| `^[` | To Normal Mode | Insert | - +| Keymap | Action | Mode | +| ------ | -------------------- | ------ | +| `^a` | To Beginning of Line | All | +| `^e` | To End of Line | All | +| `^[` | To Normal Mode | Insert | diff --git a/.config/starship/starship.toml b/tools/starship/starship.toml similarity index 100% rename from .config/starship/starship.toml rename to tools/starship/starship.toml diff --git a/.config/starship/starship_nu.toml b/tools/starship/starship_nu.toml similarity index 100% rename from .config/starship/starship_nu.toml rename to tools/starship/starship_nu.toml diff --git a/.config/starship/starship_pwsh.toml b/tools/starship/starship_pwsh.toml similarity index 100% rename from .config/starship/starship_pwsh.toml rename to tools/starship/starship_pwsh.toml diff --git a/.config/starship/starship_zsh.toml b/tools/starship/starship_zsh.toml similarity index 100% rename from .config/starship/starship_zsh.toml rename to tools/starship/starship_zsh.toml diff --git a/vscode/hsnips/latex.hsnips b/tools/vscode/hsnips/latex.hsnips similarity index 100% rename from vscode/hsnips/latex.hsnips rename to tools/vscode/hsnips/latex.hsnips diff --git a/vscode/hsnips/markdown.hsnips b/tools/vscode/hsnips/markdown.hsnips similarity index 100% rename from vscode/hsnips/markdown.hsnips rename to tools/vscode/hsnips/markdown.hsnips diff --git a/vscode/hsnips/typst.hsnips b/tools/vscode/hsnips/typst.hsnips similarity index 100% rename from vscode/hsnips/typst.hsnips rename to tools/vscode/hsnips/typst.hsnips diff --git a/tools/vscode/keybindings.json b/tools/vscode/keybindings.json new file mode 100644 index 0000000..de4390b --- /dev/null +++ b/tools/vscode/keybindings.json @@ -0,0 +1,485 @@ +// Place your key bindings in this file to override the defaultsauto[] +[ + // #region quickOpen (Telescope) + { // Telescope emulator + "key": "space space", + "command": "workbench.action.quickOpen", + "when": "!editorFocus && !inputFocus" + }, + { + "key": "ctrl+p", + "command": "workbench.action.quickOpen" + }, + { + "key": "ctrl+e", + "command": "workbench.action.quickOpenNavigatePrevious", + "when": "inQuickOpen" + }, + { + "key": "ctrl+n", + "command": "workbench.action.quickOpenNavigateNext", + "when": "inQuickOpen" + }, + { + "key": "ctrl+[", + "command": "workbench.action.closeQuickOpen", + "when": "inQuickOpen" + }, + // #endregion + // #region plugin: code runner + { + "key": "ctrl+alt+n", + "command": "-code-runner.run" + }, + // #endregion + { + "key": "ctrl+oem_1", // ctrl+; + "command": "extension.insertSemicolon", + "when": "editorTextFocus" + }, + { // change to toggle comment + "key": "ctrl+oem_2", // ctrl+/; + "command": "-extension.insertSemicolon", + "when": "editorTextFocus" + }, + { + "key": "ctrl+shift+oem_1", + "command": "extension.insertSemicolonWithNewLine", + "when": "editorTextFocus" + }, + { + "key": "ctrl+shift+oem_2", + "command": "-extension.insertSemicolonWithNewLine", + "when": "editorTextFocus" + }, + { + "key": "ctrl+shift+oem_2", + "command": "github.copilot.acceptCursorPanelSolution", + "when": "github.copilot.activated && github.copilot.panelVisible" + }, + { + "key": "ctrl+oem_2", + "command": "-github.copilot.acceptCursorPanelSolution", + "when": "github.copilot.activated && github.copilot.panelVisible" + }, + { + "key": "f9", + "command": "csdevkit.debug.noDebugFileLaunch" + }, + { + "key": "ctrl+h", + "command": "-editor.action.startFindReplaceAction", + "when": "editorFocus || editorIsOpen" + }, + { + "key": "ctrl+h", + "command": "-extension.vim_ctrl+h", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" + }, + { + "key": "ctrl+r", + "command": "-workbench.action.reloadWindow", + "when": "isDevelopment" + }, + { + "key": "ctrl+alt+r", + "command": "-workbench.action.terminal.runRecentCommand", + "when": "terminalFocus && terminalHasBeenCreated && !accessibilityModeEnabled || terminalFocus && terminalProcessSupported && !accessibilityModeEnabled" + }, + { + "key": "ctrl+r", + "command": "-workbench.action.terminal.runRecentCommand", + "when": "accessibilityModeEnabled && terminalFocus && terminalHasBeenCreated || accessibilityModeEnabled && terminalFocus && terminalProcessSupported || accessibilityModeEnabled && accessibleViewIsShown && terminalHasBeenCreated && accessibleViewCurrentProviderId == 'terminal' || accessibilityModeEnabled && accessibleViewIsShown && terminalProcessSupported && accessibleViewCurrentProviderId == 'terminal'" + }, + { + "key": "ctrl+shift+r", + "command": "-rerunSearchEditorSearch", + "when": "inSearchEditor" + }, + { + "key": "ctrl+shift+r", + "command": "-editor.action.refactor", + "when": "editorHasCodeActionsProvider && textInputFocus && !editorReadonly" + }, + { + "key": "ctrl+shift+r", + "command": "-workbench.action.quickOpenNavigatePreviousInRecentFilesPicker", + "when": "inQuickOpen && inRecentFilesPicker" + }, + { + "key": "ctrl+e", + "command": "cursorEnd", + "when": "textInputFocus" + }, + // #region Nvim-Tree like File Explorer + // n, e : move cursor up/down + // h : move cursor to parent folder + // l : open file or folder + { // z: Close all folders + "key": "z", + "command": "workbench.files.action.collapseExplorerFolders", + "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { // e: Close left sidebar if is in file explorer + "key": "space e", + "command": "workbench.action.toggleSidebarVisibility", + "when": "sideBarFocus && !inputFocus && !searchViewletVisible && filesExplorerFocus" + }, + { // e: Focus on file explorer if is on sidebar and not in file explorer + "key": "space e", + "command": "workbench.files.action.focusFilesExplorer", + "when": "sideBarFocus && !inputFocus && !searchViewletVisible && !filesExplorerFocus" + }, + { // g: Focus on file explorer if is on sidebar and not in file explorer + "key": "space g", + "command": "workbench.scm.focus", + "when": "sideBarFocus && !inputFocus && !searchViewletVisible && !scmViewletVisible" + }, + { // a: add + "key": "a", + "command": "explorer.newFile", + "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { // p: paste + "key": "p", + "command": "filesExplorer.paste", + "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { // x: cut + "key": "x", + "command": "filesExplorer.cut", + "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { // d: delete + "key": "d", + "command": "deleteFile", + "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { // r: rename + "key": "r", + "command": "renameFile", + "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { // s: open in vertical split / to side + "key": "s", + "command": "explorer.openToSide", + "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { // A: add folder + "key": "shift+a", + "command": "explorer.newFolder", + "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { // C: Copy path + "key": "shift+c", + "command": "copyFilePath", + "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { // E: Open in File Explorer + "key": "shift+e", + "command": "revealFileInOS", + "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { // E: Open in File Explorer (WSL) + "key": "shift+e", + "command": "remote-wsl.revealInExplorer", + "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus && remoteName == 'wsl'" + }, + { // O: Open with System App + "key": "shift+o", + "command": "openInExternalApp.open", + "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { // Y: Copy Relative Path + "key": "shift+y", + "command": "copyRelativeFilePath", + "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { // R: Copy Relative Path + "key": "shift+r", + "command": "workbench.files.action.refreshFilesExplorer", + "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { // T: Open in terminal + "key": "shift+t", + "command": "openInIntegratedTerminal", + "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + // #endregion + { + "key": "ctrl+p", + "command": "workbench.action.files.openFileFolder", + "when": "isMacNative && openFolderWorkspaceSupport" + }, + { + "key": "ctrl+o", + "command": "-workbench.action.files.openFileFolder", + "when": "isMacNative && openFolderWorkspaceSupport" + }, + { + "key": "ctrl+p", + "command": "-extension.vim_ctrl+p", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl || vim.active && vim.use && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use && !inDebugRepl && vim.mode == 'SearchInProgressMode'" + }, + { + "key": "ctrl+o", + "command": "-workbench.action.files.openFolderViaWorkspace", + "when": "!openFolderWorkspaceSupport && workbenchState == 'workspace'" + }, + // #region Vim-like Hover Browsing + { + "key": "h", + "command": "editor.action.scrollLeftHover", + "when": "editorHoverFocused" + }, + { + "key": "n", + "command": "editor.action.scrollDownHover", + "when": "editorHoverFocused" + }, + { + "key": "e", + "command": "editor.action.scrollUpHover", + "when": "editorHoverFocused" + }, + { + "key": "i", + "command": "editor.action.scrollRightHover", + "when": "editorHoverFocused" + }, + // #endregion + // #region Vim-like Jupyter Navigation + { + "key": "n", + "command": "notebook.focusNextEditor", + "when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'none' && notebookEditorCursorAtBoundary != 'top'" + }, + { + "key": "j", + "command": "-notebook.focusNextEditor", + "when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'none' && notebookEditorCursorAtBoundary != 'top'" + }, + { + "key": "e", + "command": "notebook.focusPreviousEditor", + "when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'bottom' && notebookEditorCursorAtBoundary != 'none'" + }, + { + "key": "k", + "command": "-notebook.focusPreviousEditor", + "when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'bottom' && notebookEditorCursorAtBoundary != 'none'" + }, + // #endregion + { + "key": "e", + "command": "list.focusUp", + "when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused" + }, + { + "key": "k", + "command": "-list.focusUp", + "when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused" + }, + { + "key": "e", + "command": "list.focusUp", + "when": "listFocus && !inputFocus" + }, + { + "key": "k", + "command": "-list.focusUp", + "when": "listFocus && !inputFocus" + }, + { + "key": "f", + "command": "filesExplorer.findInWorkspace", + "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { + "key": "n", + "command": "list.focusDown", + "when": "listFocus && !inputFocus" + }, + { + "key": "j", + "command": "-list.focusDown", + "when": "listFocus && !inputFocus" + }, + { + "key": "i", + "command": "list.select", + "when": "listFocus && !inputFocus" + }, + { + "key": "l", + "command": "-list.select", + "when": "listFocus && !inputFocus" + }, + { + "key": "ctrl+shift+g c", + "command": "-gitlens.showQuickCommitFileDetails", + "when": "editorTextFocus && !gitlens:disabled && config.gitlens.keymap == 'chorded'" + }, + { + "key": "ctrl+shift+g s", + "command": "git.stageAll" + }, + { + "key": "ctrl+shift+g g", + "command": "workbench.view.scm", + "when": "workbench.scm.active" + }, + { + "key": "ctrl+shift+g", + "command": "-workbench.view.scm", + "when": "workbench.scm.active" + }, + { + "key": "ctrl+k ctrl+shift+b", + "command": "editor.action.goToSelectionAnchor" + }, + { + "key": "ctrl+k ctrl+shift+i", + "command": "workbench.action.selectProductIconTheme" + }, + { + "key": "ctrl+l p", + "command": "-extension.openPrGitProvider" + }, + { + "key": "ctrl+l g", + "command": "-extension.openInGitHub" + }, + { + "key": "ctrl+l c", + "command": "-extension.copyGitHubLinkToClipboard" + }, + // #region Use ^n ^e to navigate completions + { + "key": "ctrl+n", + "command": "workbench.action.files.newUntitledFile", + "when": "!suggestWidgetVisible && !inQuickOpen" + }, + { + "key": "ctrl+n", + "command": "-workbench.action.files.newUntitledFile" + }, + { + "key": "ctrl+n", + "command": "selectNextSuggestion", + "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion" + }, + { + "key": "ctrl+e", + "command": "selectPrevSuggestion", + "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion" + }, + // #endregion + // #region Terminal Control, use ^a as prefix / leader key + // tmux-like terminal control + { // prefix + x : kill terminal + "key": "ctrl+a x", + "command": "workbench.action.terminal.kill", + "when": "terminalFocus" + }, + { // prefix + c : create new terminal + "key": "ctrl+a c", + "command": "workbench.action.terminal.new", + "when": "terminalFocus" + }, + { // prefix + | : split terminal vertically + "key": "ctrl+a shift+\\", + "command": "workbench.action.terminal.split", + "when": "terminalFocus" + }, + { // prefix + \ : split terminal vertically + "key": "ctrl+a \\", + "command": "workbench.action.terminal.split", + "when": "terminalFocus" + }, + { // prefix + / : search + "key": "ctrl+a /", + "command": "workbench.action.terminal.focusFind", + "when": "terminalFocus" + }, + { // prefix + t : toggle terminal + "key": "ctrl+a t", + "command": "workbench.action.terminal.toggleTerminal", + "when": "terminalFocus" + }, + { // prefix + ^a: show information + "key": "ctrl+a ctrl+a", + "command": "workbench.action.terminal.focusHover", + "when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus" + }, + { + "key": "ctrl+k ctrl+i", + "command": "-workbench.action.terminal.focusHover", + "when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus" + }, + { // prefix + 1 : focus terminal 1 + "key": "ctrl+a 1", + "command": "workbench.action.terminal.focusAtIndex1", + "when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus" + }, + { // prefix + 2 : focus terminal 2 + "key": "ctrl+a 2", + "command": "workbench.action.terminal.focusAtIndex2", + "when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus" + }, + { // prefix + 3 : focus terminal 3 + "key": "ctrl+a 3", + "command": "workbench.action.terminal.focusAtIndex3", + "when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus" + }, + { // prefix + g : Go to recent directory + "key": "ctrl+a g", + "command": "workbench.action.terminal.goToRecentDirectory", + "when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported" + }, + { + "key": "ctrl+g", + "command": "-workbench.action.terminal.goToRecentDirectory", + "when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported" + }, + { // prefix + d : detach terminal + "key": "ctrl+a d", + "command": "workbench.action.terminal.detachSession", + "when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported" + }, + { // prefix + a : attach to session + "key": "ctrl+a a", + "command": "workbench.action.terminal.attachToSession", + "when": "terminalFocus" + }, + { + "key": "ctrl+a h", + "command": "workbench.action.terminal.focusPreviousPane", + "when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported" + }, + { + "key": "ctrl+a i", + "command": "workbench.action.terminal.focusNextPane", + "when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported" + }, + { + "key": "ctrl+a shift+H", + "command": "workbench.action.terminal.resizePaneLeft", + "when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported" + }, + { + "key": "ctrl+a shift+N", + "command": "workbench.action.terminal.resizePaneDown", + "when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported" + }, + { + "key": "ctrl+a shift+E", + "command": "workbench.action.terminal.resizePaneUp", + "when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported" + }, + { + "key": "ctrl+a shift+I", + "command": "workbench.action.terminal.resizePaneRight", + "when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported" + } +] \ No newline at end of file diff --git a/vscode/vscode.vimrc b/tools/vscode/vscode.vimrc similarity index 100% rename from vscode/vscode.vimrc rename to tools/vscode/vscode.vimrc diff --git a/.config/yazi/config/keymap.toml b/tools/yazi/config/keymap.toml similarity index 100% rename from .config/yazi/config/keymap.toml rename to tools/yazi/config/keymap.toml diff --git a/.config/yazi/config/yazi.toml b/tools/yazi/config/yazi.toml similarity index 100% rename from .config/yazi/config/yazi.toml rename to tools/yazi/config/yazi.toml diff --git a/tools/zsh/common.zshrc b/tools/zsh/common.zshrc new file mode 100644 index 0000000..d5ee087 --- /dev/null +++ b/tools/zsh/common.zshrc @@ -0,0 +1,34 @@ +# $DOTFILES/tools/zsh/common.zshrc +# Date: 2024-11-30 +# Author: contact@js0ny.net +# This is the entry point for all zsh configuration files +# ่ฟ™ๆ˜ฏๆ‰€ๆœ‰zsh้…็ฝฎๆ–‡ไปถ็š„ๅ…ฅๅฃ็‚น + +# Location: $ZDOTDIR/.zshrc (default: $HOME/.zshrc) +# Linking: +# ln -sf $DOTFILES/tools/zsh/common.zshrc $ZDOTDIR/.zshrc + +export DOTFILES=$HOME/.dotfiles + +case "$(uname)" in + Linux) + if grep -q Microsoft /proc/version || [[ -n "$WSL_DISTRO_NAME" ]]; then + # WSL-specific configuration + source "$DOTFILES/platforms/wsl/zshrc" + else + # Native Linux configuration + source "$DOTFILES/platforms/linux/zshrc" + fi + ;; + Darwin) + # macOS-specific configuration + source "$DOTFILES/platforms/mac/zshrc" + ;; +# CYGWIN*|MINGW*|MSYS*) +# source "$DOTFILES/platform/wsl.zsh" +# ;; +esac + +for file in $DOTFILES/tools/zsh/mod/*.zsh; do + source $file +done diff --git a/tools/zsh/global.zshenv b/tools/zsh/global.zshenv new file mode 100644 index 0000000..a9c1a49 --- /dev/null +++ b/tools/zsh/global.zshenv @@ -0,0 +1,23 @@ +# $DOTFILES/tools/zsh/global.zshenv +# Date: 2024-11-30 +# Author: contact@js0ny.net +# $DOTFILES/tools/zsh/global.zshenv +# system-wide zshenv file ็ณป็ปŸ็บงๅˆซ็š„ zshenv ๆ–‡ไปถ๏ผŒ็”จไบŽ่ฎพ็ฝฎๅ…จๅฑ€็Žฏๅขƒๅ˜้‡ + +# Location: +# /etc/zshenv: (macOS and some distro) +# /etc/zsh/zshenv: (some distro) +# Linking: +# sudo cp $DOTFILES/tools/zsh/global.zshenv /etc/zshenv # or /etc/zsh/zshenv + +# Set ZDOTDIR to $HOME/.config/zsh if it exists +# This allows us to keep our zsh configuration in $HOME/.config/zsh +# and zshenv will be located at $HOME/.config/zsh/.zshenv instead of +# $HOME/.zshenv +# ๅฆ‚ๆžœๅญ˜ๅœจ $HOME/.config/zsh ็›ฎๅฝ•๏ผŒๅˆ™ๅฐ† ZDOTDIR ่ฎพ็ฝฎไธบ $HOME/.config/zsh +# ้˜ฒๆญข .zshenv ๆ–‡ไปถ่‡ชๅŠจ็”Ÿๆˆๅœจ็”จๆˆท็›ฎๅฝ•ไธ‹ + +# Ensure SPACE between [ and -d and ] +if [ -d $HOME/.config/zsh ]; then + export ZDOTDIR=$HOME/.config/zsh +fi diff --git a/tools/zsh/mod/alias.zsh b/tools/zsh/mod/alias.zsh new file mode 100644 index 0000000..f9c51cd --- /dev/null +++ b/tools/zsh/mod/alias.zsh @@ -0,0 +1,91 @@ +# $DOTFILES/tools/zsh/mod/alias.zsh +# Date: 2024-11-30 +# Author: contact@js0ny.net +# Sourced by user's zshrc ๅœจ็”จๆˆท็š„ zshrc ไธญ่ขซๅผ•็”จ + +# PowerShell Equivalent, for cross-platform compatibility +alias ni=touch +alias cls=clear +alias ii=open + +# Dev # +alias gpp='g++ -std=c++2b' # Set the default C++ standard to C++20 +alias gcc='gcc -std=c99' # Set the default C standard to C99 +alias cl='clang -std=c99' +alias clpp='clang++ -std=c++2b' +alias python=python3 # Set the default Python version to Python 3 +alias py=python # Alias for Python +alias pip=pip3 # Alias for pip +# alias bashcfg="nvim ~/.bashrc" +alias zshcfg="nvim $ZDOTDIR/.zshrc" +alias shcfg=zshcfg +alias reload="source $ZDOTDIR/.zshrc" +alias nvimrc="nvim $XDG_CONFIG_HOME/nvim/" +alias pulldots="cd $DOTFILES && git pull" + +# Editors # +alias v=nvim +alias c=code +alias sv="sudo vim" +alias sn="sudo nvim" + +# lsd - modern ls +if command -v lsd > /dev/null; then + alias ls='lsd -A -I .DS_Store -I .git' + alias l='lsd -lah' + alias ll='lsd -l' + alias tree='lsd --tree -I .DS_Store -I .git' +fi + +# Functions # +mkcd() { + mkdir -p $1 && cd $1 +} +cdls(){ + cd $1 && ls +} +tc(){ + touch $1 && code $1 +} +tv(){ + touch $1 && nvim $1 +} + +# Use neovide as gVim +gvi() { + local target=$1 + + if command -v neovide.exe > /dev/null; then + neovide.exe "$target" + else + if command -v neovide > /dev/null; then + neovide "$target" + else + echo "neovide is not installed" + fi + fi +} + + +alias update="source $DOTFILES/scripts/update.zsh" + +if command -v pacman > /dev/null; then + alias pac="sudo pacman" + alias paci="sudo pacman -S" + alias pacr="sudo pacman -R" + alias pacu="sudo pacman -Syu" +fi + +if command -v apt > /dev/null; then + alias apt="sudo apt" + alias apti="sudo apt install" + alias aptu="sudo apt update && sudo apt upgrade" + alias aptr="sudo apt autoremove && sudo apt remove" +fi + +if command -v brew > /dev/null; then + alias brewi="brew install" + alias brewu="brew update && brew upgrade" + alias brewc="brew cleanup" + alias brewr="brew uninstall" +fi diff --git a/tools/zsh/mod/config.zsh b/tools/zsh/mod/config.zsh new file mode 100644 index 0000000..f8cd08b --- /dev/null +++ b/tools/zsh/mod/config.zsh @@ -0,0 +1,42 @@ +# $DOTFILES/tools/zsh/mod/config.zsh +# Date: 2024-11-30 +# Author: contact@js0ny.net +# Sourced by user's zshrc ๅœจ็”จๆˆท็š„ zshrc ไธญ่ขซๅผ•็”จ + +# ZSH Config, no need to `export` these variables +HISTFILE="$XDG_STATE_HOME"/zsh/history +HIST_STAMPS="yyyy-mm-dd" +HISTSIZE=10000 +SAVEHIST=10000 + + +# Manually manage plugins ๆ‰‹ๅŠจ็ฎก็†ๆ’ไปถ +# Load zsh-syntax-highlighting before zsh-history-substring-search +# Reference: https://github.com/zsh-users/zsh-history-substring-search?tab=readme-ov-file#usage +plugins=( + "zsh-autosuggestions" + "zsh-syntax-highlighting" + "zsh-history-substring-search" +) + +plugin_dir="$ZDOTDIR/plugins" + +for plugin in "${plugins[@]}"; do + plugin_path="$plugin_dir/$plugin/$plugin.zsh" + if [[ -f $plugin_path ]]; then + source "$plugin_path" + else + echo "Warning: Plugin not found: $plugin_path" + fi +done + + +# https://unix.stackexchange.com/questions/33994/ +# Use `set -k` to mark leading `#` as a comment character +set -k + +# TODO: Below should be reorganized +export PATH=$HOME/.local/bin:$PATH + +export NVM_DIR="$HOME/.config/nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm diff --git a/tools/zsh/mod/env.zsh b/tools/zsh/mod/env.zsh new file mode 100644 index 0000000..73beddd --- /dev/null +++ b/tools/zsh/mod/env.zsh @@ -0,0 +1,10 @@ +# $DOTFILES/tools/zsh/mod/env.zsh +# Date: 2024-11-30 +# Author: contact@js0ny.net +# Sourced by user's zshrc ๅœจ็”จๆˆท็š„ zshrc ไธญ่ขซๅผ•็”จ + +# This file stores only environment variables that only called by +# interactive session. +# ่ฟ™ไธชๆ–‡ไปถๅชๅญ˜ๅ‚จๅชๅœจไบคไบ’ๅผไผš่ฏไธญ่ฐƒ็”จ็š„็Žฏๅขƒๅ˜้‡ใ€‚ + +export IPYTHONDIR="$XDG_CONFIG_HOME"/ipython diff --git a/tools/zsh/mod/keymap.zsh b/tools/zsh/mod/keymap.zsh new file mode 100644 index 0000000..eac5169 --- /dev/null +++ b/tools/zsh/mod/keymap.zsh @@ -0,0 +1,48 @@ +# $DOTFILES/tools/zsh/mod/keymap.zsh +# Date: 2024-11-30 +# Author: contact@js0ny.net +# Sourced by user's zshrc ๅœจ็”จๆˆท็š„ zshrc ไธญ่ขซๅผ•็”จ + + +bindkey -v # Vi Keybindings + +# Colemak hnei +# ^ +# n +# < h i > +# e +# v +# bindkey -M vicmd 'h' vi-backward-char # No change +bindkey -M vicmd 'n' down-line-or-history +bindkey -M vicmd 'e' up-line-or-history +bindkey -M vicmd 'i' vi-forward-char + +# Similar position to [i] in QWERTY +bindkey -M vicmd 'l' vi-insert +bindkey -M vicmd 'L' vi-insert-bol +# Ne{[k]s}t +bindkey -M vicmd 'k' vi-repeat-search +bindkey -M vicmd 'K' vi-rev-repeat-search +# [J]ump +bindkey -M vicmd 'j' vi-forward-word-end +bindkey -M vicmd 'J' vi-forward-blank-word-end +# Use N to Join +bindkey -M vicmd 'N' vi-join + +# Emacs Hybrid +bindkey '^A' beginning-of-line +bindkey '^E' end-of-line +bindkey '^F' forward-char +bindkey '^B' backward-char +bindkey '^P' up-line-or-history +bindkey '^N' down-line-or-history +bindkey '^R' history-incremental-search-backward +# TODO: did not test +bindkey '^K' kill-line +bindkey '^X^E' edit-command-line + +# LEADER CONVENTION +# ^X defines as a prefix key in shell +# ^A defines as a prefix key in tmux +# ^B defines as a prefix key in Terminal Emulators +# SPC defines as a prefix key in nvim diff --git a/tools/zsh/mod/navi.zsh b/tools/zsh/mod/navi.zsh new file mode 100644 index 0000000..ef9682b --- /dev/null +++ b/tools/zsh/mod/navi.zsh @@ -0,0 +1,41 @@ +# $DOTFILES/tools/zsh/mod/navi.zsh +# Date: 2024-12-01 +# Author: contact@js0ny.net +# Sourced by user's zshrc ๅœจ็”จๆˆท็š„ zshrc ไธญ่ขซๅผ•็”จ + +# Relative navigation # +alias ..="cd .." +alias ...="cd ../.." +alias ....="cd ../../.." +alias .....="cd ../../../.." +alias ......="cd ../../../../.." + +# Use `-` to jump to the previous directory +# Oh-My-Zsh defines a similar one +function - { cd - } + +# Use `z` to jump to a directory +eval "$(zoxide init zsh)" + +# Absolute navigation # +alias dotfiles="cd $DOTFILES && ls" +if [ "$IS_WSL" = true ]; then # IS_WSL is defined in $DOTFILES/platforms/wsl/zshrc + winuser=$(whoami.exe | cut -d'\' -f2 | tr -d '\r') + alias dt="cd /mnt/c/Users/$winuser/Desktop && ls" + alias doku="cd /mnt/c/Users/$winuser/Documents && ls" + alias down="cd /mnt/c/Users/$winuser/Downloads && ls" + alias src="cd /mnt/d/Source" + alias one="cd /mnt/c/Users/$winuser/OneDrive" + alias gdrive="cd /mnt/g" +else + alias dt="cd $HOME/Desktop && ls" + alias doku="cd $HOME/Documents && ls" + alias down="cd $HOME/Downloads && ls" + alias src="cd $HOME/Documents/Source" +fi + +# macOS specific, no OneDrive & Google Drive on Linux +if [ "$(uname)" = "Darwin" ]; then + alias one="cd $HOME/OneDrive" + alias gdrive="cd $HOME/Google\ Drive" +fi diff --git a/tools/zsh/mod/prompt.zsh b/tools/zsh/mod/prompt.zsh new file mode 100644 index 0000000..01be5dc --- /dev/null +++ b/tools/zsh/mod/prompt.zsh @@ -0,0 +1,8 @@ +# $DOTFILES/tools/zsh/mod/prompt.zsh +# Date: 2024-11-30 +# Author: contact@js0ny.net +# Sourced by user's zshrc ๅœจ็”จๆˆท็š„ zshrc ไธญ่ขซๅผ•็”จ + +export STARSHIP_CONFIG=$DOTFILES/tools/starship/starship_zsh.toml + +eval "$(starship init zsh)" diff --git a/tools/zsh/zshenv b/tools/zsh/zshenv new file mode 100644 index 0000000..d84cf50 --- /dev/null +++ b/tools/zsh/zshenv @@ -0,0 +1,164 @@ +# $DOTFILES/tools/zsh/zshenv +# Date: 2024-11-30 +# Author: contact@js0ny.net +# User-specific environment variables for zsh ็”จๆˆท็บงๅˆซ็š„ zsh ็Žฏๅขƒๅ˜้‡ + +# Location: +# $ZDOTDIR/.zshenv (specified by ZDOTDIR) +# ~/.zshenv (default location) +# Linking: +# ln -sf $DOTFILES/tools/zsh/.zshenv $ZDOTDIR/.zshenv +# This file is sourced by all zsh sessions upon startup. + +# For me (this user), define XDG Base Directory Specification variables +# and some configs that does not obey XDG Base Directory Specification +# but can be configured(by setting the variables) to (just like) obey it. +# ๅœจๆญคๅฎšไน‰ XDG ๅŸบ็ก€็›ฎๅฝ•่ง„่Œƒๅ˜้‡ๅ’Œไธ€ไบ›ไธ้ตๅพช XDG ๅŸบ็ก€็›ฎๅฝ•่ง„่Œƒ็š„้…็ฝฎ๏ผŒ +# ไฝฟๅพ—ไป–ไปฌๅฏไปฅ้€š่ฟ‡่ฎพ็ฝฎๅ˜้‡ๆฅ้ตๅพช XDG ๅŸบ็ก€็›ฎๅฝ•่ง„่Œƒใ€‚ + +# XDG Base Directory Specification +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" +export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}" +export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" +export XDG_RUNTIME_DIR="/run/user/$(id -u)" +# Disable shell sessions on macOS when using default terminal +SHELL_SESSIONS_DISABLE=1 + +# Zsh # Redefine to make sure it's in $XDG_CONFIG_HOME +export ZDOTDIR="${XDG_CONFIG_HOME}/zsh" + +# Tools Related Environment Variables +export PAGER="less -R" +export EDITOR="nvim" +export VISUAL="nvim" + +# Minimal PATH for early commands +export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH" + +if [ -d "/opt/homebrew/bin" ]; then # macOS + export PATH="/opt/homebrew/bin:$PATH" +elif [ -d "/home/linuxbrew/.linuxbrew/bin" ]; then # Linux + export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH" +fi + +# macOS Specific +# This syntax is POSIX standard, for portability +if [ "$(uname)" = "Darwin" ]; then + +fi + +# Linux Specific +if [ "$(uname)" = "Linux" ]; then + # CUDA + export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv +fi + +# Azure CLI +if command -v az > /dev/null; then + export AZURE_CONFIG_DIR="$XDG_DATA_HOME"/azure +fi +# Bun JS +# mv ~/.bun $XDG_DATA_HOME/bun +# ln -sf $XDG_DATA_HOME/bun/bin/bun ~/.local/bin/bun +if command -v bun > /dev/null; then + export BUN_INSTALL="$XDG_DATA_HOME"/bun + export PATH="$BUN_INSTALL/bin:$PATH" + [ -s "$BUN_INSTALL/_bun" ] && source "$BUN_INSTALL/_bun" +fi +# Cargo +if command -v cargo > /dev/null; then + export CARGO_HOME="$XDG_DATA_HOME"/cargo + export PATH="$CARGO_HOME/bin:$PATH" +fi +# CGDB +if command -v cgdb > /dev/null; then + export CGDB_DIR="$XDG_CONFIG_HOME"/cgdb +fi +# .NET +if command -v dotnet > /dev/null; then + export DOTNET_CLI_HOME="$XDG_DATA_HOME"/dotnet + export PATH="$DOTNET_CLI_HOME/.dotnet/tools:$PATH" +fi +# Docker +if command -v docker > /dev/null; then + export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker +fi +# GnuPG +if command -v gpg > /dev/null; then + export GNUPGHOME="$XDG_DATA_HOME"/gnupg +fi +# Go +if command -v go > /dev/null; then + export GOPATH="$XDG_DATA_HOME"/go + export PATH="$GOPATH/bin:$PATH" +fi +# Julia +if command -v julia > /dev/null; then + export JULIA_DEPOT_PATH="$XDG_DATA_HOME/julia:$JULIA_DEPOT_PATH" +fi +# Node.js +if command -v node > /dev/null; then + export NODE_REPL_HISTORY="$XDG_STATE_HOME"/node/repl_history + export TS_NODE_REPL_HISTORY="$XDG_STATE_HOME"/node/ts_node_repl_history + export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc + export NPM_CONFIG_INIT_MODULE="$XDG_CONFIG_HOME"/npm/config/npm-init.js + export NPM_CONFIG_CACHE="$XDG_CACHE_HOME"/npm + export NPM_CONFIG_TMP="$XDG_RUNTIME_DIR"/npm +fi +# Parallel +if command -v parallel > /dev/null; then + export PARALLEL_HOME="$XDG_CONFIG_HOME"/parallel +fi +# Python +# Works only with Python 3.13.0a3 and later +if command -v python3 > /dev/null; then + export PYTHON_HISTORY="$XDG_DATA_HOME"/python/history +fi +# GNU Screen +if command -v screen > /dev/null; then + export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc + export SCREENDIR="${XDG_RUNTIME_DIR}/screen" +fi +# Ruby Gem +# Ruby Gem +if command -v gem > /dev/null; then + setopt nullglob + for dir in "$HOME/.local/share/gem/ruby/"*/bin; do + if [ -d "$dir" ]; then + export PATH="$dir:$PATH" + fi + done + unsetopt nullglob +fi +# Spacemacs +if command -v emacs > /dev/null; then + export SPACEMACSDIR="$XDG_CONFIG_HOME"/spacemacs +fi +# tldr +# Works only with C client (did not verify) +if command -v tldr > /dev/null; then + export TLDR_CACHE_DIR="$XDG_CACHE_HOME"/tldr +fi +# W3M +if command -v w3m > /dev/null; then + export W3M_DIR="$XDG_DATA_HOME"/w3m +fi +# Wakatime +if command -v wakatime > /dev/null; then + export WAKATIME_HOME="$XDG_CONFIG_HOME/wakatime" +fi +# Wget +if command -v wget > /dev/null; then + alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"' +fi +# z +if command -v z > /dev/null; then + export _Z_DATA="$XDG_DATA_HOME/z" +fi +# zsh .zcompdump +# compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION" +# Vcpkg TODO: Move vcpkg path +if command -v vcpkg > /dev/null; then + export VCPKG_ROOT="$XDG_DATA_HOME"/vcpkg +fi diff --git a/vscode/hsnips/c.hsnips b/vscode/hsnips/c.hsnips deleted file mode 100644 index 68b2008..0000000 --- a/vscode/hsnips/c.hsnips +++ /dev/null @@ -1,15 +0,0 @@ -snippet hio "include stdio.h" iA -#include -endsnippet - -snippet hlib "include stdlib.h" iA -#include -endsnippet - -snippet hmath "include math.h" iA -#include -endsnippet - -snippet hstr "include string.h" iA -#include -endsnippet \ No newline at end of file diff --git a/vscode/hsnips/readme.md b/vscode/hsnips/readme.md deleted file mode 100644 index 7418e27..0000000 --- a/vscode/hsnips/readme.md +++ /dev/null @@ -1,8 +0,0 @@ -# VSCode HyperSnips Snippets - -## Navigator - -- [C](./c.hsnips) -- [$\LaTeX$](./latex.hsnips) -- [Markdown](./markdown.hsnips) -- [Typst](./typst.hsnips) \ No newline at end of file diff --git a/win/.wslconfig b/win/.wslconfig deleted file mode 100644 index 2166134..0000000 --- a/win/.wslconfig +++ /dev/null @@ -1,12 +0,0 @@ -# ~/.wslconfig -# New-Item -ItemType SymbolicLink -Path ~\.wslconfig -Target ~\.dotfiles\win\.wslconfig -[wsl2] -# networkingMode=mirrored -# dnsTunneling=true -# firewall=true -# autoProxy=true - -[experimental] -# requires dnsTunneling but are also OPTIONAL -bestEffortDnsParsing=true -hostAddressLoopback=true diff --git a/win/Microsoft.PowerShell_profile.ps1 b/win/Microsoft.PowerShell_profile.ps1 deleted file mode 100644 index 4a3b02b..0000000 --- a/win/Microsoft.PowerShell_profile.ps1 +++ /dev/null @@ -1,92 +0,0 @@ -### Load Configs ### -$DOTFILES = "$HOME\.dotfiles" -Get-ChildItem -Path $DOTFILES\powershell -Filter *.ps1 | ForEach-Object {. $_} -Get-ChildItem -Path $DOTFILES\powershell_private -Filter *.ps1 | ForEach-Object {. $_} - -### Aliases ### - -# Shell Equivalents # -Set-Alias "grep" "Select-String" -${function:which} = { (Get-Command $args[0]) } - -# Shell Configurations # -${function:shcfg} = { code $PROFILE } -${function:reload} = { & $PROFILE } -${function:pulldots} = { Set-Location -Path $DOTFILES && git pull } -Set-Alias "pwshcfg" "shcfg" - -# WSL # -${function:wsl1} = {wsl.exe --distribution Arch} -${function:wsl2} = {wsl.exe --distribution Ubuntu-22.04} - -# Search Software # -function Find-AppPackageListRemote { - param( - [string]$Name - ) - if (-not $Name) { - Write-Host "Please provide a package name." - return - } - Write-Host "Searching for $Name..." - Write-Host "=== winget ===" - winget search $Name - Write-Host "=== choco ===" - choco search $Name -# Too slow! -# Write-Host "=== scoop ===" -# scoop search $Name -} -Set-Alias "pkgsearch" "Find-AppPackageListRemote" -function Get-AppPackageListLocal { - winget list - choco list - scoop list -} - -# Toggle Theme # -Set-Alias "dark-mode" "$DOTFILES/win/cmd/dark-mode.bat" # Consistent with macOS (`dark-mode`) - -# Miscs # - -### Misc ### -${function:qwen} = "ollama run qwen2.5:14b" - -## Conda ## -#region conda initialize -# !! Contents within this block are managed by 'conda init' !! -If (Test-Path "$HOME\miniconda3\Scripts\conda.exe") { - (& "$HOME\miniconda3\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | Where-Object{$_} | Invoke-Expression -} -#endregion - -## Check Start Up ## -#$SystemlogFilePath = "$env:USERPROFILE\.PowerShellStartup.log" -## ๆฃ€ๆŸฅๆ—ฅๅฟ—ๆ–‡ไปถๆ˜ฏๅฆๅญ˜ๅœจ -#if (-not (Test-Path $SystemlogFilePath)) { -# New-Item -Path $SystemlogFilePath -ItemType File -Force | Out-Null -#} -## ่ฏปๅ–ๆ—ฅๅฟ—ๆ–‡ไปถ็š„ๆœ€ๅŽไธ€่กŒ๏ผˆๅณไธŠๆฌกๅฏๅŠจๆ—ฅๆœŸ๏ผ‰ -#$__lastStartup = Get-Content -Path $SystemlogFilePath -Tail 1 -ErrorAction SilentlyContinue -#$_currentDate = (Get-Date).ToString("yyyy-MM-dd") -#if (-not ($__lastStartup -eq $_currentDate)) { -# Get-Date -# Update-ForexData & -# Write-Host "ไปŠๅคฉๆ˜ฏ็ฌฌไธ€ๆฌกๅฏๅŠจ PowerShellใ€‚" -# # ่ฎฐๅฝ•ๅฝ“ๅ‰ๆ—ฅๆœŸๅˆฐๆ—ฅๅฟ—ๆ–‡ไปถ -# $_currentDate | Out-File -FilePath $SystemlogFilePath -Append -#} -#Remove-Variable SystemlogFilePath -#Remove-Variable __lastStartup -#Remove-Variable _currentDate - -# Use some unix commands -${function:tree} = { wsl tree $args} -${function:ln} = { coreutils.exe ln $args} -${function:la} = { lsd.exe -la $args} - -# Set default applications -$Env:PAGER = "less" -$Env:EDITOR = "code --wait" -$Env:VISUAL = "code --wait" -$Env:FILE_MANAGER = "dopus.exe" diff --git a/win/komorebi/applications.json b/win/komorebi/applications.json deleted file mode 100644 index 49250f7..0000000 --- a/win/komorebi/applications.json +++ /dev/null @@ -1,2209 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/master/schema.asc.json", - "1Password": { - "ignore": [ - { - "kind": "Exe", - "id": "1Password.exe", - "matching_strategy": "Equals" - } - ] - }, - "Ableton Live": { - "ignore": [ - { - "kind": "Class", - "id": "AbletonVstPlugClass", - "matching_strategy": "Legacy" - }, - { - "kind": "Class", - "id": "Vst3PlugWindow", - "matching_strategy": "Legacy" - } - ] - }, - "Adobe Creative Cloud": { - "tray_and_multi_window": [ - { - "kind": "Class", - "id": "CreativeCloudDesktopWindowClass", - "matching_strategy": "Legacy" - } - ] - }, - "Adobe Premiere Pro": { - "ignore": [ - { - "kind": "Class", - "id": "DroverLord - Window Class", - "matching_strategy": "Equals" - } - ] - }, - "Arc Browser": { - "ignore": [ - { - "kind": "Title", - "id": "Arc picture in picture", - "matching_strategy": "Equals" - } - ] - }, - "Affinity Designer 2": { - "ignore": [ - { - "kind": "Exe", - "id": "Designer.exe", - "matching_strategy": "Equals" - } - ], - "manage": [ - { - "kind": "Title", - "id": "Affinity Designer 2", - "matching_strategy": "Equals" - } - ] - }, - "Affinity Photo 2": { - "ignore": [ - { - "kind": "Exe", - "id": "Photo.exe", - "matching_strategy": "Equals" - } - ], - "manage": [ - { - "kind": "Title", - "id": "Affinity Photo 2", - "matching_strategy": "Equals" - } - ] - }, - "Affinity Publisher 2": { - "ignore": [ - { - "kind": "Exe", - "id": "Publisher.exe", - "matching_strategy": "Equals" - } - ], - "manage": [ - { - "kind": "Title", - "id": "Affinity Publisher 2", - "matching_strategy": "Equals" - } - ] - }, - "Akiflow": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "Akiflow.exe", - "matching_strategy": "Equals" - } - ] - }, - "Amazon Chime": { - "ignore": [ - { - "kind": "Title", - "id": "Meeting Controls", - "matching_strategy": "EndsWith" - } - ] - }, - "Android Studio": { - "object_name_change": [ - { - "kind": "Exe", - "id": "studio64.exe", - "matching_strategy": "Equals" - } - ] - }, - "Anki": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "anki.exe", - "matching_strategy": "Equals" - } - ] - }, - "ArmCord": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "ArmCord.exe", - "matching_strategy": "Equals" - } - ] - }, - "AutoDesk AutoCAD Suite": { - "ignore": [ - [ - { - "kind": "Class", - "id": "Afx:", - "matching_strategy": "Contains" - }, - { - "kind": "Exe", - "id": "acad.exe", - "matching_strategy": "Equals" - } - ], - [ - { - "kind": "Class", - "id": "HwndWrapper[DefaultDomain", - "matching_strategy": "StartsWith" - }, - { - "kind": "Exe", - "id": "acad.exe", - "matching_strategy": "Equals" - } - ] - ] - }, - "AutoHotkey": { - "ignore": [ - { - "kind": "Title", - "id": "Window Spy", - "matching_strategy": "StartsWith" - }, - { - "kind": "Exe", - "id": "AutoHotkeyUX.exe", - "matching_strategy": "Equals" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "AutoHotkeyU64.exe", - "matching_strategy": "Equals" - } - ] - }, - "Beeper": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "Beeper.exe", - "matching_strategy": "Equals" - } - ] - }, - "Bitwarden": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "Bitwarden.exe", - "matching_strategy": "Equals" - } - ] - }, - "Blitz": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "Blitz.exe", - "matching_strategy": "Equals" - } - ] - }, - "Bloxstrap": { - "ignore": [ - { - "kind": "Exe", - "id": "Bloxstrap.exe", - "matching_strategy": "Equals" - } - ] - }, - "Brave Browser": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "brave.exe", - "matching_strategy": "Equals" - } - ] - }, - "CLion": { - "ignore": [ - { - "kind": "Class", - "id": "SunAwtDialog", - "matching_strategy": "Equals" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "clion64.exe", - "matching_strategy": "Equals" - } - ], - "object_name_change": [ - { - "kind": "Exe", - "id": "clion64.exe", - "matching_strategy": "Equals" - } - ] - }, - "Calculator": { - "ignore": [ - { - "kind": "Title", - "id": "Calculator", - "matching_strategy": "Equals" - } - ] - }, - "Citrix Receiver": { - "ignore": [ - { - "kind": "Exe", - "id": "SelfService.exe", - "matching_strategy": "Equals" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "SelfService.exe", - "matching_strategy": "Equals" - } - ] - }, - "Clash Verge": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "Clash Verge.exe", - "matching_strategy": "Equals" - } - ] - }, - "Clementine": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "clementine.exe", - "matching_strategy": "Equals" - } - ] - }, - "CopyQ": { - "ignore": [ - { - "kind": "Exe", - "id": "copyq.exe", - "matching_strategy": "Equals" - } - ] - }, - "Core Temp": { - "ignore": [ - { - "kind": "Exe", - "id": "Core Temp.exe", - "matching_strategy": "Equals" - } - ] - }, - "Credential Manager UI Host": { - "ignore": [ - { - "kind": "Exe", - "id": "CredentialUIBroker.exe", - "matching_strategy": "Equals" - } - ] - }, - "Cron": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "Cron.exe", - "matching_strategy": "Equals" - } - ] - }, - "DS4Windows": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "DS4Windows.exe", - "matching_strategy": "Equals" - } - ] - }, - "DataGrip": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "datagrip64.exe", - "matching_strategy": "Equals" - } - ], - "object_name_change": [ - { - "kind": "Exe", - "id": "datagrip64.exe", - "matching_strategy": "Equals" - } - ] - }, - "Delphi applications": { - "ignore": [ - { - "kind": "Class", - "id": "TApplication", - "matching_strategy": "Legacy" - }, - { - "kind": "Class", - "id": "TWizardForm", - "matching_strategy": "Legacy" - } - ] - }, - "Discord": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "Discord.exe", - "matching_strategy": "Equals" - } - ], - "layered": [ - { - "kind": "Exe", - "id": "Discord.exe", - "matching_strategy": "Equals" - } - ] - }, - "DiscordCanary": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "DiscordCanary.exe", - "matching_strategy": "Equals" - } - ] - }, - "DiscordDevelopment": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "DiscordDevelopment.exe", - "matching_strategy": "Equals" - } - ] - }, - "DiscordPTB": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "DiscordPTB.exe", - "matching_strategy": "Equals" - } - ] - }, - "Dropbox": { - "ignore": [ - { - "kind": "Exe", - "id": "Dropbox.exe", - "matching_strategy": "Equals" - } - ] - }, - "Eagle": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "Eagle.exe", - "matching_strategy": "Equals" - } - ] - }, - "ElectronMail": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "ElectronMail.exe", - "matching_strategy": "Equals" - } - ] - }, - "Element": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "Element.exe", - "matching_strategy": "Equals" - } - ] - }, - "Elephicon": { - "ignore": [ - { - "kind": "Exe", - "id": "Elephicon.exe", - "matching_strategy": "Equals" - } - ] - }, - "ElevenClock": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "ElevenClock.exe", - "matching_strategy": "Equals" - } - ] - }, - "Elgato Camera Hub": { - "ignore": [ - { - "kind": "Exe", - "id": "Camera Hub.exe", - "matching_strategy": "Equals" - } - ] - }, - "Elgato Control Center": { - "ignore": [ - { - "kind": "Exe", - "id": "ControlCenter.exe", - "matching_strategy": "Equals" - } - ] - }, - "Elgato Wave Link": { - "ignore": [ - { - "kind": "Exe", - "id": "WaveLink.exe", - "matching_strategy": "Equals" - } - ] - }, - "Epic Games Launcher": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "EpicGamesLauncher.exe", - "matching_strategy": "Equals" - } - ] - }, - "Everything": { - "tray_and_multi_window": [ - { - "kind": "Class", - "id": "EVERYTHING", - "matching_strategy": "Legacy" - } - ] - }, - "Everything1.5a": { - "manage": [ - { - "kind": "Class", - "id": "EVERYTHING_(1.5a)", - "matching_strategy": "Legacy" - } - ], - "tray_and_multi_window": [ - { - "kind": "Class", - "id": "EVERYTHING_(1.5a)", - "matching_strategy": "Legacy" - } - ] - }, - "FFMetrics": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "FFMetrics.exe", - "matching_strategy": "Equals" - } - ] - }, - "Files": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "Files.exe", - "matching_strategy": "Equals" - } - ] - }, - "Fork": { - "ignore": [ - [ - { - "kind": "Exe", - "id": "Fork.exe", - "matching_strategy": "Equals" - }, - { - "kind": "Title", - "id": "Fork -", - "matching_strategy": "DoesNotStartWith" - } - ] - ] - }, - "GOG Galaxy": { - "ignore": [ - { - "kind": "Class", - "id": "Chrome_RenderWidgetHostHWND", - "matching_strategy": "Legacy" - } - ], - "manage": [ - { - "kind": "Exe", - "id": "GalaxyClient.exe", - "matching_strategy": "Equals" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "GalaxyClient.exe", - "matching_strategy": "Equals" - } - ] - }, - "GitHub Credential Manager": { - "ignore": [ - { - "kind": "Exe", - "id": "git-credential-manager.exe", - "matching_strategy": "Equals" - } - ] - }, - "GoPro Webcam": { - "tray_and_multi_window": [ - { - "kind": "Class", - "id": "GoPro Webcam", - "matching_strategy": "Legacy" - } - ] - }, - "Godot Manager": { - "manage": [ - { - "kind": "Exe", - "id": "GodotManager.exe", - "matching_strategy": "Equals" - } - ], - "object_name_change": [ - { - "kind": "Exe", - "id": "GodotManager.exe", - "matching_strategy": "Equals" - } - ] - }, - "Golden Dict": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "GoldenDict.exe", - "matching_strategy": "Equals" - } - ] - }, - "Google Chrome": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "chrome.exe", - "matching_strategy": "Equals" - } - ] - }, - "Google Drive": { - "ignore": [ - { - "kind": "Exe", - "id": "GoogleDriveFS.exe", - "matching_strategy": "Equals" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "GoogleDriveFS.exe", - "matching_strategy": "Equals" - } - ] - }, - "Google Earth Pro": { - "ignore": [ - [ - { - "kind": "Class", - "id": "Qt5QWindowToolSaveBits", - "matching_strategy": "Equals" - }, - { - "kind": "Exe", - "id": "googleearth.exe", - "matching_strategy": "Equals" - } - ], - [ - { - "kind": "Class", - "id": "Qt5QWindowIcon", - "matching_strategy": "Equals" - }, - { - "kind": "Title", - "id": "Google Earth Pro", - "matching_strategy": "DoesNotEqual" - }, - { - "kind": "Exe", - "id": "googleearth.exe", - "matching_strategy": "Equals" - } - ] - ] - }, - "Guitar Rig 7": { - "ignore": [ - { - "kind": "Exe", - "id": "Guitar Rig 7.exe", - "matching_strategy": "Equals" - } - ] - }, - "IntelliJ IDEA": { - "ignore": [ - { - "kind": "Class", - "id": "SunAwtDialog", - "matching_strategy": "Equals" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "idea64.exe", - "matching_strategy": "Equals" - } - ], - "object_name_change": [ - { - "kind": "Exe", - "id": "idea64.exe", - "matching_strategy": "Equals" - } - ] - }, - "Itch.io": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "itch.exe", - "matching_strategy": "Equals" - } - ] - }, - "KOOK": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "KOOK.exe", - "matching_strategy": "Equals" - } - ] - }, - "Keyviz": { - "ignore": [ - { - "kind": "Exe", - "id": "keyviz.exe", - "matching_strategy": "Equals" - } - ] - }, - "Kleopatra": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "kleopatra.exe", - "matching_strategy": "Equals" - } - ] - }, - "Kotatogram": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "Kotatogram.exe", - "matching_strategy": "Equals" - } - ] - }, - "LocalSend": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "localsend_app.exe", - "matching_strategy": "Equals" - } - ] - }, - "Logi Bolt": { - "ignore": [ - { - "kind": "Exe", - "id": "LogiBolt.exe", - "matching_strategy": "Equals" - } - ] - }, - "LogiTune": { - "ignore": [ - { - "kind": "Exe", - "id": "LogiTune.exe", - "matching_strategy": "Equals" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "LogiTune.exe", - "matching_strategy": "Equals" - } - ] - }, - "Logitech G HUB": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "lghub.exe", - "matching_strategy": "Equals" - } - ] - }, - "Logitech Options": { - "ignore": [ - { - "kind": "Exe", - "id": "LogiOptionsUI.exe", - "matching_strategy": "Equals" - } - ] - }, - "Mailspring": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "mailspring.exe", - "matching_strategy": "Equals" - } - ] - }, - "ManicTime": { - "manage": [ - { - "kind": "Exe", - "id": "ManicTimeClient.exe", - "matching_strategy": "Equals" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "ManicTimeClient.exe", - "matching_strategy": "Equals" - } - ], - "object_name_change": [ - { - "kind": "Exe", - "id": "ManicTimeClient.exe", - "matching_strategy": "Equals" - } - ] - }, - "ManyCam": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "ManyCam.exe", - "matching_strategy": "Equals" - } - ] - }, - "Mattermost": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "Mattermost.exe", - "matching_strategy": "Equals" - } - ] - }, - "MaxxAudioPro": { - "ignore": [ - [ - { - "kind": "Exe", - "id": "ApplicationFrameHost.exe", - "matching_strategy": "Equals" - }, - { - "kind": "Title", - "id": "MaxxAudioPro", - "matching_strategy": "Equals" - } - ] - ] - }, - "Microsoft Active Accessibility": { - "ignore": [ - { - "kind": "Class", - "id": "#32770", - "matching_strategy": "Legacy" - } - ] - }, - "Microsoft Excel": { - "ignore": [ - { - "kind": "Class", - "id": "_WwB", - "matching_strategy": "Legacy" - } - ], - "layered": [ - { - "kind": "Exe", - "id": "EXCEL.EXE", - "matching_strategy": "Equals" - } - ] - }, - "Microsoft Outlook": { - "ignore": [ - { - "kind": "Class", - "id": "_WwB", - "matching_strategy": "Legacy" - }, - { - "kind": "Class", - "id": "MsoSplash", - "matching_strategy": "Equals" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "OUTLOOK.EXE", - "matching_strategy": "Equals" - } - ], - "layered": [ - { - "kind": "Exe", - "id": "OUTLOOK.EXE", - "matching_strategy": "Equals" - } - ] - }, - "Microsoft PC Manager": { - "ignore": [ - { - "kind": "Exe", - "id": "MSPCManager.exe", - "matching_strategy": "Equals" - } - ] - }, - "Microsoft PowerPoint": { - "ignore": [ - { - "kind": "Class", - "id": "_WwB", - "matching_strategy": "Legacy" - } - ], - "layered": [ - { - "kind": "Exe", - "id": "POWERPNT.EXE", - "matching_strategy": "Equals" - } - ] - }, - "Microsoft Teams": { - "tray_and_multi_window": [ - { - "kind": "Class", - "id": "TeamsWebView", - "matching_strategy": "Equals" - } - ], - "object_name_change": [ - { - "kind": "Class", - "id": "TeamsWebView", - "matching_strategy": "Equals" - } - ] - }, - "Microsoft Teams classic": { - "ignore": [ - { - "kind": "Title", - "id": "Microsoft Teams Notification", - "matching_strategy": "Legacy" - }, - { - "kind": "Title", - "id": "Microsoft Teams Call", - "matching_strategy": "Legacy" - } - ] - }, - "Microsoft Word": { - "ignore": [ - { - "kind": "Class", - "id": "_WwB", - "matching_strategy": "Legacy" - } - ], - "layered": [ - { - "kind": "Exe", - "id": "WINWORD.EXE", - "matching_strategy": "Equals" - } - ] - }, - "Modern Flyouts": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "ModernFlyoutsHost.exe", - "matching_strategy": "Equals" - } - ] - }, - "Mozilla Firefox": { - "ignore": [ - { - "kind": "Class", - "id": "MozillaTaskbarPreviewClass", - "matching_strategy": "Legacy" - }, - [ - { - "kind": "Title", - "id": "Picture-in-Picture", - "matching_strategy": "Equals" - }, - { - "kind": "Exe", - "id": "firefox.exe", - "matching_strategy": "Equals" - } - ] - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "firefox.exe", - "matching_strategy": "Equals" - } - ], - "object_name_change": [ - { - "kind": "Exe", - "id": "firefox.exe", - "matching_strategy": "Equals" - } - ] - }, - "NZXT CAM": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "NZXT CAM.exe", - "matching_strategy": "Equals" - } - ] - }, - "NetEase Cloud Music": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "cloudmusic.exe", - "matching_strategy": "Equals" - } - ] - }, - "NiceHash Miner": { - "manage": [ - { - "kind": "Exe", - "id": "nhm_app.exe", - "matching_strategy": "Equals" - } - ] - }, - "NohBoard": { - "ignore": [ - { - "kind": "Exe", - "id": "NohBoard.exe", - "matching_strategy": "Equals" - } - ] - }, - "Notion Enhanced": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "Notion Enhanced.exe", - "matching_strategy": "Equals" - } - ] - }, - "OBS Studio (32-bit)": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "obs32.exe", - "matching_strategy": "Equals" - } - ] - }, - "OBS Studio (64-bit)": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "obs64.exe", - "matching_strategy": "Equals" - } - ] - }, - "ONLYOFFICE Editors": { - "tray_and_multi_window": [ - { - "kind": "Class", - "id": "DocEditorsWindowClass", - "matching_strategy": "Legacy" - } - ] - }, - "OneDrive": { - "ignore": [ - { - "kind": "Class", - "id": "OneDriveReactNativeWin32WindowClass", - "matching_strategy": "Legacy" - } - ] - }, - "OneQuick": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "OneQuick.exe", - "matching_strategy": "Equals" - } - ] - }, - "OpenRGB": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "OpenRGB.exe", - "matching_strategy": "Equals" - } - ] - }, - "Paradox Launcher": { - "ignore": [ - { - "kind": "Exe", - "id": "Paradox Launcher.exe", - "matching_strategy": "Equals" - } - ] - }, - "PhpStorm": { - "ignore": [ - { - "kind": "Class", - "id": "SunAwtDialog", - "matching_strategy": "Equals" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "phpstorm64.exe", - "matching_strategy": "Equals" - } - ], - "object_name_change": [ - { - "kind": "Exe", - "id": "phpstorm64.exe", - "matching_strategy": "Equals" - } - ] - }, - "Playnite": { - "ignore": [ - { - "kind": "Exe", - "id": "Playnite.FullscreenApp.exe", - "matching_strategy": "Equals" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "Playnite.DesktopApp.exe", - "matching_strategy": "Equals" - } - ] - }, - "PowerToys": { - "ignore": [ - { - "kind": "Exe", - "id": "PowerToys.ColorPickerUI.exe", - "matching_strategy": "Equals" - }, - { - "kind": "Exe", - "id": "PowerToys.CropAndLock.exe", - "matching_strategy": "Equals" - }, - { - "kind": "Exe", - "id": "PowerToys.ImageResizer.exe", - "matching_strategy": "Equals" - }, - { - "kind": "Exe", - "id": "PowerToys.Peek.UI.exe", - "matching_strategy": "Equals" - }, - { - "kind": "Exe", - "id": "PowerToys.PowerLauncher.exe", - "matching_strategy": "Equals" - }, - { - "kind": "Exe", - "id": "PowerToys.PowerAccent.exe", - "matching_strategy": "Equals" - } - ] - }, - "Process Hacker": { - "ignore": [ - { - "kind": "Exe", - "id": "ProcessHacker.exe", - "matching_strategy": "Equals" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "ProcessHacker.exe", - "matching_strategy": "Equals" - } - ] - }, - "ProtonDrive": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "ProtonDrive.exe", - "matching_strategy": "Equals" - } - ] - }, - "ProtonVPN": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "ProtonVPN.exe", - "matching_strategy": "Equals" - } - ] - }, - "PyCharm": { - "ignore": [ - { - "kind": "Class", - "id": "SunAwtDialog", - "matching_strategy": "Equals" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "pycharm64.exe", - "matching_strategy": "Equals" - } - ], - "object_name_change": [ - { - "kind": "Exe", - "id": "pycharm64.exe", - "matching_strategy": "Equals" - } - ] - }, - "QQ": { - "ignore": [ - { - "kind": "Title", - "id": "ๅ›พ็‰‡ๆŸฅ็œ‹ๅ™จ", - "matching_strategy": "Legacy" - }, - { - "kind": "Title", - "id": "็พค่Š็š„่Šๅคฉ่ฎฐๅฝ•", - "matching_strategy": "Legacy" - }, - { - "kind": "Title", - "id": "่ฏญ้Ÿณ้€š่ฏ", - "matching_strategy": "Legacy" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "QQ.exe", - "matching_strategy": "Equals" - } - ] - }, - "QtScrcpy": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "QtScrcpy.exe", - "matching_strategy": "Equals" - } - ] - }, - "QuickLook": { - "ignore": [ - { - "kind": "Exe", - "id": "QuickLook.exe", - "matching_strategy": "Equals" - } - ] - }, - "RepoZ": { - "ignore": [ - { - "kind": "Exe", - "id": "RepoZ.exe", - "matching_strategy": "Equals" - } - ] - }, - "Rider": { - "ignore": [ - { - "kind": "Class", - "id": "SunAwtDialog", - "matching_strategy": "Equals" - }, - { - "kind": "Title", - "id": "PopupMessageWindow", - "matching_strategy": "Legacy" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "rider64.exe", - "matching_strategy": "Equals" - } - ], - "object_name_change": [ - { - "kind": "Exe", - "id": "rider64.exe", - "matching_strategy": "Equals" - } - ] - }, - "Roblox FPS Unlocker": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "rbxfpsunlocker.exe", - "matching_strategy": "Equals" - } - ] - }, - "RoundedTB": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "RoundedTB.exe", - "matching_strategy": "Equals" - } - ] - }, - "RustRover": { - "ignore": [ - { - "kind": "Class", - "id": "SunAwtDialog", - "matching_strategy": "Equals" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "rustrover64.exe", - "matching_strategy": "Equals" - } - ], - "object_name_change": [ - { - "kind": "Exe", - "id": "rustrover64.exe", - "matching_strategy": "Equals" - } - ] - }, - "Sandboxie Plus": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "SandMan.exe", - "matching_strategy": "Equals" - } - ] - }, - "ShareX": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "ShareX.exe", - "matching_strategy": "Equals" - } - ] - }, - "Sideloadly": { - "ignore": [ - { - "kind": "Exe", - "id": "sideloadly.exe", - "matching_strategy": "Equals" - } - ] - }, - "Signal": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "Signal.exe", - "matching_strategy": "Equals" - } - ] - }, - "SiriKali": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "sirikali.exe", - "matching_strategy": "Equals" - } - ] - }, - "Slack": { - "ignore": [ - { - "kind": "Class", - "id": "Chrome_RenderWidgetHostHWND", - "matching_strategy": "Legacy" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "slack.exe", - "matching_strategy": "Equals" - } - ] - }, - "Smart Install Maker": { - "ignore": [ - { - "kind": "Class", - "id": "obj_App", - "matching_strategy": "Legacy" - }, - { - "kind": "Class", - "id": "obj_Form", - "matching_strategy": "Legacy" - } - ] - }, - "SnippingTool": { - "ignore": [ - { - "kind": "Exe", - "id": "SnippingTool.exe", - "matching_strategy": "Equals" - } - ] - }, - "SoulseekQt": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "SoulseekQt.exe", - "matching_strategy": "Equals" - } - ] - }, - "Spotify": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "Spotify.exe", - "matching_strategy": "Equals" - } - ] - }, - "Steam": { - "ignore": [ - [ - { - "kind": "Exe", - "id": "steamwebhelper.exe", - "matching_strategy": "Equals" - }, - { - "kind": "Title", - "id": "Steam", - "matching_strategy": "DoesNotEqual" - } - ] - ] - }, - "Steam Beta": { - "ignore": [ - { - "kind": "Title", - "id": "notificationtoasts_", - "matching_strategy": "Legacy" - } - ], - "tray_and_multi_window": [ - { - "kind": "Class", - "id": "SDL_app", - "matching_strategy": "Legacy" - } - ] - }, - "Stremio": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "stremio.exe", - "matching_strategy": "Equals" - } - ] - }, - "System Informer": { - "ignore": [ - { - "kind": "Exe", - "id": "SystemInformer.exe", - "matching_strategy": "Equals" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "SystemInformer.exe", - "matching_strategy": "Equals" - } - ] - }, - "SystemSettings": { - "ignore": [ - { - "kind": "Class", - "id": "Shell_Dialog", - "matching_strategy": "Legacy" - } - ] - }, - "Task Manager": { - "ignore": [ - { - "kind": "Class", - "id": "TaskManagerWindow", - "matching_strategy": "Legacy" - } - ] - }, - "Telegram": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "Telegram.exe", - "matching_strategy": "Equals" - } - ] - }, - "TickTick": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "TickTick.exe", - "matching_strategy": "Equals" - } - ] - }, - "Total Commander": { - "ignore": [ - { - "kind": "Class", - "id": "TDLG2FILEACTIONMIN", - "matching_strategy": "Equals" - }, - { - "kind": "Class", - "id": "TFindFile", - "matching_strategy": "Equals" - }, - { - "kind": "Class", - "id": "TLister", - "matching_strategy": "Equals" - }, - { - "kind": "Class", - "id": "TCHANGETREEDLG", - "matching_strategy": "Equals" - }, - { - "kind": "Class", - "id": "TCONNECT", - "matching_strategy": "Equals" - }, - { - "kind": "Class", - "id": "TSEARCHTEXT", - "matching_strategy": "Equals" - } - ] - }, - "TouchCursor": { - "ignore": [ - { - "kind": "Exe", - "id": "tcconfig.exe", - "matching_strategy": "Equals" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "tcconfig.exe", - "matching_strategy": "Equals" - } - ] - }, - "TranslucentTB": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "TranslucentTB.exe", - "matching_strategy": "Equals" - } - ] - }, - "Unity Hub": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "Unity Hub.exe", - "matching_strategy": "Equals" - } - ] - }, - "Unreal Editor": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "UnrealEditor.exe", - "matching_strategy": "Equals" - } - ] - }, - "VLC": { - "ignore": [ - [ - { - "kind": "Exe", - "id": "vlc.exe", - "matching_strategy": "Equals" - }, - { - "kind": "Title", - "id": "Open URL", - "matching_strategy": "Equals" - } - ], - [ - { - "kind": "Exe", - "id": "vlc.exe", - "matching_strategy": "Equals" - }, - { - "kind": "Title", - "id": "About", - "matching_strategy": "Equals" - } - ], - [ - { - "kind": "Exe", - "id": "vlc.exe", - "matching_strategy": "Equals" - }, - { - "kind": "Title", - "id": "Preferences", - "matching_strategy": "Equals" - } - ], - [ - { - "kind": "Exe", - "id": "vlc.exe", - "matching_strategy": "Equals" - }, - { - "kind": "Title", - "id": "Adjustments and Effects", - "matching_strategy": "Equals" - } - ], - [ - { - "kind": "Exe", - "id": "vlc.exe", - "matching_strategy": "Equals" - }, - { - "kind": "Title", - "id": "Open Media", - "matching_strategy": "Equals" - } - ], - [ - { - "kind": "Exe", - "id": "vlc.exe", - "matching_strategy": "Equals" - }, - { - "kind": "Title", - "id": "Current Media Information", - "matching_strategy": "Equals" - } - ], - [ - { - "kind": "Exe", - "id": "vlc.exe", - "matching_strategy": "Equals" - }, - { - "kind": "Title", - "id": "Messages", - "matching_strategy": "Equals" - } - ], - [ - { - "kind": "Exe", - "id": "vlc.exe", - "matching_strategy": "Equals" - }, - { - "kind": "Title", - "id": "VLC media player updates", - "matching_strategy": "Equals" - } - ], - [ - { - "kind": "Exe", - "id": "vlc.exe", - "matching_strategy": "Equals" - }, - { - "kind": "Title", - "id": "Help", - "matching_strategy": "Equals" - } - ], - [ - { - "kind": "Exe", - "id": "vlc.exe", - "matching_strategy": "Equals" - }, - { - "kind": "Title", - "id": "Plugins and extensions", - "matching_strategy": "Equals" - } - ] - ] - }, - "VMware Horizon Client": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "vmware-view.exe", - "matching_strategy": "Equals" - } - ] - }, - "VRCX": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "VRCX.exe", - "matching_strategy": "Equals" - } - ] - }, - "Visual Studio": { - "object_name_change": [ - { - "kind": "Exe", - "id": "devenv.exe", - "matching_strategy": "Equals" - } - ], - "ignore": [ - { - "kind": "Exe", - "id": "VsDebugConsole.exe", - "matching_strategy": "Equals" - }, - { - "kind": "Class", - "id": "WindowsForms10.Window.8.app.0.13fa1bf_r22_ad1", - "matching_strategy": "Equals" - } - ] - }, - "Voice.ai": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "VoiceAI.exe", - "matching_strategy": "Equals" - } - ] - }, - "WeChat": { - "ignore": [ - { - "kind": "Class", - "id": "WeChatLoginWndForPC", - "matching_strategy": "Equals" - }, - { - "kind": "Class", - "id": "FileListMgrWnd", - "matching_strategy": "Equals" - }, - { - "kind": "Class", - "id": "CWebviewControlHostWnd", - "matching_strategy": "Equals" - }, - { - "kind": "Class", - "id": "ChatWnd", - "matching_strategy": "Equals" - }, - { - "kind": "Class", - "id": "EmotionTipWnd", - "matching_strategy": "Equals" - }, - { - "kind": "Class", - "id": "ChatContactMenu", - "matching_strategy": "Equals" - }, - { - "kind": "Exe", - "id": "WeChatAppEx.exe", - "matching_strategy": "Equals" - } - ], - "manage": [ - { - "kind": "Class", - "id": "WeChatMainWndForPC", - "matching_strategy": "Equals" - } - ], - "tray_and_multi_window": [ - { - "kind": "Class", - "id": "WeChatMainWndForPC", - "matching_strategy": "Equals" - } - ] - }, - "WebStorm": { - "ignore": [ - { - "kind": "Class", - "id": "SunAwtDialog", - "matching_strategy": "Equals" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "webstorm64.exe", - "matching_strategy": "Equals" - } - ], - "object_name_change": [ - { - "kind": "Exe", - "id": "webstorm64.exe", - "matching_strategy": "Equals" - } - ] - }, - "WebTorrent Desktop": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "WebTorrent.exe", - "matching_strategy": "Equals" - } - ] - }, - "WinZip (32-bit)": { - "ignore": [ - { - "kind": "Exe", - "id": "winzip32.exe", - "matching_strategy": "Equals" - } - ] - }, - "WinZip (64-bit)": { - "ignore": [ - { - "kind": "Exe", - "id": "winzip64.exe", - "matching_strategy": "Equals" - } - ] - }, - "Windows Console (conhost.exe)": { - "manage": [ - { - "kind": "Class", - "id": "ConsoleWindowClass", - "matching_strategy": "Equals" - } - ] - }, - "Windows Explorer": { - "ignore": [ - { - "kind": "Class", - "id": "OperationStatusWindow", - "matching_strategy": "Legacy" - }, - { - "kind": "Title", - "id": "Control Panel", - "matching_strategy": "Legacy" - } - ] - }, - "Windows Installer": { - "ignore": [ - { - "kind": "Exe", - "id": "msiexec.exe", - "matching_strategy": "Equals" - } - ] - }, - "Windows Subsystem for Android": { - "ignore": [ - { - "kind": "Class", - "id": "android(splash)", - "matching_strategy": "Legacy" - } - ] - }, - "Windows Update Standalone Installer": { - "ignore": [ - { - "kind": "Exe", - "id": "wusa.exe", - "matching_strategy": "Equals" - } - ] - }, - "WingetUI": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "wingetui.exe", - "matching_strategy": "Equals" - } - ] - }, - "Wox": { - "ignore": [ - { - "kind": "Title", - "id": "Hotkey sink", - "matching_strategy": "Legacy" - } - ] - }, - "XAMPP Control Panel": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "xampp-control.exe", - "matching_strategy": "Equals" - } - ] - }, - "Zebar": { - "ignore": [ - { - "kind": "Exe", - "id": "zebar.exe", - "matching_strategy": "Equals" - } - ] - }, - "Zen Browser": { - "ignore": [ - { - "kind": "Class", - "id": "MozillaTaskbarPreviewClass", - "matching_strategy": "Legacy" - }, - [ - { - "kind": "Title", - "id": "Picture-in-Picture", - "matching_strategy": "Equals" - }, - { - "kind": "Exe", - "id": "zen.exe", - "matching_strategy": "Equals" - } - ] - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "zen.exe", - "matching_strategy": "Equals" - } - ], - "object_name_change": [ - { - "kind": "Exe", - "id": "zen.exe", - "matching_strategy": "Equals" - } - ], - "slow_application": [ - { - "kind": "Exe", - "id": "zen.exe", - "matching_strategy": "Equals" - } - ] - }, - "Zoom": { - "ignore": [ - { - "kind": "Exe", - "id": "Zoom.exe", - "matching_strategy": "Equals" - } - ] - }, - "komorebi-gui": { - "ignore": [ - { - "kind": "Exe", - "id": "komorebi-gui.exe", - "matching_strategy": "Equals" - } - ] - }, - "mpv": { - "object_name_change": [ - { - "kind": "Class", - "id": "mpv", - "matching_strategy": "Legacy" - } - ] - }, - "mpv.net": { - "object_name_change": [ - { - "kind": "Exe", - "id": "mpvnet.exe", - "matching_strategy": "Equals" - } - ] - }, - "paint.net": { - "ignore": [ - { - "kind": "Exe", - "id": "paintdotnet.exe", - "matching_strategy": "Equals" - } - ] - }, - "pinentry": { - "ignore": [ - { - "kind": "Exe", - "id": "pinentry.exe", - "matching_strategy": "Equals" - } - ] - }, - "qBittorrent": { - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "qbittorrent.exe", - "matching_strategy": "Equals" - } - ], - "ignore": [ - [ - { - "kind": "Exe", - "id": "qbittorrent.exe", - "matching_strategy": "Equals" - }, - { - "kind": "Title", - "id": "Exiting qBittorrent", - "matching_strategy": "Equals" - } - ] - ] - }, - "ueli": { - "ignore": [ - { - "kind": "Exe", - "id": "ueli.exe", - "matching_strategy": "Equals" - } - ], - "tray_and_multi_window": [ - { - "kind": "Exe", - "id": "ueli.exe", - "matching_strategy": "Equals" - } - ] - }, - "visio": { - "ignore": [ - { - "kind": "Class", - "id": "VISIOS", - "matching_strategy": "Equals" - }, - { - "kind": "Class", - "id": "VISIOQ", - "matching_strategy": "Equals" - } - ], - "manage": [ - { - "kind": "Class", - "id": "VISIOA", - "matching_strategy": "Equals" - } - ] - } -} diff --git a/wsl/.zshrc b/wsl/.zshrc deleted file mode 100644 index a34d974..0000000 --- a/wsl/.zshrc +++ /dev/null @@ -1,83 +0,0 @@ -# $XDG_CONFIG_HOME/zsh/.zshrc -# ln -s $DOTFILES/wsl/.zshrc $XDG_CONFIG_HOME/zsh/.zshrc -### Variables ### - -export IS_WSL=true -export DOTFILES="$HOME/.dotfiles" -for file in $DOTFILES/zsh/*.zsh; do - source $file -done -source $DOTFILES/wsl/winterop.zsh -source $ZDOTDIR/.zprivate.zsh -export ARCHFLAGS="-arch x86_64" - -# Absolute navigation -alias src="cd ~/Source && ls" -alias dotfiles="cd $DOTFILES && ls" - - -### WSL Options ### - -# WSL open -open() { - local target=$1 - - if command -v explorer.exe > /dev/null; then - explorer.exe "$target" - else - command open "$target" - fi -} - -# WSL Neovide -gvi() { - local target=$1 - - if command -v neovide.exe > /dev/null; then - neovide.exe "$target" - else - if command -v neovide > /dev/null; then - neovide "$target" - else - echo "neovide is not installed" - fi - fi -} - -### Misc ### - -export PATH=/opt/bin:$PATH - -# Conda # - -# >>> conda initialize >>> -# !! Contents within this block are managed by 'conda init' !! -__conda_setup="$('/home/js0ny/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)" -if [ $? -eq 0 ]; then - eval "$__conda_setup" -else - if [ -f "/home/js0ny/miniconda3/etc/profile.d/conda.sh" ]; then - . "/home/js0ny/miniconda3/etc/profile.d/conda.sh" - else - export PATH="/home/js0ny/miniconda3/bin:$PATH" - fi -fi -unset __conda_setup -# <<< conda initialize <<< - - -if [ -f /usr/share/doc/pkgfile/command-not-found.sh ]; then - source /usr/share/doc/pkgfile/command-not-found.sh -fi - - -# vcpkg - -export VCPKG_ROOT=~/vcpkg - -# Package Manager - -alias pac="sudo pacman" -alias paci="sudo pacman -S" -alias pacr="sudo pacman -R" -alias pacu="sudo pacman -Syu" diff --git a/zsh/.zshenv b/zsh/.zshenv deleted file mode 100644 index 9c83239..0000000 --- a/zsh/.zshenv +++ /dev/null @@ -1,20 +0,0 @@ -# ~/.zshenv -# ln -s $DOTFILES/zsh/.zshenv $ZDOTDIR/.zshenv -# This file is sourced by all zsh sessions upon startup. - -# Use XDG Base Directory Specification -export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" -export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" -export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}" -export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" -export XDG_RUNTIME_DIR="/run/user/$(id -u)" -# Disable shell sessions on macOS when using default terminal -SHELL_SESSIONS_DISABLE=1 - -# Zsh -export ZDOTDIR="${XDG_CONFIG_HOME}/zsh" - -# Also put in /etc/zsh/zshenv -# or /etc/zshenv in macOS -# sudo cp $DOTFILES/zsh/.zshenv /etc/zsh/zshenv -# sudo cp $DOTFILES/zsh/.zshenv /etc/zshenv diff --git a/zsh/alias.zsh b/zsh/alias.zsh deleted file mode 100644 index 9949f23..0000000 --- a/zsh/alias.zsh +++ /dev/null @@ -1,50 +0,0 @@ -# PowerShell Equivalent # -alias ni=touch -alias cls=clear -alias ii=open - -# Dev # -alias g++='g++ -std=c++2b' # Set the default C++ standard to C++20 -alias gcc='gcc -std=c99' # Set the default C standard to C99 -alias cl='clang -std=c99' -alias clpp='clang++ -std=c++2b' -alias python=python3 # Set the default Python version to Python 3 -alias py=python # Alias for Python -alias pip=pip3 # Alias for pip -# alias bashcfg="nvim ~/.bashrc" -alias zshcfg="nvim $ZDOTDIR/.zshrc" -alias shcfg=zshcfg -alias reload="source $ZDOTDIR/.zshrc" -alias nvimrc="nvim $XDG_CONFIG_HOME/nvim/" -alias ohmyzsh="code ~/.oh-my-zsh" -alias pulldots="cd $DOTFILES && git pull" - -# Conda # -alias pyact="conda activate" -alias pydact="conda deactivate" -alias pylsenv="conda env list" -alias pymkenv="conda create --name" - -# Editors # -alias v=nvim -alias c=code - -# lsd # -alias ls='lsd -a' -alias l='lsd -lah' -# Misc # -alias cf=cfiles - -# Functions # -mkcd() { - mkdir -p $1 && cd $1 -} -cdls(){ - cd $1 && ls -} -tc(){ - touch $1 && code $1 -} -tv(){ - touch $1 && nvim $1 -} diff --git a/zsh/config.zsh b/zsh/config.zsh deleted file mode 100644 index 4ac50b3..0000000 --- a/zsh/config.zsh +++ /dev/null @@ -1,98 +0,0 @@ -# ZSH Config # -export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH -export PATH=$HOME/.local/share/gem/ruby/3.3.0/bin:$PATH # Ruby Executables -HIST_STAMPS="yyyy-mm-dd" -HISTSIZE=10000 -SAVEHIST=10000 - -export NVM_DIR="$HOME/.config/nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm - -# plugins=(git web-search jsontools z vi-mode zsh-syntax-highlighting zsh-autosuggestions) - -# Plugins (Manually Managed) # -# $ZDOTDIR/plugins - -# echo "[DEBUG] Loading plugins..." -# echo $ZDOTDIR -# Load zsh-syntax-highlighting before zsh-history-substring-search -# Reference: https://github.com/zsh-users/zsh-history-substring-search?tab=readme-ov-file#usage -source $ZDOTDIR/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh -source $ZDOTDIR/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -source $ZDOTDIR/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh - -# Tools Related Environment Variables # - -PAGER="less" -EDITOR="nvim" -VISUAL="nvim" - -# Use XDG Base Directory Specification # - -# ~/.azure/ -> $XDG_DATA_HOME/azure/ -export AZURE_CONFIG_DIR="$XDG_DATA_HOME"/azure -# ~/.cargo/ -> $XDG_DATA_HOME/cargo -export CARGO_HOME="$XDG_DATA_HOME"/cargo -# ~/.cgdb/ -> $XDG_CONFIG_HOME/cgdb/ -export CGDB_DIR="$XDG_CONFIG_HOME"/cgdb -# ~/.docker -> $XDG_CONFIG_HOME/docker -export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker -# ~/.dotnet -> $XDG_DATA_HOME/dotnet -# Not working -# export DOTNET_CLI_HOME="$XDG_DATA_HOME"/dotnet -# ~/.gnupg -> $XDG_CONFIG_HOME/gnupg -export GNUPGHOME="$XDG_DATA_HOME"/gnupg -# ~/go -> $XDG_DATA_HOME/go -export GOPATH="$XDG_DATA_HOME"/go -# ~/.inputrc -> $XDG_CONFIG_HOME/readline/inputrc -export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc -# ~/.juliaup/ -> $XDG_DATA_HOME/julia/ -export JULIA_DEPOT_PATH="$XDG_DATA_HOME/julia:$JULIA_DEPOT_PATH" -# Check if node is installed -if command -v node > /dev/null; then - # ~/.node_repl_history -> $XDG_STATE_HOME/node/repl_history - export NODE_REPL_HISTORY="$XDG_STATE_HOME"/node/repl_history - # ~/.ts_node_repl_history -> $XDG_STATE_HOME/node/ts_node_repl_history - export TS_NODE_REPL_HISTORY="$XDG_STATE_HOME"/node/ts_node_repl_history - # ~/.npmrc -> $XDG_CONFIG_HOME/npm/npmrc - export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc - # ~/.npm -> $XDG_CACHE_HOME/npm - export NPM_CONFIG_INIT_MODULE="$XDG_CONFIG_HOME"/npm/config/npm-init.js - export NPM_CONFIG_CACHE="$XDG_CACHE_HOME"/npm - export NPM_CONFIG_TMP="$XDG_RUNTIME_DIR"/npm -fi -# ~/.nv -> $XDG_CACHE_HOME/nv (CUDA) -# macOS does not have Cuda; Check if CUDA is installed -if [ "$(uname)" != "Darwin" ] && [ -d "/usr/local/cuda" ]; then - export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv -fi -# ~/,parallel -> $XDG_CONFIG_HOME/parallel -export PARALLEL_HOME="$XDG_CONFIG_HOME"/parallel -# ~/.python_history -> $XDG_DATA_HOME/python/history -# Works only with Python 3.13.0a3 and later -export PYTHON_HISTORY="$XDG_DATA_HOME"/python/history -# ~/.screenrc -> $XDG_CONFIG_HOME/screen/screenrc -export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc -# ~/.screen/ -> $XDG_RUNTIME_DIR/screen -export SCREENDIR="${XDG_RUNTIME_DIR}/screen" -# ~/.spacemacs/ -> $XDG_CONFIG_HOME/spacemacs -export SPACEMACSDIR="$XDG_CONFIG_HOME"/spacemacs -# ~/.tldrc/ -> $XDG_CACHE_HOME/tldr -export TLDR_CACHE_DIR="$XDG_CACHE_HOME"/tldr -# ~/.w3m -> $XDG_DATA_HOME/w3m -export W3M_DIR="$XDG_DATA_HOME"/w3m -# ~/.wakatime.cfg -> $XDG_CONFIG_HOME/wakatime.cfg -# ~/.wakatime/ -> $XDG_CONFIG_HOME/wakatime/ -export WAKATIME_HOME="$XDG_CONFIG_HOME/wakatime" -# ~/.wget-hsts -> $XDG_DATA_HOME/wget-hsts -alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"' -# ~/.z -> $XDG_DATA_HOME/z -export _Z_DATA="$XDG_DATA_HOME/z" -# ~/.zcompdump* -> $XDG_CACHE_HOME/zsh/zcompdump* -# compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION" -# ~/.zsh_history -> $XDG_STATE_HOME/zsh/history -export HISTFILE="$XDG_STATE_HOME"/zsh/history - -# https://unix.stackexchange.com/questions/33994/ -# Use `set -k` to mark leading `#` as a comment character -set -k diff --git a/zsh/keymap.zsh b/zsh/keymap.zsh deleted file mode 100644 index 9b2e537..0000000 --- a/zsh/keymap.zsh +++ /dev/null @@ -1,23 +0,0 @@ -# $DOTFILES/keymap.zsh -bindkey -v # Vi Keybindings - -# Colemak hnei -# bindkey -M vicmd 'h' vi-backward-char # No change -bindkey -M vicmd 'n' down-line-or-history -bindkey -M vicmd 'e' up-line-or-history -bindkey -M vicmd 'i' vi-forward-char - -# Similar position to [i] in QWERTY -bindkey -M vicmd 'l' vi-insert -bindkey -M vicmd 'L' vi-insert-bol -# Ne{[k]s}t -bindkey -M vicmd 'k' vi-repeat-search -bindkey -M vicmd 'K' vi-rev-repeat-search -# [J]ump -bindkey -M vicmd 'j' vi-forward-word-end -bindkey -M vicmd 'J' vi-forward-blank-word-end -# Use N to Join -bindkey -M vicmd 'N' vi-join - -# Search History with [r]everse (default emacs keybinding) -bindkey '^R' history-incremental-search-backward diff --git a/zsh/navi.zsh b/zsh/navi.zsh deleted file mode 100644 index e74d95c..0000000 --- a/zsh/navi.zsh +++ /dev/null @@ -1,11 +0,0 @@ - -# Relative navigation -alias ..="cd .." -alias ...="cd ../.." -alias ....="cd ../../.." -alias .....="cd ../../../.." -alias ......="cd ../../../../.." - -function - { cd - } - -eval "$(zoxide init zsh)" diff --git a/zsh/prompt.zsh b/zsh/prompt.zsh deleted file mode 100644 index 09bdb23..0000000 --- a/zsh/prompt.zsh +++ /dev/null @@ -1,3 +0,0 @@ -export STARSHIP_CONFIG=$DOTFILES/.config/starship/starship_zsh.toml - -eval "$(starship init zsh)" \ No newline at end of file diff --git a/zsh/update.sh b/zsh/update.sh deleted file mode 100644 index 95d24da..0000000 --- a/zsh/update.sh +++ /dev/null @@ -1,19 +0,0 @@ -# $DOTFILES/zsh/update.sh - -# This file won't be sourced by zsh by default -# Use `source` to run this file for updating plugins - -# Plugins # -# Auto `git pull` on $ZDOTDIR/plugins -for plugin in $ZDOTDIR/plugins/*; do - if [ -d "$plugin" ]; then - cd $plugin - git pull --quiet --no-edit - fi -done - -if [ which brew > /dev/null ]; then - brew update - brew upgrade -fi -