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:
parent
c778538a48
commit
ace3e70676
15 changed files with 389 additions and 227 deletions
|
|
@ -18,7 +18,10 @@ bind-key - split-window # split
|
||||||
bind-key \; split-window -h # horizontal split
|
bind-key \; split-window -h # horizontal split
|
||||||
bind-key r source-file ~/.tmux.conf \; display-message "reloaded tmux config"
|
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 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 C-q command-prompt -p find-session 'switch-client -t %%'
|
||||||
bind-key Left previous-window # window back
|
bind-key Left previous-window # window back
|
||||||
bind-key Right next-window # window forward
|
bind-key Right next-window # window forward
|
||||||
|
|
|
||||||
|
|
@ -1,54 +1,54 @@
|
||||||
@media -moz-pref("userChrome.theme-material") {
|
@media -moz-pref("userChrome.theme-material") {
|
||||||
:root {
|
:root {
|
||||||
--md-sys-color-primary: #2f628c;
|
--md-sys-color-primary: #565f6a;
|
||||||
--md-sys-color-surface-tint: #2f628c;
|
--md-sys-color-surface-tint: #565f6a;
|
||||||
--md-sys-color-on-primary: #ffffff;
|
--md-sys-color-on-primary: #ffffff;
|
||||||
--md-sys-color-primary-container: #cee5ff;
|
--md-sys-color-primary-container: #dae3f1;
|
||||||
--md-sys-color-on-primary-container: #001d33;
|
--md-sys-color-on-primary-container: #131c26;
|
||||||
--md-sys-color-secondary: #51606f;
|
--md-sys-color-secondary: #5a5f66;
|
||||||
--md-sys-color-on-secondary: #ffffff;
|
--md-sys-color-on-secondary: #ffffff;
|
||||||
--md-sys-color-secondary-container: #d5e4f7;
|
--md-sys-color-secondary-container: #dee3eb;
|
||||||
--md-sys-color-on-secondary-container: #0e1d2a;
|
--md-sys-color-on-secondary-container: #171c22;
|
||||||
--md-sys-color-tertiary: #68587a;
|
--md-sys-color-tertiary: #51606f;
|
||||||
--md-sys-color-on-tertiary: #ffffff;
|
--md-sys-color-on-tertiary: #ffffff;
|
||||||
--md-sys-color-tertiary-container: #eedbff;
|
--md-sys-color-tertiary-container: #d5e4f7;
|
||||||
--md-sys-color-on-tertiary-container: #231533;
|
--md-sys-color-on-tertiary-container: #0e1d2a;
|
||||||
--md-sys-color-error: #ba1a1a;
|
--md-sys-color-error: #ba1a1a;
|
||||||
--md-sys-color-on-error: #ffffff;
|
--md-sys-color-on-error: #ffffff;
|
||||||
--md-sys-color-error-container: #ffdad6;
|
--md-sys-color-error-container: #ffdad6;
|
||||||
--md-sys-color-on-error-container: #410002;
|
--md-sys-color-on-error-container: #410002;
|
||||||
--md-sys-color-background: #f7f9ff;
|
--md-sys-color-background: #fbf9fa;
|
||||||
--md-sys-color-on-background: #181c20;
|
--md-sys-color-on-background: #1b1c1d;
|
||||||
--md-sys-color-surface: #f7f9ff;
|
--md-sys-color-surface: #fbf9fa;
|
||||||
--md-sys-color-on-surface: #181c20;
|
--md-sys-color-on-surface: #1b1c1d;
|
||||||
--md-sys-color-surface-variant: #dee3eb;
|
--md-sys-color-surface-variant: #e4e2e3;
|
||||||
--md-sys-color-on-surface-variant: #42474e;
|
--md-sys-color-on-surface-variant: #474748;
|
||||||
--md-sys-color-outline: #72777f;
|
--md-sys-color-outline: #777778;
|
||||||
--md-sys-color-outline-variant: #c2c7cf;
|
--md-sys-color-outline-variant: #c8c6c7;
|
||||||
--md-sys-color-shadow: #000000;
|
--md-sys-color-shadow: #000000;
|
||||||
--md-sys-color-scrim: #000000;
|
--md-sys-color-scrim: #000000;
|
||||||
--md-sys-color-inverse-surface: #2d3135;
|
--md-sys-color-inverse-surface: #303031;
|
||||||
--md-sys-color-inverse-on-surface: #eff1f6;
|
--md-sys-color-inverse-on-surface: #f2f0f1;
|
||||||
--md-sys-color-inverse-primary: #9bcbfb;
|
--md-sys-color-inverse-primary: #bec7d4;
|
||||||
--md-sys-color-primary-fixed: #cee5ff;
|
--md-sys-color-primary-fixed: #dae3f1;
|
||||||
--md-sys-color-on-primary-fixed: #001d33;
|
--md-sys-color-on-primary-fixed: #131c26;
|
||||||
--md-sys-color-primary-fixed-dim: #9bcbfb;
|
--md-sys-color-primary-fixed-dim: #bec7d4;
|
||||||
--md-sys-color-on-primary-fixed-variant: #0e4a73;
|
--md-sys-color-on-primary-fixed-variant: #3e4852;
|
||||||
--md-sys-color-secondary-fixed: #d5e4f7;
|
--md-sys-color-secondary-fixed: #dee3eb;
|
||||||
--md-sys-color-on-secondary-fixed: #0e1d2a;
|
--md-sys-color-on-secondary-fixed: #171c22;
|
||||||
--md-sys-color-secondary-fixed-dim: #b9c8da;
|
--md-sys-color-secondary-fixed-dim: #c2c7cf;
|
||||||
--md-sys-color-on-secondary-fixed-variant: #3a4857;
|
--md-sys-color-on-secondary-fixed-variant: #42474e;
|
||||||
--md-sys-color-tertiary-fixed: #eedbff;
|
--md-sys-color-tertiary-fixed: #d5e4f7;
|
||||||
--md-sys-color-on-tertiary-fixed: #231533;
|
--md-sys-color-on-tertiary-fixed: #0e1d2a;
|
||||||
--md-sys-color-tertiary-fixed-dim: #d3bfe6;
|
--md-sys-color-tertiary-fixed-dim: #b9c8da;
|
||||||
--md-sys-color-on-tertiary-fixed-variant: #504061;
|
--md-sys-color-on-tertiary-fixed-variant: #3a4857;
|
||||||
--md-sys-color-surface-dim: #d8dae0;
|
--md-sys-color-surface-dim: #dbd9da;
|
||||||
--md-sys-color-surface-bright: #f7f9ff;
|
--md-sys-color-surface-bright: #fbf9fa;
|
||||||
--md-sys-color-surface-container-lowest: #ffffff;
|
--md-sys-color-surface-container-lowest: #ffffff;
|
||||||
--md-sys-color-surface-container-low: #f1f3f9;
|
--md-sys-color-surface-container-low: #f5f3f4;
|
||||||
--md-sys-color-surface-container: #f7f9ff;
|
--md-sys-color-surface-container: #fbf9fa;
|
||||||
--md-sys-color-surface-container-high: #f7f9ff;
|
--md-sys-color-surface-container-high: #fbf9fa;
|
||||||
--md-sys-color-surface-container-highest: #f7f9ff;
|
--md-sys-color-surface-container-highest: #fbf9fa;
|
||||||
|
|
||||||
--m3-radius: 12px;
|
--m3-radius: 12px;
|
||||||
--m3-radius-sm: 10px;
|
--m3-radius-sm: 10px;
|
||||||
|
|
@ -68,55 +68,55 @@
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
:root {
|
:root {
|
||||||
--md-sys-color-primary: #9bcbfb;
|
--md-sys-color-primary: #bec7d4;
|
||||||
--md-sys-color-surface-tint: #9bcbfb;
|
--md-sys-color-surface-tint: #bec7d4;
|
||||||
--md-sys-color-on-primary: #003353;
|
--md-sys-color-on-primary: #28313b;
|
||||||
--md-sys-color-primary-container: #0e4a73;
|
--md-sys-color-primary-container: #3e4852;
|
||||||
--md-sys-color-on-primary-container: #cee5ff;
|
--md-sys-color-on-primary-container: #dae3f1;
|
||||||
--md-sys-color-secondary: #b9c8da;
|
--md-sys-color-secondary: #c2c7cf;
|
||||||
--md-sys-color-on-secondary: #233240;
|
--md-sys-color-on-secondary: #2c3137;
|
||||||
--md-sys-color-secondary-container: #3a4857;
|
--md-sys-color-secondary-container: #42474e;
|
||||||
--md-sys-color-on-secondary-container: #d5e4f7;
|
--md-sys-color-on-secondary-container: #dee3eb;
|
||||||
--md-sys-color-tertiary: #d3bfe6;
|
--md-sys-color-tertiary: #b9c8da;
|
||||||
--md-sys-color-on-tertiary: #382a49;
|
--md-sys-color-on-tertiary: #233240;
|
||||||
--md-sys-color-tertiary-container: #504061;
|
--md-sys-color-tertiary-container: #3a4857;
|
||||||
--md-sys-color-on-tertiary-container: #eedbff;
|
--md-sys-color-on-tertiary-container: #d5e4f7;
|
||||||
--md-sys-color-error: #ffb4ab;
|
--md-sys-color-error: #ffb4ab;
|
||||||
--md-sys-color-on-error: #690005;
|
--md-sys-color-on-error: #690005;
|
||||||
--md-sys-color-error-container: #93000a;
|
--md-sys-color-error-container: #93000a;
|
||||||
--md-sys-color-on-error-container: #ffdad6;
|
--md-sys-color-on-error-container: #ffdad6;
|
||||||
--md-sys-color-background: #101418;
|
--md-sys-color-background: #131314;
|
||||||
--md-sys-color-on-background: #e0e2e8;
|
--md-sys-color-on-background: #e4e2e3;
|
||||||
--md-sys-color-surface: #101418;
|
--md-sys-color-surface: #131314;
|
||||||
--md-sys-color-on-surface: #e0e2e8;
|
--md-sys-color-on-surface: #e4e2e3;
|
||||||
--md-sys-color-surface-variant: #42474e;
|
--md-sys-color-surface-variant: #474748;
|
||||||
--md-sys-color-on-surface-variant: #c2c7cf;
|
--md-sys-color-on-surface-variant: #c8c6c7;
|
||||||
--md-sys-color-outline: #8c9198;
|
--md-sys-color-outline: #919091;
|
||||||
--md-sys-color-outline-variant: #42474e;
|
--md-sys-color-outline-variant: #474748;
|
||||||
--md-sys-color-shadow: #000000;
|
--md-sys-color-shadow: #000000;
|
||||||
--md-sys-color-scrim: #000000;
|
--md-sys-color-scrim: #000000;
|
||||||
--md-sys-color-inverse-surface: #e0e2e8;
|
--md-sys-color-inverse-surface: #e4e2e3;
|
||||||
--md-sys-color-inverse-on-surface: #2d3135;
|
--md-sys-color-inverse-on-surface: #303031;
|
||||||
--md-sys-color-inverse-primary: #2f628c;
|
--md-sys-color-inverse-primary: #565f6a;
|
||||||
--md-sys-color-primary-fixed: #cee5ff;
|
--md-sys-color-primary-fixed: #dae3f1;
|
||||||
--md-sys-color-on-primary-fixed: #001d33;
|
--md-sys-color-on-primary-fixed: #131c26;
|
||||||
--md-sys-color-primary-fixed-dim: #9bcbfb;
|
--md-sys-color-primary-fixed-dim: #bec7d4;
|
||||||
--md-sys-color-on-primary-fixed-variant: #0e4a73;
|
--md-sys-color-on-primary-fixed-variant: #3e4852;
|
||||||
--md-sys-color-secondary-fixed: #d5e4f7;
|
--md-sys-color-secondary-fixed: #dee3eb;
|
||||||
--md-sys-color-on-secondary-fixed: #0e1d2a;
|
--md-sys-color-on-secondary-fixed: #171c22;
|
||||||
--md-sys-color-secondary-fixed-dim: #b9c8da;
|
--md-sys-color-secondary-fixed-dim: #c2c7cf;
|
||||||
--md-sys-color-on-secondary-fixed-variant: #3a4857;
|
--md-sys-color-on-secondary-fixed-variant: #42474e;
|
||||||
--md-sys-color-tertiary-fixed: #eedbff;
|
--md-sys-color-tertiary-fixed: #d5e4f7;
|
||||||
--md-sys-color-on-tertiary-fixed: #231533;
|
--md-sys-color-on-tertiary-fixed: #0e1d2a;
|
||||||
--md-sys-color-tertiary-fixed-dim: #d3bfe6;
|
--md-sys-color-tertiary-fixed-dim: #b9c8da;
|
||||||
--md-sys-color-on-tertiary-fixed-variant: #504061;
|
--md-sys-color-on-tertiary-fixed-variant: #3a4857;
|
||||||
--md-sys-color-surface-dim: #101418;
|
--md-sys-color-surface-dim: #131314;
|
||||||
--md-sys-color-surface-bright: #36393e;
|
--md-sys-color-surface-bright: #39393a;
|
||||||
--md-sys-color-surface-container-lowest: #0b0f12;
|
--md-sys-color-surface-container-lowest: #0e0e0f;
|
||||||
--md-sys-color-surface-container-low: #181c20;
|
--md-sys-color-surface-container-low: #1b1c1d;
|
||||||
--md-sys-color-surface-container: #1c2024;
|
--md-sys-color-surface-container: #1f2021;
|
||||||
--md-sys-color-surface-container-high: #272a2f;
|
--md-sys-color-surface-container-high: #2a2a2b;
|
||||||
--md-sys-color-surface-container-highest: #323539;
|
--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-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);
|
--m3-elev-2: 0 4px 10px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.35);
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
"currentThemeCategory": "generic",
|
"currentThemeCategory": "generic",
|
||||||
"customThemeFile": "/home/lew/.config/niri/dms/colors.json",
|
"customThemeFile": "/home/lew/.config/niri/dms/colors.json",
|
||||||
"registryThemeVariants": {},
|
"registryThemeVariants": {},
|
||||||
"matugenScheme": "scheme-tonal-spot",
|
"matugenScheme": "scheme-neutral",
|
||||||
"runUserMatugenTemplates": true,
|
"runUserMatugenTemplates": true,
|
||||||
"matugenTargetMonitor": "",
|
"matugenTargetMonitor": "",
|
||||||
"popupTransparency": 0.76,
|
"popupTransparency": 0.76,
|
||||||
|
|
@ -213,7 +213,7 @@
|
||||||
"networkPreference": "wifi",
|
"networkPreference": "wifi",
|
||||||
"iconTheme": "System Default",
|
"iconTheme": "System Default",
|
||||||
"cursorSettings": {
|
"cursorSettings": {
|
||||||
"theme": "System Default",
|
"theme": "Adwaita",
|
||||||
"size": 24,
|
"size": 24,
|
||||||
"niri": {
|
"niri": {
|
||||||
"hideWhenTyping": false,
|
"hideWhenTyping": false,
|
||||||
|
|
@ -270,7 +270,10 @@
|
||||||
"launchPrefix": "",
|
"launchPrefix": "",
|
||||||
"brightnessDevicePins": {},
|
"brightnessDevicePins": {},
|
||||||
"wifiNetworkPins": {
|
"wifiNetworkPins": {
|
||||||
"preferredWifi": "SKYP2Z6E"
|
"preferredWifi": [
|
||||||
|
"lew@OP",
|
||||||
|
"SKYP2Z6E"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"bluetoothDevicePins": {
|
"bluetoothDevicePins": {
|
||||||
"preferredDevice": "88:08:94:C3:DD:4B"
|
"preferredDevice": "88:08:94:C3:DD:4B"
|
||||||
|
|
@ -286,28 +289,28 @@
|
||||||
"runDmsMatugenTemplates": true,
|
"runDmsMatugenTemplates": true,
|
||||||
"matugenTemplateGtk": true,
|
"matugenTemplateGtk": true,
|
||||||
"matugenTemplateNiri": true,
|
"matugenTemplateNiri": true,
|
||||||
"matugenTemplateHyprland": true,
|
"matugenTemplateHyprland": false,
|
||||||
"matugenTemplateMangowc": true,
|
"matugenTemplateMangowc": false,
|
||||||
"matugenTemplateQt5ct": true,
|
"matugenTemplateQt5ct": false,
|
||||||
"matugenTemplateQt6ct": true,
|
"matugenTemplateQt6ct": false,
|
||||||
"matugenTemplateFirefox": true,
|
"matugenTemplateFirefox": true,
|
||||||
"matugenTemplatePywalfox": true,
|
"matugenTemplatePywalfox": false,
|
||||||
"matugenTemplateZenBrowser": true,
|
"matugenTemplateZenBrowser": false,
|
||||||
"matugenTemplateVesktop": true,
|
"matugenTemplateVesktop": true,
|
||||||
"matugenTemplateEquibop": true,
|
"matugenTemplateEquibop": false,
|
||||||
"matugenTemplateGhostty": true,
|
"matugenTemplateGhostty": true,
|
||||||
"matugenTemplateKitty": true,
|
"matugenTemplateKitty": false,
|
||||||
"matugenTemplateFoot": true,
|
"matugenTemplateFoot": false,
|
||||||
"matugenTemplateAlacritty": true,
|
"matugenTemplateAlacritty": true,
|
||||||
"matugenTemplateNeovim": true,
|
"matugenTemplateNeovim": true,
|
||||||
"matugenTemplateWezterm": true,
|
"matugenTemplateWezterm": false,
|
||||||
"matugenTemplateDgop": true,
|
"matugenTemplateDgop": true,
|
||||||
"matugenTemplateKcolorscheme": true,
|
"matugenTemplateKcolorscheme": true,
|
||||||
"matugenTemplateVscode": true,
|
"matugenTemplateVscode": false,
|
||||||
"matugenTemplateEmacs": true,
|
"matugenTemplateEmacs": false,
|
||||||
"showDock": false,
|
"showDock": false,
|
||||||
"dockAutoHide": false,
|
"dockAutoHide": false,
|
||||||
"dockSmartAutoHide": false,
|
"dockSmartAutoHide": true,
|
||||||
"dockGroupByApp": true,
|
"dockGroupByApp": true,
|
||||||
"dockOpenOnOverview": false,
|
"dockOpenOnOverview": false,
|
||||||
"dockPosition": 1,
|
"dockPosition": 1,
|
||||||
|
|
@ -350,7 +353,7 @@
|
||||||
"notificationTimeoutLow": 5000,
|
"notificationTimeoutLow": 5000,
|
||||||
"notificationTimeoutNormal": 5000,
|
"notificationTimeoutNormal": 5000,
|
||||||
"notificationTimeoutCritical": 0,
|
"notificationTimeoutCritical": 0,
|
||||||
"notificationCompactMode": false,
|
"notificationCompactMode": true,
|
||||||
"notificationPopupPosition": -1,
|
"notificationPopupPosition": -1,
|
||||||
"notificationHistoryEnabled": true,
|
"notificationHistoryEnabled": true,
|
||||||
"notificationHistoryMaxCount": 50,
|
"notificationHistoryMaxCount": 50,
|
||||||
|
|
@ -496,13 +499,14 @@
|
||||||
"widgetOutlineOpacity": 1,
|
"widgetOutlineOpacity": 1,
|
||||||
"widgetOutlineThickness": 1,
|
"widgetOutlineThickness": 1,
|
||||||
"fontScale": 1.05,
|
"fontScale": 1.05,
|
||||||
"autoHide": false,
|
"autoHide": true,
|
||||||
"autoHideDelay": 198,
|
"autoHideDelay": 198,
|
||||||
"openOnOverview": false,
|
"openOnOverview": true,
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"popupGapsAuto": true,
|
"popupGapsAuto": true,
|
||||||
"popupGapsManual": 9,
|
"popupGapsManual": 9,
|
||||||
"maximizeDetection": true
|
"maximizeDetection": true,
|
||||||
|
"showOnWindowsOpen": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"desktopClockEnabled": false,
|
"desktopClockEnabled": false,
|
||||||
|
|
@ -656,7 +660,8 @@
|
||||||
"desktopWidgetGroups": [],
|
"desktopWidgetGroups": [],
|
||||||
"builtInPluginSettings": {
|
"builtInPluginSettings": {
|
||||||
"dms_settings_search": {
|
"dms_settings_search": {
|
||||||
"trigger": "?"
|
"trigger": "?",
|
||||||
|
"enabled": false
|
||||||
},
|
},
|
||||||
"dms_sysmon": {
|
"dms_sysmon": {
|
||||||
"enabled": false
|
"enabled": false
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,31 @@
|
||||||
[colors.primary]
|
[colors.primary]
|
||||||
background = '#101418'
|
background = '#131314'
|
||||||
foreground = '#e0e2e8'
|
foreground = '#e4e2e3'
|
||||||
|
|
||||||
[colors.selection]
|
[colors.selection]
|
||||||
text = '#e0e2e8'
|
text = '#e4e2e3'
|
||||||
background = '#0e4a73'
|
background = '#3e4852'
|
||||||
|
|
||||||
[colors.cursor]
|
[colors.cursor]
|
||||||
text = '#101418'
|
text = '#131314'
|
||||||
cursor = '#9bcbfb'
|
cursor = '#bec7d4'
|
||||||
|
|
||||||
[colors.normal]
|
[colors.normal]
|
||||||
black = '#101418'
|
black = '#131314'
|
||||||
red = '#ff729c'
|
red = '#f36d94'
|
||||||
green = '#7dfb8e'
|
green = '#6ad478'
|
||||||
yellow = '#fff772'
|
yellow = '#fff772'
|
||||||
blue = '#81b7ee'
|
blue = '#b0bac9'
|
||||||
magenta = '#224b74'
|
magenta = '#4f5762'
|
||||||
cyan = '#9bcbfb'
|
cyan = '#bec7d4'
|
||||||
white = '#eff7ff'
|
white = '#d1d6de'
|
||||||
|
|
||||||
[colors.bright]
|
[colors.bright]
|
||||||
black = '#969da3'
|
black = '#7f8389'
|
||||||
red = '#ff9fbc'
|
red = '#ff9fbb'
|
||||||
green = '#a5ffb1'
|
green = '#a5feb1'
|
||||||
yellow = '#fffaa5'
|
yellow = '#fffaa5'
|
||||||
blue = '#acd5ff'
|
blue = '#d4dde9'
|
||||||
magenta = '#badcff'
|
magenta = '#ecf4ff'
|
||||||
cyan = '#d3e9ff'
|
cyan = '#f3f7ff'
|
||||||
white = '#f8fbff'
|
white = '#f8fbff'
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,22 @@
|
||||||
background = #101418
|
background = #131314
|
||||||
foreground = #e0e2e8
|
foreground = #e4e2e3
|
||||||
cursor-color = #9bcbfb
|
cursor-color = #bec7d4
|
||||||
selection-background = #0e4a73
|
selection-background = #3e4852
|
||||||
selection-foreground = #e0e2e8
|
selection-foreground = #e4e2e3
|
||||||
|
|
||||||
palette = 0=#101418
|
palette = 0=#131314
|
||||||
palette = 1=#ff729c
|
palette = 1=#f36d94
|
||||||
palette = 2=#7dfb8e
|
palette = 2=#6ad478
|
||||||
palette = 3=#fff772
|
palette = 3=#fff772
|
||||||
palette = 4=#81b7ee
|
palette = 4=#b0bac9
|
||||||
palette = 5=#224b74
|
palette = 5=#4f5762
|
||||||
palette = 6=#9bcbfb
|
palette = 6=#bec7d4
|
||||||
palette = 7=#eff7ff
|
palette = 7=#d1d6de
|
||||||
palette = 8=#969da3
|
palette = 8=#7f8389
|
||||||
palette = 9=#ff9fbc
|
palette = 9=#ff9fbb
|
||||||
palette = 10=#a5ffb1
|
palette = 10=#a5feb1
|
||||||
palette = 11=#fffaa5
|
palette = 11=#fffaa5
|
||||||
palette = 12=#acd5ff
|
palette = 12=#d4dde9
|
||||||
palette = 13=#badcff
|
palette = 13=#ecf4ff
|
||||||
palette = 14=#d3e9ff
|
palette = 14=#f3f7ff
|
||||||
palette = 15=#f8fbff
|
palette = 15=#f8fbff
|
||||||
|
|
|
||||||
|
|
@ -54,3 +54,5 @@ layout {
|
||||||
|
|
||||||
prefer-no-csd
|
prefer-no-csd
|
||||||
screenshot-path "~/dcim/pictures/screenshots/screenshot from %Y-%m-%d %H-%M-%S.png"
|
screenshot-path "~/dcim/pictures/screenshots/screenshot from %Y-%m-%d %H-%M-%S.png"
|
||||||
|
|
||||||
|
include "dms/cursor.kdl"
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,14 @@ layout {
|
||||||
background-color "transparent"
|
background-color "transparent"
|
||||||
|
|
||||||
focus-ring {
|
focus-ring {
|
||||||
active-color "#9bcbfb"
|
active-color "#bec7d4"
|
||||||
inactive-color "#8c9198"
|
inactive-color "#919091"
|
||||||
urgent-color "#ffb4ab"
|
urgent-color "#ffb4ab"
|
||||||
}
|
}
|
||||||
|
|
||||||
border {
|
border {
|
||||||
active-color "#9bcbfb"
|
active-color "#bec7d4"
|
||||||
inactive-color "#8c9198"
|
inactive-color "#919091"
|
||||||
urgent-color "#ffb4ab"
|
urgent-color "#ffb4ab"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -21,19 +21,19 @@ layout {
|
||||||
}
|
}
|
||||||
|
|
||||||
tab-indicator {
|
tab-indicator {
|
||||||
active-color "#9bcbfb"
|
active-color "#bec7d4"
|
||||||
inactive-color "#8c9198"
|
inactive-color "#919091"
|
||||||
urgent-color "#ffb4ab"
|
urgent-color "#ffb4ab"
|
||||||
}
|
}
|
||||||
|
|
||||||
insert-hint {
|
insert-hint {
|
||||||
color "#9bcbfb80"
|
color "#bec7d480"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
recent-windows {
|
recent-windows {
|
||||||
highlight {
|
highlight {
|
||||||
active-color "#0e4a73"
|
active-color "#3e4852"
|
||||||
urgent-color "#ffb4ab"
|
urgent-color "#ffb4ab"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
9
private_dot_config/niri/dms/cursor.kdl
Normal file
9
private_dot_config/niri/dms/cursor.kdl
Normal 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
|
||||||
|
}
|
||||||
|
|
@ -24,9 +24,7 @@
|
||||||
-- │ ├ 09_gitsigns.lua -- Git integration (Gitsigns)
|
-- │ ├ 09_gitsigns.lua -- Git integration (Gitsigns)
|
||||||
-- │ ├ 10_conform.lua -- Formatting (vim-sleuth, conform)
|
-- │ ├ 10_conform.lua -- Formatting (vim-sleuth, conform)
|
||||||
-- │ ├ 11_yanky.lua -- Yank and put enhancements
|
-- │ ├ 11_yanky.lua -- Yank and put enhancements
|
||||||
-- │ ├ 12_neoscroll.lua -- Animations
|
-- │ └ 12_neoscroll.lua -- Animations
|
||||||
-- │ ├ 13_easyalign.lua -- Visual mode: align around "=" with ga=
|
|
||||||
-- │ └ 14_obsidian.lua -- Obsidian vault integration
|
|
||||||
-- └ snippets/ -- Snippet definitions
|
-- └ snippets/ -- Snippet definitions
|
||||||
-- ├ package.json -- Snippet repository metadata
|
-- ├ package.json -- Snippet repository metadata
|
||||||
-- ├ global.json -- Global text snippets
|
-- ├ global.json -- Global text snippets
|
||||||
|
|
@ -39,4 +37,4 @@ require("config.20_keymaps")
|
||||||
require("config.30_autocmds")
|
require("config.30_autocmds")
|
||||||
require("config.40_statusline")
|
require("config.40_statusline")
|
||||||
|
|
||||||
vim.cmd.colorscheme("colibri-transparent")
|
-- vim.cmd.colorscheme("colibri-transparent")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
"base16-nvim": { "branch": "master", "commit": "21f2946e45cb92a336638d68c8de292fdf451d0c" },
|
||||||
"blink-copilot": { "branch": "main", "commit": "7ad8209b2f880a2840c94cdcd80ab4dc511d4f39" },
|
"blink-copilot": { "branch": "main", "commit": "7ad8209b2f880a2840c94cdcd80ab4dc511d4f39" },
|
||||||
"blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" },
|
"blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "1bf8b5b9caee51507aa51eaed3da5b0f2595c6b9" },
|
"conform.nvim": { "branch": "master", "commit": "1bf8b5b9caee51507aa51eaed3da5b0f2595c6b9" },
|
||||||
|
|
@ -22,7 +23,6 @@
|
||||||
"roslyn.nvim": { "branch": "main", "commit": "e2901d86d7c1702b88c02b9616802845dc6d49f8" },
|
"roslyn.nvim": { "branch": "main", "commit": "e2901d86d7c1702b88c02b9616802845dc6d49f8" },
|
||||||
"tmux.nvim": { "branch": "main", "commit": "2c1c3be0ef287073cef963f2aefa31a15c8b9cd8" },
|
"tmux.nvim": { "branch": "main", "commit": "2c1c3be0ef287073cef963f2aefa31a15c8b9cd8" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||||
"vim-easy-align": { "branch": "master", "commit": "9815a55dbcd817784458df7a18acacc6f82b1241" },
|
|
||||||
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
|
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
|
||||||
"yanky.nvim": { "branch": "main", "commit": "04775cc6e10ef038c397c407bc17f00a2f52b378" }
|
"yanky.nvim": { "branch": "main", "commit": "04775cc6e10ef038c397c407bc17f00a2f52b378" }
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ vim.g.maplocalleader = "\\"
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
{ import = "plugin" },
|
{ import = "plugin" },
|
||||||
|
{ import = "plugins" },
|
||||||
},
|
},
|
||||||
install = { colorscheme = { "habamax" } },
|
install = { colorscheme = { "habamax" } },
|
||||||
checker = { enabled = true, notify = false },
|
checker = { enabled = true, notify = false },
|
||||||
|
|
|
||||||
|
|
@ -4,38 +4,38 @@ return {
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
require('base16-colorscheme').setup({
|
require('base16-colorscheme').setup({
|
||||||
base00 = '#101418',
|
base00 = '#131314',
|
||||||
base01 = '#101418',
|
base01 = '#131314',
|
||||||
base02 = '#969da3',
|
base02 = '#7f8389',
|
||||||
base03 = '#969da3',
|
base03 = '#7f8389',
|
||||||
base04 = '#eff7ff',
|
base04 = '#d1d6de',
|
||||||
base05 = '#f8fbff',
|
base05 = '#f8fbff',
|
||||||
base06 = '#f8fbff',
|
base06 = '#f8fbff',
|
||||||
base07 = '#f8fbff',
|
base07 = '#f8fbff',
|
||||||
base08 = '#ff9fbc',
|
base08 = '#ff9fbb',
|
||||||
base09 = '#ff9fbc',
|
base09 = '#ff9fbb',
|
||||||
base0A = '#acd5ff',
|
base0A = '#d4dde9',
|
||||||
base0B = '#a5ffb1',
|
base0B = '#a5feb1',
|
||||||
base0C = '#d3e9ff',
|
base0C = '#f3f7ff',
|
||||||
base0D = '#acd5ff',
|
base0D = '#d4dde9',
|
||||||
base0E = '#badcff',
|
base0E = '#ecf4ff',
|
||||||
base0F = '#badcff',
|
base0F = '#ecf4ff',
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, 'Visual', {
|
vim.api.nvim_set_hl(0, 'Visual', {
|
||||||
bg = '#969da3',
|
bg = '#7f8389',
|
||||||
fg = '#f8fbff',
|
fg = '#f8fbff',
|
||||||
bold = true
|
bold = true
|
||||||
})
|
})
|
||||||
vim.api.nvim_set_hl(0, 'Statusline', {
|
vim.api.nvim_set_hl(0, 'Statusline', {
|
||||||
bg = '#acd5ff',
|
bg = '#d4dde9',
|
||||||
fg = '#101418',
|
fg = '#131314',
|
||||||
})
|
})
|
||||||
vim.api.nvim_set_hl(0, 'LineNr', { fg = '#969da3' })
|
vim.api.nvim_set_hl(0, 'LineNr', { fg = '#7f8389' })
|
||||||
vim.api.nvim_set_hl(0, 'CursorLineNr', { fg = '#d3e9ff', bold = true })
|
vim.api.nvim_set_hl(0, 'CursorLineNr', { fg = '#f3f7ff', bold = true })
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, 'Statement', {
|
vim.api.nvim_set_hl(0, 'Statement', {
|
||||||
fg = '#badcff',
|
fg = '#ecf4ff',
|
||||||
bold = true
|
bold = true
|
||||||
})
|
})
|
||||||
vim.api.nvim_set_hl(0, 'Keyword', { link = 'Statement' })
|
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, 'Conditional', { link = 'Statement' })
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, 'Function', {
|
vim.api.nvim_set_hl(0, 'Function', {
|
||||||
fg = '#acd5ff',
|
fg = '#d4dde9',
|
||||||
bold = true
|
bold = true
|
||||||
})
|
})
|
||||||
vim.api.nvim_set_hl(0, 'Macro', {
|
vim.api.nvim_set_hl(0, 'Macro', {
|
||||||
fg = '#acd5ff',
|
fg = '#d4dde9',
|
||||||
italic = true
|
italic = true
|
||||||
})
|
})
|
||||||
vim.api.nvim_set_hl(0, '@function.macro', { link = 'Macro' })
|
vim.api.nvim_set_hl(0, '@function.macro', { link = 'Macro' })
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, 'Type', {
|
vim.api.nvim_set_hl(0, 'Type', {
|
||||||
fg = '#d3e9ff',
|
fg = '#f3f7ff',
|
||||||
bold = true,
|
bold = true,
|
||||||
italic = true
|
italic = true
|
||||||
})
|
})
|
||||||
vim.api.nvim_set_hl(0, 'Structure', { link = 'Type' })
|
vim.api.nvim_set_hl(0, 'Structure', { link = 'Type' })
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, 'String', {
|
vim.api.nvim_set_hl(0, 'String', {
|
||||||
fg = '#a5ffb1',
|
fg = '#a5feb1',
|
||||||
italic = true
|
italic = true
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, 'Operator', { fg = '#eff7ff' })
|
vim.api.nvim_set_hl(0, 'Operator', { fg = '#d1d6de' })
|
||||||
vim.api.nvim_set_hl(0, 'Delimiter', { fg = '#eff7ff' })
|
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.bracket', { link = 'Delimiter' })
|
||||||
vim.api.nvim_set_hl(0, '@punctuation.delimiter', { link = 'Delimiter' })
|
vim.api.nvim_set_hl(0, '@punctuation.delimiter', { link = 'Delimiter' })
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, 'Comment', {
|
vim.api.nvim_set_hl(0, 'Comment', {
|
||||||
fg = '#969da3',
|
fg = '#7f8389',
|
||||||
italic = true
|
italic = true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ display_ascii_art = true
|
||||||
always_encrypt = false
|
always_encrypt = false
|
||||||
|
|
||||||
[store]
|
[store]
|
||||||
default_store_name = "d"
|
default_store_name = "store"
|
||||||
always_prompt_delete = true
|
always_prompt_delete = true
|
||||||
always_prompt_overwrite = true
|
always_prompt_overwrite = true
|
||||||
|
|
||||||
|
|
@ -16,10 +16,10 @@ display_ascii_art = true
|
||||||
default_list_format = "table"
|
default_list_format = "table"
|
||||||
always_show_full_values = false
|
always_show_full_values = false
|
||||||
always_hide_header = false
|
always_hide_header = false
|
||||||
default_columns = "key,store,ttl,value"
|
default_columns = "meta,ttl,size,store,key,value"
|
||||||
|
|
||||||
[git]
|
[git]
|
||||||
auto_fetch = false
|
auto_fetch = false
|
||||||
auto_commit = true
|
auto_commit = true
|
||||||
auto_push = false
|
auto_push = false
|
||||||
default_commit_message = "sync: {{.Time}}"
|
default_commit_message = "{{ summary }}"
|
||||||
|
|
|
||||||
|
|
@ -1,62 +1,206 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
# Each entry: PATH|minDepth|maxDepth
|
SELF="$(realpath "$0")"
|
||||||
SEARCH_SPECS=(
|
CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/tmux-sessionizer"
|
||||||
"$HOME/src/github|2|2" # username/repo
|
CONFIG_FILE="$CONFIG_DIR/sources.conf"
|
||||||
"$HOME/src/aur|1|1" # AUR pkgs
|
|
||||||
"$HOME/.config|0|1" # each folder in ~/.config
|
DEFAULT_SPECS=(
|
||||||
|
"$HOME/src/github|2|2"
|
||||||
|
"$HOME/src/aur|1|1"
|
||||||
|
"$HOME/.config|0|1"
|
||||||
"$HOME/.local/bin|0|0"
|
"$HOME/.local/bin|0|0"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Optional: override via env, e.g.
|
# --- Path shortening ---
|
||||||
# SESSIONIZER_SPECS="$HOME/work|1|2,$HOME/projects|2|2"
|
# Shorten all but last 2 components: ~/src/github/user/repo → ~/s/g/user/repo
|
||||||
IFS=',' read -r -a _OVERRIDE <<< "${SESSIONIZER_SPECS:-}"
|
# Dotfile components keep the dot: .config → .c
|
||||||
if [[ ${#_OVERRIDE[@]} -gt 0 && -n ${_OVERRIDE[0]} ]]; then
|
_shorten_paths() {
|
||||||
SEARCH_SPECS=("${_OVERRIDE[@]}")
|
awk -v home="$HOME" '{
|
||||||
fi
|
p = $0
|
||||||
unset _OVERRIDE
|
if (index(p, home) == 1) p = "~" substr(p, length(home) + 1)
|
||||||
|
n = split(p, parts, "/")
|
||||||
collect() {
|
result = ""
|
||||||
local path min max
|
for (i = 1; i <= n; i++) {
|
||||||
for spec in "${SEARCH_SPECS[@]}"; do
|
if (i == 1) {
|
||||||
IFS='|' read -r path min max <<<"$spec"
|
result = parts[i]
|
||||||
[[ -d $path ]] || continue
|
} else if (i <= n - 2) {
|
||||||
find "$path" -mindepth "$min" -maxdepth "$max" -type d 2>/dev/null
|
if (substr(parts[i], 1, 1) == ".")
|
||||||
done
|
result = result "/" substr(parts[i], 1, 2)
|
||||||
|
else
|
||||||
|
result = result "/" substr(parts[i], 1, 1)
|
||||||
|
} else {
|
||||||
|
result = result "/" parts[i]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print $0 "\t" result
|
||||||
|
}'
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ $# -eq 1 ]]; then
|
# --- Internal subcommands (called by fzf) ---
|
||||||
selected=$1
|
|
||||||
else
|
_preview() {
|
||||||
if command -v fd >/dev/null 2>&1; then
|
local item="$1"
|
||||||
mapfile -t CANDIDATES < <(collect | sort -u)
|
if [[ "$item" == SESSION:* ]]; then
|
||||||
selected=$(printf '%s\n' "${CANDIDATES[@]}" | fzf)
|
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
|
else
|
||||||
selected=$(collect | sort -u | fzf)
|
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"
|
||||||
|
else
|
||||||
|
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
|
||||||
|
|
||||||
|
# Extract the key (full path or SESSION:name) from the tab-delimited line
|
||||||
|
selected_key="${selected%% *}"
|
||||||
|
|
||||||
|
# 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
|
||||||
|
tmux new-session -ds "$selected_name" -c "$selected"
|
||||||
|
tmux rename-window -t "$selected_name:" "shell"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ -z ${selected:-} ]] && exit 0
|
if $edit_mode; then
|
||||||
|
tmux send-keys -t "$selected_name" "${EDITOR:-nvim} ." Enter
|
||||||
selected_name=$(basename "$selected" | tr -c '[:alnum:]' '_' | sed 's/^_*$/'"sess_$(date +%s)"'/' | sed 's/_$//')
|
|
||||||
tmux_running=$(pgrep tmux || true)
|
|
||||||
|
|
||||||
if [[ -z ${TMUX:-} ]] && [[ -z $tmux_running ]]; then
|
|
||||||
exec tmux new-session -s "$selected_name" -c "$selected"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! tmux has-session -t="$selected_name" 2>/dev/null; then
|
if [[ -z "${TMUX:-}" ]]; 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
|
|
||||||
|
|
||||||
if [[ -z ${TMUX:-} ]]; then
|
|
||||||
tmux attach -t "$selected_name"
|
tmux attach -t "$selected_name"
|
||||||
else
|
else
|
||||||
tmux switch-client -t "$selected_name"
|
tmux switch-client -t "$selected_name"
|
||||||
fi
|
fi
|
||||||
i
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue