Dotfiles V1.5.2
This commit is contained in:
1 parent
1ec21e387a
commit
b5c9d585c1
51 files changed
+1356
-1082
No files matched your search
@@ -56,7 +56,7 @@ inner.horizontal = 10
|
||||
inner.vertical = 10
|
||||
outer.left = 10
|
||||
outer.bottom = 10
|
||||
outer.top = [{ monitor.built-in = 10 }, 50]
|
||||
outer.top = 10
|
||||
outer.right = 10
|
||||
|
||||
# 'main' binding mode declaration
|
||||
@@ -84,48 +84,48 @@ outer.right = 10
|
||||
# alt-enter = 'exec-and-forget open -n /System/Applications/Utilities/Terminal.app'
|
||||
|
||||
# See: https://nikitabobko.github.io/AeroSpace/commands#layout
|
||||
alt-comma= 'layout tiles horizontal vertical'
|
||||
alt-period= 'layout accordion horizontal vertical'
|
||||
ctrl-comma= 'layout tiles horizontal vertical'
|
||||
ctrl-period= 'layout accordion horizontal vertical'
|
||||
|
||||
# See: https://nikitabobko.github.io/AeroSpace/commands#focus
|
||||
alt-h = 'focus left'
|
||||
alt-j = 'focus down'
|
||||
alt-k = 'focus up'
|
||||
alt-l = 'focus right'
|
||||
ctrl-left = 'focus left'
|
||||
ctrl-down = 'focus down'
|
||||
ctrl-up = 'focus up'
|
||||
ctrl-right = 'focus right'
|
||||
|
||||
# See: https://nikitabobko.github.io/AeroSpace/commands#move
|
||||
alt-shift-h = 'move left'
|
||||
alt-shift-j = 'move down'
|
||||
alt-shift-k = 'move up'
|
||||
alt-shift-l = 'move right'
|
||||
ctrl-shift-left = 'move left'
|
||||
ctrl-shift-down = 'move down'
|
||||
ctrl-shift-up = 'move up'
|
||||
ctrl-shift-right = 'move right'
|
||||
|
||||
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
|
||||
alt-1 = 'workspace '
|
||||
alt-2 = 'workspace '
|
||||
alt-3 = 'workspace '
|
||||
alt-4 = 'workspace '
|
||||
alt-5 = 'workspace '
|
||||
alt-6 = 'workspace '
|
||||
alt-7 = 'workspace '
|
||||
alt-8 = 'workspace '
|
||||
alt-9 = 'workspace '
|
||||
ctrl-1 = 'workspace '
|
||||
ctrl-2 = 'workspace '
|
||||
ctrl-3 = 'workspace '
|
||||
ctrl-4 = 'workspace '
|
||||
ctrl-5 = 'workspace '
|
||||
ctrl-6 = 'workspace '
|
||||
ctrl-7 = 'workspace '
|
||||
ctrl-8 = 'workspace '
|
||||
ctrl-9 = 'workspace '
|
||||
|
||||
# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
|
||||
alt-shift-1 = 'move-node-to-workspace '
|
||||
alt-shift-2 = 'move-node-to-workspace '
|
||||
alt-shift-3 = 'move-node-to-workspace '
|
||||
alt-shift-4 = 'move-node-to-workspace '
|
||||
alt-shift-5 = 'move-node-to-workspace '
|
||||
alt-shift-6 = 'move-node-to-workspace '
|
||||
alt-shift-7 = 'move-node-to-workspace '
|
||||
alt-shift-8 = 'move-node-to-workspace '
|
||||
alt-shift-9 = 'move-node-to-workspace '
|
||||
ctrl-shift-1 = 'move-node-to-workspace '
|
||||
ctrl-shift-2 = 'move-node-to-workspace '
|
||||
ctrl-shift-3 = 'move-node-to-workspace '
|
||||
ctrl-shift-4 = 'move-node-to-workspace '
|
||||
ctrl-shift-5 = 'move-node-to-workspace '
|
||||
ctrl-shift-6 = 'move-node-to-workspace '
|
||||
ctrl-shift-7 = 'move-node-to-workspace '
|
||||
ctrl-shift-8 = 'move-node-to-workspace '
|
||||
ctrl-shift-9 = 'move-node-to-workspace '
|
||||
|
||||
# See: https://nikitabobko.github.io/AeroSpace/commands#move-workspace-to-monitor
|
||||
alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
|
||||
ctrl-shift-tab = 'move-workspace-to-monitor --wrap-around next'
|
||||
|
||||
# See: https://nikitabobko.github.io/AeroSpace/commands#mode
|
||||
alt-shift-slash= 'mode service'
|
||||
ctrl-shift-slash= 'mode service'
|
||||
|
||||
# 'service' binding mode declaration.
|
||||
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
|
||||
@@ -136,10 +136,10 @@ r = ['flatten-workspace-tree', 'mode main'] # reset layout
|
||||
f = ['layout floating tiling', 'mode main'] # Toggle between floating and tiling layout
|
||||
backspace = ['close-all-windows-but-current', 'mode main']
|
||||
|
||||
alt-shift-s = ['join-with left', 'mode main']
|
||||
alt-shift-d = ['join-with down', 'mode main']
|
||||
alt-shift-f = ['join-with up', 'mode main']
|
||||
alt-shift-g = ['join-with right', 'mode main']
|
||||
ctrl-shift-s = ['join-with left', 'mode main']
|
||||
ctrl-shift-d = ['join-with down', 'mode main']
|
||||
ctrl-shift-f = ['join-with up', 'mode main']
|
||||
ctrl-shift-g = ['join-with right', 'mode main']
|
||||
|
||||
# Window Rules
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ return {
|
||||
settings = {
|
||||
ltex = {
|
||||
checkFrequency = "save",
|
||||
language = "en-US",
|
||||
},
|
||||
},
|
||||
}
|
||||
+32
-31
@@ -1,49 +1,50 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "3732756842a2f7e0e76a7b0487e9692072857277" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "3979b01cb05734331c7873049001d3f2bb8477f4" },
|
||||
"catppuccin": { "branch": "main", "commit": "ce8d176faa4643e026e597ae3c31db59b63cef09" },
|
||||
"LuaSnip": { "branch": "master", "commit": "0abc8f390b278c3b4aabc4c004ac8a088b65cf24" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "6c6a89d5b068b5251c8bdf0dd57bb921bcfeeb09" },
|
||||
"catppuccin": { "branch": "main", "commit": "426dbebe06b5c69fd846ceb17b42e12f890aedf1" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
||||
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"conform.nvim": { "branch": "master", "commit": "16d35530db66ca64f81cb1a13a42afe5962edf34" },
|
||||
"conform.nvim": { "branch": "master", "commit": "18aeab3d63d350dcf44d64c462cc489a3412af40" },
|
||||
"easytables.nvim": { "branch": "master", "commit": "4d7b4d98ab315b90156614e16e0a2b6dbbf2a108" },
|
||||
"follow-md-links.nvim": { "branch": "main", "commit": "728d96d268eef9666f0ee77a083e7e2f0b44f607" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "5813e4878748805f1518cee7abb50fd7205a3a48" },
|
||||
"follow-md-links.nvim": { "branch": "main", "commit": "99c4e7c78c0211e02c9ff282044b45f7b9dc2d0f" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "dd3f588bacbeb041be6facf1742e42097f62165d" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
|
||||
"lspkind.nvim": { "branch": "master", "commit": "3ddd1b4edefa425fda5a9f95a4f25578727c0bb3" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "c55bd8a8fb191e24176c206a7af1dd51ce7276a5" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
|
||||
"mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
|
||||
"lspkind.nvim": { "branch": "master", "commit": "c7274c48137396526b59d86232eabcdc7fed8a32" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "7b01e2974a47d489bb92f47a41e4c0088ea8f86e" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
|
||||
"mason.nvim": { "branch": "main", "commit": "cbf8d285e1462dd24acf3507817be2bbcb035919" },
|
||||
"mini.nvim": { "branch": "main", "commit": "264b5c8fc6e82212af0dc5c345145cfa916efeb6" },
|
||||
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-FeMaco.lua": { "branch": "main", "commit": "96bbf843595dbe865838b3f2484b73557f34700c" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "d9e44e54384e5b0f3536339c65484f2e41b528e3" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "d97d85e01339f01b842e6ec1502f639b080cb0fc" },
|
||||
"nvim-lint": { "branch": "master", "commit": "ae64d6466ed92b68353122d920e314ff2c8dd0a8" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "0044d0987ef7e624d04141d0f90d0481fd3c3663" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" },
|
||||
"nvim-lint": { "branch": "master", "commit": "d48f3a76189d03b2239f6df1b2f7e3fa8353743b" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "246572944c2a1e2a646c2e7609ff619b0fe74c18" },
|
||||
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
|
||||
"oil.nvim": { "branch": "master", "commit": "cbcb3f997f6f261c577b943ec94e4ef55108dd95" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"smart-splits.nvim": { "branch": "master", "commit": "3ee3d37d82ee6b7813a8de2087e8020c0811b701" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||
"telescope-live-grep-args.nvim": { "branch": "master", "commit": "b80ec2c70ec4f32571478b501218c8979fab5201" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "7d8dad2c837fcdf2e65997e68657c1a21c568074" },
|
||||
"oil.nvim": { "branch": "master", "commit": "0fcc83805ad11cf714a949c98c605ed717e0b83e" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "629eb9533ec989d9d5c6cab8f3ad5372422c24e0" },
|
||||
"smart-splits.nvim": { "branch": "master", "commit": "3151100591670148cb0065388117622212208ee3" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "b25b749b9db64d375d782094e2b9dce53ad53a40" },
|
||||
"telescope-live-grep-args.nvim": { "branch": "master", "commit": "53e9df55b3651dd7cf77e172f1e8c9a17407acca" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||
"template.nvim": { "branch": "main", "commit": "308f6f8f0bf98cb7c71855ffa8a3019a5642d1cd" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||
"venv-selector.nvim": { "branch": "main", "commit": "58bae72c84b9f7f864c879ec1896e384296f9ffb" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
|
||||
"tree-sitter-manager.nvim": { "branch": "main", "commit": "f18e545c6ccbbae9875e63a2a7b8e8a9678a242e" },
|
||||
"venv-selector.nvim": { "branch": "main", "commit": "a46c77978abc1aa1b3e17918d964bd30287abb42" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" },
|
||||
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
||||
"vimtex": { "branch": "master", "commit": "6e1229e23c3bbe93487ef62458b1241a2d8ff6af" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "e41c431a0c7b7388ae7ba341f01a0d217eb3a432" },
|
||||
"vimtex": { "branch": "master", "commit": "182ad387e3f3107699483606c9a2b6648f8437b2" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||
}
|
||||
@@ -5,4 +5,5 @@ local keymap = vim.keymap
|
||||
keymap.set("i", "jk", "<ESC>", { desc = "Exit out of insert mode" })
|
||||
keymap.set("n", "<leader>q", "<cmd>wq<CR>", { desc = "Exit NeoVim and Save file" })
|
||||
keymap.set("n", "<leader>w", "<cmd>w<CR>", { desc = "Save file" })
|
||||
keymap.set("n", "<leader>x", "<cmd>bd<CR>", { desc = "Delete Buffer" })
|
||||
keymap.set("n", "<leader>-", "gcc", { desc = "Toggle comment" })
|
||||
@@ -1,8 +1,17 @@
|
||||
local opt = vim.opt
|
||||
|
||||
opt.termsync = false
|
||||
|
||||
opt.relativenumber = true
|
||||
opt.number = true
|
||||
|
||||
-- treesitter
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
callback = function()
|
||||
pcall(vim.treesitter.start)
|
||||
end,
|
||||
})
|
||||
|
||||
-- tabs & indentation
|
||||
opt.tabstop = 2
|
||||
opt.shiftwidth = 2
|
||||
|
||||
@@ -21,15 +21,15 @@ return {
|
||||
wk.add({
|
||||
{ "<leader>l", group = "lsp", icon = "" },
|
||||
{ "<leader>lr", "<cmd>Telescope lsp_references<CR>", desc = "Show references", icon = "" },
|
||||
{ "<leader>lD", "<cmd>lua vim.lsp.buf.defenition()<CR>", desc = "Show defenition", icon = "" },
|
||||
{ "<leader>lD", "<cmd>lua vim.lsp.buf.definition()<CR>", desc = "Show defenition", icon = "" },
|
||||
{ "<leader>lc", "<cmd>lua vim.lsp.buf.code_action()<CR>", desc = "Code actions", icon = "" },
|
||||
{ "<leader>lR", "<cmd>lua vim.lsp.buf.rename()<CR>", desc = "Smart rename", icon = "" },
|
||||
{ "<leader>ld", "<cmd>Telescope diagnostics bufnr=0<CR>", desc = "Diagnostics", icon = "" },
|
||||
{ "<leader>ll", "<cmd>lua vim.lsp.buf.open_float()<CR>", desc = "Line Diagnostics", icon = "" },
|
||||
{ "<leader>ln", "<cmd>lua vim.diagnostics.goto_next()<CR>", desc = "Go to next Diagnostic", icon = "" },
|
||||
{ "<leader>ln", "<cmd>lua vim.diagnostic.goto_next()<CR>", desc = "Go to next Diagnostic", icon = "" },
|
||||
{
|
||||
"<leader>lp",
|
||||
"<cmd>lua vim.diagnostics.goto_prev()<CR>",
|
||||
"<cmd>lua vim.diagnostic.goto_prev()<CR>",
|
||||
desc = "Go to previous Diagnostic",
|
||||
icon = "",
|
||||
},
|
||||
|
||||
@@ -8,8 +8,9 @@ return {
|
||||
"clangd",
|
||||
"marksman",
|
||||
"texlab",
|
||||
"ltex",
|
||||
"ltex_plus",
|
||||
"gopls",
|
||||
"tinymist",
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
@@ -25,11 +26,11 @@ return {
|
||||
"clang-format",
|
||||
"stylua",
|
||||
"prettier",
|
||||
"vale",
|
||||
"latexindent",
|
||||
"goimports-reviser",
|
||||
"golines",
|
||||
"golangci-lint",
|
||||
"typstyle",
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
dependencies = { "nvim-mini/mini.nvim" }, -- if you use the mini.nvim suite
|
||||
---@module 'render-markdown'
|
||||
---@type render.md.UserConfig
|
||||
opts = {
|
||||
render_modes = true,
|
||||
},
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
return {
|
||||
"nvimdev/template.nvim",
|
||||
"glepnir/template.nvim",
|
||||
cmd = { "Template", "TemProject" },
|
||||
config = function()
|
||||
local template = require("template")
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
lazy = true,
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
["a="] = { query = "@assignment.outer", desc = "Select outer part of an assignment" },
|
||||
["i="] = { query = "@assignment.inner", desc = "Select inner part of an assignment" },
|
||||
["l="] = { query = "@assignment.lhs", desc = "Select left hand side of an assignment" },
|
||||
["r="] = { query = "@assignment.rhs", desc = "Select right hand side of an assignment" },
|
||||
["a:"] = { query = "@property.outer", desc = "Select outer part of an object property" },
|
||||
["i:"] = { query = "@property.inner", desc = "Select inner part of an object property" },
|
||||
["l:"] = { query = "@property.lhs", desc = "Select left part of an object property" },
|
||||
["r:"] = { query = "@property.rhs", desc = "Select right part of an object property" },
|
||||
["aa"] = { query = "@parameter.outer", desc = "Select outer part of a parameter/argument" },
|
||||
["ia"] = { query = "@parameter.inner", desc = "Select inner part of a parameter/argument" },
|
||||
["ai"] = { query = "@conditional.outer", desc = "Select outer part of a conditional" },
|
||||
["ii"] = { query = "@conditional.inner", desc = "Select inner part of a conditional" },
|
||||
["al"] = { query = "@loop.outer", desc = "Select outer part of a loop" },
|
||||
["il"] = { query = "@loop.inner", desc = "Select inner part of a loop" },
|
||||
["af"] = { query = "@call.outer", desc = "Select outer part of a function call" },
|
||||
["if"] = { query = "@call.inner", desc = "Select inner part of a function call" },
|
||||
["am"] = {
|
||||
query = "@function.outer",
|
||||
desc = "Select outer part of a method or function definition",
|
||||
},
|
||||
["im"] = {
|
||||
query = "@function.inner",
|
||||
desc = "Select inner part of a method or function definition",
|
||||
},
|
||||
["ac"] = { query = "@class.outer", desc = "Select outer part of a class" },
|
||||
["ic"] = { query = "@class.inner", desc = "Select inner part of a class" },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -1,45 +1,55 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
"windwp/nvim-ts-autotag",
|
||||
},
|
||||
config = function()
|
||||
local treesitter = require("nvim-treesitter.configs")
|
||||
{
|
||||
"romus204/tree-sitter-manager.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
local tsm = require("tree-sitter-manager")
|
||||
|
||||
treesitter.setup({
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = { "latex" },
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
autotag = {
|
||||
enable = true,
|
||||
},
|
||||
ensure_installed = {
|
||||
"python",
|
||||
"cpp",
|
||||
"lua",
|
||||
"markdown_inline",
|
||||
"html",
|
||||
"css",
|
||||
"bash",
|
||||
"latex",
|
||||
"r",
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<C-space>",
|
||||
node_incremental = "<C-space>",
|
||||
scope_incremental = false,
|
||||
node_decremental = "<bs>",
|
||||
-- 1. Manage Parser Files
|
||||
tsm.setup({
|
||||
ensure_installed = {
|
||||
"python",
|
||||
"cpp",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"html",
|
||||
"css",
|
||||
"bash",
|
||||
"zsh",
|
||||
"latex",
|
||||
"r",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
-- 2. Enable Native Highlighting Engine
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
callback = function(args)
|
||||
local bufnr = args.buf
|
||||
local ft = vim.bo[bufnr].filetype
|
||||
|
||||
-- Filter out common "non-code" or problematic filetypes
|
||||
local ignore_ft = { "noice", "prompt", "TelescopePrompt", "notify" }
|
||||
for _, v in ipairs(ignore_ft) do
|
||||
if ft == v then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
-- Try to get the language for the filetype
|
||||
local lang = vim.treesitter.language.get_lang(ft)
|
||||
|
||||
-- ONLY start if we have a valid language AND the parser is actually installed
|
||||
if lang then
|
||||
-- pcall (protected call) prevents the "Parser could not be created" error
|
||||
-- from popping up in your face if the parser is missing/corrupted.
|
||||
local ok, _ = pcall(vim.treesitter.start, bufnr, lang)
|
||||
if ok then
|
||||
vim.opt_local.indentexpr = "v:lua.vim.treesitter.indentexpr()"
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
"christoomey/vim-tmux-navigator",
|
||||
cmd = {
|
||||
"TmuxNavigateLeft",
|
||||
"TmuxNavigateDown",
|
||||
"TmuxNavigateUp",
|
||||
"TmuxNavigateRight",
|
||||
},
|
||||
keys = {
|
||||
{ "<M-h>", "<cmd>TmuxNavigateLeft<cr>" },
|
||||
{ "<M-j>", "<cmd>TmuxNavigateDown<cr>" },
|
||||
{ "<M-k>", "<cmd>TmuxNavigateUp<cr>" },
|
||||
{ "<M-l>", "<cmd>TmuxNavigateRight<cr>" },
|
||||
},
|
||||
}
|
||||
@@ -22,6 +22,35 @@ return {
|
||||
{ "<leader>il", "<cmd>Lazy<CR>", desc = "Open Lazy Menu" },
|
||||
{ "<leader>im", "<cmd>Mason<CR>", desc = "Open Mason Menu" },
|
||||
{ "<leader>ie", "<cmd>VenvSelect<CR>", desc = "Python Virtual Environment Selector" },
|
||||
{ "<leader>p", group = "typst", icon = "" },
|
||||
{ "<leader>pc", "<cmd>!typst c %<CR>", desc = "Compile current file", icon = "" },
|
||||
{
|
||||
"<leader>pw",
|
||||
function()
|
||||
if _G.typst_job_id then
|
||||
vim.notify("Typst watch is already running!", vim.log.levels.WARN)
|
||||
return
|
||||
end
|
||||
_G.typst_job_id = vim.fn.jobstart({ "typst", "w", vim.fn.expand("%") })
|
||||
vim.notify("Typst watch started in background", vim.log.levels.INFO)
|
||||
end,
|
||||
desc = "Watch current file",
|
||||
icon = "",
|
||||
},
|
||||
{
|
||||
"<leader>ps",
|
||||
function()
|
||||
if _G.typst_job_id then
|
||||
vim.fn.jobstop(_G.typst_job_id)
|
||||
_G.typst_job_id = nil
|
||||
vim.notify("Typst watch stopped", vim.log.levels.INFO)
|
||||
else
|
||||
vim.notify("No Typst job running", vim.log.levels.WARN)
|
||||
end
|
||||
end,
|
||||
desc = "Stop watch current file",
|
||||
icon = "",
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
File renamed without changes.
@@ -0,0 +1,41 @@
|
||||
// TODO: Change Title and Author variables
|
||||
#let papertitle = [Title]
|
||||
#let paperauthor = "Jirayu Ruh"
|
||||
|
||||
// TODO: Change language
|
||||
#let is_german = false
|
||||
|
||||
#set page(
|
||||
paper: "a4",
|
||||
header: {
|
||||
grid(
|
||||
columns: (1fr, 1fr),
|
||||
align(left)[#context document.title], align(right)[#context document.author.at(0)],
|
||||
)
|
||||
line(length: 100%, stroke: 0.5pt)
|
||||
},
|
||||
numbering: "1",
|
||||
margin: (left: 2.5cm, right: 2.5cm, top: 2.5cm, bottom: 2cm),
|
||||
)
|
||||
|
||||
#set text(
|
||||
size: 11pt,
|
||||
lang: if is_german { "de" } else { "en" },
|
||||
region: if is_german { "ch" } else { "us" },
|
||||
)
|
||||
|
||||
#set document(
|
||||
title: papertitle,
|
||||
author: paperauthor,
|
||||
)
|
||||
|
||||
#set par(
|
||||
justify: true,
|
||||
leading: 0.75em,
|
||||
)
|
||||
|
||||
#set heading(numbering: "1.1.1.1.1")
|
||||
|
||||
= #context document.title
|
||||
|
||||
// TODO: Begin Title here
|
||||
@@ -0,0 +1,29 @@
|
||||
// TODO: Change language
|
||||
//ltex: language=de-ch
|
||||
|
||||
#import "../setup.typ": *
|
||||
#import "../preamble.typ": *
|
||||
|
||||
// TODO: Add Lecture Information
|
||||
|
||||
= DISCLAIMER
|
||||
|
||||
Diese Zusammenfassung basiert auf der Vorlesung "" von .
|
||||
|
||||
Ich übernehme keine Haftung für mögliche Fehler in der Zusammenfassung. Bitte beachten Sie, dass diese Zusammenfassung unter Zuhilfenahme von Gemini Notebook erstellt wurde. Obwohl KI ein leistungsstarkes Werkzeug ist, kann sie technische Ungenauigkeiten oder sogenannte „Halluzinationen“ erzeugen. Darüber hinaus habe ich Abschnitte paraphrasiert und eigene Beobachtungen hinzugefügt, was weitere Fehlerquellen darstellen kann.
|
||||
|
||||
*Urheberrecht & Inhaltlicher Hinweis:* Dies ist eine inoffizielle Ressource; sie steht in keiner Verbindung zur ZHAW und wird von dieser nicht unterstützt. Da diese Zusammenfassung mit Hilfe von KI erstellt wurden, kann ich nicht garantieren, dass alle Inhalte ausreichend umformuliert wurden. Einige Abschnitte können den ursprünglichen Präsentationsfolien oder Skripten stark ähneln oder diese direkt zitieren. Alle geistigen Eigentumsrechte am ursprünglichen Kursinhalt verbleiben bei den jeweiligen Autoren der ZHAW.
|
||||
|
||||
*Hinweis für Rechteinhaber:* Dieses Dokument wird ausschliesslich zu Bildungszwecken geteilt. Wenn Sie Rechteinhaber sind und der Aufnahme bestimmter Inhalte widersprechen, kontaktieren Sie mich bitte, und ich werde diese umgehend entfernen.
|
||||
|
||||
Sofern nicht anders angegeben, wurden alle Grafiken persönlich erstellt.
|
||||
|
||||
Fehler können per E-Mail an #link("mailto:ruhjir01@students.zhaw.ch") gemeldet werden.
|
||||
|
||||
Jirayu Ruh
|
||||
|
||||
#datetime.today().display("[day]. [month repr:long] [year]")
|
||||
|
||||
= Credits
|
||||
|
||||
#pagebreak()
|
||||
@@ -0,0 +1,32 @@
|
||||
//ltex: language=de-ch
|
||||
|
||||
#import "setup.typ": *
|
||||
#import "preamble.typ": *
|
||||
|
||||
#show: setup
|
||||
|
||||
#page(numbering: none)[
|
||||
#include "sections/disclaimer.typ"
|
||||
]
|
||||
|
||||
#align(
|
||||
center,
|
||||
[
|
||||
#set par(spacing: 0.4em)
|
||||
#text(
|
||||
size: 11pt,
|
||||
[
|
||||
#context document.title
|
||||
],
|
||||
)
|
||||
|
||||
#text(
|
||||
size: 7pt,
|
||||
[
|
||||
von #context paperauthor, Fehler bitte an #context email
|
||||
],
|
||||
)
|
||||
],
|
||||
)
|
||||
|
||||
#counter(page).update(1)
|
||||
@@ -0,0 +1,175 @@
|
||||
// TODO: Change ltex language
|
||||
//ltex: language=de-ch
|
||||
|
||||
//==============================
|
||||
// VARIABLE IMPORTS
|
||||
//==============================
|
||||
|
||||
#import "setup.typ": *
|
||||
|
||||
//==============================
|
||||
// PACKAGE IMPORTS
|
||||
//==============================
|
||||
|
||||
#import "@preview/catppuccin:1.1.0": catppuccin, flavors
|
||||
#import "@preview/cetz:0.5.2"
|
||||
#import "@preview/cetz-plot:0.1.4"
|
||||
#import "@preview/zap:0.6.0"
|
||||
|
||||
//==============================
|
||||
// COLORS
|
||||
//==============================
|
||||
|
||||
#let flavor = if is_dark_theme {
|
||||
flavors.macchiato
|
||||
} else {
|
||||
flavors.latte
|
||||
}
|
||||
|
||||
#let palette = flavor.colors
|
||||
|
||||
#let CtpRosewater = palette.rosewater.rgb
|
||||
#let CtpFlamingo = palette.flamingo.rgb
|
||||
#let CtpPink = palette.pink.rgb
|
||||
#let CtpMauve = palette.mauve.rgb
|
||||
#let CtpRed = palette.red.rgb
|
||||
#let CtpMaroon = palette.maroon.rgb
|
||||
#let CtpPeach = palette.peach.rgb
|
||||
#let CtpYellow = palette.yellow.rgb
|
||||
#let CtpGreen = palette.green.rgb
|
||||
#let CtpTeal = palette.teal.rgb
|
||||
#let CtpSky = palette.sky.rgb
|
||||
#let CtpSaphire = palette.sapphire.rgb
|
||||
#let CtpBlue = palette.blue.rgb
|
||||
#let CtpLavender = palette.lavender.rgb
|
||||
#let CtpText = palette.text.rgb
|
||||
#let CtpBase = palette.base.rgb
|
||||
#let CtpSurface0 = palette.surface0.rgb
|
||||
|
||||
// TODO: Change MainColor
|
||||
|
||||
#let MainColor = CtpPeach
|
||||
|
||||
|
||||
//==============================
|
||||
// Big Box & Equation Box
|
||||
//==============================
|
||||
|
||||
#let bigbox(body) = align(center)[
|
||||
#block(
|
||||
fill: none,
|
||||
stroke: 5pt + color.mix((MainColor, 20%), (CtpBase, 80%)),
|
||||
inset: 5pt,
|
||||
width: 100% - 5pt,
|
||||
align(left)[#body],
|
||||
)
|
||||
]
|
||||
|
||||
#let smallbox(body) = align(center)[
|
||||
#block(
|
||||
fill: none,
|
||||
stroke: 1pt + color.mix((MainColor, 20%), (CtpBase, 80%)),
|
||||
inset: 5pt,
|
||||
width: 100% - 1pt,
|
||||
align(left)[#body],
|
||||
)
|
||||
]
|
||||
|
||||
#let eqbox(body) = box(
|
||||
fill: color.mix((MainColor, 20%), (CtpBase, 80%)),
|
||||
stroke: 2pt + color.mix((MainColor, 40%), (CtpBase, 60%)),
|
||||
inset: 2pt,
|
||||
body,
|
||||
)
|
||||
|
||||
//==============================
|
||||
// SETUP
|
||||
//==============================
|
||||
|
||||
#let setup(body) = {
|
||||
show: catppuccin.with(flavor)
|
||||
|
||||
set columns(gutter: 7pt)
|
||||
|
||||
set page(
|
||||
paper: "a4",
|
||||
flipped: true,
|
||||
columns: 3,
|
||||
fill: if not is_dark_theme {
|
||||
none
|
||||
} else {
|
||||
CtpBase
|
||||
},
|
||||
margin: (left: 0.6cm, right: 0.6cm, top: 0.6cm, bottom: 0.9cm),
|
||||
numbering: "1",
|
||||
)
|
||||
|
||||
set text(
|
||||
size: 8pt,
|
||||
lang: if is_german { "de" } else { "en" },
|
||||
region: if is_german { "ch" } else { "us" },
|
||||
)
|
||||
|
||||
set document(
|
||||
title: papertitle,
|
||||
author: paperauthor,
|
||||
)
|
||||
|
||||
set par(
|
||||
justify: true,
|
||||
leading: 0.75em,
|
||||
)
|
||||
|
||||
show math.equation.where(block: false): it => {
|
||||
set text(top-edge: "bounds", bottom-edge: "bounds")
|
||||
math.display(it)
|
||||
}
|
||||
show math.equation.where(block: true): set block(above: 0.1em, below: 0.1em)
|
||||
|
||||
show heading.where(level: 1): it => {
|
||||
v(-6pt)
|
||||
block(
|
||||
width: 100%,
|
||||
fill: color.mix((MainColor, 60%), (CtpBase, 40%)),
|
||||
inset: (top: 2pt, bottom: 4pt, left: 2pt, right: 2pt),
|
||||
text(
|
||||
fill: CtpText,
|
||||
size: 11pt,
|
||||
weight: "bold",
|
||||
it.body,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
show heading.where(level: 2): it => {
|
||||
v(-9pt)
|
||||
block(
|
||||
width: 100%,
|
||||
fill: color.mix((MainColor, 40%), (CtpBase, 60%)),
|
||||
inset: (top: 2pt, bottom: 4pt, left: 2pt, right: 2pt),
|
||||
text(
|
||||
fill: CtpText,
|
||||
size: 8pt,
|
||||
weight: "bold",
|
||||
it.body,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
show heading.where(level: 3): it => {
|
||||
v(-9pt)
|
||||
block(
|
||||
width: 100%,
|
||||
fill: color.mix((MainColor, 20%), (CtpBase, 80%)),
|
||||
inset: (top: 2pt, bottom: 4pt, left: 2pt, right: 2pt),
|
||||
text(
|
||||
fill: CtpText,
|
||||
size: 8pt,
|
||||
weight: "bold",
|
||||
it.body,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
body
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
//ltex: language=de-ch
|
||||
|
||||
//==============================
|
||||
// SETUP
|
||||
//==============================
|
||||
|
||||
// TODO: Change Title, Author, and email
|
||||
|
||||
#let papertitle = [Title]
|
||||
#let paperauthor = "J. Ruh"
|
||||
#let email = link("mailto:ruhjir01@students.zhaw.ch")
|
||||
|
||||
// TODO: Change language and theme
|
||||
|
||||
#let is_german = true
|
||||
#let is_dark_theme = false
|
||||
|
||||
#let pic_path = if is_dark_theme { "./fig/dark" } else { "./fig/light" }
|
||||
@@ -0,0 +1,25 @@
|
||||
// TODO: Change language
|
||||
//ltex: language=de-ch
|
||||
|
||||
#import "../setup.typ": *
|
||||
#import "../preamble.typ": *
|
||||
|
||||
= DISCLAIMER
|
||||
|
||||
Diese Notizen basiert auf der Vorlesung "" von .
|
||||
|
||||
Ich übernehme keine Haftung für mögliche Fehler in den Notizen. Bitte beachten Sie, dass diese Notizen unter Zuhilfenahme von Gemini Notebook erstellt wurde. Obwohl KI ein leistungsstarkes Werkzeug ist, kann sie technische Ungenauigkeiten oder sogenannte „Halluzinationen“ erzeugen. Darüber hinaus habe ich Abschnitte paraphrasiert und eigene Beobachtungen hinzugefügt, was weitere Fehlerquellen darstellen kann.
|
||||
|
||||
*Urheberrecht & Inhaltlicher Hinweis:* Dies ist eine inoffizielle Ressource; sie steht in keiner Verbindung zur ZHAW und wird von dieser nicht unterstützt. Da diese Notizen mit Hilfe von KI erstellt wurden, kann ich nicht garantieren, dass alle Inhalte ausreichend umformuliert wurden. Einige Abschnitte können den ursprünglichen Präsentationsfolien oder Skripten stark ähneln oder diese direkt zitieren. Alle geistigen Eigentumsrechte am ursprünglichen Kursinhalt verbleiben bei den jeweiligen Autoren der ZHAW.
|
||||
|
||||
*Hinweis für Rechteinhaber:* Dieses Dokument wird ausschliesslich zu Bildungszwecken geteilt. Wenn Sie Rechteinhaber sind und der Aufnahme bestimmter Inhalte widersprechen, kontaktieren Sie mich bitte, und ich werde diese umgehend entfernen.
|
||||
|
||||
Sofern nicht anders angegeben, wurden alle Grafiken persönlich erstellt.
|
||||
|
||||
Fehler können per E-Mail an #link("mailto:ruhjir01@students.zhaw.ch") gemeldet werden.
|
||||
|
||||
Jirayu Ruh
|
||||
|
||||
= Credits
|
||||
|
||||
#pagebreak()
|
||||
@@ -0,0 +1,31 @@
|
||||
#import "setup.typ": *
|
||||
#import "preamble.typ": *
|
||||
|
||||
#show: setup
|
||||
|
||||
#page(header: none, footer: none)[
|
||||
#set align(center)
|
||||
#title[#context document.title]
|
||||
#v(2cm)
|
||||
#text(size: 14pt, weight: "bold")[
|
||||
#context paperauthor
|
||||
]
|
||||
#v(0.5cm)
|
||||
#text(size: 14pt, weight: "bold")[
|
||||
#context paperdate
|
||||
]
|
||||
]
|
||||
|
||||
#page(numbering: none)[
|
||||
#include "sections/disclaimer.typ"
|
||||
]
|
||||
|
||||
#set page(numbering: "i")
|
||||
#counter(page).update(1)
|
||||
#customtoc()
|
||||
#pagebreak()
|
||||
|
||||
|
||||
#set page(numbering: "1")
|
||||
#counter(page).update(1)
|
||||
|
||||
@@ -0,0 +1,771 @@
|
||||
// TODO: Change ltex language
|
||||
//ltex: language=de-ch
|
||||
|
||||
//==============================
|
||||
// VARIABLE IMPORTS
|
||||
//==============================
|
||||
|
||||
#import "setup.typ": *
|
||||
|
||||
//==============================
|
||||
// PACKAGE IMPORTS
|
||||
//==============================
|
||||
|
||||
#import "@preview/catppuccin:1.1.0": catppuccin, flavors
|
||||
#import "@preview/cetz:0.5.2"
|
||||
|
||||
//==============================
|
||||
// COLORS
|
||||
//==============================
|
||||
|
||||
#let flavor = if is_dark_theme {
|
||||
flavors.macchiato
|
||||
} else {
|
||||
flavors.latte
|
||||
}
|
||||
|
||||
#let palette = flavor.colors
|
||||
|
||||
#let CtpRosewater = palette.rosewater.rgb
|
||||
#let CtpFlamingo = palette.flamingo.rgb
|
||||
#let CtpPink = palette.pink.rgb
|
||||
#let CtpMauve = palette.mauve.rgb
|
||||
#let CtpRed = palette.red.rgb
|
||||
#let CtpMaroon = palette.maroon.rgb
|
||||
#let CtpPeach = palette.peach.rgb
|
||||
#let CtpYellow = palette.yellow.rgb
|
||||
#let CtpGreen = palette.green.rgb
|
||||
#let CtpTeal = palette.teal.rgb
|
||||
#let CtpSky = palette.sky.rgb
|
||||
#let CtpSaphire = palette.sapphire.rgb
|
||||
#let CtpBlue = palette.blue.rgb
|
||||
#let CtpLavender = palette.lavender.rgb
|
||||
#let CtpText = palette.text.rgb
|
||||
#let CtpBase = palette.base.rgb
|
||||
#let CtpSurface0 = palette.surface0.rgb
|
||||
|
||||
// TODO: Define MainColor
|
||||
|
||||
// #let MainColor =
|
||||
|
||||
//==============================
|
||||
// COUNTERS
|
||||
//==============================
|
||||
|
||||
#let def-counter = counter("definition")
|
||||
#let thm-counter = counter("theorem")
|
||||
#let cor-counter = counter("corollary")
|
||||
#let lem-counter = counter("lemma")
|
||||
#let prop-counter = counter("proposition")
|
||||
#let claim-counter = counter("claim")
|
||||
#let q-counter = counter("question")
|
||||
#let exe-counter = counter("exercise")
|
||||
#let exa-counter = counter("example")
|
||||
|
||||
//==============================
|
||||
// CUSTOM TOC
|
||||
//==============================
|
||||
|
||||
#let customtoc() = {
|
||||
set page(numbering: none, header: none, footer: none)
|
||||
set par(spacing: 0em)
|
||||
|
||||
layout(size => {
|
||||
let text-size = 25pt
|
||||
let box-height = 1.75cm
|
||||
|
||||
let blue-bg-width = 8cm
|
||||
let right-margin = 2.5cm
|
||||
|
||||
let box-left-edge = (size.width - blue-bg-width) + right-margin
|
||||
|
||||
let shift = 0cm
|
||||
if is_german { shift = 4cm } else { shift = 2cm }
|
||||
let text-dx = box-left-edge - shift
|
||||
|
||||
let title-text(fill-color) = text(
|
||||
size: text-size,
|
||||
weight: "bold",
|
||||
font: "Libertinus Serif",
|
||||
fill: fill-color,
|
||||
)[#toctitle]
|
||||
|
||||
box(width: 100%, height: box-height)[
|
||||
#place(left + horizon, dx: text-dx, title-text(CtpBlue.lighten(40%)))
|
||||
|
||||
#place(right, dx: right-margin, box(
|
||||
width: blue-bg-width,
|
||||
height: 100%,
|
||||
fill: CtpBlue.lighten(40%),
|
||||
clip: true,
|
||||
radius: (left: 2pt),
|
||||
{
|
||||
let relative-dx = text-dx - box-left-edge
|
||||
place(left + horizon, dx: relative-dx, title-text(white))
|
||||
},
|
||||
))
|
||||
]
|
||||
})
|
||||
|
||||
v(1cm)
|
||||
|
||||
context {
|
||||
let headings = query(heading.where(outlined: true))
|
||||
|
||||
for (i, head) in headings.enumerate() {
|
||||
let parent_l2 = headings.slice(0, i + 1).rev().find(h => h.level == 2)
|
||||
|
||||
let ghost_spacing_section = if parent_l2 != none and parent_l2.numbering != none {
|
||||
hide(box(inset: (x: 5pt, y: 6pt), radius: 1pt)[
|
||||
#text(weight: "bold", size: 13pt)[
|
||||
#chaptertitle
|
||||
#let nums = counter(heading).at(parent_l2.location())
|
||||
#if nums.len() > 1 { numbering("1.1", ..nums.slice(1)) } else { numbering(parent_l2.numbering, ..nums) }
|
||||
]
|
||||
])
|
||||
h(0.8em)
|
||||
} else { none }
|
||||
|
||||
let ghost_spacing_sub = if parent_l2 != none and parent_l2.numbering != none {
|
||||
hide(box(inset: (x: 5pt, y: 3pt), radius: 1pt)[
|
||||
#text(weight: "bold", size: 13pt)[
|
||||
#chaptertitle
|
||||
#let nums = counter(heading).at(parent_l2.location())
|
||||
#if nums.len() > 1 { numbering("1.1", ..nums.slice(1)) } else { numbering(parent_l2.numbering, ..nums) }
|
||||
]
|
||||
])
|
||||
h(0.8em)
|
||||
} else { none }
|
||||
|
||||
if head.level == 1 {
|
||||
link(head.location())[
|
||||
#block(width: 100%, inset: (top: 20pt, bottom: 15pt))[
|
||||
#text(size: 16pt, weight: "bold", fill: CtpBlue)[
|
||||
#if head.numbering != none [
|
||||
#numbering(head.numbering, ..counter(heading).at(head.location()))
|
||||
#h(1.5em)
|
||||
]
|
||||
#head.body
|
||||
]
|
||||
#h(1fr)
|
||||
#text(size: 16pt, weight: "bold", fill: CtpText)[#head.location().page()]
|
||||
]
|
||||
]
|
||||
} else if head.level == 2 {
|
||||
link(head.location())[
|
||||
#block(width: 100%)[
|
||||
#box(width: 100%)[
|
||||
#set align(horizon)
|
||||
#box(fill: CtpBlue.lighten(40%), inset: (x: 5pt, y: 0pt), outset: (y: 6pt), radius: 1pt)[
|
||||
#text(fill: white, weight: "bold", size: 13pt)[
|
||||
#chaptertitle
|
||||
#let nums = counter(heading).at(head.location())
|
||||
#if nums.len() > 1 { numbering("1.1", ..nums.slice(1)) } else { numbering(head.numbering, ..nums) }
|
||||
]
|
||||
]
|
||||
#h(0.8em)
|
||||
#text(fill: CtpBlue, size: 13pt)[#head.body]
|
||||
#h(0.5em)
|
||||
#box(width: 1fr, height: 7pt, align(bottom, line(
|
||||
length: 100%,
|
||||
stroke: 0.3pt + CtpText,
|
||||
)))
|
||||
#h(0.5em)
|
||||
#box(
|
||||
text(fill: CtpText, size: 13pt)[
|
||||
#pagetitle
|
||||
#head.location().page()
|
||||
],
|
||||
)
|
||||
#let right-margin = 2.54cm
|
||||
#place(
|
||||
right,
|
||||
dx: right-margin,
|
||||
box(
|
||||
width: right-margin - 0.5em,
|
||||
height: 0pt,
|
||||
align(bottom, line(
|
||||
length: 100%,
|
||||
stroke: 0.3pt + CtpText,
|
||||
)),
|
||||
),
|
||||
)
|
||||
]
|
||||
]
|
||||
]
|
||||
} else if head.level == 3 {
|
||||
link(head.location())[
|
||||
#block(width: 100%)[
|
||||
#box(width: 100%)[
|
||||
#set align(horizon)
|
||||
#ghost_spacing_section
|
||||
#text(fill: CtpText, size: 10.5pt)[
|
||||
#if head.numbering != none [
|
||||
#let nums = counter(heading).at(head.location())
|
||||
#if nums.len() > 1 { numbering("1.1", ..nums.slice(1)) } else { numbering(head.numbering, ..nums) }
|
||||
#h(0.8em)
|
||||
]
|
||||
]
|
||||
#text(fill: CtpBlue, size: 10.5pt)[#head.body]
|
||||
#h(1fr)
|
||||
#text(fill: CtpText, size: 10.5pt)[
|
||||
#head.location().page()
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
} else if head.level == 4 {
|
||||
let is_first = i == 0 or headings.at(i - 1).level != 4
|
||||
let is_last = i == headings.len() - 1 or headings.at(i + 1).level != 4
|
||||
if is_first {
|
||||
ghost_spacing_sub
|
||||
}
|
||||
link(head.location())[
|
||||
#text(fill: CtpBlue, size: 10pt)[
|
||||
#head.body
|
||||
]
|
||||
#text(fill: CtpText, size: 10pt)[
|
||||
--- #head.location().page()
|
||||
]
|
||||
]
|
||||
if not is_last {
|
||||
text(fill: CtpText.lighten(20%), size: 10pt)[
|
||||
#h(0.5em) • #h(0.5em)
|
||||
]
|
||||
} else {
|
||||
parbreak()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//==============================
|
||||
// BOXES
|
||||
//==============================
|
||||
|
||||
//------------------------------
|
||||
// DEFINITION
|
||||
//------------------------------
|
||||
|
||||
#let definition(title, body) = {
|
||||
let border-color = color.mix((CtpRed, 80%), (CtpText, 20%))
|
||||
let bg-color = CtpSurface0
|
||||
|
||||
let badge-edge = color.mix((CtpRed, 60%), (CtpText, 40%))
|
||||
let badge-mid = color.mix((CtpRed, 80%), (CtpText, 20%))
|
||||
let badge-bg = gradient.linear(badge-edge, badge-mid, badge-edge)
|
||||
|
||||
block(width: 100%, breakable: false)[
|
||||
#v(16pt)
|
||||
#def-counter.step()
|
||||
|
||||
#block(
|
||||
width: 100%,
|
||||
fill: bg-color,
|
||||
stroke: 1.5pt + border-color,
|
||||
radius: 5pt,
|
||||
inset: (top: 24pt, bottom: 15pt, left: 15pt, right: 15pt),
|
||||
)[
|
||||
#set text(fill: CtpText)
|
||||
#body
|
||||
]
|
||||
|
||||
#place(
|
||||
top + left,
|
||||
dx: 25pt,
|
||||
dy: 4pt,
|
||||
box(fill: badge-bg, inset: (x: 12pt, y: 6pt), radius: 4pt)[
|
||||
#text(fill: white, weight: "bold", size: 11pt)[
|
||||
#context {
|
||||
let h-nums = counter(heading).get().slice(0, 2)
|
||||
let all-nums = h-nums + def-counter.get()
|
||||
let numbering-string = all-nums.map(str).join(".")
|
||||
[Definition #numbering-string: #title]
|
||||
}
|
||||
]
|
||||
],
|
||||
)
|
||||
]
|
||||
}
|
||||
|
||||
//------------------------------
|
||||
// THEOREM
|
||||
//------------------------------
|
||||
|
||||
#let theorem(body) = {
|
||||
let border-color = CtpLavender
|
||||
let bg-color = CtpSurface0
|
||||
let text-color = CtpText
|
||||
|
||||
block(
|
||||
width: 100%,
|
||||
fill: bg-color,
|
||||
stroke: (left: 4pt + border-color),
|
||||
inset: (top: 12pt, bottom: 12pt, left: 16pt, right: 12pt),
|
||||
breakable: true,
|
||||
)[
|
||||
#thm-counter.step()
|
||||
|
||||
#context {
|
||||
let h-nums = counter(heading).get().slice(0, 2)
|
||||
let all-nums = h-nums + thm-counter.get()
|
||||
let numbering-string = all-nums.map(str).join(".")
|
||||
|
||||
text(fill: border-color, weight: "bold", size: 11pt)[
|
||||
#theorytitle #numbering-string
|
||||
]
|
||||
}
|
||||
|
||||
#v(0.5em, weak: true)
|
||||
|
||||
#set text(fill: text-color)
|
||||
#body
|
||||
]
|
||||
}
|
||||
|
||||
//------------------------------
|
||||
// COROLLARY
|
||||
//------------------------------
|
||||
|
||||
#let corollary(body) = {
|
||||
let border-color = CtpMauve
|
||||
let bg-color = CtpSurface0
|
||||
let text-color = CtpText
|
||||
|
||||
block(
|
||||
width: 100%,
|
||||
fill: bg-color,
|
||||
stroke: (left: 4pt + border-color),
|
||||
inset: (top: 12pt, bottom: 12pt, left: 16pt, right: 12pt),
|
||||
breakable: true,
|
||||
)[
|
||||
#cor-counter.step()
|
||||
#context {
|
||||
let h-nums = counter(heading).get().slice(0, 2)
|
||||
let all-nums = h-nums + cor-counter.get()
|
||||
let numbering-string = all-nums.map(str).join(".")
|
||||
|
||||
text(fill: border-color, weight: "bold", size: 11pt)[
|
||||
#corollarytitle #numbering-string
|
||||
]
|
||||
}
|
||||
#v(0.5em, weak: true)
|
||||
#set text(fill: text-color)
|
||||
#body
|
||||
]
|
||||
}
|
||||
|
||||
//-----------------------------
|
||||
// LEMMA
|
||||
//-----------------------------
|
||||
|
||||
#let lemma(body) = {
|
||||
let border-color = CtpPeach
|
||||
let bg-color = CtpSurface0
|
||||
let text-color = CtpText
|
||||
|
||||
block(
|
||||
width: 100%,
|
||||
fill: bg-color,
|
||||
stroke: (left: 4pt + border-color),
|
||||
inset: (top: 12pt, bottom: 12pt, left: 16pt, right: 12pt),
|
||||
breakable: true,
|
||||
)[
|
||||
#lem-counter.step()
|
||||
|
||||
#context {
|
||||
let h-nums = counter(heading).get().slice(0, 2)
|
||||
let all-nums = h-nums + lem-counter.get()
|
||||
let numbering-string = all-nums.map(str).join(".")
|
||||
|
||||
text(fill: border-color, weight: "bold", size: 11pt)[
|
||||
Lemma #numbering-string
|
||||
]
|
||||
}
|
||||
|
||||
#v(0.5em, weak: true)
|
||||
|
||||
#set text(fill: text-color)
|
||||
#body
|
||||
]
|
||||
}
|
||||
|
||||
//------------------------------
|
||||
// PROPOSITION
|
||||
//------------------------------
|
||||
|
||||
#let proposition(body) = {
|
||||
let border-color = CtpSky
|
||||
let bg-color = CtpSurface0
|
||||
let text-color = CtpText
|
||||
|
||||
block(
|
||||
width: 100%,
|
||||
fill: bg-color,
|
||||
stroke: (left: 4pt + border-color),
|
||||
inset: (top: 12pt, bottom: 12pt, left: 16pt, right: 12pt),
|
||||
breakable: true,
|
||||
)[
|
||||
// Step the proposition counter
|
||||
#prop-counter.step()
|
||||
|
||||
// 1. The Dynamic Title
|
||||
#context {
|
||||
// Grab heading numbers up to level 2 and combine with proposition count
|
||||
let h-nums = counter(heading).get().slice(0, 2)
|
||||
let all-nums = h-nums + prop-counter.get()
|
||||
let numbering-string = all-nums.map(str).join(".")
|
||||
|
||||
text(fill: border-color, weight: "bold", size: 11pt)[
|
||||
#proposaltitle #numbering-string
|
||||
]
|
||||
}
|
||||
|
||||
// 2. Spacing between title and body
|
||||
#v(0.5em, weak: true)
|
||||
|
||||
// 3. The Body Content
|
||||
#set text(fill: text-color)
|
||||
#body
|
||||
]
|
||||
}
|
||||
|
||||
//------------------------------
|
||||
// CLAIM
|
||||
//------------------------------
|
||||
|
||||
#let claim(title, body) = {
|
||||
let border-color = CtpGreen
|
||||
let bg-color = CtpSurface0
|
||||
let text-color = CtpText
|
||||
|
||||
block(
|
||||
width: 100%,
|
||||
fill: bg-color,
|
||||
stroke: (left: 4pt + border-color),
|
||||
inset: (top: 12pt, bottom: 12pt, left: 16pt, right: 12pt),
|
||||
breakable: true,
|
||||
)[
|
||||
#claim-counter.step()
|
||||
|
||||
#context {
|
||||
let h-nums = counter(heading).get().slice(0, 2)
|
||||
let all-nums = h-nums + claim-counter.get()
|
||||
let numbering-string = all-nums.map(str).join(".")
|
||||
|
||||
text(fill: border-color)[
|
||||
#text(weight: "bold", size: 11pt)[#claimtitle #numbering-string]
|
||||
#if title != none [ #text(weight: "regular", size: 11pt)[#title] ]
|
||||
]
|
||||
}
|
||||
|
||||
#v(0.5em, weak: true)
|
||||
|
||||
#set text(fill: text-color)
|
||||
#body
|
||||
]
|
||||
}
|
||||
|
||||
//------------------------------
|
||||
// EXERCISE
|
||||
//------------------------------
|
||||
|
||||
#let exercise(title, body) = {
|
||||
let border-color = CtpBlue
|
||||
let bg-color = CtpSurface0
|
||||
let text-color = CtpText
|
||||
|
||||
block(
|
||||
width: 100%,
|
||||
fill: bg-color,
|
||||
stroke: (left: 4pt + border-color),
|
||||
inset: (top: 12pt, bottom: 12pt, left: 16pt, right: 12pt),
|
||||
breakable: true,
|
||||
)[
|
||||
#exe-counter.step()
|
||||
|
||||
#context {
|
||||
let h-nums = counter(heading).get().slice(0, 2)
|
||||
let all-nums = h-nums + exe-counter.get()
|
||||
let numbering-string = all-nums.map(str).join(".")
|
||||
|
||||
text(fill: border-color)[
|
||||
#text(weight: "bold", size: 11pt)[Aufgabe #numbering-string]
|
||||
#if title != none [ #text(weight: "regular", size: 11pt)[ #title] ]
|
||||
]
|
||||
}
|
||||
|
||||
#v(0.5em, weak: true)
|
||||
|
||||
#set text(fill: text-color)
|
||||
#body
|
||||
]
|
||||
}
|
||||
//------------------------------
|
||||
// EXAMPLE
|
||||
//------------------------------
|
||||
|
||||
#let example(title, body) = {
|
||||
let border-color = CtpTeal
|
||||
let bg-color = CtpSurface0
|
||||
let text-color = CtpText
|
||||
|
||||
block(
|
||||
width: 100%,
|
||||
fill: bg-color,
|
||||
stroke: 1pt + border-color,
|
||||
inset: (top: 12pt, bottom: 12pt, left: 12pt, right: 12pt),
|
||||
breakable: true,
|
||||
)[
|
||||
#exa-counter.step()
|
||||
|
||||
#context {
|
||||
let h-nums = counter(heading).get().slice(0, 2)
|
||||
let all-nums = h-nums + exa-counter.get()
|
||||
let numbering-string = all-nums.map(str).join(".")
|
||||
|
||||
text(fill: border-color)[
|
||||
#text(weight: "bold", size: 11pt)[Example #numbering-string]
|
||||
#if title != none [ #text(weight: "regular", size: 11pt)[ (#title)] ]
|
||||
]
|
||||
}
|
||||
|
||||
#v(0.5em, weak: true)
|
||||
|
||||
#set text(fill: text-color)
|
||||
#body
|
||||
]
|
||||
}
|
||||
|
||||
//------------------------------
|
||||
// SOLUTION BOX
|
||||
//------------------------------
|
||||
|
||||
#let solution(body) = {
|
||||
block(
|
||||
width: 100%,
|
||||
breakable: true,
|
||||
above: 1.2em,
|
||||
below: 1.2em,
|
||||
)[
|
||||
_*#solutiontitle:*_ #body
|
||||
]
|
||||
}
|
||||
|
||||
//------------------------------
|
||||
// QUESTION
|
||||
//------------------------------
|
||||
|
||||
#let question(body) = {
|
||||
let border-color = CtpSaphire
|
||||
let bg-color = CtpSurface0
|
||||
let text-color = CtpText
|
||||
|
||||
block(
|
||||
width: 100%,
|
||||
fill: bg-color,
|
||||
stroke: 2pt + border-color,
|
||||
radius: 4pt,
|
||||
breakable: true,
|
||||
inset: (top: 0pt, bottom: 12pt, left: 12pt, right: 12pt),
|
||||
)[
|
||||
#q-counter.step()
|
||||
|
||||
#place(
|
||||
top + left,
|
||||
dx: -13pt,
|
||||
dy: 0pt,
|
||||
block(
|
||||
fill: border-color,
|
||||
radius: (bottom-right: 12pt, top-left: 4pt),
|
||||
inset: (top: 8pt, bottom: 8pt, left: 14pt, right: 16pt),
|
||||
)[
|
||||
#text(fill: white, weight: "bold", size: 11pt)[
|
||||
#context [
|
||||
#questiontitle #q-counter.display()
|
||||
]
|
||||
]
|
||||
],
|
||||
)
|
||||
|
||||
#block(height: 28pt)
|
||||
#set text(fill: text-color)
|
||||
#body
|
||||
]
|
||||
}
|
||||
|
||||
//==============================
|
||||
// NOTE
|
||||
//==============================
|
||||
|
||||
#let note(body) = {
|
||||
let border-color = CtpText
|
||||
let bg-color = CtpSurface0
|
||||
let text-color = CtpText
|
||||
|
||||
block(
|
||||
width: 100%,
|
||||
fill: bg-color,
|
||||
stroke: 1pt + border-color,
|
||||
radius: 4pt,
|
||||
breakable: true,
|
||||
above: 2em,
|
||||
inset: (top: 18pt, bottom: 12pt, left: 12pt, right: 12pt),
|
||||
)[
|
||||
#place(
|
||||
top + left,
|
||||
dx: 16pt,
|
||||
dy: -28pt,
|
||||
box(
|
||||
fill: CtpBase,
|
||||
stroke: 1pt + border-color,
|
||||
radius: 4pt,
|
||||
inset: (x: 8pt, y: 4pt),
|
||||
)[
|
||||
#place(left + horizon, dx: -10pt)[
|
||||
#circle(radius: 2pt, fill: border-color)
|
||||
]
|
||||
|
||||
#place(right + horizon, dx: 10pt)[
|
||||
#circle(radius: 2pt, fill: border-color)
|
||||
]
|
||||
|
||||
#text(weight: "bold", size: 11pt)[Note:-]
|
||||
],
|
||||
)
|
||||
|
||||
#set text(fill: text-color)
|
||||
#body
|
||||
]
|
||||
}
|
||||
|
||||
//==============================
|
||||
// SHORTCODES
|
||||
//==============================
|
||||
|
||||
#let def(title, body) = definition(title, body)
|
||||
#let thm(body) = theorem(body)
|
||||
#let cor(body) = corollary(body)
|
||||
#let lem(body) = lemma(body)
|
||||
#let prop(body) = proposition(body)
|
||||
#let clm(title, body) = claim(title, body)
|
||||
#let exe(title, body) = exercise(title, body)
|
||||
#let qst(body) = question(body)
|
||||
#let exa(title, body) = example(title, body)
|
||||
#let sol(body) = solution(body)
|
||||
#let nt(body) = note(body)
|
||||
|
||||
//==============================
|
||||
// SETUP
|
||||
//==============================
|
||||
|
||||
#let setup(body) = {
|
||||
show: catppuccin.with(flavor)
|
||||
|
||||
set page(
|
||||
paper: "a4",
|
||||
fill: if not is_dark_theme {
|
||||
none
|
||||
} else {
|
||||
CtpBase
|
||||
},
|
||||
numbering: "1",
|
||||
)
|
||||
|
||||
set text(
|
||||
size: 11pt,
|
||||
lang: if is_german { "de" } else { "en" },
|
||||
region: if is_german { "ch" } else { "us" },
|
||||
)
|
||||
|
||||
set document(
|
||||
title: papertitle,
|
||||
author: paperauthor,
|
||||
)
|
||||
|
||||
set par(
|
||||
justify: true,
|
||||
leading: 0.75em,
|
||||
)
|
||||
|
||||
set heading(numbering: "I.1.1.1.1")
|
||||
|
||||
show math.equation.where(block: false): it => {
|
||||
math.display(it)
|
||||
}
|
||||
|
||||
//==============================
|
||||
// REPORT SETUP
|
||||
//==============================
|
||||
|
||||
//------------------------------
|
||||
// PART HEADING
|
||||
//------------------------------
|
||||
|
||||
show heading.where(level: 1): it => {
|
||||
pagebreak(weak: true)
|
||||
|
||||
align(center + horizon)[
|
||||
#text(size: 2.5em, weight: "regular")[
|
||||
Part #counter(heading).display()
|
||||
]
|
||||
#v(0em)
|
||||
#text(size: 2.5em, weight: "regular")[
|
||||
#it.body
|
||||
]
|
||||
]
|
||||
|
||||
pagebreak()
|
||||
}
|
||||
|
||||
//------------------------------
|
||||
// CHAPTER HEADING
|
||||
//------------------------------
|
||||
|
||||
show heading.where(level: 2): it => {
|
||||
def-counter.update(0)
|
||||
thm-counter.update(0)
|
||||
cor-counter.update(0)
|
||||
lem-counter.update(0)
|
||||
prop-counter.update(0)
|
||||
claim-counter.update(0)
|
||||
exe-counter.update(0)
|
||||
exa-counter.update(0)
|
||||
pagebreak(weak: true)
|
||||
v(5em)
|
||||
|
||||
// This block creates the large LaTeX-style header
|
||||
block(width: 100%)[
|
||||
#text(size: 2em, weight: "regular")[
|
||||
Chapter #counter(heading).display((..nums) => str(nums.pos().last()))
|
||||
]
|
||||
#v(0em)
|
||||
#text(size: 2.5em, weight: "regular")[
|
||||
#it.body
|
||||
]
|
||||
]
|
||||
|
||||
v(1.5em)
|
||||
}
|
||||
|
||||
|
||||
//------------------------------
|
||||
// HEADING NUMBERING
|
||||
//------------------------------
|
||||
|
||||
set heading(numbering: (..nums) => {
|
||||
let vals = nums.pos()
|
||||
|
||||
if vals.len() == 1 {
|
||||
numbering("I", ..vals)
|
||||
} else if vals.len() == 2 {
|
||||
numbering("1", ..vals.slice(1))
|
||||
} else {
|
||||
numbering("1.1", ..vals.slice(1))
|
||||
}
|
||||
})
|
||||
|
||||
body
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
//==============================
|
||||
// SETUP
|
||||
//==============================
|
||||
|
||||
// TODO: Change papertitle
|
||||
#let papertitle = []
|
||||
#let paperauthor = "J. Ruh"
|
||||
#let email = link("mailto:ruhjir01@students.zhaw.ch")
|
||||
|
||||
// TODO: Change language and theme
|
||||
#let is_german = true
|
||||
#let is_dark_theme = false
|
||||
|
||||
#let pic_path = if is_dark_theme { "./Bilder/dark" } else { "./Bilder/light" }
|
||||
@@ -1,4 +0,0 @@
|
||||
next_page J
|
||||
previous_page K
|
||||
|
||||
toggle_dark_mode d
|
||||
@@ -1 +0,0 @@
|
||||
background_color 0 0 0
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export WHITE="0xffeeeeee"
|
||||
|
||||
# -- Catppuccin --
|
||||
export BAR_COLOR="0xff24273a"
|
||||
export ITEM_BG_COLOR="0xff494d64"
|
||||
export RED="0xffed8796"
|
||||
export PEACH="0xfff5a97f"
|
||||
export YELLOW="0xffeed49f"
|
||||
export GREEN="0xffa6da95"
|
||||
export BLUE="0xff8aadf4"
|
||||
export TEXT="0xffcad3f5"
|
||||
export MAUVE="0xffc6a0f6"
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
sketchybar --add item battery right \
|
||||
--set battery update_freq=120 \
|
||||
script="$PLUGIN_DIR/battery.sh" \
|
||||
click_script="$PLUGIN_DIR/battery_popup.sh" \
|
||||
--subscribe battery system_woke power_source_change
|
||||
|
||||
sketchybar --add item batteryStatus popup.battery
|
||||
|
||||
sketchybar --add item batteryMaintain popup.battery
|
||||
|
||||
sketchybar --add item batteryCharge popup.battery
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
sketchybar --add item calendar right \
|
||||
--set calendar icon= \
|
||||
update_freq=1 \
|
||||
script="$PLUGIN_DIR/calendar.sh"
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
sketchybar --add item front_app e \
|
||||
--set front_app background.color=$ITEM_BG_COLOR \
|
||||
icon.color=$BLUE \
|
||||
icon.font="sketchybar-app-font:Regular:16.0" \
|
||||
label.color=$BLUE \
|
||||
script="$PLUGIN_DIR/front_app.sh" \
|
||||
associated_display=1 \
|
||||
--subscribe front_app front_app_switched
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
sketchybar --add item pomodoro q \
|
||||
--set pomodoro update_freq=1 \
|
||||
associated_display=1 \
|
||||
script="$PLUGIN_DIR/pomodoro.sh" \
|
||||
click_script="$PLUGIN_DIR/pomodoro_popup.sh"
|
||||
|
||||
sketchybar --add item focus popup.pomodoro
|
||||
|
||||
sketchybar --add item shortBreak popup.pomodoro
|
||||
|
||||
sketchybar --add item longBreak popup.pomodoro
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
sketchybar --add event aerospace_workspace_change
|
||||
|
||||
SPACE_STRS=( )
|
||||
|
||||
for str in "${SPACE_STRS[@]}"
|
||||
do
|
||||
sketchybar -m --add space $str left \
|
||||
--subscribe $str aerospace_workspace_change \
|
||||
--set $str icon=$str \
|
||||
associated_display=1 \
|
||||
label.font="sketchybar-app-font:Regular:16.0" \
|
||||
script="$PLUGIN_DIR/space.sh $str"
|
||||
done
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
sketchybar --add item volume right \
|
||||
--set volume script="$PLUGIN_DIR/volume.sh" \
|
||||
--subscribe volume volume_change \
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
sketchybar --add item wifi right \
|
||||
--set wifi update_freq=10 \
|
||||
script="$PLUGIN_DIR/wifi.sh"
|
||||
@@ -1,39 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
PERCENTAGE="$(pmset -g batt | grep -Eo "\d+%" | cut -d% -f1)"
|
||||
CHARGING="$(pmset -g batt | grep 'AC Power')"
|
||||
|
||||
if [ "$PERCENTAGE" = "" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case "${PERCENTAGE}" in
|
||||
9[0-9]|100)
|
||||
ICON=""
|
||||
COLOR="0xFFA6DA95"
|
||||
;;
|
||||
[6-8][0-9])
|
||||
ICON=""
|
||||
COLOR="0xFFEED49F"
|
||||
;;
|
||||
[3-5][0-9])
|
||||
ICON=""
|
||||
COLOR="0xFFF5A97F"
|
||||
;;
|
||||
[1-2][0-9])
|
||||
ICON=""
|
||||
COLOR="0xFFED8796"
|
||||
;;
|
||||
*)
|
||||
ICON=""
|
||||
COLOR="0xFFED8796"
|
||||
esac
|
||||
|
||||
if [[ "$CHARGING" != "" ]]; then
|
||||
ICON=""
|
||||
COLOR="0xFFA6DA95"
|
||||
fi
|
||||
|
||||
# The item invoking this script (name $NAME) will get its icon and label
|
||||
# updated with the current battery status
|
||||
sketchybar --set "$NAME" icon.color="$COLOR" icon="$ICON" label.color="$COLOR" label="${PERCENTAGE}%"
|
||||
@@ -1,31 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
sketchybar --set battery popup.drawing=toggle \
|
||||
popup.background.drawing=on \
|
||||
popup.background.color="0xff363a4f" \
|
||||
popup.background.corner_radius=3
|
||||
|
||||
|
||||
if /usr/local/bin/battery status | grep -q 'Your battery'; then
|
||||
sketchybar --set batteryStatus label="Maintaining" \
|
||||
label.color="0xffa6da95"
|
||||
sketchybar --set batteryMaintain label="Stop Maintaining" \
|
||||
label.color="0xffed8796" \
|
||||
click_script="/usr/local/bin/battery maintain stop && sketchybar --set battery popup.drawing=toggle"
|
||||
else
|
||||
sketchybar --set batteryStatus label="Not Maintaining" \
|
||||
label.color="0xffed8796"
|
||||
sketchybar --set batteryMaintain label="Maintain" \
|
||||
label.color="0xffa6da95" \
|
||||
click_script="/usr/local/bin/battery maintain 80 && sketchybar --set battery popup.drawing=toggle"
|
||||
fi
|
||||
|
||||
if [[ "$CHARGING" != "" ]]; then
|
||||
sketchybar --set batteryCharge label="Stop Charging" \
|
||||
label.color="0xffed8796"\
|
||||
click_script="/usr/local/bin/battery charging off && sketchybar --set battery popup.drawing=toggle"
|
||||
else
|
||||
sketchybar --set batteryCharge label="Start Charging" \
|
||||
label.color="0xffa6da95"\
|
||||
click_script="/usr/local/bin/battery charging on && sketchybar --set battery popup.drawing=toggle"
|
||||
fi
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
sketchybar --set $NAME label="$(date +'%a %d %b %H:%M:%S')"
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$SENDER" = "front_app_switched" ]; then
|
||||
sketchybar --set $NAME label="$INFO" icon="$($CONFIG_DIR/plugins/icon_map_fn.sh "$INFO")"
|
||||
fi
|
||||
@@ -1,435 +0,0 @@
|
||||
|
||||
function icon_map() {
|
||||
case "$1" in
|
||||
"Keynote" | "Keynote 讲演")
|
||||
icon_result=":keynote:"
|
||||
;;
|
||||
"Figma")
|
||||
icon_result=":figma:"
|
||||
;;
|
||||
"VMware Fusion")
|
||||
icon_result=":vmware_fusion:"
|
||||
;;
|
||||
"Alacritty" | "Hyper" | "iTerm2" | "kitty" | "Terminal" | "终端" | "WezTerm")
|
||||
icon_result=":terminal:"
|
||||
;;
|
||||
"Microsoft To Do" | "Things")
|
||||
icon_result=":things:"
|
||||
;;
|
||||
"Keyboard Maestro")
|
||||
icon_result=":keyboard_maestro:"
|
||||
;;
|
||||
"App Store")
|
||||
icon_result=":app_store:"
|
||||
;;
|
||||
"CleanMyMac X")
|
||||
icon_result=":desktop:"
|
||||
;;
|
||||
"Android Messages")
|
||||
icon_result=":android_messages:"
|
||||
;;
|
||||
"Reeder")
|
||||
icon_result=":reeder5:"
|
||||
;;
|
||||
"Joplin")
|
||||
icon_result=":joplin:"
|
||||
;;
|
||||
"Discord" | "Discord Canary" | "Discord PTB")
|
||||
icon_result=":discord:"
|
||||
;;
|
||||
"Logseq")
|
||||
icon_result=":logseq:"
|
||||
;;
|
||||
"Microsoft Excel")
|
||||
icon_result=":microsoft_excel:"
|
||||
;;
|
||||
"Microsoft PowerPoint")
|
||||
icon_result=":microsoft_power_point:"
|
||||
;;
|
||||
"Telegram")
|
||||
icon_result=":telegram:"
|
||||
;;
|
||||
"Transmit")
|
||||
icon_result=":transmit:"
|
||||
;;
|
||||
"Pi-hole Remote")
|
||||
icon_result=":pihole:"
|
||||
;;
|
||||
"League of Legends")
|
||||
icon_result=":league_of_legends:"
|
||||
;;
|
||||
"Element")
|
||||
icon_result=":element:"
|
||||
;;
|
||||
"Zulip")
|
||||
icon_result=":zulip:"
|
||||
;;
|
||||
"Sequel Ace")
|
||||
icon_result=":sequel_ace:"
|
||||
;;
|
||||
"Zed")
|
||||
icon_result=":zed:"
|
||||
;;
|
||||
"TeamSpeak 3")
|
||||
icon_result=":team_speak:"
|
||||
;;
|
||||
"1Password")
|
||||
icon_result=":one_password:"
|
||||
;;
|
||||
"Caprine")
|
||||
icon_result=":caprine:"
|
||||
;;
|
||||
"카카오톡")
|
||||
icon_result=":kakaotalk:"
|
||||
;;
|
||||
"Dropbox")
|
||||
icon_result=":dropbox:"
|
||||
;;
|
||||
"Kakoune")
|
||||
icon_result=":kakoune:"
|
||||
;;
|
||||
"Rider" | "JetBrains Rider")
|
||||
icon_result=":rider:"
|
||||
;;
|
||||
"Godot")
|
||||
icon_result=":godot:"
|
||||
;;
|
||||
"qutebrowser")
|
||||
icon_result=":qute_browser:"
|
||||
;;
|
||||
"Typora")
|
||||
icon_result=":text:"
|
||||
;;
|
||||
"Sequel Pro")
|
||||
icon_result=":sequel_pro:"
|
||||
;;
|
||||
"Reminders" | "提醒事项")
|
||||
icon_result=":reminders:"
|
||||
;;
|
||||
"Setapp")
|
||||
icon_result=":setapp:"
|
||||
;;
|
||||
"Finder" | "访达")
|
||||
icon_result=":finder:"
|
||||
;;
|
||||
"Matlab")
|
||||
icon_result=":matlab:"
|
||||
;;
|
||||
"LibreWolf")
|
||||
icon_result=":libre_wolf:"
|
||||
;;
|
||||
"Notes" | "备忘录")
|
||||
icon_result=":notes:"
|
||||
;;
|
||||
"Notion")
|
||||
icon_result=":notion:"
|
||||
;;
|
||||
"Brave Browser")
|
||||
icon_result=":brave_browser:"
|
||||
;;
|
||||
"Spotlight")
|
||||
icon_result=":spotlight:"
|
||||
;;
|
||||
"Iris")
|
||||
icon_result=":iris:"
|
||||
;;
|
||||
"Tower")
|
||||
icon_result=":tower:"
|
||||
;;
|
||||
"Jellyfin Media Player")
|
||||
icon_result=":jellyfin:"
|
||||
;;
|
||||
"Code" | "Code - Insiders")
|
||||
icon_result=":code:"
|
||||
;;
|
||||
"Linear")
|
||||
icon_result=":linear:"
|
||||
;;
|
||||
"Live")
|
||||
icon_result=":ableton:"
|
||||
;;
|
||||
"Parallels Desktop")
|
||||
icon_result=":parallels:"
|
||||
;;
|
||||
"Final Cut Pro")
|
||||
icon_result=":final_cut_pro:"
|
||||
;;
|
||||
"Chromium" | "Google Chrome" | "Google Chrome Canary")
|
||||
icon_result=":google_chrome:"
|
||||
;;
|
||||
"GitHub Desktop")
|
||||
icon_result=":git_hub:"
|
||||
;;
|
||||
"Firefox")
|
||||
icon_result=":firefox:"
|
||||
;;
|
||||
"Slack")
|
||||
icon_result=":slack:"
|
||||
;;
|
||||
"Spotify")
|
||||
icon_result=":spotify:"
|
||||
;;
|
||||
"Neovide" | "MacVim" | "Vim" | "VimR")
|
||||
icon_result=":vim:"
|
||||
;;
|
||||
"KeePassXC")
|
||||
icon_result=":kee_pass_x_c:"
|
||||
;;
|
||||
"PomoDone App")
|
||||
icon_result=":pomodone:"
|
||||
;;
|
||||
"DEVONthink 3")
|
||||
icon_result=":devonthink3:"
|
||||
;;
|
||||
"Color Picker" | "数码测色计")
|
||||
icon_result=":color_picker:"
|
||||
;;
|
||||
"Tweetbot" | "Twitter")
|
||||
icon_result=":twitter:"
|
||||
;;
|
||||
"Default")
|
||||
icon_result=":default:"
|
||||
;;
|
||||
"Pages" | "Pages 文稿")
|
||||
icon_result=":pages:"
|
||||
;;
|
||||
"Emacs")
|
||||
icon_result=":emacs:"
|
||||
;;
|
||||
"MAMP" | "MAMP PRO")
|
||||
icon_result=":mamp:"
|
||||
;;
|
||||
"Canary Mail" | "HEY" | "Mail" | "Mailspring" | "MailMate" | "邮件")
|
||||
icon_result=":mail:"
|
||||
;;
|
||||
"WebStorm")
|
||||
icon_result=":web_storm:"
|
||||
;;
|
||||
"TickTick")
|
||||
icon_result=":tick_tick:"
|
||||
;;
|
||||
"TIDAL")
|
||||
icon_result=":tidal:"
|
||||
;;
|
||||
"VLC")
|
||||
icon_result=":vlc:"
|
||||
;;
|
||||
"Blender")
|
||||
icon_result=":blender:"
|
||||
;;
|
||||
"Music" | "音乐")
|
||||
icon_result=":music:"
|
||||
;;
|
||||
"Calendar" | "日历" | "Fantastical" | "Cron" | "Amie")
|
||||
icon_result=":calendar:"
|
||||
;;
|
||||
"Evernote Legacy")
|
||||
icon_result=":evernote_legacy:"
|
||||
;;
|
||||
"Microsoft Word")
|
||||
icon_result=":microsoft_word:"
|
||||
;;
|
||||
"Safari" | "Safari浏览器" | "Safari Technology Preview")
|
||||
icon_result=":safari:"
|
||||
;;
|
||||
"MoneyMoney")
|
||||
icon_result=":bank:"
|
||||
;;
|
||||
"Xcode")
|
||||
icon_result=":xcode:"
|
||||
;;
|
||||
"Numbers" | "Numbers 表格")
|
||||
icon_result=":numbers:"
|
||||
;;
|
||||
"ClickUp")
|
||||
icon_result=":click_up:"
|
||||
;;
|
||||
"Arc")
|
||||
icon_result=":arc:"
|
||||
;;
|
||||
"Zeplin")
|
||||
icon_result=":zeplin:"
|
||||
;;
|
||||
"Trello")
|
||||
icon_result=":trello:"
|
||||
;;
|
||||
"Vivaldi")
|
||||
icon_result=":vivaldi:"
|
||||
;;
|
||||
"Calibre")
|
||||
icon_result=":book:"
|
||||
;;
|
||||
"Min")
|
||||
icon_result=":min_browser:"
|
||||
;;
|
||||
"网易云音乐")
|
||||
icon_result=":netease_music:"
|
||||
;;
|
||||
"GrandTotal" | "Receipts")
|
||||
icon_result=":dollar:"
|
||||
;;
|
||||
"zoom.us")
|
||||
icon_result=":zoom:"
|
||||
;;
|
||||
"Folx")
|
||||
icon_result=":folx:"
|
||||
;;
|
||||
"微信")
|
||||
icon_result=":wechat:"
|
||||
;;
|
||||
"Orion" | "Orion RC")
|
||||
icon_result=":orion:"
|
||||
;;
|
||||
"Notability")
|
||||
icon_result=":notability:"
|
||||
;;
|
||||
"Todoist")
|
||||
icon_result=":todoist:"
|
||||
;;
|
||||
"Replit")
|
||||
icon_result=":replit:"
|
||||
;;
|
||||
"Tor Browser")
|
||||
icon_result=":tor_browser:"
|
||||
;;
|
||||
"Drafts")
|
||||
icon_result=":drafts:"
|
||||
;;
|
||||
"Preview" | "预览" | "Skim" | "zathura")
|
||||
icon_result=":pdf:"
|
||||
;;
|
||||
"PyCharm")
|
||||
icon_result=":pycharm:"
|
||||
;;
|
||||
"Audacity")
|
||||
icon_result=":audacity:"
|
||||
;;
|
||||
"Cypress")
|
||||
icon_result=":cypress:"
|
||||
;;
|
||||
"VSCodium")
|
||||
icon_result=":vscodium:"
|
||||
;;
|
||||
"Podcasts" | "播客")
|
||||
icon_result=":podcasts:"
|
||||
;;
|
||||
"DingTalk" | "钉钉" | "阿里钉")
|
||||
icon_result=":dingtalk:"
|
||||
;;
|
||||
"OBS")
|
||||
icon_result=":obsstudio:"
|
||||
;;
|
||||
"Firefox Developer Edition" | "Firefox Nightly")
|
||||
icon_result=":firefox_developer_edition:"
|
||||
;;
|
||||
"Alfred")
|
||||
icon_result=":alfred:"
|
||||
;;
|
||||
"OmniFocus")
|
||||
icon_result=":omni_focus:"
|
||||
;;
|
||||
"Skype")
|
||||
icon_result=":skype:"
|
||||
;;
|
||||
"Spark Desktop")
|
||||
icon_result=":spark:"
|
||||
;;
|
||||
"Docker" | "Docker Desktop")
|
||||
icon_result=":docker:"
|
||||
;;
|
||||
"Signal")
|
||||
icon_result=":signal:"
|
||||
;;
|
||||
"Pine")
|
||||
icon_result=":pine:"
|
||||
;;
|
||||
"Insomnia")
|
||||
icon_result=":insomnia:"
|
||||
;;
|
||||
"Microsoft Edge")
|
||||
icon_result=":microsoft_edge:"
|
||||
;;
|
||||
"Affinity Photo")
|
||||
icon_result=":affinity_photo:"
|
||||
;;
|
||||
"Sketch")
|
||||
icon_result=":sketch:"
|
||||
;;
|
||||
"Android Studio")
|
||||
icon_result=":android_studio:"
|
||||
;;
|
||||
"Bitwarden")
|
||||
icon_result=":bit_warden:"
|
||||
;;
|
||||
"Affinity Publisher")
|
||||
icon_result=":affinity_publisher:"
|
||||
;;
|
||||
"Zotero")
|
||||
icon_result=":zotero:"
|
||||
;;
|
||||
"Sublime Text")
|
||||
icon_result=":sublime_text:"
|
||||
;;
|
||||
"Warp")
|
||||
icon_result=":warp:"
|
||||
;;
|
||||
"Messages" | "信息" | "Nachrichten")
|
||||
icon_result=":messages:"
|
||||
;;
|
||||
"Obsidian")
|
||||
icon_result=":obsidian:"
|
||||
;;
|
||||
"IntelliJ IDEA")
|
||||
icon_result=":idea:"
|
||||
;;
|
||||
"Atom")
|
||||
icon_result=":atom:"
|
||||
;;
|
||||
"FaceTime" | "FaceTime 通话")
|
||||
icon_result=":face_time:"
|
||||
;;
|
||||
"Yuque" | "语雀")
|
||||
icon_result=":yuque:"
|
||||
;;
|
||||
"Grammarly Editor")
|
||||
icon_result=":grammarly:"
|
||||
;;
|
||||
"Mattermost")
|
||||
icon_result=":mattermost:"
|
||||
;;
|
||||
"Affinity Designer")
|
||||
icon_result=":affinity_designer:"
|
||||
;;
|
||||
"mpv")
|
||||
icon_result=":mpv:"
|
||||
;;
|
||||
"Thunderbird")
|
||||
icon_result=":thunderbird:"
|
||||
;;
|
||||
"Airmail")
|
||||
icon_result=":airmail:"
|
||||
;;
|
||||
"Microsoft Teams")
|
||||
icon_result=":microsoft_teams:"
|
||||
;;
|
||||
"Bear")
|
||||
icon_result=":bear:"
|
||||
;;
|
||||
"System Preferences" | "System Settings" | "系统设置")
|
||||
icon_result=":gear:"
|
||||
;;
|
||||
"Nova")
|
||||
icon_result=":nova:"
|
||||
;;
|
||||
"WhatsApp")
|
||||
icon_result=":whats_app:"
|
||||
;;
|
||||
*)
|
||||
icon_result=":default:"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
icon_map "$1"
|
||||
|
||||
echo "$icon_result"
|
||||
@@ -1,57 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
WORKSOUND_FILE="/Users/jirayu/Projects/JR/sw/dotfiles/.config/sketchybar/sound/ytmp3free.cc_green-screen-happy-happy-happy-cat-meme-youtubemp3free.org.mp3"
|
||||
BREAKSOUND_FILE="/Users/jirayu/Projects/JR/sw/dotfiles/.config/sketchybar/sound/sad.mp3"
|
||||
STATE_FILE="/Users/jirayu/.pomodoro_sound_state"
|
||||
|
||||
playsound() {
|
||||
local current_status="$1"
|
||||
|
||||
local last_status=""
|
||||
|
||||
if [ -f "$STATE_FILE" ]; then
|
||||
last_status=$(cat "$STATE_FILE")
|
||||
fi
|
||||
|
||||
if [ "$current_status" != "$last_status" ]; then
|
||||
if [ "$current_status" == "break_done" ]; then
|
||||
afplay "$BREAKSOUND_FILE" &
|
||||
else
|
||||
afplay "$WORKSOUND_FILE" &
|
||||
fi
|
||||
|
||||
rm -f "$STATE_FILE"
|
||||
echo "$current_status" > "$STATE_FILE"
|
||||
fi
|
||||
}
|
||||
|
||||
STATUS=$(/usr/local/bin/pomodoro status)
|
||||
|
||||
if [ -z "$STATUS" ]; then
|
||||
sketchybar --set pomodoro icon="" \
|
||||
label="Start a Session!" \
|
||||
icon.color="0xffed8796" \
|
||||
label.color="0xffed8796"
|
||||
elif /usr/local/bin/pomodoro status | grep -q "Break: ❗️"; then
|
||||
sketchybar --set pomodoro icon="" \
|
||||
label="Start a new Session!" \
|
||||
icon.color="0xffed8796" \
|
||||
label.color="0xffed8796"
|
||||
playsound "break_done"
|
||||
elif /usr/local/bin/pomodoro status | grep -q "Pomodoro: ❗"; then
|
||||
sketchybar --set pomodoro icon="" \
|
||||
label="Good Job! Take a break!" \
|
||||
icon.color="0xffed8796" \
|
||||
label.color="0xffed8796"
|
||||
playsound "pomodoro_done"
|
||||
elif /usr/local/bin/pomodoro status | grep -q "Pomodoro"; then
|
||||
sketchybar --set pomodoro icon="" \
|
||||
label="$(/usr/local/bin/pomodoro status -f "%r")" \
|
||||
icon.color="0xfff5bde6" \
|
||||
label.color="0xfff5bde6"
|
||||
elif /usr/local/bin/pomodoro status | grep -q "Break"; then
|
||||
sketchybar --set pomodoro icon="" \
|
||||
label="$(/usr/local/bin/pomodoro status -f "%r")" \
|
||||
icon.color="0xff7dc4e4" \
|
||||
label.color="0xff7dc4e4"
|
||||
fi
|
||||
@@ -1,74 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
sketchybar --set pomodoro popup.drawing=toggle \
|
||||
popup.background.drawing=on \
|
||||
popup.background.color="0xff363a4f" \
|
||||
popup.background.corner_radius=3
|
||||
|
||||
STATUS=$(/usr/local/bin/pomodoro status)
|
||||
|
||||
if [ "$STATUS" = "" ]; then
|
||||
sketchybar --set focus icon="" \
|
||||
label="Focus 50:00" \
|
||||
icon.color="0xfff5bde6" \
|
||||
label.color="0xfff5bde6" \
|
||||
click_script="/usr/local/bin/pomodoro start --duration 50 && sketchybar --set pomodoro popup.drawing=toggle"
|
||||
sketchybar --set shortBreak icon="" \
|
||||
label="Short Break 5:00" \
|
||||
icon.color="0xffcad3f5" \
|
||||
label.color="0xffcad3f5" \
|
||||
click_script=""
|
||||
sketchybar --set longBreak icon="" \
|
||||
label="Long Break 15:00" \
|
||||
icon.color="0xffcad3f5" \
|
||||
label.color="0xffcad3f5" \
|
||||
click_script=""
|
||||
elif /usr/local/bin/pomodoro status | grep -q "Break: ❗️"; then
|
||||
sketchybar --set focus icon="" \
|
||||
label="Focus 50:00" \
|
||||
icon.color="0xfff5bde6" \
|
||||
label.color="0xfff5bde6" \
|
||||
click_script="/usr/local/bin/pomodoro start --duration 50 && sketchybar --set pomodoro popup.drawing=toggle"
|
||||
sketchybar --set shortBreak icon="" \
|
||||
label="Short Break 5:00" \
|
||||
icon.color="0xffcad3f5" \
|
||||
label.color="0xffcad3f5" \
|
||||
click_script=""
|
||||
sketchybar --set longBreak icon="" \
|
||||
label="Long Break 15:00" \
|
||||
icon.color="0xffcad3f5" \
|
||||
label.color="0xffcad3f5" \
|
||||
click_script=""
|
||||
elif /usr/local/bin/pomodoro status | grep -q "Pomodoro: ❗"; then
|
||||
sketchybar --set focus icon="" \
|
||||
label="Focus 50:00" \
|
||||
icon.color="0xffcad3f5" \
|
||||
label.color="0xffcad3f5" \
|
||||
click_script=""
|
||||
sketchybar --set shortBreak icon="" \
|
||||
label="Short Break 5:00" \
|
||||
icon.color="0xff91d7e3" \
|
||||
label.color="0xff91d7e3" \
|
||||
click_script="/usr/local/bin/pomodoro break && sketchybar --set pomodoro popup.drawing=toggle"
|
||||
sketchybar --set longBreak icon="" \
|
||||
label="Long Break 15:00" \
|
||||
icon.color="0xff91d7e3" \
|
||||
label.color="0xff91d7e3" \
|
||||
click_script="/usr/local/bin/pomodoro break -d 15 && sketchybar --set pomodoro popup.drawing=toggle"
|
||||
else
|
||||
sketchybar --set focus icon="" \
|
||||
label="Focus 50:00" \
|
||||
icon.color="0xffcad3f5" \
|
||||
label.color="0xffcad3f5" \
|
||||
click_script=""
|
||||
sketchybar --set shortBreak icon="" \
|
||||
label="Short Break 5:00" \
|
||||
icon.color="0xffcad3f5" \
|
||||
label.color="0xffcad3f5" \
|
||||
click_script=""
|
||||
sketchybar --set longBreak icon="" \
|
||||
label="Long Break 15:00" \
|
||||
icon.color="0xffcad3f5" \
|
||||
label.color="0xffcad3f5" \
|
||||
click_script=""
|
||||
fi
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$CONFIG_DIR/colors.sh"
|
||||
|
||||
if [ "$1" = "$FOCUSED_WORKSPACE" ]; then
|
||||
sketchybar --set $NAME background.drawing=on \
|
||||
background.color=$BLUE \
|
||||
label.color=$BAR_COLOR \
|
||||
icon.color=$BAR_COLOR
|
||||
else
|
||||
sketchybar --set $NAME background.drawing=off \
|
||||
label.color=$BLUE \
|
||||
icon.color=$BLUE
|
||||
fi
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# The volume_change event supplies a $INFO variable in which the current volume
|
||||
# percentage is passed to the script.
|
||||
|
||||
if [ "$SENDER" = "volume_change" ]; then
|
||||
VOLUME="$INFO"
|
||||
|
||||
case "$VOLUME" in
|
||||
[6-9][0-9]|100)
|
||||
ICON=""
|
||||
COLOR="0xff8aadf4"
|
||||
;;
|
||||
[3-5][0-9])
|
||||
ICON=""
|
||||
COLOR="0xff8aadf4"
|
||||
;;
|
||||
[1-9]|[1-2][0-9])
|
||||
ICON=""
|
||||
COLOR="0xffed8796"
|
||||
;;
|
||||
*)
|
||||
ICON=""
|
||||
COLOR="0xffed8796"
|
||||
esac
|
||||
|
||||
sketchybar --set "$NAME" icon.color="$COLOR" icon="$ICON" label.color="$COLOR" label="$VOLUME%"
|
||||
fi
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if networksetup -getairportpower en0 | grep -q "On"; then
|
||||
SSID=$(ipconfig getsummary en0 | awk -F ' SSID : ' '/ SSID : / {print $2}')
|
||||
if [ -z "$SSID" ]; then
|
||||
sketchybar --set wifi icon="" \
|
||||
label="Disconnected" \
|
||||
label.color="0xffed8796" \
|
||||
icon.color="0xffed8796"
|
||||
else
|
||||
sketchybar --set wifi icon="" \
|
||||
label="$SSID" \
|
||||
label.color="0xffc6a0f6" \
|
||||
icon.color="0xffc6a0f6"
|
||||
fi
|
||||
else
|
||||
sketchybar --set wifi icon="" \
|
||||
label="Off" \
|
||||
label.color="0xffed8796" \
|
||||
icon.color="0xffed8796"
|
||||
fi
|
||||
@@ -1,60 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$CONFIG_DIR/colors.sh"
|
||||
|
||||
# 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"
|
||||
ITEM_DIR="$CONFIG_DIR/items"
|
||||
HELPER_DIR="$CONFIG_DIR/helper"
|
||||
|
||||
##### 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=32 blur_radius=30 color=$BAR_COLOR notch_width=180
|
||||
|
||||
##### 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="JetBrainsMono Nerd Font:Bold:15.0"
|
||||
label.font="JetBrainsMono Nerd Font:Bold:13.0"
|
||||
background.color=$ITEM_BG_COLOR
|
||||
background.corner_radius=5
|
||||
background.height=24
|
||||
icon.padding_left=4
|
||||
icon.padding_right=4
|
||||
label.padding_left=4
|
||||
label.padding_right=4
|
||||
)
|
||||
sketchybar --default "${default[@]}"
|
||||
|
||||
# --Left Side Items --
|
||||
|
||||
source $ITEM_DIR/spaces.sh
|
||||
|
||||
# --Middle Items --
|
||||
|
||||
source $ITEM_DIR/pomodoro.sh
|
||||
source $ITEM_DIR/front_app.sh
|
||||
|
||||
# --Right Side Items --
|
||||
|
||||
source $ITEM_DIR/calendar.sh
|
||||
source $ITEM_DIR/volume.sh
|
||||
source $ITEM_DIR/battery.sh
|
||||
source $ITEM_DIR/wifi.sh
|
||||
|
||||
##### Force all scripts to run the first time (never do this in a script) #####
|
||||
sketchybar --update
|
||||
Binary file not shown.
BIN
Binary file not shown.
@@ -16,14 +16,16 @@ local edu_schema = {
|
||||
"EDU",
|
||||
"default",
|
||||
wezterm.home_dir .. "/Polybox_ETH/",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ETH/hs25/analysis_I",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ETH/fs26/analysis_II",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ETH/fs26/informatik_I",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ETH/fs26/italian",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ETH/fs26/lineare_algebra_wiederholung",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ETH/fs26/mathematische_methoden",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ETH/fs26/nus_II",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ETH/fs26/physik_I",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ZHAW/hs26/analysis_I",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ZHAW/hs26/digitaltechnik",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ZHAW/hs26/elektrizitaetslehre",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ZHAW/hs26/informatik_I",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ETH/hs26/italian_a2",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ZHAW/hs26/lineare_algebra_I",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ZHAW/hs26/messtechnik_projekt",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ZHAW/hs26/physik_I",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ZHAW/hs26/werkstoffe_der_elektrotechnik",
|
||||
wezterm.home_dir .. "/Nextcloud/Vault/edu/ZHAW/hs26/wirtschaft_fuer_ingeneure",
|
||||
sessionizer.FdSearch({ fd_path = "/opt/homebrew/bin/fd", wezterm.home_dir .. "/Projects/EDU" }),
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,10 @@ local actions = wezterm.action
|
||||
|
||||
config.leader = { key = "a", mods = "CTRL", timeout_milliseconds = 1000 }
|
||||
|
||||
-- Blinking Cursor Bar
|
||||
|
||||
config.default_cursor_style = "BlinkingBar"
|
||||
|
||||
-- unix socket to enable sessions
|
||||
|
||||
config.unix_domains = {
|
||||
@@ -174,10 +178,26 @@ config.keys = {
|
||||
},
|
||||
-- Vim Mode
|
||||
{
|
||||
key = "]",
|
||||
key = "[",
|
||||
mods = "LEADER",
|
||||
action = actions.ActivateCopyMode,
|
||||
},
|
||||
{
|
||||
key = "y",
|
||||
mods = "LEADER",
|
||||
action = wezterm.action_callback(function(window, pane)
|
||||
-- Get current working directory of the active pane
|
||||
local cwd_uri = pane:get_current_working_dir()
|
||||
local cwd = ""
|
||||
-- Spawn yazi in a new pane/tab/window using the detected CWD
|
||||
window:perform_action(
|
||||
wezterm.action.SpawnCommandInNewTab({
|
||||
args = { "/opt/homebrew/bin/yazi" },
|
||||
}),
|
||||
pane
|
||||
)
|
||||
end),
|
||||
},
|
||||
}
|
||||
|
||||
-- Go to Tab with index
|
||||
|
||||
Reference in new issue
Block a user