diff options
| -rw-r--r-- | awesome/.config/awesome/rc.lua | 4 | ||||
| -rw-r--r-- | kitty/.config/kitty/kitty.conf | 4 | ||||
| -rw-r--r-- | nvim/.config/nvim/init.lua | 6 | ||||
| -rw-r--r-- | nvim/.config/nvim/lazy-lock.json | 112 | ||||
| -rw-r--r-- | nvim/.config/nvim/lazyvim.json | 2 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/config/keymaps.lua | 24 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/plugins/catppuccin.lua | 2 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/plugins/disabled.lua | 8 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/plugins/main.lua | 8 | ||||
| -rw-r--r-- | rofi/.config/rofi/themes/catppuccin-mocha.rasi | 111 | ||||
| -rwxr-xr-x | scripts/.scripts/books.sh | 29 | ||||
| -rwxr-xr-x | scripts/.scripts/latex_template.sh | 120 | ||||
| -rw-r--r-- | zsh/.zshrc | 3 |
13 files changed, 298 insertions, 135 deletions
diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua index 2380ac6..e9bd737 100644 --- a/awesome/.config/awesome/rc.lua +++ b/awesome/.config/awesome/rc.lua @@ -901,7 +901,7 @@ end) -- }}} -- Autostart applications -awful.spawn.with_shell("~/.config/awesome/autostart.sh") awful.spawn.with_shell("picom --config $HOME/.config/awesome/picom.conf") -awful.spawn.with_shell("~/.scripts/force_full_composition_nvidia.sh") +awful.spawn.with_shell("$HOME/.config/awesome/autostart.sh") +awful.spawn.with_shell("$HOME/.scripts/force_full_composition_nvidia.sh") awful.spawn.with_shell("nitrogen --restore") diff --git a/kitty/.config/kitty/kitty.conf b/kitty/.config/kitty/kitty.conf index 28bfd07..e770a7c 100644 --- a/kitty/.config/kitty/kitty.conf +++ b/kitty/.config/kitty/kitty.conf @@ -32,7 +32,7 @@ bold_italic_font auto #: italic_font Operator Mono Book Italic #: bold_italic_font Operator Mono Medium Italic -font_size 13.0 +font_size 11.0 #: Font size (in pts) @@ -944,7 +944,7 @@ inactive_tab_font_style normal #: The foreground and background colors -background_opacity 9.0 +background_opacity 0.9 # background_opacity 0.50 # background_opacity 1.00 diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index f2df5d3..e4eee12 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -1,6 +1,6 @@ -- bootstrap lazy.nvim, LazyVim and your plugins require("config.lazy") -require("notify").setup({ - background_colour = "#000000", -}) +-- require("notify").setup({ +-- background_colour = "#000000", +-- }) diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index c879da1..a8d56fe 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -1,65 +1,65 @@ { - "LazyVim": { "branch": "main", "commit": "298a8f5c5d7d854719eaf7c2ba113f463cab411d" }, - "LuaSnip": { "branch": "master", "commit": "878ace11983444d865a72e1759dbcc331d1ace4c" }, - "SchemaStore.nvim": { "branch": "main", "commit": "931f9f3b7b60ec976159cb01b4a40da3829ac2fd" }, - "catppuccin": { "branch": "main", "commit": "5215ea59df6d0a7e27da9a5cd1165e06d1b04cbe" }, + "LazyVim": { "branch": "main", "commit": "f57944f926176a9782c5e3f2804bec0132195d77" }, + "LuaSnip": { "branch": "master", "commit": "2737edc9e674e537dc0a97e3405658d57d2d31ed" }, + "SchemaStore.nvim": { "branch": "main", "commit": "5f0639d68cbea3ab8a9a24a51a5f984d86ea8438" }, + "catppuccin": { "branch": "main", "commit": "637d99e638bc6f1efedac582f6ccab08badac0c6" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-emoji": { "branch": "main", "commit": "e8398e2adf512a03bb4e1728ca017ffeac670a9f" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "competitest.nvim": { "branch": "master", "commit": "c3cb0e2b0916a879c4d3dcb5737e6c046dd0afc5" }, + "competitest.nvim": { "branch": "master", "commit": "20ce9ba1b2f7502291a23ad06096e6650917f0c2" }, "compiler-explorer.nvim": { "branch": "master", "commit": "ee8e7a2808bdad67cd2acb61b5c9ffa7735c7ec9" }, - "conform.nvim": { "branch": "master", "commit": "f3b930db4964d60e255c8f9e37b7f2218dfc08cb" }, - "dashboard-nvim": { "branch": "master", "commit": "b5a2a4269babbcc23c2d50a859516199841714b9" }, - "diffview.nvim": { "branch": "main", "commit": "3afa6a053f680e9f1329c4a151db988a482306cd" }, - "dressing.nvim": { "branch": "master", "commit": "3c38ac861e1b8d4077ff46a779cde17330b29f3a" }, - "friendly-snippets": { "branch": "main", "commit": "d0610077b6129cf9f7f78afbe3a1425d60f6e2f1" }, - "fzf-lua": { "branch": "main", "commit": "b92220ec838c195eb1c711daa69c905b1d7b8d8c" }, - "gitsigns.nvim": { "branch": "main", "commit": "75dc649106827183547d3bedd4602442340d2f7f" }, - "gruvbox.nvim": { "branch": "main", "commit": "f99a08abc5ab0b9b5b0e7a33211a439155c60a61" }, - "harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" }, - "hex.nvim": { "branch": "master", "commit": "cbffd2ce4b8be089360e3c95d5909cd511d8840c" }, - "indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" }, - "lazy.nvim": { "branch": "main", "commit": "eab487c2520f0fe9e54eb5e3ea0606e20512492e" }, - "litee-calltree.nvim": { "branch": "main", "commit": "3908f52f2e69438cdeca32771d449f8ef3ee3bcc" }, + "conform.nvim": { "branch": "master", "commit": "e3263eabbfc1bdbc5b6a60ba8431b64e8dca0a79" }, + "dashboard-nvim": { "branch": "master", "commit": "ae309606940d26d8c9df8b048a6e136b6bbec478" }, + "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, + "dressing.nvim": { "branch": "master", "commit": "6ef1ca479d37d4ff66f13eed44d08912caff483a" }, + "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, + "fzf-lua": { "branch": "main", "commit": "ce1e24f2a48089b65deefcb0a71a9856839002b5" }, + "gitsigns.nvim": { "branch": "main", "commit": "4daf7022f1481edf1e8fb9947df13bb07c18e89a" }, + "grug-far.nvim": { "branch": "main", "commit": "26415d3cc2fef99ccefa019cbc3969f404a83e70" }, + "gruvbox.nvim": { "branch": "main", "commit": "49d9c0b150ba70efcd831ec7b3cb8ee740067045" }, + "harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" }, + "hex.nvim": { "branch": "master", "commit": "fcff75fcf43b5a6c5b471eed65b3a06c412d6020" }, + "indent-blankline.nvim": { "branch": "master", "commit": "e51b651ca26cba250ef3a1150c8d35045eee2a84" }, + "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, + "lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" }, + "litee-calltree.nvim": { "branch": "main", "commit": "b50c809d136ad479caf761a7f030da98c56c7976" }, "litee.nvim": { "branch": "main", "commit": "4efaf373322d9e71eaff31164abb393417cc6f6a" }, - "lspsaga.nvim": { "branch": "main", "commit": "6f920cfabddb9b7de5a3a4d0b7cd4f0774ae23e2" }, - "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" }, - "mason.nvim": { "branch": "main", "commit": "0fb4e56837f13b81a972fcc0554be1327b39061e" }, - "material.nvim": { "branch": "main", "commit": "b6407868026175fda8b2e3dfdc524a3c60222a23" }, - "mini.move": { "branch": "main", "commit": "9670fe1d19af3d9a69ddce920c527c883ca5dc4c" }, - "mini.pairs": { "branch": "main", "commit": "40261dfcec7623cd57be3c3beb50fa73f2650cdf" }, - "mini.surround": { "branch": "main", "commit": "27096c1a27324ee8f2044ea2adc77366d8a782de" }, - "neoconf.nvim": { "branch": "main", "commit": "f1fd38d61d11f3b1b3e7dc75dc667f79cf2fa58b" }, - "neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" }, - "neogit": { "branch": "master", "commit": "acdefce66f702427d820db97e00ad9d4ae63e716" }, - "nui.nvim": { "branch": "main", "commit": "b1b3dcd6ed8f355c78bad3d395ff645be5f8b6ae" }, - "nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" }, - "nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" }, - "nvim-lint": { "branch": "master", "commit": "2f90fe977ef21db3bf3b7a1ceaf4a1e3aafb2b26" }, - "nvim-lspconfig": { "branch": "master", "commit": "b124ef3bd4435a6db7ff03ea2f5a23e1e0487552" }, - "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, - "nvim-snippets": { "branch": "main", "commit": "3f711035277accc53966fe202104c2d7ca1c5717" }, - "nvim-spectre": { "branch": "master", "commit": "366f46fdd4a1593cc237aea13d5ef113739a472c" }, - "nvim-treesitter": { "branch": "master", "commit": "b7d50e59b1b2990b3ce8761d4cf595f4b71c87e2" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "3557e41418b4a6c5b85d5d64abe94c9c50fa9b14" }, - "nvim-ts-autotag": { "branch": "main", "commit": "bcf3146864262ef2d3c877beba3e222b5c73780d" }, - "nvim-vtsls": { "branch": "main", "commit": "719fabc328c48fa03b1f3373205fcd1f60d21dc2" }, - "nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" }, - "oil.nvim": { "branch": "master", "commit": "2cb39e838e9dcd8b374f09a3a87a2e5ec9d372f6" }, - "onedark": { "branch": "master", "commit": "8e4b79b0e6495ddf29552178eceba1e147e6cecf" }, - "persistence.nvim": { "branch": "main", "commit": "5fe077056c821aab41f87650bd6e1c48cd7dd047" }, - "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, - "rose-pine": { "branch": "main", "commit": "87aa437172357ad8f916942bca249ceadc6c68b1" }, + "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, + "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "material.nvim": { "branch": "main", "commit": "0bcabb582c31b750428af9dbb0d146c1c2d75d4c" }, + "mini.icons": { "branch": "main", "commit": "54686be7d58807906cb2c8c2216e0bf9c044f19a" }, + "mini.move": { "branch": "main", "commit": "4caa1c212f5ca3d1633d21cfb184808090ed74b1" }, + "mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" }, + "mini.surround": { "branch": "main", "commit": "48a9795c9d352c771e1ab5dedab6063c0a2df037" }, + "neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, + "neogit": { "branch": "master", "commit": "8e1e301c2e33c60375850bcf22ba1fb77b684b97" }, + "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, + "nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" }, + "nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" }, + "nvim-lint": { "branch": "master", "commit": "36da8dd0ddc4f88e0beae234c20e75397326f143" }, + "nvim-lspconfig": { "branch": "master", "commit": "4cb925e96288a71409a86c84fd97f4434a95453e" }, + "nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" }, + "nvim-treesitter": { "branch": "master", "commit": "8e40904e49bbad5812798eb54be8c00d77cdd301" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" }, + "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, + "nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" }, + "oil.nvim": { "branch": "master", "commit": "621f8ba4fa821724e9b646732a26fb2e795fe008" }, + "onedark": { "branch": "master", "commit": "67a74c275d1116d575ab25485d1bfa6b2a9c38a6" }, + "persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" }, + "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "rose-pine": { "branch": "main", "commit": "07a887a7bef4aacea8c7caebaf8cbf808cdc7a8e" }, + "snacks.nvim": { "branch": "main", "commit": "166aed6c5d9b94a1989db1625f4893b2110a8be1" }, "symbols-outline.nvim": { "branch": "master", "commit": "564ee65dfc9024bdde73a6621820866987cbb256" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, - "telescope.nvim": { "branch": "master", "commit": "dfa230be84a044e7f546a6c2b0a403c739732b86" }, - "todo-comments.nvim": { "branch": "main", "commit": "e1549807066947818113a7d7ed48f637e49620d3" }, - "tokyonight.nvim": { "branch": "main", "commit": "7e5ef71a103e7de5fe6c05f5d6ab97d1640f08cf" }, - "trouble.nvim": { "branch": "main", "commit": "d7f69ff5638cf1864cabac54ade1b1694adfe085" }, - "ts-comments.nvim": { "branch": "main", "commit": "e339090c076871069c00e488b11def49aaf4e413" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, + "telescope.nvim": { "branch": "master", "commit": "85922dde3767e01d42a08e750a773effbffaea3e" }, + "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, + "tokyonight.nvim": { "branch": "main", "commit": "ce91ba480070c95f40753e4663e32b4632ac6db3" }, + "trouble.nvim": { "branch": "main", "commit": "3dc00c0447c016cd43e03054c3d49436a1f2076d" }, + "ts-comments.nvim": { "branch": "main", "commit": "2002692ad1d3f6518d016550c20c2a890f0cbf0e" }, "typescript.nvim": { "branch": "main", "commit": "4de85ef699d7e6010528dcfbddc2ed4c2c421467" }, - "vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" }, - "vimtex": { "branch": "master", "commit": "9665df7f51ee24aa81dbd81782e0a22480209753" } -}
\ No newline at end of file + "vim-tmux-navigator": { "branch": "master", "commit": "424b5caa154bff34dc258ee53cec5a8e36cf7ea8" }, + "vimtex": { "branch": "master", "commit": "251615c0624b820e2245c4ad20a70f0002e596a0" } +} diff --git a/nvim/.config/nvim/lazyvim.json b/nvim/.config/nvim/lazyvim.json index d5de4bc..c8c0d4c 100644 --- a/nvim/.config/nvim/lazyvim.json +++ b/nvim/.config/nvim/lazyvim.json @@ -3,7 +3,7 @@ ], "news": { - "NEWS.md": "4964" + "NEWS.md": "7107" }, "version": 6 }
\ No newline at end of file diff --git a/nvim/.config/nvim/lua/config/keymaps.lua b/nvim/.config/nvim/lua/config/keymaps.lua index d85eec7..b2296ab 100644 --- a/nvim/.config/nvim/lua/config/keymaps.lua +++ b/nvim/.config/nvim/lua/config/keymaps.lua @@ -16,7 +16,25 @@ local function map(mode, lhs, rhs, opts) end end -map("n", "<leader>t", ":lua require('dbgstmt').select()<CR>", { desc = "dbgstmt" }) +-- Define a function to reload the plugin +function ReloadPlugin(plugin_name) + -- Clear the module from Lua's cache + package.loaded[plugin_name] = nil + -- Require the module again + return require(plugin_name) +end + +-- Keymap to reload the plugin and call its setup function +vim.keymap.set("n", "<leader>rp", function() + local plugin_name = "dbgln" -- Replace with your plugin's module name + local plugin = ReloadPlugin(plugin_name) + if plugin.setup then + plugin.setup() -- Call setup if it exists + print(plugin_name .. " reloaded and setup!") + else + print("Failed to call setup for " .. plugin_name) + end +end, { desc = "Reload and setup the plugin" }) -- Better navigation map("n", "<C-d>", "<C-d>zz", { desc = "better half page down scroll", remap = true }) @@ -25,6 +43,10 @@ map("n", "n", "nzz", { desc = "better jump for searched word", remap = true }) map("n", "<C-o>", "<C-o>zz", { desc = "better next jump", remap = true }) map("n", "<C-i>", "<C-i>zz", { desc = "better prev jump", remap = true }) +-- plugin development +map("n", "<leader>t", ":lua require('dbgln').setup()<CR>", { desc = "dbgln" }) +map("n", "<leader>d", "<cmd>DbgLn<CR>", { desc = "Print Debgging Line" }) + -- fix annoying typos when saving or quitting vim.cmd([[ cnoreabbrev W! w! diff --git a/nvim/.config/nvim/lua/plugins/catppuccin.lua b/nvim/.config/nvim/lua/plugins/catppuccin.lua index b3e8df0..2d61905 100644 --- a/nvim/.config/nvim/lua/plugins/catppuccin.lua +++ b/nvim/.config/nvim/lua/plugins/catppuccin.lua @@ -67,7 +67,7 @@ return { crust = "#141617", }, }, - transparent_background = true, + transparent_background = false, show_end_of_buffer = false, integration_default = false, integrations = { diff --git a/nvim/.config/nvim/lua/plugins/disabled.lua b/nvim/.config/nvim/lua/plugins/disabled.lua index e8e520a..3bf1b51 100644 --- a/nvim/.config/nvim/lua/plugins/disabled.lua +++ b/nvim/.config/nvim/lua/plugins/disabled.lua @@ -15,10 +15,10 @@ return { "akinsho/bufferline.nvim", enabled = false, }, - { - "nvim-neo-tree/neo-tree.nvim", - enabled = false, - }, + -- { + -- "nvim-neo-tree/neo-tree.nvim", + -- enabled = false, + -- }, { "folke/flash.nvim", enabled = false, diff --git a/nvim/.config/nvim/lua/plugins/main.lua b/nvim/.config/nvim/lua/plugins/main.lua index 94def31..701dbe8 100644 --- a/nvim/.config/nvim/lua/plugins/main.lua +++ b/nvim/.config/nvim/lua/plugins/main.lua @@ -30,7 +30,14 @@ return { }, { + lazy = false, "windwp/nvim-ts-autotag", + per_filetype = { + ["astro"] = { + enable_close = true, + enable_rename = true + } + } }, -- tmux navigator @@ -56,6 +63,7 @@ return { { "NeogitOrg/neogit", + lazy = false, dependencies = { "nvim-lua/plenary.nvim", -- required "sindrets/diffview.nvim", -- optional - Diff integration diff --git a/rofi/.config/rofi/themes/catppuccin-mocha.rasi b/rofi/.config/rofi/themes/catppuccin-mocha.rasi new file mode 100644 index 0000000..38c0b80 --- /dev/null +++ b/rofi/.config/rofi/themes/catppuccin-mocha.rasi @@ -0,0 +1,111 @@ +* { + bg-col: #1e1e2e; + bg-col-light: #1e1e2e; + border-col: #1e1e2e; + selected-col: #1e1e2e; + blue: #89b4fa; + fg-col: #cdd6f4; + fg-col2: #f38ba8; + grey: #6c7086; + + width: 600; + font: "JetBrainsMono Nerd Font 14"; +} + +element-text, element-icon , mode-switcher { + background-color: inherit; + text-color: inherit; +} + +window { + height: 360px; + border: 3px; + border-color: @border-col; + background-color: @bg-col; +} + +mainbox { + background-color: @bg-col; +} + +inputbar { + children: [prompt,entry]; + background-color: @bg-col; + border-radius: 5px; + padding: 2px; +} + +prompt { + background-color: @blue; + padding: 6px; + text-color: @bg-col; + border-radius: 3px; + margin: 20px 0px 0px 20px; +} + +textbox-prompt-colon { + expand: false; + str: ":"; +} + +entry { + padding: 6px; + margin: 20px 0px 0px 10px; + text-color: @fg-col; + background-color: @bg-col; +} + +listview { + border: 0px 0px 0px; + padding: 6px 0px 0px; + margin: 10px 0px 0px 20px; + columns: 2; + lines: 5; + background-color: @bg-col; +} + +element { + padding: 5px; + background-color: @bg-col; + text-color: @fg-col ; +} + +element-icon { + size: 25px; +} + +element selected { + background-color: @selected-col ; + text-color: @fg-col2 ; +} + +mode-switcher { + spacing: 0; + } + +button { + padding: 10px; + background-color: @bg-col-light; + text-color: @grey; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +button selected { + background-color: @bg-col; + text-color: @blue; +} + +message { + background-color: @bg-col-light; + margin: 2px; + padding: 2px; + border-radius: 5px; +} + +textbox { + padding: 6px; + margin: 20px 0px 0px 20px; + text-color: @blue; + background-color: @bg-col-light; +} diff --git a/scripts/.scripts/books.sh b/scripts/.scripts/books.sh index 307ec89..6c49d62 100755 --- a/scripts/.scripts/books.sh +++ b/scripts/.scripts/books.sh @@ -9,14 +9,33 @@ # # ################################################################## -path="/run/media/omar/Storage/omar/Books" -choice=$(ls -a "$path" | dmenu -i -l 10) +# Set the path to the books directory +path="/mnt/Storage/omar/Books/" + +# Detect whether we're in a Wayland or X11 session +if [ "$XDG_SESSION_TYPE" = "wayland" ]; then + # Wayland session - use wofi + launcher="wofi --dmenu -i -l 10" +elif [ "$XDG_SESSION_TYPE" = "x11" ]; then + # X11 session - use dmenu + launcher="dmenu -i -l 10" +else + echo "Error: Could not detect display server (Wayland or X11)." + exit 1 +fi + +# Initial directory to choose from +choice=$(ls -a "$path" | $launcher) + +# Initialize the new choice as the first directory selected new_choice=$choice +# Loop through directories until a file is selected while [ -d "$path/$new_choice" ]; do - choice=$(ls -a "$path/$new_choice" | dmenu -i -l 10) - new_choice+="/" - new_choice+=$choice #path/books for cs/ + # Recurse into the selected directory and show options again + choice=$(ls -a "$path/$new_choice" | $launcher) + new_choice+="/$choice" # Append the choice to the path done +# Open the selected file with zathura in fullscreen mode zathura --mode fullscreen "$path/$new_choice" diff --git a/scripts/.scripts/latex_template.sh b/scripts/.scripts/latex_template.sh index 03054e3..2826fd9 100755 --- a/scripts/.scripts/latex_template.sh +++ b/scripts/.scripts/latex_template.sh @@ -1,85 +1,85 @@ #!/bin/bash -templates_dir="/run/media/omar/Storage/omar/Latex Templates" -logo="/run/media/omar/Storage/omar/College/logo.png" -json_file="/run/media/omar/Storage/omar/College/Courses Templates/Spring2024.json" +templates_dir="/mnt/Storage/omar/Latex Templates" +logo="/mnt/Storage/omar/College/logo.png" +json_file="/mnt/Storage/omar/College/Courses Templates/Fall2024.json" # List of template options templates=("lab_report" "general_report") # Function to replace placeholders in a template file replace_placeholders() { - # Check if a template file is provided - if [ -z "$1" ]; then - echo "Usage: replace_placeholders <template_file>" - return 1 - fi - - # Check if the provided file exists - if [ ! -f "$1" ]; then - echo "File '$1' not found." - return 1 - fi - - # Read the template file content - template_content=$(<"$1") - - # Extract course names from JSON and load them into an array - IFS=$'\n' courses=($(jq -r '.[] | .course_title' "$json_file")) - - # Display course names and ask user to select - echo "Select the course:" - for i in "${!courses[@]}"; do - echo "$((i + 1)). ${courses[i]}" - done - read -p "Enter the number of the course you want to use: " course_choice - - # Validate selection - if ! [[ "$course_choice" =~ ^[0-9]+$ ]] || ((course_choice < 1 || course_choice > ${#courses[@]})); then - echo "Invalid input. Please enter a number within the range." - return 1 - fi - - # Get the selected course JSON object - matched_json=$(jq -r --argjson idx $((course_choice - 1)) '.[$idx]' "$json_file") - - # Decode the JSON and replace placeholders - course_title=$(echo "$matched_json" | jq -r '.course_title') - course_code=$(echo "$matched_json" | jq -r '.course_code') - instructor=$(echo "$matched_json" | jq -r '.instructor') - teaching_assistant=$(echo "$matched_json" | jq -r '.teaching_assistant') - - # Replace each field in the template - template_content=$(echo "$template_content" | sed "s/<course_title>/$course_title/g") - template_content=$(echo "$template_content" | sed "s/<course_code>/$course_code/g") - template_content=$(echo "$template_content" | sed "s/<instructor>/$instructor/g") - template_content=$(echo "$template_content" | sed "s/<teaching_assistant>/$teaching_assistant/g") - - cp "$logo" . - read -p "Enter name for your file: " file_name - - # Write the modified content to a new file - echo "$template_content" >"./$file_name" - echo "Replacement completed. Modified file saved as '$file_name'." + # Check if a template file is provided + if [ -z "$1" ]; then + echo "Usage: replace_placeholders <template_file>" + return 1 + fi + + # Check if the provided file exists + if [ ! -f "$1" ]; then + echo "File '$1' not found." + return 1 + fi + + # Read the template file content + template_content=$(<"$1") + + # Extract course names from JSON and load them into an array + IFS=$'\n' courses=($(jq -r '.[] | .course_title' "$json_file")) + + # Display course names and ask user to select + echo "Select the course:" + for i in "${!courses[@]}"; do + echo "$((i + 1)). ${courses[i]}" + done + read -p "Enter the number of the course you want to use: " course_choice + + # Validate selection + if ! [[ "$course_choice" =~ ^[0-9]+$ ]] || ((course_choice < 1 || course_choice > ${#courses[@]})); then + echo "Invalid input. Please enter a number within the range." + return 1 + fi + + # Get the selected course JSON object + matched_json=$(jq -r --argjson idx $((course_choice - 1)) '.[$idx]' "$json_file") + + # Decode the JSON and replace placeholders + course_title=$(echo "$matched_json" | jq -r '.course_title') + course_code=$(echo "$matched_json" | jq -r '.course_code') + instructor=$(echo "$matched_json" | jq -r '.instructor') + teaching_assistant=$(echo "$matched_json" | jq -r '.teaching_assistant') + + # Replace each field in the template + template_content=$(echo "$template_content" | sed "s/<course_title>/$course_title/g") + template_content=$(echo "$template_content" | sed "s/<course_code>/$course_code/g") + template_content=$(echo "$template_content" | sed "s/<instructor>/$instructor/g") + template_content=$(echo "$template_content" | sed "s/<teaching_assistant>/$teaching_assistant/g") + + cp "$logo" . + read -p "Enter name for your file: " file_name + + # Write the modified content to a new file + echo "$template_content" >"./$file_name" + echo "Replacement completed. Modified file saved as '$file_name'." } # Display template options to the user echo "Choose a template:" for ((i = 0; i < ${#templates[@]}; i++)); do - echo "$((i + 1)). ${templates[i]}" + echo "$((i + 1)). ${templates[i]}" done # Read user input for template selection read -p "Enter the number of the template you want to use: " choice if ! [[ "$choice" =~ ^[0-9]+$ ]]; then - echo "Invalid input. Please enter a number." - exit 1 + echo "Invalid input. Please enter a number." + exit 1 fi if ((choice < 1 || choice > ${#templates[@]})); then - echo "Invalid choice. Please enter a number within the range." - exit 1 + echo "Invalid choice. Please enter a number within the range." + exit 1 fi selected_template=${templates[choice - 1]} @@ -129,3 +129,6 @@ bindkey '^j' down-line-or-beginning-search bindkey '^o' clear-screen # colorscript random + +# Added by LM Studio CLI (lms) +export PATH="$PATH:/home/omar/.cache/lm-studio/bin" |
