Update .tmux.conf

Update .config/DankMaterialShell/firefox.css
Update .config/DankMaterialShell/settings.json
Update .config/alacritty/dank-theme.toml
Update .config/ghostty/themes/dankcolors
Update .config/niri/config.kdl
Update .config/niri/dms/colors.kdl
Add .config/niri/dms/cursor.kdl
Remove .config/niri/dms/cursor.kdl
Update .config/nvim/init.lua
Update .config/nvim/lazy-lock.json
Update .config/nvim/lua/config/00_lazy.lua
Update .config/nvim/lua/plugins/dankcolors.lua
Update .config/pda/config.toml
Update .local/bin/tmux-sessionizer
This commit is contained in:
Lewis Wynne 2026-02-23 15:03:19 +00:00
parent c778538a48
commit ace3e70676
15 changed files with 389 additions and 227 deletions

View file

@ -18,7 +18,10 @@ bind-key - split-window # split
bind-key \; split-window -h # horizontal split
bind-key r source-file ~/.tmux.conf \; display-message "reloaded tmux config"
bind-key c command-prompt -p "window name:" "new-window; rename-window '%%'"
bind-key C-f display-popup -E "tmux-sessionizer"
bind-key C-f display-popup -E -w 80% -h 80% "tmux-sessionizer"
bind-key l if-shell "git -C '#{pane_current_path}' rev-parse --git-dir >/dev/null 2>&1" \
"display-popup -E -w 80% -h 80% -d '#{pane_current_path}' 'lazygit'" \
"display-message 'Not a git repository'"
bind-key C-q command-prompt -p find-session 'switch-client -t %%'
bind-key Left previous-window # window back
bind-key Right next-window # window forward

View file

