Commit 59c7d64
Changed files (6)
.config
.local
share
applications
.config/hypr/modules/rules.lua
@@ -1,9 +1,9 @@
-- ── Workspace ─────────────────────────────────────
-hl.workspace_rule({ workspace = "1", monitor = "HDMI-A-2" })
+hl.workspace_rule({ workspace = "1", monitor = "HDMI-A-2", default_name = "AI" })
hl.workspace_rule({ workspace = "2", monitor = "HDMI-A-2" })
hl.workspace_rule({ workspace = "3", monitor = "HDMI-A-2" })
-hl.workspace_rule({ workspace = "4", monitor = "DP-1", default_name = "AI", persistent = true })
+hl.workspace_rule({ workspace = "4", monitor = "DP-1", default_name = "YT", persistent = true })
hl.workspace_rule({ workspace = "5", monitor = "DP-1", default_name = "Code", persistent = true })
hl.workspace_rule({ workspace = "6", monitor = "DP-1", default_name = "Research", persistent = true })
@@ -75,3 +75,8 @@ hl.window_rule({
match = { initial_class = "chrome-music\\.youtube\\..*" },
workspace = "special:music",
})
+
+
+hl.window_rule({
+ match = { title = "^(.*-popup)" }, float = true
+})
.config/nvim/lua/plugins/neo-tree.lua
@@ -28,6 +28,74 @@ return {
},
},
+ git_status = {
+ window = {
+ mappings = {
+ ["gd"] = "git_diff_preview",
+ },
+ },
+ commands = {
+ git_diff_preview = function(state)
+ local node = state.tree:get_node()
+ if node.type ~= "file" then
+ vim.notify("Diff only for files", vim.log.levels.ERROR)
+ return
+ end
+
+ local abs_path = node.path
+ local rel_path = vim.fn.fnamemodify(abs_path, ":~:.")
+
+ local dir = vim.fn.fnamemodify(abs_path, ":h")
+ vim.fn.system("git -C " .. vim.fn.shellescape(dir) .. " rev-parse --is-inside-work-tree")
+ if vim.v.shell_error ~= 0 then
+ vim.notify("Not a git repo", vim.log.levels.ERROR)
+ return
+ end
+
+ -- floating window geometry
+ local width = math.floor(vim.o.columns * 0.9)
+ local height = math.floor(vim.o.lines * 0.85)
+ local row = math.floor((vim.o.lines - height) / 2)
+ local col = math.floor((vim.o.columns - width) / 2)
+
+ local buf = vim.api.nvim_create_buf(false, true)
+ local win = vim.api.nvim_open_win(buf, true, {
+ relative = "editor",
+ width = width,
+ height = height,
+ row = row,
+ col = col,
+ style = "minimal",
+ border = "rounded",
+ title = " diff: " .. rel_path .. " ",
+ title_pos = "center",
+ })
+
+ vim.wo[win].winblend = 0
+
+ vim.fn.termopen(
+ "git diff --no-ext-diff --color=always -- "
+ .. vim.fn.shellescape(rel_path)
+ .. " | delta --side-by-side --paging=always"
+ )
+
+ vim.bo[buf].bufhidden = "wipe"
+ vim.bo[buf].buflisted = false
+
+ local function close()
+ if vim.api.nvim_win_is_valid(win) then
+ vim.api.nvim_win_close(win, true)
+ end
+ end
+
+ vim.keymap.set({ "n", "t" }, "q", close, { buffer = buf, silent = true })
+ vim.keymap.set({ "n", "t" }, "<Esc>", close, { buffer = buf, silent = true })
+
+ vim.cmd("startinsert")
+ end,
+ },
+ },
+
default_component_configs = {
git_status = {
symbols = {
@@ -52,6 +120,14 @@ return {
hide_gitignored = true,
},
},
+ sources = {
+ "filesystem",
+ "git_status",
+ },
+ source_selector = {
+ winbar = true,
+ statusline = false,
+ },
})
end,
}
.config/waybar/config.jsonc
@@ -37,9 +37,9 @@
"show-special": false,
"format": "{icon}",
"format-icons": {
- "AI": "",
+ "YT": "",
+ "Code": "",
"Research": "",
- "Code": ""
}
},
"custom/butt-out": {
@@ -183,6 +183,7 @@
"show-special": false,
"format": "{icon}",
"format-icons": {
+ "AI":"",
"Communication": " ",
"default": "",
"active": ""
.config/waybar/style.css
@@ -113,7 +113,7 @@ menuitem:hover {
#workspaces.sec button,
#workspaces.special button {
background: @background;
- border: none;
+ border: 1px solid transparent;
color: @secondary_container;
padding: 0px 8px;
padding-left: 2px;
.config/zsh/aliases.zsh
@@ -5,6 +5,7 @@ alias vim="nvim"
alias ccat="bat --color=always"
alias decompress="tar -xf"
alias grep='rg'
+alias gconf="git config --list --show-origin --show-scope"
if command -v eza &> /dev/null; then
alias ls='eza -lah --group-directories-first --icons=auto --no-user --no-filesize --no-permissions --time-style=long-iso'