@ -1,54 +1,54 @@
@media -moz-pref("userChrome.theme-material") {
:root {
--md-sys-color-primary: #2f628c;
--md-sys-color-surface-tint: #2f628c;
--md-sys-color-primary: #565f6a;
--md-sys-color-surface-tint: #565f6a;
--md-sys-color-on-primary: #ffffff;
--md-sys-color-primary-container: #cee5ff;
--md-sys-color-on-primary-container: #001d33;
--md-sys-color-secondary: #51606f;
--md-sys-color-primary-container: #dae3f1;
--md-sys-color-on-primary-container: #131c26;
--md-sys-color-secondary: #5a5f66;
--md-sys-color-on-secondary: #ffffff;
--md-sys-color-secondary-container: #d5e4f7;
--md-sys-color-on-secondary-container: #0e1d2a;
--md-sys-color-tertiary: #68587a;
--md-sys-color-secondary-container: #dee3eb;
--md-sys-color-on-secondary-container: #171c22;
--md-sys-color-tertiary: #51606f;
--md-sys-color-on-tertiary: #ffffff;
--md-sys-color-tertiary-container: #eedbff;
--md-sys-color-on-tertiary-container: #231533;
--md-sys-color-tertiary-container: #d5e4f7;
--md-sys-color-on-tertiary-container: #0e1d2a;
--md-sys-color-error: #ba1a1a;
--md-sys-color-on-error: #ffffff;
--md-sys-color-error-container: #ffdad6;
--md-sys-color-on-error-container: #410002;
--md-sys-color-background: #f7f9ff;
--md-sys-color-on-background: #181c20;
--md-sys-color-surface: #f7f9ff;
--md-sys-color-on-surface: #181c20;
--md-sys-color-surface-variant: #dee3eb;
--md-sys-color-on-surface-variant: #42474e;
--md-sys-color-outline: #72777f;
--md-sys-color-outline-variant: #c2c7cf;
--md-sys-color-background: #fbf9fa;
--md-sys-color-on-background: #1b1c1d;
--md-sys-color-surface: #fbf9fa;
--md-sys-color-on-surface: #1b1c1d;
--md-sys-color-surface-variant: #e4e2e3;
--md-sys-color-on-surface-variant: #474748;
--md-sys-color-outline: #777778;
--md-sys-color-outline-variant: #c8c6c7;
--md-sys-color-shadow: #000000;
--md-sys-color-scrim: #000000;
--md-sys-color-inverse-surface: #2d3135;
--md-sys-color-inverse-on-surface: #eff1f6;
--md-sys-color-inverse-primary: #9bcbfb;
--md-sys-color-primary-fixed: #cee5ff;
--md-sys-color-on-primary-fixed: #001d33;
--md-sys-color-primary-fixed-dim: #9bcbfb;
--md-sys-color-on-primary-fixed-variant: #0e4a73;
--md-sys-color-secondary-fixed: #d5e4f7;
--md-sys-color-on-secondary-fixed: #0e1d2a;
--md-sys-color-secondary-fixed-dim: #b9c8da;
--md-sys-color-on-secondary-fixed-variant: #3a4857;
--md-sys-color-tertiary-fixed: #eedbff;
--md-sys-color-on-tertiary-fixed: #231533;
--md-sys-color-tertiary-fixed-dim: #d3bfe6;
--md-sys-color-on-tertiary-fixed-variant: #504061;
--md-sys-color-surface-dim: #d8dae0;
--md-sys-color-surface-bright: #f7f9ff;
--md-sys-color-inverse-surface: #303031;
--md-sys-color-inverse-on-surface: #f2f0f1;
--md-sys-color-inverse-primary: #bec7d4;
--md-sys-color-primary-fixed: #dae3f1;
--md-sys-color-on-primary-fixed: #131c26;
--md-sys-color-primary-fixed-dim: #bec7d4;
--md-sys-color-on-primary-fixed-variant: #3e4852;
--md-sys-color-secondary-fixed: #dee3eb;
--md-sys-color-on-secondary-fixed: #171c22;
--md-sys-color-secondary-fixed-dim: #c2c7cf;
--md-sys-color-on-secondary-fixed-variant: #42474e;
--md-sys-color-tertiary-fixed: #d5e4f7;
--md-sys-color-on-tertiary-fixed: #0e1d2a;
--md-sys-color-tertiary-fixed-dim: #b9c8da;
--md-sys-color-on-tertiary-fixed-variant: #3a4857;
--md-sys-color-surface-dim: #dbd9da;
--md-sys-color-surface-bright: #fbf9fa;
--md-sys-color-surface-container-lowest: #ffffff;
--md-sys-color-surface-container-low: #f1f3f9;
--md-sys-color-surface-container: #f7f9ff;
--md-sys-color-surface-container-high: #f7f9ff;
--md-sys-color-surface-container-highest: #f7f9ff;
--md-sys-color-surface-container-low: #f5f3f4;
--md-sys-color-surface-container: #fbf9fa;
--md-sys-color-surface-container-high: #fbf9fa;
--md-sys-color-surface-container-highest: #fbf9fa;
--m3-radius: 12px;
--m3-radius-sm: 10px;
@ -68,55 +68,55 @@
@media (prefers-color-scheme: dark) {
:root {
--md-sys-color-primary: #9bcbfb;
--md-sys-color-surface-tint: #9bcbfb;
--md-sys-color-on-primary: #003353;
--md-sys-color-primary-container: #0e4a73;
--md-sys-color-on-primary-container: #cee5ff;
--md-sys-color-secondary: #b9c8da;
--md-sys-color-on-secondary: #233240;
--md-sys-color-secondary-container: #3a4857;
--md-sys-color-on-secondary-container: #d5e4f7;
--md-sys-color-tertiary: #d3bfe6;
--md-sys-color-on-tertiary: #382a49;
--md-sys-color-tertiary-container: #504061;
--md-sys-color-on-tertiary-container: #eedbff;
--md-sys-color-primary: #bec7d4;
--md-sys-color-surface-tint: #bec7d4;
--md-sys-color-on-primary: #28313b;
--md-sys-color-primary-container: #3e4852;
--md-sys-color-on-primary-container: #dae3f1;
--md-sys-color-secondary: #c2c7cf;
--md-sys-color-on-secondary: #2c3137;
--md-sys-color-secondary-container: #42474e;
--md-sys-color-on-secondary-container: #dee3eb;
--md-sys-color-tertiary: #b9c8da;
--md-sys-color-on-tertiary: #233240;
--md-sys-color-tertiary-container: #3a4857;
--md-sys-color-on-tertiary-container: #d5e4f7;
--md-sys-color-error: #ffb4ab;
--md-sys-color-on-error: #690005;
--md-sys-color-error-container: #93000a;
--md-sys-color-on-error-container: #ffdad6;
--md-sys-color-background: #101418;
--md-sys-color-on-background: #e0e2e8;
--md-sys-color-surface: #101418;
--md-sys-color-on-surface: #e0e2e8;
--md-sys-color-surface-variant: #42474e;
--md-sys-color-on-surface-variant: #c2c7cf;
--md-sys-color-outline: #8c9198;
--md-sys-color-outline-variant: #42474e;
--md-sys-color-background: #131314;
--md-sys-color-on-background: #e4e2e3;
--md-sys-color-surface: #131314;
--md-sys-color-on-surface: #e4e2e3;
--md-sys-color-surface-variant: #474748;
--md-sys-color-on-surface-variant: #c8c6c7;
--md-sys-color-outline: #919091;
--md-sys-color-outline-variant: #474748;
--md-sys-color-shadow: #000000;
--md-sys-color-scrim: #000000;
--md-sys-color-inverse-surface: #e0e2e8;
--md-sys-color-inverse-on-surface: #2d3135;
--md-sys-color-inverse-primary: #2f628c;
--md-sys-color-primary-fixed: #cee5ff;
--md-sys-color-on-primary-fixed: #001d33;
--md-sys-color-primary-fixed-dim: #9bcbfb;
--md-sys-color-on-primary-fixed-variant: #0e4a73;
--md-sys-color-secondary-fixed: #d5e4f7;
--md-sys-color-on-secondary-fixed: #0e1d2a;
--md-sys-color-secondary-fixed-dim: #b9c8da;
--md-sys-color-on-secondary-fixed-variant: #3a4857;
--md-sys-color-tertiary-fixed: #eedbff;
--md-sys-color-on-tertiary-fixed: #231533;
--md-sys-color-tertiary-fixed-dim: #d3bfe6;
--md-sys-color-on-tertiary-fixed-variant: #504061;
--md-sys-color-surface-dim: #101418;
--md-sys-color-surface-bright: #36393e;
--md-sys-color-surface-container-lowest: #0b0f12;
--md-sys-color-surface-container-low: #181c20;
--md-sys-color-surface-container: #1c2024;
--md-sys-color-surface-container-high: #272a2f;
--md-sys-color-surface-container-highest: #323539;
--md-sys-color-inverse-surface: #e4e2e3;
--md-sys-color-inverse-on-surface: #303031;
--md-sys-color-inverse-primary: #565f6a;
--md-sys-color-primary-fixed: #dae3f1;
--md-sys-color-on-primary-fixed: #131c26;
--md-sys-color-primary-fixed-dim: #bec7d4;
--md-sys-color-on-primary-fixed-variant: #3e4852;
--md-sys-color-secondary-fixed: #dee3eb;
--md-sys-color-on-secondary-fixed: #171c22;
--md-sys-color-secondary-fixed-dim: #c2c7cf;
--md-sys-color-on-secondary-fixed-variant: #42474e;
--md-sys-color-tertiary-fixed: #d5e4f7;
--md-sys-color-on-tertiary-fixed: #0e1d2a;
--md-sys-color-tertiary-fixed-dim: #b9c8da;
--md-sys-color-on-tertiary-fixed-variant: #3a4857;
--md-sys-color-surface-dim: #131314;
--md-sys-color-surface-bright: #39393a;
--md-sys-color-surface-container-lowest: #0e0e0f;
--md-sys-color-surface-container-low: #1b1c1d;
--md-sys-color-surface-container: #1f2021;
--md-sys-color-surface-container-high: #2a2a2b;
--md-sys-color-surface-container-highest: #343536;
--m3-elev-1: 0 1px 2px rgba(0,0,0,.50), 0 1px 3px rgba(0,0,0,.35);
--m3-elev-2: 0 4px 10px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.35);

View file

@ -3,7 +3,7 @@
"currentThemeCategory": "generic",
"customThemeFile": "/home/lew/.config/niri/dms/colors.json",
"registryThemeVariants": {},
"matugenScheme": "scheme-tonal-spot",
"matugenScheme": "scheme-neutral",
"runUserMatugenTemplates": true,
"matugenTargetMonitor": "",
"popupTransparency": 0.76,
@ -213,7 +213,7 @@
"networkPreference": "wifi",
"iconTheme": "System Default",
"cursorSettings": {
"theme": "System Default",
"theme": "Adwaita",
"size": 24,
"niri": {
"hideWhenTyping": false,
@ -270,7 +270,10 @@
"launchPrefix": "",
"brightnessDevicePins": {},
"wifiNetworkPins": {
"preferredWifi": "SKYP2Z6E"
"preferredWifi": [
"lew@OP",
"SKYP2Z6E"
]
},
"bluetoothDevicePins": {
"preferredDevice": "88:08:94:C3:DD:4B"
@ -286,28 +289,28 @@
"runDmsMatugenTemplates": true,
"matugenTemplateGtk": true,
"matugenTemplateNiri": true,
"matugenTemplateHyprland": true,
"matugenTemplateMangowc": true,
"matugenTemplateQt5ct": true,
"matugenTemplateQt6ct": true,
"matugenTemplateHyprland": false,
"matugenTemplateMangowc": false,
"matugenTemplateQt5ct": false,
"matugenTemplateQt6ct": false,
"matugenTemplateFirefox": true,
"matugenTemplatePywalfox": true,
"matugenTemplateZenBrowser": true,
"matugenTemplatePywalfox": false,
"matugenTemplateZenBrowser": false,
"matugenTemplateVesktop": true,
"matugenTemplateEquibop": true,
"matugenTemplateEquibop": false,
"matugenTemplateGhostty": true,
"matugenTemplateKitty": true,
"matugenTemplateFoot": true,
"matugenTemplateKitty": false,
"matugenTemplateFoot": false,
"matugenTemplateAlacritty": true,
"matugenTemplateNeovim": true,
"matugenTemplateWezterm": true,
"matugenTemplateWezterm": false,
"matugenTemplateDgop": true,
"matugenTemplateKcolorscheme": true,
"matugenTemplateVscode": true,
"matugenTemplateEmacs": true,
"matugenTemplateVscode": false,
"matugenTemplateEmacs": false,
"showDock": false,
"dockAutoHide": false,
"dockSmartAutoHide": false,
"dockSmartAutoHide": true,
"dockGroupByApp": true,
"dockOpenOnOverview": false,
"dockPosition": 1,
@ -350,7 +353,7 @@
"notificationTimeoutLow": 5000,
"notificationTimeoutNormal": 5000,
"notificationTimeoutCritical": 0,
"notificationCompactMode": false,
"notificationCompactMode": true,
"notificationPopupPosition": -1,
"notificationHistoryEnabled": true,
"notificationHistoryMaxCount": 50,
@ -496,13 +499,14 @@
"widgetOutlineOpacity": 1,
"widgetOutlineThickness": 1,
"fontScale": 1.05,
"autoHide": false,
"autoHide": true,
"autoHideDelay": 198,
"openOnOverview": false,
"openOnOverview": true,
"visible": true,
"popupGapsAuto": true,
"popupGapsManual": 9,
"maximizeDetection": true
"maximizeDetection": true,
"showOnWindowsOpen": false
}
],
"desktopClockEnabled": false,
@ -656,7 +660,8 @@
"desktopWidgetGroups": [],
"builtInPluginSettings": {
"dms_settings_search": {
"trigger": "?"
"trigger": "?",
"enabled": false
},
"dms_sysmon": {
"enabled": false

View file

@ -1,31 +1,31 @@
[colors.primary]
background = '#101418'
foreground = '#e0e2e8'
background = '#131314'
foreground = '#e4e2e3'
[colors.selection]
text = '#e0e2e8'
background = '#0e4a73'
text = '#e4e2e3'
background = '#3e4852'
[colors.cursor]
text = '#101418'
cursor = '#9bcbfb'
text = '#131314'
cursor = '#bec7d4'
[colors.normal]
black = '#101418'
red = '#ff729c'
green = '#7dfb8e'
black = '#131314'
red = '#f36d94'
green = '#6ad478'
yellow = '#fff772'
blue = '#81b7ee'
magenta = '#224b74'
cyan = '#9bcbfb'
white = '#eff7ff'
blue = '#b0bac9'
magenta = '#4f5762'
cyan = '#bec7d4'
white = '#d1d6de'
[colors.bright]
black = '#969da3'
red = '#ff9fbc'
green = '#a5ffb1'
black = '#7f8389'
red = '#ff9fbb'
green = '#a5feb1'
yellow = '#fffaa5'
blue = '#acd5ff'
magenta = '#badcff'
cyan = '#d3e9ff'
blue = '#d4dde9'
magenta = '#ecf4ff'
cyan = '#f3f7ff'
white = '#f8fbff'

View file

@ -1,22 +1,22 @@
background = #101418
foreground = #e0e2e8
cursor-color = #9bcbfb
selection-background = #0e4a73
selection-foreground = #e0e2e8
background = #131314
foreground = #e4e2e3
cursor-color = #bec7d4
selection-background = #3e4852
selection-foreground = #e4e2e3
palette = 0=#101418
palette = 1=#ff729c
palette = 2=#7dfb8e
palette = 0=#131314
palette = 1=#f36d94
palette = 2=#6ad478
palette = 3=#fff772
palette = 4=#81b7ee
palette = 5=#224b74
palette = 6=#9bcbfb
palette = 7=#eff7ff
palette = 8=#969da3
palette = 9=#ff9fbc
palette = 10=#a5ffb1
palette = 4=#b0bac9
palette = 5=#4f5762
palette = 6=#bec7d4
palette = 7=#d1d6de
palette = 8=#7f8389
palette = 9=#ff9fbb
palette = 10=#a5feb1
palette = 11=#fffaa5
palette = 12=#acd5ff
palette = 13=#badcff
palette = 14=#d3e9ff
palette = 12=#d4dde9
palette = 13=#ecf4ff
palette = 14=#f3f7ff
palette = 15=#f8fbff

View file

@ -54,3 +54,5 @@ layout {
prefer-no-csd
screenshot-path "~/dcim/pictures/screenshots/screenshot from %Y-%m-%d %H-%M-%S.png"
include "dms/cursor.kdl"

View file

@ -5,14 +5,14 @@ layout {
background-color "transparent"
focus-ring {
active-color "#9bcbfb"
inactive-color "#8c9198"
active-color "#bec7d4"
inactive-color "#919091"
urgent-color "#ffb4ab"
}
border {
active-color "#9bcbfb"
inactive-color "#8c9198"
active-color "#bec7d4"
inactive-color "#919091"
urgent-color "#ffb4ab"
}
@ -21,19 +21,19 @@ layout {
}
tab-indicator {
active-color "#9bcbfb"
inactive-color "#8c9198"
active-color "#bec7d4"
inactive-color "#919091"
urgent-color "#ffb4ab"
}
insert-hint {
color "#9bcbfb80"
color "#bec7d480"
}
}
recent-windows {
highlight {
active-color "#0e4a73"
active-color "#3e4852"
urgent-color "#ffb4ab"
}
}

View file

@ -0,0 +1,9 @@
// ! DO NOT EDIT !
// ! AUTO-GENERATED BY DMS !
// ! CHANGES WILL BE OVERWRITTEN !
// ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE !
cursor {
xcursor-theme "Adwaita"
xcursor-size 24
}

View file

@ -24,9 +24,7 @@
-- │ ├ 09_gitsigns.lua -- Git integration (Gitsigns)
-- │ ├ 10_conform.lua -- Formatting (vim-sleuth, conform)
-- │ ├ 11_yanky.lua -- Yank and put enhancements
-- │ ├ 12_neoscroll.lua -- Animations
-- │ ├ 13_easyalign.lua -- Visual mode: align around "=" with ga=
-- │ └ 14_obsidian.lua -- Obsidian vault integration
-- │ └ 12_neoscroll.lua -- Animations
-- └ snippets/ -- Snippet definitions
-- ├ package.json -- Snippet repository metadata
-- ├ global.json -- Global text snippets
@ -39,4 +37,4 @@ require("config.20_keymaps")
require("config.30_autocmds")
require("config.40_statusline")
vim.cmd.colorscheme("colibri-transparent")
-- vim.cmd.colorscheme("colibri-transparent")

View file

@ -1,4 +1,5 @@
{
"base16-nvim": { "branch": "master", "commit": "21f2946e45cb92a336638d68c8de292fdf451d0c" },
"blink-copilot": { "branch": "main", "commit": "7ad8209b2f880a2840c94cdcd80ab4dc511d4f39" },
"blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" },
"conform.nvim": { "branch": "master", "commit": "1bf8b5b9caee51507aa51eaed3da5b0f2595c6b9" },
@ -22,7 +23,6 @@
"roslyn.nvim": { "branch": "main", "commit": "e2901d86d7c1702b88c02b9616802845dc6d49f8" },
"tmux.nvim": { "branch": "main", "commit": "2c1c3be0ef287073cef963f2aefa31a15c8b9cd8" },
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
"vim-easy-align": { "branch": "master", "commit": "9815a55dbcd817784458df7a18acacc6f82b1241" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
"yanky.nvim": { "branch": "main", "commit": "04775cc6e10ef038c397c407bc17f00a2f52b378" }

View file

@ -22,6 +22,7 @@ vim.g.maplocalleader = "\\"
require("lazy").setup({
spec = {
{ import = "plugin" },
{ import = "plugins" },
},
install = { colorscheme = { "habamax" } },
checker = { enabled = true, notify = false },

View file

@ -4,38 +4,38 @@ return {
priority = 1000,
config = function()
require('base16-colorscheme').setup({
base00 = '#101418',
base01 = '#101418',
base02 = '#969da3',
base03 = '#969da3',
base04 = '#eff7ff',
base00 = '#131314',
base01 = '#131314',
base02 = '#7f8389',
base03 = '#7f8389',
base04 = '#d1d6de',
base05 = '#f8fbff',
base06 = '#f8fbff',
base07 = '#f8fbff',
base08 = '#ff9fbc',
base09 = '#ff9fbc',
base0A = '#acd5ff',
base0B = '#a5ffb1',
base0C = '#d3e9ff',
base0D = '#acd5ff',
base0E = '#badcff',
base0F = '#badcff',
base08 = '#ff9fbb',
base09 = '#ff9fbb',
base0A = '#d4dde9',
base0B = '#a5feb1',
base0C = '#f3f7ff',
base0D = '#d4dde9',
base0E = '#ecf4ff',
base0F = '#ecf4ff',
})
vim.api.nvim_set_hl(0, 'Visual', {
bg = '#969da3',
bg = '#7f8389',
fg = '#f8fbff',
bold = true
})
vim.api.nvim_set_hl(0, 'Statusline', {
bg = '#acd5ff',
fg = '#101418',
bg = '#d4dde9',
fg = '#131314',
})
vim.api.nvim_set_hl(0, 'LineNr', { fg = '#969da3' })
vim.api.nvim_set_hl(0, 'CursorLineNr', { fg = '#d3e9ff', bold = true })
vim.api.nvim_set_hl(0, 'LineNr', { fg = '#7f8389' })
vim.api.nvim_set_hl(0, 'CursorLineNr', { fg = '#f3f7ff', bold = true })
vim.api.nvim_set_hl(0, 'Statement', {
fg = '#badcff',
fg = '#ecf4ff',
bold = true
})
vim.api.nvim_set_hl(0, 'Keyword', { link = 'Statement' })
@ -43,34 +43,34 @@ return {
vim.api.nvim_set_hl(0, 'Conditional', { link = 'Statement' })
vim.api.nvim_set_hl(0, 'Function', {
fg = '#acd5ff',
fg = '#d4dde9',
bold = true
})
vim.api.nvim_set_hl(0, 'Macro', {
fg = '#acd5ff',
fg = '#d4dde9',
italic = true
})
vim.api.nvim_set_hl(0, '@function.macro', { link = 'Macro' })
vim.api.nvim_set_hl(0, 'Type', {
fg = '#d3e9ff',
fg = '#f3f7ff',
bold = true,
italic = true
})
vim.api.nvim_set_hl(0, 'Structure', { link = 'Type' })
vim.api.nvim_set_hl(0, 'String', {
fg = '#a5ffb1',
fg = '#a5feb1',
italic = true
})
vim.api.nvim_set_hl(0, 'Operator', { fg = '#eff7ff' })
vim.api.nvim_set_hl(0, 'Delimiter', { fg = '#eff7ff' })
vim.api.nvim_set_hl(0, 'Operator', { fg = '#d1d6de' })
vim.api.nvim_set_hl(0, 'Delimiter', { fg = '#d1d6de' })
vim.api.nvim_set_hl(0, '@punctuation.bracket', { link = 'Delimiter' })
vim.api.nvim_set_hl(0, '@punctuation.delimiter', { link = 'Delimiter' })
vim.api.nvim_set_hl(0, 'Comment', {
fg = '#969da3',
fg = '#7f8389',
italic = true
})

View file

@ -7,7 +7,7 @@ display_ascii_art = true
always_encrypt = false
[store]
default_store_name = "d"
default_store_name = "store"
always_prompt_delete = true
always_prompt_overwrite = true
@ -16,10 +16,10 @@ display_ascii_art = true
default_list_format = "table"
always_show_full_values = false
always_hide_header = false
default_columns = "key,store,ttl,value"
default_columns = "meta,ttl,size,store,key,value"
[git]
auto_fetch = false
auto_commit = true
auto_push = false
default_commit_message = "sync: {{.Time}}"
default_commit_message = "{{ summary }}"

View file

@ -1,62 +1,206 @@
#!/usr/bin/env bash
set -euo pipefail
# Each entry: PATH|minDepth|maxDepth
SEARCH_SPECS=(
"$HOME/src/github|2|2" # username/repo
"$HOME/src/aur|1|1" # AUR pkgs
"$HOME/.config|0|1" # each folder in ~/.config
SELF="$(realpath "$0")"
CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/tmux-sessionizer"
CONFIG_FILE="$CONFIG_DIR/sources.conf"
DEFAULT_SPECS=(
"$HOME/src/github|2|2"
"$HOME/src/aur|1|1"
"$HOME/.config|0|1"
"$HOME/.local/bin|0|0"
)
# Optional: override via env, e.g.
# SESSIONIZER_SPECS="$HOME/work|1|2,$HOME/projects|2|2"
IFS=',' read -r -a _OVERRIDE <<< "${SESSIONIZER_SPECS:-}"
if [[ ${#_OVERRIDE[@]} -gt 0 && -n ${_OVERRIDE[0]} ]]; then
SEARCH_SPECS=("${_OVERRIDE[@]}")
fi
unset _OVERRIDE
collect() {
local path min max
for spec in "${SEARCH_SPECS[@]}"; do
IFS='|' read -r path min max <<<"$spec"
[[ -d $path ]] || continue
find "$path" -mindepth "$min" -maxdepth "$max" -type d 2>/dev/null
done
# --- Path shortening ---
# Shorten all but last 2 components: ~/src/github/user/repo → ~/s/g/user/repo
# Dotfile components keep the dot: .config → .c
_shorten_paths() {
awk -v home="$HOME" '{
p = $0
if (index(p, home) == 1) p = "~" substr(p, length(home) + 1)
n = split(p, parts, "/")
result = ""
for (i = 1; i <= n; i++) {
if (i == 1) {
result = parts[i]
} else if (i <= n - 2) {
if (substr(parts[i], 1, 1) == ".")
result = result "/" substr(parts[i], 1, 2)
else
result = result "/" substr(parts[i], 1, 1)
} else {
result = result "/" parts[i]
}
}
print $0 "\t" result
}'
}
# --- Internal subcommands (called by fzf) ---
_preview() {
local item="$1"
if [[ "$item" == SESSION:* ]]; then
local name="${item#SESSION:}"
printf '\e[1;33mSession: %s\e[0m\n\n' "$name"
tmux list-windows -t "$name" \
-F ' #{window_index}: #{window_name}#{?window_active, (active),} — #{pane_current_command}' 2>/dev/null
else
if command -v eza >/dev/null 2>&1; then
eza -la --icons --no-permissions --no-user --no-time "$item" 2>/dev/null
elif command -v tree >/dev/null 2>&1; then
tree -L 1 -a --noreport "$item" 2>/dev/null
else
ls -la "$item" 2>/dev/null
fi
fi
}
_kill_session() {
local item="$1"
if [[ "$item" == SESSION:* ]]; then
local name="${item#SESSION:}"
tmux kill-session -t "$name" 2>/dev/null || true
fi
}
_rename_session() {
local item="$1"
if [[ "$item" != SESSION:* ]]; then
echo "Not a session."
read -r
return
fi
local name="${item#SESSION:}"
printf 'Rename session "%s" to: ' "$name"
read -r new_name
[[ -z "$new_name" ]] && return
tmux rename-session -t "$name" "$new_name" 2>/dev/null
}
_load_specs() {
if [[ -f "$CONFIG_FILE" ]]; then
local found=false
while IFS= read -r line; do
line="${line%%#*}"
[[ -z "${line// /}" ]] && continue
line="${line//\~/$HOME}"
local path min max
IFS='|' read -r path min max <<< "$line"
path="${path#"${path%%[![:space:]]*}"}"; path="${path%"${path##*[![:space:]]}"}"
min="${min#"${min%%[![:space:]]*}"}"; min="${min%"${min##*[![:space:]]}"}"
max="${max#"${max%%[![:space:]]*}"}"; max="${max%"${max##*[![:space:]]}"}"
printf '%s|%s|%s\n' "$path" "$min" "$max"
found=true
done < "$CONFIG_FILE"
$found && return
fi
printf '%s\n' "${DEFAULT_SPECS[@]}"
}
_list() {
# Active tmux sessions (keyed with SESSION: prefix)
while IFS='|' read -r name windows path; do
[[ -z "$name" ]] && continue
local short_path="$path"
[[ "$short_path" == "$HOME"* ]] && short_path="~${short_path#"$HOME"}"
printf 'SESSION:%s\t* %s (%s win) [%s]\n' "$name" "$name" "$windows" "$short_path"
done < <(tmux list-sessions -F '#{session_name}|#{session_windows}|#{session_path}' 2>/dev/null || true)
# Directories from config
local use_fd=false
command -v fd >/dev/null 2>&1 && use_fd=true
while IFS='|' read -r path min max; do
[[ -d "$path" ]] || continue
if [[ "$min" -eq 0 && "$max" -eq 0 ]]; then
printf '%s\n' "$path"
elif $use_fd; then
fd --type d --min-depth "$min" --max-depth "$max" . "$path" 2>/dev/null
else
find "$path" -mindepth "$min" -maxdepth "$max" -type d 2>/dev/null
fi
done < <(_load_specs) | sed 's:/$::' | sort -u | _shorten_paths
}
# Find existing session by working directory
_find_session_by_path() {
local target="$1"
tmux list-sessions -F '#{session_name}|#{session_path}' 2>/dev/null |
awk -F'|' -v p="$target" '$2 == p { print $1; exit }'
}
# Route subcommands
case "${1:-}" in
--preview) shift; _preview "$1"; exit 0 ;;
--kill-session) shift; _kill_session "$1"; exit 0 ;;
--rename-session) shift; _rename_session "$1"; exit 0 ;;
--list) _list; exit 0 ;;
esac
# --- Main ---
edit_mode=false
if [[ $# -eq 1 ]]; then
selected=$1
selected="$1"
else
if command -v fd >/dev/null 2>&1; then
mapfile -t CANDIDATES < <(collect | sort -u)
selected=$(printf '%s\n' "${CANDIDATES[@]}" | fzf)
else
selected=$(collect | sort -u | fzf)
fi
selected=$(
"$SELF" --list | fzf \
--delimiter '\t' \
--with-nth 2 \
--header 'C-x:kill C-e:editor C-r:rename ?:preview' \
--preview "$SELF --preview {1}" \
--preview-window 'top:33%' \
--bind "ctrl-x:execute-silent($SELF --kill-session {1})+reload($SELF --list)" \
--bind "ctrl-r:execute($SELF --rename-session {1})+reload($SELF --list)" \
--bind "ctrl-e:become(printf 'EDIT\t%s' {1})" \
--bind '?:toggle-preview'
) || true
fi
[[ -z ${selected:-} ]] && exit 0
[[ -z "${selected:-}" ]] && exit 0
selected_name=$(basename "$selected" | tr -c '[:alnum:]' '_' | sed 's/^_*$/'"sess_$(date +%s)"'/' | sed 's/_$//')
tmux_running=$(pgrep tmux || true)
# Extract the key (full path or SESSION:name) from the tab-delimited line
selected_key="${selected%% *}"
if [[ -z ${TMUX:-} ]] && [[ -z $tmux_running ]]; then
# Detect edit mode from ctrl-e
if [[ "$selected_key" == EDIT ]]; then
edit_mode=true
selected_key=$(cut -f2 <<< "$selected")
fi
# Handle active session vs directory
if [[ "$selected_key" == SESSION:* ]]; then
selected_name="${selected_key#SESSION:}"
else
selected="$selected_key"
# Check for existing session by working directory first (supports renamed sessions)
selected_name=$(_find_session_by_path "$selected")
if [[ -z "$selected_name" ]]; then
selected_name=$(basename "$selected" | tr -c '[:alnum:]' '_' | sed 's/^_*//;s/_*$//')
[[ -z "$selected_name" ]] && selected_name="sess_$(date +%s)"
if [[ -z "${TMUX:-}" ]] && ! tmux list-sessions &>/dev/null; then
if $edit_mode; then
exec tmux new-session -s "$selected_name" -c "$selected" "${EDITOR:-nvim}" .
fi
exec tmux new-session -s "$selected_name" -c "$selected"
fi
if ! tmux has-session -t="$selected_name" 2>/dev/null; then
tmux new-session -ds "$selected_name" -c "$selected"
tmux rename-window -t "$selected_name:" "shell"
# tmux new-window -t "$selected_name:" -c "$selected" -n "neovim"
# tmux send-keys -t "$selected_name:neovim" "nvim" Enter
tmux select-window -t "$selected_name:shell"
fi
fi
if [[ -z ${TMUX:-} ]]; then
if $edit_mode; then
tmux send-keys -t "$selected_name" "${EDITOR:-nvim} ." Enter
fi
if [[ -z "${TMUX:-}" ]]; then
tmux attach -t "$selected_name"
else
tmux switch-client -t "$selected_name"
fi
i